diff options
author | Michael Meeks <michael.meeks@novell.com> | 2011-03-14 16:51:14 +0000 |
---|---|---|
committer | Michael Meeks <michael.meeks@novell.com> | 2011-03-14 16:51:14 +0000 |
commit | 5bd7c9930824d7b58adb9cd16a3d07a0f22bc2e1 (patch) | |
tree | a860d6c23e951105a63b990acfdb68c1084fc2d9 /sw/source/ui | |
parent | 1b63b7c2cb9ea29579c5982cce2aa0ac69093c24 (diff) | |
parent | 9510db0d3678e8eff2d8607ff2f07daff45011c2 (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/ui')
548 files changed, 12780 insertions, 15851 deletions
diff --git a/sw/source/ui/app/appenv.cxx b/sw/source/ui/app/appenv.cxx index 00621e1e38..53c7bc8b4e 100644 --- a/sw/source/ui/app/appenv.cxx +++ b/sw/source/ui/app/appenv.cxx @@ -92,16 +92,16 @@ String InsertLabEnvText( SwWrtShell& rSh, SwFldMgr& rFldMgr, const String& rText aText.EraseAllChars( '\r' ); - USHORT nTokenPos = 0; + sal_uInt16 nTokenPos = 0; while( STRING_NOTFOUND != nTokenPos ) { String aLine = aText.GetToken( 0, '\n', nTokenPos ); while ( aLine.Len() ) { String sTmpText; - BOOL bField = FALSE; + sal_Bool bField = sal_False; - USHORT nPos = aLine.Search( '<' ); + sal_uInt16 nPos = aLine.Search( '<' ); if ( nPos ) { sTmpText = aLine.Copy( 0, nPos ); @@ -122,14 +122,14 @@ String InsertLabEnvText( SwWrtShell& rSh, SwFldMgr& rFldMgr, const String& rText // Database fields must contain at least 3 points! String sDBName( sTmpText.Copy( 1, sTmpText.Len() - 2)); - USHORT nCnt = sDBName.GetTokenCount('.'); + sal_uInt16 nCnt = sDBName.GetTokenCount('.'); if (nCnt >= 3) { - ::ReplacePoint(sDBName, TRUE); + ::ReplacePoint(sDBName, sal_True); SwInsertFld_Data aData(TYP_DBFLD, 0, sDBName, aEmptyStr, 0, &rSh ); rFldMgr.InsertFld( aData ); sRet = sDBName; - bField = TRUE; + bField = sal_True; } } } @@ -143,18 +143,18 @@ String InsertLabEnvText( SwWrtShell& rSh, SwFldMgr& rFldMgr, const String& rText return sRet; } -void lcl_CopyCollAttr(SwWrtShell* pOldSh, SwWrtShell* pNewSh, USHORT nCollId) +void lcl_CopyCollAttr(SwWrtShell* pOldSh, SwWrtShell* pNewSh, sal_uInt16 nCollId) { - USHORT nCollCnt = pOldSh->GetTxtFmtCollCount(); + sal_uInt16 nCollCnt = pOldSh->GetTxtFmtCollCount(); SwTxtFmtColl* pColl; - for( USHORT nCnt = 0; nCnt < nCollCnt; ++nCnt ) + for( sal_uInt16 nCnt = 0; nCnt < nCollCnt; ++nCnt ) if(nCollId == (pColl = &pOldSh->GetTxtFmtColl(nCnt))->GetPoolFmtId()) pNewSh->GetTxtCollFromPool(nCollId)->SetFmtAttr(pColl->GetAttrSet()); } void SwModule::InsertEnv( SfxRequest& rReq ) { - static USHORT nTitleNo = 0; + static sal_uInt16 nTitleNo = 0; SwDocShell *pMyDocSh; SfxViewFrame *pFrame; @@ -167,7 +167,7 @@ void SwModule::InsertEnv( SfxRequest& rReq ) pOldSh = pMyDocSh ? pMyDocSh->GetWrtShell() : 0; // Create new document (don't show!) - SfxObjectShellRef xDocSh( new SwDocShell( SFX_CREATE_MODE_STANDARD ) ); + SfxObjectShellLock xDocSh( new SwDocShell( SFX_CREATE_MODE_STANDARD ) ); xDocSh->DoInitNew( 0 ); pFrame = SfxViewFrame::LoadHiddenDocument( *xDocSh, 0 ); pNewView = (SwView*) pFrame->GetViewShell(); @@ -190,7 +190,7 @@ void SwModule::InsertEnv( SfxRequest& rReq ) SwEnvCfgItem aEnvCfg; // Check if there's already an envelope. - BOOL bEnvChange = FALSE; + sal_Bool bEnvChange = sal_False; SfxItemSet aSet(GetPool(), FN_ENVELOP, FN_ENVELOP, 0); aSet.Put(aEnvCfg.GetItem()); @@ -238,7 +238,7 @@ void SwModule::InsertEnv( SfxRequest& rReq ) if (nMode == ENV_NEWDOC || nMode == ENV_INSERT) { - SwWait aWait( (SwDocShell&)*xDocSh, TRUE ); + SwWait aWait( (SwDocShell&)*xDocSh, sal_True ); // Read dialog and save item to config const SwEnvItem& rItem = pItem ? *pItem : (const SwEnvItem&) pDlg->GetOutputItemSet()->Get(FN_ENVELOP); @@ -253,7 +253,7 @@ void SwModule::InsertEnv( SfxRequest& rReq ) { OSL_ENSURE(pOldSh, "No document - wasn't 'Insert' disabled???"); SvxPaperBinItem aItem( RES_PAPER_BIN ); - aItem.SetValue((BYTE)pSh->getIDocumentDeviceAccess()->getPrinter(true)->GetPaperBin()); + aItem.SetValue((sal_uInt8)pSh->getIDocumentDeviceAccess()->getPrinter(true)->GetPaperBin()); pOldSh->GetPageDescFromPool(RES_POOLPAGE_JAKET)->GetMaster().SetFmtAttr(aItem); } @@ -278,7 +278,7 @@ void SwModule::InsertEnv( SfxRequest& rReq ) // Here it goes (insert) pSh->StartUndo(UNDO_UI_INSERT_ENVELOPE, NULL); pSh->StartAllAction(); - pSh->SttEndDoc(TRUE); + pSh->SttEndDoc(sal_True); if (bEnvChange) { @@ -286,8 +286,8 @@ void SwModule::InsertEnv( SfxRequest& rReq ) pFollow = pSh->GetPageDesc(pSh->GetCurPageDesc()).GetFollow(); // Delete text from the first page - if ( !pSh->SttNxtPg(TRUE) ) - pSh->EndPg(TRUE); + if ( !pSh->SttNxtPg(sal_True) ) + pSh->EndPg(sal_True); pSh->DelRight(); // Delete frame of the first page if( pSh->GotoFly( rSendMark ) ) @@ -300,7 +300,7 @@ void SwModule::InsertEnv( SfxRequest& rReq ) pSh->EnterSelFrmMode(); pSh->DelRight(); } - pSh->SttEndDoc(TRUE); + pSh->SttEndDoc(sal_True); } else // Followup template: page 1 @@ -310,21 +310,21 @@ void SwModule::InsertEnv( SfxRequest& rReq ) if ( pSh->IsCrsrInTbl() ) { pSh->SplitNode(); - pSh->Right( CRSR_SKIP_CHARS, FALSE, 1, FALSE ); + pSh->Right( CRSR_SKIP_CHARS, sal_False, 1, sal_False ); SfxItemSet aBreakSet( pSh->GetAttrPool(), RES_BREAK, RES_BREAK, 0 ); aBreakSet.Put( SvxFmtBreakItem(SVX_BREAK_PAGE_BEFORE, RES_BREAK) ); pSh->SetTblAttr( aBreakSet ); } else - pSh->InsertPageBreak(0, FALSE); - pSh->SttEndDoc(TRUE); + pSh->InsertPageBreak(0, sal_False); + pSh->SttEndDoc(sal_True); } else { pFollow = &pSh->GetPageDesc(pSh->GetCurPageDesc()); // Let's go (print) pSh->StartAllAction(); - pSh->DoUndo(FALSE); + pSh->DoUndo(sal_False); // Again, copy the new collections "Sender" and "Reciever" to // a new document @@ -360,8 +360,8 @@ void SwModule::InsertEnv( SfxRequest& rReq ) long lLeft = rItem.lShiftRight, lUpper = rItem.lShiftDown; - USHORT nPageW = (USHORT) Max(rItem.lWidth, rItem.lHeight), - nPageH = (USHORT) Min(rItem.lWidth, rItem.lHeight); + sal_uInt16 nPageW = (sal_uInt16) Max(rItem.lWidth, rItem.lHeight), + nPageH = (sal_uInt16) Min(rItem.lWidth, rItem.lHeight); switch (rItem.eAlign) { @@ -378,18 +378,18 @@ void SwModule::InsertEnv( SfxRequest& rReq ) } SvxLRSpaceItem aLRMargin( RES_LR_SPACE ); SvxULSpaceItem aULMargin( RES_UL_SPACE ); - aLRMargin.SetLeft ((USHORT) lLeft ); - aULMargin.SetUpper((USHORT) lUpper); + aLRMargin.SetLeft ((sal_uInt16) lLeft ); + aULMargin.SetUpper((sal_uInt16) lUpper); aLRMargin.SetRight(0); aULMargin.SetLower(0); rFmt.SetFmtAttr(aLRMargin); rFmt.SetFmtAttr(aULMargin); // Header and footer - rFmt.SetFmtAttr(SwFmtHeader(BOOL(FALSE))); - pDesc->ChgHeaderShare(FALSE); - rFmt.SetFmtAttr(SwFmtFooter(BOOL(FALSE))); - pDesc->ChgFooterShare(FALSE); + rFmt.SetFmtAttr(SwFmtHeader(sal_Bool(sal_False))); + pDesc->ChgHeaderShare(sal_False); + rFmt.SetFmtAttr(SwFmtFooter(sal_Bool(sal_False))); + pDesc->ChgFooterShare(sal_False); // Page numbering pDesc->SetUseOn(nsUseOnPage::PD_ALL); @@ -413,9 +413,9 @@ void SwModule::InsertEnv( SfxRequest& rReq ) // Apply page description - USHORT nPos; + sal_uInt16 nPos; pSh->FindPageDescByName( pDesc->GetName(), - FALSE, + sal_False, &nPos ); @@ -423,7 +423,7 @@ void SwModule::InsertEnv( SfxRequest& rReq ) pSh->ChgCurPageDesc(*pDesc); // Insert Frame - SwFlyFrmAttrMgr aMgr(FALSE, pSh, FRMMGR_TYPE_ENVELP); + SwFlyFrmAttrMgr aMgr(sal_False, pSh, FRMMGR_TYPE_ENVELP); SwFldMgr aFldMgr; aMgr.SetHeightSizeType(ATT_VAR_SIZE); @@ -435,7 +435,7 @@ void SwModule::InsertEnv( SfxRequest& rReq ) // Sender if (rItem.bSend) { - pSh->SttEndDoc(TRUE); + pSh->SttEndDoc(sal_True); aMgr.InsertFlyFrm(FLY_AT_PAGE, Point(rItem.lSendFromLeft + lLeft, rItem.lSendFromTop + lUpper), Size (rItem.lAddrFromLeft - rItem.lSendFromLeft, 0)); @@ -450,7 +450,7 @@ void SwModule::InsertEnv( SfxRequest& rReq ) } // Addressee - pSh->SttEndDoc(TRUE); + pSh->SttEndDoc(sal_True); aMgr.InsertFlyFrm(FLY_AT_PAGE, Point(rItem.lAddrFromLeft + lLeft, rItem.lAddrFromTop + lUpper), @@ -467,12 +467,12 @@ void SwModule::InsertEnv( SfxRequest& rReq ) pSh->SetPageObjsNewPage(aFlyArr, 1); // Finished - pSh->SttEndDoc(TRUE); + pSh->SttEndDoc(sal_True); pSh->EndAllAction(); if (nMode == ENV_NEWDOC) - pSh->DoUndo(TRUE); + pSh->DoUndo(sal_True); else pSh->EndUndo(UNDO_UI_INSERT_ENVELOPE); @@ -482,7 +482,7 @@ void SwModule::InsertEnv( SfxRequest& rReq ) if ( rItem.aAddrText.indexOf('<') >= 0 ) { - static USHORT const aInva[] = + static sal_uInt16 const aInva[] = { SID_SBA_BRW_UPDATE, SID_SBA_BRW_INSERT, @@ -500,7 +500,7 @@ void SwModule::InsertEnv( SfxRequest& rReq ) { rReq.AppendItem( rItem ); if ( nMode == ENV_NEWDOC ) - rReq.AppendItem( SfxBoolItem( FN_PARAM_1, TRUE ) ); + rReq.AppendItem( SfxBoolItem( FN_PARAM_1, sal_True ) ); } rReq.Done(); diff --git a/sw/source/ui/app/apphdl.cxx b/sw/source/ui/app/apphdl.cxx index 78247c5bc1..5f5e5f1524 100644 --- a/sw/source/ui/app/apphdl.cxx +++ b/sw/source/ui/app/apphdl.cxx @@ -28,6 +28,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" + #include <hintids.hxx> #include <tools/urlobj.hxx> @@ -81,6 +82,7 @@ #include <gloslst.hxx> // SwGlossaryList #include <glosdoc.hxx> // SwGlossaryList #include <doc.hxx> +#include <IDocumentUndoRedo.hxx> #include <cfgitems.hxx> #include <prtopt.hxx> #include <modcfg.hxx> @@ -131,7 +133,6 @@ using namespace ::com::sun::star; #define _ExecAddress ExecOther #define _StateAddress StateOther #include <sfx2/msg.hxx> -#include <svx/svxslots.hxx> #include "swslots.hxx" #include <cfgid.h> @@ -197,7 +198,7 @@ void SwModule::StateOther(SfxItemSet &rSet) } break; case SID_ATTR_METRIC: - rSet.Put( SfxUInt16Item( SID_ATTR_METRIC, static_cast< UINT16 >(::GetDfltMetric(bWebView)))); + rSet.Put( SfxUInt16Item( SID_ATTR_METRIC, static_cast< sal_uInt16 >(::GetDfltMetric(bWebView)))); break; case FN_SET_MODOPT_TBLNUMFMT: rSet.Put( SfxBoolItem( nWhich, pModuleConfig-> @@ -217,7 +218,7 @@ SwView* lcl_LoadDoc(SwView* pView, const String& rURL) { SfxStringItem aURL(SID_FILE_NAME, rURL); SfxStringItem aTargetFrameName( SID_TARGETNAME, String::CreateFromAscii("_blank") ); - SfxBoolItem aHidden( SID_HIDDEN, TRUE ); + SfxBoolItem aHidden( SID_HIDDEN, sal_True ); SfxStringItem aReferer(SID_REFERER, pView->GetDocShell()->GetTitle()); SfxObjectItem* pItem = (SfxObjectItem*)pView->GetViewFrame()->GetDispatcher()-> Execute(SID_OPENDOC, SFX_CALLMODE_SYNCHRON, @@ -329,7 +330,7 @@ void SwMailMergeWizardExecutor::ExecuteMailMergeWizard( const SfxItemSet * pArgs m_pMMConfig->SetSourceView( m_pView ); m_pView->SetMailMergeConfigItem(0, 0, sal_True); SfxViewFrame* pViewFrame = m_pView->GetViewFrame(); - pViewFrame->ShowChildWindow(FN_MAILMERGE_CHILDWINDOW, FALSE); + pViewFrame->ShowChildWindow(FN_MAILMERGE_CHILDWINDOW, sal_False); OSL_ENSURE(m_pMMConfig, "no MailMergeConfigItem available"); bRestoreWizard = true; } @@ -734,7 +735,7 @@ void SwModule::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint ) } else if(rHint.ISA(SfxSimpleHint)) { - USHORT nHintId = ((SfxSimpleHint&)rHint).GetId(); + sal_uInt16 nHintId = ((SfxSimpleHint&)rHint).GetId(); if(SFX_HINT_DEINITIALIZING == nHintId) { DELETEZ(pWebUsrPref); @@ -782,26 +783,23 @@ void SwModule::ConfigurationChanged( utl::ConfigurationBroadcaster* pBrdCst, sal { if( pBrdCst == pUserOptions ) { - bAuthorInitialised = FALSE; + bAuthorInitialised = sal_False; } else if( pBrdCst == pUndoOptions ) { - const int nNew = GetUndoOptions().GetUndoCount(); - const int nOld = SwEditShell::GetUndoActionCount(); - if(!nNew || !nOld) - { - sal_Bool bUndo = nNew != 0; + sal_Int32 const nNew = GetUndoOptions().GetUndoCount(); + bool const bUndo = (nNew != 0); + // switch Undo for all DocShells // Iterate through DocShells and switch undos - - TypeId aType(TYPE(SwDocShell)); - SwDocShell* pDocShell = (SwDocShell*)SfxObjectShell::GetFirst(&aType); - while( pDocShell ) - { - pDocShell->GetDoc()->DoUndo( bUndo ); - pDocShell = (SwDocShell*)SfxObjectShell::GetNext(*pDocShell, &aType); - } + TypeId aType(TYPE(SwDocShell)); + SwDocShell * pDocShell = + static_cast<SwDocShell *>(SfxObjectShell::GetFirst(&aType)); + while (pDocShell) + { + pDocShell->GetDoc()->GetIDocumentUndoRedo().DoUndo(bUndo); + pDocShell = static_cast<SwDocShell *>( + SfxObjectShell::GetNext(*pDocShell, &aType)); } - SwEditShell::SetUndoActionCount( static_cast< USHORT >(nNew)); } else if ( pBrdCst == pColorConfig || pBrdCst == pAccessibilityOptions ) { @@ -921,11 +919,11 @@ const SwMasterUsrPref *SwModule::GetUsrPref(sal_Bool bWeb) const { // The SpellChecker is needed in SwMasterUsrPref's Load, but it must not // be created there #58256# - pNonConstModule->pWebUsrPref = new SwMasterUsrPref(TRUE); + pNonConstModule->pWebUsrPref = new SwMasterUsrPref(sal_True); } else if(!bWeb && !pUsrPref) { - pNonConstModule->pUsrPref = new SwMasterUsrPref(FALSE); + pNonConstModule->pUsrPref = new SwMasterUsrPref(sal_False); } return bWeb ? pWebUsrPref : pUsrPref; } @@ -937,7 +935,7 @@ void NewXForms( SfxRequest& rReq ) // copied & excerpted from SwModule::InsertLab(..) // create new document - SfxObjectShellRef xDocSh( new SwDocShell( SFX_CREATE_MODE_STANDARD) ); + SfxObjectShellLock xDocSh( new SwDocShell( SFX_CREATE_MODE_STANDARD) ); xDocSh->DoInitNew( 0 ); // initialize XForms diff --git a/sw/source/ui/app/applab.cxx b/sw/source/ui/app/applab.cxx index b51dc45495..00809fe954 100644 --- a/sw/source/ui/app/applab.cxx +++ b/sw/source/ui/app/applab.cxx @@ -197,7 +197,7 @@ void SwModule::InsertLab(SfxRequest& rReq, sal_Bool bLabel) aLabCfg.Commit(); // Create new document - SfxObjectShellRef xDocSh( new SwDocShell( SFX_CREATE_MODE_STANDARD)); + SfxObjectShellLock xDocSh( new SwDocShell( SFX_CREATE_MODE_STANDARD)); xDocSh->DoInitNew( 0 ); // Printer diff --git a/sw/source/ui/app/appopt.cxx b/sw/source/ui/app/appopt.cxx index abf875859a..570f060670 100644 --- a/sw/source/ui/app/appopt.cxx +++ b/sw/source/ui/app/appopt.cxx @@ -28,14 +28,15 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" -#include <hintids.hxx> #include <cmdid.h> // Function-Ids -#include <com/sun/star/i18n/ScriptType.hpp> - #define _SVSTDARR_STRINGSDTOR #include <svl/svstdarr.hxx> +#include <com/sun/star/i18n/ScriptType.hpp> + +#include <hintids.hxx> +#include <cmdid.h> // Funktion-Ids #include <vcl/msgbox.hxx> #include <svl/eitem.hxx> #include <sfx2/request.hxx> @@ -55,6 +56,7 @@ #include <edtwin.hxx> #include <swmodule.hxx> #include <view.hxx> +#include <doc.hxx> #include <wrtsh.hxx> #include <IDocumentDeviceAccess.hxx> #include <uitool.hxx> @@ -71,7 +73,6 @@ #include <editeng/langitem.hxx> #include <unotools/lingucfg.hxx> #include <editeng/unolingu.hxx> - #include <globals.hrc> #include <globals.h> // e.g. global Constants #include <svl/slstitm.hxx> @@ -83,9 +84,9 @@ using namespace ::com::sun::star::uno; using namespace ::com::sun::star::lang; -SfxItemSet* SwModule::CreateItemSet( USHORT nId ) +SfxItemSet* SwModule::CreateItemSet( sal_uInt16 nId ) { - BOOL bTextDialog = (nId == SID_SW_EDITOPTIONS) ? TRUE : FALSE; + sal_Bool bTextDialog = (nId == SID_SW_EDITOPTIONS) ? sal_True : sal_False; // the options for the Web- and Textdialog are put together here SwViewOption aViewOpt = *GetUsrPref(!bTextDialog); @@ -97,7 +98,7 @@ SfxItemSet* SwModule::CreateItemSet( USHORT nId ) if(pAppView) { // if Text then no WebView and vice versa - BOOL bWebView = 0 != PTR_CAST(SwWebView, pAppView); + sal_Bool bWebView = 0 != PTR_CAST(SwWebView, pAppView); if( (bWebView && !bTextDialog) ||(!bWebView && bTextDialog)) { aViewOpt = *pAppView->GetWrtShell().GetViewOptions(); @@ -184,20 +185,20 @@ SfxItemSet* SwModule::CreateItemSet( USHORT nId ) pRet->Put(SwPtrItem(FN_PARAM_STDFONTS, GetStdFontConfig())); if( PTR_CAST( SwPagePreView, SfxViewShell::Current())!=0) { - SfxBoolItem aBool(SfxBoolItem(SID_PRINTPREVIEW, TRUE)); + SfxBoolItem aBool(SfxBoolItem(SID_PRINTPREVIEW, sal_True)); pRet->Put(aBool); } FieldUnit eUnit = pPref->GetHScrollMetric(); if(pAppView) pAppView->GetHLinealMetric(eUnit); - pRet->Put(SfxUInt16Item( FN_HSCROLL_METRIC, static_cast< UINT16 >(eUnit))); + pRet->Put(SfxUInt16Item( FN_HSCROLL_METRIC, static_cast< sal_uInt16 >(eUnit))); eUnit = pPref->GetVScrollMetric(); if(pAppView) pAppView->GetVLinealMetric(eUnit); - pRet->Put(SfxUInt16Item( FN_VSCROLL_METRIC, static_cast< UINT16 >(eUnit) )); - pRet->Put(SfxUInt16Item( SID_ATTR_METRIC, static_cast< UINT16 >(pPref->GetMetric()) )); + pRet->Put(SfxUInt16Item( FN_VSCROLL_METRIC, static_cast< sal_uInt16 >(eUnit) )); + pRet->Put(SfxUInt16Item( SID_ATTR_METRIC, static_cast< sal_uInt16 >(pPref->GetMetric()) )); pRet->Put(SfxBoolItem(SID_ATTR_APPLYCHARUNIT, pPref->IsApplyCharUnit())); if(bTextDialog) { @@ -206,10 +207,10 @@ SfxItemSet* SwModule::CreateItemSet( USHORT nId ) const SvxTabStopItem& rDefTabs = (const SvxTabStopItem&)pAppView->GetWrtShell(). GetDefault(RES_PARATR_TABSTOP); - pRet->Put( SfxUInt16Item( SID_ATTR_DEFTABSTOP, (USHORT)::GetTabDist(rDefTabs))); + pRet->Put( SfxUInt16Item( SID_ATTR_DEFTABSTOP, (sal_uInt16)::GetTabDist(rDefTabs))); } else - pRet->Put(SfxUInt16Item( SID_ATTR_DEFTABSTOP, (UINT16)pPref->GetDefTab())); + pRet->Put(SfxUInt16Item( SID_ATTR_DEFTABSTOP, (sal_uInt16)pPref->GetDefTab())); } // Options for GridTabPage @@ -220,8 +221,8 @@ SfxItemSet* SwModule::CreateItemSet( USHORT nId ) aGridItem.SetGridVisible( aViewOpt.IsGridVisible()); const Size& rSnapSize = aViewOpt.GetSnapSize(); - aGridItem.SetFldDrawX( (USHORT) (rSnapSize.Width() )); - aGridItem.SetFldDrawY( (USHORT) (rSnapSize.Height())); + aGridItem.SetFldDrawX( (sal_uInt16) (rSnapSize.Width() )); + aGridItem.SetFldDrawY( (sal_uInt16) (rSnapSize.Height())); aGridItem.SetFldDivisionX( aViewOpt.GetDivisionX()); aGridItem.SetFldDivisionY( aViewOpt.GetDivisionY()); @@ -229,8 +230,8 @@ SfxItemSet* SwModule::CreateItemSet( USHORT nId ) pRet->Put(aGridItem); // Options for PrintTabPage - SwPrintData* pOpt = pAppView ? - pAppView->GetWrtShell().getIDocumentDeviceAccess()->getPrintData() : + const SwPrintData* pOpt = pAppView ? + &pAppView->GetWrtShell().getIDocumentDeviceAccess()->getPrintData() : 0; if(!pOpt) @@ -250,16 +251,16 @@ SfxItemSet* SwModule::CreateItemSet( USHORT nId ) return pRet; } -void SwModule::ApplyItemSet( USHORT nId, const SfxItemSet& rSet ) +void SwModule::ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet ) { - BOOL bTextDialog = nId == SID_SW_EDITOPTIONS; + sal_Bool bTextDialog = nId == SID_SW_EDITOPTIONS; SwView* pAppView = GetView(); if(pAppView && pAppView->GetViewFrame() != SfxViewFrame::Current()) pAppView = 0; if(pAppView) { // the text dialog mustn't apply data to the web view and vice versa - BOOL bWebView = 0 != PTR_CAST(SwWebView, pAppView); + sal_Bool bWebView = 0 != PTR_CAST(SwWebView, pAppView); if( (bWebView == bTextDialog)) pAppView = 0; } @@ -274,19 +275,18 @@ void SwModule::ApplyItemSet( USHORT nId, const SfxItemSet& rSet ) /*--------------------------------------------------------------------- Interpret the page Documentview -----------------------------------------------------------------------*/ - if( SFX_ITEM_SET == rSet.GetItemState( - FN_PARAM_DOCDISP, FALSE, &pItem )) + if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_DOCDISP, sal_False, &pItem )) { const SwDocDisplayItem* pDocDispItem = (const SwDocDisplayItem*)pItem; if(!aViewOpt.IsViewMetaChars()) { - if( (!aViewOpt.IsTab( TRUE ) && pDocDispItem->bTab) || - (!aViewOpt.IsBlank( TRUE ) && pDocDispItem->bSpace) || - (!aViewOpt.IsParagraph( TRUE ) && pDocDispItem->bParagraphEnd) || - (!aViewOpt.IsLineBreak( TRUE ) && pDocDispItem->bManualBreak) ) + if( (!aViewOpt.IsTab( sal_True ) && pDocDispItem->bTab) || + (!aViewOpt.IsBlank( sal_True ) && pDocDispItem->bSpace) || + (!aViewOpt.IsParagraph( sal_True ) && pDocDispItem->bParagraphEnd) || + (!aViewOpt.IsLineBreak( sal_True ) && pDocDispItem->bManualBreak) ) { - aViewOpt.SetViewMetaChars(TRUE); + aViewOpt.SetViewMetaChars(sal_True); if(pBindings) pBindings->Invalidate(FN_VIEW_META_CHARS); } @@ -304,32 +304,28 @@ void SwModule::ApplyItemSet( USHORT nId, const SfxItemSet& rSet ) Elements - interpret Item -----------------------------------------------------------------------*/ - if( SFX_ITEM_SET == rSet.GetItemState( - FN_PARAM_ELEM, FALSE, &pItem ) ) + if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_ELEM, sal_False, &pItem ) ) { const SwElemItem* pElemItem = (const SwElemItem*)pItem; pElemItem->FillViewOptions( aViewOpt ); } - if( SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_METRIC, - FALSE, &pItem ) ) + if( SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_METRIC, sal_False, &pItem ) ) { SFX_APP()->SetOptions(rSet); const SfxUInt16Item* pMetricItem = (const SfxUInt16Item*)pItem; ::SetDfltMetric((FieldUnit)pMetricItem->GetValue(), !bTextDialog); } - if( SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_APPLYCHARUNIT, - FALSE, &pItem ) ) + sal_False, &pItem ) ) { SFX_APP()->SetOptions(rSet); const SfxBoolItem* pCharItem = (const SfxBoolItem*)pItem; ::SetApplyCharUnit(pCharItem->GetValue(), !bTextDialog); } - if( SFX_ITEM_SET == rSet.GetItemState(FN_HSCROLL_METRIC, - FALSE, &pItem ) ) + if( SFX_ITEM_SET == rSet.GetItemState(FN_HSCROLL_METRIC, sal_False, &pItem ) ) { const SfxUInt16Item* pMetricItem = (const SfxUInt16Item*)pItem; FieldUnit eUnit = (FieldUnit)pMetricItem->GetValue(); @@ -338,8 +334,7 @@ void SwModule::ApplyItemSet( USHORT nId, const SfxItemSet& rSet ) pAppView->ChangeTabMetric(eUnit); } - if( SFX_ITEM_SET == rSet.GetItemState(FN_VSCROLL_METRIC, - FALSE, &pItem ) ) + if( SFX_ITEM_SET == rSet.GetItemState(FN_VSCROLL_METRIC, sal_False, &pItem ) ) { const SfxUInt16Item* pMetricItem = (const SfxUInt16Item*)pItem; FieldUnit eUnit = (FieldUnit)pMetricItem->GetValue(); @@ -348,10 +343,9 @@ void SwModule::ApplyItemSet( USHORT nId, const SfxItemSet& rSet ) pAppView->ChangeVLinealMetric(eUnit); } - if( SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_DEFTABSTOP, - FALSE, &pItem ) ) + if( SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_DEFTABSTOP, sal_False, &pItem ) ) { - USHORT nTabDist = ((const SfxUInt16Item*)pItem)->GetValue(); + sal_uInt16 nTabDist = ((const SfxUInt16Item*)pItem)->GetValue(); pPref->SetDefTab(nTabDist); if(pAppView) { @@ -376,8 +370,7 @@ void SwModule::ApplyItemSet( USHORT nId, const SfxItemSet& rSet ) Interpret page Grid Settings ----------------------------------------------------------------------*/ - if( SFX_ITEM_SET == rSet.GetItemState( - SID_ATTR_GRID_OPTIONS, FALSE, &pItem )) + if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_GRID_OPTIONS, sal_False, &pItem )) { const SvxGridItem* pGridItem = (const SvxGridItem*)pItem; @@ -407,8 +400,7 @@ void SwModule::ApplyItemSet( USHORT nId, const SfxItemSet& rSet ) Interpret Writer Printer Options ----------------------------------------------------------------------*/ - if( SFX_ITEM_SET == rSet.GetItemState( - FN_PARAM_ADDPRINTER, FALSE, &pItem )) + if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_ADDPRINTER, sal_False, &pItem )) { SwPrintOptions* pOpt = GetPrtOptions(!bTextDialog); if (pOpt) @@ -422,27 +414,35 @@ void SwModule::ApplyItemSet( USHORT nId, const SfxItemSet& rSet ) } - if( SFX_ITEM_SET == rSet.GetItemState( - FN_PARAM_SHADOWCURSOR, FALSE, &pItem )) + if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_SHADOWCURSOR, sal_False, &pItem )) { ((SwShadowCursorItem*)pItem)->FillViewOptions( aViewOpt ); if(pBindings) pBindings->Invalidate(FN_SHADOWCURSOR); } - if( SFX_ITEM_SET == rSet.GetItemState( - FN_PARAM_CRSR_IN_PROTECTED, FALSE, &pItem )) + if( pAppView ) + { + SwWrtShell &rWrtSh = pAppView->GetWrtShell(); + const bool bAlignFormulas = rWrtSh.GetDoc()->get( IDocumentSettingAccess::MATH_BASELINE_ALIGNMENT ); + pPref->SetAlignMathObjectsToBaseline( bAlignFormulas ); + + // don't align formulas in documents that are currently loading + if (bAlignFormulas && !rWrtSh.GetDoc()->IsInReading()) + rWrtSh.AlignAllFormulasToBaseline(); + } + + if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_CRSR_IN_PROTECTED, sal_False, &pItem )) { aViewOpt.SetCursorInProtectedArea(((const SfxBoolItem*)pItem)->GetValue()); } // set elements for the current view and shell - ApplyUsrPref( aViewOpt, pAppView, - bTextDialog? VIEWOPT_DEST_TEXT : VIEWOPT_DEST_WEB); + ApplyUsrPref( aViewOpt, pAppView, bTextDialog? VIEWOPT_DEST_TEXT : VIEWOPT_DEST_WEB); } -SfxTabPage* SwModule::CreateTabPage( USHORT nId, Window* pParent, const SfxItemSet& rSet ) +SfxTabPage* SwModule::CreateTabPage( sal_uInt16 nId, Window* pParent, const SfxItemSet& rSet ) { SfxTabPage* pRet = NULL; SfxAllItemSet aSet(*(rSet.GetPool())); @@ -511,7 +511,7 @@ SfxTabPage* SwModule::CreateTabPage( USHORT nId, Window* pParent, const SfxItemS if(pCurrView) { // if text then not WebView and vice versa - BOOL bWebView = 0 != PTR_CAST(SwWebView, pCurrView); + sal_Bool bWebView = 0 != PTR_CAST(SwWebView, pCurrView); if( (bWebView && RID_SW_TP_HTML_OPTTABLE_PAGE == nId) || (!bWebView && RID_SW_TP_HTML_OPTTABLE_PAGE != nId) ) { @@ -535,6 +535,15 @@ SfxTabPage* SwModule::CreateTabPage( USHORT nId, Window* pParent, const SfxItemS if ( fnCreatePage ) pRet = (*fnCreatePage)( pParent, rSet ); } + if (pRet && (nId == RID_SW_TP_OPTSHDWCRSR || nId == RID_SW_TP_HTML_OPTSHDWCRSR)) + { + SwView* pCurrView = GetView(); + if(pCurrView) + { + aSet.Put( SwWrtShellItem( SID_WRT_SHELL, pCurrView->GetWrtShellPtr() ) ); + pRet->PageCreated(aSet); + } + } } break; #if OSL_DEBUG_LEVEL > 1 @@ -580,5 +589,4 @@ SfxTabPage* SwModule::CreateTabPage( USHORT nId, Window* pParent, const SfxItemS } - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/app/docsh.cxx b/sw/source/ui/app/docsh.cxx index 57c42f8f1a..d350ed7a08 100644 --- a/sw/source/ui/app/docsh.cxx +++ b/sw/source/ui/app/docsh.cxx @@ -66,7 +66,7 @@ #include <fmtfld.hxx> #include <node.hxx> #include <swwait.hxx> -#include <swprtopt.hxx> +#include <printdata.hxx> #include <frmatr.hxx> #include <view.hxx> // for the current view #include <edtwin.hxx> @@ -82,6 +82,7 @@ #include <shellio.hxx> // I/O #include <docstyle.hxx> #include <doc.hxx> +#include <IDocumentUndoRedo.hxx> #include <docstat.hxx> #include <pagedesc.hxx> #include <pview.hxx> @@ -148,11 +149,11 @@ Reader* SwDocShell::StartConvertFrom(SfxMedium& rMedium, SwReader** ppRdr, SwCrsrShell *pCrsrShell, SwPaM* pPaM ) { - BOOL bAPICall = FALSE; + sal_Bool bAPICall = sal_False; const SfxPoolItem* pApiItem; const SfxItemSet* pMedSet; if( 0 != ( pMedSet = rMedium.GetItemSet() ) && SFX_ITEM_SET == - pMedSet->GetItemState( FN_API_CALL, TRUE, &pApiItem ) ) + pMedSet->GetItemState( FN_API_CALL, sal_True, &pApiItem ) ) bAPICall = ((const SfxBoolItem*)pApiItem)->GetValue(); const SfxFilter* pFlt = rMedium.GetFilter(); @@ -196,7 +197,7 @@ Reader* SwDocShell::StartConvertFrom(SfxMedium& rMedium, SwReader** ppRdr, { const SfxItemSet* pSet = rMedium.GetItemSet(); const SfxPoolItem *pPassItem; - if(pSet && SFX_ITEM_SET == pSet->GetItemState(SID_PASSWORD, TRUE, &pPassItem)) + if(pSet && SFX_ITEM_SET == pSet->GetItemState(SID_PASSWORD, sal_True, &pPassItem)) aPasswd = ((const SfxStringItem *)pPassItem)->GetValue(); } @@ -207,19 +208,7 @@ Reader* SwDocShell::StartConvertFrom(SfxMedium& rMedium, SwReader** ppRdr, return 0; } } - if(rMedium.IsStorage()) - { - const SfxItemSet* pSet = rMedium.GetItemSet(); - const SfxPoolItem *pItem; - if(pSet && SFX_ITEM_SET == pSet->GetItemState(SID_PASSWORD, TRUE, &pItem)) - { - OSL_ENSURE(pItem->IsA( TYPE(SfxStringItem) ), "Wrong parameter type"); - comphelper::OStorageHelper::SetCommonStoragePassword( rMedium.GetStorage(), ((const SfxStringItem *)pItem)->GetValue() ); - } - // And for document-paste the FF-Version, when it's the own filter - OSL_ENSURE( /*pRead != ReadSw3 || */pRead != ReadXML || pFlt->GetVersion(), - "No FF version set in filter" ); - } + // #i30171# set the UpdateDocMode at the SwDocShell SFX_ITEMSET_ARG( rMedium.GetItemSet(), pUpdateDocItem, SfxUInt16Item, SID_UPDATEDOCMODE, sal_False); nUpdateDocMode = pUpdateDocItem ? pUpdateDocItem->GetValue() : document::UpdateDocMode::NO_UPDATE; @@ -234,7 +223,7 @@ Reader* SwDocShell::StartConvertFrom(SfxMedium& rMedium, SwReader** ppRdr, const SfxItemSet* pSet; const SfxPoolItem* pItem; if( 0 != ( pSet = rMedium.GetItemSet() ) && SFX_ITEM_SET == - pSet->GetItemState( SID_FILE_FILTEROPTIONS, TRUE, &pItem ) ) + pSet->GetItemState( SID_FILE_FILTEROPTIONS, sal_True, &pItem ) ) aOpt.ReadUserData( ((const SfxStringItem*)pItem)->GetValue() ); if( pRead ) @@ -248,17 +237,17 @@ Reader* SwDocShell::StartConvertFrom(SfxMedium& rMedium, SwReader** ppRdr, Description: Loading --------------------------------------------------------------------*/ -BOOL SwDocShell::ConvertFrom( SfxMedium& rMedium ) +sal_Bool SwDocShell::ConvertFrom( SfxMedium& rMedium ) { RTL_LOGFILE_CONTEXT_AUTHOR( aLog, "SW", "JP93722", "SwDocShell::ConvertFrom" ); SwReader* pRdr; SwRead pRead = StartConvertFrom(rMedium, &pRdr); if (!pRead) - return FALSE; // #129881# return if no reader is found + return sal_False; // #129881# return if no reader is found SotStorageRef pStg=pRead->getSotStorageRef(); // #i45333# save sot storage ref in case of recursive calls - SwWait aWait( *this, TRUE ); + SwWait aWait( *this, sal_True ); // Suppress SfxProgress, when we are Embedded SW_MOD()->SetEmbeddedLoadSave( @@ -269,7 +258,7 @@ BOOL SwDocShell::ConvertFrom( SfxMedium& rMedium ) /* #106748# Restore the pool default if reading a saved document. */ pDoc->RemoveAllFmtLanguageDependencies(); - ULONG nErr = pRdr->Read( *pRead ); + sal_uLong nErr = pRdr->Read( *pRead ); // Maybe put away one old Doc if ( pDoc != pRdr->GetDoc() ) @@ -289,10 +278,10 @@ BOOL SwDocShell::ConvertFrom( SfxMedium& rMedium ) delete pRdr; - SW_MOD()->SetEmbeddedLoadSave( FALSE ); + SW_MOD()->SetEmbeddedLoadSave( sal_False ); SetError( nErr, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) ); - BOOL bOk = !IsError( nErr ); + sal_Bool bOk = !IsError( nErr ); if ( bOk && !pDoc->IsInLoadAsynchron() ) { @@ -309,13 +298,13 @@ BOOL SwDocShell::ConvertFrom( SfxMedium& rMedium ) --------------------------------------------------------------------*/ -BOOL SwDocShell::Save() +sal_Bool SwDocShell::Save() { RTL_LOGFILE_CONTEXT_AUTHOR( aLog, "SW", "JP93722", "SwDocShell::Save" ); //#i3370# remove quick help to prevent saving of autocorrection suggestions if(pView) pView->GetEditWin().StopQuickHelp(); - SwWait aWait( *this, TRUE ); + SwWait aWait( *this, sal_True ); CalcLayoutForOLEObjects(); // format for OLE objets // #i62875# @@ -327,7 +316,7 @@ BOOL SwDocShell::Save() pDoc->set(IDocumentSettingAccess::DO_NOT_CAPTURE_DRAW_OBJS_ON_PAGE, false); } - ULONG nErr = ERR_SWG_WRITE_ERROR, nVBWarning = ERRCODE_NONE; + sal_uLong nErr = ERR_SWG_WRITE_ERROR, nVBWarning = ERRCODE_NONE; if( SfxObjectShell::Save() ) { switch( GetCreateMode() ) @@ -340,16 +329,16 @@ BOOL SwDocShell::Save() { WriterRef xWrt; ::GetXMLWriter( aEmptyStr, GetMedium()->GetBaseURL( true ), xWrt ); - xWrt->SetOrganizerMode( TRUE ); + xWrt->SetOrganizerMode( sal_True ); SwWriter aWrt( *GetMedium(), *pDoc ); nErr = aWrt.Write( xWrt ); - xWrt->SetOrganizerMode( FALSE ); + xWrt->SetOrganizerMode( sal_False ); } break; case SFX_CREATE_MODE_EMBEDDED: // Suppress SfxProgress, if we are Embedded - SW_MOD()->SetEmbeddedLoadSave( TRUE ); + SW_MOD()->SetEmbeddedLoadSave( sal_True ); // no break; case SFX_CREATE_MODE_STANDARD: @@ -360,7 +349,7 @@ BOOL SwDocShell::Save() { if( SvtFilterOptions::Get()->IsLoadWordBasicStorage() ) nVBWarning = GetSaveWarningOfMSVBAStorage( (SfxObjectShell&) (*this) ); - pDoc->SetContainsMSVBasic( FALSE ); + pDoc->SetContainsMSVBasic( sal_False ); } // End TableBox Edit! @@ -370,11 +359,11 @@ BOOL SwDocShell::Save() WriterRef xWrt; ::GetXMLWriter( aEmptyStr, GetMedium()->GetBaseURL( true ), xWrt ); - BOOL bLockedView(FALSE); + sal_Bool bLockedView(sal_False); if ( pWrtShell ) { bLockedView = pWrtShell->IsViewLocked(); - pWrtShell->LockView( TRUE ); //lock visible section + pWrtShell->LockView( sal_True ); //lock visible section } SwWriter aWrt( *GetMedium(), *pDoc ); @@ -385,7 +374,7 @@ BOOL SwDocShell::Save() } break; } - SW_MOD()->SetEmbeddedLoadSave( FALSE ); + SW_MOD()->SetEmbeddedLoadSave( sal_False ); } SetError( nErr ? nErr : nVBWarning, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) ); @@ -406,7 +395,7 @@ sal_Bool SwDocShell::SaveAs( SfxMedium& rMedium ) { RTL_LOGFILE_CONTEXT_AUTHOR( aLog, "SW", "JP93722", "SwDocShell::SaveAs" ); - SwWait aWait( *this, TRUE ); + SwWait aWait( *this, sal_True ); //#i3370# remove quick help to prevent saving of autocorrection suggestions if(pView) pView->GetEditWin().StopQuickHelp(); @@ -454,7 +443,7 @@ sal_Bool SwDocShell::SaveAs( SfxMedium& rMedium ) pDoc->set(IDocumentSettingAccess::DO_NOT_CAPTURE_DRAW_OBJS_ON_PAGE, false); } - ULONG nErr = ERR_SWG_WRITE_ERROR, nVBWarning = ERRCODE_NONE; + sal_uLong nErr = ERR_SWG_WRITE_ERROR, nVBWarning = ERRCODE_NONE; uno::Reference < embed::XStorage > xStor = rMedium.GetOutputStorage(); if( SfxObjectShell::SaveAs( rMedium ) ) { @@ -467,7 +456,9 @@ sal_Bool SwDocShell::SaveAs( SfxMedium& rMedium ) // will set the wrong class id. SvGlobalName aClassName; String aAppName, aLongUserName, aUserName; - SfxObjectShellRef xDocSh = + + // The document is closed explicitly, but using SfxObjectShellLock is still more correct here + SfxObjectShellLock xDocSh = new SwGlobalDocShell( SFX_CREATE_MODE_INTERNAL ); // the global document can not be a template xDocSh->SetupStorage( xStor, SotStorage::GetVersion( xStor ), sal_False ); @@ -478,7 +469,7 @@ sal_Bool SwDocShell::SaveAs( SfxMedium& rMedium ) { if( SvtFilterOptions::Get()->IsLoadWordBasicStorage() ) nVBWarning = GetSaveWarningOfMSVBAStorage( (SfxObjectShell&) *this ); - pDoc->SetContainsMSVBasic( FALSE ); + pDoc->SetContainsMSVBasic( sal_False ); } // End TableBox Edit! @@ -487,8 +478,8 @@ sal_Bool SwDocShell::SaveAs( SfxMedium& rMedium ) // Remember and preserve Modified-Flag without calling the Link // (for OLE; after Statement from MM) - BOOL bIsModified = pDoc->IsModified(); - SwUndoNoModifiedPosition aOldPos = pDoc->getUndoNoModifiedPosition(); + sal_Bool bIsModified = pDoc->IsModified(); + pDoc->GetIDocumentUndoRedo().LockUndoNoModifiedPosition(); Link aOldOLELnk( pDoc->GetOle2Link() ); pDoc->SetOle2Link( Link() ); @@ -499,11 +490,11 @@ sal_Bool SwDocShell::SaveAs( SfxMedium& rMedium ) WriterRef xWrt; ::GetXMLWriter( aEmptyStr, rMedium.GetBaseURL( true ), xWrt ); - BOOL bLockedView(FALSE); + sal_Bool bLockedView(sal_False); if ( pWrtShell ) { bLockedView = pWrtShell->IsViewLocked(); - pWrtShell->LockView( TRUE ); //lock visible section + pWrtShell->LockView( sal_True ); //lock visible section } SwWriter aWrt( rMedium, *pDoc ); @@ -515,11 +506,11 @@ sal_Bool SwDocShell::SaveAs( SfxMedium& rMedium ) if( bIsModified ) { pDoc->SetModified(); - pDoc->setUndoNoModifiedPosition( aOldPos ); + pDoc->GetIDocumentUndoRedo().UnLockUndoNoModifiedPosition(); } pDoc->SetOle2Link( aOldOLELnk ); - SW_MOD()->SetEmbeddedLoadSave( FALSE ); + SW_MOD()->SetEmbeddedLoadSave( sal_False ); } SetError( nErr ? nErr : nVBWarning, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) ); @@ -537,12 +528,12 @@ SwSrcView* lcl_GetSourceView( SwDocShell* pSh ) return PTR_CAST( SwSrcView, pViewShell); } -BOOL SwDocShell::ConvertTo( SfxMedium& rMedium ) +sal_Bool SwDocShell::ConvertTo( SfxMedium& rMedium ) { RTL_LOGFILE_CONTEXT_AUTHOR( aLog, "SW", "JP93722", "SwDocShell::ConvertTo" ); const SfxFilter* pFlt = rMedium.GetFilter(); if( !pFlt ) - return FALSE; + return sal_False; WriterRef xWriter; SwReaderWriter::GetWriter( pFlt->GetUserData(), rMedium.GetBaseURL( true ), xWriter ); @@ -550,7 +541,7 @@ BOOL SwDocShell::ConvertTo( SfxMedium& rMedium ) { // Filter not available InfoBox( 0, SW_RESSTR(STR_DLLNOTFOUND) ).Execute(); - return FALSE; + return sal_False; } //#i3370# remove quick help to prevent saving of autocorrection suggestions @@ -565,22 +556,22 @@ BOOL SwDocShell::ConvertTo( SfxMedium& rMedium ) pView->GetPostItMgr()->UpdateDataOnActiveSidebarWin(); } - ULONG nVBWarning = 0; + sal_uLong nVBWarning = 0; if( pDoc->ContainsMSVBasic() ) { - BOOL bSave = pFlt->GetUserData().EqualsAscii( "CWW8" ) + sal_Bool bSave = pFlt->GetUserData().EqualsAscii( "CWW8" ) && SvtFilterOptions::Get()->IsLoadWordBasicStorage(); if ( bSave ) { - SvStorageRef xStg = new SotStorage( rMedium.GetOutStream(), FALSE ); + SvStorageRef xStg = new SotStorage( rMedium.GetOutStream(), sal_False ); OSL_ENSURE( !xStg->GetError(), "No storage available for storing VBA macros!" ); if ( !xStg->GetError() ) { nVBWarning = SaveOrDelMSVBAStorage( (SfxObjectShell&) *this, *xStg, bSave, String::CreateFromAscii("Macros") ); xStg->Commit(); - pDoc->SetContainsMSVBasic( TRUE ); + pDoc->SetContainsMSVBasic( sal_True ); } } } @@ -637,15 +628,15 @@ BOOL SwDocShell::ConvertTo( SfxMedium& rMedium ) pFlt->GetUserData().EqualsAscii( FILTER_XMLVW ) ) ) { // determine the own Type - BYTE nMyType = 0; + sal_uInt8 nMyType = 0; if( ISA( SwWebDocShell) ) nMyType = 1; else if( ISA( SwGlobalDocShell) ) nMyType = 2; // determine the desired Type - BYTE nSaveType = 0; - ULONG nSaveClipId = pFlt->GetFormat(); + sal_uInt8 nSaveType = 0; + sal_uLong nSaveClipId = pFlt->GetFormat(); if( SOT_FORMATSTR_ID_STARWRITERWEB_8 == nSaveClipId || SOT_FORMATSTR_ID_STARWRITERWEB_60 == nSaveClipId || SOT_FORMATSTR_ID_STARWRITERWEB_50 == nSaveClipId || @@ -658,9 +649,9 @@ BOOL SwDocShell::ConvertTo( SfxMedium& rMedium ) nSaveType = 2; // Change Flags of the Document accordingly - BOOL bIsHTMLModeSave = GetDoc()->get(IDocumentSettingAccess::HTML_MODE); - BOOL bIsGlobalDocSave = GetDoc()->get(IDocumentSettingAccess::GLOBAL_DOCUMENT); - BOOL bIsGlblDocSaveLinksSave = GetDoc()->get(IDocumentSettingAccess::GLOBAL_DOCUMENT_SAVE_LINKS); + sal_Bool bIsHTMLModeSave = GetDoc()->get(IDocumentSettingAccess::HTML_MODE); + sal_Bool bIsGlobalDocSave = GetDoc()->get(IDocumentSettingAccess::GLOBAL_DOCUMENT); + sal_Bool bIsGlblDocSaveLinksSave = GetDoc()->get(IDocumentSettingAccess::GLOBAL_DOCUMENT_SAVE_LINKS); if( nMyType != nSaveType ) { GetDoc()->set(IDocumentSettingAccess::HTML_MODE, 1 == nSaveType); @@ -687,7 +678,7 @@ BOOL SwDocShell::ConvertTo( SfxMedium& rMedium ) } // Now normally save the Document - BOOL bRet = SaveAs( rMedium ); + sal_Bool bRet = SaveAs( rMedium ); if( nMyType != nSaveType ) { @@ -696,25 +687,6 @@ BOOL SwDocShell::ConvertTo( SfxMedium& rMedium ) GetDoc()->set(IDocumentSettingAccess::GLOBAL_DOCUMENT_SAVE_LINKS, bIsGlblDocSaveLinksSave); } - if( bRet && nMyType != nSaveType ) - { - SvGlobalName aClassName; - String aAppName, aLongUserName, aUserName; - SfxObjectShellRef xDocSh; - switch( nSaveType ) - { - case 0: - xDocSh = new SwDocShell( SFX_CREATE_MODE_INTERNAL ); - break; - case 1: - xDocSh = new SwWebDocShell( SFX_CREATE_MODE_INTERNAL ); - break; - case 2: - xDocSh = new SwGlobalDocShell( SFX_CREATE_MODE_INTERNAL ); - break; - } - } - return bRet; } @@ -728,7 +700,7 @@ BOOL SwDocShell::ConvertTo( SfxMedium& rMedium ) if( 0 != ( pSet = rMedium.GetItemSet() ) ) { if( SFX_ITEM_SET == pSet->GetItemState( SID_FILE_FILTEROPTIONS, - TRUE, &pItem ) ) + sal_True, &pItem ) ) sItemOpt = ((const SfxStringItem*)pItem)->GetValue(); } if(sItemOpt.Len()) @@ -742,24 +714,24 @@ BOOL SwDocShell::ConvertTo( SfxMedium& rMedium ) SFX_CREATE_MODE_EMBEDDED == GetCreateMode()); // Span Context in order to suppress the Selection's View - ULONG nErrno; + sal_uLong nErrno; String aFileName( rMedium.GetName() ); // No View, so the whole Document! if ( pWrtShell ) { - SwWait aWait( *this, TRUE ); + SwWait aWait( *this, sal_True ); // #i106906# const sal_Bool bFormerLockView = pWrtShell->IsViewLocked(); pWrtShell->LockView( sal_True ); pWrtShell->StartAllAction(); pWrtShell->Push(); - SwWriter aWrt( rMedium, *pWrtShell, TRUE ); + SwWriter aWrt( rMedium, *pWrtShell, sal_True ); nErrno = aWrt.Write( xWriter, &aFileName ); //JP 16.05.97: In case the SFX revokes the View while saving if( pWrtShell ) { - pWrtShell->Pop(FALSE); + pWrtShell->Pop(sal_False); pWrtShell->EndAllAction(); // #i106906# pWrtShell->LockView( bFormerLockView ); @@ -781,7 +753,7 @@ BOOL SwDocShell::ConvertTo( SfxMedium& rMedium ) } } - SW_MOD()->SetEmbeddedLoadSave( FALSE ); + SW_MOD()->SetEmbeddedLoadSave( sal_False ); SetError( nErrno ? nErrno : nVBWarning, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) ); if( !rMedium.IsStorage() ) rMedium.CloseOutStream(); @@ -802,7 +774,7 @@ BOOL SwDocShell::ConvertTo( SfxMedium& rMedium ) sal_Bool SwDocShell::SaveCompleted( const uno::Reference < embed::XStorage >& xStor ) { RTL_LOGFILE_CONTEXT_AUTHOR( aLog, "SW", "JP93722", "SwDocShell::SaveCompleted" ); - BOOL bRet = SfxObjectShell::SaveCompleted( xStor ); + sal_Bool bRet = SfxObjectShell::SaveCompleted( xStor ); if( bRet ) { // Do not decide until here, whether Saving was successful or not @@ -814,9 +786,9 @@ sal_Bool SwDocShell::SaveCompleted( const uno::Reference < embed::XStorage >& xS if( pOLEChildList ) { - BOOL bResetModified = IsEnableSetModified(); + sal_Bool bResetModified = IsEnableSetModified(); if( bResetModified ) - EnableSetModified( FALSE ); + EnableSetModified( sal_False ); uno::Sequence < rtl::OUString > aNames = pOLEChildList->GetObjectNames(); for( sal_Int32 n = aNames.getLength(); n; n-- ) @@ -829,7 +801,7 @@ sal_Bool SwDocShell::SaveCompleted( const uno::Reference < embed::XStorage >& xS DELETEZ( pOLEChildList ); if( bResetModified ) - EnableSetModified( TRUE ); + EnableSetModified( sal_True ); } return bRet; } @@ -839,12 +811,12 @@ sal_Bool SwDocShell::SaveCompleted( const uno::Reference < embed::XStorage >& xS --------------------------------------------------------------------*/ void SwDocShell::Draw( OutputDevice* pDev, const JobSetup& rSetup, - USHORT nAspect ) + sal_uInt16 nAspect ) { //fix #25341# Draw should not affect the Modified - BOOL bResetModified; - if ( TRUE == (bResetModified = IsEnableSetModified()) ) - EnableSetModified( FALSE ); + sal_Bool bResetModified; + if ( sal_True == (bResetModified = IsEnableSetModified()) ) + EnableSetModified( sal_False ); // When there is a JobSetup connected to the Document, we copy it to // reconnect it after PrtOle2. We don't use an empty JobSetup because @@ -866,8 +838,8 @@ void SwDocShell::Draw( OutputDevice* pDev, const JobSetup& rSetup, pDev->SetFillColor(); pDev->SetLineColor(); pDev->SetBackground(); - BOOL bWeb = 0 != PTR_CAST(SwWebDocShell, this); - SwPrtOptions aOpts( aEmptyStr ); + sal_Bool bWeb = 0 != PTR_CAST(SwWebDocShell, this); + SwPrintData aOpts; ViewShell::PrtOle2( pDoc, SW_MOD()->GetUsrPref(bWeb), aOpts, pDev, aRect ); pDev->Pop(); @@ -877,7 +849,7 @@ void SwDocShell::Draw( OutputDevice* pDev, const JobSetup& rSetup, delete pOrig; } if ( bResetModified ) - EnableSetModified( TRUE ); + EnableSetModified( sal_True ); } @@ -899,14 +871,14 @@ void SwDocShell::SetVisArea( const Rectangle &rRect ) aRect.Move( nMoveX, nMoveY ); // Calls SfxInPlaceObject::SetVisArea()! - pView->SetVisArea( aRect, TRUE ); + pView->SetVisArea( aRect, sal_True ); } else SfxObjectShell::SetVisArea( aRect ); } -Rectangle SwDocShell::GetVisArea( USHORT nAspect ) const +Rectangle SwDocShell::GetVisArea( sal_uInt16 nAspect ) const { if ( nAspect == ASPECT_THUMBNAIL ) { @@ -914,7 +886,7 @@ Rectangle SwDocShell::GetVisArea( USHORT nAspect ) const SwNodeIndex aIdx( pDoc->GetNodes().GetEndOfExtras(), 1 ); SwCntntNode* pNd = pDoc->GetNodes().GoNext( &aIdx ); - const SwRect aPageRect = pNd->FindPageFrmRect( FALSE, 0, FALSE ); + const SwRect aPageRect = pNd->FindPageFrmRect( sal_False, 0, sal_False ); return aPageRect.SVRect(); } return SfxObjectShell::GetVisArea( nAspect ); @@ -938,7 +910,7 @@ void SwDocShell::OnDocumentPrinterChanged( Printer * pNewPrinter ) GetDoc()->setPrinter( 0, true, true ); } -ULONG SwDocShell::GetMiscStatus() const +sal_uLong SwDocShell::GetMiscStatus() const { return SVOBJ_MISCSTATUS_RESIZEONPRINTERCHANGE; } @@ -982,7 +954,7 @@ sal_uInt16 SwDocShell::GetHiddenInformationState( sal_uInt16 nStates ) void SwDocShell::GetState(SfxItemSet& rSet) { SfxWhichIter aIter(rSet); - USHORT nWhich = aIter.FirstWhich(); + sal_uInt16 nWhich = aIter.FirstWhich(); while (nWhich) { @@ -990,7 +962,7 @@ void SwDocShell::GetState(SfxItemSet& rSet) { case SID_PRINTPREVIEW: { - BOOL bDisable = IsInPlaceActive(); + sal_Bool bDisable = IsInPlaceActive(); if ( !bDisable ) { SfxViewFrame *pTmpFrm = SfxViewFrame::GetFirst(this); @@ -999,7 +971,7 @@ void SwDocShell::GetState(SfxItemSet& rSet) if ( PTR_CAST(SwView, pTmpFrm->GetViewShell()) && ((SwView*)pTmpFrm->GetViewShell())->GetWrtShell().getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE)) { - bDisable = TRUE; + bDisable = sal_True; break; } pTmpFrm = pTmpFrm->GetNext(*pTmpFrm, this); @@ -1009,9 +981,9 @@ void SwDocShell::GetState(SfxItemSet& rSet) rSet.DisableItem( SID_PRINTPREVIEW ); else { - SfxBoolItem aBool( SID_PRINTPREVIEW, FALSE ); + SfxBoolItem aBool( SID_PRINTPREVIEW, sal_False ); if( PTR_CAST( SwPagePreView, SfxViewShell::Current()) ) - aBool.SetValue( TRUE ); + aBool.SetValue( sal_True ); rSet.Put( aBool ); } } @@ -1020,7 +992,7 @@ void SwDocShell::GetState(SfxItemSet& rSet) { SfxViewShell* pCurrView = GetView() ? (SfxViewShell*)GetView() : SfxViewShell::Current(); - BOOL bSourceView = 0 != PTR_CAST(SwSrcView, pCurrView); + sal_Bool bSourceView = 0 != PTR_CAST(SwSrcView, pCurrView); rSet.Put(SfxBoolItem(SID_SOURCEVIEW, bSourceView)); } break; @@ -1065,7 +1037,7 @@ void SwDocShell::GetState(SfxItemSet& rSet) case SID_ATTR_YEAR2000: { - const SvNumberFormatter* pFmtr = pDoc->GetNumberFormatter(FALSE); + const SvNumberFormatter* pFmtr = pDoc->GetNumberFormatter(sal_False); rSet.Put( SfxUInt16Item( nWhich, static_cast< sal_uInt16 >( pFmtr ? pFmtr->GetYear2000() @@ -1077,6 +1049,23 @@ void SwDocShell::GetState(SfxItemSet& rSet) rSet.Put( SvxFontListItem( pFontList, SID_ATTR_CHAR_FONTLIST ) ); } break; + case SID_MAIL_PREPAREEXPORT: + { + //check if linked content or possibly hidden content is available + //pDoc->UpdateFlds( NULL, false ); + sfx2::LinkManager& rLnkMgr = pDoc->GetLinkManager(); + const ::sfx2::SvBaseLinks& rLnks = rLnkMgr.GetLinks(); + sal_Bool bRet = sal_False; + if( rLnks.Count() ) + bRet = sal_True; + else + { + //sections with hidden flag, hidden character attribute, hidden paragraph/text or conditional text fields + bRet = pDoc->HasInvisibleContent(); + } + rSet.Put( SfxBoolItem( nWhich, bRet ) ); + } + break; default: OSL_ENSURE(!this,"You cannot get here!"); @@ -1097,7 +1086,7 @@ IMPL_LINK( SwDocShell, Ole2ModifiedHdl, void *, p ) // Bit 1: -> new state long nStatus = (long)p; if( IsEnableSetModified() ) - SetModified( (nStatus & 2) ? TRUE : FALSE ); + SetModified( (nStatus & 2) ? sal_True : sal_False ); return 0; } @@ -1221,7 +1210,7 @@ void SwDocShell::CalcLayoutForOLEObjects() // read by the binary filter: void SwDocShell::UpdateLinks() { - GetDoc()->UpdateLinks(TRUE); + GetDoc()->UpdateLinks(sal_True); // #i50703# Update footnote numbers SwTxtFtn::SetUniqueSeqRefNo( *GetDoc() ); SwNodeIndex aTmp( GetDoc()->GetNodes() ); @@ -1293,8 +1282,8 @@ bool SwDocShell::HasChangeRecordProtection() const void SwDocShell::SetChangeRecording( bool bActivate ) { - USHORT nOn = bActivate ? nsRedlineMode_t::REDLINE_ON : 0; - USHORT nMode = pWrtShell->GetRedlineMode(); + sal_uInt16 nOn = bActivate ? nsRedlineMode_t::REDLINE_ON : 0; + sal_uInt16 nMode = pWrtShell->GetRedlineMode(); pWrtShell->SetRedlineModeAndCheckInsMode( (nMode & ~nsRedlineMode_t::REDLINE_ON) | nOn); } @@ -1307,7 +1296,7 @@ bool SwDocShell::SetProtectionPassword( const String &rNewPassword ) IDocumentRedlineAccess* pIDRA = pWrtShell->getIDocumentRedlineAccess(); Sequence< sal_Int8 > aPasswd = pIDRA->GetRedlinePassword(); - if (pArgs && SFX_ITEM_SET == pArgs->GetItemState( FN_REDLINE_PROTECT, FALSE, &pItem ) + if (pArgs && SFX_ITEM_SET == pArgs->GetItemState( FN_REDLINE_PROTECT, sal_False, &pItem ) && ((SfxBoolItem*)pItem)->GetValue() == (aPasswd.getLength() > 0)) return false; @@ -1343,7 +1332,7 @@ bool SwDocShell::GetProtectionHash( /*out*/ ::com::sun::star::uno::Sequence< sal IDocumentRedlineAccess* pIDRA = pWrtShell->getIDocumentRedlineAccess(); Sequence< sal_Int8 > aPasswdHash( pIDRA->GetRedlinePassword() ); - if (pArgs && SFX_ITEM_SET == pArgs->GetItemState( FN_REDLINE_PROTECT, FALSE, &pItem ) + if (pArgs && SFX_ITEM_SET == pArgs->GetItemState( FN_REDLINE_PROTECT, sal_False, &pItem ) && ((SfxBoolItem*)pItem)->GetValue() == (aPasswdHash.getLength() != 0)) return false; rPasswordHash = aPasswdHash; diff --git a/sw/source/ui/app/docsh2.cxx b/sw/source/ui/app/docsh2.cxx index 5501b0227f..49bdd982ff 100644 --- a/sw/source/ui/app/docsh2.cxx +++ b/sw/source/ui/app/docsh2.cxx @@ -84,6 +84,7 @@ #include <redlndlg.hxx> #include <docstyle.hxx> #include <doc.hxx> +#include <IDocumentUndoRedo.hxx> #include <pagedesc.hxx> #include <shellio.hxx> #include <pview.hxx> @@ -129,7 +130,7 @@ using namespace ::com::sun::star::uno; using namespace ::com::sun::star; using ::rtl::OUString; using namespace ::sfx2; -extern BOOL FindPhyStyle( SwDoc& , const String& , SfxStyleFamily ); +extern sal_Bool FindPhyStyle( SwDoc& , const String& , SfxStyleFamily ); /*-------------------------------------------------------------------- Description: create DocInfo (virtual) @@ -165,7 +166,7 @@ void SwDocShell::DoFlushDocInfo() bool bUnlockView(true); if ( pWrtShell ) { bUnlockView = !pWrtShell->IsViewLocked(); - pWrtShell->LockView( TRUE ); // lock visible section + pWrtShell->LockView( sal_True ); // lock visible section pWrtShell->StartAllAction(); } @@ -174,7 +175,7 @@ void SwDocShell::DoFlushDocInfo() if ( pWrtShell ) { pWrtShell->EndAllAction(); if ( bUnlockView ) { - pWrtShell->LockView( FALSE ); + pWrtShell->LockView( sal_False ); } } } @@ -185,7 +186,7 @@ void lcl_processCompatibleSfxHint( const uno::Reference< script::vba::XVBAEventP if ( rHint.ISA( SfxEventHint ) ) { uno::Sequence< uno::Any > aArgs; - ULONG nEventId = ((SfxEventHint&)rHint).GetEventId(); + sal_uLong nEventId = ((SfxEventHint&)rHint).GetEventId(); switch( nEventId ) { case SFX_EVENT_CREATEDOC: @@ -213,7 +214,7 @@ void SwDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint ) if( xVbaEvents.is() ) lcl_processCompatibleSfxHint( xVbaEvents, rHint ); - USHORT nAction = 0; + sal_uInt16 nAction = 0; if( rHint.ISA(SfxSimpleHint) ) { // switch for more actions @@ -234,11 +235,11 @@ void SwDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint ) if( nAction ) { - BOOL bUnlockView = sal_True; //initializing prevents warning + sal_Bool bUnlockView = sal_True; //initializing prevents warning if( pWrtShell ) { bUnlockView = !pWrtShell->IsViewLocked(); - pWrtShell->LockView( TRUE ); //lock visible section + pWrtShell->LockView( sal_True ); //lock visible section pWrtShell->StartAllAction(); } switch( nAction ) @@ -255,7 +256,7 @@ void SwDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint ) { const bool bResetModified = IsEnableSetModified(); if ( bResetModified ) - EnableSetModified( FALSE ); + EnableSetModified( sal_False ); // #i41679# const bool bIsDocModified = pDoc->IsModified(); @@ -265,7 +266,7 @@ void SwDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint ) if ( !bIsDocModified ) pDoc->ResetModified(); if ( bResetModified ) - EnableSetModified( TRUE ); + EnableSetModified( sal_True ); } break; } @@ -274,7 +275,7 @@ void SwDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint ) { pWrtShell->EndAllAction(); if( bUnlockView ) - pWrtShell->LockView( FALSE ); + pWrtShell->LockView( sal_False ); } } } @@ -283,11 +284,11 @@ void SwDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint ) Description: Notification Close Doc --------------------------------------------------------------------*/ -USHORT SwDocShell::PrepareClose( BOOL bUI, BOOL bForBrowsing ) +sal_uInt16 SwDocShell::PrepareClose( sal_Bool bUI, sal_Bool bForBrowsing ) { - USHORT nRet = SfxObjectShell::PrepareClose( bUI, bForBrowsing ); + sal_uInt16 nRet = SfxObjectShell::PrepareClose( bUI, bForBrowsing ); - if( TRUE == nRet ) //has to be queried against TRUE! (RET_NEWTASK) + if( sal_True == nRet ) //has to be queried against TRUE! (RET_NEWTASK) EndListening( *this ); if( pDoc && IsInPrepareClose() ) @@ -301,28 +302,27 @@ USHORT SwDocShell::PrepareClose( BOOL bUI, BOOL bForBrowsing ) } } return nRet; -} +} /*-------------------------------------------------------------------- Description: Organizer --------------------------------------------------------------------*/ -BOOL SwDocShell::Insert( SfxObjectShell &rSource, - USHORT nSourceIdx1, // SourcePool: uppermost content level (templates/macros) - USHORT nSourceIdx2, // Index in the content - USHORT nSourceIdx3, // Index in the content level - USHORT &rIdx1, // and the same for the DestinationPool - USHORT &rIdx2, // "" - USHORT &rIdx3, // "" - USHORT &rRemovedIdx ) // if doubles are being deleted, Pos back +sal_Bool SwDocShell::Insert( SfxObjectShell &rSource, + sal_uInt16 nSourceIdx1, // SourcePool: uppermost content level (templates/macros) + sal_uInt16 nSourceIdx2, // Index in the content + sal_uInt16 nSourceIdx3, // Index in the content level + sal_uInt16 &rIdx1, // and the same for the DestinationPool + sal_uInt16 &rIdx2, // "" + sal_uInt16 &rIdx3, // "" + sal_uInt16 &rRemovedIdx ) // if doubles are being deleted, Pos back { // #i48949# - actions aren't undoable. Thus, allow no undo // actions // Note: The undo action stack is cleared at the end of this method. - bool bDoesUndo( GetDoc()->DoesUndo() ); - GetDoc()->DoUndo( sal_False ); + ::sw::UndoGuard const undoGuard(GetDoc()->GetIDocumentUndoRedo()); - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; if (INDEX_IGNORE == rIdx1 && CONTENT_STYLE == nSourceIdx1) rIdx1 = CONTENT_STYLE; @@ -335,7 +335,7 @@ BOOL SwDocShell::Insert( SfxObjectShell &rSource, // we can't move back and forth within ourselves if( pHisPool == pMyPool ) - return FALSE; + return sal_False; if( INDEX_IGNORE == rIdx2 ) rIdx2 = pMyPool->Count(); @@ -355,10 +355,10 @@ BOOL SwDocShell::Insert( SfxObjectShell &rSource, ( SFX_STYLE_FAMILY_CHAR == eOldFamily && rOldName == *SwStyleNameMapper::GetTextUINameArray()[ RES_POOLCOLL_STANDARD - RES_POOLCOLL_TEXT_BEGIN ] )) - return FALSE; + return sal_False; SfxStyleFamily eMyOldFamily( pMyPool->GetSearchFamily() ); - USHORT nMySrchMask = pMyPool->GetSearchMask(); + sal_uInt16 nMySrchMask = pMyPool->GetSearchMask(); SfxStyleSheetBase* pExist; if( ::FindPhyStyle( *pDoc, rOldName, eOldFamily ) ) @@ -367,7 +367,7 @@ BOOL SwDocShell::Insert( SfxObjectShell &rSource, if( ERRCODE_BUTTON_OK != ErrorHandler::HandleError( *new MessageInfo( ERRCODE_SFXMSG_STYLEREPLACE, rOldName )) ) { - return FALSE; + return sal_False; } // Because Replace needs the aStyleSheet-Member itself, the result @@ -381,7 +381,7 @@ BOOL SwDocShell::Insert( SfxObjectShell &rSource, GetDoc()->SetModified(); - return TRUE; + return sal_True; } pMyPool->SetSearchMask( eOldFamily, nMySrchMask ); @@ -413,7 +413,7 @@ BOOL SwDocShell::Insert( SfxObjectShell &rSource, // Used and User-defined templates are being showed. That's why // the Index of the template in the pool has to be found out. pExist = pMyPool->First(); - USHORT nIdx = 0; + sal_uInt16 nIdx = 0; while( pExist ) { if( pExist->GetName() == rOldName && @@ -435,7 +435,7 @@ BOOL SwDocShell::Insert( SfxObjectShell &rSource, // who gets the new one as parent? who uses the new one as Follow? // (always using the instanciated!!!) pMyPool->SetSearchMask( eOldFamily, nMySrchMask ); - pMyPool->SetOrganizerMode( TRUE ); + pMyPool->SetOrganizerMode( sal_True ); SfxStyleSheetBase* pTestSheet = pMyPool->First(); while (pTestSheet) { @@ -496,7 +496,7 @@ BOOL SwDocShell::Insert( SfxObjectShell &rSource, OSL_ENSURE(pDoc, "Doc missing"); GetDoc()->SetModified(); - bRet = TRUE; + bRet = sal_True; } else bRet = SfxObjectShell::Insert( rSource, @@ -510,11 +510,10 @@ BOOL SwDocShell::Insert( SfxObjectShell &rSource, // #i48949# - actions aren't undoable and could have change // the document node array. Thus, clear the undo action stack. - if ( bDoesUndo ) + if (undoGuard.UndoWasEnabled()) { - GetDoc()->DelAllUndoObj(); + GetDoc()->GetIDocumentUndoRedo().DelAllUndoObj(); } - GetDoc()->DoUndo( bDoesUndo ); return bRet; } @@ -523,11 +522,11 @@ BOOL SwDocShell::Insert( SfxObjectShell &rSource, Description: template Remove --------------------------------------------------------------------*/ -BOOL SwDocShell::Remove(USHORT nIdx1, // see Insert - USHORT nIdx2, - USHORT nIdx3) +sal_Bool SwDocShell::Remove(sal_uInt16 nIdx1, // see Insert + sal_uInt16 nIdx2, + sal_uInt16 nIdx3) { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; if (CONTENT_STYLE == nIdx1) { @@ -546,13 +545,13 @@ BOOL SwDocShell::Remove(USHORT nIdx1, // see Insert ( SFX_STYLE_FAMILY_CHAR == eFamily && aName == *SwStyleNameMapper::GetTextUINameArray()[ RES_POOLCOLL_STANDARD - RES_POOLCOLL_TEXT_BEGIN ] )) - return FALSE; + return sal_False; // so delete pMyPool->Remove( pMySheet ); // now correct the Parents/Follows of all instanciated - pMyPool->SetOrganizerMode( TRUE ); + pMyPool->SetOrganizerMode( sal_True ); SfxStyleSheetBase* pTestSheet = pMyPool->First(); while (pTestSheet) { @@ -574,7 +573,7 @@ BOOL SwDocShell::Remove(USHORT nIdx1, // see Insert } pMyPool->SetOrganizerMode( SFX_CREATE_MODE_ORGANIZER == GetCreateMode() ); - bRet = TRUE; + bRet = sal_True; } else bRet = SfxObjectShell::Remove( nIdx1, @@ -593,8 +592,8 @@ void SwDocShell::Execute(SfxRequest& rReq) { const SfxItemSet* pArgs = rReq.GetArgs(); const SfxPoolItem* pItem; - USHORT nWhich = rReq.GetSlot(); - BOOL bDone = FALSE; + sal_uInt16 nWhich = rReq.GetSlot(); + sal_Bool bDone = sal_False; switch ( nWhich ) { case SID_AUTO_CORRECT_DLG: @@ -613,7 +612,7 @@ void SwDocShell::Execute(SfxRequest& rReq) SfxApplication* pApp = SFX_APP(); SfxRequest aAppReq(SID_AUTO_CORRECT_DLG, SFX_CALLMODE_SYNCHRON, pApp->GetPool()); - SfxBoolItem aSwOptions( SID_AUTO_CORRECT_DLG, TRUE ); + SfxBoolItem aSwOptions( SID_AUTO_CORRECT_DLG, sal_True ); aAppReq.AppendItem(aSwOptions); // SMARTTAGS @@ -623,7 +622,7 @@ void SwDocShell::Execute(SfxRequest& rReq) aSet.Put( aSwOptions ); const SfxPoolItem* pOpenSmartTagOptionsItem = 0; - if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( SID_OPEN_SMARTTAGOPTIONS, FALSE, &pOpenSmartTagOptionsItem ) ) + if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( SID_OPEN_SMARTTAGOPTIONS, sal_False, &pOpenSmartTagOptionsItem ) ) aSet.Put( *static_cast<const SfxBoolItem*>(pOpenSmartTagOptionsItem) ); SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create(); @@ -643,7 +642,7 @@ void SwDocShell::Execute(SfxRequest& rReq) pAFlags->pAutoCmpltList = 0; } // remove all pointer we never delete the strings - aTmpLst.Remove( (USHORT)0, aTmpLst.Count() ); + aTmpLst.Remove( (sal_uInt16)0, aTmpLst.Count() ); if( !bOldAutoCmpltCollectWords && bOldAutoCmpltCollectWords != pAFlags->bAutoCmpltCollectWords ) @@ -665,20 +664,20 @@ void SwDocShell::Execute(SfxRequest& rReq) case SID_PRINTPREVIEW: { - BOOL bSet = FALSE, bFound = FALSE, bOnly = TRUE; + sal_Bool bSet = sal_False, bFound = sal_False, bOnly = sal_True; SfxViewFrame *pTmpFrm = SfxViewFrame::GetFirst(this); SfxViewShell* pViewShell = SfxViewShell::Current(); SwView* pCurrView = dynamic_cast< SwView *> ( pViewShell ); - BOOL bCurrent = IS_TYPE( SwPagePreView, pViewShell ); + sal_Bool bCurrent = IS_TYPE( SwPagePreView, pViewShell ); while( pTmpFrm ) // search PreView { if( IS_TYPE( SwView, pTmpFrm->GetViewShell()) ) - bOnly = FALSE; + bOnly = sal_False; else if( IS_TYPE( SwPagePreView, pTmpFrm->GetViewShell())) { pTmpFrm->GetFrame().Appear(); - bFound = TRUE; + bFound = sal_True; } if( bFound && !bOnly ) break; @@ -686,12 +685,12 @@ void SwDocShell::Execute(SfxRequest& rReq) } if( pArgs && SFX_ITEM_SET == - pArgs->GetItemState( SID_PRINTPREVIEW, FALSE, &pItem )) + pArgs->GetItemState( SID_PRINTPREVIEW, sal_False, &pItem )) bSet = ((SfxBoolItem*)pItem)->GetValue(); else bSet = !bCurrent; - USHORT nSlotId = 0; + sal_uInt16 nSlotId = 0; if( bSet && !bFound ) // Nothing found, so create new Preview { // Don't create new one for BrowseView! @@ -722,14 +721,14 @@ void SwDocShell::Execute(SfxRequest& rReq) case SID_TEMPLATE_LOAD: { String aFileName; - static BOOL bText = TRUE; - static BOOL bFrame = FALSE; - static BOOL bPage = FALSE; - static BOOL bNum = FALSE; - static BOOL bMerge = FALSE; - USHORT nRet = USHRT_MAX; - - USHORT nFlags = bFrame ? SFX_LOAD_FRAME_STYLES : 0; + static sal_Bool bText = sal_True; + static sal_Bool bFrame = sal_False; + static sal_Bool bPage = sal_False; + static sal_Bool bNum = sal_False; + static sal_Bool bMerge = sal_False; + sal_uInt16 nRet = USHRT_MAX; + + sal_uInt16 nFlags = bFrame ? SFX_LOAD_FRAME_STYLES : 0; if(bPage) nFlags|= SFX_LOAD_PAGE_STYLES; if(bNum) @@ -741,13 +740,13 @@ void SwDocShell::Execute(SfxRequest& rReq) if ( pArgs ) { - SFX_REQUEST_ARG( rReq, pTemplateItem, SfxStringItem, SID_TEMPLATE_NAME, FALSE ); + SFX_REQUEST_ARG( rReq, pTemplateItem, SfxStringItem, SID_TEMPLATE_NAME, sal_False ); if ( pTemplateItem ) { aFileName = pTemplateItem->GetValue(); - SFX_REQUEST_ARG( rReq, pFlagsItem, SfxInt32Item, SID_TEMPLATE_LOAD, FALSE ); + SFX_REQUEST_ARG( rReq, pFlagsItem, SfxInt32Item, SID_TEMPLATE_LOAD, sal_False ); if ( pFlagsItem ) - nFlags = (USHORT) pFlagsItem->GetValue(); + nFlags = (sal_uInt16) pFlagsItem->GetValue(); } } @@ -780,7 +779,7 @@ void SwDocShell::Execute(SfxRequest& rReq) } pFlt = aIter.Next(); } - BOOL bWeb = 0 != dynamic_cast< SwWebDocShell *>( this ); + sal_Bool bWeb = 0 != dynamic_cast< SwWebDocShell *>( this ); const SfxFilter *pOwnFlt = SwDocShell::Factory().GetFilterContainer()-> GetFilter4FilterName(String::CreateFromAscii("writer8")); @@ -830,7 +829,7 @@ void SwDocShell::Execute(SfxRequest& rReq) bMerge = 0 != (nFlags&SFX_MERGE_STYLES); aOpt.SetMerge( !bMerge ); - SetError( LoadStylesFromFile( aFileName, aOpt, FALSE ), ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) )); + SetError( LoadStylesFromFile( aFileName, aOpt, sal_False ), ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) )); if ( !GetError() ) rReq.Done(); } @@ -853,7 +852,7 @@ void SwDocShell::Execute(SfxRequest& rReq) SwIoSystem::GetFilterOfFormat( String::CreateFromAscii("HTML"), SwWebDocShell::Factory().GetFilterContainer() ); - BOOL bLocalHasName = HasName(); + sal_Bool bLocalHasName = HasName(); if(bLocalHasName) { //check for filter type @@ -862,7 +861,7 @@ void SwDocShell::Execute(SfxRequest& rReq) { QueryBox aQuery(&pViewFrm->GetWindow(), SW_RES(MSG_SAVEAS_HTML_QUERY)); if(RET_YES == aQuery.Execute()) - bLocalHasName = FALSE; + bLocalHasName = sal_False; else break; } @@ -888,13 +887,13 @@ void SwDocShell::Execute(SfxRequest& rReq) } #if OSL_DEBUG_LEVEL > 1 { - BOOL bWeb = 0 != dynamic_cast<SwWebDocShell*>(this); + sal_Bool bWeb = 0 != dynamic_cast<SwWebDocShell*>(this); OSL_ENSURE(bWeb == TRUE, "SourceView only in WebDocShell"); } #endif // the SourceView is not the 1 for SwWebDocShell - USHORT nSlot = SID_VIEWSHELL1; - BOOL bSetModified = FALSE; + sal_uInt16 nSlot = SID_VIEWSHELL1; + sal_Bool bSetModified = sal_False; SfxPrinter* pSavePrinter = 0; if( 0 != pSrcView) { @@ -907,13 +906,12 @@ void SwDocShell::Execute(SfxRequest& rReq) utl::TempFile aTempFile; aTempFile.EnableKillingFile(); pSrcView->SaveContent(aTempFile.GetURL()); - bDone = TRUE; - SfxEventConfiguration* pEvent = SFX_APP()->GetEventConfig(); + bDone = sal_True; SvxMacro aMac(aEmptyStr, aEmptyStr, STARBASIC); - pEvent->ConfigureEvent(GlobalEventConfig::GetEventName( STR_EVENT_OPENDOC ), aMac, this); - pEvent->ConfigureEvent(GlobalEventConfig::GetEventName( STR_EVENT_PREPARECLOSEDOC ), aMac, this); - pEvent->ConfigureEvent(GlobalEventConfig::GetEventName( STR_EVENT_ACTIVATEDOC ), aMac, this); - pEvent->ConfigureEvent(GlobalEventConfig::GetEventName( STR_EVENT_DEACTIVATEDOC ), aMac, this); + SfxEventConfiguration::ConfigureEvent(GlobalEventConfig::GetEventName( STR_EVENT_OPENDOC ), aMac, this); + SfxEventConfiguration::ConfigureEvent(GlobalEventConfig::GetEventName( STR_EVENT_PREPARECLOSEDOC ), aMac, this); + SfxEventConfiguration::ConfigureEvent(GlobalEventConfig::GetEventName( STR_EVENT_ACTIVATEDOC ), aMac, this); + SfxEventConfiguration::ConfigureEvent(GlobalEventConfig::GetEventName( STR_EVENT_DEACTIVATEDOC ), aMac, this); ReloadFromHtml(aTempFile.GetURL(), pSrcView); nSlot = 0; } @@ -953,13 +951,13 @@ void SwDocShell::Execute(SfxRequest& rReq) OSL_ENSURE(pDlg, "Dialogdiet fail!"); if(RET_OK == pDlg->Execute()) { - BYTE nLevel = pDlg->GetLevel(); - BYTE nPara = pDlg->GetPara(); + sal_uInt8 nLevel = pDlg->GetLevel(); + sal_uInt8 nPara = pDlg->GetPara(); SwDoc* pSmryDoc = new SwDoc(); - SfxObjectShellRef xDocSh( new SwDocShell( pSmryDoc, SFX_CREATE_MODE_STANDARD)); + SfxObjectShellLock xDocSh( new SwDocShell( pSmryDoc, SFX_CREATE_MODE_STANDARD)); xDocSh->DoInitNew( 0 ); - BOOL bImpress = FN_ABSTRACT_STARIMPRESS == nWhich; + sal_Bool bImpress = FN_ABSTRACT_STARIMPRESS == nWhich; pDoc->Summary( pSmryDoc, nLevel, nPara, bImpress ); if( bImpress ) { @@ -987,12 +985,12 @@ void SwDocShell::Execute(SfxRequest& rReq) pStrm->Seek( STREAM_SEEK_TO_BEGIN ); // Transfer ownership of stream to a lockbytes object - SvLockBytes aLockBytes( pStrm, TRUE ); + SvLockBytes aLockBytes( pStrm, sal_True ); SvLockBytesStat aStat; if ( aLockBytes.Stat( &aStat, SVSTATFLAG_DEFAULT ) == ERRCODE_NONE ) { sal_uInt32 nLen = aStat.nSize; - ULONG nRead = 0; + sal_uLong nRead = 0; uno::Sequence< sal_Int8 > aSeq( nLen ); aLockBytes.ReadAt( 0, aSeq.getArray(), nLen, &nRead ); @@ -1058,12 +1056,12 @@ void SwDocShell::Execute(SfxRequest& rReq) pStrm->Seek( STREAM_SEEK_TO_BEGIN ); // Transfer ownership of stream to a lockbytes object - SvLockBytes aLockBytes( pStrm, TRUE ); + SvLockBytes aLockBytes( pStrm, sal_True ); SvLockBytesStat aStat; if ( aLockBytes.Stat( &aStat, SVSTATFLAG_DEFAULT ) == ERRCODE_NONE ) { sal_uInt32 nLen = aStat.nSize; - ULONG nRead = 0; + sal_uLong nRead = 0; uno::Sequence< sal_Int8 > aSeq( nLen ); aLockBytes.ReadAt( 0, aSeq.getArray(), nLen, &nRead ); @@ -1094,17 +1092,17 @@ void SwDocShell::Execute(SfxRequest& rReq) } break; case SID_SPELLCHECKER_CHANGED: - //! FALSE, TRUE, TRUE is on the save side but a probably overdone - SW_MOD()->CheckSpellChanges(FALSE, TRUE, TRUE, FALSE ); + //! sal_False, sal_True, sal_True is on the save side but a probably overdone + SW_MOD()->CheckSpellChanges(sal_False, sal_True, sal_True, sal_False ); break; case SID_BROWSER_MODE: case FN_PRINT_LAYOUT: // for Web, inverse to BrowserMode { int eState = STATE_TOGGLE; - BOOL bSet = sal_True; + sal_Bool bSet = sal_True; const SfxPoolItem* pAttr=NULL; - if ( pArgs && SFX_ITEM_SET == pArgs->GetItemState( nWhich , FALSE, &pAttr )) + if ( pArgs && SFX_ITEM_SET == pArgs->GetItemState( nWhich , sal_False, &pAttr )) { bSet = ((SfxBoolItem*)pAttr)->GetValue(); if ( nWhich == FN_PRINT_LAYOUT ) @@ -1118,7 +1116,7 @@ void SwDocShell::Execute(SfxRequest& rReq) ToggleBrowserMode(bSet, 0); // OS: mind the numerical order! - static USHORT const aInva[] = + static sal_uInt16 const aInva[] = { SID_NEWWINDOW,/*5620*/ SID_BROWSER_MODE, /*6313*/ @@ -1152,7 +1150,19 @@ void SwDocShell::Execute(SfxRequest& rReq) } break; - case SID_MAIL_EXPORT_FINISHED: + case SID_MAIL_PREPAREEXPORT: + { + //pWrtShell is not set in page preview + if(pWrtShell) + pWrtShell->StartAllAction(); + pDoc->UpdateFlds( NULL, false ); + pDoc->EmbedAllLinks(); + pDoc->RemoveInvisibleContent(); + if(pWrtShell) + pWrtShell->EndAllAction(); + } + break; + case SID_MAIL_EXPORT_FINISHED: { if(pWrtShell) pWrtShell->StartAllAction(); @@ -1165,14 +1175,14 @@ void SwDocShell::Execute(SfxRequest& rReq) case FN_NEW_HTML_DOC: case FN_NEW_GLOBAL_DOC: { - bDone = FALSE; - BOOL bCreateHtml = FN_NEW_HTML_DOC == nWhich; + bDone = sal_False; + sal_Bool bCreateHtml = FN_NEW_HTML_DOC == nWhich; - BOOL bCreateByOutlineLevel = false; //#outline level,add by zhaojianwei + sal_Bool bCreateByOutlineLevel = false; //#outline level,add by zhaojianwei sal_Int32 nTemplateOutlineLevel = 0 ; //#outline level,add by zhaojianwei String aFileName, aTemplateName; - if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( nWhich, FALSE, &pItem ) ) + if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( nWhich, sal_False, &pItem ) ) { aFileName = ((const SfxStringItem*)pItem)->GetValue(); SFX_ITEMSET_ARG( pArgs, pTemplItem, SfxStringItem, SID_TEMPLATE_NAME, sal_False ); @@ -1183,7 +1193,7 @@ void SwDocShell::Execute(SfxRequest& rReq) if ( !aFileName.Len() ) { FileDialogHelper aDlgHelper( TemplateDescription::FILESAVE_AUTOEXTENSION_TEMPLATE, 0 ); - //set HelpIds + const sal_Int16 nControlIds[] = { CommonFilePickerElementIds::PUSHBUTTON_OK, CommonFilePickerElementIds::PUSHBUTTON_CANCEL, @@ -1194,20 +1204,37 @@ void SwDocShell::Execute(SfxRequest& rReq) ExtendedFilePickerElementIds::LISTBOX_TEMPLATE, 0 }; - sal_Int32 nHelpIds[8]; - sal_Int32 nStartHelpId = - bCreateHtml ? - HID_SEND_HTML_CTRL_PUSHBUTTON_OK : HID_SEND_MASTER_CTRL_PUSHBUTTON_OK ; - for(int nHelp = 0; nHelp < 7; nHelp++) - nHelpIds[nHelp] = nStartHelpId++; - nHelpIds[7] = 0; - aDlgHelper.SetControlHelpIds( nControlIds, nHelpIds ); + const char* aHTMLHelpIds[] = + { + HID_SEND_HTML_CTRL_PUSHBUTTON_OK, + HID_SEND_HTML_CTRL_PUSHBUTTON_CANCEL, + HID_SEND_HTML_CTRL_LISTBOX_FILTER, + HID_SEND_HTML_CTRL_CONTROL_FILEVIEW, + HID_SEND_HTML_CTRL_EDIT_FILEURL, + HID_SEND_HTML_CTRL_CHECKBOX_AUTOEXTENSION, + HID_SEND_HTML_CTRL_LISTBOX_TEMPLATE, + "" + }; + + const char* aMasterHelpIds[] = + { + HID_SEND_MASTER_CTRL_PUSHBUTTON_OK, + HID_SEND_MASTER_CTRL_PUSHBUTTON_CANCEL, + HID_SEND_MASTER_CTRL_LISTBOX_FILTER, + HID_SEND_MASTER_CTRL_CONTROL_FILEVIEW, + HID_SEND_MASTER_CTRL_EDIT_FILEURL, + HID_SEND_MASTER_CTRL_CHECKBOX_AUTOEXTENSION, + HID_SEND_MASTER_CTRL_LISTBOX_TEMPLATE, + "" + }; + const char** pHelpIds = bCreateHtml ? aHTMLHelpIds : aMasterHelpIds; + aDlgHelper.SetControlHelpIds( nControlIds, pHelpIds ); uno::Reference < XFilePicker > xFP = aDlgHelper.GetFilePicker(); const SfxFilter* pFlt; - USHORT nStrId; + sal_uInt16 nStrId; if( bCreateHtml ) { @@ -1248,7 +1275,7 @@ void SwDocShell::Execute(SfxRequest& rReq) if( rOutlNds.Count() ) { int nLevel; - for(USHORT n = 0; n < rOutlNds.Count(); ++n ) + for(sal_uInt16 n = 0; n < rOutlNds.Count(); ++n ) if( ( nLevel = rOutlNds[n]->GetTxtNode()->GetAttrOutlineLevel()) > 0 && ! bOutline[nLevel-1] ) { @@ -1256,20 +1283,20 @@ void SwDocShell::Execute(SfxRequest& rReq) } } - const USHORT nStyleCount = pDoc->GetTxtFmtColls()->Count(); + const sal_uInt16 nStyleCount = pDoc->GetTxtFmtColls()->Count(); Sequence<OUString> aListBoxEntries( MAXLEVEL + nStyleCount); OUString* pEntries = aListBoxEntries.getArray(); sal_Int32 nIdx = 0 ; OUString sOutline( SW_RESSTR(STR_FDLG_OUTLINE_LEVEL) ); - for( USHORT i = 0; i < MAXLEVEL; ++i ) + for( sal_uInt16 i = 0; i < MAXLEVEL; ++i ) { if( bOutline[i] ) pEntries[nIdx++] = sOutline + String::CreateFromInt32( i+1 ); } OUString sStyle( SW_RESSTR(STR_FDLG_STYLE) ); - for(USHORT i = 0; i < nStyleCount; ++i) + for(sal_uInt16 i = 0; i < nStyleCount; ++i) { SwTxtFmtColl &rTxtColl = *pDoc->GetTxtFmtColls()->GetObject( i ); @@ -1335,9 +1362,9 @@ void SwDocShell::Execute(SfxRequest& rReq) if( aFileName.Len() ) { - if( PrepareClose( FALSE ) ) + if( PrepareClose( sal_False ) ) { - SwWait aWait( *this, TRUE ); + SwWait aWait( *this, sal_True ); if ( bCreateByOutlineLevel ) { @@ -1395,10 +1422,10 @@ void SwDocShell::Execute(SfxRequest& rReq) break; case SID_ATTR_YEAR2000: - if ( pArgs && SFX_ITEM_SET == pArgs->GetItemState( nWhich , FALSE, &pItem )) + if ( pArgs && SFX_ITEM_SET == pArgs->GetItemState( nWhich , sal_False, &pItem )) { OSL_ENSURE(pItem->ISA(SfxUInt16Item), "wrong Item"); - USHORT nYear2K = ((SfxUInt16Item*)pItem)->GetValue(); + sal_uInt16 nYear2K = ((SfxUInt16Item*)pItem)->GetValue(); // iterate over Views and put the State to FormShells SfxViewFrame* pVFrame = SfxViewFrame::GetFirst( this ); @@ -1413,7 +1440,7 @@ void SwDocShell::Execute(SfxRequest& rReq) pViewShell = pVFrame ? pVFrame->GetViewShell() : 0; pCurrView = dynamic_cast<SwView*>( pViewShell ); } - pDoc->GetNumberFormatter(TRUE)->SetYear2000(nYear2K); + pDoc->GetNumberFormatter(sal_True)->SetYear2000(nYear2K); } break; @@ -1428,7 +1455,7 @@ void lcl_processCompatibleSfxHint( const uno::Reference< document::XVbaEventsHel if ( rHint.ISA( SfxEventHint ) ) { uno::Sequence< uno::Any > aArgs; - ULONG nEventId = ((SfxEventHint&)rHint).GetEventId(); + sal_uLong nEventId = ((SfxEventHint&)rHint).GetEventId(); switch( nEventId ) { case SFX_EVENT_CREATEDOC: @@ -1505,25 +1532,27 @@ void SwDocShell::FillClass( SvGlobalName * pClassName, *pUserName = SW_RESSTR(STR_HUMAN_SWDOC_NAME); } -void SwDocShell::SetModified( BOOL bSet ) +void SwDocShell::SetModified( sal_Bool bSet ) { SfxObjectShell::SetModified( bSet ); if( IsEnableSetModified()) { if (!pDoc->IsInCallModified() ) { - EnableSetModified( FALSE ); + EnableSetModified( sal_False ); if( bSet ) { - BOOL bOld = pDoc->IsModified(); + sal_Bool bOld = pDoc->IsModified(); pDoc->SetModified(); if( !bOld ) - pDoc->SetUndoNoResetModified(); + { + pDoc->GetIDocumentUndoRedo().SetUndoNoResetModified(); + } } else pDoc->ResetModified(); - EnableSetModified( TRUE ); + EnableSetModified( sal_True ); } UpdateChildWindows(); @@ -1564,7 +1593,7 @@ class SwReloadFromHtmlReader : public SwReader void SwDocShell::ReloadFromHtml( const String& rStreamName, SwSrcView* pSrcView ) { - BOOL bModified = IsModified(); + sal_Bool bModified = IsModified(); // The HTTP-Header fields have to be removed, otherwise // there are some from Meta-Tags dublicated or triplicated afterwards. @@ -1583,7 +1612,7 @@ void SwDocShell::ReloadFromHtml( const String& rStreamName, SwSrcView* pSrcView BasicManager *pBasicMan = GetBasicManager(); if( pBasicMan && (pBasicMan != SFX_APP()->GetBasicManager()) ) { - USHORT nLibCount = pBasicMan->GetLibCount(); + sal_uInt16 nLibCount = pBasicMan->GetLibCount(); while( nLibCount ) { StarBASIC *pBasic = pBasicMan->GetLib( --nLibCount ); @@ -1600,7 +1629,7 @@ void SwDocShell::ReloadFromHtml( const String& rStreamName, SwSrcView* pSrcView // Only the modules are deleted from the standard-lib if( nLibCount ) - pBasicMan->RemoveLib( nLibCount, TRUE ); + pBasicMan->RemoveLib( nLibCount, sal_True ); else pBasic->Clear(); } @@ -1637,7 +1666,7 @@ void SwDocShell::ReloadFromHtml( const String& rStreamName, SwSrcView* pSrcView SubInitNew(); - SfxMedium aMed( rStreamName, STREAM_READ, FALSE ); + SfxMedium aMed( rStreamName, STREAM_READ, sal_False ); // #i48748# - use class <SwReloadFromHtmlReader>, because // the base URL has to be set to the filename of the document <rMedname> // and not to the base URL of the temporary file <aMed> in order to get @@ -1653,7 +1682,7 @@ void SwDocShell::ReloadFromHtml( const String& rStreamName, SwSrcView* pSrcView { SwWrtShell& rWrtSh = pCurrView->GetWrtShell(); if( rWrtSh.GetLayout()) - rWrtSh.CheckBrowseView( TRUE ); + rWrtSh.CheckBrowseView( sal_True ); } @@ -1668,7 +1697,7 @@ void SwDocShell::ReloadFromHtml( const String& rStreamName, SwSrcView* pSrcView pDoc->ResetModified(); } -void SwDocShell::ToggleBrowserMode(BOOL bSet, SwView* _pView ) +void SwDocShell::ToggleBrowserMode(sal_Bool bSet, SwView* _pView ) { GetDoc()->set(IDocumentSettingAccess::BROWSE_MODE, bSet ); UpdateFontList(); @@ -1692,15 +1721,15 @@ void SwDocShell::ToggleBrowserMode(BOOL bSet, SwView* _pView ) // Currently there can be only one view (layout) if the document is viewed in Web layout // So if there are more views we are in print layout and for toggling to Web layout all other views must be closed - SfxViewFrame *pTmpFrm = SfxViewFrame::GetFirst(this, FALSE); + SfxViewFrame *pTmpFrm = SfxViewFrame::GetFirst(this, sal_False); do { if( pTmpFrm != pTempView->GetViewFrame() ) { pTmpFrm->DoClose(); - pTmpFrm = SfxViewFrame::GetFirst(this, FALSE); + pTmpFrm = SfxViewFrame::GetFirst(this, sal_False); } else - pTmpFrm = pTmpFrm->GetNext(*pTmpFrm, this, FALSE); + pTmpFrm = pTmpFrm->GetNext(*pTmpFrm, this, sal_False); } while ( pTmpFrm ); @@ -1709,7 +1738,7 @@ void SwDocShell::ToggleBrowserMode(BOOL bSet, SwView* _pView ) // set view columns before toggling: if ( bSet ) { - const USHORT nColumns = rViewOptions.GetViewLayoutColumns(); + const sal_uInt16 nColumns = rViewOptions.GetViewLayoutColumns(); const bool bBookMode = rViewOptions.IsViewLayoutBookMode(); if ( 1 != nColumns || bBookMode ) { @@ -1718,7 +1747,7 @@ void SwDocShell::ToggleBrowserMode(BOOL bSet, SwView* _pView ) } // Triggeres a formatting: - pTempView->GetWrtShell().CheckBrowseView( TRUE ); + pTempView->GetWrtShell().CheckBrowseView( sal_True ); pTempView->CheckVisArea(); if( GetDoc()->get(IDocumentSettingAccess::BROWSE_MODE) ) @@ -1735,10 +1764,10 @@ void SwDocShell::ToggleBrowserMode(BOOL bSet, SwView* _pView ) } } -ULONG SwDocShell::LoadStylesFromFile( const String& rURL, - SwgReaderOption& rOpt, BOOL bUnoCall ) +sal_uLong SwDocShell::LoadStylesFromFile( const String& rURL, + SwgReaderOption& rOpt, sal_Bool bUnoCall ) { - ULONG nErr = 0; + sal_uLong nErr = 0; // Create a URL from filename INetURLObject aURLObj( rURL ); @@ -1753,14 +1782,14 @@ ULONG SwDocShell::LoadStylesFromFile( const String& rURL, SfxFilterMatcher aMatcher( sFactory ); // search for filter in WebDocShell, too - SfxMedium aMed( rURL, STREAM_STD_READ, FALSE ); + SfxMedium aMed( rURL, STREAM_STD_READ, sal_False ); const SfxFilter* pFlt = 0; - aMatcher.DetectFilter( aMed, &pFlt, FALSE, FALSE ); + aMatcher.DetectFilter( aMed, &pFlt, sal_False, sal_False ); if(!pFlt) { String sWebFactory(String::CreateFromAscii(SwWebDocShell::Factory().GetShortName())); SfxFilterMatcher aWebMatcher( sWebFactory ); - aWebMatcher.DetectFilter( aMed, &pFlt, FALSE, FALSE ); + aWebMatcher.DetectFilter( aMed, &pFlt, sal_False, sal_False ); } if( aMed.IsStorage() ) { diff --git a/sw/source/ui/app/docshini.cxx b/sw/source/ui/app/docshini.cxx index 06bf06adab..342d0a6a0c 100644 --- a/sw/source/ui/app/docshini.cxx +++ b/sw/source/ui/app/docshini.cxx @@ -160,30 +160,30 @@ sal_Bool SwDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor ) SfxPrinter* pPrt = pDoc->getPrinter( false ); String sEntry; - USHORT aFontWhich[] = + sal_uInt16 aFontWhich[] = { RES_CHRATR_FONT, RES_CHRATR_CJK_FONT, RES_CHRATR_CTL_FONT }; - USHORT aFontHeightWhich[] = + sal_uInt16 aFontHeightWhich[] = { RES_CHRATR_FONTSIZE, RES_CHRATR_CJK_FONTSIZE, RES_CHRATR_CTL_FONTSIZE }; - USHORT aFontIds[] = + sal_uInt16 aFontIds[] = { FONT_STANDARD, FONT_STANDARD_CJK, FONT_STANDARD_CTL }; - USHORT nFontTypes[] = + sal_uInt16 nFontTypes[] = { DEFAULTFONT_LATIN_TEXT, DEFAULTFONT_CJK_TEXT, DEFAULTFONT_CTL_TEXT }; - USHORT aLangTypes[] = + sal_uInt16 aLangTypes[] = { RES_CHRATR_LANGUAGE, RES_CHRATR_CJK_LANGUAGE, @@ -192,29 +192,23 @@ sal_Bool SwDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor ) for(sal_uInt8 i = 0; i < 3; i++) { - USHORT nFontWhich = aFontWhich[i]; - USHORT nFontId = aFontIds[i]; + sal_uInt16 nFontWhich = aFontWhich[i]; + sal_uInt16 nFontId = aFontIds[i]; SvxFontItem* pFontItem = 0; const SvxLanguageItem& rLang = (const SvxLanguageItem&)pDoc->GetDefault( aLangTypes[i] ); LanguageType eLanguage = rLang.GetLanguage(); if(!pStdFont->IsFontDefault(nFontId)) { sEntry = pStdFont->GetFontFor(nFontId); - sal_Bool bDelete = sal_False; - const SfxFont* pFnt = pPrt ? pPrt->GetFontByName(sEntry): 0; - if(!pFnt) + + Font aFont( sEntry, Size( 0, 10 ) ); + if( pPrt ) { - pFnt = new SfxFont( FAMILY_DONTKNOW, sEntry, PITCH_DONTKNOW, - ::gsl_getSystemTextEncoding() ); - bDelete = sal_True; - } - pFontItem = new SvxFontItem(pFnt->GetFamily(), pFnt->GetName(), - aEmptyStr, pFnt->GetPitch(), pFnt->GetCharSet(), nFontWhich); - if(bDelete) - { - delete (SfxFont*) pFnt; - bDelete = sal_False; + aFont = pPrt->GetFontMetric( aFont ); } + + pFontItem = new SvxFontItem(aFont.GetFamily(), aFont.GetName(), + aEmptyStr, aFont.GetPitch(), aFont.GetCharSet(), nFontWhich); } else { @@ -256,7 +250,7 @@ sal_Bool SwDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor ) } } - USHORT aFontIdPoolId[] = + sal_uInt16 aFontIdPoolId[] = { FONT_OUTLINE, RES_POOLCOLL_HEADLINE_BASE, FONT_LIST, RES_POOLCOLL_NUMBUL_BASE, @@ -272,8 +266,8 @@ sal_Bool SwDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor ) FONT_INDEX_CTL, RES_POOLCOLL_REGISTER_BASE }; - USHORT nFontWhich = RES_CHRATR_FONT; - USHORT nFontHeightWhich = RES_CHRATR_FONTSIZE; + sal_uInt16 nFontWhich = RES_CHRATR_FONT; + sal_uInt16 nFontHeightWhich = RES_CHRATR_FONTSIZE; LanguageType eLanguage = static_cast<const SvxLanguageItem&>(pDoc->GetDefault( RES_CHRATR_LANGUAGE )).GetLanguage(); for(sal_uInt8 nIdx = 0; nIdx < 24; nIdx += 2) { @@ -293,25 +287,18 @@ sal_Bool SwDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor ) if(!pStdFont->IsFontDefault(aFontIdPoolId[nIdx])) { sEntry = pStdFont->GetFontFor(aFontIdPoolId[nIdx]); - sal_Bool bDelete = sal_False; - const SfxFont* pFnt = pPrt ? pPrt->GetFontByName(sEntry): 0; - if(!pFnt) - { - pFnt = new SfxFont( FAMILY_DONTKNOW, sEntry, PITCH_DONTKNOW, - ::gsl_getSystemTextEncoding() ); - bDelete = sal_True; - } + + Font aFont( sEntry, Size( 0, 10 ) ); + if( pPrt ) + aFont = pPrt->GetFontMetric( aFont ); + pColl = pDoc->GetTxtCollFromPool(aFontIdPoolId[nIdx + 1]); if( !bHTMLTemplSet || SFX_ITEM_SET != pColl->GetAttrSet().GetItemState( nFontWhich, sal_False ) ) { - pColl->SetFmtAttr(SvxFontItem(pFnt->GetFamily(), pFnt->GetName(), - aEmptyStr, pFnt->GetPitch(), pFnt->GetCharSet(), nFontWhich)); - } - if(bDelete) - { - delete (SfxFont*) pFnt; + pColl->SetFmtAttr(SvxFontItem(aFont.GetFamily(), aFont.GetName(), + aEmptyStr, aFont.GetPitch(), aFont.GetCharSet(), nFontWhich)); } } sal_Int32 nFontHeight = pStdFont->GetFontHeight( static_cast< sal_Int8 >(aFontIdPoolId[nIdx]), 0, eLanguage ); @@ -326,6 +313,12 @@ sal_Bool SwDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor ) pColl->SetFmtAttr( aFontHeight ); } } + + // the default for documents created via 'File/New' should be 'on' + // (old documents, where this property was not yet implemented, will get the + // value 'false' in the SwDoc c-tor) + pDoc->set( IDocumentSettingAccess::MATH_BASELINE_ALIGNMENT, + SW_MOD()->GetUsrPref( bWeb )->IsAlignMathObjectsToBaseline() ); } /* #106748# If the default frame direction of a document is RTL @@ -335,14 +328,14 @@ sal_Bool SwDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor ) pDoc->SetDefault( SvxAdjustItem(SVX_ADJUST_RIGHT, RES_PARATR_ADJUST ) ); // OD 09.10.2003 #i18732# - set dynamic pool default for - // item RES_FOLLOW_TEXT_FLOW to FALSE for *new document*. + // item RES_FOLLOW_TEXT_FLOW to sal_False for *new document*. // Thus, redo this change in method <SwDoc::RemoveAllFmtLanguageDependencies()>, // which is called from <SwDocShell::ConvertFrom(..)> in order to restore // the static pool default. - pDoc->SetDefault( SwFmtFollowTextFlow( FALSE ) ); + pDoc->SetDefault( SwFmtFollowTextFlow( sal_False ) ); // --> collapsing borders FME 2005-05-27 #i29550# - pDoc->SetDefault( SfxBoolItem( RES_COLLAPSING_BORDERS, TRUE ) ); + pDoc->SetDefault( SfxBoolItem( RES_COLLAPSING_BORDERS, sal_True ) ); // <-- collapsing //#i16874# AutoKerning as default for new documents @@ -584,10 +577,10 @@ sal_Bool SwDocShell::Load( SfxMedium& rMedium ) { if( ReadXML ) { - ReadXML->SetOrganizerMode( TRUE ); + ReadXML->SetOrganizerMode( sal_True ); SwReader aRdr( rMedium, aEmptyStr, pDoc ); nErr = aRdr.Read( *ReadXML ); - ReadXML->SetOrganizerMode( FALSE ); + ReadXML->SetOrganizerMode( sal_False ); } } break; @@ -683,10 +676,10 @@ sal_Bool SwDocShell::LoadFrom( SfxMedium& rMedium ) mxBasePool = new SwDocStyleSheetPool( *pDoc, SFX_CREATE_MODE_ORGANIZER == GetCreateMode() ); if( ReadXML ) { - ReadXML->SetOrganizerMode( TRUE ); + ReadXML->SetOrganizerMode( sal_True ); SwReader aRdr( rMedium, aEmptyStr, pDoc ); nErr = aRdr.Read( *ReadXML ); - ReadXML->SetOrganizerMode( FALSE ); + ReadXML->SetOrganizerMode( sal_False ); } } } @@ -748,12 +741,12 @@ void SwDocShell::SubInitNew() { SvxHyphenZoneItem aHyp( (SvxHyphenZoneItem&) pDoc->GetDefault( RES_PARATR_HYPHENZONE) ); - aHyp.GetMinLead() = static_cast< BYTE >(aLinguOpt.nHyphMinLeading); - aHyp.GetMinTrail() = static_cast< BYTE >(aLinguOpt.nHyphMinTrailing); + aHyp.GetMinLead() = static_cast< sal_uInt8 >(aLinguOpt.nHyphMinLeading); + aHyp.GetMinTrail() = static_cast< sal_uInt8 >(aLinguOpt.nHyphMinTrailing); aDfltSet.Put( aHyp ); - sal_uInt16 nNewPos = static_cast< sal_uInt16 >(SW_MOD()->GetUsrPref(FALSE)->GetDefTab()); + sal_uInt16 nNewPos = static_cast< sal_uInt16 >(SW_MOD()->GetUsrPref(sal_False)->GetDefTab()); if( nNewPos ) aDfltSet.Put( SvxTabStopItem( 1, nNewPos, SVX_TAB_ADJUST_DEFAULT, RES_PARATR_TABSTOP ) ); @@ -765,7 +758,7 @@ void SwDocShell::SubInitNew() //default page mode for text grid if(!bWeb) { - sal_Bool bSquaredPageMode = SW_MOD()->GetUsrPref(FALSE)->IsSquaredPageMode(); + sal_Bool bSquaredPageMode = SW_MOD()->GetUsrPref(sal_False)->IsSquaredPageMode(); pDoc->SetDefaultPageMode( bSquaredPageMode ); } @@ -779,4 +772,4 @@ IDocumentDeviceAccess* SwDocShell::getIDocumentDeviceAccess() { return pDoc; } const IDocumentSettingAccess* SwDocShell::getIDocumentSettingAccess() const { return pDoc; } IDocumentChartDataProviderAccess* SwDocShell::getIDocumentChartDataProviderAccess() { return pDoc; } -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
\ No newline at end of file diff --git a/sw/source/ui/app/docst.cxx b/sw/source/ui/app/docst.cxx index ac9bbbbde0..f3cdb11f65 100644 --- a/sw/source/ui/app/docst.cxx +++ b/sw/source/ui/app/docst.cxx @@ -28,6 +28,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" + #include <com/sun/star/style/XStyleFamiliesSupplier.hpp> #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/container/XNameAccess.hpp> @@ -53,7 +54,8 @@ #include <fchrfmt.hxx> #include <svtools/htmlcfg.hxx> #include <SwStyleNameMapper.hxx> -#include <undobj.hxx> +#include <SwRewriter.hxx> +#include <numrule.hxx> #include <swundo.hxx> #include "view.hxx" @@ -63,7 +65,8 @@ #include "cmdid.h" #include "globals.hrc" #include "viewopt.hxx" -#include "doc.hxx" +#include <doc.hxx> +#include <IDocumentUndoRedo.hxx> #include "swstyle.h" #include "frmfmt.hxx" #include "charfmt.hxx" @@ -90,8 +93,8 @@ using namespace ::com::sun::star; void SwDocShell::StateStyleSheet(SfxItemSet& rSet, SwWrtShell* pSh) { SfxWhichIter aIter(rSet); - USHORT nWhich = aIter.FirstWhich(); - USHORT nActualFamily = USHRT_MAX; + sal_uInt16 nWhich = aIter.FirstWhich(); + sal_uInt16 nActualFamily = USHRT_MAX; SwWrtShell* pShell = pSh ? pSh : GetWrtShell(); if(!pShell) @@ -108,7 +111,7 @@ void SwDocShell::StateStyleSheet(SfxItemSet& rSet, SwWrtShell* pSh) SfxViewFrame* pFrame = pShell->GetView().GetViewFrame(); const ISfxTemplateCommon* pCommon = SFX_APP()->GetCurrentTemplateCommon(pFrame->GetBindings()); if( pCommon ) - nActualFamily = static_cast< USHORT >(pCommon->GetActualFamily()); + nActualFamily = static_cast< sal_uInt16 >(pCommon->GetActualFamily()); } while (nWhich) @@ -157,12 +160,12 @@ void SwDocShell::StateStyleSheet(SfxItemSet& rSet, SwWrtShell* pSh) SfxTemplateItem aItem(nWhich, aName); - USHORT nMask = 0; + sal_uInt16 nMask = 0; if( pDoc->get(IDocumentSettingAccess::HTML_MODE) ) nMask = SWSTYLEBIT_HTML; else { - const int nSelection = pShell->GetFrmType(0,TRUE); + const int nSelection = pShell->GetFrmType(0,sal_True); if(pShell->GetCurTOX()) nMask = SWSTYLEBIT_IDX ; else if(nSelection & FRMTYPE_HEADER || @@ -204,7 +207,7 @@ void SwDocShell::StateStyleSheet(SfxItemSet& rSet, SwWrtShell* pSh) rSet.DisableItem( nWhich ); else { - USHORT n = pShell->GetCurPageDesc( FALSE ); + sal_uInt16 n = pShell->GetCurPageDesc( sal_False ); if( n < pShell->GetPageDescCnt() ) aName = pShell->GetPageDesc( n ).GetName(); @@ -265,42 +268,42 @@ void SwDocShell::StateStyleSheet(SfxItemSet& rSet, SwWrtShell* pSh) void SwDocShell::ExecStyleSheet( SfxRequest& rReq ) { - USHORT nSlot = rReq.GetSlot(); - USHORT nRet = 0xffff; + sal_uInt16 nSlot = rReq.GetSlot(); + sal_uInt16 nRet = 0xffff; const SfxItemSet* pArgs = rReq.GetArgs(); const SfxPoolItem* pItem; SwWrtShell* pActShell = 0; - BOOL bSetReturn = TRUE; + sal_Bool bSetReturn = sal_True; switch (nSlot) { case SID_STYLE_NEW: if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( SID_STYLE_FAMILY, - FALSE, &pItem )) + sal_False, &pItem )) { - USHORT nFamily = ((const SfxUInt16Item*)pItem)->GetValue(); + sal_uInt16 nFamily = ((const SfxUInt16Item*)pItem)->GetValue(); String sName; - USHORT nMask = 0; + sal_uInt16 nMask = 0; if( SFX_ITEM_SET == pArgs->GetItemState( SID_STYLE_NEW, - FALSE, &pItem )) + sal_False, &pItem )) sName = ((const SfxStringItem*)pItem)->GetValue(); if( SFX_ITEM_SET == pArgs->GetItemState( SID_STYLE_MASK, - FALSE, &pItem )) + sal_False, &pItem )) nMask = ((const SfxUInt16Item*)pItem)->GetValue(); String sParent; if( SFX_ITEM_SET == pArgs->GetItemState( SID_STYLE_REFERENCE, - FALSE, &pItem )) + sal_False, &pItem )) sParent = ((const SfxStringItem*)pItem)->GetValue(); - nRet = Edit( sName, sParent, nFamily, nMask, TRUE, FALSE, 0, rReq.IsAPI() ); + nRet = Edit( sName, sParent, nFamily, nMask, sal_True, sal_False, 0, rReq.IsAPI() ); } break; case SID_STYLE_APPLY: if( !pArgs ) { - GetView()->GetViewFrame()->GetDispatcher()->Execute(SID_STYLE_DESIGNER, FALSE); + GetView()->GetViewFrame()->GetDispatcher()->Execute(SID_STYLE_DESIGNER, sal_False); break; } else @@ -339,8 +342,8 @@ void SwDocShell::ExecStyleSheet( SfxRequest& rReq ) case SID_STYLE_NEW_BY_EXAMPLE: { String aParam; - USHORT nFamily = SFX_STYLE_FAMILY_PARA; - USHORT nMask = 0; + sal_uInt16 nFamily = SFX_STYLE_FAMILY_PARA; + sal_uInt16 nMask = 0; if( !pArgs ) { @@ -380,14 +383,14 @@ void SwDocShell::ExecStyleSheet( SfxRequest& rReq ) OSL_ENSURE( pArgs->Count(), "SfxBug ItemSet is empty"); SwWrtShell* pShell = GetWrtShell(); - if( SFX_ITEM_SET == pArgs->GetItemState(nSlot, FALSE, &pItem )) + if( SFX_ITEM_SET == pArgs->GetItemState(nSlot, sal_False, &pItem )) aParam = ((const SfxStringItem*)pItem)->GetValue(); if( SFX_ITEM_SET == pArgs->GetItemState(SID_STYLE_FAMILY, - FALSE, &pItem )) + sal_False, &pItem )) nFamily = ((const SfxUInt16Item*)pItem)->GetValue(); - if( SFX_ITEM_SET == pArgs->GetItemState(SID_STYLE_FAMILYNAME, FALSE, &pItem )) + if( SFX_ITEM_SET == pArgs->GetItemState(SID_STYLE_FAMILYNAME, sal_False, &pItem )) { String aFamily = ((const SfxStringItem*)pItem)->GetValue(); if(aFamily.CompareToAscii("CharacterStyles") == COMPARE_EQUAL) @@ -407,10 +410,10 @@ void SwDocShell::ExecStyleSheet( SfxRequest& rReq ) } if( SFX_ITEM_SET == pArgs->GetItemState(SID_STYLE_MASK, - FALSE, &pItem )) + sal_False, &pItem )) nMask = ((const SfxUInt16Item*)pItem)->GetValue(); if( SFX_ITEM_SET == pArgs->GetItemState(FN_PARAM_WRTSHELL, - FALSE, &pItem )) + sal_False, &pItem )) pActShell = pShell = (SwWrtShell*)((SwPtrItem*)pItem)->GetValue(); if( nSlot == SID_STYLE_UPDATE_BY_EXAMPLE ) @@ -439,7 +442,7 @@ void SwDocShell::ExecStyleSheet( SfxRequest& rReq ) } break; case SFX_STYLE_FAMILY_PSEUDO: - if(SFX_ITEM_SET == pArgs->GetItemState(SID_STYLE_UPD_BY_EX_NAME, FALSE, &pItem)) + if(SFX_ITEM_SET == pArgs->GetItemState(SID_STYLE_UPD_BY_EX_NAME, sal_False, &pItem)) { aParam = ((const SfxStringItem*)pItem)->GetValue(); } @@ -453,7 +456,7 @@ void SwDocShell::ExecStyleSheet( SfxRequest& rReq ) switch(nSlot) { case SID_STYLE_EDIT: - nRet = Edit(aParam, aEmptyStr, nFamily, nMask, FALSE, FALSE, pActShell ); + nRet = Edit(aParam, aEmptyStr, nFamily, nMask, sal_False, sal_False, pActShell ); break; case SID_STYLE_DELETE: nRet = Delete(aParam, nFamily); @@ -504,15 +507,15 @@ void SwDocShell::ExecStyleSheet( SfxRequest& rReq ) --------------------------------------------------------------------*/ -USHORT SwDocShell::Edit( const String &rName, const String &rParent, USHORT nFamily, USHORT nMask, - BOOL bNew, BOOL bColumn, SwWrtShell* pActShell, - BOOL bBasic ) +sal_uInt16 SwDocShell::Edit( const String &rName, const String &rParent, sal_uInt16 nFamily, sal_uInt16 nMask, + sal_Bool bNew, sal_Bool bColumn, SwWrtShell* pActShell, + sal_Bool bBasic ) { OSL_ENSURE(GetWrtShell(), "No Shell, no Styles"); SfxStyleSheetBase *pStyle = 0; - USHORT nRet = nMask; - BOOL bModified = pDoc->IsModified(); + sal_uInt16 nRet = nMask; + sal_Bool bModified = pDoc->IsModified(); if( bNew ) { @@ -534,7 +537,7 @@ USHORT SwDocShell::Edit( const String &rName, const String &rParent, USHORT nFam SwTxtFmtColl* pColl = pWrtShell->FindTxtFmtCollByName( rParent ); if(!pColl) { - USHORT nId = SwStyleNameMapper::GetPoolIdFromUIName(rParent, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL); + sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName(rParent, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL); if(USHRT_MAX != nId) pColl = pWrtShell->GetTxtCollFromPool( nId ); } @@ -571,7 +574,7 @@ USHORT SwDocShell::Edit( const String &rName, const String &rParent, USHORT nFam SwCharFmt* pCFmt = pWrtShell->FindCharFmtByName( rParent ); if(!pCFmt) { - USHORT nId = SwStyleNameMapper::GetPoolIdFromUIName(rParent, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT); + sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName(rParent, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT); if(USHRT_MAX != nId) pCFmt = pWrtShell->GetCharFmtFromPool( nId ); } @@ -595,7 +598,7 @@ USHORT SwDocShell::Edit( const String &rName, const String &rParent, USHORT nFam SwFrmFmt* pFFmt = pWrtShell->GetDoc()->FindFrmFmtByName( rParent ); if(!pFFmt) { - USHORT nId = SwStyleNameMapper::GetPoolIdFromUIName(rParent, nsSwGetPoolIdFromName::GET_POOLID_FRMFMT); + sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName(rParent, nsSwGetPoolIdFromName::GET_POOLID_FRMFMT); if(USHRT_MAX != nId) pFFmt = pWrtShell->GetFrmFmtFromPool( nId ); } @@ -613,7 +616,7 @@ USHORT SwDocShell::Edit( const String &rName, const String &rParent, USHORT nFam } if(!pStyle) - return FALSE; + return sal_False; // put dialogues together rtl::Reference< SwDocStyleSheet > xTmp( new SwDocStyleSheet( *(SwDocStyleSheet*)pStyle ) ); @@ -631,7 +634,7 @@ USHORT SwDocShell::Edit( const String &rName, const String &rParent, USHORT nFam SfxItemSet& rSet = xTmp->GetItemSet(); const SfxPoolItem *pTmpBrush; if( SFX_ITEM_SET == rSet.GetItemState( RES_CHRATR_BACKGROUND, - TRUE, &pTmpBrush ) ) + sal_True, &pTmpBrush ) ) { SvxBrushItem aTmpBrush( *((SvxBrushItem*)pTmpBrush) ); aTmpBrush.SetWhich( RES_BACKGROUND ); @@ -641,7 +644,7 @@ USHORT SwDocShell::Edit( const String &rName, const String &rParent, USHORT nFam if (!bBasic) { // prior to the dialog the HtmlMode at the DocShell is being sunk - USHORT nHtmlMode = ::GetHtmlMode(this); + sal_uInt16 nHtmlMode = ::GetHtmlMode(this); // In HTML mode, we do not always have a printer. In order to show // the correct page size in the Format - Page dialog, we have to @@ -653,7 +656,7 @@ USHORT SwDocShell::Edit( const String &rName, const String &rParent, USHORT nFam PutItem(SfxUInt16Item(SID_HTML_MODE, nHtmlMode)); FieldUnit eMetric = ::GetDfltMetric(0 != (HTMLMODE_ON&nHtmlMode)); - SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< UINT16 >(eMetric))); + SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric))); SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); OSL_ENSURE(pFact, "Dialogdiet fail!"); SfxAbstractTabDialog* pDlg = pFact->CreateTemplateDialog( DLG_TEMPLATE_BASE, @@ -686,7 +689,7 @@ USHORT SwDocShell::Edit( const String &rName, const String &rParent, USHORT nFam { if(SFX_STYLE_FAMILY_PAGE == nFamily) { - static const USHORT aInval[] = { + static const sal_uInt16 aInval[] = { SID_IMAGE_ORIENTATION, SID_ATTR_CHAR_FONT, FN_INSERT_CTRL, FN_INSERT_OBJ_CTRL, 0}; @@ -697,7 +700,7 @@ USHORT SwDocShell::Edit( const String &rName, const String &rParent, USHORT nFam { const SfxPoolItem *pTmpBrush; if( SFX_ITEM_SET == aTmpSet.GetItemState( RES_BACKGROUND, - FALSE, &pTmpBrush ) ) + sal_False, &pTmpBrush ) ) { SvxBrushItem aTmpBrush( *((SvxBrushItem*)pTmpBrush) ); aTmpBrush.SetWhich( RES_CHRATR_BACKGROUND ); @@ -710,7 +713,7 @@ USHORT SwDocShell::Edit( const String &rName, const String &rParent, USHORT nFam if( SFX_STYLE_FAMILY_PAGE == nFamily && SvtLanguageOptions().IsCTLFontEnabled() ) { const SfxPoolItem *pItem = NULL; - if( aTmpSet.GetItemState( GetPool().GetTrueWhich( SID_ATTR_FRAMEDIRECTION, FALSE ) , TRUE, &pItem ) == SFX_ITEM_SET ) + if( aTmpSet.GetItemState( GetPool().GetTrueWhich( SID_ATTR_FRAMEDIRECTION, sal_False ) , sal_True, &pItem ) == SFX_ITEM_SET ) SwChartHelper::DoUpdateAllCharts( pDoc ); } } @@ -727,7 +730,9 @@ USHORT SwDocShell::Edit( const String &rName, const String &rParent, USHORT nFam pDoc->SetModified(); if( !bModified ) // Bug 57028 - pDoc->SetUndoNoResetModified(); + { + pDoc->GetIDocumentUndoRedo().SetUndoNoResetModified(); + } GetWrtShell()->EndAllAction(); } @@ -735,8 +740,8 @@ USHORT SwDocShell::Edit( const String &rName, const String &rParent, USHORT nFam { if( bNew ) { - GetWrtShell()->Undo(UNDO_EMPTY, 1); - pDoc->ClearRedo(); + GetWrtShell()->Undo(1); + pDoc->GetIDocumentUndoRedo().ClearRedo(); } if( !bModified ) @@ -770,7 +775,7 @@ USHORT SwDocShell::Edit( const String &rName, const String &rParent, USHORT nFam { const SfxPoolItem *pTmpBrush; if( SFX_ITEM_SET == aTmpSet.GetItemState( RES_BACKGROUND, - FALSE, &pTmpBrush ) ) + sal_False, &pTmpBrush ) ) { SvxBrushItem aTmpBrush( *((SvxBrushItem*)pTmpBrush) ); aTmpBrush.SetWhich( RES_CHRATR_BACKGROUND ); @@ -788,7 +793,9 @@ USHORT SwDocShell::Edit( const String &rName, const String &rParent, USHORT nFam pDoc->SetModified(); if( !bModified ) // Bug 57028 - pDoc->SetUndoNoResetModified(); + { + pDoc->GetIDocumentUndoRedo().SetUndoNoResetModified(); + } GetWrtShell()->EndAllAction(); } @@ -800,7 +807,7 @@ USHORT SwDocShell::Edit( const String &rName, const String &rParent, USHORT nFam --------------------------------------------------------------------*/ -USHORT SwDocShell::Delete(const String &rName, USHORT nFamily) +sal_uInt16 SwDocShell::Delete(const String &rName, sal_uInt16 nFamily) { SfxStyleSheetBase *pStyle = mxBasePool->Find(rName, (SfxStyleFamily)nFamily); @@ -812,9 +819,9 @@ USHORT SwDocShell::Delete(const String &rName, USHORT nFamily) mxBasePool->Remove(pStyle); GetWrtShell()->EndAllAction(); - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } /*-------------------------------------------------------------------- @@ -822,8 +829,8 @@ USHORT SwDocShell::Delete(const String &rName, USHORT nFamily) --------------------------------------------------------------------*/ -USHORT SwDocShell::ApplyStyles(const String &rName, USHORT nFamily, - SwWrtShell* pShell, USHORT nMode ) +sal_uInt16 SwDocShell::ApplyStyles(const String &rName, sal_uInt16 nFamily, + SwWrtShell* pShell, sal_uInt16 nMode ) { SwDocStyleSheet* pStyle = (SwDocStyleSheet*)mxBasePool->Find(rName, (SfxStyleFamily)nFamily); @@ -831,7 +838,7 @@ USHORT SwDocShell::ApplyStyles(const String &rName, USHORT nFamily, OSL_ENSURE(pStyle, "Where's the StyleSheet"); if(!pStyle) - return FALSE; + return sal_False; SwWrtShell *pSh = pShell ? pShell : GetWrtShell(); @@ -891,16 +898,16 @@ USHORT SwDocShell::ApplyStyles(const String &rName, USHORT nFamily, -USHORT SwDocShell::DoWaterCan(const String &rName, USHORT nFamily) +sal_uInt16 SwDocShell::DoWaterCan(const String &rName, sal_uInt16 nFamily) { OSL_ENSURE(GetWrtShell(), "No Shell, no Styles"); SwEditWin& rEdtWin = pView->GetEditWin(); SwApplyTemplate* pApply = rEdtWin.GetApplyTemplate(); - BOOL bWaterCan = !(pApply && pApply->eType != 0); + sal_Bool bWaterCan = !(pApply && pApply->eType != 0); if( !rName.Len() ) - bWaterCan = FALSE; + bWaterCan = sal_False; SwApplyTemplate aTemplate; aTemplate.eType = nFamily; @@ -949,7 +956,7 @@ USHORT SwDocShell::DoWaterCan(const String &rName, USHORT nFamily) --------------------------------------------------------------------*/ -USHORT SwDocShell::UpdateStyle(const String &rName, USHORT nFamily, SwWrtShell* pShell) +sal_uInt16 SwDocShell::UpdateStyle(const String &rName, sal_uInt16 nFamily, SwWrtShell* pShell) { SwWrtShell* pCurrWrtShell = pShell ? pShell : GetWrtShell(); OSL_ENSURE(GetWrtShell(), "No Shell, no Styles"); @@ -976,7 +983,7 @@ USHORT SwDocShell::UpdateStyle(const String &rName, USHORT nFamily, SwWrtShell* GetWrtShell()->FillByEx(pColl); // also apply template to remove hard set attributes GetWrtShell()->SetTxtFmtColl( pColl ); - GetWrtShell()->EndUndo(UNDO_INSFMTATTR, NULL); + GetWrtShell()->EndUndo(); GetWrtShell()->EndAllAction(); } break; @@ -998,7 +1005,7 @@ USHORT SwDocShell::UpdateStyle(const String &rName, USHORT nFamily, SwWrtShell* pFrm->SetFmtAttr( aSet ); // also apply template to remove hard set attributes - pCurrWrtShell->SetFrmFmt( pFrm, TRUE ); + pCurrWrtShell->SetFrmFmt( pFrm, sal_True ); pCurrWrtShell->EndAllAction(); } } @@ -1039,8 +1046,8 @@ USHORT SwDocShell::UpdateStyle(const String &rName, USHORT nFamily, SwWrtShell* --------------------------------------------------------------------*/ -USHORT SwDocShell::MakeByExample( const String &rName, USHORT nFamily, - USHORT nMask, SwWrtShell* pShell ) +sal_uInt16 SwDocShell::MakeByExample( const String &rName, sal_uInt16 nFamily, + sal_uInt16 nMask, SwWrtShell* pShell ) { SwWrtShell* pCurrWrtShell = pShell ? pShell : GetWrtShell(); SwDocStyleSheet* pStyle = (SwDocStyleSheet*)mxBasePool->Find( @@ -1071,7 +1078,7 @@ USHORT SwDocShell::MakeByExample( const String &rName, USHORT nFamily, pColl->SetDerivedFrom(pCurrWrtShell->GetCurTxtFmtColl()); // set the mask at the Collection: - USHORT nId = pColl->GetPoolFmtId() & 0x87ff; + sal_uInt16 nId = pColl->GetPoolFmtId() & 0x87ff; switch( nMask & 0x0fff ) { case SWSTYLEBIT_TEXT: @@ -1138,13 +1145,13 @@ USHORT SwDocShell::MakeByExample( const String &rName, USHORT nFamily, case SFX_STYLE_FAMILY_PAGE: { pCurrWrtShell->StartAllAction(); - USHORT nPgDsc = pCurrWrtShell->GetCurPageDesc(); + sal_uInt16 nPgDsc = pCurrWrtShell->GetCurPageDesc(); SwPageDesc& rSrc = (SwPageDesc&)pCurrWrtShell->GetPageDesc( nPgDsc ); SwPageDesc& rDest = *(SwPageDesc*)pStyle->GetPageDesc(); - USHORT nPoolId = rDest.GetPoolFmtId(); - USHORT nHId = rDest.GetPoolHelpId(); - BYTE nHFId = rDest.GetPoolHlpFileId(); + sal_uInt16 nPoolId = rDest.GetPoolFmtId(); + sal_uInt16 nHId = rDest.GetPoolHelpId(); + sal_uInt8 nHFId = rDest.GetPoolHlpFileId(); pCurrWrtShell->GetDoc()->CopyPageDesc( rSrc, rDest ); @@ -1154,7 +1161,7 @@ USHORT SwDocShell::MakeByExample( const String &rName, USHORT nFamily, rDest.SetPoolHlpFileId( nHFId ); // when Headers/Footers are created, there is no Undo anymore! - pCurrWrtShell->GetDoc()->DelAllUndoObj(); + pCurrWrtShell->GetDoc()->GetIDocumentUndoRedo().DelAllUndoObj(); pCurrWrtShell->EndAllAction(); } @@ -1183,7 +1190,7 @@ USHORT SwDocShell::MakeByExample( const String &rName, USHORT nFamily, void SwDocShell::LoadStyles( SfxObjectShell& rSource ) { - _LoadStyles(rSource, FALSE); + _LoadStyles(rSource, sal_False); } /* -----------------16.05.2003 15:45----------------- bPreserveCurrentDocument determines whether SetFixFields() is called @@ -1192,7 +1199,7 @@ void SwDocShell::LoadStyles( SfxObjectShell& rSource ) Calls of ::LoadStyles() normally use files especially loaded for the purpose of importing styles. --------------------------------------------------*/ -void SwDocShell::_LoadStyles( SfxObjectShell& rSource, BOOL bPreserveCurrentDocument ) +void SwDocShell::_LoadStyles( SfxObjectShell& rSource, sal_Bool bPreserveCurrentDocument ) { /* [Description] @@ -1219,13 +1226,13 @@ void SwDocShell::_LoadStyles( SfxObjectShell& rSource, BOOL bPreserveCurrentDocu } else { - BOOL bModified = pDoc->IsModified(); + sal_Bool bModified = pDoc->IsModified(); pDoc->ReplaceStyles( *((SwDocShell&)rSource).pDoc ); if( !bModified && pDoc->IsModified() && !pView ) { // the View is created later, but overwrites the Modify-Flag. // Undo doesn't work anymore anyways. - pDoc->SetUndoNoResetModified(); + pDoc->GetIDocumentUndoRedo().SetUndoNoResetModified(); } } } @@ -1234,9 +1241,9 @@ void SwDocShell::_LoadStyles( SfxObjectShell& rSource, BOOL bPreserveCurrentDocu } -void SwDocShell::FormatPage( const String& rPage, BOOL bColumn, SwWrtShell* pActShell ) +void SwDocShell::FormatPage( const String& rPage, sal_Bool bColumn, SwWrtShell* pActShell ) { - Edit( rPage, aEmptyStr, SFX_STYLE_FAMILY_PAGE, 0, FALSE, bColumn, pActShell); + Edit( rPage, aEmptyStr, SFX_STYLE_FAMILY_PAGE, 0, sal_False, bColumn, pActShell); } Bitmap SwDocShell::GetStyleFamilyBitmap( SfxStyleFamily eFamily ) diff --git a/sw/source/ui/app/docstyle.cxx b/sw/source/ui/app/docstyle.cxx index 1496cd0a32..6a9b7b8fe1 100644 --- a/sw/source/ui/app/docstyle.cxx +++ b/sw/source/ui/app/docstyle.cxx @@ -52,6 +52,7 @@ #include <docary.hxx> #include <ccoll.hxx> #include <doc.hxx> +#include <IDocumentUndoRedo.hxx> #include <cmdid.h> #include <swstyle.h> #include <app.hrc> @@ -65,7 +66,6 @@ #include <fmthdft.hxx> #include <svx/svxids.hrc> #include <SwRewriter.hxx> -#include <undobj.hxx> // The Format names in the list of all names have the // following family as their first character: @@ -125,7 +125,7 @@ SwImplShellAction::~SwImplShellAction() SwCharFmt* lcl_FindCharFmt( SwDoc& rDoc, const String& rName, SwDocStyleSheet* pStyle = 0, - BOOL bCreate = TRUE ) + sal_Bool bCreate = sal_True ) { SwCharFmt* pFmt = 0; if( rName.Len() ) @@ -140,7 +140,7 @@ SwCharFmt* lcl_FindCharFmt( SwDoc& rDoc, if( !pFmt && bCreate ) { // explore Pool - const USHORT nId = SwStyleNameMapper::GetPoolIdFromUIName(rName, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT); + const sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName(rName, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT); if(nId != USHRT_MAX) pFmt = rDoc.GetCharFmtFromPool(nId); } @@ -149,7 +149,7 @@ SwCharFmt* lcl_FindCharFmt( SwDoc& rDoc, { if(pFmt) { - pStyle->SetPhysical(TRUE); + pStyle->SetPhysical(sal_True); SwFmt* p = pFmt->DerivedFrom(); if( p && !p->IsDefault() ) pStyle->PresetParent( p->GetName() ); @@ -157,7 +157,7 @@ SwCharFmt* lcl_FindCharFmt( SwDoc& rDoc, pStyle->PresetParent( aEmptyStr ); } else - pStyle->SetPhysical(FALSE); + pStyle->SetPhysical(sal_False); } return pFmt; } @@ -171,7 +171,7 @@ SwCharFmt* lcl_FindCharFmt( SwDoc& rDoc, SwTxtFmtColl* lcl_FindParaFmt( SwDoc& rDoc, const String& rName, SwDocStyleSheet* pStyle = 0, - BOOL bCreate = TRUE ) + sal_Bool bCreate = sal_True ) { SwTxtFmtColl* pColl = 0; @@ -180,7 +180,7 @@ SwTxtFmtColl* lcl_FindParaFmt( SwDoc& rDoc, pColl = rDoc.FindTxtFmtCollByName( rName ); if( !pColl && bCreate ) { // explore Pool - const USHORT nId = SwStyleNameMapper::GetPoolIdFromUIName(rName, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL); + const sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName(rName, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL); if(nId != USHRT_MAX) pColl = rDoc.GetTxtCollFromPool(nId); } @@ -190,7 +190,7 @@ SwTxtFmtColl* lcl_FindParaFmt( SwDoc& rDoc, { if(pColl) { - pStyle->SetPhysical(TRUE); + pStyle->SetPhysical(sal_True); if( pColl->DerivedFrom() && !pColl->DerivedFrom()->IsDefault() ) pStyle->PresetParent( pColl->DerivedFrom()->GetName() ); else @@ -200,7 +200,7 @@ SwTxtFmtColl* lcl_FindParaFmt( SwDoc& rDoc, pStyle->PresetFollow(rNext.GetName()); } else - pStyle->SetPhysical(FALSE); + pStyle->SetPhysical(sal_False); } return pColl; } @@ -214,7 +214,7 @@ SwTxtFmtColl* lcl_FindParaFmt( SwDoc& rDoc, SwFrmFmt* lcl_FindFrmFmt( SwDoc& rDoc, const String& rName, SwDocStyleSheet* pStyle = 0, - BOOL bCreate = TRUE ) + sal_Bool bCreate = sal_True ) { SwFrmFmt* pFmt = 0; if( rName.Len() ) @@ -222,7 +222,7 @@ SwFrmFmt* lcl_FindFrmFmt( SwDoc& rDoc, pFmt = rDoc.FindFrmFmtByName( rName ); if( !pFmt && bCreate ) { // explore Pool - const USHORT nId = SwStyleNameMapper::GetPoolIdFromUIName(rName, nsSwGetPoolIdFromName::GET_POOLID_FRMFMT); + const sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName(rName, nsSwGetPoolIdFromName::GET_POOLID_FRMFMT); if(nId != USHRT_MAX) pFmt = rDoc.GetFrmFmtFromPool(nId); } @@ -232,14 +232,14 @@ SwFrmFmt* lcl_FindFrmFmt( SwDoc& rDoc, { if(pFmt) { - pStyle->SetPhysical(TRUE); + pStyle->SetPhysical(sal_True); if( pFmt->DerivedFrom() && !pFmt->DerivedFrom()->IsDefault() ) pStyle->PresetParent( pFmt->DerivedFrom()->GetName() ); else pStyle->PresetParent( aEmptyStr ); } else - pStyle->SetPhysical(FALSE); + pStyle->SetPhysical(sal_False); } return pFmt; } @@ -252,7 +252,7 @@ SwFrmFmt* lcl_FindFrmFmt( SwDoc& rDoc, const SwPageDesc* lcl_FindPageDesc( SwDoc& rDoc, const String& rName, SwDocStyleSheet* pStyle = 0, - BOOL bCreate = TRUE ) + sal_Bool bCreate = sal_True ) { const SwPageDesc* pDesc = 0; @@ -261,7 +261,7 @@ const SwPageDesc* lcl_FindPageDesc( SwDoc& rDoc, pDesc = rDoc.FindPageDescByName( rName ); if( !pDesc && bCreate ) { - USHORT nId = SwStyleNameMapper::GetPoolIdFromUIName(rName, nsSwGetPoolIdFromName::GET_POOLID_PAGEDESC); + sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName(rName, nsSwGetPoolIdFromName::GET_POOLID_PAGEDESC); if(nId != USHRT_MAX) pDesc = rDoc.GetPageDescFromPool(nId); } @@ -271,14 +271,14 @@ const SwPageDesc* lcl_FindPageDesc( SwDoc& rDoc, { if(pDesc) { - pStyle->SetPhysical(TRUE); + pStyle->SetPhysical(sal_True); if(pDesc->GetFollow()) pStyle->PresetFollow(pDesc->GetFollow()->GetName()); else pStyle->PresetParent( aEmptyStr ); } else - pStyle->SetPhysical(FALSE); + pStyle->SetPhysical(sal_False); } return pDesc; } @@ -286,7 +286,7 @@ const SwPageDesc* lcl_FindPageDesc( SwDoc& rDoc, const SwNumRule* lcl_FindNumRule( SwDoc& rDoc, const String& rName, SwDocStyleSheet* pStyle = 0, - BOOL bCreate = TRUE ) + sal_Bool bCreate = sal_True ) { const SwNumRule* pRule = 0; @@ -295,7 +295,7 @@ const SwNumRule* lcl_FindNumRule( SwDoc& rDoc, pRule = rDoc.FindNumRulePtr( rName ); if( !pRule && bCreate ) { - USHORT nId = SwStyleNameMapper::GetPoolIdFromUIName(rName, nsSwGetPoolIdFromName::GET_POOLID_NUMRULE); + sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName(rName, nsSwGetPoolIdFromName::GET_POOLID_NUMRULE); if(nId != USHRT_MAX) pRule = rDoc.GetNumRuleFromPool(nId); } @@ -305,17 +305,17 @@ const SwNumRule* lcl_FindNumRule( SwDoc& rDoc, { if(pRule) { - pStyle->SetPhysical(TRUE); + pStyle->SetPhysical(sal_True); pStyle->PresetParent( aEmptyStr ); } else - pStyle->SetPhysical(FALSE); + pStyle->SetPhysical(sal_False); } return pRule; } -USHORT lcl_FindName( const SwPoolFmtList& rLst, SfxStyleFamily eFam, +sal_uInt16 lcl_FindName( const SwPoolFmtList& rLst, SfxStyleFamily eFam, const String& rName ) { if( rLst.Count() ) @@ -331,30 +331,30 @@ USHORT lcl_FindName( const SwPoolFmtList& rLst, SfxStyleFamily eFam, default:; //prevent warning } sSrch += rName; - for( USHORT i=0; i < rLst.Count(); ++i ) + for( sal_uInt16 i=0; i < rLst.Count(); ++i ) if( *rLst[i] == sSrch ) return i; } return USHRT_MAX; } -BOOL FindPhyStyle( SwDoc& rDoc, const String& rName, SfxStyleFamily eFam ) +sal_Bool FindPhyStyle( SwDoc& rDoc, const String& rName, SfxStyleFamily eFam ) { switch( eFam ) { case SFX_STYLE_FAMILY_CHAR : - return 0 != lcl_FindCharFmt( rDoc, rName, 0, FALSE ); + return 0 != lcl_FindCharFmt( rDoc, rName, 0, sal_False ); case SFX_STYLE_FAMILY_PARA : - return 0 != lcl_FindParaFmt( rDoc, rName, 0, FALSE ); + return 0 != lcl_FindParaFmt( rDoc, rName, 0, sal_False ); case SFX_STYLE_FAMILY_FRAME: - return 0 != lcl_FindFrmFmt( rDoc, rName, 0, FALSE ); + return 0 != lcl_FindFrmFmt( rDoc, rName, 0, sal_False ); case SFX_STYLE_FAMILY_PAGE : - return 0 != lcl_FindPageDesc( rDoc, rName, 0, FALSE ); + return 0 != lcl_FindPageDesc( rDoc, rName, 0, sal_False ); case SFX_STYLE_FAMILY_PSEUDO: - return 0 != lcl_FindNumRule( rDoc, rName, 0, FALSE ); + return 0 != lcl_FindNumRule( rDoc, rName, 0, sal_False ); default:; //prevent warning } - return FALSE; + return sal_False; } @@ -367,7 +367,7 @@ void SwPoolFmtList::Append( char cChar, const String& rStr ) { String* pStr = new String( cChar ); *pStr += rStr; - for ( USHORT i=0; i < Count(); ++i ) + for ( sal_uInt16 i=0; i < Count(); ++i ) { if( *operator[](i) == *pStr ) { @@ -397,7 +397,7 @@ SwDocStyleSheet::SwDocStyleSheet( SwDoc& rDocument, const String& rName, SwDocStyleSheetPool& _rPool, SfxStyleFamily eFam, - USHORT _nMask) : + sal_uInt16 _nMask) : SfxStyleSheetBase( rName, _rPool, eFam, _nMask ), pCharFmt(0), @@ -427,7 +427,7 @@ SwDocStyleSheet::SwDocStyleSheet( SwDoc& rDocument, SID_PARA_BACKGRND_DESTINATION, SID_ATTR_BRUSH_CHAR, SID_ATTR_NUMBERING_RULE, SID_ATTR_NUMBERING_RULE, 0), - bPhysical(FALSE) + bPhysical(sal_False) { nHelpId = UCHAR_MAX; } @@ -461,7 +461,7 @@ void SwDocStyleSheet::Reset() aName.Erase(); aFollow.Erase(); aParent.Erase(); - SetPhysical(FALSE); + SetPhysical(sal_False); } /*-------------------------------------------------------------------- @@ -502,7 +502,7 @@ const String& SwDocStyleSheet::GetParent() const String sTmp; if( !pFmt ) // not yet there, so default Parent { - USHORT i = SwStyleNameMapper::GetPoolIdFromUIName( aName, eGetType ); + sal_uInt16 i = SwStyleNameMapper::GetPoolIdFromUIName( aName, eGetType ); i = ::GetPoolParent( i ); if( i && USHRT_MAX != i ) SwStyleNameMapper::FillUIName( i, sTmp ); @@ -539,19 +539,19 @@ const String& SwDocStyleSheet::GetFollow() const --------------------------------------------------------------------*/ -BOOL SwDocStyleSheet::HasFollowSupport() const +sal_Bool SwDocStyleSheet::HasFollowSupport() const { switch(nFamily) { case SFX_STYLE_FAMILY_PARA : - case SFX_STYLE_FAMILY_PAGE : return TRUE; + case SFX_STYLE_FAMILY_PAGE : return sal_True; case SFX_STYLE_FAMILY_FRAME: case SFX_STYLE_FAMILY_CHAR : - case SFX_STYLE_FAMILY_PSEUDO: return FALSE; + case SFX_STYLE_FAMILY_PSEUDO: return sal_False; default: OSL_ENSURE(!this, "unknown style family"); } - return FALSE; + return sal_False; } /*-------------------------------------------------------------------- @@ -559,28 +559,28 @@ BOOL SwDocStyleSheet::HasFollowSupport() const --------------------------------------------------------------------*/ -BOOL SwDocStyleSheet::HasParentSupport() const +sal_Bool SwDocStyleSheet::HasParentSupport() const { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; switch(nFamily) { case SFX_STYLE_FAMILY_CHAR : case SFX_STYLE_FAMILY_PARA : - case SFX_STYLE_FAMILY_FRAME: bRet = TRUE; + case SFX_STYLE_FAMILY_FRAME: bRet = sal_True; default:; //prevent warning } return bRet; } -BOOL SwDocStyleSheet::HasClearParentSupport() const +sal_Bool SwDocStyleSheet::HasClearParentSupport() const { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; switch(nFamily) { case SFX_STYLE_FAMILY_PARA : case SFX_STYLE_FAMILY_CHAR : - case SFX_STYLE_FAMILY_FRAME: bRet = TRUE; + case SFX_STYLE_FAMILY_FRAME: bRet = sal_True; default:; //prevent warning } return bRet; @@ -646,8 +646,8 @@ String SwDocStyleSheet::GetDescription(SfxMapUnit eUnit) const SfxPoolItem* pItem = aIter.FirstItem(); String sPageNum, sModel, sBreak; - BOOL bHasWesternFontPrefix = FALSE; - BOOL bHasCJKFontPrefix = FALSE; + sal_Bool bHasWesternFontPrefix = sal_False; + sal_Bool bHasCJKFontPrefix = sal_False; SvtCJKOptions aCJKOptions; while ( pItem ) @@ -673,7 +673,7 @@ String SwDocStyleSheet::GetDescription(SfxMapUnit eUnit) *pItem, SFX_ITEM_PRESENTATION_COMPLETE, eUnit, aItemPresentation, &aIntlWrapper ) ) { - BOOL bIsDefault = FALSE; + sal_Bool bIsDefault = sal_False; switch ( pItem->Which() ) { case SID_ATTR_PARA_PAGENUM: @@ -691,11 +691,11 @@ String SwDocStyleSheet::GetDescription(SfxMapUnit eUnit) case RES_CHRATR_CJK_POSTURE: case RES_CHRATR_CJK_WEIGHT: if(aCJKOptions.IsCJKFontEnabled()) - bIsDefault = TRUE; + bIsDefault = sal_True; if(!bHasCJKFontPrefix) { aItemPresentation.Insert(SW_RESSTR(STR_CJK_FONT), 0); - bHasCJKFontPrefix = TRUE; + bHasCJKFontPrefix = sal_True; } break; case RES_CHRATR_FONT: @@ -706,12 +706,12 @@ String SwDocStyleSheet::GetDescription(SfxMapUnit eUnit) if(!bHasWesternFontPrefix) { aItemPresentation.Insert(SW_RESSTR(STR_WESTERN_FONT), 0); - bHasWesternFontPrefix = TRUE; - bIsDefault = TRUE; + bHasWesternFontPrefix = sal_True; + bIsDefault = sal_True; } // no break; default: - bIsDefault = TRUE; + bIsDefault = sal_True; } if(bIsDefault) { @@ -766,20 +766,20 @@ String SwDocStyleSheet::GetDescription() --------------------------------------------------------------------*/ -BOOL SwDocStyleSheet::SetName( const String& rStr) +sal_Bool SwDocStyleSheet::SetName( const String& rStr) { if( !rStr.Len() ) - return FALSE; + return sal_False; if( aName != rStr ) { if( !SfxStyleSheetBase::SetName( rStr )) - return FALSE; + return sal_False; } else if(!bPhysical) FillStyleSheet( FillPhysical ); - int bChg = FALSE; + int bChg = sal_False; switch(nFamily) { case SFX_STYLE_FAMILY_CHAR : @@ -788,7 +788,7 @@ BOOL SwDocStyleSheet::SetName( const String& rStr) if( pCharFmt && pCharFmt->GetName() != rStr ) { pCharFmt->SetName( rStr ); - bChg = TRUE; + bChg = sal_True; } break; } @@ -802,7 +802,7 @@ BOOL SwDocStyleSheet::SetName( const String& rStr) else pColl->SetName(rStr); - bChg = TRUE; + bChg = sal_True; } break; } @@ -816,7 +816,7 @@ BOOL SwDocStyleSheet::SetName( const String& rStr) else pFrmFmt->SetName( rStr ); - bChg = TRUE; + bChg = sal_True; } break; } @@ -831,14 +831,14 @@ BOOL SwDocStyleSheet::SetName( const String& rStr) String aOldName(aPageDesc.GetName()); aPageDesc.SetName( rStr ); - BOOL bDoesUndo = rDoc.DoesUndo(); + bool const bDoesUndo = rDoc.GetIDocumentUndoRedo().DoesUndo(); - rDoc.DoUndo(aOldName.Len() > 0); + rDoc.GetIDocumentUndoRedo().DoUndo(aOldName.Len() > 0); rDoc.ChgPageDesc(aOldName, aPageDesc); - rDoc.DoUndo(bDoesUndo); + rDoc.GetIDocumentUndoRedo().DoUndo(bDoesUndo); rDoc.SetModified(); - bChg = TRUE; + bChg = sal_True; } break; case SFX_STYLE_FAMILY_PSEUDO: @@ -856,7 +856,7 @@ BOOL SwDocStyleSheet::SetName( const String& rStr) pNumRule = rDoc.FindNumRulePtr(rStr); rDoc.SetModified(); - bChg = TRUE; + bChg = sal_True; } } else @@ -865,7 +865,7 @@ BOOL SwDocStyleSheet::SetName( const String& rStr) ((SwNumRule*)pNumRule)->SetName( rStr, rDoc ); rDoc.SetModified(); - bChg = TRUE; + bChg = sal_True; } } @@ -883,7 +883,7 @@ BOOL SwDocStyleSheet::SetName( const String& rStr) if( pSh ) pSh->CallChgLnk(); } - return TRUE; + return sal_True; } /*-------------------------------------------------------------------- @@ -891,7 +891,7 @@ BOOL SwDocStyleSheet::SetName( const String& rStr) --------------------------------------------------------------------*/ -BOOL SwDocStyleSheet::SetParent( const String& rStr) +sal_Bool SwDocStyleSheet::SetParent( const String& rStr) { SwFmt* pFmt = 0, *pParent = 0; switch(nFamily) @@ -921,7 +921,7 @@ BOOL SwDocStyleSheet::SetParent( const String& rStr) OSL_ENSURE(!this, "unknown style family"); } - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; if( pFmt && pFmt->DerivedFrom() && pFmt->DerivedFrom()->GetName() != rStr ) { @@ -946,10 +946,10 @@ BOOL SwDocStyleSheet::SetParent( const String& rStr) --------------------------------------------------------------------*/ -BOOL SwDocStyleSheet::SetFollow( const String& rStr) +sal_Bool SwDocStyleSheet::SetFollow( const String& rStr) { if( rStr.Len() && !SfxStyleSheetBase::SetFollow( rStr )) - return FALSE; + return sal_False; SwImplShellAction aTmpSh( rDoc ); switch(nFamily) @@ -975,7 +975,7 @@ BOOL SwDocStyleSheet::SetFollow( const String& rStr) const SwPageDesc* pFollowDesc = rStr.Len() ? lcl_FindPageDesc(rDoc, rStr) : 0; - USHORT nId; + sal_uInt16 nId; if( pFollowDesc != pDesc->GetFollow() && rDoc.FindPageDescByName( pDesc->GetName(), &nId ) ) { @@ -995,7 +995,7 @@ BOOL SwDocStyleSheet::SetFollow( const String& rStr) OSL_ENSURE(!this, "unknwown style family"); } - return TRUE; + return sal_True; } /*-------------------------------------------------------------------- @@ -1022,12 +1022,12 @@ SfxItemSet& SwDocStyleSheet::GetItemSet() case SFX_STYLE_FAMILY_FRAME: { SvxBoxInfoItem aBoxInfo( SID_ATTR_BORDER_INNER ); - aBoxInfo.SetTable( FALSE ); - aBoxInfo.SetDist( TRUE); // always show gap field - aBoxInfo.SetMinDist( TRUE );// set minimum size in tables and paragraphs + aBoxInfo.SetTable( sal_False ); + aBoxInfo.SetDist( sal_True ); // always show gap field + aBoxInfo.SetMinDist( sal_True );// set minimum size in tables and paragraphs aBoxInfo.SetDefDist( MIN_BORDER_DIST );// always set Default-Gap // Single lines can only have DontCare-Status in tables - aBoxInfo.SetValid( VALID_DISABLE, TRUE ); + aBoxInfo.SetValid( VALID_DISABLE, sal_True ); if ( nFamily == SFX_STYLE_FAMILY_PARA ) { OSL_ENSURE(pColl, "Where's Collection"); @@ -1118,16 +1118,16 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet, OSL_ENSURE( &rSet != &aCoreSet, "SetItemSet with own Set is not allowed" ); - if ( rDoc.DoesUndo() ) + if (rDoc.GetIDocumentUndoRedo().DoesUndo()) { SwRewriter aRewriter; aRewriter.AddRule( UNDO_ARG1, GetName() ); - rDoc.StartUndo( UNDO_INSFMTATTR, &aRewriter ); + rDoc.GetIDocumentUndoRedo().StartUndo( UNDO_INSFMTATTR, &aRewriter ); } SwFmt* pFmt = 0; SwPageDesc* pNewDsc = 0; - USHORT nPgDscPos = 0; + sal_uInt16 nPgDscPos = 0; switch(nFamily) { @@ -1142,13 +1142,13 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet, { OSL_ENSURE(pColl, "Where's Collection"); const SfxPoolItem* pAutoUpdate; - if(SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_AUTO_STYLE_UPDATE,FALSE, &pAutoUpdate )) + if(SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_AUTO_STYLE_UPDATE,sal_False, &pAutoUpdate )) { pColl->SetAutoUpdateFmt(((const SfxBoolItem*)pAutoUpdate)->GetValue()); } const SwCondCollItem* pCondItem; - if( SFX_ITEM_SET != rSet.GetItemState( FN_COND_COLL, FALSE, + if( SFX_ITEM_SET != rSet.GetItemState( FN_COND_COLL, sal_False, (const SfxPoolItem**)&pCondItem )) pCondItem = 0; @@ -1156,13 +1156,13 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet, { SwFmt* pFindFmt; const CommandStruct* pCmds = SwCondCollItem::GetCmds(); - for(USHORT i = 0; i < COND_COMMAND_COUNT; i++) + for(sal_uInt16 i = 0; i < COND_COMMAND_COUNT; i++) { SwCollCondition aCond( 0, pCmds[ i ].nCnd, pCmds[ i ].nSubCond ); ((SwConditionTxtFmtColl*)pColl)->RemoveCondition( aCond ); const String& rStyle = pCondItem->GetStyle( i ); if( rStyle.Len() && - 0 != ( pFindFmt = lcl_FindParaFmt( rDoc, rStyle, 0, TRUE ))) + 0 != ( pFindFmt = lcl_FindParaFmt( rDoc, rStyle, 0, sal_True ))) { pFindFmt->Add( &aCond ); ((SwConditionTxtFmtColl*)pColl)->InsertCondition( aCond ); @@ -1191,11 +1191,11 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet, SwTxtFmtColl* pFindFmt; const CommandStruct* pCmds = SwCondCollItem::GetCmds(); - for( USHORT i = 0; i < COND_COMMAND_COUNT; ++i ) + for( sal_uInt16 i = 0; i < COND_COMMAND_COUNT; ++i ) { const String& rStyle = pCondItem->GetStyle( i ); if( rStyle.Len() && - 0 != ( pFindFmt = lcl_FindParaFmt( rDoc, rStyle, 0, TRUE ))) + 0 != ( pFindFmt = lcl_FindParaFmt( rDoc, rStyle, 0, sal_True ))) { pCColl->InsertCondition( SwCollCondition( pFindFmt, pCmds[ i ].nCnd, pCmds[ i ].nSubCond ) ); @@ -1206,9 +1206,9 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet, pColl = pCColl; } if ( bResetIndentAttrsAtParagraphStyle && - rSet.GetItemState( RES_PARATR_NUMRULE, FALSE, 0 ) == SFX_ITEM_SET && - rSet.GetItemState( RES_LR_SPACE, FALSE, 0 ) != SFX_ITEM_SET && - pColl->GetItemState( RES_LR_SPACE, FALSE, 0 ) == SFX_ITEM_SET ) + rSet.GetItemState( RES_PARATR_NUMRULE, sal_False, 0 ) == SFX_ITEM_SET && + rSet.GetItemState( RES_LR_SPACE, sal_False, 0 ) != SFX_ITEM_SET && + pColl->GetItemState( RES_LR_SPACE, sal_False, 0 ) == SFX_ITEM_SET ) { rDoc.ResetAttrAtFormat( RES_LR_SPACE, *pColl ); } @@ -1218,7 +1218,7 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet, // neither the paragraph style nor the numbering style is used in the document // the numbering style will not be saved with the document and the assignment got lost. const SfxPoolItem* pNumRuleItem = 0; - if( SFX_ITEM_SET == rSet.GetItemState( RES_PARATR_NUMRULE, FALSE, &pNumRuleItem ) ) + if( SFX_ITEM_SET == rSet.GetItemState( RES_PARATR_NUMRULE, sal_False, &pNumRuleItem ) ) { // Setting a numbering rule? String sNumRule = ((SwNumRuleItem*)pNumRuleItem)->GetValue(); if( sNumRule.Len() ) @@ -1226,7 +1226,7 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet, SwNumRule* pRule = rDoc.FindNumRulePtr( sNumRule ); if( !pRule ) { // Numbering rule not in use yet. - USHORT nPoolId = SwStyleNameMapper::GetPoolIdFromUIName( sNumRule, nsSwGetPoolIdFromName::GET_POOLID_NUMRULE ); + sal_uInt16 nPoolId = SwStyleNameMapper::GetPoolIdFromUIName( sNumRule, nsSwGetPoolIdFromName::GET_POOLID_NUMRULE ); if( USHRT_MAX != nPoolId ) // It's a standard numbering rule { pRule = rDoc.GetNumRuleFromPool( nPoolId ); // Create numbering rule (physical) @@ -1237,7 +1237,7 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet, pFmt = pColl; - USHORT nId = pColl->GetPoolFmtId() & + sal_uInt16 nId = pColl->GetPoolFmtId() & ~ ( COLL_GET_RANGE_BITS | POOLGRP_NOCOLLID ); switch( GetMask() & ( 0x0fff & ~SWSTYLEBIT_CONDCOLL ) ) { @@ -1267,7 +1267,7 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet, { OSL_ENSURE(pFrmFmt, "Where's FrmFmt"); const SfxPoolItem* pAutoUpdate; - if(SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_AUTO_STYLE_UPDATE,FALSE, &pAutoUpdate )) + if(SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_AUTO_STYLE_UPDATE,sal_False, &pAutoUpdate )) { pFrmFmt->SetAutoUpdateFmt(((const SfxBoolItem*)pAutoUpdate)->GetValue()); } @@ -1284,10 +1284,8 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet, pNewDsc = new SwPageDesc( *pDesc ); // --> OD 2005-05-09 #i48949# - no undo actions for the // copy of the page style - const sal_Bool bDoesUndo( rDoc.DoesUndo() ); - rDoc.DoUndo( sal_False ); + ::sw::UndoGuard const ug(rDoc.GetIDocumentUndoRedo()); rDoc.CopyPageDesc(*pDesc, *pNewDsc); // #i7983# - rDoc.DoUndo( bDoesUndo ); // <-- pFmt = &pNewDsc->GetMaster(); @@ -1303,7 +1301,7 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet, break; const SfxPoolItem* pItem; - switch( rSet.GetItemState( SID_ATTR_NUMBERING_RULE, FALSE, &pItem )) + switch( rSet.GetItemState( SID_ATTR_NUMBERING_RULE, sal_False, &pItem )) { case SFX_ITEM_SET: { @@ -1336,7 +1334,7 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet, { SfxItemIter aIter( rSet ); const SfxPoolItem* pItem = aIter.GetCurItem(); - while( TRUE ) + while( sal_True ) { if( IsInvalidItem( pItem ) ) // Clear { @@ -1376,13 +1374,13 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet, } } - if ( rDoc.DoesUndo() ) + if (rDoc.GetIDocumentUndoRedo().DoesUndo()) { - rDoc.EndUndo( UNDO_INSFMTATTR, NULL ); + rDoc.GetIDocumentUndoRedo().EndUndo(UNDO_END, 0); } } -void lcl_SaveStyles( USHORT nFamily, SvPtrarr& rArr, SwDoc& rDoc ) +void lcl_SaveStyles( sal_uInt16 nFamily, SvPtrarr& rArr, SwDoc& rDoc ) { switch( nFamily ) { @@ -1441,7 +1439,7 @@ void lcl_SaveStyles( USHORT nFamily, SvPtrarr& rArr, SwDoc& rDoc ) } } -void lcl_DeleteInfoStyles( USHORT nFamily, SvPtrarr& rArr, SwDoc& rDoc ) +void lcl_DeleteInfoStyles( sal_uInt16 nFamily, SvPtrarr& rArr, SwDoc& rDoc ) { sal_uInt16 n, nCnt; switch( nFamily ) @@ -1528,15 +1526,15 @@ void lcl_DeleteInfoStyles( USHORT nFamily, SvPtrarr& rArr, SwDoc& rDoc ) Description: determine the format --------------------------------------------------------------------*/ -BOOL SwDocStyleSheet::FillStyleSheet( FillStyleType eFType ) +sal_Bool SwDocStyleSheet::FillStyleSheet( FillStyleType eFType ) { - BOOL bRet = FALSE; - USHORT nPoolId = USHRT_MAX; + sal_Bool bRet = sal_False; + sal_uInt16 nPoolId = USHRT_MAX; SwFmt* pFmt = 0; - BOOL bCreate = FillPhysical == eFType; - BOOL bDeleteInfo = FALSE; - BOOL bFillOnlyInfo = FillAllInfo == eFType; + sal_Bool bCreate = FillPhysical == eFType; + sal_Bool bDeleteInfo = sal_False; + sal_Bool bFillOnlyInfo = FillAllInfo == eFType; SvPtrarr aDelArr; switch(nFamily) @@ -1546,9 +1544,9 @@ BOOL SwDocStyleSheet::FillStyleSheet( FillStyleType eFType ) bPhysical = 0 != pCharFmt; if( bFillOnlyInfo && !bPhysical ) { - bDeleteInfo = TRUE; - ::lcl_SaveStyles( static_cast< USHORT >(nFamily), aDelArr, rDoc ); - pCharFmt = lcl_FindCharFmt(rDoc, aName, this, TRUE ); + bDeleteInfo = sal_True; + ::lcl_SaveStyles( static_cast< sal_uInt16 >(nFamily), aDelArr, rDoc ); + pCharFmt = lcl_FindCharFmt(rDoc, aName, this, sal_True ); } pFmt = pCharFmt; @@ -1573,9 +1571,9 @@ BOOL SwDocStyleSheet::FillStyleSheet( FillStyleType eFType ) bPhysical = 0 != pColl; if( bFillOnlyInfo && !bPhysical ) { - bDeleteInfo = TRUE; - ::lcl_SaveStyles( static_cast< USHORT >(nFamily), aDelArr, rDoc ); - pColl = lcl_FindParaFmt(rDoc, aName, this, TRUE ); + bDeleteInfo = sal_True; + ::lcl_SaveStyles( static_cast< sal_uInt16 >(nFamily), aDelArr, rDoc ); + pColl = lcl_FindParaFmt(rDoc, aName, this, sal_True ); } pFmt = pColl; @@ -1596,9 +1594,9 @@ BOOL SwDocStyleSheet::FillStyleSheet( FillStyleType eFType ) bPhysical = 0 != pFrmFmt; if( bFillOnlyInfo && bPhysical ) { - bDeleteInfo = TRUE; - ::lcl_SaveStyles( static_cast< USHORT >(nFamily), aDelArr, rDoc ); - pFrmFmt = lcl_FindFrmFmt(rDoc, aName, this, TRUE ); + bDeleteInfo = sal_True; + ::lcl_SaveStyles( static_cast< sal_uInt16 >(nFamily), aDelArr, rDoc ); + pFrmFmt = lcl_FindFrmFmt(rDoc, aName, this, sal_True ); } pFmt = pFrmFmt; if( !bCreate && !pFmt ) @@ -1615,9 +1613,9 @@ BOOL SwDocStyleSheet::FillStyleSheet( FillStyleType eFType ) bPhysical = 0 != pDesc; if( bFillOnlyInfo && !pDesc ) { - bDeleteInfo = TRUE; - ::lcl_SaveStyles( static_cast< USHORT >(nFamily), aDelArr, rDoc ); - pDesc = lcl_FindPageDesc( rDoc, aName, this, TRUE ); + bDeleteInfo = sal_True; + ::lcl_SaveStyles( static_cast< sal_uInt16 >(nFamily), aDelArr, rDoc ); + pDesc = lcl_FindPageDesc( rDoc, aName, this, sal_True ); } if( pDesc ) @@ -1643,9 +1641,9 @@ BOOL SwDocStyleSheet::FillStyleSheet( FillStyleType eFType ) bPhysical = 0 != pNumRule; if( bFillOnlyInfo && !pNumRule ) { - bDeleteInfo = TRUE; - ::lcl_SaveStyles( static_cast< USHORT >(nFamily), aDelArr, rDoc ); - pNumRule = lcl_FindNumRule( rDoc, aName, this, TRUE ); + bDeleteInfo = sal_True; + ::lcl_SaveStyles( static_cast< sal_uInt16 >(nFamily), aDelArr, rDoc ); + pNumRule = lcl_FindNumRule( rDoc, aName, this, sal_True ); } if( pNumRule ) @@ -1676,7 +1674,7 @@ BOOL SwDocStyleSheet::FillStyleSheet( FillStyleType eFType ) if( pFmt ) nPoolId = pFmt->GetPoolFmtId(); - USHORT _nMask = 0; + sal_uInt16 _nMask = 0; if( pFmt == rDoc.GetDfltCharFmt() ) _nMask |= SFXSTYLEBIT_READONLY; else if( USER_FMT & nPoolId ) @@ -1709,7 +1707,7 @@ BOOL SwDocStyleSheet::FillStyleSheet( FillStyleType eFType ) SetMask( _nMask ); } if( bDeleteInfo && bFillOnlyInfo ) - ::lcl_DeleteInfoStyles( static_cast< USHORT >(nFamily), aDelArr, rDoc ); + ::lcl_DeleteInfoStyles( static_cast< sal_uInt16 >(nFamily), aDelArr, rDoc ); return bRet; } @@ -1727,7 +1725,7 @@ void SwDocStyleSheet::Create() if( !pCharFmt ) pCharFmt = rDoc.MakeCharFmt(aName, rDoc.GetDfltCharFmt()); - pCharFmt->SetAuto( FALSE ); + pCharFmt->SetAuto( sal_False ); break; case SFX_STYLE_FAMILY_PARA : @@ -1745,7 +1743,7 @@ void SwDocStyleSheet::Create() case SFX_STYLE_FAMILY_FRAME: pFrmFmt = lcl_FindFrmFmt( rDoc, aName ); if( !pFrmFmt ) - pFrmFmt = rDoc.MakeFrmFmt(aName, rDoc.GetDfltFrmFmt(), FALSE, FALSE); + pFrmFmt = rDoc.MakeFrmFmt(aName, rDoc.GetDfltFrmFmt(), sal_False, sal_False); break; @@ -1753,7 +1751,7 @@ void SwDocStyleSheet::Create() pDesc = lcl_FindPageDesc( rDoc, aName ); if( !pDesc ) { - USHORT nId = rDoc.MakePageDesc(aName); + sal_uInt16 nId = rDoc.MakePageDesc(aName); pDesc = &const_cast<const SwDoc &>(rDoc).GetPageDesc(nId); } break; @@ -1767,10 +1765,10 @@ void SwDocStyleSheet::Create() sTmpNm = rDoc.GetUniqueNumRuleName(); SwNumRule* pRule = rDoc.GetNumRuleTbl()[ - rDoc.MakeNumRule( sTmpNm, 0, FALSE, + rDoc.MakeNumRule( sTmpNm, 0, sal_False, // #i89178# numfunc::GetDefaultPositionAndSpaceMode() ) ]; - pRule->SetAutoRule( FALSE ); + pRule->SetAutoRule( sal_False ); if( !aName.Len() ) { // #i91400# @@ -1781,7 +1779,7 @@ void SwDocStyleSheet::Create() break; default:; //prevent warning } - bPhysical = TRUE; + bPhysical = sal_True; aCoreSet.ClearItem(); } @@ -1841,7 +1839,7 @@ void SwDocStyleSheet::PresetNameAndFamily(const String& rName) --------------------------------------------------------------------*/ -void SwDocStyleSheet::SetPhysical(BOOL bPhys) +void SwDocStyleSheet::SetPhysical(sal_Bool bPhys) { bPhysical = bPhys; @@ -1861,7 +1859,7 @@ SwFrmFmt* SwDocStyleSheet::GetFrmFmt() return pFrmFmt; } -BOOL SwDocStyleSheet::IsUsed() const +sal_Bool SwDocStyleSheet::IsUsed() const { if( !bPhysical ) { @@ -1870,7 +1868,7 @@ BOOL SwDocStyleSheet::IsUsed() const } if( !bPhysical ) - return FALSE; + return sal_False; const SwModify* pMod; switch( nFamily ) @@ -1881,22 +1879,22 @@ BOOL SwDocStyleSheet::IsUsed() const case SFX_STYLE_FAMILY_PAGE : pMod = pDesc; break; case SFX_STYLE_FAMILY_PSEUDO: - return pNumRule ? rDoc.IsUsed( *pNumRule ) : FALSE; + return pNumRule ? rDoc.IsUsed( *pNumRule ) : sal_False; default: OSL_ENSURE(!this, "unknown style family"); - return FALSE; + return sal_False; } return rDoc.IsUsed( *pMod ); } -ULONG SwDocStyleSheet::GetHelpId( String& rFile ) +sal_uLong SwDocStyleSheet::GetHelpId( String& rFile ) { static String sTemplateHelpFile = String::CreateFromAscii("swrhlppi.hlp"); - USHORT nId = 0; - USHORT nPoolId = 0; + sal_uInt16 nId = 0; + sal_uInt16 nPoolId = 0; unsigned char nFileId = UCHAR_MAX; rFile = sTemplateHelpFile; @@ -1906,7 +1904,7 @@ static String sTemplateHelpFile = String::CreateFromAscii("swrhlppi.hlp"); { case SFX_STYLE_FAMILY_CHAR : if( !pCharFmt && - 0 == (pCharFmt = lcl_FindCharFmt( rDoc, aName, 0, FALSE )) ) + 0 == (pCharFmt = lcl_FindCharFmt( rDoc, aName, 0, sal_False )) ) { nId = SwStyleNameMapper::GetPoolIdFromUIName( aName, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT ); return USHRT_MAX == nId ? 0 : nId; @@ -1916,7 +1914,7 @@ static String sTemplateHelpFile = String::CreateFromAscii("swrhlppi.hlp"); case SFX_STYLE_FAMILY_PARA: if( !pColl && - 0 == ( pColl = lcl_FindParaFmt( rDoc, aName, 0, FALSE )) ) + 0 == ( pColl = lcl_FindParaFmt( rDoc, aName, 0, sal_False )) ) { nId = SwStyleNameMapper::GetPoolIdFromUIName( aName, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL ); return USHRT_MAX == nId ? 0 : nId; @@ -1926,7 +1924,7 @@ static String sTemplateHelpFile = String::CreateFromAscii("swrhlppi.hlp"); case SFX_STYLE_FAMILY_FRAME: if( !pFrmFmt && - 0 == ( pFrmFmt = lcl_FindFrmFmt( rDoc, aName, 0, FALSE ) ) ) + 0 == ( pFrmFmt = lcl_FindFrmFmt( rDoc, aName, 0, sal_False ) ) ) { nId = SwStyleNameMapper::GetPoolIdFromUIName( aName, nsSwGetPoolIdFromName::GET_POOLID_FRMFMT ); return USHRT_MAX == nId ? 0 : nId; @@ -1936,7 +1934,7 @@ static String sTemplateHelpFile = String::CreateFromAscii("swrhlppi.hlp"); case SFX_STYLE_FAMILY_PAGE: if( !pDesc && - 0 == ( pDesc = lcl_FindPageDesc( rDoc, aName, 0, FALSE ) ) ) + 0 == ( pDesc = lcl_FindPageDesc( rDoc, aName, 0, sal_False ) ) ) { nId = SwStyleNameMapper::GetPoolIdFromUIName( aName, nsSwGetPoolIdFromName::GET_POOLID_PAGEDESC ); return USHRT_MAX == nId ? 0 : nId; @@ -1949,7 +1947,7 @@ static String sTemplateHelpFile = String::CreateFromAscii("swrhlppi.hlp"); case SFX_STYLE_FAMILY_PSEUDO: if( !pNumRule && - 0 == ( pNumRule = lcl_FindNumRule( rDoc, aName, 0, FALSE ) ) ) + 0 == ( pNumRule = lcl_FindNumRule( rDoc, aName, 0, sal_False ) ) ) { nId = SwStyleNameMapper::GetPoolIdFromUIName( aName, nsSwGetPoolIdFromName::GET_POOLID_NUMRULE ); return USHRT_MAX == nId ? 0 : nId; @@ -1993,10 +1991,10 @@ static String sTemplateHelpFile = String::CreateFromAscii("swrhlppi.hlp"); } -void SwDocStyleSheet::SetHelpId( const String& r, ULONG nId ) +void SwDocStyleSheet::SetHelpId( const String& r, sal_uLong nId ) { - BYTE nFileId = static_cast< BYTE >(rDoc.SetDocPattern( r )); - USHORT nHId = static_cast< USHORT >(nId); //!! SFX changed over to ULONG arbitrarily! + sal_uInt8 nFileId = static_cast< sal_uInt8 >(rDoc.SetDocPattern( r )); + sal_uInt16 nHId = static_cast< sal_uInt16 >(nId); //!! SFX changed over to ULONG arbitrarily! SwFmt* pTmpFmt = 0; switch( nFamily ) @@ -2029,7 +2027,7 @@ void SwDocStyleSheet::SetHelpId( const String& r, ULONG nId ) Description: methods for DocStyleSheetPool --------------------------------------------------------------------*/ -SwDocStyleSheetPool::SwDocStyleSheetPool( SwDoc& rDocument, BOOL bOrg ) +SwDocStyleSheetPool::SwDocStyleSheetPool( SwDoc& rDocument, sal_Bool bOrg ) : SfxStyleSheetBasePool( rDocument.GetAttrPool() ) , mxStyleSheet( new SwDocStyleSheet( rDocument, aEmptyStr, *this, SFX_STYLE_FAMILY_CHAR, 0 ) ) , rDoc( rDocument ) @@ -2054,15 +2052,15 @@ void SAL_CALL SwDocStyleSheetPool::release( ) throw () SfxStyleSheetBase& SwDocStyleSheetPool::Make( const String& rName, SfxStyleFamily eFam, - USHORT _nMask, - USHORT /*nPos*/ ) + sal_uInt16 _nMask, + sal_uInt16 /*nPos*/ ) { mxStyleSheet->PresetName(rName); mxStyleSheet->PresetParent(aEmptyStr); mxStyleSheet->PresetFollow(aEmptyStr); mxStyleSheet->SetMask(_nMask) ; mxStyleSheet->SetFamily(eFam); - mxStyleSheet->SetPhysical(TRUE); + mxStyleSheet->SetPhysical(sal_True); mxStyleSheet->Create(); return *mxStyleSheet.get(); @@ -2077,7 +2075,7 @@ SfxStyleSheetBase* SwDocStyleSheetPool::Create( const SfxStyleSheetBase& /*rOr SfxStyleSheetBase* SwDocStyleSheetPool::Create( const String &, - SfxStyleFamily, USHORT ) + SfxStyleFamily, sal_uInt16 ) { OSL_ENSURE( !this, "Create im SW-Stylesheet-Pool geht nicht" ); return NULL; @@ -2110,7 +2108,7 @@ void SwDocStyleSheetPool::Replace( SfxStyleSheetBase& rSource, SwImplShellAction aTmpSh( rDoc ); - BOOL bSwSrcPool = GetAppName() == rSource.GetPool().GetAppName(); + sal_Bool bSwSrcPool = GetAppName() == rSource.GetPool().GetAppName(); if( SFX_STYLE_FAMILY_PAGE == eFamily && bSwSrcPool ) { // deal with separately! @@ -2124,7 +2122,7 @@ void SwDocStyleSheetPool::Replace( SfxStyleSheetBase& rSource, { const SwFmt *pSourceFmt = 0; SwFmt *pTargetFmt = 0; - USHORT nPgDscPos = USHRT_MAX; + sal_uInt16 nPgDscPos = USHRT_MAX; switch( eFamily ) { case SFX_STYLE_FAMILY_CHAR : @@ -2184,7 +2182,7 @@ void SwDocStyleSheetPool::Replace( SfxStyleSheetBase& rSource, } SfxStyleSheetIterator* SwDocStyleSheetPool::CreateIterator( - SfxStyleFamily eFam, USHORT _nMask ) + SfxStyleFamily eFam, sal_uInt16 _nMask ) { return new SwStyleSheetIterator( this, eFam, _nMask ); } @@ -2199,35 +2197,35 @@ void SwDocStyleSheetPool::Remove( SfxStyleSheetBase* pStyle) if( !pStyle ) return; - BOOL bBroadcast = TRUE; + sal_Bool bBroadcast = sal_True; SwImplShellAction aTmpSh( rDoc ); const String& rName = pStyle->GetName(); switch( pStyle->GetFamily() ) { case SFX_STYLE_FAMILY_CHAR: { - SwCharFmt* pFmt = lcl_FindCharFmt(rDoc, rName, 0, FALSE ); + SwCharFmt* pFmt = lcl_FindCharFmt(rDoc, rName, 0, sal_False ); if(pFmt) rDoc.DelCharFmt(pFmt); } break; case SFX_STYLE_FAMILY_PARA: { - SwTxtFmtColl* pColl = lcl_FindParaFmt(rDoc, rName, 0, FALSE ); + SwTxtFmtColl* pColl = lcl_FindParaFmt(rDoc, rName, 0, sal_False ); if(pColl) rDoc.DelTxtFmtColl(pColl); } break; case SFX_STYLE_FAMILY_FRAME: { - SwFrmFmt* pFmt = lcl_FindFrmFmt(rDoc, rName, 0, FALSE ); + SwFrmFmt* pFmt = lcl_FindFrmFmt(rDoc, rName, 0, sal_False ); if(pFmt) rDoc.DelFrmFmt(pFmt); } break; case SFX_STYLE_FAMILY_PAGE : { - USHORT nPos; + sal_uInt16 nPos; if( rDoc.FindPageDescByName( rName, &nPos )) rDoc.DelPageDesc( nPos ); } @@ -2237,13 +2235,13 @@ void SwDocStyleSheetPool::Remove( SfxStyleSheetBase* pStyle) { if( !rDoc.DelNumRule( rName ) ) // Only send Broadcast, when something was deleted - bBroadcast = FALSE; + bBroadcast = sal_False; } break; default: OSL_ENSURE(!this, "unknown style family"); - bBroadcast = FALSE; + bBroadcast = sal_False; } if( bBroadcast ) @@ -2252,7 +2250,7 @@ void SwDocStyleSheetPool::Remove( SfxStyleSheetBase* pStyle) -BOOL SwDocStyleSheetPool::SetParent( SfxStyleFamily eFam, +sal_Bool SwDocStyleSheetPool::SetParent( SfxStyleFamily eFam, const String &rStyle, const String &rParent ) { SwFmt* pFmt = 0, *pParent = 0; @@ -2281,7 +2279,7 @@ BOOL SwDocStyleSheetPool::SetParent( SfxStyleFamily eFam, OSL_ENSURE(!this, "unknown style family"); } - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; if( pFmt && pFmt->DerivedFrom() && pFmt->DerivedFrom()->GetName() != rParent ) { @@ -2310,9 +2308,9 @@ BOOL SwDocStyleSheetPool::SetParent( SfxStyleFamily eFam, } SfxStyleSheetBase* SwDocStyleSheetPool::Find( const String& rName, - SfxStyleFamily eFam, USHORT n ) + SfxStyleFamily eFam, sal_uInt16 n ) { - USHORT nSMask = n; + sal_uInt16 nSMask = n; if( SFX_STYLE_FAMILY_PARA == eFam && rDoc.get(IDocumentSettingAccess::HTML_MODE) ) { // then only HTML-Templates are of interest @@ -2325,14 +2323,14 @@ SfxStyleSheetBase* SwDocStyleSheetPool::Find( const String& rName, nSMask = SWSTYLEBIT_HTML; } - const BOOL bSearchUsed = ( n != SFXSTYLEBIT_ALL && - n & SFXSTYLEBIT_USED ) ? TRUE : FALSE; + const sal_Bool bSearchUsed = ( n != SFXSTYLEBIT_ALL && + n & SFXSTYLEBIT_USED ) ? sal_True : sal_False; const SwModify* pMod = 0; - mxStyleSheet->SetPhysical( FALSE ); + mxStyleSheet->SetPhysical( sal_False ); mxStyleSheet->PresetName( rName ); mxStyleSheet->SetFamily( eFam ); - BOOL bFnd = mxStyleSheet->FillStyleSheet( SwDocStyleSheet::FillOnlyName ); + sal_Bool bFnd = mxStyleSheet->FillStyleSheet( SwDocStyleSheet::FillOnlyName ); if( mxStyleSheet->IsPhysical() ) { @@ -2363,7 +2361,7 @@ SfxStyleSheetBase* SwDocStyleSheetPool::Find( const String& rName, ? !(pRule->GetPoolFmtId() & USER_FMT) // searched for used and found none : bSearchUsed )) - bFnd = FALSE; + bFnd = sal_False; } break; @@ -2375,7 +2373,7 @@ SfxStyleSheetBase* SwDocStyleSheetPool::Find( const String& rName, // then evaluate the mask: if( pMod && !(bSearchUsed && (bOrganizer || rDoc.IsUsed(*pMod)) ) ) { - const USHORT nId = SFX_STYLE_FAMILY_PAGE == eFam + const sal_uInt16 nId = SFX_STYLE_FAMILY_PAGE == eFam ? ((SwPageDesc*)pMod)->GetPoolFmtId() : ((SwFmt*)pMod)->GetPoolFmtId(); @@ -2383,18 +2381,18 @@ SfxStyleSheetBase* SwDocStyleSheetPool::Find( const String& rName, ? !(nId & USER_FMT) // searched for used and found none : bSearchUsed ) - bFnd = FALSE; + bFnd = sal_False; } return bFnd ? mxStyleSheet.get() : 0; } SwStyleSheetIterator::SwStyleSheetIterator( SwDocStyleSheetPool* pBase, - SfxStyleFamily eFam, USHORT n ) + SfxStyleFamily eFam, sal_uInt16 n ) : SfxStyleSheetIterator( pBase, eFam, n ), mxIterSheet( new SwDocStyleSheet( pBase->GetDoc(), aEmptyStr, *pBase, SFX_STYLE_FAMILY_CHAR, 0 ) ), mxStyleSheet( new SwDocStyleSheet( pBase->GetDoc(), aEmptyStr, *pBase, SFX_STYLE_FAMILY_CHAR, 0 ) ) { - bFirstCalled = FALSE; + bFirstCalled = sal_False; nLastPos = 0; StartListening( *pBase ); } @@ -2404,7 +2402,7 @@ SwStyleSheetIterator::SwStyleSheetIterator( SwDocStyleSheetPool* pBase, EndListening( mxIterSheet->GetPool() ); } -USHORT SwStyleSheetIterator::Count() +sal_uInt16 SwStyleSheetIterator::Count() { // let the list fill correctly!! if( !bFirstCalled ) @@ -2412,13 +2410,13 @@ USHORT SwStyleSheetIterator::Count() return aLst.Count(); } -SfxStyleSheetBase* SwStyleSheetIterator::operator[]( USHORT nIdx ) +SfxStyleSheetBase* SwStyleSheetIterator::operator[]( sal_uInt16 nIdx ) { // found if( !bFirstCalled ) First(); mxStyleSheet->PresetNameAndFamily( *aLst[ nIdx ] ); - mxStyleSheet->SetPhysical( FALSE ); + mxStyleSheet->SetPhysical( sal_False ); mxStyleSheet->FillStyleSheet( SwDocStyleSheet::FillOnlyName ); return mxStyleSheet.get(); @@ -2427,7 +2425,7 @@ SfxStyleSheetBase* SwStyleSheetIterator::operator[]( USHORT nIdx ) SfxStyleSheetBase* SwStyleSheetIterator::First() { // Delete old list - bFirstCalled = TRUE; + bFirstCalled = sal_True; nLastPos = 0; aLst.Erase(); @@ -2435,27 +2433,27 @@ SfxStyleSheetBase* SwStyleSheetIterator::First() mxIterSheet->Reset(); SwDoc& rDoc = ((SwDocStyleSheetPool*)pBasePool)->GetDoc(); - const USHORT nSrchMask = nMask; - const BOOL bIsSearchUsed = SearchUsed(); + const sal_uInt16 nSrchMask = nMask; + const sal_Bool bIsSearchUsed = SearchUsed(); - const BOOL bOrganizer = ((SwDocStyleSheetPool*)pBasePool)->IsOrganizerMode(); + const sal_Bool bOrganizer = ((SwDocStyleSheetPool*)pBasePool)->IsOrganizerMode(); if( nSearchFamily == SFX_STYLE_FAMILY_CHAR || nSearchFamily == SFX_STYLE_FAMILY_ALL ) { - const USHORT nArrLen = rDoc.GetCharFmts()->Count(); - for( USHORT i = 0; i < nArrLen; i++ ) + const sal_uInt16 nArrLen = rDoc.GetCharFmts()->Count(); + for( sal_uInt16 i = 0; i < nArrLen; i++ ) { SwCharFmt* pFmt = (*rDoc.GetCharFmts())[ i ]; if( pFmt->IsDefault() && pFmt != rDoc.GetDfltCharFmt() ) continue; - const BOOL bUsed = bIsSearchUsed && (bOrganizer || rDoc.IsUsed(*pFmt)); + const sal_Bool bUsed = bIsSearchUsed && (bOrganizer || rDoc.IsUsed(*pFmt)); if( !bUsed ) { // Standard is no User template - const USHORT nId = rDoc.GetDfltCharFmt() == pFmt ? - USHORT( RES_POOLCHR_INET_NORMAL ): + const sal_uInt16 nId = rDoc.GetDfltCharFmt() == pFmt ? + sal_uInt16( RES_POOLCHR_INET_NORMAL ): pFmt->GetPoolFmtId(); if( (nSrchMask & ~SFXSTYLEBIT_USED) == SFXSTYLEBIT_USERDEF ? !(nId & USER_FMT) @@ -2505,7 +2503,7 @@ SfxStyleSheetBase* SwStyleSheetIterator::First() if( nSearchFamily == SFX_STYLE_FAMILY_PARA || nSearchFamily == SFX_STYLE_FAMILY_ALL ) { - USHORT nSMask = nSrchMask; + sal_uInt16 nSMask = nSrchMask; if( rDoc.get(IDocumentSettingAccess::HTML_MODE) ) { // then only HTML-Template are of interest @@ -2519,18 +2517,18 @@ SfxStyleSheetBase* SwStyleSheetIterator::First() nSMask = SWSTYLEBIT_HTML; } - const USHORT nArrLen = rDoc.GetTxtFmtColls()->Count(); - for( USHORT i = 0; i < nArrLen; i++ ) + const sal_uInt16 nArrLen = rDoc.GetTxtFmtColls()->Count(); + for( sal_uInt16 i = 0; i < nArrLen; i++ ) { SwTxtFmtColl* pColl = (*rDoc.GetTxtFmtColls())[ i ]; if(pColl->IsDefault()) continue; - const BOOL bUsed = bOrganizer || rDoc.IsUsed(*pColl); + const sal_Bool bUsed = bOrganizer || rDoc.IsUsed(*pColl); if( !(bIsSearchUsed && bUsed )) { - const USHORT nId = pColl->GetPoolFmtId(); + const sal_uInt16 nId = pColl->GetPoolFmtId(); switch ( (nSMask & ~SFXSTYLEBIT_USED) ) { case SFXSTYLEBIT_USERDEF: @@ -2559,7 +2557,7 @@ SfxStyleSheetBase* SwStyleSheetIterator::First() if( (nId & COLL_GET_RANGE_BITS) != COLL_HTML_BITS) { // but some we also want to see in this section - BOOL bWeiter = TRUE; + sal_Bool bWeiter = sal_True; switch( nId ) { case RES_POOLCOLL_SENDADRESS: // --> ADDRESS @@ -2576,7 +2574,7 @@ SfxStyleSheetBase* SwStyleSheetIterator::First() case RES_POOLCOLL_STANDARD: // --> P case RES_POOLCOLL_FOOTNOTE: case RES_POOLCOLL_ENDNOTE: - bWeiter = FALSE; + bWeiter = sal_False; break; } if( bWeiter ) @@ -2595,7 +2593,7 @@ SfxStyleSheetBase* SwStyleSheetIterator::First() aLst.Append( cPARA, pColl->GetName() ); } - const BOOL bAll = nSMask == SFXSTYLEBIT_ALL; + const sal_Bool bAll = nSMask == SFXSTYLEBIT_ALL; if ( bAll || (nSMask & ~SFXSTYLEBIT_USED) == SWSTYLEBIT_TEXT ) AppendStyleList(SwStyleNameMapper::GetTextUINameArray(), bIsSearchUsed, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, cPARA ); @@ -2628,7 +2626,7 @@ SfxStyleSheetBase* SwStyleSheetIterator::First() if( !bAll ) { // then also the ones, that we are mapping: - static USHORT aPoolIds[] = { + static sal_uInt16 aPoolIds[] = { RES_POOLCOLL_SENDADRESS, // --> ADDRESS RES_POOLCOLL_TABLE_HDLN, // --> TH RES_POOLCOLL_TABLE, // --> TD @@ -2646,7 +2644,7 @@ SfxStyleSheetBase* SwStyleSheetIterator::First() 0 }; - USHORT* pPoolIds = aPoolIds; + sal_uInt16* pPoolIds = aPoolIds; String s; while( *pPoolIds ) { @@ -2662,8 +2660,8 @@ SfxStyleSheetBase* SwStyleSheetIterator::First() if( nSearchFamily == SFX_STYLE_FAMILY_FRAME || nSearchFamily == SFX_STYLE_FAMILY_ALL ) { - const USHORT nArrLen = rDoc.GetFrmFmts()->Count(); - for( USHORT i = 0; i < nArrLen; i++ ) + const sal_uInt16 nArrLen = rDoc.GetFrmFmts()->Count(); + for( sal_uInt16 i = 0; i < nArrLen; i++ ) { SwFrmFmt* pFmt = (*rDoc.GetFrmFmts())[ i ]; @@ -2672,8 +2670,8 @@ SfxStyleSheetBase* SwStyleSheetIterator::First() continue; } - const USHORT nId = pFmt->GetPoolFmtId(); - BOOL bUsed = bIsSearchUsed && ( bOrganizer || rDoc.IsUsed(*pFmt)); + const sal_uInt16 nId = pFmt->GetPoolFmtId(); + sal_Bool bUsed = bIsSearchUsed && ( bOrganizer || rDoc.IsUsed(*pFmt)); if( !bUsed ) { if( (nSrchMask & ~SFXSTYLEBIT_USED) == SFXSTYLEBIT_USERDEF @@ -2698,13 +2696,13 @@ SfxStyleSheetBase* SwStyleSheetIterator::First() if( nSearchFamily == SFX_STYLE_FAMILY_PAGE || nSearchFamily == SFX_STYLE_FAMILY_ALL ) { - const USHORT nCount = rDoc.GetPageDescCnt(); - for(USHORT i = 0; i < nCount; ++i) + const sal_uInt16 nCount = rDoc.GetPageDescCnt(); + for(sal_uInt16 i = 0; i < nCount; ++i) { const SwPageDesc& rDesc = const_cast<const SwDoc &>(rDoc).GetPageDesc(i); - const USHORT nId = rDesc.GetPoolFmtId(); - BOOL bUsed = bIsSearchUsed && ( bOrganizer || rDoc.IsUsed(rDesc)); + const sal_uInt16 nId = rDesc.GetPoolFmtId(); + sal_Bool bUsed = bIsSearchUsed && ( bOrganizer || rDoc.IsUsed(rDesc)); if( !bUsed ) { if( (nSrchMask & ~SFXSTYLEBIT_USED) == SFXSTYLEBIT_USERDEF @@ -2725,12 +2723,12 @@ SfxStyleSheetBase* SwStyleSheetIterator::First() nSearchFamily == SFX_STYLE_FAMILY_ALL ) { const SwNumRuleTbl& rNumTbl = rDoc.GetNumRuleTbl(); - for(USHORT i = 0; i < rNumTbl.Count(); ++i) + for(sal_uInt16 i = 0; i < rNumTbl.Count(); ++i) { const SwNumRule& rRule = *rNumTbl[ i ]; if( !rRule.IsAutoRule() ) { - BOOL bUsed = bIsSearchUsed && ( bOrganizer || rDoc.IsUsed(rRule) ); + sal_Bool bUsed = bIsSearchUsed && ( bOrganizer || rDoc.IsUsed(rRule) ); if( !bUsed ) { if( (nSrchMask & ~SFXSTYLEBIT_USED) == SFXSTYLEBIT_USERDEF @@ -2762,7 +2760,7 @@ SfxStyleSheetBase* SwStyleSheetIterator::Next() if(aLst.Count() > 0 && nLastPos < aLst.Count()) { mxIterSheet->PresetNameAndFamily(*aLst[nLastPos]); - mxIterSheet->SetPhysical( FALSE ); + mxIterSheet->SetPhysical( sal_False ); mxIterSheet->SetMask( nMask ); if(mxIterSheet->pSet) { @@ -2788,7 +2786,7 @@ SfxStyleSheetBase* SwStyleSheetIterator::Find( const UniString& rName ) // new name is set, so determine its Data mxStyleSheet->FillStyleSheet( SwDocStyleSheet::FillOnlyName ); if( !mxStyleSheet->IsPhysical() ) - mxStyleSheet->SetPhysical( FALSE ); + mxStyleSheet->SetPhysical( sal_False ); return mxStyleSheet.get(); } @@ -2796,16 +2794,16 @@ SfxStyleSheetBase* SwStyleSheetIterator::Find( const UniString& rName ) } void SwStyleSheetIterator::AppendStyleList(const SvStringsDtor& rList, - BOOL bTestUsed, - USHORT nSection, char cType ) + sal_Bool bTestUsed, + sal_uInt16 nSection, char cType ) { if( bTestUsed ) { SwDoc& rDoc = ((SwDocStyleSheetPool*)pBasePool)->GetDoc(); - for ( USHORT i=0; i < rList.Count(); ++i ) + for ( sal_uInt16 i=0; i < rList.Count(); ++i ) { - BOOL bUsed = FALSE; - USHORT nId = SwStyleNameMapper::GetPoolIdFromUIName(*rList[i], (SwGetPoolIdFromName)nSection); + sal_Bool bUsed = sal_False; + sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName(*rList[i], (SwGetPoolIdFromName)nSection); switch ( nSection ) { case nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL: @@ -2827,7 +2825,7 @@ void SwStyleSheetIterator::AppendStyleList(const SvStringsDtor& rList, } } else - for ( USHORT i=0; i < rList.Count(); ++i ) + for ( sal_uInt16 i=0; i < rList.Count(); ++i ) aLst.Append( cType, *rList[i] ); } @@ -2841,7 +2839,7 @@ void SwStyleSheetIterator::Notify( SfxBroadcaster&, const SfxHint& rHint ) if (pStyle) { - USHORT nTmpPos = lcl_FindName( aLst, pStyle->GetFamily(), + sal_uInt16 nTmpPos = lcl_FindName( aLst, pStyle->GetFamily(), pStyle->GetName() ); if( nTmpPos < aLst.Count() ) aLst.DeleteAndDestroy( nTmpPos ); diff --git a/sw/source/ui/app/mainwn.cxx b/sw/source/ui/app/mainwn.cxx index 8af33aca1c..bce152b431 100644 --- a/sw/source/ui/app/mainwn.cxx +++ b/sw/source/ui/app/mainwn.cxx @@ -55,7 +55,7 @@ static SvPtrarr *pProgressContainer = 0; static SwProgress *lcl_SwFindProgress( SwDocShell *pDocShell ) { - for ( USHORT i = 0; i < pProgressContainer->Count(); ++i ) + for ( sal_uInt16 i = 0; i < pProgressContainer->Count(); ++i ) { SwProgress *pTmp = (SwProgress*)(*pProgressContainer)[i]; if ( pTmp->pDocShell == pDocShell ) @@ -65,7 +65,7 @@ static SwProgress *lcl_SwFindProgress( SwDocShell *pDocShell ) } -void StartProgress( USHORT nMessResId, long nStartValue, long nEndValue, +void StartProgress( sal_uInt16 nMessResId, long nStartValue, long nEndValue, SwDocShell *pDocShell ) { if( !SW_MOD()->IsEmbeddedLoadSave() ) @@ -85,8 +85,8 @@ void StartProgress( USHORT nMessResId, long nStartValue, long nEndValue, pProgress->pProgress = new SfxProgress( pDocShell, SW_RESSTR(nMessResId), nEndValue - nStartValue, - FALSE, - TRUE ); + sal_False, + sal_True ); pProgress->nStartCount = 1; pProgress->pDocShell = pDocShell; pProgressContainer->Insert( (void*)pProgress, 0 ); @@ -112,7 +112,7 @@ void EndProgress( SwDocShell *pDocShell ) if( pProgressContainer && !SW_MOD()->IsEmbeddedLoadSave() ) { SwProgress *pProgress = 0; - USHORT i; + sal_uInt16 i; for ( i = 0; i < pProgressContainer->Count(); ++i ) { SwProgress *pTmp = (SwProgress*)(*pProgressContainer)[i]; @@ -138,7 +138,7 @@ void EndProgress( SwDocShell *pDocShell ) } -void SetProgressText( USHORT nId, SwDocShell *pDocShell ) +void SetProgressText( sal_uInt16 nId, SwDocShell *pDocShell ) { if( pProgressContainer && !SW_MOD()->IsEmbeddedLoadSave() ) { diff --git a/sw/source/ui/app/makefile.mk b/sw/source/ui/app/makefile.mk deleted file mode 100644 index 6048ad2ce8..0000000000 --- a/sw/source/ui/app/makefile.mk +++ /dev/null @@ -1,95 +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=app - -LIBTARGET=NO - -# future: DEMO\... - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -SRS1NAME=$(TARGET) -SRC1FILES =\ - app.src \ - mn.src \ - error.src - - -SLOFILES = \ - $(EXCEPTIONSFILES) - -EXCEPTIONSFILES= \ - $(SLO)$/appenv.obj \ - $(SLO)$/apphdl.obj \ - $(SLO)$/applab.obj \ - $(SLO)$/appopt.obj \ - $(SLO)$/docsh.obj \ - $(SLO)$/docsh2.obj \ - $(SLO)$/docshdrw.obj \ - $(SLO)$/docshini.obj \ - $(SLO)$/docst.obj \ - $(SLO)$/docstyle.obj \ - $(SLO)$/mainwn.obj \ - $(SLO)$/swdll.obj \ - $(SLO)$/swmodul1.obj \ - $(SLO)$/swmodule.obj \ - $(SLO)$/swwait.obj - -LIB1TARGET= $(SLB)$/app.lib - -LIB1OBJFILES= \ - $(SLO)$/appenv.obj \ - $(SLO)$/apphdl.obj \ - $(SLO)$/applab.obj \ - $(SLO)$/appopt.obj \ - $(SLO)$/docsh.obj \ - $(SLO)$/docsh2.obj \ - $(SLO)$/docshdrw.obj \ - $(SLO)$/docshini.obj \ - $(SLO)$/docst.obj \ - $(SLO)$/docstyle.obj \ - $(SLO)$/mainwn.obj \ - $(SLO)$/swmodul1.obj \ - $(SLO)$/swwait.obj - - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk - -$(SRS)$/app.srs: $(SOLARINCDIR)$/svx$/globlmn.hrc - diff --git a/sw/source/ui/app/mn.src b/sw/source/ui/app/mn.src index 68c8bbbb83..928304b15b 100644 --- a/sw/source/ui/app/mn.src +++ b/sw/source/ui/app/mn.src @@ -25,7 +25,349 @@ * ************************************************************************/ -#include "swmn.hrc" +#include <svx/dialogs.hrc> +#include <svx/globlmn.hrc> +#include "cmdid.h" +#include "app.hrc" +#include "globals.hrc" +#include "helpid.h" +#include "popup.hrc" + +/* --------------------- F O R M A T --------------------------------- */ +#define SEPARATOR MenuItem { Separator = TRUE; } +//define for ITEM_FORMAT_NUMBERING +#define DEFINE_SLOTID_FOR_NUMBER_BULLETS FN_NUMBER_BULLETS +#define MN_NUMBERING ITEM_FORMAT_NUMBERING + +#define MN_TXT\ + MenuItem\ + {\ + ITEM_FORMAT_CHAR_DLG\ + };\ + MenuItem\ + {\ + ITEM_FORMAT_PARA_DLG\ + };\ + MenuItem\ + {\ + Identifier = FN_FORMAT_PAGE_DLG ; \ + HelpId = CMD_FN_FORMAT_PAGE_DLG ; \ + Text [ en-US ] = "Pa~ge..." ; \ + }; + + +#define MN_TEXT_ATTR\ + MenuItem\ + {\ + ITEM_FORMAT_ATTR_CHAR_FONT\ + };\ + MenuItem\ + {\ + ITEM_FORMAT_ATTR_CHAR_FONTHEIGHT\ + };\ + MenuItem\ + {\ + Identifier = MN_FORMAT_STYLE ; \ + Command = ".uno:StyleMenu" ; \ + Text [ en-US ] = "St~yle" ; \ + SubMenu = Menu\ + {\ + ItemList = \ + {\ + MenuItem\ + {\ + ITEM_FORMAT_ATTR_CHAR_WEIGHT\ + };\ + MenuItem\ + {\ + ITEM_FORMAT_ATTR_CHAR_POSTURE\ + };\ + MenuItem\ + {\ + ITEM_FORMAT_ATTR_CHAR_OVERLINE\ + };\ + MenuItem\ + {\ + ITEM_FORMAT_ATTR_CHAR_UNDERLINE\ + };\ + MenuItem\ + {\ + ITEM_FORMAT_ATTR_CHAR_STRIKEOUT\ + };\ + MenuItem\ + {\ + ITEM_FORMAT_ATTR_CHAR_SHADOWED\ + };\ + MenuItem\ + {\ + ITEM_FORMAT_ATTR_CHAR_CONTOUR\ + };\ + SEPARATOR ; \ + MenuItem\ + {\ + Identifier = FN_SET_SUPER_SCRIPT ; \ + HelpId = CMD_FN_SET_SUPER_SCRIPT ; \ + Text [ en-US ] = "Superscript" ; \ + };\ + MenuItem\ + {\ + Identifier = FN_SET_SUB_SCRIPT ; \ + HelpId = CMD_FN_SET_SUB_SCRIPT ; \ + Text [ en-US ] = "Subscript" ; \ + };\ + };\ + };\ + };\ + MenuItem\ + {\ + Identifier = MN_FORMAT_ALGN ; \ + Command = ".uno:AlignTextMenu" ; \ + Text [ en-US ] = "A~lignment" ; \ + SubMenu = Menu\ + {\ + ItemList = \ + {\ + MenuItem\ + {\ + RadioCheck = TRUE ; \ + ITEM_FORMAT_ATTR_PARA_ADJUST_LEFT\ + };\ + MenuItem\ + {\ + RadioCheck = TRUE ; \ + ITEM_FORMAT_ATTR_PARA_ADJUST_RIGHT\ + };\ + MenuItem\ + {\ + RadioCheck = TRUE ; \ + ITEM_FORMAT_ATTR_PARA_ADJUST_CENTER\ + };\ + MenuItem\ + {\ + Identifier = SID_ATTR_PARA_ADJUST_BLOCK ; \ + HelpId = CMD_SID_ATTR_PARA_ADJUST_BLOCK ; \ + RadioCheck = TRUE ; \ + Text [ en-US ] = "Justified" ; \ + };\ + };\ + };\ + };\ + MenuItem\ + {\ + Identifier = MN_FORMAT_LINESPACE ; \ + Command = ".uno:LineSpacingMenu" ; \ + Text [ en-US ] = "Line Spacing" ; \ + _MenuItemFlags = MIB_RADIOCHECK ; \ + SubMenu = Menu\ + {\ + ItemList = \ + {\ + MenuItem\ + {\ + RadioCheck = TRUE ; \ + ITEM_FORMAT_PARA_LINESPACE_10\ + };\ + MenuItem\ + {\ + RadioCheck = TRUE ; \ + ITEM_FORMAT_PARA_LINESPACE_15\ + };\ + MenuItem\ + {\ + RadioCheck = TRUE ; \ + ITEM_FORMAT_PARA_LINESPACE_20\ + };\ + };\ + };\ + }; + +/* --------------------- M E N U --------------------------------- */ + +/* + + +The application menu bar resource has become obsolete. You can now find the menu bar at the following +location: <project>/uiconfig/[swriter|sweb|sglobal]/menubar/menubar.xml + + +*/ + +/* --------------------- D O C U M E N T -------------------------- */ + + +#define _MN_EDIT_FIELD \ + MenuItem \ + { \ + Identifier = FN_EDIT_FIELD ; \ + HelpId = CMD_FN_EDIT_FIELD ; \ + Text [ en-US ] = "Fields..." ; \ + }; +#define _MN_EDIT_FOOTNOTE \ + MenuItem \ + { \ + Identifier = FN_EDIT_FOOTNOTE ; \ + HelpId = CMD_FN_EDIT_FOOTNOTE ; \ + Text [ en-US ] = "Footnote/Endnote~..." ; \ + }; + #define _MN_EDIT_IDX_ENTRY_DLG \ + MenuItem \ + { \ + Identifier = FN_EDIT_IDX_ENTRY_DLG ; \ + HelpId = CMD_FN_EDIT_IDX_ENTRY_DLG ; \ + Text [ en-US ] = "Inde~x Entry..." ; \ + }; + +#define _MN_EDIT_REDLINE \ + MenuItem \ + { \ + Identifier = FN_REDLINE_ACCEPT_DIRECT; \ + HelpId = CMD_FN_REDLINE_ACCEPT_DIRECT ; \ + Text [ en-US ] = "Accept Change" ; \ + };\ + MenuItem \ + { \ + Identifier = FN_REDLINE_REJECT_DIRECT ; \ + HelpId = CMD_FN_REDLINE_REJECT_DIRECT ; \ + Text [ en-US ] = "Reject Change" ; \ + }; \ + SEPARATOR ; +#define _MN_EDIT_BIB_ENTRY_DLG \ + MenuItem \ + { \ + Identifier = FN_EDIT_AUTH_ENTRY_DLG ; \ + HelpId = CMD_FN_EDIT_AUTH_ENTRY_DLG ; \ + Text [ en-US ] = "~Bibliography Entry..."; \ + }; \ + SEPARATOR ; + +#define _MN_EDIT_OPEN_HYPERLINK \ + MenuItem \ + { \ + ITEM_OPEN_HYPERLINK \ + };\ + MenuItem \ + { \ + Identifier = FN_EDIT_HYPERLINK ; \ + HelpId = CMD_FN_EDIT_HYPERLINK ; \ + Text [ en-US ] = "Edit Hyperlink..."; \ + }; \ + MenuItem \ + { \ + Identifier = FN_COPY_HYPERLINK_LOCATION; \ + HelpId = CMD_FN_COPY_HYPERLINK_LOCATION; \ + Text [ en-US ] = "Copy Hyperlink ~Location"; \ + }; \ + MenuItem \ + { \ + Identifier = FN_REMOVE_HYPERLINK ; \ + HelpId = CMD_FN_REMOVE_HYPERLINK ; \ + Text [ en-US ] = "Remo~ve Hyperlink"; \ + }; + +#define _MN_EDIT_OPEN_SMARTTAGMENU \ + MenuItem \ + { \ + ITEM_OPEN_SMARTTAGMENU \ + }; + +#define _MN_EDIT__HYPERLINK \ + MenuItem\ + {\ + Identifier = FN_EDIT_HYPERLINK ; \ + HelpId = CMD_FN_EDIT_HYPERLINK ; \ + Text [ en-US ] = "~Edit Hyperlink" ; \ + }; + +#define _DEFAULT_TEXT_EDIT_ELEMENTS \ + _MN_EDIT_FIELD \ + _MN_EDIT_FOOTNOTE \ + _MN_EDIT_IDX_ENTRY_DLG \ + _MN_EDIT_BIB_ENTRY_DLG \ + _MN_EDIT_REDLINE \ + MenuItem \ + { \ + ITEM_POPUP_TEMPLATE_EDIT \ + }; \ + SEPARATOR ; \ + _MN_EDIT_OPEN_HYPERLINK \ + _MN_EDIT_OPEN_SMARTTAGMENU + + +#define MN_RESET\ + MenuItem\ + {\ + Identifier = FN_FORMAT_RESET ; \ + HelpId = CMD_FN_FORMAT_RESET ; \ + Text [ en-US ] = "~Default Formatting" ; \ + }; + +#define _NUMBERING_RELATED_MENU \ + SEPARATOR ; \ + MenuItem \ + { \ + Identifier = FN_NUMBER_NEWSTART; \ + HelpId = CMD_FN_NUMBER_NEWSTART; \ + Text[ en-US ] = "Restart Numbering"; \ + }; \ + MenuItem \ + { \ + Identifier = FN_NUM_CONTINUE; \ + HelpId = CMD_FN_NUM_CONTINUE; \ + Text[ en-US ] = "Continue previous numbering"; \ + }; \ + MenuItem \ + { \ + Identifier = FN_NUM_BULLET_UP; \ + HelpId = CMD_FN_NUM_BULLET_UP; \ + Text[ en-US ] = "Up One Level"; \ + }; \ + MenuItem \ + { \ + Identifier = FN_NUM_BULLET_DOWN; \ + HelpId = CMD_FN_NUM_BULLET_DOWN; \ + Text[ en-US ] = "Down One Level"; \ + }; + +#define BASE_TEXT_POPUPMENU_BEGIN \ +{ \ + ItemList = \ + { \ + MN_RESET \ + _NUMBERING_RELATED_MENU \ + SEPARATOR ; \ + MN_TEXT_ATTR \ + SEPARATOR ; \ + MN_TXT \ + MN_NUMBERING \ + ITEM_TRANSLITERATE_MENU \ + SEPARATOR ; + +// not in Writer/Web +#define BASE_TEXT_POPUPMENU_NOWEB \ + MenuItem \ + { \ + Identifier = FN_UPDATE_CUR_TOX ; \ + HelpId = CMD_FN_UPDATE_CUR_TOX ; \ + Text [ en-US ] = "~Update Index/Table"; \ + }; \ + MenuItem \ + { \ + Identifier = FN_EDIT_CURRENT_TOX; \ + HelpId = CMD_FN_EDIT_CURRENT_TOX; \ + Text [ en-US ] = "~Edit Index/Table"; \ + }; \ + MenuItem \ + { \ + Identifier = FN_REMOVE_CUR_TOX; \ + HelpId = CMD_FN_REMOVE_CUR_TOX; \ + Text [ en-US ] = "Delete Index/Table"; \ + }; \ + SEPARATOR ; + +#define BASE_TEXT_POPUPMENU_END \ + _DEFAULT_TEXT_EDIT_ELEMENTS \ + }; \ +}; /*------------------------------------------------------------------------ Description: Menu Window @@ -35,7 +377,7 @@ MenuItem\ {\ Identifier = FN_INSERT_CAPTION ;\ - HelpID = FN_INSERT_CAPTION ;\ + HelpId = CMD_FN_INSERT_CAPTION ;\ Text [ en-US ] = "~Caption..." ;\ }; @@ -43,31 +385,30 @@ MenuItem\ {\ Identifier = FN_FORMAT_TABLE_DLG ; \ - HelpID = FN_FORMAT_TABLE_DLG ; \ + HelpId = CMD_FN_FORMAT_TABLE_DLG ; \ Text [ en-US ] = "~Table..." ; \ };\ MenuItem\ {\ Identifier = FN_TABLE_MERGE_TABLE ; \ - HelpID = FN_TABLE_MERGE_TABLE ; \ + HelpId = CMD_FN_TABLE_MERGE_TABLE ; \ Text [ en-US ] = "Merge Tables";\ };\ MenuItem\ {\ Identifier = FN_TABLE_SPLIT_TABLE ; \ - HelpID = FN_TABLE_SPLIT_TABLE ; \ + HelpId = CMD_FN_TABLE_SPLIT_TABLE ; \ Text [ en-US ] = "~Split Table" ; \ };\ MenuItem\ {\ Identifier = FN_NUM_FORMAT_TABLE_DLG ; \ - HelpID = FN_NUM_FORMAT_TABLE_DLG ; \ + HelpId = CMD_FN_NUM_FORMAT_TABLE_DLG ; \ Text [ en-US ] = "N~umber Format..." ; \ };\ MenuItem\ {\ Identifier = MN_CELL ; \ - HelpID = MN_CELL ; \ Command = ".uno:CellMenu" ; \ Text [ en-US ] = "~Cell" ; \ SubMenu = Menu\ @@ -77,45 +418,45 @@ MenuItem\ {\ Identifier = FN_TABLE_MERGE_CELLS ; \ - HelpID = FN_TABLE_MERGE_CELLS ; \ + HelpId = CMD_FN_TABLE_MERGE_CELLS ; \ Text [ en-US ] = "~Merge" ; \ };\ MenuItem\ {\ Identifier = FN_TABLE_SPLIT_CELLS ; \ - HelpID = FN_TABLE_SPLIT_CELLS ; \ + HelpId = CMD_FN_TABLE_SPLIT_CELLS ; \ Text [ en-US ] = "~Split..." ; \ };\ SEPARATOR ; \ MenuItem\ {\ Identifier = FN_TABLE_VERT_NONE ; \ - HelpID = FN_TABLE_VERT_NONE ; \ + HelpId = CMD_FN_TABLE_VERT_NONE ; \ Text [ en-US ] = "~Top" ; \ };\ MenuItem\ {\ Identifier = FN_TABLE_VERT_CENTER ; \ - HelpID = FN_TABLE_VERT_CENTER ; \ + HelpId = CMD_FN_TABLE_VERT_CENTER ; \ Text [ en-US ] = "C~enter" ; \ };\ MenuItem\ {\ Identifier = FN_TABLE_VERT_BOTTOM ; \ - HelpID = FN_TABLE_VERT_BOTTOM ; \ + HelpId = CMD_FN_TABLE_VERT_BOTTOM ; \ Text [ en-US ] = "~Bottom" ; \ };\ SEPARATOR ; \ MenuItem\ {\ Identifier = FN_TABLE_SET_READ_ONLY_CELLS ; \ - HelpID = FN_TABLE_SET_READ_ONLY_CELLS ; \ + HelpId = CMD_FN_TABLE_SET_READ_ONLY_CELLS ; \ Text [ en-US ] = "~Protect" ; \ };\ MenuItem\ {\ Identifier = FN_TABLE_UNSET_READ_ONLY_CELLS ; \ - HelpID = FN_TABLE_UNSET_READ_ONLY_CELLS ; \ + HelpId = CMD_FN_TABLE_UNSET_READ_ONLY_CELLS ; \ Text [ en-US ] = "~Unprotect" ; \ };\ };\ @@ -136,44 +477,44 @@ MenuItem\ {\ Identifier = FN_TABLE_SET_ROW_HEIGHT ; \ - HelpID = FN_TABLE_SET_ROW_HEIGHT ; \ + HelpId = CMD_FN_TABLE_SET_ROW_HEIGHT ; \ Text [ en-US ] = "~Height..." ; \ };\ MenuItem\ {\ Identifier = FN_TABLE_ROW_SPLIT;\ - HelpID = FN_TABLE_ROW_SPLIT ; \ + HelpId = CMD_FN_TABLE_ROW_SPLIT ; \ Text [ en-US ] = "Allow Row to Break A~cross Pages and Columns" ; \ };\ MenuItem\ {\ Identifier = FN_TABLE_OPTIMAL_HEIGHT ; \ - HelpID = FN_TABLE_OPTIMAL_HEIGHT ; \ + HelpId = CMD_FN_TABLE_OPTIMAL_HEIGHT ; \ Text [ en-US ] = "~Optimal Height" ; \ };\ MenuItem\ {\ Identifier = FN_TABLE_BALANCE_ROWS ; \ - HelpID = FN_TABLE_BALANCE_ROWS ; \ + HelpId = CMD_FN_TABLE_BALANCE_ROWS ; \ Text [ en-US ] = "Space ~Equally" ; \ };\ SEPARATOR ; \ MenuItem\ {\ Identifier = FN_TABLE_SELECT_ROW ; \ - HelpID = FN_TABLE_SELECT_ROW ; \ + HelpId = CMD_FN_TABLE_SELECT_ROW ; \ Text [ en-US ] = "~Select" ; \ };\ MenuItem\ {\ Identifier = FN_TABLE_INSERT_ROW_DLG ; \ - HelpID = FN_TABLE_INSERT_ROW_DLG ; \ + HelpId = CMD_FN_TABLE_INSERT_ROW_DLG ; \ Text [ en-US ] = "~Insert..." ; \ };\ MenuItem\ {\ Identifier = FN_TABLE_DELETE_ROW ; \ - HelpID = FN_TABLE_DELETE_ROW ; \ + HelpId = CMD_FN_TABLE_DELETE_ROW ; \ Text [ en-US ] = "~Delete" ; \ };\ };\ @@ -192,38 +533,38 @@ MenuItem\ {\ Identifier = FN_TABLE_SET_COL_WIDTH ; \ - HelpID = FN_TABLE_SET_COL_WIDTH ; \ + HelpId = CMD_FN_TABLE_SET_COL_WIDTH ; \ Text [ en-US ] = "~Width..." ; \ };\ MenuItem\ {\ Identifier = FN_TABLE_ADJUST_CELLS ; \ - HelpID = FN_TABLE_ADJUST_CELLS ; \ + HelpId = CMD_FN_TABLE_ADJUST_CELLS ; \ Text [ en-US ] = "~Optimal Width " ; \ };\ MenuItem\ {\ Identifier = FN_TABLE_BALANCE_CELLS ; \ - HelpID = FN_TABLE_BALANCE_CELLS ; \ + HelpId = CMD_FN_TABLE_BALANCE_CELLS ; \ Text [ en-US ] = "Space ~Equally" ; \ };\ SEPARATOR ; \ MenuItem\ {\ Identifier = FN_TABLE_SELECT_COL ; \ - HelpID = FN_TABLE_SELECT_COL ; \ + HelpId = CMD_FN_TABLE_SELECT_COL ; \ Text [ en-US ] = "~Select" ; \ };\ MenuItem\ {\ Identifier = FN_TABLE_INSERT_COL_DLG ; \ - HelpID = FN_TABLE_INSERT_COL_DLG ; \ + HelpId = CMD_FN_TABLE_INSERT_COL_DLG ; \ Text [ en-US ] = "~Insert..." ; \ };\ MenuItem\ {\ Identifier = FN_TABLE_DELETE_COL ; \ - HelpID = FN_TABLE_DELETE_COL ; \ + HelpId = CMD_FN_TABLE_DELETE_COL ; \ Text [ en-US ] = "~Delete" ; \ };\ };\ @@ -244,7 +585,7 @@ MenuItem\ {\ Identifier = FN_DRAWTEXT_ATTR_DLG ; \ - HelpID = FN_DRAWTEXT_ATTR_DLG ; \ + HelpId = CMD_FN_DRAWTEXT_ATTR_DLG ; \ Text [ en-US ] = "Te~xt..." ; \ }; @@ -252,7 +593,7 @@ MenuItem\ {\ Identifier = FN_NAME_SHAPE ; \ - HelpID = FN_NAME_SHAPE ; \ + HelpId = CMD_FN_NAME_SHAPE ; \ Text [ en-US ] = "Name..." ; \ }; @@ -260,7 +601,7 @@ MenuItem\ {\ Identifier = FN_TITLE_DESCRIPTION_SHAPE; \ - HelpID = FN_TITLE_DESCRIPTION_SHAPE; \ + HelpId = CMD_FN_TITLE_DESCRIPTION_SHAPE; \ Text [ en-US ] = "Description..." ; \ }; @@ -268,7 +609,7 @@ MenuItem\ {\ Identifier = FN_FORMAT_FRAME_DLG ; \ - HelpID = FN_FORMAT_FRAME_DLG ; \ + HelpId = CMD_FN_FORMAT_FRAME_DLG ; \ Text [ en-US ] = "~Frame..." ; \ }; @@ -323,13 +664,13 @@ MenuItem\ {\ Identifier = FN_FRAME_UP ; \ - HelpID = FN_FRAME_UP ; \ + HelpId = CMD_FN_FRAME_UP ; \ Text [ en-US ] = "Bring ~Forward" ; \ };\ MenuItem\ {\ Identifier = FN_FRAME_DOWN ; \ - HelpID = FN_FRAME_DOWN ; \ + HelpId = CMD_FN_FRAME_DOWN ; \ Text [ en-US ] = "Send Back~ward" ; \ }; @@ -409,45 +750,45 @@ MenuItem\ {\ Identifier = FN_REPLY ;\ - HelpID = FN_DELETE_NOTE ;\ + HelpID = CMD_FN_REPLY ;\ Text [ en-US ] = "Reply" ;\ };\ SEPARATOR ; \ MenuItem\ {\ - Identifier = FN_DELETE_NOTE ;\ - HelpID = FN_DELETE_NOTE ;\ + Identifier = FN_DELETE_COMMENT ;\ + HelpID = CMD_FN_DELETE_COMMENT ;\ Text [ en-US ] = "Delete ~Comment" ;\ };\ MenuItem\ {\ Identifier = FN_DELETE_NOTE_AUTHOR ;\ - HelpID = FN_DELETE_NOTE_AUTHOR ;\ + HelpId = CMD_FN_DELETE_NOTE_AUTHOR ;\ Text [ en-US ] = "Delete ~All Comments by $1" ;\ };\ MenuItem\ {\ Identifier = FN_DELETE_ALL_NOTES ;\ - HelpID = FN_DELETE_ALL_NOTES ;\ + HelpId = CMD_FN_DELETE_ALL_NOTES ;\ Text [ en-US ] = "~Delete All Comments" ;\ };\ /* MenuItem\ {\ Identifier = FN_HIDE_NOTE ;\ - HelpID = FN_HIDE_NOTE ;\ + HelpId = CMD_FN_HIDE_NOTE ;\ Text [ en-US ] = "~Hide comment" ;\ };\ MenuItem\ {\ Identifier = FN_HIDE_NOTE_AUTHOR ;\ - HelpID = FN_HIDE_NOTE_AUTHOR ;\ + HelpId = CMD_FN_HIDE_NOTE_AUTHOR ;\ Text [ en-US ] = "Hide ~author" ;\ };\ MenuItem\ {\ Identifier = FN_HIDE_ALL_NOTES ;\ - HelpID = FN_HIDE_ALL_NOTES ;\ + HelpId = CMD_FN_HIDE_ALL_NOTES ;\ Text [ en-US ] = "Hide all ~comments" ;\ }; */ @@ -490,13 +831,13 @@ Menu MN_TAB_POPUPMENU MenuItem { Identifier = FN_VIEW_TABLEGRID ; - HelpID = FN_VIEW_TABLEGRID ; + HelpId = CMD_FN_VIEW_TABLEGRID ; Text [ en-US ] = "Table Boundaries" ; }; MenuItem { Identifier = FN_SET_MODOPT_TBLNUMFMT ; - HelpID = FN_SET_MODOPT_TBLNUMFMT ; + HelpId = CMD_FN_SET_MODOPT_TBLNUMFMT ; Text [ en-US ] = "~Number Recognition"; }; SEPARATOR ; @@ -508,7 +849,7 @@ Menu MN_TAB_POPUPMENU MenuItem\ {\ Identifier = FN_FRAME_WRAP_CONTOUR ; \ - HelpID = FN_FRAME_WRAP_CONTOUR ; \ + HelpId = CMD_FN_FRAME_WRAP_CONTOUR ; \ Text [ en-US ] = "~Contour" ; \ }; @@ -516,7 +857,7 @@ Menu MN_TAB_POPUPMENU MenuItem\ {\ Identifier = SID_CONTOUR_DLG ; \ - HelpID = SID_CONTOUR_DLG ; \ + HelpId = CMD_SID_CONTOUR_DLG ; \ Text [ en-US ] = "~Edit Contour..." ; \ }; @@ -527,7 +868,6 @@ Menu MN_TAB_POPUPMENU MenuItem\ {\ Identifier = MN_WRAP ; \ - HelpID = MN_WRAP ; \ Command = ".uno:WrapMenu" ; \ Text [ en-US ] = "~Wrap" ; \ SubMenu = Menu\ @@ -538,35 +878,35 @@ Menu MN_TAB_POPUPMENU {\ RadioCheck = TRUE ; \ Identifier = FN_FRAME_NOWRAP ; \ - HelpID = FN_FRAME_NOWRAP ; \ + HelpId = CMD_FN_FRAME_NOWRAP ; \ Text [ en-US ] = "~No Wrap" ; \ };\ MenuItem\ {\ RadioCheck = TRUE ; \ Identifier = FN_FRAME_WRAP ; \ - HelpID = FN_FRAME_WRAP ; \ + HelpId = CMD_FN_FRAME_WRAP ; \ Text [ en-US ] = "~Page Wrap" ; \ };\ MenuItem\ {\ RadioCheck = TRUE ; \ Identifier = FN_FRAME_WRAP_IDEAL ; \ - HelpID = FN_FRAME_WRAP_IDEAL ; \ + HelpId = CMD_FN_FRAME_WRAP_IDEAL ; \ Text [ en-US ] = "~Optimal Page Wrap" ; \ };\ MenuItem\ {\ RadioCheck = TRUE ; \ Identifier = FN_FRAME_WRAPTHRU ; \ - HelpID = FN_FRAME_WRAPTHRU ; \ + HelpId = CMD_FN_FRAME_WRAPTHRU ; \ Text [ en-US ] = "~Wrap Through" ; \ };\ MenuItem\ {\ RadioCheck = TRUE ; \ Identifier = FN_FRAME_WRAPTHRU_TRANSP ; \ - HelpID = FN_FRAME_WRAPTHRU_TRANSP ; \ + HelpId = CMD_FN_FRAME_WRAPTHRU_TRANSP ; \ Text [ en-US ] = "In ~Background" ; \ };\ SEPARATOR ; \ @@ -576,7 +916,7 @@ Menu MN_TAB_POPUPMENU {\ Checkable = TRUE ; \ Identifier = FN_WRAP_ANCHOR_ONLY ; \ - HelpID = FN_WRAP_ANCHOR_ONLY ; \ + HelpId = CMD_FN_WRAP_ANCHOR_ONLY ; \ Text [ en-US ] = "~First Paragraph" ; \ };\ };\ @@ -594,7 +934,6 @@ String MN_DRAW_POPUPMENU MenuItem\ {\ Identifier = MN_WRAP ; \ - HelpID = MN_WRAP ; \ Command = ".uno:WrapMenu" ; \ SubMenu = Menu\ {\ @@ -604,35 +943,35 @@ String MN_DRAW_POPUPMENU {\ RadioCheck = TRUE ; \ Identifier = FN_FRAME_NOWRAP ; \ - HelpID = FN_FRAME_NOWRAP ; \ + HelpId = CMD_FN_FRAME_NOWRAP ; \ Text [ en-US ] = "~No Wrap" ; \ };\ MenuItem\ {\ RadioCheck = TRUE ; \ Identifier = FN_FRAME_WRAP ; \ - HelpID = FN_FRAME_WRAP ; \ + HelpId = CMD_FN_FRAME_WRAP ; \ Text [ en-US ] = "~Page Wrap" ; \ };\ MenuItem\ {\ RadioCheck = TRUE ; \ Identifier = FN_FRAME_WRAP_IDEAL ; \ - HelpID = FN_FRAME_WRAP_IDEAL ; \ + HelpId = CMD_FN_FRAME_WRAP_IDEAL ; \ Text [ en-US ] = "~Optimal Page Wrap" ; \ };\ MenuItem\ {\ RadioCheck = TRUE ; \ Identifier = FN_FRAME_WRAPTHRU ; \ - HelpID = FN_FRAME_WRAPTHRU ; \ + HelpId = CMD_FN_FRAME_WRAPTHRU ; \ Text [ en-US ] = "~Wrap Through" ; \ };\ MenuItem\ {\ RadioCheck = TRUE ; \ Identifier = FN_FRAME_WRAPTHRU_TRANSP ; \ - HelpID = FN_FRAME_WRAPTHRU_TRANSP ; \ + HelpId = CMD_FN_FRAME_WRAPTHRU_TRANSP ; \ Text [ en-US ] = "In ~Background" ; \ };\ SEPARATOR ; \ @@ -641,14 +980,14 @@ String MN_DRAW_POPUPMENU {\ Checkable = TRUE ; \ Identifier = FN_WRAP_ANCHOR_ONLY ; \ - HelpID = FN_WRAP_ANCHOR_ONLY ; \ + HelpId = CMD_FN_WRAP_ANCHOR_ONLY ; \ Text [ en-US ] = "~First Paragraph" ; \ };\ SEPARATOR ; \ MenuItem\ {\ Identifier = FN_DRAW_WRAP_DLG ; \ - HelpID = FN_DRAW_WRAP_DLG ; \ + HelpId = CMD_FN_DRAW_WRAP_DLG ; \ Text [ en-US ] = "~Edit..." ; \ };\ };\ @@ -667,7 +1006,7 @@ String MN_DRAW_POPUPMENU {\ RadioCheck = TRUE ; \ Identifier = FN_TOOL_ANKER_FRAME ; \ - HelpID = FN_TOOL_ANKER_FRAME ; \ + HelpId = CMD_FN_TOOL_ANKER_FRAME ; \ Text [ en-US ] = "To ~Frame" ; \ }; @@ -675,7 +1014,7 @@ String MN_DRAW_POPUPMENU MenuItem\ {\ Identifier = FN_TOOL_ANKER ; \ - HelpID = FN_TOOL_ANKER ; \ + HelpId = CMD_FN_TOOL_ANKER ; \ Command = ".uno:AnchorMenu" ; \ Text [ en-US ] = "An~chor" ; \ SubMenu = Menu\ @@ -686,28 +1025,28 @@ String MN_DRAW_POPUPMENU {\ RadioCheck = TRUE ; \ Identifier = FN_TOOL_ANKER_PAGE ; \ - HelpID = FN_TOOL_ANKER_PAGE ; \ + HelpId = CMD_FN_TOOL_ANKER_PAGE ; \ Text [ en-US ] = "To P~age" ; \ };\ MenuItem\ {\ RadioCheck = TRUE ; \ Identifier = FN_TOOL_ANKER_PARAGRAPH ; \ - HelpID = FN_TOOL_ANKER_PARAGRAPH ; \ + HelpId = CMD_FN_TOOL_ANKER_PARAGRAPH ; \ Text [ en-US ] = "To ~Paragraph" ; \ };\ MenuItem\ {\ RadioCheck = TRUE ; \ Identifier = FN_TOOL_ANKER_AT_CHAR ; \ - HelpID = FN_TOOL_ANKER_AT_CHAR ; \ + HelpId = CMD_FN_TOOL_ANKER_AT_CHAR ; \ Text [ en-US ] = "To ~Character" ; \ };\ MenuItem\ {\ RadioCheck = TRUE ; \ Identifier = FN_TOOL_ANKER_CHAR ; \ - HelpID = FN_TOOL_ANKER_CHAR ; \ + HelpId = CMD_FN_TOOL_ANKER_CHAR ; \ Text [ en-US ] = "As C~haracter" ; \ };\ MN_AT_FRAME\ @@ -793,7 +1132,7 @@ Menu MN_DRWTXT_POPUPMENU MenuItem\ {\ Identifier = FN_DELETE_COMMENT ;\ - HelpID = FN_DELETE_COMMENT ;\ + HelpId = CMD_FN_DELETE_COMMENT ;\ Text [ en-US ] = "Delete ~Changes Note" ;\ };\ @@ -870,7 +1209,6 @@ String MN_GRF_POPUPMENU MenuItem\ {\ Identifier = MN_FORMAT_FRM_HORZ ; \ - HelpID = MN_FORMAT_FRM_HORZ ; \ Command = ".uno:AlignFrameMenu" ; \ SubMenu = Menu\ {\ @@ -879,38 +1217,38 @@ String MN_GRF_POPUPMENU MenuItem\ {\ Identifier = FN_FRAME_ALIGN_HORZ_LEFT ; \ - HelpID = FN_FRAME_ALIGN_HORZ_LEFT ; \ + HelpId = CMD_FN_FRAME_ALIGN_HORZ_LEFT ; \ Text [ en-US ] = "~Left" ; \ };\ MenuItem\ {\ Identifier = FN_FRAME_ALIGN_HORZ_CENTER ; \ - HelpID = FN_FRAME_ALIGN_HORZ_CENTER ; \ + HelpId = CMD_FN_FRAME_ALIGN_HORZ_CENTER ; \ Text [ en-US ] = "~Centered" ; \ };\ MenuItem\ {\ Identifier = FN_FRAME_ALIGN_HORZ_RIGHT ; \ - HelpID = FN_FRAME_ALIGN_HORZ_RIGHT ; \ + HelpId = CMD_FN_FRAME_ALIGN_HORZ_RIGHT ; \ Text [ en-US ] = "~Right" ; \ };\ SEPARATOR ; \ MenuItem\ {\ Identifier = FN_FRAME_ALIGN_VERT_TOP ; \ - HelpID = FN_FRAME_ALIGN_VERT_TOP ; \ + HelpId = CMD_FN_FRAME_ALIGN_VERT_TOP ; \ Text [ en-US ] = "Base at ~Top" ; \ };\ MenuItem\ {\ Identifier = FN_FRAME_ALIGN_VERT_CENTER ; \ - HelpID = FN_FRAME_ALIGN_VERT_CENTER ; \ + HelpId = CMD_FN_FRAME_ALIGN_VERT_CENTER ; \ Text [ en-US ] = "Base in ~Middle" ; \ };\ MenuItem\ {\ Identifier = FN_FRAME_ALIGN_VERT_BOTTOM ; \ - HelpID = FN_FRAME_ALIGN_VERT_BOTTOM ; \ + HelpId = CMD_FN_FRAME_ALIGN_VERT_BOTTOM ; \ Text [ en-US ] = "Base at ~Bottom" ; \ };\ };\ @@ -931,13 +1269,13 @@ Menu MN_GRF_POPUPMENU MenuItem { Identifier = FN_FORMAT_GRAFIC_DLG ; - HelpID = FN_FORMAT_GRAFIC_DLG ; + HelpId = CMD_FN_FORMAT_GRAFIC_DLG ; Text [ en-US ] = "~Picture..." ; }; MenuItem { Identifier = FN_SAVE_GRAPHIC; - HelpID = FN_SAVE_GRAPHIC; + HelpId = CMD_FN_SAVE_GRAPHIC; Text [ en-US ] = "Save Graphics..." ; }; MN_FRM_CAPTION_ITEM @@ -945,7 +1283,7 @@ Menu MN_GRF_POPUPMENU MenuItem { Identifier = FN_EXTERNAL_EDIT ; - HelpID = FN_EXTERNAL_EDIT ; + HelpID = CMD_FN_EXTERNAL_EDIT ; Text [ en-US ] = "Edit with External Tool..."; }; SEPARATOR; @@ -972,13 +1310,13 @@ String MN_OLE_POPUPMENU MenuItem\ {\ Identifier = FN_EXPORT_OLE_AS_PDF ;\ - HelpID = FN_EXPORT_OLE_AS_PDF ; \ + HelpID = CMD_FN_EXPORT_OLE_AS_PDF ; \ Text [ en-US ] = "Export as P~DF..." ; \ };\ MenuItem\ {\ Identifier = FN_EXPORT_OLE_AS_GRAPHIC ;\ - HelpID = FN_EXPORT_OLE_AS_GRAPHIC ; \ + HelpID = CMD_FN_EXPORT_OLE_AS_GRAPHIC ; \ Text [ en-US ] = "Export as JPG..." ; \ };\ };\ @@ -997,7 +1335,7 @@ Menu MN_OLE_POPUPMENU MenuItem { Identifier = FN_FORMAT_FRAME_DLG ; - HelpID = FN_FORMAT_FRAME_DLG ; + HelpId = CMD_FN_FORMAT_FRAME_DLG ; Text [ en-US ] = "Object..." ; }; SEPARATOR ; @@ -1040,13 +1378,13 @@ Menu MN_PPREVIEW_POPUPMENU MenuItem { Identifier = FN_PAGEUP ; - HelpID = FN_PAGEUP ; + HelpId = CMD_FN_PAGEUP ; Text [ en-US ] = "Previous Page" ; }; MenuItem { Identifier = FN_PAGEDOWN ; - HelpID = FN_PAGEDOWN ; + HelpId = CMD_FN_PAGEDOWN ; Text [ en-US ] = "Next Page" ; }; MenuItem @@ -1057,14 +1395,14 @@ Menu MN_PPREVIEW_POPUPMENU MenuItem { Identifier = FN_PRINT_PAGEPREVIEW ; - HelpID = FN_PRINT_PAGEPREVIEW ; + HelpId = CMD_FN_PRINT_PAGEPREVIEW ; Text [ en-US ] = "Print" ; }; SEPARATOR ; MenuItem { Identifier = SID_PRINTPREVIEW; - HelpID = SID_PRINTPREVIEW; + HelpId = CMD_SID_PRINTPREVIEW; Text [ en-US ] = "Close Preview" ; }; }; diff --git a/sw/source/ui/app/swmodul1.cxx b/sw/source/ui/app/swmodul1.cxx index d8a3ccc3cc..6b1838305a 100644 --- a/sw/source/ui/app/swmodul1.cxx +++ b/sw/source/ui/app/swmodul1.cxx @@ -145,7 +145,7 @@ SwView* SwModule::GetNextView(SwView* pView) { OSL_ENSURE(PTR_CAST(SwView, pView),"return no SwView"); const TypeId aTypeId = TYPE(SwView); - SwView* pNView = (SwView*)SfxViewShell::GetNext(*pView, &aTypeId, TRUE); + SwView* pNView = (SwView*)SfxViewShell::GetNext(*pView, &aTypeId, sal_True); return pNView; } @@ -222,7 +222,7 @@ void SwModule::ApplyUsrPref(const SwViewOption &rUsrPref, SwView* pActView, pPref->SetIdle(sal_True); } -void SwModule::ApplyUserMetric( FieldUnit eMetric, BOOL bWeb ) +void SwModule::ApplyUserMetric( FieldUnit eMetric, sal_Bool bWeb ) { SwMasterUsrPref* pPref; if(bWeb) @@ -258,7 +258,7 @@ void SwModule::ApplyUserMetric( FieldUnit eMetric, BOOL bWeb ) } } -void SwModule::ApplyRulerMetric( FieldUnit eMetric, BOOL bHorizontal, BOOL bWeb ) +void SwModule::ApplyRulerMetric( FieldUnit eMetric, sal_Bool bHorizontal, sal_Bool bWeb ) { SwMasterUsrPref* pPref; if(bWeb) @@ -297,7 +297,7 @@ void SwModule::ApplyRulerMetric( FieldUnit eMetric, BOOL bHorizontal, BOOL bWeb set the usrpref 's char unit attribute and set ruler 's unit as char if the "apply char unit" is checked --------------------------------------------------*/ -void SwModule::ApplyUserCharUnit(BOOL bApplyChar, BOOL bWeb) +void SwModule::ApplyUserCharUnit(sal_Bool bApplyChar, sal_Bool bWeb) { SwMasterUsrPref* pPref; if(bWeb) @@ -312,12 +312,12 @@ void SwModule::ApplyUserCharUnit(BOOL bApplyChar, BOOL bWeb) GetUsrPref(sal_False); pPref = pUsrPref; } - BOOL bOldApplyCharUnit = pPref->IsApplyCharUnit(); - BOOL bHasChanged = FALSE; + sal_Bool bOldApplyCharUnit = pPref->IsApplyCharUnit(); + sal_Bool bHasChanged = sal_False; if(bOldApplyCharUnit != bApplyChar) { pPref->SetApplyCharUnit(bApplyChar); - bHasChanged = TRUE; + bHasChanged = sal_True; } if( !bHasChanged ) @@ -369,11 +369,11 @@ SwPrintOptions* SwModule::GetPrtOptions(sal_Bool bWeb) { if(bWeb && !pWebPrtOpt) { - pWebPrtOpt = new SwPrintOptions(TRUE); + pWebPrtOpt = new SwPrintOptions(sal_True); } else if(!bWeb && !pPrtOpt) { - pPrtOpt = new SwPrintOptions(FALSE); + pPrtOpt = new SwPrintOptions(sal_False); } return bWeb ? pWebPrtOpt : pPrtOpt; @@ -386,7 +386,7 @@ SwChapterNumRules* SwModule::GetChapterNumRules() return pChapterNumRules; } -void SwModule::ShowDBObj(SwView& rView, const SwDBData& rData, BOOL /*bOnlyIfAvailable*/) +void SwModule::ShowDBObj(SwView& rView, const SwDBData& rData, sal_Bool /*bOnlyIfAvailable*/) { Reference<XFrame> xFrame = rView.GetViewFrame()->GetFrame().GetFrameInterface(); Reference<XDispatchProvider> xDP(xFrame, uno::UNO_QUERY); diff --git a/sw/source/ui/app/swmodule.cxx b/sw/source/ui/app/swmodule.cxx index 616ad54880..4599fabf8b 100644 --- a/sw/source/ui/app/swmodule.cxx +++ b/sw/source/ui/app/swmodule.cxx @@ -426,7 +426,7 @@ void SwDLL::RegisterControls() ::avmedia::MediaPlayer::RegisterChildWindow(0, pMod); SvxSmartTagsControl::RegisterControl(SID_OPEN_SMARTTAGMENU, pMod); - ::sfx2::TaskPaneWrapper::RegisterChildWindow( FALSE, pMod ); + ::sfx2::TaskPaneWrapper::RegisterChildWindow( sal_False, pMod ); } diff --git a/sw/source/ui/app/swwait.cxx b/sw/source/ui/app/swwait.cxx index c77ee6655a..abd1d823e7 100644 --- a/sw/source/ui/app/swwait.cxx +++ b/sw/source/ui/app/swwait.cxx @@ -37,31 +37,31 @@ #include <swwait.hxx> -void SwDocShell::EnterWait( BOOL bLockDispatcher ) +void SwDocShell::EnterWait( sal_Bool bLockDispatcher ) { - SfxViewFrame *pFrame = SfxViewFrame::GetFirst( this, FALSE ); + SfxViewFrame *pFrame = SfxViewFrame::GetFirst( this, sal_False ); while ( pFrame ) { pFrame->GetWindow().EnterWait(); if ( bLockDispatcher ) - pFrame->GetDispatcher()->Lock( TRUE ); - pFrame = SfxViewFrame::GetNext( *pFrame, this, FALSE ); + pFrame->GetDispatcher()->Lock( sal_True ); + pFrame = SfxViewFrame::GetNext( *pFrame, this, sal_False ); } } -void SwDocShell::LeaveWait( BOOL bLockDispatcher ) +void SwDocShell::LeaveWait( sal_Bool bLockDispatcher ) { - SfxViewFrame *pFrame = SfxViewFrame::GetFirst( this, FALSE ); + SfxViewFrame *pFrame = SfxViewFrame::GetFirst( this, sal_False ); while ( pFrame ) { pFrame->GetWindow().LeaveWait(); if ( bLockDispatcher ) - pFrame->GetDispatcher()->Lock( FALSE ); - pFrame = SfxViewFrame::GetNext( *pFrame, this, FALSE ); + pFrame->GetDispatcher()->Lock( sal_False ); + pFrame = SfxViewFrame::GetNext( *pFrame, this, sal_False ); } } -SwWait::SwWait( SwDocShell &rDocShell, BOOL bLockDispatcher ) : +SwWait::SwWait( SwDocShell &rDocShell, sal_Bool bLockDispatcher ) : rDoc ( rDocShell ), bLock( bLockDispatcher ) { diff --git a/sw/source/ui/cctrl/actctrl.cxx b/sw/source/ui/cctrl/actctrl.cxx index dd3b186601..01b1a52f74 100644 --- a/sw/source/ui/cctrl/actctrl.cxx +++ b/sw/source/ui/cctrl/actctrl.cxx @@ -45,7 +45,7 @@ long NumEditAction::Notify( NotifyEvent& rNEvt ) { const KeyEvent* pKEvt = rNEvt.GetKeyEvent(); const KeyCode aKeyCode = pKEvt->GetKeyCode(); - const USHORT nModifier = aKeyCode.GetModifier(); + const sal_uInt16 nModifier = aKeyCode.GetModifier(); if( aKeyCode.GetCode() == KEY_RETURN && !nModifier) { @@ -71,12 +71,12 @@ NoSpaceEdit::~NoSpaceEdit() void NoSpaceEdit::KeyInput(const KeyEvent& rEvt) { - BOOL bCallParent = TRUE; + sal_Bool bCallParent = sal_True; if(rEvt.GetCharCode()) { String sKey = rEvt.GetCharCode(); if( STRING_NOTFOUND != sForbiddenChars.Search(sKey)) - bCallParent = FALSE; + bCallParent = sal_False; } if(bCallParent) Edit::KeyInput(rEvt); @@ -86,11 +86,11 @@ void NoSpaceEdit::Modify() { Selection aSel = GetSelection(); String sTemp = GetText(); - for(USHORT i = 0; i < sForbiddenChars.Len(); i++) + for(sal_uInt16 i = 0; i < sForbiddenChars.Len(); i++) { sTemp.EraseAllChars( sForbiddenChars.GetChar(i) ); } - USHORT nDiff = GetText().Len() - sTemp.Len(); + sal_uInt16 nDiff = GetText().Len() - sTemp.Len(); if(nDiff) { aSel.setMin(aSel.getMin() - nDiff); @@ -109,7 +109,7 @@ ReturnActionEdit::~ReturnActionEdit() void ReturnActionEdit::KeyInput( const KeyEvent& rEvt) { const KeyCode aKeyCode = rEvt.GetKeyCode(); - const USHORT nModifier = aKeyCode.GetModifier(); + const sal_uInt16 nModifier = aKeyCode.GetModifier(); if( aKeyCode.GetCode() == KEY_RETURN && !nModifier) { diff --git a/sw/source/ui/cctrl/makefile.mk b/sw/source/ui/cctrl/makefile.mk deleted file mode 100644 index 9a72754367..0000000000 --- a/sw/source/ui/cctrl/makefile.mk +++ /dev/null @@ -1,59 +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=cctrl - -AUTOSEG=true - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -CXXFILES = \ - actctrl.cxx \ - popbox.cxx \ - swlbox.cxx - -SLOFILES = \ - $(EXCEPTIONSFILES) - -EXCEPTIONSFILES = \ - $(SLO)$/actctrl.obj \ - $(SLO)$/popbox.obj \ - $(SLO)$/swlbox.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/ui/cctrl/popbox.cxx b/sw/source/ui/cctrl/popbox.cxx index c9f8a2bc90..da00b52ce8 100644 --- a/sw/source/ui/cctrl/popbox.cxx +++ b/sw/source/ui/cctrl/popbox.cxx @@ -58,8 +58,8 @@ long SwHelpToolBox::DoubleClick( ToolBox* pCaller ) { // No doubleclick on button if( 0 == pCaller->GetCurItemId() && aDoubleClickLink.Call(0) ) - return TRUE; - return FALSE; + return sal_True; + return sal_False; } SwHelpToolBox::~SwHelpToolBox() {} diff --git a/sw/source/ui/cctrl/swlbox.cxx b/sw/source/ui/cctrl/swlbox.cxx index 3dd0c0068c..22a64fd6b0 100644 --- a/sw/source/ui/cctrl/swlbox.cxx +++ b/sw/source/ui/cctrl/swlbox.cxx @@ -42,15 +42,15 @@ SV_IMPL_PTRARR(SwEntryLst, SwBoxEntry*) // Description: ListboxElement SwBoxEntry::SwBoxEntry() : - bModified(FALSE), - bNew(FALSE), + bModified(sal_False), + bNew(sal_False), nId(LISTBOX_APPEND) { } -SwBoxEntry::SwBoxEntry(const String& aNam, USHORT nIdx) : - bModified(FALSE), - bNew(FALSE), +SwBoxEntry::SwBoxEntry(const String& aNam, sal_uInt16 nIdx) : + bModified(sal_False), + bNew(sal_False), aName(aNam), nId(nIdx) { @@ -64,13 +64,13 @@ SwBoxEntry::SwBoxEntry(const SwBoxEntry& rOld) : { } -SwComboBox::SwComboBox(Window* pParent, const ResId& rId, USHORT nStyleBits ): +SwComboBox::SwComboBox(Window* pParent, const ResId& rId, sal_uInt16 nStyleBits ): ComboBox(pParent, rId), nStyle(nStyleBits) { // create administration for the resource's Stringlist - USHORT nSize = GetEntryCount(); - for( USHORT i=0; i < nSize; ++i ) + sal_uInt16 nSize = GetEntryCount(); + for( sal_uInt16 i=0; i < nSize; ++i ) { const SwBoxEntry* pTmp = new SwBoxEntry(ComboBox::GetEntry(i), i); aEntryLst.Insert(pTmp, aEntryLst.Count() ); @@ -87,7 +87,7 @@ void SwComboBox::InsertEntry(const SwBoxEntry& rEntry) InsertSorted(new SwBoxEntry(rEntry)); } -void SwComboBox::RemoveEntry(USHORT nPos) +void SwComboBox::RemoveEntry(sal_uInt16 nPos) { if(nPos >= aEntryLst.Count()) return; @@ -105,12 +105,12 @@ void SwComboBox::RemoveEntry(USHORT nPos) aDelEntryLst.C40_INSERT(SwBoxEntry, pEntry, aDelEntryLst.Count()); } -USHORT SwComboBox::GetEntryPos(const SwBoxEntry& rEntry) const +sal_uInt16 SwComboBox::GetEntryPos(const SwBoxEntry& rEntry) const { return ComboBox::GetEntryPos(rEntry.aName); } -const SwBoxEntry& SwComboBox::GetEntry(USHORT nPos) const +const SwBoxEntry& SwComboBox::GetEntry(sal_uInt16 nPos) const { if(nPos < aEntryLst.Count()) return *aEntryLst[nPos]; @@ -118,12 +118,12 @@ const SwBoxEntry& SwComboBox::GetEntry(USHORT nPos) const return aDefault; } -USHORT SwComboBox::GetRemovedCount() const +sal_uInt16 SwComboBox::GetRemovedCount() const { return aDelEntryLst.Count(); } -const SwBoxEntry& SwComboBox::GetRemovedEntry(USHORT nPos) const +const SwBoxEntry& SwComboBox::GetRemovedEntry(sal_uInt16 nPos) const { if(nPos < aDelEntryLst.Count()) return *aDelEntryLst[nPos]; @@ -134,13 +134,13 @@ const SwBoxEntry& SwComboBox::GetRemovedEntry(USHORT nPos) const void SwComboBox::InsertSorted(SwBoxEntry* pEntry) { ComboBox::InsertEntry(pEntry->aName); - USHORT nPos = ComboBox::GetEntryPos(pEntry->aName); + sal_uInt16 nPos = ComboBox::GetEntryPos(pEntry->aName); aEntryLst.C40_INSERT(SwBoxEntry, pEntry, nPos); } void SwComboBox::KeyInput( const KeyEvent& rKEvt ) { - USHORT nChar = rKEvt.GetCharCode(); + sal_uInt16 nChar = rKEvt.GetCharCode(); if(nStyle & CBS_FILENAME) { diff --git a/sw/source/ui/chrdlg/break.cxx b/sw/source/ui/chrdlg/break.cxx index f18ee009c8..b4dd39ee59 100644 --- a/sw/source/ui/chrdlg/break.cxx +++ b/sw/source/ui/chrdlg/break.cxx @@ -63,11 +63,11 @@ void SwBreakDlg::Apply() else if(aPageBtn.IsChecked()) { nKind = 3; - const USHORT nPos = aPageCollBox.GetSelectEntryPos(); + const sal_uInt16 nPos = aPageCollBox.GetSelectEntryPos(); if(0 != nPos && LISTBOX_ENTRY_NOTFOUND != nPos) { aTemplate = aPageCollBox.GetSelectEntry(); - nPgNum = aPageNumBox.IsChecked() ? (USHORT)aPageNumEdit.GetValue() : 0; + nPgNum = aPageNumBox.IsChecked() ? (sal_uInt16)aPageNumEdit.GetValue() : 0; } } } @@ -113,18 +113,18 @@ IMPL_LINK( SwBreakDlg, OkHdl, Button *, EMPTYARG ) { if(aPageNumBox.IsChecked()) { // In case of differing page descriptions, test validity - const USHORT nPos = aPageCollBox.GetSelectEntryPos(); + const sal_uInt16 nPos = aPageCollBox.GetSelectEntryPos(); // position 0 says 'Without'. const SwPageDesc *pPageDesc; if ( 0 != nPos && LISTBOX_ENTRY_NOTFOUND != nPos ) pPageDesc = rSh.FindPageDescByName( aPageCollBox.GetSelectEntry(), - TRUE ); + sal_True ); else pPageDesc = &rSh.GetPageDesc(rSh.GetCurPageDesc()); OSL_ENSURE(pPageDesc, "Page description not found."); - const USHORT nUserPage = USHORT(aPageNumEdit.GetValue()); - BOOL bOk = TRUE; + const sal_uInt16 nUserPage = sal_uInt16(aPageNumEdit.GetValue()); + sal_Bool bOk = sal_True; switch(pPageDesc->GetUseOn()) { case nsUseOnPage::PD_MIRROR: @@ -148,6 +148,7 @@ SwBreakDlg::SwBreakDlg( Window *pParent, SwWrtShell &rS ) : SvxStandardDialog( pParent,SW_RES(DLG_BREAK) ), rSh(rS), + aBreakFL(this,SW_RES(FL_BREAK)), aLineBtn(this,SW_RES(RB_LINE)), aColumnBtn(this,SW_RES(RB_COL)), aPageBtn(this,SW_RES(RB_PAGE)), @@ -155,8 +156,7 @@ SwBreakDlg::SwBreakDlg( Window *pParent, SwWrtShell &rS ) : aPageCollBox(this, SW_RES(LB_COLL)), aPageNumBox(this, SW_RES(CB_PAGENUM)), aPageNumEdit(this, SW_RES(ED_PAGENUM)), - aBreakFL(this,SW_RES(FL_BREAK)), - + aOkBtn(this,SW_RES(BT_OK)), aCancelBtn(this,SW_RES(BT_CANCEL)), aHelpBtn(this,SW_RES(BT_HELP)), @@ -166,6 +166,9 @@ SwBreakDlg::SwBreakDlg( Window *pParent, SwWrtShell &rS ) : bHtmlMode(0 != ::GetHtmlMode(rS.GetView().GetDocShell())) { + aPageNumEdit.SetAccessibleRelationLabeledBy(&aPageNumBox); + aPageNumEdit.SetAccessibleName(aPageNumBox.GetText()); + Link aLk = LINK(this,SwBreakDlg,ClickHdl); aPageBtn.SetClickHdl( aLk ); aLineBtn.SetClickHdl( aLk ); @@ -178,8 +181,8 @@ SwBreakDlg::SwBreakDlg( Window *pParent, SwWrtShell &rS ) : // Insert page description to Listbox - const USHORT nCount = rSh.GetPageDescCnt(); - USHORT i; + const sal_uInt16 nCount = rSh.GetPageDescCnt(); + sal_uInt16 i; for( i = 0; i < nCount; ++i) { @@ -188,7 +191,7 @@ SwBreakDlg::SwBreakDlg( Window *pParent, SwWrtShell &rS ) : } String aFmtName; - for(i = RES_POOLPAGE_BEGIN; i <= RES_POOLPAGE_REGISTER; ++i) + for(i = RES_POOLPAGE_BEGIN; i < RES_POOLPAGE_END; ++i) if(LISTBOX_ENTRY_NOTFOUND == aPageCollBox.GetEntryPos( aFmtName = SwStyleNameMapper::GetUIName( i, aFmtName ))) ::InsertStringSorted(aFmtName, aPageCollBox, 1 ); @@ -203,22 +206,22 @@ SwBreakDlg::SwBreakDlg( Window *pParent, SwWrtShell &rS ) : void SwBreakDlg::CheckEnable() { - BOOL bEnable = TRUE; + sal_Bool bEnable = sal_True; if ( bHtmlMode ) { - aColumnBtn .Enable(FALSE); - aPageCollBox.Enable(FALSE); - bEnable = FALSE; + aColumnBtn .Enable(sal_False); + aPageCollBox.Enable(sal_False); + bEnable = sal_False; } - else if(rSh.GetFrmType(0,TRUE) + else if(rSh.GetFrmType(0,sal_True) & (FRMTYPE_FLY_ANY | FRMTYPE_HEADER | FRMTYPE_FOOTER | FRMTYPE_FOOTNOTE)) { - aPageBtn.Enable(FALSE); + aPageBtn.Enable(sal_False); if(aPageBtn.IsChecked()) - aLineBtn.Check(TRUE); - bEnable = FALSE; + aLineBtn.Check(sal_True); + bEnable = sal_False; } - const BOOL bPage = aPageBtn.IsChecked(); + const sal_Bool bPage = aPageBtn.IsChecked(); aPageCollText.Enable( bPage ); aPageCollBox.Enable ( bPage ); @@ -226,9 +229,9 @@ void SwBreakDlg::CheckEnable() if ( bEnable ) { // position 0 says 'Without' page template. - const USHORT nPos = aPageCollBox.GetSelectEntryPos(); + const sal_uInt16 nPos = aPageCollBox.GetSelectEntryPos(); if ( 0 == nPos || LISTBOX_ENTRY_NOTFOUND == nPos ) - bEnable = FALSE; + bEnable = sal_False; } aPageNumBox .Enable(bEnable); aPageNumEdit.Enable(bEnable); diff --git a/sw/source/ui/chrdlg/ccoll.cxx b/sw/source/ui/chrdlg/ccoll.cxx index 8961b13e45..80461d7d6c 100644 --- a/sw/source/ui/chrdlg/ccoll.cxx +++ b/sw/source/ui/chrdlg/ccoll.cxx @@ -153,7 +153,7 @@ TYPEINIT1_AUTOFACTORY(SwCondCollItem, SfxPoolItem) ****************************************************************************/ -SwCondCollItem::SwCondCollItem(USHORT _nWhich ) : +SwCondCollItem::SwCondCollItem(sal_uInt16 _nWhich ) : SfxPoolItem(_nWhich) { @@ -171,23 +171,23 @@ SfxPoolItem* SwCondCollItem::Clone( SfxItemPool * /*pPool*/ ) const int SwCondCollItem::operator==( const SfxPoolItem& rItem) const { OSL_ENSURE( SfxPoolItem::operator==(rItem), "different types" ); - BOOL bReturn = TRUE; - for(USHORT i = 0; i < COND_COMMAND_COUNT; i++) + sal_Bool bReturn = sal_True; + for(sal_uInt16 i = 0; i < COND_COMMAND_COUNT; i++) if(sStyles[i] != ((SwCondCollItem&)rItem).sStyles[i]) { - bReturn = FALSE; + bReturn = sal_False; break; } return bReturn; } -const String& SwCondCollItem::GetStyle(USHORT nPos) const +const String& SwCondCollItem::GetStyle(sal_uInt16 nPos) const { return nPos < COND_COMMAND_COUNT ? sStyles[nPos] : aEmptyStr; } -void SwCondCollItem::SetStyle(const String* pStyle, USHORT nPos) +void SwCondCollItem::SetStyle(const String* pStyle, sal_uInt16 nPos) { if( nPos < COND_COMMAND_COUNT ) sStyles[nPos] = pStyle ? *pStyle : aEmptyStr; diff --git a/sw/source/ui/chrdlg/ccoll.src b/sw/source/ui/chrdlg/ccoll.src index 14afc8bb69..4245782d15 100644 --- a/sw/source/ui/chrdlg/ccoll.src +++ b/sw/source/ui/chrdlg/ccoll.src @@ -44,6 +44,7 @@ TabPage TP_CONDCOLL }; CheckBox CB_CONDITION { + HelpID = "sw:CheckBox:TP_CONDCOLL:CB_CONDITION"; Pos = MAP_APPFONT ( 12 , 14 ) ; Size = MAP_APPFONT ( 100 , 10 ) ; TabStop = TRUE ; @@ -83,6 +84,7 @@ TabPage TP_CONDCOLL }; ListBox LB_STYLE { + HelpID = "sw:ListBox:TP_CONDCOLL:LB_STYLE"; Pos = MAP_APPFONT ( 188 , 39 ) ; Size = MAP_APPFONT ( 60 , 108 ) ; TabStop = TRUE ; @@ -93,6 +95,7 @@ TabPage TP_CONDCOLL }; ListBox LB_FILTER { + HelpID = "sw:ListBox:TP_CONDCOLL:LB_FILTER"; Pos = MAP_APPFONT ( 188 , 150 ) ; Size = MAP_APPFONT ( 60 , 50 ) ; DropDown = TRUE ; @@ -103,6 +106,7 @@ TabPage TP_CONDCOLL }; PushButton PB_REMOVE { + HelpID = "sw:PushButton:TP_CONDCOLL:PB_REMOVE"; Pos = MAP_APPFONT ( 129 , 165 ) ; Size = MAP_APPFONT ( 50 , 12 ) ; TabStop = TRUE ; @@ -111,6 +115,7 @@ TabPage TP_CONDCOLL }; PushButton PB_ASSIGN { + HelpID = "sw:PushButton:TP_CONDCOLL:PB_ASSIGN"; Pos = MAP_APPFONT ( 185 , 165 ) ; Size = MAP_APPFONT ( 50 , 12 ) ; TabStop = TRUE ; diff --git a/sw/source/ui/chrdlg/chardlg.cxx b/sw/source/ui/chrdlg/chardlg.cxx index e451e07acf..4d305063fc 100644 --- a/sw/source/ui/chrdlg/chardlg.cxx +++ b/sw/source/ui/chrdlg/chardlg.cxx @@ -76,7 +76,7 @@ using namespace ::com::sun::star::uno; using namespace ::sfx2; SwCharDlg::SwCharDlg(Window* pParent, SwView& rVw, const SfxItemSet& rCoreSet, - const String* pStr, BOOL bIsDrwTxtDlg) : + const String* pStr, sal_Bool bIsDrwTxtDlg) : SfxTabDialog(pParent, SW_RES(DLG_CHAR), &rCoreSet, pStr != 0), rView(rVw), bIsDrwTxtMode(bIsDrwTxtDlg) @@ -119,7 +119,7 @@ SwCharDlg::~SwCharDlg() Description: set FontList --------------------------------------------------------------------*/ -void SwCharDlg::PageCreated( USHORT nId, SfxTabPage &rPage ) +void SwCharDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) { SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool())); switch( nId ) @@ -176,18 +176,20 @@ SwCharURLPage::SwCharURLPage( Window* pParent, aNotVisitedFT( this, SW_RES(FT_NOT_VISITED)), aNotVisitedLB( this, SW_RES(LB_NOT_VISITED)), pINetItem(0), - bModified(FALSE) + bModified(sal_False) { FreeResource(); + aEventPB.SetAccessibleRelationMemberOf(&aURLFL); + const SfxPoolItem* pItem; SfxObjectShell* pShell; - if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_HTML_MODE, FALSE, &pItem) || + if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_HTML_MODE, sal_False, &pItem) || ( 0 != ( pShell = SfxObjectShell::Current()) && 0 != (pItem = pShell->GetItem(SID_HTML_MODE)))) { - USHORT nHtmlMode = ((const SfxUInt16Item*)pItem)->GetValue(); + sal_uInt16 nHtmlMode = ((const SfxUInt16Item*)pItem)->GetValue(); if(HTMLMODE_ON & nHtmlMode) { aStyleFL.Hide(); @@ -233,7 +235,7 @@ SwCharURLPage::~SwCharURLPage() void SwCharURLPage::Reset(const SfxItemSet& rSet) { const SfxPoolItem* pItem; - if(SFX_ITEM_SET == rSet.GetItemState(RES_TXTATR_INETFMT, FALSE, &pItem)) + if(SFX_ITEM_SET == rSet.GetItemState(RES_TXTATR_INETFMT, sal_False, &pItem)) { const SwFmtINetFmt* pINetFmt = (const SwFmtINetFmt*)pItem; aURLED.SetText( INetURLObject::decode( pINetFmt->GetValue(), @@ -260,15 +262,15 @@ void SwCharURLPage::Reset(const SfxItemSet& rSet) if( pINetFmt->GetMacroTbl() ) pINetItem->SetMacroTable( *pINetFmt->GetMacroTbl() ); } - if(SFX_ITEM_SET == rSet.GetItemState(FN_PARAM_SELECTION, FALSE, &pItem)) + if(SFX_ITEM_SET == rSet.GetItemState(FN_PARAM_SELECTION, sal_False, &pItem)) { aTextED.SetText(((const SfxStringItem*)pItem)->GetValue()); - aTextFT.Enable( FALSE ); - aTextED.Enable( FALSE ); + aTextFT.Enable( sal_False ); + aTextED.Enable( sal_False ); } } -BOOL SwCharURLPage::FillItemSet(SfxItemSet& rSet) +sal_Bool SwCharURLPage::FillItemSet(SfxItemSet& rSet) { ::rtl::OUString sURL = aURLED.GetText(); if(sURL.getLength()) @@ -289,7 +291,7 @@ BOOL SwCharURLPage::FillItemSet(SfxItemSet& rSet) // set valid settings first String sEntry = aVisitedLB.GetSelectEntry(); - USHORT nId = SwStyleNameMapper::GetPoolIdFromUIName( sEntry, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT); + sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName( sEntry, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT); aINetFmt.SetVisitedFmtId(nId); aINetFmt.SetVisitedFmt(nId == RES_POOLCHR_INET_VISIT ? aEmptyStr : sEntry); @@ -302,14 +304,14 @@ BOOL SwCharURLPage::FillItemSet(SfxItemSet& rSet) aINetFmt.SetMacroTbl( &pINetItem->GetMacroTable() ); if(aVisitedLB.GetSavedValue() != aVisitedLB.GetSelectEntryPos()) - bModified = TRUE; + bModified = sal_True; if(aNotVisitedLB.GetSavedValue() != aNotVisitedLB.GetSelectEntryPos()) - bModified = TRUE; + bModified = sal_True; if(aTextED.IsModified()) { - bModified = TRUE; + bModified = sal_True; rSet.Put(SfxStringItem(FN_PARAM_SELECTION, aTextED.GetText())); } if(bModified) diff --git a/sw/source/ui/chrdlg/chardlg.src b/sw/source/ui/chrdlg/chardlg.src index e6a6a82729..ba39ec72a8 100644 --- a/sw/source/ui/chrdlg/chardlg.src +++ b/sw/source/ui/chrdlg/chardlg.src @@ -120,6 +120,7 @@ TabPage TP_CHAR_URL }; Edit ED_URL { + HelpID = "sw:Edit:TP_CHAR_URL:ED_URL"; Pos = MAP_APPFONT ( 88 , 15 ) ; Size = MAP_APPFONT ( 104 , 12 ) ; Border = TRUE ; @@ -127,6 +128,7 @@ TabPage TP_CHAR_URL }; PushButton PB_URL { + HelpID = "sw:PushButton:TP_CHAR_URL:PB_URL"; Pos = MAP_APPFONT ( 198 , 14 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; TabStop = TRUE ; @@ -140,6 +142,7 @@ TabPage TP_CHAR_URL }; Edit ED_TEXT { + HelpID = "sw:Edit:TP_CHAR_URL:ED_TEXT"; Pos = MAP_APPFONT ( 88 , 31 ) ; Size = MAP_APPFONT ( 104 , 12 ) ; Border = TRUE ; @@ -154,6 +157,7 @@ TabPage TP_CHAR_URL }; Edit ED_NAME { + HelpID = "sw:Edit:TP_CHAR_URL:ED_NAME"; Pos = MAP_APPFONT ( 88 , 47 ) ; Size = MAP_APPFONT ( 104 , 12 ) ; Border = TRUE ; @@ -168,6 +172,7 @@ TabPage TP_CHAR_URL }; ComboBox LB_TARGET { + HelpID = "sw:ComboBox:TP_CHAR_URL:LB_TARGET"; Pos = MAP_APPFONT ( 88 , 63 ) ; Size = MAP_APPFONT ( 104 , 60 ) ; TabStop = TRUE ; @@ -177,6 +182,7 @@ TabPage TP_CHAR_URL }; PushButton PB_EVENT { + HelpID = "sw:PushButton:TP_CHAR_URL:PB_EVENT"; Pos = MAP_APPFONT ( 12 , 79 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; TabStop = TRUE ; @@ -196,6 +202,7 @@ TabPage TP_CHAR_URL }; ListBox LB_VISITED { + HelpID = "sw:ListBox:TP_CHAR_URL:LB_VISITED"; Pos = MAP_APPFONT ( 88 , 113 ) ; Size = MAP_APPFONT ( 104 , 60 ) ; Border = TRUE ; @@ -212,6 +219,7 @@ TabPage TP_CHAR_URL }; ListBox LB_NOT_VISITED { + HelpID = "sw:ListBox:TP_CHAR_URL:LB_NOT_VISITED"; Pos = MAP_APPFONT ( 88 , 129 ) ; Size = MAP_APPFONT ( 104 , 60 ) ; Border = TRUE ; diff --git a/sw/source/ui/chrdlg/drpcps.cxx b/sw/source/ui/chrdlg/drpcps.cxx index b6f8cc59c0..6e1e9fce46 100644 --- a/sw/source/ui/chrdlg/drpcps.cxx +++ b/sw/source/ui/chrdlg/drpcps.cxx @@ -81,7 +81,7 @@ using namespace ::com::sun::star::lang; // Globals ****************************************************************** -static USHORT aPageRg[] = { +static sal_uInt16 aPageRg[] = { RES_PARATR_DROP, RES_PARATR_DROP, 0 }; @@ -92,14 +92,14 @@ class SwDropCapsPict : public Control String maScriptText; Color maBackColor; Color maTextLineColor; - BYTE mnLines; + sal_uInt8 mnLines; long mnTotLineH; long mnLineH; long mnTextH; - USHORT mnDistance; + sal_uInt16 mnDistance; sal_Int32 mnLeading; Printer* mpPrinter; - BOOL mbDelPrinter; + sal_Bool mbDelPrinter; SvULongs maTextWidth; SvXub_StrLens maScriptChg; SvUShorts maScriptType; @@ -114,7 +114,7 @@ class SwDropCapsPict : public Control Size CalcTextSize( void ); inline void InitPrinter( void ); void _InitPrinter( void ); - void GetFontSettings( const SwDropCapsPage& _rPage, Font& _rFont, USHORT _nWhich ); + void GetFontSettings( const SwDropCapsPage& _rPage, Font& _rFont, sal_uInt16 _nWhich ); public: SwDropCapsPict(Window *pParent, const ResId &rResId) @@ -123,16 +123,16 @@ public: , mnLineH(0) , mnTextH(0) , mpPrinter( NULL ) - , mbDelPrinter( FALSE ) + , mbDelPrinter( sal_False ) {} ~SwDropCapsPict(); void UpdatePaintSettings( void ); // also invalidates control! inline void SetText( const String& rT ); - inline void SetLines( BYTE nL ); - inline void SetDistance( USHORT nD ); - inline void SetValues( const String& rText, BYTE nLines, USHORT nDistance ); + inline void SetLines( sal_uInt8 nL ); + inline void SetDistance( sal_uInt16 nD ); + inline void SetValues( const String& rText, sal_uInt8 nLines, sal_uInt16 nDistance ); void DrawPrev( const Point& rPt ); }; @@ -143,19 +143,19 @@ inline void SwDropCapsPict::SetText( const String& rT ) UpdatePaintSettings(); } -inline void SwDropCapsPict::SetLines( BYTE nL ) +inline void SwDropCapsPict::SetLines( sal_uInt8 nL ) { mnLines = nL; UpdatePaintSettings(); } -inline void SwDropCapsPict::SetDistance( USHORT nD ) +inline void SwDropCapsPict::SetDistance( sal_uInt16 nD ) { mnDistance = nD; UpdatePaintSettings(); } -inline void SwDropCapsPict::SetValues( const String& rText, BYTE nLines, USHORT nDistance ) +inline void SwDropCapsPict::SetValues( const String& rText, sal_uInt8 nLines, sal_uInt16 nDistance ) { maText = rText; mnLines = nLines; @@ -175,10 +175,10 @@ inline void SwDropCapsPict::InitPrinter( void ) ****************************************************************************/ -String GetDefaultString(USHORT nChars) +String GetDefaultString(sal_uInt16 nChars) { String aStr; - for (USHORT i = 0; i < nChars; i++) + for (sal_uInt16 i = 0; i < nChars; i++) aStr += String((char) (i + 65)); return aStr; } @@ -203,7 +203,7 @@ static void calcFontHeightAnyAscent( OutputDevice* _pWin, Font& _rFont, long& _n #define LINES 10 #define BORDER 2 -void SwDropCapsPict::GetFontSettings( const SwDropCapsPage& _rPage, Font& _rFont, USHORT _nWhich ) +void SwDropCapsPict::GetFontSettings( const SwDropCapsPage& _rPage, Font& _rFont, sal_uInt16 _nWhich ) { SfxItemSet aSet( _rPage.rSh.GetAttrPool(), _nWhich, _nWhich); _rPage.rSh.GetCurAttr(aSet); @@ -246,7 +246,7 @@ void SwDropCapsPict::UpdatePaintSettings( void ) // CTL GetFontSettings( *pPage, maCTLFont, RES_CHRATR_CTL_FONT ); - pPage->rSh.Pop(FALSE); + pPage->rSh.Pop(sal_False); pPage->rSh.EndCrsrMove(); } else @@ -270,9 +270,9 @@ void SwDropCapsPict::UpdatePaintSettings( void ) maCJKFont.SetSize(Size(0, mnTextH)); maCTLFont.SetSize(Size(0, mnTextH)); - aFont.SetTransparent(TRUE); - maCJKFont.SetTransparent(TRUE); - maCTLFont.SetTransparent(TRUE); + aFont.SetTransparent(sal_True); + maCJKFont.SetTransparent(sal_True); + maCTLFont.SetTransparent(sal_True); aFont.SetColor( SwViewOption::GetFontColor() ); maCJKFont.SetColor( SwViewOption::GetFontColor() ); @@ -322,12 +322,12 @@ void SwDropCapsPict::Paint(const Rectangle &/*rRect*/) OSL_ENSURE(mnLineH > 0, "We cannot make it that small"); long nY0 = (aOutputSizePixel.Height() - (LINES * mnTotLineH)) / 2; SetFillColor( maTextLineColor ); - for (USHORT i = 0; i < LINES; ++i) + for (sal_uInt16 i = 0; i < LINES; ++i) DrawRect(Rectangle(Point(BORDER, nY0 + i * mnTotLineH), Size(aOutputSizePixel.Width() - 2 * BORDER, mnLineH))); // Text background with gap (240 twips ~ 1 line height) - ULONG lDistance = mnDistance; - USHORT nDistW = (USHORT) (ULONG) (((lDistance * 100) / 240) * mnTotLineH) / 100; + sal_uLong lDistance = mnDistance; + sal_uInt16 nDistW = (sal_uInt16) (sal_uLong) (((lDistance * 100) / 240) * mnTotLineH) / 100; SetFillColor( maBackColor ); if(((SwDropCapsPage*)GetParent())->aDropCapsBox.IsChecked()) { @@ -348,11 +348,11 @@ void SwDropCapsPict::DrawPrev( const Point& rPt ) InitPrinter(); Font aOldFont = mpPrinter->GetFont(); - USHORT nScript; - USHORT nIdx = 0; + sal_uInt16 nScript; + size_t nIdx = 0; xub_StrLen nStart = 0; xub_StrLen nEnd; - USHORT nCnt = maScriptChg.Count(); + size_t nCnt = maScriptChg.size(); if( nCnt ) { @@ -381,7 +381,7 @@ void SwDropCapsPict::DrawPrev( const Point& rPt ) else break; } - while( TRUE ); + while( sal_True ); mpPrinter->SetFont( aOldFont ); } @@ -391,10 +391,10 @@ void SwDropCapsPict::CheckScript( void ) return; maScriptText = maText; - USHORT nCnt = maScriptChg.Count(); + size_t nCnt = maScriptChg.size(); if( nCnt ) { - maScriptChg.Remove( 0, nCnt ); + maScriptChg.clear(); maScriptType.Remove( 0, nCnt ); maTextWidth.Remove( 0, nCnt ); nCnt = 0; @@ -407,8 +407,8 @@ void SwDropCapsPict::CheckScript( void ) } if( xBreak.is() ) { - USHORT nScript = xBreak->getScriptType( maText, 0 ); - USHORT nChg = 0; + sal_uInt16 nScript = xBreak->getScriptType( maText, 0 ); + sal_uInt16 nChg = 0; if( I18N_SCRIPTTYPE::WEAK == nScript ) { nChg = (xub_StrLen)xBreak->endOfScript( maText, nChg, nScript ); @@ -421,15 +421,15 @@ void SwDropCapsPict::CheckScript( void ) do { nChg = (xub_StrLen)xBreak->endOfScript( maText, nChg, nScript ); - maScriptChg.Insert( nChg, nCnt ); + maScriptChg.push_back( nChg ); maScriptType.Insert( nScript, nCnt ); - maTextWidth.Insert( ULONG(0), nCnt++ ); + maTextWidth.Insert( sal_uLong(0), nCnt++ ); if( nChg < maText.Len() ) nScript = xBreak->getScriptType( maText, nChg ); else break; - } while( TRUE ); + } while( sal_True ); } } @@ -437,11 +437,11 @@ Size SwDropCapsPict::CalcTextSize( void ) { InitPrinter(); - USHORT nScript; - USHORT nIdx = 0; + sal_uInt16 nScript; + size_t nIdx = 0; xub_StrLen nStart = 0; xub_StrLen nEnd; - USHORT nCnt = maScriptChg.Count(); + size_t nCnt = maScriptChg.size(); if( nCnt ) { nEnd = maScriptChg[ nIdx ]; @@ -463,7 +463,7 @@ Size SwDropCapsPict::CalcTextSize( void ) { SvxFont& rFnt = ( nScript == I18N_SCRIPTTYPE::ASIAN )? maCJKFont : ( ( nScript == I18N_SCRIPTTYPE::COMPLEX )? maCTLFont : maFont ); - ULONG nWidth = rFnt.GetTxtSize( mpPrinter, maText, nStart, nEnd-nStart ).Width(); + sal_uLong nWidth = rFnt.GetTxtSize( mpPrinter, maText, nStart, nEnd-nStart ).Width(); if( nIdx < maTextWidth.Count() ) maTextWidth[ nIdx++ ] = nWidth; @@ -489,7 +489,7 @@ Size SwDropCapsPict::CalcTextSize( void ) else break; } - while( TRUE ); + while( sal_True ); nHeight -= nAscent; nCJKHeight -= nCJKAscent; nCTLHeight -= nCTLAscent; @@ -517,7 +517,7 @@ void SwDropCapsPict::_InitPrinter() if ( !mpPrinter ) { mpPrinter = new Printer; - mbDelPrinter = TRUE; + mbDelPrinter = sal_True; } } @@ -527,7 +527,7 @@ SwDropCapsDlg::SwDropCapsDlg(Window *pParent, const SfxItemSet &rSet ) : { SwDropCapsPage* pNewPage = (SwDropCapsPage*) SwDropCapsPage::Create(this, rSet); - pNewPage->SetFormat(FALSE); + pNewPage->SetFormat(sal_False); SetTabPage(pNewPage); } @@ -538,7 +538,8 @@ SwDropCapsDlg::SwDropCapsDlg(Window *pParent, const SfxItemSet &rSet ) : SwDropCapsPage::SwDropCapsPage(Window *pParent, const SfxItemSet &rSet) : SfxTabPage(pParent, SW_RES(TP_DROPCAPS), rSet), - + + aSettingsFL (this, SW_RES(FL_SETTINGS)), aDropCapsBox (this, SW_RES(CB_SWITCH )), aWholeWordCB (this, SW_RES(CB_WORD )), aSwitchText (this, SW_RES(FT_DROPCAPS )), @@ -547,25 +548,24 @@ SwDropCapsPage::SwDropCapsPage(Window *pParent, const SfxItemSet &rSet) : aLinesField (this, SW_RES(FLD_LINES )), aDistanceText (this, SW_RES(TXT_DISTANCE)), aDistanceField(this, SW_RES(FLD_DISTANCE)), - aSettingsFL (this, SW_RES(FL_SETTINGS)), + aContentFL (this, SW_RES(FL_CONTENT )), aTextText (this, SW_RES(TXT_TEXT )), aTextEdit (this, SW_RES(EDT_TEXT )), aTemplateText (this, SW_RES(TXT_TEMPLATE)), aTemplateBox (this, SW_RES(BOX_TEMPLATE)), - aContentFL (this, SW_RES(FL_CONTENT )), - + pPict (new SwDropCapsPict(this, SW_RES(CNT_PICT))), - bModified(FALSE), - bFormat(TRUE), + bModified(sal_False), + bFormat(sal_True), rSh(::GetActiveView()->GetWrtShell()) { FreeResource(); SetExchangeSupport(); - USHORT nHtmlMode = ::GetHtmlMode((const SwDocShell*)SfxObjectShell::Current()); - bHtmlMode = nHtmlMode & HTMLMODE_ON ? TRUE : FALSE; + sal_uInt16 nHtmlMode = ::GetHtmlMode((const SwDocShell*)SfxObjectShell::Current()); + bHtmlMode = nHtmlMode & HTMLMODE_ON ? sal_True : sal_False; // In the template dialog the text is not influenceable aTextText.Enable( !bFormat ); @@ -614,7 +614,7 @@ SfxTabPage* SwDropCapsPage::Create(Window *pParent, Page: FillItemSet-Overload ****************************************************************************/ -BOOL SwDropCapsPage::FillItemSet(SfxItemSet &rSet) +sal_Bool SwDropCapsPage::FillItemSet(SfxItemSet &rSet) { if(bModified) FillSet(rSet); @@ -643,7 +643,7 @@ void SwDropCapsPage::Reset(const SfxItemSet &rSet) aDistanceField.SetValue(0); } - ::FillCharStyleListBox(aTemplateBox, rSh.GetView().GetDocShell(), TRUE); + ::FillCharStyleListBox(aTemplateBox, rSh.GetView().GetDocShell(), sal_True); aTemplateBox.InsertEntry(SW_RESSTR(SW_STR_NONE), 0); @@ -654,7 +654,7 @@ void SwDropCapsPage::Reset(const SfxItemSet &rSet) // Enable controls aDropCapsBox.Check(aFmtDrop.GetLines() > 1); - const USHORT nVal = USHORT(aDropCapsField.GetValue()); + const sal_uInt16 nVal = sal_uInt16(aDropCapsField.GetValue()); if (bFormat) aTextEdit.SetText(GetDefaultString(nVal)); else @@ -666,11 +666,11 @@ void SwDropCapsPage::Reset(const SfxItemSet &rSet) // Preview pPict->SetValues( aTextEdit.GetText(), - BYTE( aLinesField.GetValue() ), - USHORT( aDistanceField.Denormalize( aDistanceField.GetValue( FUNIT_TWIP ) ) ) ); + sal_uInt8( aLinesField.GetValue() ), + sal_uInt16( aDistanceField.Denormalize( aDistanceField.GetValue( FUNIT_TWIP ) ) ) ); ClickHdl(&aDropCapsBox); - bModified = FALSE; + bModified = sal_False; } /**************************************************************************** @@ -680,7 +680,7 @@ Page: CheckBox's Click-Handler IMPL_LINK( SwDropCapsPage, ClickHdl, Button *, EMPTYARG ) { - BOOL bChecked = aDropCapsBox.IsChecked(); + sal_Bool bChecked = aDropCapsBox.IsChecked(); aWholeWordCB .Enable( bChecked && !bHtmlMode ); @@ -703,7 +703,7 @@ IMPL_LINK( SwDropCapsPage, ClickHdl, Button *, EMPTYARG ) else pPict->SetText(aEmptyStr); - bModified = TRUE; + bModified = sal_True; return 0; } @@ -719,7 +719,7 @@ IMPL_LINK( SwDropCapsPage, WholeWordHdl, CheckBox *, EMPTYARG ) ModifyHdl(&aDropCapsField); - bModified = TRUE; + bModified = sal_True; return 0; } @@ -736,11 +736,11 @@ IMPL_LINK( SwDropCapsPage, ModifyHdl, Edit *, pEdit ) // set text if applicable if (pEdit == &aDropCapsField) { - USHORT nVal; - BOOL bSetText = FALSE; + sal_uInt16 nVal; + sal_Bool bSetText = sal_False; if (!aWholeWordCB.IsChecked()) - nVal = (USHORT)aDropCapsField.GetValue(); + nVal = (sal_uInt16)aDropCapsField.GetValue(); else nVal = 0; @@ -748,7 +748,7 @@ IMPL_LINK( SwDropCapsPage, ModifyHdl, Edit *, pEdit ) sPreview = GetDefaultString(nVal); else { - bSetText = TRUE; + bSetText = sal_True; sPreview = rSh.GetDropTxt(nVal); } @@ -757,7 +757,7 @@ IMPL_LINK( SwDropCapsPage, ModifyHdl, Edit *, pEdit ) if (sEdit.Len() && sPreview.CompareTo(sEdit, sEdit.Len()) != COMPARE_EQUAL) { sPreview = sEdit.Copy(0, sPreview.Len()); - bSetText = FALSE; + bSetText = sal_False; } if (bSetText) @@ -765,8 +765,8 @@ IMPL_LINK( SwDropCapsPage, ModifyHdl, Edit *, pEdit ) } else if (pEdit == &aTextEdit) // set quantity if applicable { - USHORT nTmp = aTextEdit.GetText().Len(); - aDropCapsField.SetValue(Max((USHORT)1, nTmp)); + sal_uInt16 nTmp = aTextEdit.GetText().Len(); + aDropCapsField.SetValue(Max((sal_uInt16)1, nTmp)); sPreview = aTextEdit.GetText().Copy(0, nTmp); } @@ -775,11 +775,11 @@ IMPL_LINK( SwDropCapsPage, ModifyHdl, Edit *, pEdit ) if (pEdit == &aDropCapsField || pEdit == &aTextEdit) pPict->SetText (sPreview); else if (pEdit == &aLinesField) - pPict->SetLines((BYTE)aLinesField.GetValue()); + pPict->SetLines((sal_uInt8)aLinesField.GetValue()); else - pPict->SetDistance((USHORT)aDistanceField.Denormalize(aDistanceField.GetValue(FUNIT_TWIP))); + pPict->SetDistance((sal_uInt16)aDistanceField.Denormalize(aDistanceField.GetValue(FUNIT_TWIP))); - bModified = TRUE; + bModified = sal_True; return 0; } @@ -792,12 +792,12 @@ Page: Template-Box' Select-Handler. IMPL_LINK_INLINE_START( SwDropCapsPage, SelectHdl, ListBox *, EMPTYARG ) { pPict->UpdatePaintSettings(); - bModified = TRUE; + bModified = sal_True; return 0; } IMPL_LINK_INLINE_END( SwDropCapsPage, SelectHdl, ListBox *, EMPTYARG ) -USHORT* SwDropCapsPage::GetRanges() +sal_uInt16* SwDropCapsPage::GetRanges() { return aPageRg; } @@ -808,13 +808,13 @@ void SwDropCapsPage::FillSet( SfxItemSet &rSet ) { SwFmtDrop aFmt; - BOOL bOn = aDropCapsBox.IsChecked(); + sal_Bool bOn = aDropCapsBox.IsChecked(); if(bOn) { // quantity, lines, gap - aFmt.GetChars() = (BYTE) aDropCapsField.GetValue(); - aFmt.GetLines() = (BYTE) aLinesField.GetValue(); - aFmt.GetDistance() = (USHORT) aDistanceField.Denormalize(aDistanceField.GetValue(FUNIT_TWIP)); + aFmt.GetChars() = (sal_uInt8) aDropCapsField.GetValue(); + aFmt.GetLines() = (sal_uInt8) aLinesField.GetValue(); + aFmt.GetDistance() = (sal_uInt16) aDistanceField.Denormalize(aDistanceField.GetValue(FUNIT_TWIP)); aFmt.GetWholeWord() = aWholeWordCB.IsChecked(); // template diff --git a/sw/source/ui/chrdlg/drpcps.src b/sw/source/ui/chrdlg/drpcps.src index 473deefe2e..c07085f9f9 100644 --- a/sw/source/ui/chrdlg/drpcps.src +++ b/sw/source/ui/chrdlg/drpcps.src @@ -58,12 +58,14 @@ TabPage TP_DROPCAPS Hide = TRUE ; CheckBox CB_SWITCH { + HelpID = "sw:CheckBox:TP_DROPCAPS:CB_SWITCH"; Pos = MAP_APPFONT ( 12 , 14 ) ; Size = MAP_APPFONT ( 90 , 10 ) ; Text [ en-US ] = "Display drop caps" ; }; CheckBox CB_WORD { + HelpID = "sw:CheckBox:TP_DROPCAPS:CB_WORD"; Pos = MAP_APPFONT ( 12 , 28 ) ; Size = MAP_APPFONT ( 90 , 10 ) ; Text [ en-US ] = "~Whole word" ; @@ -76,6 +78,7 @@ TabPage TP_DROPCAPS }; NumericField FLD_DROPCAPS { + HelpID = "sw:NumericField:TP_DROPCAPS:FLD_DROPCAPS"; Border = TRUE ; First = 1 ; Last = 9 ; @@ -97,6 +100,7 @@ TabPage TP_DROPCAPS }; NumericField FLD_LINES { + HelpID = "sw:NumericField:TP_DROPCAPS:FLD_LINES"; Border = TRUE ; First = 2 ; Last = 9 ; @@ -118,6 +122,7 @@ TabPage TP_DROPCAPS }; MetricField FLD_DISTANCE { + HelpID = "sw:MetricField:TP_DROPCAPS:FLD_DISTANCE"; Border = TRUE ; DecimalDigits = 2 ; First = 0 ; @@ -154,6 +159,7 @@ TabPage TP_DROPCAPS }; Edit EDT_TEXT { + HelpID = "sw:Edit:TP_DROPCAPS:EDT_TEXT"; Border = TRUE ; Left = TRUE ; Pos = MAP_APPFONT ( 143 , 100 ) ; @@ -170,6 +176,7 @@ TabPage TP_DROPCAPS }; ListBox BOX_TEMPLATE { + HelpID = "sw:ListBox:TP_DROPCAPS:BOX_TEMPLATE"; Border = TRUE ; DropDown = TRUE ; Pos = MAP_APPFONT ( 143 , 116 ) ; diff --git a/sw/source/ui/chrdlg/makefile.mk b/sw/source/ui/chrdlg/makefile.mk deleted file mode 100644 index 8d8c3624b3..0000000000 --- a/sw/source/ui/chrdlg/makefile.mk +++ /dev/null @@ -1,72 +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=chrdlg -LIBTARGET=NO -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -SRS1NAME=$(TARGET) -SRC1FILES = \ - swbreak.src \ - chardlg.src \ - chrdlg.src \ - drpcps.src \ - ccoll.src \ - paradlg.src \ - numpara.src - -EXCEPTIONSFILES = \ - $(SLO)$/break.obj \ - $(SLO)$/ccoll.obj \ - $(SLO)$/chardlg.obj \ - $(SLO)$/drpcps.obj \ - $(SLO)$/numpara.obj \ - $(SLO)$/pardlg.obj \ - $(SLO)$/swuiccoll.obj \ - $(SLO)$/tblnumfm.obj - -SLOFILES = \ - $(EXCEPTIONSFILES) - -LIB1TARGET = $(SLB)$/$(TARGET).lib - -LIB1OBJFILES = \ - $(SLO)$/ccoll.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/ui/chrdlg/numpara.cxx b/sw/source/ui/chrdlg/numpara.cxx index a1e64f6e55..f40b27fc35 100644 --- a/sw/source/ui/chrdlg/numpara.cxx +++ b/sw/source/ui/chrdlg/numpara.cxx @@ -53,7 +53,7 @@ // Globals ****************************************************************** -static USHORT aPageRg[] = { +static sal_uInt16 aPageRg[] = { FN_NUMBER_NEWSTART, FN_NUMBER_NEWSTART_AT, 0 }; @@ -64,10 +64,10 @@ SwParagraphNumTabPage::SwParagraphNumTabPage(Window* pParent, aOutlineStartFL ( this, SW_RES( FL_OUTLINE_START )), aOutlineLvFT ( this, SW_RES( FT_OUTLINE_LEVEL )), aOutlineLvLB ( this, SW_RES( LB_OUTLINE_LEVEL )), + aNewStartFL ( this, SW_RES( FL_NEW_START ) ), aNumberStyleFT ( this, SW_RES( FT_NUMBER_STYLE ) ), aNumberStyleLB ( this, SW_RES( LB_NUMBER_STYLE ) ), - aNewStartFL ( this, SW_RES( FL_NEW_START ) ), - aNewStartCB ( this, SW_RES( CB_NEW_START ) ), + aNewStartCB ( this, SW_RES( CB_NEW_START ) ), aNewStartNumberCB ( this, SW_RES( CB_NUMBER_NEW_START ) ), aNewStartNF ( this, SW_RES( NF_NEW_START ) ), aCountParaFL ( this, SW_RES( FL_COUNT_PARA ) ), @@ -76,18 +76,18 @@ SwParagraphNumTabPage::SwParagraphNumTabPage(Window* pParent, aRestartFT ( this, SW_RES( FT_RESTART_NO ) ), aRestartNF ( this, SW_RES( NF_RESTART_PARA ) ), msOutlineNumbering( SW_RES( STR_OUTLINE_NUMBERING ) ), - bModified(FALSE), - bCurNumrule(FALSE) + bModified(sal_False), + bCurNumrule(sal_False) { FreeResource(); const SfxPoolItem* pItem; SfxObjectShell* pObjSh; - if(SFX_ITEM_SET == rAttr.GetItemState(SID_HTML_MODE, FALSE, &pItem) || + if(SFX_ITEM_SET == rAttr.GetItemState(SID_HTML_MODE, sal_False, &pItem) || ( 0 != ( pObjSh = SfxObjectShell::Current()) && 0 != (pItem = pObjSh->GetItem(SID_HTML_MODE)))) { - USHORT nHtmlMode = ((const SfxUInt16Item*)pItem)->GetValue(); + sal_uInt16 nHtmlMode = ((const SfxUInt16Item*)pItem)->GetValue(); if(HTMLMODE_ON & nHtmlMode) { aCountParaFL .Hide(); @@ -104,6 +104,8 @@ SwParagraphNumTabPage::SwParagraphNumTabPage(Window* pParent, SwParagraphNumTabPage, LineCountHdl_Impl)); aRestartParaCountCB.SetClickHdl( LINK(this, SwParagraphNumTabPage, LineCountHdl_Impl)); + aNewStartNF.SetAccessibleName(aNewStartNumberCB.GetText()); + aNewStartNF.SetAccessibleRelationLabeledBy(&aNewStartNumberCB); } SwParagraphNumTabPage::~SwParagraphNumTabPage() @@ -116,22 +118,22 @@ SfxTabPage* SwParagraphNumTabPage::Create( Window* pParent, return new SwParagraphNumTabPage(pParent, rSet); } -USHORT* SwParagraphNumTabPage::GetRanges() +sal_uInt16* SwParagraphNumTabPage::GetRanges() { return aPageRg; } -BOOL SwParagraphNumTabPage::FillItemSet( SfxItemSet& rSet ) +sal_Bool SwParagraphNumTabPage::FillItemSet( SfxItemSet& rSet ) { if( aOutlineLvLB.GetSelectEntryPos() != aOutlineLvLB.GetSavedValue()) { - USHORT aOutlineLv = aOutlineLvLB.GetSelectEntryPos(); + sal_uInt16 aOutlineLv = aOutlineLvLB.GetSelectEntryPos(); const SfxUInt16Item* pOldOutlineLv = (const SfxUInt16Item*)GetOldItem( rSet, SID_ATTR_PARA_OUTLINE_LEVEL); SfxUInt16Item* pOutlineLv = (SfxUInt16Item*)pOldOutlineLv->Clone(); pOutlineLv->SetValue( aOutlineLv ); rSet.Put(*pOutlineLv); delete pOutlineLv; - bModified = TRUE; + bModified = sal_True; } if( aNumberStyleLB.GetSelectEntryPos() != aNumberStyleLB.GetSavedValue()) @@ -144,18 +146,18 @@ BOOL SwParagraphNumTabPage::FillItemSet( SfxItemSet& rSet ) pRule->SetValue(aStyle); rSet.Put(*pRule); delete pRule; - bModified = TRUE; + bModified = sal_True; } if(aNewStartCB.GetState() != aNewStartCB.GetSavedValue() || aNewStartNumberCB.GetState() != aNewStartNumberCB.GetSavedValue()|| aNewStartNF.GetText() != aNewStartNF.GetSavedValue()) { - bModified = TRUE; - BOOL bNewStartChecked = STATE_CHECK == aNewStartCB.GetState(); - BOOL bNumberNewStartChecked = STATE_CHECK == aNewStartNumberCB.GetState(); + bModified = sal_True; + sal_Bool bNewStartChecked = STATE_CHECK == aNewStartCB.GetState(); + sal_Bool bNumberNewStartChecked = STATE_CHECK == aNewStartNumberCB.GetState(); rSet.Put(SfxBoolItem(FN_NUMBER_NEWSTART, bNewStartChecked)); rSet.Put(SfxUInt16Item(FN_NUMBER_NEWSTART_AT, - bNumberNewStartChecked && bNewStartChecked ? (USHORT)aNewStartNF.GetValue() : USHRT_MAX)); + bNumberNewStartChecked && bNewStartChecked ? (sal_uInt16)aNewStartNF.GetValue() : USHRT_MAX)); } if(aCountParaCB.GetSavedValue() != aCountParaCB.GetState() || @@ -163,18 +165,18 @@ BOOL SwParagraphNumTabPage::FillItemSet( SfxItemSet& rSet ) aRestartNF.GetSavedValue() != aRestartNF.GetText() ) { SwFmtLineNumber aFmt; - aFmt.SetStartValue( static_cast< ULONG >(aRestartParaCountCB.GetState() == STATE_CHECK ? + aFmt.SetStartValue( static_cast< sal_uLong >(aRestartParaCountCB.GetState() == STATE_CHECK ? aRestartNF.GetValue() : 0 )); aFmt.SetCountLines( aCountParaCB.IsChecked() ); rSet.Put(aFmt); - bModified = TRUE; + bModified = sal_True; } return bModified; } void SwParagraphNumTabPage::Reset( const SfxItemSet& rSet ) { - BOOL bHasNumberStyle = FALSE; + sal_Bool bHasNumberStyle = sal_False; SfxItemState eItemState = rSet.GetItemState( GetWhich(SID_ATTR_PARA_OUTLINE_LEVEL) ); @@ -209,7 +211,7 @@ void SwParagraphNumTabPage::Reset( const SfxItemSet& rSet ) else aNumberStyleLB.SelectEntry( aStyle ); - bHasNumberStyle = TRUE; + bHasNumberStyle = sal_True; } else { @@ -221,12 +223,12 @@ void SwParagraphNumTabPage::Reset( const SfxItemSet& rSet ) eItemState = rSet.GetItemState( FN_NUMBER_NEWSTART ); if(eItemState > SFX_ITEM_AVAILABLE ) { - bCurNumrule = TRUE; + bCurNumrule = sal_True; const SfxBoolItem& rStart = (const SfxBoolItem&)rSet.Get(FN_NUMBER_NEWSTART); aNewStartCB.SetState( rStart.GetValue() ? STATE_CHECK : STATE_NOCHECK ); - aNewStartCB.EnableTriState(FALSE); + aNewStartCB.EnableTriState(sal_False); } else aNewStartCB.SetState(bHasNumberStyle ? STATE_NOCHECK : STATE_DONTKNOW); @@ -235,13 +237,13 @@ void SwParagraphNumTabPage::Reset( const SfxItemSet& rSet ) eItemState = rSet.GetItemState( FN_NUMBER_NEWSTART_AT); if( eItemState > SFX_ITEM_AVAILABLE ) { - USHORT nNewStart = ((const SfxUInt16Item&)rSet.Get(FN_NUMBER_NEWSTART_AT)).GetValue(); + sal_uInt16 nNewStart = ((const SfxUInt16Item&)rSet.Get(FN_NUMBER_NEWSTART_AT)).GetValue(); aNewStartNumberCB.Check(USHRT_MAX != nNewStart); if(USHRT_MAX == nNewStart) nNewStart = 1; aNewStartNF.SetValue(nNewStart); - aNewStartNumberCB.EnableTriState(FALSE); + aNewStartNumberCB.EnableTriState(sal_False); } else aNewStartCB.SetState(STATE_DONTKNOW); @@ -252,14 +254,14 @@ void SwParagraphNumTabPage::Reset( const SfxItemSet& rSet ) if( SFX_ITEM_AVAILABLE <= rSet.GetItemState(RES_LINENUMBER)) { SwFmtLineNumber& rNum = (SwFmtLineNumber&)rSet.Get(RES_LINENUMBER); - ULONG nStartValue = rNum.GetStartValue(); - BOOL bCount = rNum.IsCount(); + sal_uLong nStartValue = rNum.GetStartValue(); + sal_Bool bCount = rNum.IsCount(); aCountParaCB.SetState( bCount ? STATE_CHECK : STATE_NOCHECK ); aRestartParaCountCB.SetState( 0 != nStartValue ? STATE_CHECK : STATE_NOCHECK ); aRestartNF.SetValue(nStartValue == 0 ? 1 : nStartValue); LineCountHdl_Impl(&aCountParaCB); - aCountParaCB.EnableTriState(FALSE); - aRestartParaCountCB.EnableTriState(FALSE); + aCountParaCB.EnableTriState(sal_False); + aRestartParaCountCB.EnableTriState(sal_False); } else { @@ -270,7 +272,7 @@ void SwParagraphNumTabPage::Reset( const SfxItemSet& rSet ) aRestartParaCountCB.SaveValue(); aRestartNF.SaveValue(); - bModified = FALSE; + bModified = sal_False; } void SwParagraphNumTabPage::DisableOutline() @@ -294,7 +296,7 @@ void SwParagraphNumTabPage::EnableNewStart() IMPL_LINK( SwParagraphNumTabPage, NewStartHdl_Impl, CheckBox*, EMPTYARG ) { - BOOL bEnable = aNewStartCB.IsChecked(); + sal_Bool bEnable = aNewStartCB.IsChecked(); aNewStartNumberCB.Enable(bEnable); aNewStartNF.Enable(bEnable && aNewStartNumberCB.IsChecked()); return 0; @@ -304,7 +306,7 @@ IMPL_LINK( SwParagraphNumTabPage, LineCountHdl_Impl, CheckBox* , EMPTYARG) { aRestartParaCountCB.Enable(aCountParaCB.IsChecked()); - BOOL bEnableRestartValue = aRestartParaCountCB.IsEnabled() && + sal_Bool bEnableRestartValue = aRestartParaCountCB.IsEnabled() && aRestartParaCountCB.IsChecked(); aRestartFT.Enable(bEnableRestartValue); aRestartNF.Enable(bEnableRestartValue); @@ -314,7 +316,7 @@ IMPL_LINK( SwParagraphNumTabPage, LineCountHdl_Impl, CheckBox* , EMPTYARG) IMPL_LINK( SwParagraphNumTabPage, StyleHdl_Impl, ListBox*, pBox ) { - BOOL bEnable = bCurNumrule || pBox->GetSelectEntryPos() > 0; + sal_Bool bEnable = bCurNumrule || pBox->GetSelectEntryPos() > 0; aNewStartCB.Enable(bEnable); NewStartHdl_Impl(&aNewStartCB); diff --git a/sw/source/ui/chrdlg/numpara.src b/sw/source/ui/chrdlg/numpara.src index df83af40ce..9d2e30a64c 100644 --- a/sw/source/ui/chrdlg/numpara.src +++ b/sw/source/ui/chrdlg/numpara.src @@ -50,6 +50,7 @@ TabPage TP_NUMPARA }; ListBox LB_OUTLINE_LEVEL { + HelpID = "sw:ListBox:TP_NUMPARA:LB_OUTLINE_LEVEL"; Pos = MAP_APPFONT ( 130 , 14 ) ; Size = MAP_APPFONT ( 118 , 65 ) ; DropDown = TRUE ; @@ -97,6 +98,7 @@ TabPage TP_NUMPARA }; ListBox LB_NUMBER_STYLE { + HelpID = "sw:ListBox:TP_NUMPARA:LB_NUMBER_STYLE"; Pos = MAP_APPFONT ( 130 , 41 ) ; Size = MAP_APPFONT ( 118 , 65 ) ; DropDown = TRUE ; @@ -108,6 +110,7 @@ TabPage TP_NUMPARA }; TriStateBox CB_NEW_START { + HelpID = "sw:TriStateBox:TP_NUMPARA:CB_NEW_START"; Pos = MAP_APPFONT ( 12 , 58 ) ; Size = MAP_APPFONT ( 160 , 10 ) ; Hide = TRUE ; @@ -116,6 +119,7 @@ TabPage TP_NUMPARA }; TriStateBox CB_NUMBER_NEW_START { + HelpID = "sw:TriStateBox:TP_NUMPARA:CB_NUMBER_NEW_START"; Pos = MAP_APPFONT ( 21 , 73 ) ; Size = MAP_APPFONT ( 103 , 10 ) ; Hide = TRUE ; @@ -124,6 +128,7 @@ TabPage TP_NUMPARA }; NumericField NF_NEW_START { + HelpID = "sw:NumericField:TP_NUMPARA:NF_NEW_START"; Border = TRUE ; Pos = MAP_APPFONT ( 130 , 72 ) ; Size = MAP_APPFONT ( 26 , 12 ) ; @@ -147,6 +152,7 @@ TabPage TP_NUMPARA }; TriStateBox CB_COUNT_PARA { + HelpID = "sw:TriStateBox:TP_NUMPARA:CB_COUNT_PARA"; Pos = MAP_APPFONT ( 12 , 100 ) ; Size = MAP_APPFONT ( 160 , 10 ) ; TabStop = TRUE ; @@ -154,6 +160,7 @@ TabPage TP_NUMPARA }; TriStateBox CB_RESTART_PARACOUNT { + HelpID = "sw:TriStateBox:TP_NUMPARA:CB_RESTART_PARACOUNT"; Pos = MAP_APPFONT ( 12 , 116 ) ; Size = MAP_APPFONT ( 160 , 10 ) ; TabStop = TRUE ; @@ -168,6 +175,7 @@ TabPage TP_NUMPARA }; NumericField NF_RESTART_PARA { + HelpID = "sw:NumericField:TP_NUMPARA:NF_RESTART_PARA"; Border = TRUE ; Pos = MAP_APPFONT ( 130 , 130 ) ; Size = MAP_APPFONT ( 26 , 12 ) ; diff --git a/sw/source/ui/chrdlg/pardlg.cxx b/sw/source/ui/chrdlg/pardlg.cxx index 528ba28f4a..86f5f31080 100644 --- a/sw/source/ui/chrdlg/pardlg.cxx +++ b/sw/source/ui/chrdlg/pardlg.cxx @@ -69,10 +69,10 @@ SwParaDlg::SwParaDlg(Window *pParent, SwView& rVw, const SfxItemSet& rCoreSet, - BYTE nDialogMode, + sal_uInt8 nDialogMode, const String *pTitle, - BOOL bDraw, - UINT16 nDefPage): + sal_Bool bDraw, + sal_uInt16 nDefPage): SfxTabDialog(pParent, bDraw ? SW_RES(DLG_DRAWPARA) : SW_RES(DLG_PARA), &rCoreSet, 0 != pTitle), @@ -85,7 +85,7 @@ SwParaDlg::SwParaDlg(Window *pParent, FreeResource(); nHtmlMode = ::GetHtmlMode(rVw.GetDocShell()); - BOOL bHtmlMode = static_cast< BOOL >(nHtmlMode & HTMLMODE_ON); + sal_Bool bHtmlMode = static_cast< sal_Bool >(nHtmlMode & HTMLMODE_ON); if(pTitle) { // Update title @@ -126,8 +126,8 @@ SwParaDlg::SwParaDlg(Window *pParent, else RemoveTabPage(TP_PARA_ASIAN); - USHORT nWhich(rCoreSet.GetPool()->GetWhich(SID_ATTR_LRSPACE)); - BOOL bLRValid = SFX_ITEM_AVAILABLE <= rCoreSet.GetItemState(nWhich); + sal_uInt16 nWhich(rCoreSet.GetPool()->GetWhich(SID_ATTR_LRSPACE)); + sal_Bool bLRValid = SFX_ITEM_AVAILABLE <= rCoreSet.GetItemState(nWhich); if(bHtmlMode || !bLRValid) RemoveTabPage(TP_TABULATOR); else @@ -181,7 +181,7 @@ SwParaDlg::~SwParaDlg() } -void SwParaDlg::PageCreated(USHORT nId, SfxTabPage& rPage) +void SwParaDlg::PageCreated(sal_uInt16 nId, SfxTabPage& rPage) { SwWrtShell& rSh = rView.GetWrtShell(); SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool())); @@ -195,7 +195,7 @@ void SwParaDlg::PageCreated(USHORT nId, SfxTabPage& rPage) else if( nId == TP_PARA_STD ) { aSet.Put(SfxUInt16Item(SID_SVXSTDPARAGRAPHTABPAGE_PAGEWIDTH, - static_cast< UINT16 >(rSh.GetAnyCurRect(RECT_PAGE_PRT).Width()) )); + static_cast< sal_uInt16 >(rSh.GetAnyCurRect(RECT_PAGE_PRT).Width()) )); if (!bDrawParaDlg) { @@ -209,24 +209,24 @@ void SwParaDlg::PageCreated(USHORT nId, SfxTabPage& rPage) { if (!bDrawParaDlg) { - aSet.Put(SfxBoolItem(SID_SVXPARAALIGNTABPAGE_ENABLEJUSTIFYEXT,TRUE)); + aSet.Put(SfxBoolItem(SID_SVXPARAALIGNTABPAGE_ENABLEJUSTIFYEXT,sal_True)); rPage.PageCreated(aSet); } } else if( TP_PARA_EXT == nId ) { // pagebreak only when the cursor is in the body-area and not in a table - const USHORT eType = rSh.GetFrmType(0,TRUE); + const sal_uInt16 eType = rSh.GetFrmType(0,sal_True); if( !(FRMTYPE_BODY & eType) || rSh.GetSelectionType() & nsSelectionType::SEL_TBL ) { - aSet.Put(SfxBoolItem(SID_DISABLE_SVXEXTPARAGRAPHTABPAGE_PAGEBREAK,TRUE)); + aSet.Put(SfxBoolItem(SID_DISABLE_SVXEXTPARAGRAPHTABPAGE_PAGEBREAK,sal_True)); rPage.PageCreated(aSet); } } else if( TP_DROPCAPS == nId ) { - ((SwDropCapsPage&)rPage).SetFormat(FALSE); + ((SwDropCapsPage&)rPage).SetFormat(sal_False); } else if( TP_BACKGROUND == nId ) { @@ -256,7 +256,7 @@ void SwParaDlg::PageCreated(USHORT nId, SfxTabPage& rPage) aNames.Insert(new String(pBase->GetName())); pBase = pPool->Next(); } - for(USHORT i = 0; i < aNames.Count(); i++) + for(sal_uInt16 i = 0; i < aNames.Count(); i++) rBox.InsertEntry(*aNames.GetObject(i)); } diff --git a/sw/source/ui/chrdlg/swbreak.src b/sw/source/ui/chrdlg/swbreak.src index 742b760f4e..198c4d63e7 100644 --- a/sw/source/ui/chrdlg/swbreak.src +++ b/sw/source/ui/chrdlg/swbreak.src @@ -32,7 +32,7 @@ // #define DLG_BREAK 256 ModalDialog DLG_BREAK { - HelpID = FN_INSERT_BREAK_DLG ; + HelpID = CMD_FN_INSERT_BREAK_DLG ; OutputSize = TRUE ; SVLook = TRUE ; Size = MAP_APPFONT ( 161 , 114 ) ; @@ -62,6 +62,7 @@ ModalDialog DLG_BREAK }; RadioButton RB_LINE { + HelpID = "sw:RadioButton:DLG_BREAK:RB_LINE"; Pos = MAP_APPFONT ( 12 , 15 ) ; Size = MAP_APPFONT ( 63 , 10 ) ; Text [ en-US ] = "~Line break" ; @@ -70,6 +71,7 @@ ModalDialog DLG_BREAK }; RadioButton RB_PAGE { + HelpID = "sw:RadioButton:DLG_BREAK:RB_PAGE"; Pos = MAP_APPFONT ( 12 , 39 ) ; Size = MAP_APPFONT ( 63 , 10 ) ; Text [ en-US ] = "~Page break" ; @@ -78,6 +80,7 @@ ModalDialog DLG_BREAK }; RadioButton RB_COL { + HelpID = "sw:RadioButton:DLG_BREAK:RB_COL"; Pos = MAP_APPFONT ( 12 , 27 ) ; Size = MAP_APPFONT ( 69 , 10 ) ; Text [ en-US ] = "~Column break" ; @@ -99,6 +102,7 @@ ModalDialog DLG_BREAK }; ListBox LB_COLL { + HelpID = "sw:ListBox:DLG_BREAK:LB_COLL"; Pos = MAP_APPFONT ( 12 , 62 ) ; Size = MAP_APPFONT ( 75 , 50 ) ; TabStop = TRUE ; @@ -111,6 +115,7 @@ ModalDialog DLG_BREAK }; CheckBox CB_PAGENUM { + HelpID = "sw:CheckBox:DLG_BREAK:CB_PAGENUM"; Pos = MAP_APPFONT ( 12 , 79 ) ; Size = MAP_APPFONT ( 84 , 10 ) ; Text [ en-US ] = "Change page ~number" ; @@ -118,6 +123,7 @@ ModalDialog DLG_BREAK }; NumericField ED_PAGENUM { + HelpID = "sw:NumericField:DLG_BREAK:ED_PAGENUM"; Border = TRUE ; Pos = MAP_APPFONT ( 12 , 94 ) ; Size = MAP_APPFONT ( 31 , 12 ) ; diff --git a/sw/source/ui/chrdlg/swuiccoll.cxx b/sw/source/ui/chrdlg/swuiccoll.cxx index 0e91fa8d15..bea4b16fd0 100644 --- a/sw/source/ui/chrdlg/swuiccoll.cxx +++ b/sw/source/ui/chrdlg/swuiccoll.cxx @@ -56,7 +56,7 @@ #include "swuiccoll.hxx" -static USHORT aPageRg[] = { +static sal_uInt16 aPageRg[] = { FN_COND_COLL, FN_COND_COLL, 0 }; @@ -86,11 +86,15 @@ SwCondCollPage::SwCondCollPage(Window *pParent, const SfxItemSet &rSet) pCmds( SwCondCollItem::GetCmds() ), pFmt(0), - bNewTemplate(FALSE) + bNewTemplate(sal_False) { FreeResource(); SetExchangeSupport(); + aRemovePB.SetAccessibleRelationMemberOf(&aConditionFL); + aAssignPB.SetAccessibleRelationMemberOf(&aConditionFL); + aTbLinks.SetAccessibleRelationLabeledBy(&aConditionCB); + // Install handlers aConditionCB.SetClickHdl( LINK(this, SwCondCollPage, OnOffHdl)); aTbLinks.SetDoubleClickHdl( LINK(this, SwCondCollPage, AssignRemoveHdl )); @@ -101,7 +105,7 @@ SwCondCollPage::SwCondCollPage(Window *pParent, const SfxItemSet &rSet) aStyleLB.SetSelectHdl( LINK(this, SwCondCollPage, SelectHdl)); aFilterLB.SetSelectHdl( LINK(this, SwCondCollPage, SelectHdl)); - aTbLinks.SetWindowBits(WB_HSCROLL|WB_CLIPCHILDREN); + aTbLinks.SetStyle(aTbLinks.GetStyle()|WB_HSCROLL|WB_CLIPCHILDREN); aTbLinks.SetSelectionMode( SINGLE_SELECTION ); aTbLinks.SetTabs( &nTabs[0], MAP_APPFONT ); aTbLinks.Resize(); // OS: Hack for the right selection @@ -114,7 +118,7 @@ SwCondCollPage::SwCondCollPage(Window *pParent, const SfxItemSet &rSet) size_t nCount = aFamilies.size(); for( size_t i = 0; i < nCount; ++i ) { - if(SFX_STYLE_FAMILY_PARA == (USHORT)(pFamilyItem = aFamilies.at( i ))->GetFamily()) + if(SFX_STYLE_FAMILY_PARA == (sal_uInt16)(pFamilyItem = aFamilies.at( i ))->GetFamily()) break; } @@ -122,7 +126,7 @@ SwCondCollPage::SwCondCollPage(Window *pParent, const SfxItemSet &rSet) for( size_t i = 0; i < rFilterList.size(); ++i ) { aFilterLB.InsertEntry( rFilterList[ i ]->aName); - USHORT* pFilter = new USHORT( rFilterList[ i ]->nFlags); + sal_uInt16* pFilter = new sal_uInt16(rFilterList[i]->nFlags); aFilterLB.SetEntryData(i, pFilter); } aFilterLB.SelectEntryPos(1); @@ -138,8 +142,8 @@ Page: Dtor SwCondCollPage::~SwCondCollPage() { - for(USHORT i = 0; i < aFilterLB.GetEntryCount(); ++i) - delete (USHORT*)aFilterLB.GetEntryData(i); + for(sal_uInt16 i = 0; i < aFilterLB.GetEntryCount(); ++i) + delete (sal_uInt16*)aFilterLB.GetEntryData(i); } @@ -167,11 +171,11 @@ Page: FillItemSet-Overload ****************************************************************************/ -BOOL SwCondCollPage::FillItemSet(SfxItemSet &rSet) +sal_Bool SwCondCollPage::FillItemSet(SfxItemSet &rSet) { - BOOL bModified = TRUE; + sal_Bool bModified = sal_True; SwCondCollItem aCondItem; - for(USHORT i = 0; i < aStrArr.Count(); i++) + for(sal_uInt16 i = 0; i < aStrArr.Count(); i++) { String sEntry = aTbLinks.GetEntryText(i, 1); aCondItem.SetStyle( &sEntry, i); @@ -207,7 +211,7 @@ void SwCondCollPage::Reset(const SfxItemSet &/*rSet*/) } aStyleLB.SelectEntryPos(0); - for( USHORT n = 0; n < aStrArr.Count(); n++) + for( sal_uInt16 n = 0; n < aStrArr.Count(); n++) { String aEntry( aStrArr.GetString(n) ); aEntry += '\t'; @@ -228,17 +232,17 @@ void SwCondCollPage::Reset(const SfxItemSet &/*rSet*/) } -USHORT* SwCondCollPage::GetRanges() +sal_uInt16* SwCondCollPage::GetRanges() { return aPageRg; } IMPL_LINK( SwCondCollPage, OnOffHdl, CheckBox*, pBox ) { - const BOOL bEnable = pBox->IsChecked(); + const sal_Bool bEnable = pBox->IsChecked(); aContextFT.Enable( bEnable ); aUsedFT .Enable( bEnable ); - aTbLinks .EnableList( bEnable != FALSE ); + aTbLinks .EnableList( bEnable != sal_False ); aStyleFT .Enable( bEnable ); aStyleLB .Enable( bEnable ); aFilterLB .Enable( bEnable ); @@ -252,7 +256,7 @@ IMPL_LINK( SwCondCollPage, OnOffHdl, CheckBox*, pBox ) IMPL_LINK( SwCondCollPage, AssignRemoveHdl, PushButton*, pBtn) { SvLBoxEntry* pE = aTbLinks.FirstSelected(); - ULONG nPos; + sal_uLong nPos; if( !pE || LISTBOX_ENTRY_NOTFOUND == ( nPos = aTbLinks.GetModel()->GetAbsPos( pE ) ) ) { @@ -260,21 +264,21 @@ IMPL_LINK( SwCondCollPage, AssignRemoveHdl, PushButton*, pBtn) return 0; } - String sSel = aStrArr.GetString( USHORT(nPos) ); + String sSel = aStrArr.GetString( sal_uInt16(nPos) ); sSel += '\t'; - const BOOL bAssEnabled = pBtn != &aRemovePB && aAssignPB.IsEnabled(); + const sal_Bool bAssEnabled = pBtn != &aRemovePB && aAssignPB.IsEnabled(); aAssignPB.Enable( !bAssEnabled ); aRemovePB.Enable( bAssEnabled ); if ( bAssEnabled ) sSel += aStyleLB.GetSelectEntry(); - aTbLinks.SetUpdateMode(FALSE); + aTbLinks.SetUpdateMode(sal_False); aTbLinks.GetModel()->Remove(pE); pE = aTbLinks.InsertEntryToColumn(sSel, nPos); aTbLinks.Select(pE); aTbLinks.MakeVisible(pE); - aTbLinks.SetUpdateMode(TRUE); + aTbLinks.SetUpdateMode(sal_True); return 0; } @@ -283,8 +287,8 @@ IMPL_LINK( SwCondCollPage, SelectHdl, ListBox*, pBox) if(pBox == &aFilterLB) { aStyleLB.Clear(); - USHORT nSearchFlags = pBox->GetSelectEntryPos(); - nSearchFlags = *(USHORT*)aFilterLB.GetEntryData(nSearchFlags); + sal_uInt16 nSearchFlags = pBox->GetSelectEntryPos(); + nSearchFlags = *(sal_uInt16*)aFilterLB.GetEntryData(nSearchFlags); SfxStyleSheetBasePool* pPool = rSh.GetView().GetDocShell()->GetStyleSheetPool(); pPool->SetSearchMask(SFX_STYLE_FAMILY_PARA, nSearchFlags); const SfxStyleSheetBase* pBase = pPool->First(); @@ -316,7 +320,7 @@ IMPL_LINK( SwCondCollPage, SelectHdl, ListBox*, pBox) return 0; } -void SwCondCollPage::SetCollection( SwFmt* pFormat, BOOL bNew ) +void SwCondCollPage::SetCollection( SwFmt* pFormat, sal_Bool bNew ) { pFmt = pFormat; bNewTemplate = bNew; diff --git a/sw/source/ui/config/barcfg.cxx b/sw/source/ui/config/barcfg.cxx index 8c8ef22767..5a3d85a4d0 100644 --- a/sw/source/ui/config/barcfg.cxx +++ b/sw/source/ui/config/barcfg.cxx @@ -48,11 +48,11 @@ using namespace com::sun::star::uno; #define SEL_TYPE_BEZIER 3 #define SEL_TYPE_GRAPHIC 4 -SwToolbarConfigItem::SwToolbarConfigItem( BOOL bWeb ) : +SwToolbarConfigItem::SwToolbarConfigItem( sal_Bool bWeb ) : ConfigItem(bWeb ? C2U("Office.WriterWeb/ObjectBar") : C2U("Office.Writer/ObjectBar"), CONFIG_MODE_DELAYED_UPDATE|CONFIG_MODE_RELEASE_TREE) { - for(USHORT i = 0; i <= SEL_TYPE_GRAPHIC; i++ ) + for(sal_uInt16 i = 0; i <= SEL_TYPE_GRAPHIC; i++ ) aTbxIdArray[i] = -1; Sequence<OUString> aNames = GetPropertyNames(); diff --git a/sw/source/ui/config/caption.cxx b/sw/source/ui/config/caption.cxx index 3205a19539..8a8489b7ff 100644 --- a/sw/source/ui/config/caption.cxx +++ b/sw/source/ui/config/caption.cxx @@ -39,15 +39,15 @@ #define CAPTION_VERSION VERSION_01 InsCaptionOpt::InsCaptionOpt(const SwCapObjType eType, const SvGlobalName* pOleId) : - bUseCaption(FALSE), + bUseCaption(sal_False), eObjType(eType), nNumType(SVX_NUM_ARABIC), sNumberSeparator(RTL_CONSTASCII_USTRINGPARAM((". "))), nPos(1), nLevel(0), sSeparator( String::CreateFromAscii( ": " ) ), - bIgnoreSeqOpts(FALSE), - bCopyAttributes(FALSE) + bIgnoreSeqOpts(sal_False), + bCopyAttributes(sal_False) { if (pOleId) aOleId = *pOleId; @@ -81,7 +81,7 @@ InsCaptionOpt& InsCaptionOpt::operator=( const InsCaptionOpt& rOpt ) return *this; } -BOOL InsCaptionOpt::operator==( const InsCaptionOpt& rOpt ) const +sal_Bool InsCaptionOpt::operator==( const InsCaptionOpt& rOpt ) const { return (eObjType == rOpt.eObjType && aOleId == rOpt.aOleId); // So that identical Ole-IDs can't be added multiple diff --git a/sw/source/ui/config/cfgitems.cxx b/sw/source/ui/config/cfgitems.cxx index 43cec7c2ce..abf7bba55e 100644 --- a/sw/source/ui/config/cfgitems.cxx +++ b/sw/source/ui/config/cfgitems.cxx @@ -48,7 +48,7 @@ TYPEINIT1_AUTOFACTORY(SwElemItem, SfxPoolItem) TYPEINIT1_AUTOFACTORY(SwAddPrinterItem, SfxPoolItem) TYPEINIT1_AUTOFACTORY(SwShadowCursorItem, SfxPoolItem) -SwDocDisplayItem::SwDocDisplayItem( USHORT _nWhich ) : +SwDocDisplayItem::SwDocDisplayItem( sal_uInt16 _nWhich ) : SfxPoolItem(_nWhich), aIndexBackgrndCol(COL_GRAY) { @@ -60,7 +60,7 @@ SwDocDisplayItem::SwDocDisplayItem( USHORT _nWhich ) : bFldHiddenText = bCharHiddenText = bManualBreak = - bShowHiddenPara = FALSE; + bShowHiddenPara = sal_False; }; @@ -73,17 +73,17 @@ SwDocDisplayItem::SwDocDisplayItem( const SwDocDisplayItem& rDocDisplayItem ): *this = rDocDisplayItem; }; -SwDocDisplayItem::SwDocDisplayItem(const SwViewOption& rVOpt, USHORT _nWhich ) : +SwDocDisplayItem::SwDocDisplayItem(const SwViewOption& rVOpt, sal_uInt16 _nWhich ) : SfxPoolItem( _nWhich ) { - bParagraphEnd = rVOpt.IsParagraph(TRUE); - bTab = rVOpt.IsTab(TRUE); - bSpace = rVOpt.IsBlank(TRUE); + bParagraphEnd = rVOpt.IsParagraph(sal_True); + bTab = rVOpt.IsTab(sal_True); + bSpace = rVOpt.IsBlank(sal_True); bNonbreakingSpace = rVOpt.IsHardBlank(); bSoftHyphen = rVOpt.IsSoftHyph(); - bCharHiddenText = rVOpt.IsShowHiddenChar(TRUE); + bCharHiddenText = rVOpt.IsShowHiddenChar(sal_True); bFldHiddenText = rVOpt.IsShowHiddenField(); - bManualBreak = rVOpt.IsLineBreak(TRUE); + bManualBreak = rVOpt.IsLineBreak(sal_True); bShowHiddenPara = rVOpt.IsShowHiddenPara(); } @@ -135,7 +135,7 @@ void SwDocDisplayItem::FillViewOptions( SwViewOption& rVOpt) const rVOpt.SetShowHiddenPara(bShowHiddenPara ); } -SwElemItem::SwElemItem( USHORT _nWhich ) : +SwElemItem::SwElemItem( sal_uInt16 _nWhich ) : SfxPoolItem(_nWhich) { bHorzScrollbar = @@ -152,7 +152,7 @@ SwElemItem::SwElemItem( USHORT _nWhich ) : bGraphic = bDrawing = bFieldName = - bNotes = FALSE; + bNotes = sal_False; } SwElemItem::SwElemItem( const SwElemItem& rElemItem ): @@ -161,14 +161,14 @@ SwElemItem::SwElemItem( const SwElemItem& rElemItem ): *this = rElemItem; } -SwElemItem::SwElemItem(const SwViewOption& rVOpt, USHORT _nWhich) : +SwElemItem::SwElemItem(const SwViewOption& rVOpt, sal_uInt16 _nWhich) : SfxPoolItem( _nWhich ) { bHorzScrollbar = rVOpt.IsViewHScrollBar(); bVertScrollbar = rVOpt.IsViewVScrollBar(); bAnyRuler = rVOpt.IsViewAnyRuler(); - bHorzRuler = rVOpt.IsViewHRuler(TRUE); - bVertRuler = rVOpt.IsViewVRuler(TRUE); + bHorzRuler = rVOpt.IsViewHRuler(sal_True); + bVertRuler = rVOpt.IsViewVRuler(sal_True); bVertRulerRight = rVOpt.IsVRulerRight(); bCrosshair = rVOpt.IsCrossHair(); bHandles = rVOpt.IsSolidMarkHdl(); @@ -261,7 +261,7 @@ SwAddPrinterItem::SwAddPrinterItem( const SwAddPrinterItem& rAddPrinterItem ): /*-------------------------------------------------------------------- Description: CTOR for empty Item --------------------------------------------------------------------*/ -SwAddPrinterItem::SwAddPrinterItem( USHORT _nWhich): +SwAddPrinterItem::SwAddPrinterItem( sal_uInt16 _nWhich): SfxPoolItem(_nWhich) { } @@ -269,7 +269,7 @@ SwAddPrinterItem::SwAddPrinterItem( USHORT _nWhich): /*-------------------------------------------------------------------- Description: CTOR from SwPrintOptions --------------------------------------------------------------------*/ -SwAddPrinterItem::SwAddPrinterItem( USHORT _nWhich, const SwPrintData& rPrtData ) : +SwAddPrinterItem::SwAddPrinterItem( sal_uInt16 _nWhich, const SwPrintData& rPrtData ) : SfxPoolItem(_nWhich) { SwPrintData::operator=(rPrtData); @@ -292,10 +292,10 @@ int SwAddPrinterItem::operator==( const SfxPoolItem& rAttr ) const /*-------------------------------------------------- Item for Settings dialog, ShadowCursorPage --------------------------------------------------*/ -SwShadowCursorItem::SwShadowCursorItem( USHORT _nWhich ) +SwShadowCursorItem::SwShadowCursorItem( sal_uInt16 _nWhich ) : SfxPoolItem( _nWhich ), eMode( FILL_TAB ) - ,bOn( FALSE ) + ,bOn( sal_False ) { } @@ -307,7 +307,7 @@ SwShadowCursorItem::SwShadowCursorItem( const SwShadowCursorItem& rCpy ) { } -SwShadowCursorItem::SwShadowCursorItem( const SwViewOption& rVOpt, USHORT _nWhich ) +SwShadowCursorItem::SwShadowCursorItem( const SwViewOption& rVOpt, sal_uInt16 _nWhich ) : SfxPoolItem( _nWhich ), eMode( rVOpt.GetShdwCrsrFillMode() ) ,bOn( rVOpt.IsShadowCursor() ) @@ -382,4 +382,4 @@ int SwTestItem::operator==( const SfxPoolItem& rAttr ) const -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
\ No newline at end of file diff --git a/sw/source/ui/config/fontcfg.cxx b/sw/source/ui/config/fontcfg.cxx index 2290b219d0..0efa9a5995 100644 --- a/sw/source/ui/config/fontcfg.cxx +++ b/sw/source/ui/config/fontcfg.cxx @@ -179,9 +179,9 @@ SwStdFontConfig::~SwStdFontConfig() { } -BOOL SwStdFontConfig::IsFontDefault(USHORT nFontType) const +sal_Bool SwStdFontConfig::IsFontDefault(sal_uInt16 nFontType) const { - BOOL bSame = sal_False; + sal_Bool bSame = sal_False; SvtLinguOptions aLinguOpt; SvtLinguConfig().GetOptions( aLinguOpt ); @@ -221,7 +221,7 @@ BOOL SwStdFontConfig::IsFontDefault(USHORT nFontType) const case FONT_CAPTION_CJK : case FONT_INDEX_CJK : { - BOOL b1 = sDefaultFonts[FONT_STANDARD_CJK] == sDefFontCJK; + sal_Bool b1 = sDefaultFonts[FONT_STANDARD_CJK] == sDefFontCJK; bSame = b1 && sDefaultFonts[nFontType] == sDefFontCJK; } break; @@ -229,7 +229,7 @@ BOOL SwStdFontConfig::IsFontDefault(USHORT nFontType) const case FONT_CAPTION_CTL : case FONT_INDEX_CTL : { - BOOL b1 = sDefaultFonts[FONT_STANDARD_CJK] == sDefFontCTL; + sal_Bool b1 = sDefaultFonts[FONT_STANDARD_CJK] == sDefFontCTL; bSame = b1 && sDefaultFonts[nFontType] == sDefFontCTL; } break; @@ -237,10 +237,10 @@ BOOL SwStdFontConfig::IsFontDefault(USHORT nFontType) const return bSame; } -String SwStdFontConfig::GetDefaultFor(USHORT nFontType, LanguageType eLang) +String SwStdFontConfig::GetDefaultFor(sal_uInt16 nFontType, LanguageType eLang) { String sRet; - USHORT nFontId; + sal_uInt16 nFontId; switch( nFontType ) { case FONT_OUTLINE : @@ -271,7 +271,7 @@ String SwStdFontConfig::GetDefaultFor(USHORT nFontType, LanguageType eLang) return aFont.GetName(); } -sal_Int32 SwStdFontConfig::GetDefaultHeightFor(USHORT nFontType, LanguageType eLang) +sal_Int32 SwStdFontConfig::GetDefaultHeightFor(sal_uInt16 nFontType, LanguageType eLang) { sal_Int32 nRet = FONTSIZE_DEFAULT; switch( nFontType ) @@ -292,7 +292,7 @@ sal_Int32 SwStdFontConfig::GetDefaultHeightFor(USHORT nFontType, LanguageType eL return nRet; } -void SwStdFontConfig::ChangeInt( USHORT nFontType, sal_Int32 nHeight ) +void SwStdFontConfig::ChangeInt( sal_uInt16 nFontType, sal_Int32 nHeight ) { OSL_ENSURE( nFontType < DEF_FONT_COUNT, "invalid index in SwStdFontConfig::ChangInt()"); if( nFontType < DEF_FONT_COUNT && nDefaultFontHeight[nFontType] != nHeight) diff --git a/sw/source/ui/config/mailconfigpage.cxx b/sw/source/ui/config/mailconfigpage.cxx index 825cb25579..37a96b6faf 100644 --- a/sw/source/ui/config/mailconfigpage.cxx +++ b/sw/source/ui/config/mailconfigpage.cxx @@ -184,7 +184,7 @@ SfxTabPage* SwMailConfigPage::Create( Window* pParent, const SfxItemSet& rAttrS return new SwMailConfigPage(pParent, rAttrSet); } -BOOL SwMailConfigPage::FillItemSet( SfxItemSet& /*rSet*/ ) +sal_Bool SwMailConfigPage::FillItemSet( SfxItemSet& /*rSet*/ ) { if(m_aDisplayNameED.GetText() != m_aDisplayNameED.GetSavedValue()) m_pConfigItem->SetMailDisplayName(m_aDisplayNameED.GetText()); @@ -306,7 +306,7 @@ SwTestAccountSettingsDialog::SwTestAccountSettingsDialog(SwMailConfigPage* pPare m_aStatusLB.SetHelpId(HID_MM_TESTACCOUNTSETTINGS_TLB); static long nTabs[] = {2, 0, aSz.Width()/2 }; - m_aStatusLB.SetWindowBits( WB_SORT | WB_HSCROLL | WB_CLIPCHILDREN | WB_TABSTOP ); + m_aStatusLB.SetStyle( m_aStatusLB.GetStyle() | WB_SORT | WB_HSCROLL | WB_CLIPCHILDREN | WB_TABSTOP ); m_aStatusLB.SetSelectionMode( SINGLE_SELECTION ); m_aStatusLB.SetTabs(&nTabs[0], MAP_PIXEL); short nEntryHeight = m_aStatusLB.GetEntryHeight(); diff --git a/sw/source/ui/config/mailconfigpage.src b/sw/source/ui/config/mailconfigpage.src index 1c9f269d10..e5ffb3f73d 100644 --- a/sw/source/ui/config/mailconfigpage.src +++ b/sw/source/ui/config/mailconfigpage.src @@ -53,6 +53,7 @@ TabPage TP_MAILCONFIG }; Edit ED_DISPLAYNAME { + HelpID = "sw:Edit:TP_MAILCONFIG:ED_DISPLAYNAME"; Pos = MAP_APPFONT ( 88 , 14 ) ; Size = MAP_APPFONT ( 160 , 12 ) ; Border = TRUE; @@ -65,12 +66,14 @@ TabPage TP_MAILCONFIG }; Edit ED_ADDRESS { + HelpID = "sw:Edit:TP_MAILCONFIG:ED_ADDRESS"; Pos = MAP_APPFONT ( 88 , 29 ) ; Size = MAP_APPFONT ( 160 , 12 ) ; Border = TRUE; }; CheckBox CB_REPLYTO { + HelpID = "sw:CheckBox:TP_MAILCONFIG:CB_REPLYTO"; Pos = MAP_APPFONT ( 12 , 45 ) ; Size = MAP_APPFONT ( 242 , 10 ) ; Text[ en-US ] = "Send replies to ~different e-mail address"; @@ -83,6 +86,7 @@ TabPage TP_MAILCONFIG }; Edit ED_REPLYTO { + HelpID = "sw:Edit:TP_MAILCONFIG:ED_REPLYTO"; Pos = MAP_APPFONT ( 88 , 58 ) ; Size = MAP_APPFONT ( 160 , 12 ) ; Border = TRUE; @@ -101,6 +105,7 @@ TabPage TP_MAILCONFIG }; Edit ED_SERVER { + HelpID = "sw:Edit:TP_MAILCONFIG:ED_SERVER"; Pos = MAP_APPFONT ( 88 , 87 ) ; Size = MAP_APPFONT ( 105 , 12 ) ; Border = TRUE; @@ -114,6 +119,7 @@ TabPage TP_MAILCONFIG }; NumericField NF_PORT { + HelpID = "sw:NumericField:TP_MAILCONFIG:NF_PORT"; Pos = MAP_APPFONT ( 223 , 87 ) ; Size = MAP_APPFONT ( 25 , 12 ) ; Border = TRUE; @@ -127,12 +133,14 @@ TabPage TP_MAILCONFIG }; CheckBox CB_SECURE { + HelpID = "sw:CheckBox:TP_MAILCONFIG:CB_SECURE"; Pos = MAP_APPFONT ( 12 , 104 ) ; Size = MAP_APPFONT ( 242 , 10 ) ; Text[ en-US ] = "~Use secure connection (SSL)"; }; PushButton PB_AUTHENTICATION { + HelpID = "sw:PushButton:TP_MAILCONFIG:PB_AUTHENTICATION"; Pos = MAP_APPFONT ( 88 , 118 ) ; Size = MAP_APPFONT ( 105 , 14 ) ; Text[ en-US ] = "Server Au~thentication"; @@ -144,6 +152,7 @@ TabPage TP_MAILCONFIG }; PushButton PB_TEST { + HelpID = "sw:PushButton:TP_MAILCONFIG:PB_TEST"; Pos = MAP_APPFONT ( 88 , 164 ) ; Size = MAP_APPFONT ( 105 , 14 ) ; Text[ en-US ] = "Test S~ettings..."; @@ -179,6 +188,7 @@ ModalDialog DLG_MM_TESTACCOUNTSETTINGS }; MultiLineEdit ED_ERROR { + HelpID = "sw:MultiLineEdit:DLG_MM_TESTACCOUNTSETTINGS:ED_ERROR"; Pos = MAP_APPFONT ( 6 , 79 ) ; Size = MAP_APPFONT ( 238 , 60 ) ; Border = TRUE; @@ -191,6 +201,7 @@ ModalDialog DLG_MM_TESTACCOUNTSETTINGS }; PushButton PB_STOP { + HelpID = "sw:PushButton:DLG_MM_TESTACCOUNTSETTINGS:PB_STOP"; Pos = MAP_APPFONT ( 85 , 156 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text[ en-US ] = "~Stop"; @@ -261,12 +272,14 @@ ModalDialog DLG_MM_SERVERAUTHENTICATION CheckBox CB_AUTHENTICATION { + HelpID = "sw:CheckBox:DLG_MM_SERVERAUTHENTICATION:CB_AUTHENTICATION"; Pos = MAP_APPFONT ( 6 , 3 ) ; Size = MAP_APPFONT ( 238 , 10 ) ; Text[ en-US ] = "The outgoing mail server (SMTP) requires au~thentication"; }; RadioButton RB_SEP_AUTHENTICATION { + HelpID = "sw:RadioButton:DLG_MM_SERVERAUTHENTICATION:RB_SEP_AUTHENTICATION"; Pos = MAP_APPFONT ( 12 , 17 ) ; Size = MAP_APPFONT ( 232 , 10 ) ; Text[ en-US ] = "The outgoing mail server (SMTP) requires ~separate authentication"; @@ -285,6 +298,7 @@ ModalDialog DLG_MM_SERVERAUTHENTICATION }; Edit ED_USERNAME { + HelpID = "sw:Edit:DLG_MM_SERVERAUTHENTICATION:ED_USERNAME"; Pos = MAP_APPFONT ( 78 , 42 ) ; Size = MAP_APPFONT ( 115 , 12 ) ; Border = TRUE; @@ -297,6 +311,7 @@ ModalDialog DLG_MM_SERVERAUTHENTICATION }; Edit ED_OUTPASSWORD { + HelpID = "sw:Edit:DLG_MM_SERVERAUTHENTICATION:ED_OUTPASSWORD"; Pos = MAP_APPFONT ( 78 , 57 ) ; Size = MAP_APPFONT ( 115 , 12 ) ; Border = TRUE; @@ -304,6 +319,7 @@ ModalDialog DLG_MM_SERVERAUTHENTICATION }; RadioButton RB_SMPTAFTERPOP { + HelpID = "sw:RadioButton:DLG_MM_SERVERAUTHENTICATION:RB_SMPTAFTERPOP"; Pos = MAP_APPFONT ( 12 , 73 ) ; Size = MAP_APPFONT ( 232 , 20 ) ; WordBreak = TRUE; @@ -323,6 +339,7 @@ ModalDialog DLG_MM_SERVERAUTHENTICATION }; Edit ED_SERVER { + HelpID = "sw:Edit:DLG_MM_SERVERAUTHENTICATION:ED_SERVER"; Pos = MAP_APPFONT ( 78 , 108 ) ; Size = MAP_APPFONT ( 115 , 12 ) ; Border = TRUE; @@ -336,6 +353,7 @@ ModalDialog DLG_MM_SERVERAUTHENTICATION }; NumericField NF_PORT { + HelpID = "sw:NumericField:DLG_MM_SERVERAUTHENTICATION:NF_PORT"; Pos = MAP_APPFONT ( 219 , 108 ) ; Size = MAP_APPFONT ( 25 , 12 ) ; Border = TRUE; @@ -355,12 +373,14 @@ ModalDialog DLG_MM_SERVERAUTHENTICATION }; RadioButton RB_POP3 { + HelpID = "sw:RadioButton:DLG_MM_SERVERAUTHENTICATION:RB_POP3"; Pos = MAP_APPFONT ( 78 , 125 ) ; Size = MAP_APPFONT ( 115 , 10 ) ; Text[ en-US ] = "~POP 3"; }; RadioButton RB_IMAP { + HelpID = "sw:RadioButton:DLG_MM_SERVERAUTHENTICATION:RB_IMAP"; Pos = MAP_APPFONT ( 78 , 138 ) ; Size = MAP_APPFONT ( 115 , 10 ) ; Text[ en-US ] = "~IMAP"; @@ -373,6 +393,7 @@ ModalDialog DLG_MM_SERVERAUTHENTICATION }; Edit ED_INUSERNAME { + HelpID = "sw:Edit:DLG_MM_SERVERAUTHENTICATION:ED_INUSERNAME"; Pos = MAP_APPFONT ( 78 , 150 ) ; Size = MAP_APPFONT ( 115 , 12 ) ; Border = TRUE; @@ -385,6 +406,7 @@ ModalDialog DLG_MM_SERVERAUTHENTICATION }; Edit ED_INPASSWORD { + HelpID = "sw:Edit:DLG_MM_SERVERAUTHENTICATION:ED_INPASSWORD"; Pos = MAP_APPFONT ( 78 , 165 ) ; Size = MAP_APPFONT ( 115 , 12 ) ; Border = TRUE; diff --git a/sw/source/ui/config/makefile.mk b/sw/source/ui/config/makefile.mk deleted file mode 100644 index d624e466c8..0000000000 --- a/sw/source/ui/config/makefile.mk +++ /dev/null @@ -1,87 +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=config -LIBTARGET=NO -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- -IMGLST_SRS=$(SRS)$/config.srs -BMP_IN=$(PRJ)$/win/imglst - -SRS1NAME=$(TARGET) -SRC1FILES = \ - mailconfigpage.src \ - optdlg.src \ - optload.src \ - optcomp.src \ - redlopt.src - -EXCEPTIONSFILES = \ - $(SLO)$/barcfg.obj \ - $(SLO)$/cfgitems.obj \ - $(SLO)$/fontcfg.obj \ - $(SLO)$/mailconfigpage.obj \ - $(SLO)$/modcfg.obj \ - $(SLO)$/optcomp.obj \ - $(SLO)$/optload.obj \ - $(SLO)$/optpage.obj \ - $(SLO)$/prtopt.obj \ - $(SLO)$/uinums.obj \ - $(SLO)$/usrpref.obj \ - $(SLO)$/viewopt.obj - -SLOFILES = \ - $(EXCEPTIONSFILES) \ - $(SLO)$/caption.obj \ - $(SLO)$/dbconfig.obj - -LIB1TARGET= $(SLB)$/$(TARGET).lib - -LIB1OBJFILES = \ - $(SLO)$/barcfg.obj \ - $(SLO)$/caption.obj \ - $(SLO)$/cfgitems.obj \ - $(SLO)$/dbconfig.obj \ - $(SLO)$/fontcfg.obj \ - $(SLO)$/modcfg.obj \ - $(SLO)$/prtopt.obj \ - $(SLO)$/uinums.obj \ - $(SLO)$/usrpref.obj \ - $(SLO)$/viewopt.obj - -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/ui/config/modcfg.cxx b/sw/source/ui/config/modcfg.cxx index e06fad61ae..b9f3c1f0a5 100644 --- a/sw/source/ui/config/modcfg.cxx +++ b/sw/source/ui/config/modcfg.cxx @@ -64,7 +64,7 @@ SV_IMPL_PTRARR_SORT(InsCapOptArr, InsCaptionOptPtr) InsCaptionOpt* InsCaptionOptArr::Find(const SwCapObjType eType, const SvGlobalName *pOleId) const { - for (USHORT i = 0; i < Count(); i++ ) + for (sal_uInt16 i = 0; i < Count(); i++ ) { InsCaptionOpt* pObj = GetObject(i); if (pObj->GetObjType() == eType && @@ -78,7 +78,7 @@ InsCaptionOpt* InsCaptionOptArr::Find(const SwCapObjType eType, const SvGlobalNa } const InsCaptionOpt* SwModuleOptions::GetCapOption( - BOOL bHTML, const SwCapObjType eType, const SvGlobalName *pOleId) + sal_Bool bHTML, const SwCapObjType eType, const SvGlobalName *pOleId) { if(bHTML) { @@ -87,10 +87,10 @@ const InsCaptionOpt* SwModuleOptions::GetCapOption( } else { - sal_Bool bFound = FALSE; + sal_Bool bFound = sal_False; if(eType == OLE_CAP && pOleId) { - for( USHORT nId = 0; nId <= GLOB_NAME_CHART && !bFound; nId++) + for( sal_uInt16 nId = 0; nId <= GLOB_NAME_CHART && !bFound; nId++) bFound = *pOleId == aInsertConfig.aGlobalNames[nId ]; if(!bFound) return aInsertConfig.pOLEMiscOpt; @@ -99,9 +99,9 @@ const InsCaptionOpt* SwModuleOptions::GetCapOption( } } -BOOL SwModuleOptions::SetCapOption(BOOL bHTML, const InsCaptionOpt* pOpt) +sal_Bool SwModuleOptions::SetCapOption(sal_Bool bHTML, const InsCaptionOpt* pOpt) { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; if(bHTML) { @@ -109,10 +109,10 @@ BOOL SwModuleOptions::SetCapOption(BOOL bHTML, const InsCaptionOpt* pOpt) } else if (pOpt) { - sal_Bool bFound = FALSE; + sal_Bool bFound = sal_False; if(pOpt->GetObjType() == OLE_CAP && &pOpt->GetOleId()) { - for( USHORT nId = 0; nId <= GLOB_NAME_CHART; nId++) + for( sal_uInt16 nId = 0; nId <= GLOB_NAME_CHART; nId++) bFound = pOpt->GetOleId() == aInsertConfig.aGlobalNames[nId ]; if(!bFound) { @@ -134,22 +134,22 @@ BOOL SwModuleOptions::SetCapOption(BOOL bHTML, const InsCaptionOpt* pOpt) rArr.Insert(new InsCaptionOpt(*pOpt)); aInsertConfig.SetModified(); - bRet = TRUE; + bRet = sal_True; } return bRet; } SwModuleOptions::SwModuleOptions() : - aInsertConfig(FALSE), - aWebInsertConfig(TRUE), - aTableConfig(FALSE), - aWebTableConfig(TRUE), - bHideFieldTips(FALSE) + aInsertConfig(sal_False), + aWebInsertConfig(sal_True), + aTableConfig(sal_False), + aWebTableConfig(sal_True), + bHideFieldTips(sal_False) { } -String SwModuleOptions::ConvertWordDelimiter(const String& rDelim, BOOL bFromUI) +String SwModuleOptions::ConvertWordDelimiter(const String& rDelim, sal_Bool bFromUI) { String sReturn; if(bFromUI) @@ -176,7 +176,7 @@ String SwModuleOptions::ConvertWordDelimiter(const String& rDelim, BOOL bFromUI) case 'x': { sal_Unicode nVal, nChar; - BOOL bValidData = TRUE; + sal_Bool bValidData = sal_True; xub_StrLen n; for( n = 0, nChar = 0; n < 2 && i < rDelim.Len(); ++n, ++i ) { @@ -189,7 +189,7 @@ String SwModuleOptions::ConvertWordDelimiter(const String& rDelim, BOOL bFromUI) else { OSL_ENSURE(false, "wrong hex value" ); - bValidData = FALSE; + bValidData = sal_False; break; } @@ -930,7 +930,7 @@ void SwInsertConfig::Load() else if(!bIsWeb) return; - USHORT nInsTblFlags = 0; + sal_uInt16 nInsTblFlags = 0; for(int nProp = 0; nProp < aNames.getLength(); nProp++) { if(pValues[nProp].hasValue()) @@ -1204,10 +1204,10 @@ void SwTableConfig::Load() sal_Int32 nTemp = 0; switch(nProp) { - case 0 : pValues[nProp] >>= nTemp; nTblHMove = (USHORT)MM100_TO_TWIP(nTemp); break; //"Shift/Row", - case 1 : pValues[nProp] >>= nTemp; nTblVMove = (USHORT)MM100_TO_TWIP(nTemp); break; //"Shift/Column", - case 2 : pValues[nProp] >>= nTemp; nTblHInsert = (USHORT)MM100_TO_TWIP(nTemp); break; //"Insert/Row", - case 3 : pValues[nProp] >>= nTemp; nTblVInsert = (USHORT)MM100_TO_TWIP(nTemp); break; //"Insert/Column", + case 0 : pValues[nProp] >>= nTemp; nTblHMove = (sal_uInt16)MM100_TO_TWIP(nTemp); break; //"Shift/Row", + case 1 : pValues[nProp] >>= nTemp; nTblVMove = (sal_uInt16)MM100_TO_TWIP(nTemp); break; //"Shift/Column", + case 2 : pValues[nProp] >>= nTemp; nTblHInsert = (sal_uInt16)MM100_TO_TWIP(nTemp); break; //"Insert/Row", + case 3 : pValues[nProp] >>= nTemp; nTblVInsert = (sal_uInt16)MM100_TO_TWIP(nTemp); break; //"Insert/Column", case 4 : pValues[nProp] >>= nTemp; eTblChgMode = (TblChgMode)nTemp; break; //"Change/Effect", case 5 : bInsTblFormatNum = *(sal_Bool*)pValues[nProp].getValue(); break; //"Input/NumberRecognition", case 6 : bInsTblChangeNumFormat = *(sal_Bool*)pValues[nProp].getValue(); break; //"Input/NumberFormatRecognition", diff --git a/sw/source/ui/config/optcomp.cxx b/sw/source/ui/config/optcomp.cxx index ad15ef4b43..c9c4a2844b 100644 --- a/sw/source/ui/config/optcomp.cxx +++ b/sw/source/ui/config/optcomp.cxx @@ -136,7 +136,7 @@ SwCompatibilityOptPage::SwCompatibilityOptPage( Window* pParent, const SfxItemSe { // init options strings with local resource ids -> so do it before FreeResource() - for ( USHORT nResId = STR_COMP_OPTIONS_START; nResId < STR_COMP_OPTIONS_END; ++nResId ) + for ( sal_uInt16 nResId = STR_COMP_OPTIONS_START; nResId < STR_COMP_OPTIONS_END; ++nResId ) { String sEntry = String( SW_RES( nResId ) ); if ( STR_TAB_ALIGNMENT == nResId || @@ -148,10 +148,10 @@ SwCompatibilityOptPage::SwCompatibilityOptPage( Window* pParent, const SfxItemSe if ( pEntry ) { m_aOptionsLB.SetCheckButtonState( pEntry, SV_BUTTON_UNCHECKED ); - pEntry->SetUserData( (void*)(ULONG)nResId ); + pEntry->SetUserData( (void*)(sal_uLong)nResId ); } } - m_aOptionsLB.SetWindowBits( m_aOptionsLB.GetStyle() | WB_HSCROLL | WB_HIDESELECTION ); + m_aOptionsLB.SetStyle( m_aOptionsLB.GetStyle() | WB_HSCROLL | WB_HIDESELECTION ); m_aOptionsLB.SetHighlightRange(); FreeResource(); @@ -211,7 +211,7 @@ void SwCompatibilityOptPage::ReplaceFormatName( String& rEntry ) } } -ULONG convertBools2Ulong_Impl +sal_uLong convertBools2Ulong_Impl ( bool _bUsePrtMetrics, bool _bAddSpacing, @@ -226,8 +226,8 @@ ULONG convertBools2Ulong_Impl bool _bExpandWordSpace ) { - ULONG nRet = 0; - ULONG nSetBit = 1; + sal_uLong nRet = 0; + sal_uLong nSetBit = 1; if ( _bUsePrtMetrics ) nRet |= nSetBit; @@ -271,7 +271,7 @@ void SwCompatibilityOptPage::InitControls( const SfxItemSet& rSet ) String sDocTitle; const SfxPoolItem* pItem = NULL; SfxObjectShell* pObjShell = NULL; - if ( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_WRTSHELL, FALSE, &pItem ) ) + if ( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_WRTSHELL, sal_False, &pItem ) ) m_pWrtShell = (SwWrtShell*)( (const SwPtrItem*)pItem )->GetValue(); if ( m_pWrtShell ) { @@ -369,8 +369,8 @@ void SwCompatibilityOptPage::InitControls( const SfxItemSet& rSet ) if ( sNewEntry.Len() == 0 ) sNewEntry = sName; - USHORT nPos = m_aFormattingLB.InsertEntry( sNewEntry ); - ULONG nOptions = convertBools2Ulong_Impl( + sal_uInt16 nPos = m_aFormattingLB.InsertEntry( sNewEntry ); + sal_uLong nOptions = convertBools2Ulong_Impl( bUsePrtMetrics, bAddSpacing, bAddSpacingAtPages, bUseOurTabStops, bNoExtLeading, bUseLineSpacing, bAddTableSpacing, bUseObjPos, bUseOurTextWrapping, @@ -399,8 +399,8 @@ void SwCompatibilityOptPage::InitControls( const SfxItemSet& rSet ) IMPL_LINK( SwCompatibilityOptPage, SelectHdl, ListBox*, EMPTYARG ) { - USHORT nPos = m_aFormattingLB.GetSelectEntryPos(); - ULONG nOptions = (ULONG)(void*)m_aFormattingLB.GetEntryData( nPos ); + sal_uInt16 nPos = m_aFormattingLB.GetSelectEntryPos(); + sal_uLong nOptions = (sal_uLong)(void*)m_aFormattingLB.GetEntryData( nPos ); SetCurrentOptions( nOptions ); return 0; @@ -416,10 +416,10 @@ IMPL_LINK( SwCompatibilityOptPage, UseAsDefaultHdl, PushButton*, EMPTYARG ) { if ( pItem->m_bIsDefault ) { - USHORT nCount = static_cast< USHORT >( m_aOptionsLB.GetEntryCount() ); - for ( USHORT i = 0; i < nCount; ++i ) + sal_uInt16 nCount = static_cast< sal_uInt16 >( m_aOptionsLB.GetEntryCount() ); + for ( sal_uInt16 i = 0; i < nCount; ++i ) { - bool bChecked = ( m_aOptionsLB.IsChecked(i) != FALSE ); + bool bChecked = ( m_aOptionsLB.IsChecked(i) != sal_False ); CompatibilityOptions eOption = static_cast< CompatibilityOptions >(i); switch ( eOption ) { @@ -450,21 +450,21 @@ IMPL_LINK( SwCompatibilityOptPage, UseAsDefaultHdl, PushButton*, EMPTYARG ) return 0; } -void SwCompatibilityOptPage::SetCurrentOptions( ULONG nOptions ) +void SwCompatibilityOptPage::SetCurrentOptions( sal_uLong nOptions ) { - ULONG nCount = m_aOptionsLB.GetEntryCount(); + sal_uLong nCount = m_aOptionsLB.GetEntryCount(); OSL_ENSURE( nCount <= 32, "SwCompatibilityOptPage::Reset(): entry overflow" ); - for ( USHORT i = 0; i < nCount; ++i ) + for ( sal_uInt16 i = 0; i < nCount; ++i ) { - BOOL bChecked = ( ( nOptions & 0x00000001 ) == 0x00000001 ); + sal_Bool bChecked = ( ( nOptions & 0x00000001 ) == 0x00000001 ); m_aOptionsLB.CheckEntryPos( i, bChecked ); nOptions = nOptions >> 1; } } -ULONG SwCompatibilityOptPage::GetDocumentOptions() const +sal_uLong SwCompatibilityOptPage::GetDocumentOptions() const { - ULONG nRet = 0; + sal_uLong nRet = 0; if ( m_pWrtShell ) { const IDocumentSettingAccess& rIDocumentSettingAccess = *m_pWrtShell->getIDocumentSettingAccess(); @@ -503,75 +503,75 @@ SfxTabPage* SwCompatibilityOptPage::Create( Window* pParent, const SfxItemSet& r return new SwCompatibilityOptPage( pParent, rAttrSet ); } -BOOL SwCompatibilityOptPage::FillItemSet( SfxItemSet& ) +sal_Bool SwCompatibilityOptPage::FillItemSet( SfxItemSet& ) { - BOOL bModified = FALSE; + sal_Bool bModified = sal_False; if ( m_pWrtShell ) { - ULONG nSavedOptions = m_nSavedOptions; - ULONG nCount = m_aOptionsLB.GetEntryCount(); + sal_uLong nSavedOptions = m_nSavedOptions; + sal_uLong nCount = m_aOptionsLB.GetEntryCount(); OSL_ENSURE( nCount <= 32, "SwCompatibilityOptPage::Reset(): entry overflow" ); bool bSetParaSpaceMax = false; - for ( USHORT i = 0; i < nCount; ++i ) + for ( sal_uInt16 i = 0; i < nCount; ++i ) { CompatibilityOptions nOption = static_cast< CompatibilityOptions >(i); - BOOL bChecked = m_aOptionsLB.IsChecked(i); - BOOL bSavedChecked = ( ( nSavedOptions & 0x00000001 ) == 0x00000001 ); + sal_Bool bChecked = m_aOptionsLB.IsChecked(i); + sal_Bool bSavedChecked = ( ( nSavedOptions & 0x00000001 ) == 0x00000001 ); if ( bChecked != bSavedChecked ) { if ( COPT_USE_PRINTERDEVICE == nOption ) { m_pWrtShell->SetUseVirDev( !bChecked ); - bModified = TRUE; + bModified = sal_True; } else if ( ( COPT_ADD_SPACING == nOption || COPT_ADD_SPACING_AT_PAGES == nOption ) && !bSetParaSpaceMax ) bSetParaSpaceMax = true; else if ( COPT_USE_OUR_TABSTOPS == nOption ) { m_pWrtShell->SetTabCompat( !bChecked ); - bModified = TRUE; + bModified = sal_True; } else if ( COPT_NO_EXTLEADING == nOption ) { m_pWrtShell->SetAddExtLeading( !bChecked ); - bModified = TRUE; + bModified = sal_True; } else if ( COPT_USE_LINESPACING == nOption ) { m_pWrtShell->SetUseFormerLineSpacing( bChecked ); - bModified = TRUE; + bModified = sal_True; } else if ( COPT_ADD_TABLESPACING == nOption ) { m_pWrtShell->SetAddParaSpacingToTableCells( bChecked ); - bModified = TRUE; + bModified = sal_True; } else if ( COPT_ADD_TABLESPACING == nOption ) { m_pWrtShell->SetAddParaSpacingToTableCells( bChecked ); - bModified = TRUE; + bModified = sal_True; } else if ( COPT_USE_OBJECTPOSITIONING == nOption ) { m_pWrtShell->SetUseFormerObjectPositioning( bChecked ); - bModified = TRUE; + bModified = sal_True; } else if ( COPT_USE_OUR_TEXTWRAPPING == nOption ) { m_pWrtShell->SetUseFormerTextWrapping( bChecked ); - bModified = TRUE; + bModified = sal_True; } else if ( COPT_CONSIDER_WRAPPINGSTYLE == nOption ) { m_pWrtShell->SetConsiderWrapOnObjPos( bChecked ); - bModified = TRUE; + bModified = sal_True; } else if ( COPT_EXPAND_WORDSPACE == nOption ) { m_pWrtShell->SetDoNotJustifyLinesWithManualBreak( !bChecked ); - bModified = TRUE; + bModified = sal_True; } } @@ -580,9 +580,9 @@ BOOL SwCompatibilityOptPage::FillItemSet( SfxItemSet& ) if ( bSetParaSpaceMax ) { - m_pWrtShell->SetParaSpaceMax( m_aOptionsLB.IsChecked( (USHORT)COPT_ADD_SPACING ) ); - m_pWrtShell->SetParaSpaceMaxAtPages( m_aOptionsLB.IsChecked( (USHORT)COPT_ADD_SPACING_AT_PAGES ) ); - bModified = TRUE; + m_pWrtShell->SetParaSpaceMax( m_aOptionsLB.IsChecked( (sal_uInt16)COPT_ADD_SPACING ) ); + m_pWrtShell->SetParaSpaceMaxAtPages( m_aOptionsLB.IsChecked( (sal_uInt16)COPT_ADD_SPACING_AT_PAGES ) ); + bModified = sal_True; } } @@ -596,7 +596,7 @@ void SwCompatibilityOptPage::Reset( const SfxItemSet& ) { m_aOptionsLB.SelectEntryPos( 0 ); - ULONG nOptions = GetDocumentOptions(); + sal_uLong nOptions = GetDocumentOptions(); SetCurrentOptions( nOptions ); m_nSavedOptions = nOptions; } diff --git a/sw/source/ui/config/optcomp.src b/sw/source/ui/config/optcomp.src index 3682b49477..fee89d732d 100644 --- a/sw/source/ui/config/optcomp.src +++ b/sw/source/ui/config/optcomp.src @@ -50,6 +50,7 @@ TabPage TP_OPTCOMPATIBILITY_PAGE }; ListBox LB_FORMATTING { + HelpID = "sw:ListBox:TP_OPTCOMPATIBILITY_PAGE:LB_FORMATTING"; Pos = MAP_APPFONT ( 12 , 25 ) ; Size = MAP_APPFONT ( 118 , 24 ) ; DropDown = TRUE; @@ -70,12 +71,14 @@ TabPage TP_OPTCOMPATIBILITY_PAGE }; PushButton PB_RESET { + HelpID = "sw:PushButton:TP_OPTCOMPATIBILITY_PAGE:PB_RESET"; Pos = MAP_APPFONT ( 125 , 165 ) ; Size = MAP_APPFONT ( 60 , 14 ) ; Text [ en-US ] = "~Reset"; }; PushButton PB_DEFAULT { + HelpID = "sw:PushButton:TP_OPTCOMPATIBILITY_PAGE:PB_DEFAULT"; Pos = MAP_APPFONT ( 188 , 165 ) ; Size = MAP_APPFONT ( 60 , 14 ) ; Text [ en-US ] = "Use as ~Default"; diff --git a/sw/source/ui/config/optdlg.hrc b/sw/source/ui/config/optdlg.hrc index 8b0f1016d4..76054aea6a 100644 --- a/sw/source/ui/config/optdlg.hrc +++ b/sw/source/ui/config/optdlg.hrc @@ -30,7 +30,7 @@ #define FL_NOPRINT 2 #define FL_WINDOW 3 -#define CB_GRF 1 +#define CB_GRF 1 #define CB_TBL 2 #define CB_DRWFAST 3 #define CB_FIELD 4 @@ -39,10 +39,10 @@ #define CB_SPACE 7 #define CB_HSPACE 8 #define CB_SHYPH 9 -#define CB_FLD_HIDDEN 10 +#define CB_FLD_HIDDEN 10 #define CB_BREAK 11 #define CB_ANY_RULER 12 -#define CB_CROSS 14 +#define CB_CROSS 14 #define CB_HSCROLL 15 #define CB_VSCROLL 16 #define CB_HRULER 17 @@ -50,7 +50,7 @@ #define FL_LINE 22 #define CB_POSTIT 23 #define CB_VRULER_RIGHT 24 -#define CB_BIGHANDLE 25 +#define CB_BIGHANDLE 25 #define FL_SETTINGS 26 #define LB_METRIC 27 @@ -191,7 +191,7 @@ #define FL_TABLE_SEPARATOR 139 #define CB_PROSPECT_RTL 140 -#define FL_SHDWCRSFLAG 1 +#define FL_SHDWCRSFLAG 1 #define CB_SHDWCRSONOFF 2 #define FL_SHDWCRSMODE 3 #define FT_SHDWCRSFILLMODE 4 @@ -201,5 +201,8 @@ #define RB_SHDWCRSFILLSPACE 8 #define CB_ALLOW_IN_PROT 12 #define FL_CRSR_OPT 13 -#define FL_SEPARATOR_SHDW 14 +#define FL_SEPARATOR_SHDW 14 +#define FL_LAYOUT_OPTIONS 15 +#define CB_MATH_BASELINE_ALIGNMENT 16 + diff --git a/sw/source/ui/config/optdlg.src b/sw/source/ui/config/optdlg.src index 60c1387b0c..bd9566494e 100644 --- a/sw/source/ui/config/optdlg.src +++ b/sw/source/ui/config/optdlg.src @@ -56,18 +56,21 @@ TabPage TP_CONTENT_OPT }; CheckBox CB_CROSS { + HelpID = "sw:CheckBox:TP_CONTENT_OPT:CB_CROSS"; Pos = MAP_APPFONT ( 12 , 14 ) ; Size = MAP_APPFONT ( 118 , 10 ) ; Text [ en-US ] = "Guides ~while moving"; }; CheckBox CB_HANDLE { + HelpID = "sw:CheckBox:TP_CONTENT_OPT:CB_HANDLE"; Pos = MAP_APPFONT ( 12 , 27 ) ; Size = MAP_APPFONT ( 118 , 10 ) ; Text [ en-US ] = "Sim~ple handles"; }; CheckBox CB_BIGHANDLE { + HelpID = "sw:CheckBox:TP_CONTENT_OPT:CB_BIGHANDLE"; Pos = MAP_APPFONT ( 12 , 40 ) ; Size = MAP_APPFONT ( 118 , 10 ) ; Text [ en-US ] = "Large handles"; @@ -81,54 +84,63 @@ TabPage TP_CONTENT_OPT }; CheckBox CB_HSCROLL { + HelpID = "sw:CheckBox:TP_CONTENT_OPT:CB_HSCROLL"; Pos = MAP_APPFONT ( 136 , 14 ) ; Size = MAP_APPFONT ( 108 , 10 ) ; Text [ en-US ] = "H~orizontal scrollbar" ; }; CheckBox CB_VSCROLL { + HelpID = "sw:CheckBox:TP_CONTENT_OPT:CB_VSCROLL"; Pos = MAP_APPFONT ( 136 , 27 ) ; Size = MAP_APPFONT ( 108 , 10 ) ; Text [ en-US ] = "~Vertical scrollbar" ; }; CheckBox CB_ANY_RULER { + HelpID = "sw:CheckBox:TP_CONTENT_OPT:CB_ANY_RULER"; Pos = MAP_APPFONT ( 136 , 40 ) ; Size = MAP_APPFONT ( 65 , 10 ) ; Text [ en-US ] = "R~uler" ; }; CheckBox CB_HRULER { + HelpID = "sw:CheckBox:TP_CONTENT_OPT:CB_HRULER"; Pos = MAP_APPFONT ( 142 , 53 ) ; Size = MAP_APPFONT ( 62 , 10 ) ; Text [ en-US ] = "Hori~zontal ruler" ; }; ListBox LB_HMETRIC { + HelpID = "sw:ListBox:TP_CONTENT_OPT:LB_HMETRIC"; Pos = MAP_APPFONT ( 206 , 51 ) ; Size = MAP_APPFONT ( 45 , 60 ) ; DropDown = TRUE; }; CheckBox CB_VRULER { + HelpID = "sw:CheckBox:TP_CONTENT_OPT:CB_VRULER"; Pos = MAP_APPFONT ( 142 , 66 ) ; Size = MAP_APPFONT ( 62 , 10 ) ; Text [ en-US ] = "Verti~cal ruler" ; }; CheckBox CB_VRULER_RIGHT { + HelpID = "sw:CheckBox:TP_CONTENT_OPT:CB_VRULER_RIGHT"; Pos = MAP_APPFONT ( 148 , 79 ) ; Size = MAP_APPFONT ( 100 , 10 ) ; Text [ en-US ] = "Right-aligned"; }; ListBox LB_VMETRIC { + HelpID = "sw:ListBox:TP_CONTENT_OPT:LB_VMETRIC"; Pos = MAP_APPFONT ( 206 , 64 ) ; Size = MAP_APPFONT ( 45 , 60 ) ; DropDown = TRUE; }; CheckBox CB_SMOOTH_SCROLL { + HelpID = "sw:CheckBox:TP_CONTENT_OPT:CB_SMOOTH_SCROLL"; Pos = MAP_APPFONT ( 136 , 79 ) ; Size = MAP_APPFONT ( 108 , 10 ) ; Text [ en-US ] = "S~mooth scroll" ; @@ -142,6 +154,7 @@ TabPage TP_CONTENT_OPT }; CheckBox CB_GRF { + HelpID = "sw:CheckBox:TP_CONTENT_OPT:CB_GRF"; Pos = MAP_APPFONT ( 12 , 67 ) ; Size = MAP_APPFONT ( 108 , 10 ) ; Text [ en-US ] = "~Graphics and objects" ; @@ -150,24 +163,28 @@ TabPage TP_CONTENT_OPT }; CheckBox CB_TBL { + HelpID = "sw:CheckBox:TP_CONTENT_OPT:CB_TBL"; Pos = MAP_APPFONT ( 12 , 80 ) ; Size = MAP_APPFONT ( 108 , 10 ) ; Text [ en-US ] = "~Tables " ; }; CheckBox CB_DRWFAST { + HelpID = "sw:CheckBox:TP_CONTENT_OPT:CB_DRWFAST"; Pos = MAP_APPFONT ( 12 , 93 ) ; Size = MAP_APPFONT ( 108 , 10 ) ; Text [ en-US ] = "Dra~wings and controls" ; }; CheckBox CB_FIELD { + HelpID = "sw:CheckBox:TP_CONTENT_OPT:CB_FIELD"; Pos = MAP_APPFONT ( 12 , 106 ) ; Size = MAP_APPFONT ( 108 , 10 ) ; Text [ en-US ] = "~Field codes" ; }; CheckBox CB_POSTIT { + HelpID = "sw:CheckBox:TP_CONTENT_OPT:CB_POSTIT"; Pos = MAP_APPFONT ( 12 , 119 ) ; Size = MAP_APPFONT ( 108 , 10 ) ; Text [ en-US ] = "~Comments" ; @@ -188,6 +205,7 @@ TabPage TP_CONTENT_OPT }; ListBox LB_METRIC { + HelpID = "sw:ListBox:TP_CONTENT_OPT:LB_METRIC"; Pos = MAP_APPFONT ( 199, 133 ) ; Size = MAP_APPFONT ( 50 , 50 ) ; Border = TRUE ; @@ -214,6 +232,7 @@ TabPage TP_OPTPRINT_PAGE }; CheckBox CB_PGRF /*functionally merged with CB_PDRAW*/ { + HelpID = "sw:CheckBox:TP_OPTPRINT_PAGE:CB_PGRF"; Pos = MAP_APPFONT ( 12 , 14 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; Text [ en-US ] = "~Pictures and objects" ; @@ -224,6 +243,7 @@ TabPage TP_OPTPRINT_PAGE removed, tables now always get printed CheckBox CB_PTAB { + HelpID = "sw:CheckBox:TP_OPTPRINT_PAGE:CB_PTAB"; Pos = MAP_APPFONT ( 12 , 27 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; Text [ en-US ] = "~Tables" ; @@ -233,6 +253,7 @@ TabPage TP_OPTPRINT_PAGE functionally merged with CB_PGRF (pictures and graphics) CheckBox CB_PDRAW { + HelpID = "sw:CheckBox:TP_OPTPRINT_PAGE:CB_PDRAW"; Pos = MAP_APPFONT ( 12 , 40 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; Text [ en-US ] = "Dra~wings" ; @@ -240,30 +261,35 @@ TabPage TP_OPTPRINT_PAGE */ CheckBox CB_CTRLFLD { + HelpID = "sw:CheckBox:TP_OPTPRINT_PAGE:CB_CTRLFLD"; Pos = MAP_APPFONT ( 12 , 27 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; Text [ en-US ] = "Form control~s" ; }; CheckBox CB_BACKGROUND { + HelpID = "sw:CheckBox:TP_OPTPRINT_PAGE:CB_BACKGROUND"; Pos = MAP_APPFONT ( 12 , 40 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; Text [ en-US ] = "Page ba~ckground" ; }; CheckBox CB_BLACK_FONT { + HelpID = "sw:CheckBox:TP_OPTPRINT_PAGE:CB_BLACK_FONT"; Pos = MAP_APPFONT ( 12 , 53 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; Text [ en-US ] = "Print text in blac~k" ; }; CheckBox CB_HIDDEN_TEXT { + HelpID = "sw:CheckBox:TP_OPTPRINT_PAGE:CB_HIDDEN_TEXT"; Pos = MAP_APPFONT ( 12 , 66 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; Text [ en-US ] = "Hidden te~xt" ; }; CheckBox CB_TEXT_PLACEHOLDER { + HelpID = "sw:CheckBox:TP_OPTPRINT_PAGE:CB_TEXT_PLACEHOLDER"; Pos = MAP_APPFONT ( 12 , 79 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; Text [ en-US ] = "Text ~placeholder" ; @@ -283,6 +309,7 @@ TabPage TP_OPTPRINT_PAGE }; CheckBox CB_LEFTP { + HelpID = "sw:CheckBox:TP_OPTPRINT_PAGE:CB_LEFTP"; Pos = MAP_APPFONT ( 96 , 14 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; Text [ en-US ] = "~Left pages" ; @@ -291,6 +318,7 @@ TabPage TP_OPTPRINT_PAGE }; CheckBox CB_RIGHTP { + HelpID = "sw:CheckBox:TP_OPTPRINT_PAGE:CB_RIGHTP"; Pos = MAP_APPFONT ( 96 , 27 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; Text [ en-US ] = "~Right pages" ; @@ -299,6 +327,7 @@ TabPage TP_OPTPRINT_PAGE removed, noe handled by the new print dialog (i.e. vcl) itself CheckBox CB_REVERSE { + HelpID = "sw:CheckBox:TP_OPTPRINT_PAGE:CB_REVERSE"; Pos = MAP_APPFONT ( 96 , 40 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; Text [ en-US ] = "Re~versed" ; @@ -306,12 +335,14 @@ TabPage TP_OPTPRINT_PAGE */ CheckBox CB_PROSPECT { + HelpID = "sw:CheckBox:TP_OPTPRINT_PAGE:CB_PROSPECT"; Pos = MAP_APPFONT ( 96 , 40 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; Text [ en-US ] = "Broch~ure" ; }; CheckBox CB_PROSPECT_RTL { + HelpID = "sw:CheckBox:TP_OPTPRINT_PAGE:CB_PROSPECT_RTL"; Pos = MAP_APPFONT ( 103 , 53 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; Text [ en-US ] = "Right to Left" ; @@ -319,6 +350,7 @@ TabPage TP_OPTPRINT_PAGE }; RadioButton RB_NO { + HelpID = "sw:RadioButton:TP_OPTPRINT_PAGE:RB_NO"; Pos = MAP_APPFONT ( 180 , 14 ) ; Size = MAP_APPFONT ( 74 , 10 ) ; Text [ en-US ] = "~None" ; @@ -327,18 +359,21 @@ TabPage TP_OPTPRINT_PAGE }; RadioButton RB_ONLY { + HelpID = "sw:RadioButton:TP_OPTPRINT_PAGE:RB_ONLY"; Pos = MAP_APPFONT ( 180 , 27 ) ; Size = MAP_APPFONT ( 74 , 10 ) ; Text [ en-US ] = "Comments ~only" ; }; RadioButton RB_END { + HelpID = "sw:RadioButton:TP_OPTPRINT_PAGE:RB_END"; Pos = MAP_APPFONT ( 180 , 40 ) ; Size = MAP_APPFONT ( 74 , 10 ) ; Text [ en-US ] = "End of docu~ment" ; }; RadioButton RB_PAGEEND { + HelpID = "sw:RadioButton:TP_OPTPRINT_PAGE:RB_PAGEEND"; Pos = MAP_APPFONT ( 180 , 53 ) ; Size = MAP_APPFONT ( 74 , 10 ) ; Text [ en-US ] = "~End of page" ; @@ -365,6 +400,7 @@ TabPage TP_OPTPRINT_PAGE }; CheckBox CB_PRINTEMPTYPAGES { + HelpID = "sw:CheckBox:TP_OPTPRINT_PAGE:CB_PRINTEMPTYPAGES"; Pos = MAP_APPFONT ( 12 , 106 ) ; Size = MAP_APPFONT ( 200 , 10 ) ; TabStop = TRUE ; @@ -373,6 +409,7 @@ TabPage TP_OPTPRINT_PAGE /* CheckBox CB_SINGLEJOBS { + HelpID = "sw:CheckBox:TP_OPTPRINT_PAGE:CB_SINGLEJOBS"; Pos = MAP_APPFONT ( 12 , 119 ) ; Size = MAP_APPFONT ( 200 , 10 ) ; TabStop = TRUE ; @@ -381,6 +418,7 @@ TabPage TP_OPTPRINT_PAGE */ CheckBox CB_PAPERFROMSETUP { + HelpID = "sw:CheckBox:TP_OPTPRINT_PAGE:CB_PAPERFROMSETUP"; Pos = MAP_APPFONT ( 12 , 119 ) ; Size = MAP_APPFONT ( 200 , 10 ) ; TabStop = TRUE ; @@ -395,6 +433,7 @@ TabPage TP_OPTPRINT_PAGE }; ListBox LB_FAX { + HelpID = "sw:ListBox:TP_OPTPRINT_PAGE:LB_FAX"; Border = TRUE ; Pos = MAP_APPFONT ( 70 , 132 ) ; Size = MAP_APPFONT ( 184 , 70 ) ; @@ -437,6 +476,7 @@ TabPage TP_STD_FONT }; MetricBox LB_STANDARD_SIZE { + HelpID = "sw:MetricBox:TP_STD_FONT:LB_STANDARD_SIZE"; Pos = MAP_APPFONT ( 204 , 25 ) ; Size = MAP_APPFONT ( 30 , 60 ) ; Border = TRUE ; @@ -444,6 +484,7 @@ TabPage TP_STD_FONT }; MetricBox LB_TITLE_SIZE { + HelpID = "sw:MetricBox:TP_STD_FONT:LB_TITLE_SIZE"; Pos = MAP_APPFONT ( 204 , 42 ) ; Size = MAP_APPFONT ( 30 , 60 ) ; Border = TRUE ; @@ -451,6 +492,7 @@ TabPage TP_STD_FONT }; MetricBox LB_LIST_SIZE { + HelpID = "sw:MetricBox:TP_STD_FONT:LB_LIST_SIZE"; Pos = MAP_APPFONT ( 204 , 59 ) ; Size = MAP_APPFONT ( 30 , 60 ) ; Border = TRUE ; @@ -458,6 +500,7 @@ TabPage TP_STD_FONT }; MetricBox LB_LABEL_SIZE { + HelpID = "sw:MetricBox:TP_STD_FONT:LB_LABEL_SIZE"; Pos = MAP_APPFONT ( 204 , 76 ) ; Size = MAP_APPFONT ( 30 , 60 ) ; Border = TRUE ; @@ -465,6 +508,7 @@ TabPage TP_STD_FONT }; MetricBox LB_INDEX_SIZE { + HelpID = "sw:MetricBox:TP_STD_FONT:LB_INDEX_SIZE"; Pos = MAP_APPFONT ( 204 , 93 ) ; Size = MAP_APPFONT ( 30 , 60 ) ; Border = TRUE ; @@ -507,6 +551,7 @@ TabPage TP_STD_FONT }; ComboBox LB_STANDARD { + HelpID = "sw:ComboBox:TP_STD_FONT:LB_STANDARD"; Pos = MAP_APPFONT ( 63 , 25 ) ; Size = MAP_APPFONT ( 135 , 73 ) ; TabStop = TRUE ; @@ -515,6 +560,7 @@ TabPage TP_STD_FONT }; ComboBox LB_TITLE { + HelpID = "sw:ComboBox:TP_STD_FONT:LB_TITLE"; Pos = MAP_APPFONT ( 63 , 42 ) ; Size = MAP_APPFONT ( 135, 73 ) ; TabStop = TRUE ; @@ -523,6 +569,7 @@ TabPage TP_STD_FONT }; ComboBox LB_LIST { + HelpID = "sw:ComboBox:TP_STD_FONT:LB_LIST"; Pos = MAP_APPFONT ( 63 , 59 ) ; Size = MAP_APPFONT ( 135 , 73 ) ; TabStop = TRUE ; @@ -531,6 +578,7 @@ TabPage TP_STD_FONT }; ComboBox LB_LABEL { + HelpID = "sw:ComboBox:TP_STD_FONT:LB_LABEL"; Pos = MAP_APPFONT ( 63 , 76 ) ; Size = MAP_APPFONT ( 135 , 73 ) ; TabStop = TRUE ; @@ -539,6 +587,7 @@ TabPage TP_STD_FONT }; ComboBox LB_IDX { + HelpID = "sw:ComboBox:TP_STD_FONT:LB_IDX"; Pos = MAP_APPFONT ( 63 , 94 ) ; Size = MAP_APPFONT ( 135, 73 ) ; TabStop = TRUE ; @@ -547,12 +596,14 @@ TabPage TP_STD_FONT }; CheckBox CB_DOCONLY { + HelpID = "sw:CheckBox:TP_STD_FONT:CB_DOCONLY"; Pos = MAP_APPFONT ( 12 , 111 ) ; Size = MAP_APPFONT ( 147 , 10 ) ; Text [ en-US ] = "C~urrent document only" ; }; PushButton PB_STANDARD { + HelpID = "sw:PushButton:TP_STD_FONT:PB_STANDARD"; Pos = MAP_APPFONT ( 204 , 165 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "~Default" ; @@ -588,6 +639,7 @@ TabPage TP_OPTTABLE_PAGE }; CheckBox CB_HEADER { + HelpID = "sw:CheckBox:TP_OPTTABLE_PAGE:CB_HEADER"; Pos = MAP_APPFONT ( 12 , 14 ) ; Size = MAP_APPFONT ( 107 , 10 ) ; TabStop = TRUE ; @@ -595,6 +647,7 @@ TabPage TP_OPTTABLE_PAGE }; CheckBox CB_REPEAT_HEADER { + HelpID = "sw:CheckBox:TP_OPTTABLE_PAGE:CB_REPEAT_HEADER"; Pos = MAP_APPFONT ( 21 , 27 ) ; Size = MAP_APPFONT ( 99 , 10 ) ; TabStop = TRUE ; @@ -602,6 +655,7 @@ TabPage TP_OPTTABLE_PAGE }; CheckBox CB_DONT_SPLIT { + HelpID = "sw:CheckBox:TP_OPTTABLE_PAGE:CB_DONT_SPLIT"; Pos = MAP_APPFONT ( 12 , 40 ) ; Size = MAP_APPFONT ( 107 , 10 ) ; TabStop = TRUE ; @@ -609,6 +663,7 @@ TabPage TP_OPTTABLE_PAGE }; CheckBox CB_BORDER { + HelpID = "sw:CheckBox:TP_OPTTABLE_PAGE:CB_BORDER"; Pos = MAP_APPFONT ( 12 , 53 ) ; Size = MAP_APPFONT ( 107 , 10 ) ; TabStop = TRUE ; @@ -628,6 +683,7 @@ TabPage TP_OPTTABLE_PAGE }; CheckBox CB_NUMFORMATTING { + HelpID = "sw:CheckBox:TP_OPTTABLE_PAGE:CB_NUMFORMATTING"; Pos = MAP_APPFONT ( 131 , 14 ) ; Size = MAP_APPFONT ( 118 , 10 ) ; TabStop = TRUE ; @@ -635,6 +691,7 @@ TabPage TP_OPTTABLE_PAGE }; CheckBox CB_NUMFMT_FORMATTING { + HelpID = "sw:CheckBox:TP_OPTTABLE_PAGE:CB_NUMFMT_FORMATTING"; Pos = MAP_APPFONT ( 140 , 27 ) ; Size = MAP_APPFONT ( 114 , 10 ) ; TabStop = TRUE ; @@ -642,6 +699,7 @@ TabPage TP_OPTTABLE_PAGE }; CheckBox CB_NUMALIGNMENT { + HelpID = "sw:CheckBox:TP_OPTTABLE_PAGE:CB_NUMALIGNMENT"; Pos = MAP_APPFONT ( 140 , 40 ) ; Size = MAP_APPFONT ( 114 , 10 ) ; TabStop = TRUE ; @@ -667,6 +725,7 @@ TabPage TP_OPTTABLE_PAGE }; MetricField MF_ROWMOVE { + HelpID = "sw:MetricField:TP_OPTTABLE_PAGE:MF_ROWMOVE"; Border = TRUE ; Pos = MAP_APPFONT ( 83 , 91 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -689,6 +748,7 @@ TabPage TP_OPTTABLE_PAGE }; MetricField MF_COLMOVE { + HelpID = "sw:MetricField:TP_OPTTABLE_PAGE:MF_COLMOVE"; Border = TRUE ; Pos = MAP_APPFONT ( 83 , 106 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -717,6 +777,7 @@ TabPage TP_OPTTABLE_PAGE }; MetricField MF_ROWINSERT { + HelpID = "sw:MetricField:TP_OPTTABLE_PAGE:MF_ROWINSERT"; Border = TRUE ; Pos = MAP_APPFONT ( 211 , 91 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -739,6 +800,7 @@ TabPage TP_OPTTABLE_PAGE }; MetricField MF_COLINSERT { + HelpID = "sw:MetricField:TP_OPTTABLE_PAGE:MF_COLINSERT"; Border = TRUE ; Pos = MAP_APPFONT ( 211 , 106 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -761,6 +823,7 @@ TabPage TP_OPTTABLE_PAGE }; RadioButton RB_FIX { + HelpID = "sw:RadioButton:TP_OPTTABLE_PAGE:RB_FIX"; Pos = MAP_APPFONT ( 21 , 133 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; Text [ en-US ] = "~Fixed" ; @@ -774,6 +837,7 @@ TabPage TP_OPTTABLE_PAGE }; RadioButton RB_FIXPROP { + HelpID = "sw:RadioButton:TP_OPTTABLE_PAGE:RB_FIXPROP"; Pos = MAP_APPFONT ( 21 , 151 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; Text [ en-US ] = "Fi~xed, proportional" ; @@ -787,6 +851,7 @@ TabPage TP_OPTTABLE_PAGE }; RadioButton RB_VAR { + HelpID = "sw:RadioButton:TP_OPTTABLE_PAGE:RB_VAR"; Pos = MAP_APPFONT ( 21 , 169 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; Text [ en-US ] = "~Variable" ; @@ -820,6 +885,7 @@ TabPage TP_OPTSHDWCRSR }; CheckBox CB_PARA { + HelpID = "sw:CheckBox:TP_OPTSHDWCRSR:CB_PARA"; Pos = MAP_APPFONT ( 12 , 14 ) ; Size = MAP_APPFONT ( 108 , 10 ) ; Text [ en-US ] = "Pa~ragraph end" ; @@ -828,48 +894,56 @@ TabPage TP_OPTSHDWCRSR }; CheckBox CB_SHYPH { + HelpID = "sw:CheckBox:TP_OPTSHDWCRSR:CB_SHYPH"; Pos = MAP_APPFONT ( 12 , 27 ) ; Size = MAP_APPFONT ( 108 , 10 ) ; Text [ en-US ] = "Custom h~yphens" ; }; CheckBox CB_SPACE { + HelpID = "sw:CheckBox:TP_OPTSHDWCRSR:CB_SPACE"; Pos = MAP_APPFONT ( 12 , 40 ) ; Size = MAP_APPFONT ( 108 , 10 ) ; Text [ en-US ] = "Spac~es" ; }; CheckBox CB_HSPACE { + HelpID = "sw:CheckBox:TP_OPTSHDWCRSR:CB_HSPACE"; Pos = MAP_APPFONT ( 12 , 53 ) ; Size = MAP_APPFONT ( 108 , 10 ) ; Text [ en-US ] = "Non-breaking s~paces" ; }; CheckBox CB_TAB { + HelpID = "sw:CheckBox:TP_OPTSHDWCRSR:CB_TAB"; Pos = MAP_APPFONT ( 12 , 66 ) ; Size = MAP_APPFONT ( 108 , 10 ) ; Text [ en-US ] = "Ta~bs" ; }; CheckBox CB_BREAK { + HelpID = "sw:CheckBox:TP_OPTSHDWCRSR:CB_BREAK"; Pos = MAP_APPFONT ( 12 , 79 ) ; Size = MAP_APPFONT ( 108 , 10 ) ; Text [ en-US ] = "Brea~ks" ; }; CheckBox CB_CHAR_HIDDEN { + HelpID = "sw:CheckBox:TP_OPTSHDWCRSR:CB_CHAR_HIDDEN"; Pos = MAP_APPFONT ( 12 , 92 ) ; Size = MAP_APPFONT ( 108 , 10 ) ; Text [ en-US ] = "Hidden text" ; }; CheckBox CB_FLD_HIDDEN { + HelpID = "sw:CheckBox:TP_OPTSHDWCRSR:CB_FLD_HIDDEN"; Pos = MAP_APPFONT ( 12 , 105 ) ; Size = MAP_APPFONT ( 108 , 10 ) ; Text [ en-US ] = "Fields: Hidden te~xt" ; }; CheckBox CB_FLD_HIDDEN_PARA { + HelpID = "sw:CheckBox:TP_OPTSHDWCRSR:CB_FLD_HIDDEN_PARA"; Pos = MAP_APPFONT ( 12 , 118 ) ; Size = MAP_APPFONT ( 108 , 10 ) ; Text [ en-US ] = "Fields: Hidden p~aragraphs" ; @@ -888,6 +962,7 @@ TabPage TP_OPTSHDWCRSR }; CheckBox CB_SHDWCRSONOFF { + HelpID = "sw:CheckBox:TP_OPTSHDWCRSR:CB_SHDWCRSONOFF"; Pos = MAP_APPFONT ( 136 , 14 ) ; Size = MAP_APPFONT ( 100 , 10 ) ; TabStop = TRUE ; @@ -903,6 +978,7 @@ TabPage TP_OPTSHDWCRSR }; RadioButton RB_SHDWCRSFILLMARGIN { + HelpID = "sw:RadioButton:TP_OPTSHDWCRSR:RB_SHDWCRSFILLMARGIN"; Pos = MAP_APPFONT ( 145 , 39 ) ; Size = MAP_APPFONT ( 100 , 10 ) ; TabStop = TRUE ; @@ -911,18 +987,21 @@ TabPage TP_OPTSHDWCRSR }; RadioButton RB_SHDWCRSFILLINDENT { + HelpID = "sw:RadioButton:TP_OPTSHDWCRSR:RB_SHDWCRSFILLINDENT"; Pos = MAP_APPFONT ( 145 , 52 ) ; Size = MAP_APPFONT ( 100 , 10 ) ; Text [ en-US ] = "~Left paragraph margin" ; }; RadioButton RB_SHDWCRSFILLTAB { + HelpID = "sw:RadioButton:TP_OPTSHDWCRSR:RB_SHDWCRSFILLTAB"; Pos = MAP_APPFONT ( 145 , 66 ) ; Size = MAP_APPFONT ( 100 , 10 ) ; Text [ en-US ] = "~Tabs" ; }; RadioButton RB_SHDWCRSFILLSPACE { + HelpID = "sw:RadioButton:TP_OPTSHDWCRSR:RB_SHDWCRSFILLSPACE"; Pos = MAP_APPFONT ( 145 , 79 ) ; Size = MAP_APPFONT ( 100 , 10 ) ; Text [ en-US ] = "Tabs a~nd spaces" ; @@ -935,15 +1014,27 @@ TabPage TP_OPTSHDWCRSR }; CheckBox CB_ALLOW_IN_PROT { + HelpID = "sw:CheckBox:TP_OPTSHDWCRSR:CB_ALLOW_IN_PROT"; Pos = MAP_APPFONT ( 136 , 107 ) ; Size = MAP_APPFONT ( 100 , 10 ) ; TabStop = TRUE ; Group = TRUE ; Text [ en-US ] = "Enable"; }; + FixedLine FL_LAYOUT_OPTIONS + { + Pos = MAP_APPFONT ( 6 , 133 ) ; + Size = MAP_APPFONT ( 118 , 8 ) ; + Text [ en-US ] = "Layout assistance"; + }; + CheckBox CB_MATH_BASELINE_ALIGNMENT + { + Pos = MAP_APPFONT ( 12 , 144 ) ; + Size = MAP_APPFONT ( 236 , 10 ) ; + Text [ en-US ] = "Math baseline alignment"; + }; }; - StringArray STR_PRINTOPTUI { ItemList [en-US] = @@ -951,47 +1042,33 @@ StringArray STR_PRINTOPTUI < "%PRODUCTNAME %s"; >; < "Contents"; >; < "Page ba~ckground"; >; - < "Specifies whether to include colors and objects that are inserted to the background of the page (Format - Page - Background) in the printed document."; >; < "P~ictures and other graphic objects"; >; - < "Specifies whether the graphics and drawing or OLE objects of your text document are printed"; >; < "Hidden te~xt"; >; - < "Enable this option to print text that is marked as hidden."; >; < "~Text placeholders"; >; - < "Enable this option to print text placeholders. Disable this option to leave the text placeholders blank in the printout."; >; < "Form control~s"; >; - < "Specifies whether the form control fields of the text document are printed"; >; < "Color"; >; < "Print text in blac~k"; >; - < "Specifies whether to always print text in black."; >; < "Pages"; >; < "Print ~automatically inserted blank pages"; >; - < "If this option is enabled automatically inserted blank pages are printed. This is best if you are printing double-sided. For example, in a book, a \"chapter\" paragraph style has been set to always start with an odd numbered page. If the previous chapter ends on an odd page, %PRODUCTNAME inserts an even numbered blank page. This option controls whether to print that even numbered page or not"; >; < "~Use only paper tray from printer preferences"; >; - < "For printers with multiple trays this option specifies whether the paper tray used is specified by the system settings of the printer."; >; < "Print"; >; < "None (document only)"; >; < "Comments only"; >; < "Place at end of document"; >; < "Place at end of page"; >; - < "Specify where to print comments (if any)."; >; < "~Comments"; >; < "Page sides";>; < "All pages"; >; < "Back sides / left pages"; >; < "Front sides / right pages"; >; - < "Specify which pages to include in the output"; >; < "Include"; >; < "Broch~ure"; >; - < "Select the Brochure option to print the document in brochure format."; >; < "Left-to-right script"; >; < "Right-to-left script"; >; < "Range and copies"; >; < "~All pages"; >; - < "Print the whole document."; >; < "Pa~ges"; >; - < "Print a range of pages of the document."; >; < "~Selection"; >; - < "Print only the selected parts of the document"; >; }; }; diff --git a/sw/source/ui/config/optload.cxx b/sw/source/ui/config/optload.cxx index b0f903c15f..6b8672356b 100644 --- a/sw/source/ui/config/optload.cxx +++ b/sw/source/ui/config/optload.cxx @@ -97,7 +97,7 @@ SwLoadOptPage::SwLoadOptPage( Window* pParent, const SfxItemSet& rSet ) : aUseCharUnit ( this , SW_RES( CB_USE_CHAR_UNIT ) ), pWrtShell ( NULL ), - bHTMLMode ( FALSE ), + bHTMLMode ( sal_False ), nLastTab ( 0 ), nOldLinkMode( MANUAL ) @@ -105,7 +105,7 @@ SwLoadOptPage::SwLoadOptPage( Window* pParent, const SfxItemSet& rSet ) : FreeResource(); SvxStringArray aMetricArr( SW_RES( STR_ARR_METRIC ) ); - for ( USHORT i = 0; i < aMetricArr.Count(); ++i ) + for ( sal_uInt16 i = 0; i < aMetricArr.Count(); ++i ) { String sMetric = aMetricArr.GetStringByPos( i ); FieldUnit eFUnit = (FieldUnit)aMetricArr.GetValue( i ); @@ -119,7 +119,7 @@ SwLoadOptPage::SwLoadOptPage( Window* pParent, const SfxItemSet& rSet ) : case FUNIT_INCH: { // use only these metrics - USHORT nPos = aMetricLB.InsertEntry( sMetric ); + sal_uInt16 nPos = aMetricLB.InsertEntry( sMetric ); aMetricLB.SetEntryData( nPos, (void*)(long)eFUnit ); } default:; //prevent warning @@ -128,7 +128,7 @@ SwLoadOptPage::SwLoadOptPage( Window* pParent, const SfxItemSet& rSet ) : aMetricLB.SetSelectHdl(LINK(this, SwLoadOptPage, MetricHdl)); const SfxPoolItem* pItem; - if(SFX_ITEM_SET == rSet.GetItemState(SID_HTML_MODE, FALSE, &pItem ) + if(SFX_ITEM_SET == rSet.GetItemState(SID_HTML_MODE, sal_False, &pItem ) && ((SfxUInt16Item*)pItem)->GetValue() & HTMLMODE_ON) { aTabFT.Hide(); @@ -153,12 +153,12 @@ SfxTabPage* SwLoadOptPage::Create( Window* pParent, return new SwLoadOptPage(pParent, rAttrSet ); } -BOOL SwLoadOptPage::FillItemSet( SfxItemSet& rSet ) +sal_Bool SwLoadOptPage::FillItemSet( SfxItemSet& rSet ) { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; SwModule* pMod = SW_MOD(); - USHORT nNewLinkMode = AUTOMATIC; + sal_uInt16 nNewLinkMode = AUTOMATIC; if (aNeverRB.IsChecked()) nNewLinkMode = NEVER; else if (aRequestRB.IsChecked()) @@ -187,23 +187,23 @@ BOOL SwLoadOptPage::FillItemSet( SfxItemSet& rSet ) pWrtShell->SetModified(); } - bRet = TRUE; + bRet = sal_True; } - const USHORT nMPos = aMetricLB.GetSelectEntryPos(); + const sal_uInt16 nMPos = aMetricLB.GetSelectEntryPos(); if ( nMPos != aMetricLB.GetSavedValue() ) { // Double-Cast for VA3.0 - USHORT nFieldUnit = (USHORT)(long)aMetricLB.GetEntryData( nMPos ); - rSet.Put( SfxUInt16Item( SID_ATTR_METRIC, (UINT16)nFieldUnit ) ); - bRet = TRUE; + sal_uInt16 nFieldUnit = (sal_uInt16)(long)aMetricLB.GetEntryData( nMPos ); + rSet.Put( SfxUInt16Item( SID_ATTR_METRIC, (sal_uInt16)nFieldUnit ) ); + bRet = sal_True; } if(aTabMF.IsVisible() && aTabMF.GetText() != aTabMF.GetSavedValue()) { rSet.Put(SfxUInt16Item(SID_ATTR_DEFTABSTOP, - (USHORT)aTabMF.Denormalize(aTabMF.GetValue(FUNIT_TWIP)))); - bRet = TRUE; + (sal_uInt16)aTabMF.Denormalize(aTabMF.GetValue(FUNIT_TWIP)))); + bRet = sal_True; } sal_Bool bIsUseCharUnitFlag = aUseCharUnit.IsChecked(); @@ -212,7 +212,7 @@ BOOL SwLoadOptPage::FillItemSet( SfxItemSet& rSet ) if( bIsUseCharUnitFlag != aUseCharUnit.GetSavedValue()) { rSet.Put(SfxBoolItem(SID_ATTR_APPLYCHARUNIT, bIsUseCharUnitFlag )); - bRet = TRUE; + bRet = sal_True; } sal_Bool bIsSquaredPageModeFlag = aUseSquaredPageMode.IsChecked(); @@ -225,7 +225,7 @@ BOOL SwLoadOptPage::FillItemSet( SfxItemSet& rSet ) pDoc->SetDefaultPageMode( bIsSquaredPageModeFlag ); pWrtShell->SetModified(); } - bRet = TRUE; + bRet = sal_True; } return bRet; @@ -233,18 +233,18 @@ BOOL SwLoadOptPage::FillItemSet( SfxItemSet& rSet ) void SwLoadOptPage::Reset( const SfxItemSet& rSet) { - const SwMasterUsrPref* pUsrPref = SW_MOD()->GetUsrPref(FALSE); + const SwMasterUsrPref* pUsrPref = SW_MOD()->GetUsrPref(sal_False); const SfxPoolItem* pItem; - if(SFX_ITEM_SET == rSet.GetItemState(FN_PARAM_WRTSHELL, FALSE, &pItem)) + if(SFX_ITEM_SET == rSet.GetItemState(FN_PARAM_WRTSHELL, sal_False, &pItem)) pWrtShell = (SwWrtShell*)((const SwPtrItem*)pItem)->GetValue(); SwFldUpdateFlags eFldFlags = AUTOUPD_GLOBALSETTING; nOldLinkMode = GLOBALSETTING; if (pWrtShell) { - eFldFlags = pWrtShell->GetFldUpdateFlags(TRUE); - nOldLinkMode = pWrtShell->GetLinkUpdMode(TRUE); + eFldFlags = pWrtShell->GetFldUpdateFlags(sal_True); + nOldLinkMode = pWrtShell->GetLinkUpdMode(sal_True); } if(GLOBALSETTING == nOldLinkMode) nOldLinkMode = pUsrPref->GetUpdateLinkMode(); @@ -269,7 +269,7 @@ void SwLoadOptPage::Reset( const SfxItemSet& rSet) const SfxUInt16Item& rItem = (SfxUInt16Item&)rSet.Get( SID_ATTR_METRIC ); FieldUnit eFieldUnit = (FieldUnit)rItem.GetValue(); - for ( USHORT i = 0; i < aMetricLB.GetEntryCount(); ++i ) + for ( sal_uInt16 i = 0; i < aMetricLB.GetEntryCount(); ++i ) { if ( (int)(sal_IntPtr)aMetricLB.GetEntryData( i ) == (int)eFieldUnit ) { @@ -280,14 +280,14 @@ void SwLoadOptPage::Reset( const SfxItemSet& rSet) ::SetFieldUnit(aTabMF, eFieldUnit); } aMetricLB.SaveValue(); - if(SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_DEFTABSTOP, FALSE, &pItem)) + if(SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_DEFTABSTOP, sal_False, &pItem)) { nLastTab = ((SfxUInt16Item*)pItem)->GetValue(); aTabMF.SetValue(aTabMF.Normalize(nLastTab), FUNIT_TWIP); } aTabMF.SaveValue(); - if(SFX_ITEM_SET == rSet.GetItemState(SID_HTML_MODE, FALSE, &pItem)) + if(SFX_ITEM_SET == rSet.GetItemState(SID_HTML_MODE, sal_False, &pItem)) { bHTMLMode = 0 != (((const SfxUInt16Item*)pItem)->GetValue() & HTMLMODE_ON); } @@ -300,9 +300,9 @@ void SwLoadOptPage::Reset( const SfxItemSet& rSet) aUseSquaredPageMode.SaveValue(); } - if(SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_APPLYCHARUNIT, FALSE, &pItem)) + if(SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_APPLYCHARUNIT, sal_False, &pItem)) { - BOOL bUseCharUnit = ((const SfxBoolItem*)pItem)->GetValue(); + sal_Bool bUseCharUnit = ((const SfxBoolItem*)pItem)->GetValue(); aUseCharUnit.Check(bUseCharUnit); } else @@ -317,12 +317,12 @@ void SwLoadOptPage::Reset( const SfxItemSet& rSet) --------------------------------------------------*/ IMPL_LINK(SwLoadOptPage, MetricHdl, ListBox*, EMPTYARG) { - const USHORT nMPos = aMetricLB.GetSelectEntryPos(); + const sal_uInt16 nMPos = aMetricLB.GetSelectEntryPos(); if(nMPos != USHRT_MAX) { // Double-Cast for VA3.0 FieldUnit eFieldUnit = (FieldUnit)(long)aMetricLB.GetEntryData( nMPos ); - BOOL bModified = aTabMF.IsModified(); + sal_Bool bModified = aTabMF.IsModified(); long nVal = bModified ? sal::static_int_cast<sal_Int32, sal_Int64 >( aTabMF.Denormalize( aTabMF.GetValue( FUNIT_TWIP ) )) : nLastTab; @@ -426,7 +426,7 @@ SwCaptionOptPage::SwCaptionOptPage( Window* pParent, const SfxItemSet& rSet ) sNone (SW_RESSTR( STR_CATEGORY_NONE )), pMgr (new SwFldMgr()), - bHTMLMode(FALSE) + bHTMLMode(sal_False) { Wallpaper aBack( GetSettings().GetStyleSettings().GetWindowColor() ); aPreview.SetBackground( aBack ); @@ -436,11 +436,11 @@ SwCaptionOptPage::SwCaptionOptPage( Window* pParent, const SfxItemSet& rSet ) SwStyleNameMapper::FillUIName( RES_POOLCOLL_LABEL_FRAME, sText ); SwStyleNameMapper::FillUIName( RES_POOLCOLL_LABEL_DRAWING, sDrawing ); - USHORT i, nCount; + sal_uInt16 i, nCount; SwWrtShell *pSh = ::GetActiveWrtShell(); // aFormatBox - USHORT nSelFmt = SVX_NUM_ARABIC; + sal_uInt16 nSelFmt = SVX_NUM_ARABIC; if (pSh) { nCount = pMgr->GetFldTypeCount(); @@ -449,19 +449,19 @@ SwCaptionOptPage::SwCaptionOptPage( Window* pParent, const SfxItemSet& rSet ) if( ( pFldType = pMgr->GetFldType(USHRT_MAX, --i))->GetName() == aCategoryBox.GetText() ) { - nSelFmt = (USHORT)((SwSetExpFieldType*)pFldType)->GetSeqFormat(); + nSelFmt = (sal_uInt16)((SwSetExpFieldType*)pFldType)->GetSeqFormat(); break; } - ::FillCharStyleListBox( aCharStyleLB, pSh->GetView().GetDocShell(), TRUE, TRUE ); + ::FillCharStyleListBox( aCharStyleLB, pSh->GetView().GetDocShell(), sal_True, sal_True ); } - nCount = pMgr->GetFormatCount(TYP_SEQFLD, FALSE); + nCount = pMgr->GetFormatCount(TYP_SEQFLD, sal_False); for ( i = 0; i < nCount; ++i ) { aFormatBox.InsertEntry( pMgr->GetFormatStr(TYP_SEQFLD, i) ); - USHORT nFmtId = pMgr->GetFormatId(TYP_SEQFLD, i); + sal_uInt16 nFmtId = pMgr->GetFormatId(TYP_SEQFLD, i); aFormatBox.SetEntryData( i, reinterpret_cast<void*>(nFmtId) ); if( nFmtId == nSelFmt ) aFormatBox.SelectEntryPos( i ); @@ -519,9 +519,9 @@ SfxTabPage* SwCaptionOptPage::Create( Window* pParent, return new SwCaptionOptPage(pParent, rAttrSet ); } -BOOL SwCaptionOptPage::FillItemSet( SfxItemSet& ) +sal_Bool SwCaptionOptPage::FillItemSet( SfxItemSet& ) { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; SwModuleOptions* pModOpt = SW_MOD()->GetModuleConfig(); SaveEntry(aCheckLB.FirstSelected()); // apply current entry @@ -535,7 +535,7 @@ BOOL SwCaptionOptPage::FillItemSet( SfxItemSet& ) pEntry = aCheckLB.Next(pEntry); } - USHORT nCheckCount = aCheckLB.GetCheckedEntryCount(); + sal_uInt16 nCheckCount = aCheckLB.GetCheckedEntryCount(); pModOpt->SetInsWithCaption( bHTMLMode, nCheckCount > 0 ); sal_Int32 nPos = aLbCaptionOrder.GetSelectEntryPos(); @@ -547,7 +547,7 @@ BOOL SwCaptionOptPage::FillItemSet( SfxItemSet& ) void SwCaptionOptPage::Reset( const SfxItemSet& rSet) { const SfxPoolItem* pItem; - if(SFX_ITEM_SET == rSet.GetItemState(SID_HTML_MODE, FALSE, &pItem)) + if(SFX_ITEM_SET == rSet.GetItemState(SID_HTML_MODE, sal_False, &pItem)) { bHTMLMode = 0 != (((const SfxUInt16Item*)pItem)->GetValue() & HTMLMODE_ON); } @@ -556,7 +556,7 @@ void SwCaptionOptPage::Reset( const SfxItemSet& rSet) aCheckLB.GetModel()->Clear(); // remove all entries // Writer objects - USHORT nPos = 0; + sal_uInt16 nPos = 0; aCheckLB.InsertEntry(sSWTable); SetOptions(nPos++, TABLE_CAP); aCheckLB.InsertEntry(sSWFrame); @@ -593,7 +593,7 @@ void SwCaptionOptPage::Reset( const SfxItemSet& rSet) aObjS.FillInsertObjects(); aObjS.Remove( SvGlobalName( SO3_SW_CLASSID ) ); // remove Writer-ID - for ( ULONG i = 0; i < aObjS.Count(); ++i ) + for ( sal_uLong i = 0; i < aObjS.Count(); ++i ) { const SvGlobalName &rOleId = aObjS[i].GetClassName(); const String* pClassName = &aObjS[i].GetHumanName(); @@ -610,7 +610,7 @@ void SwCaptionOptPage::Reset( const SfxItemSet& rSet) ModifyHdl(); } -void SwCaptionOptPage::SetOptions(const USHORT nPos, +void SwCaptionOptPage::SetOptions(const sal_uInt16 nPos, const SwCapObjType eObjType, const SvGlobalName *pOleId) { SwModuleOptions* pModOpt = SW_MOD()->GetModuleConfig(); @@ -643,7 +643,7 @@ IMPL_LINK( SwCaptionOptPage, ShowEntryHdl, SvxCheckListBox *, EMPTYARG ) if (pSelEntry) { - sal_Bool bChecked = aCheckLB.IsChecked((USHORT)aCheckLB.GetModel()->GetAbsPos(pSelEntry)); + sal_Bool bChecked = aCheckLB.IsChecked((sal_uInt16)aCheckLB.GetModel()->GetAbsPos(pSelEntry)); aSettingsGroupFL.Enable( bChecked ); aCategoryText.Enable( bChecked ); @@ -676,9 +676,9 @@ IMPL_LINK( SwCaptionOptPage, ShowEntryHdl, SvxCheckListBox *, EMPTYARG ) aCategoryBox.InsertEntry( sNone ); if (pSh) { - USHORT nCount = pMgr->GetFldTypeCount(); + sal_uInt16 nCount = pMgr->GetFldTypeCount(); - for (USHORT i = 0; i < nCount; i++) + for (sal_uInt16 i = 0; i < nCount; i++) { SwFieldType *pType = pMgr->GetFldType( USHRT_MAX, i ); if( pType->Which() == RES_SETEXPFLD && @@ -703,7 +703,7 @@ IMPL_LINK( SwCaptionOptPage, ShowEntryHdl, SvxCheckListBox *, EMPTYARG ) aCategoryBox.InsertEntry(pOpt->GetCategory()); if (!aCategoryBox.GetText().Len()) { - USHORT nPos = 0; + sal_uInt16 nPos = 0; switch(pOpt->GetObjType()) { case OLE_CAP: @@ -714,9 +714,9 @@ IMPL_LINK( SwCaptionOptPage, ShowEntryHdl, SvxCheckListBox *, EMPTYARG ) aCategoryBox.SetText(aCategoryBox.GetEntry(nPos).GetName()); } - for (USHORT i = 0; i < aFormatBox.GetEntryCount(); i++) + for (sal_uInt16 i = 0; i < aFormatBox.GetEntryCount(); i++) { - if (pOpt->GetNumType() == (USHORT)(ULONG)aFormatBox.GetEntryData(i)) + if (pOpt->GetNumType() == (sal_uInt16)(sal_uLong)aFormatBox.GetEntryData(i)) { aFormatBox.SelectEntryPos(i); break; @@ -744,7 +744,7 @@ IMPL_LINK( SwCaptionOptPage, ShowEntryHdl, SvxCheckListBox *, EMPTYARG ) aPosText.IsEnabled() ); aPosBox.SelectEntryPos(pOpt->GetPos()); - USHORT nLevelPos = ( pOpt->GetLevel() < MAXLEVEL ) ? pOpt->GetLevel() + 1 : 0; + sal_uInt16 nLevelPos = ( pOpt->GetLevel() < MAXLEVEL ) ? pOpt->GetLevel() + 1 : 0; aLbLevel.SelectEntryPos( nLevelPos ); aEdDelim.SetText(pOpt->GetSeparator()); aNumberingSeparatorED.SetText( pOpt->GetNumSeparator() ); @@ -778,7 +778,7 @@ void SwCaptionOptPage::SaveEntry(SvLBoxEntry* pEntry) { InsCaptionOpt* pOpt = (InsCaptionOpt*)pEntry->GetUserData(); - pOpt->UseCaption() = aCheckLB.IsChecked((USHORT)aCheckLB.GetModel()->GetAbsPos(pEntry)); + pOpt->UseCaption() = aCheckLB.IsChecked((sal_uInt16)aCheckLB.GetModel()->GetAbsPos(pEntry)); String aName( aCategoryBox.GetText() ); if(aName == sNone) pOpt->SetCategory(aEmptyStr); @@ -788,11 +788,11 @@ void SwCaptionOptPage::SaveEntry(SvLBoxEntry* pEntry) aName.EraseTrailingChars(' '); pOpt->SetCategory(aName); } - pOpt->SetNumType((USHORT)(ULONG)aFormatBox.GetEntryData(aFormatBox.GetSelectEntryPos())); + pOpt->SetNumType((sal_uInt16)(sal_uLong)aFormatBox.GetEntryData(aFormatBox.GetSelectEntryPos())); pOpt->SetCaption(aTextEdit.IsEnabled() ? aTextEdit.GetText() : aEmptyStr ); pOpt->SetPos(aPosBox.GetSelectEntryPos()); - USHORT nPos = aLbLevel.GetSelectEntryPos(); - USHORT nLevel = ( nPos > 0 && nPos != LISTBOX_ENTRY_NOTFOUND ) ? nPos - 1 : MAXLEVEL; + sal_uInt16 nPos = aLbLevel.GetSelectEntryPos(); + sal_uInt16 nLevel = ( nPos > 0 && nPos != LISTBOX_ENTRY_NOTFOUND ) ? nPos - 1 : MAXLEVEL; pOpt->SetLevel(nLevel); pOpt->SetSeparator(aEdDelim.GetText()); pOpt->SetNumSeparator( aNumberingSeparatorED.GetText()); @@ -848,7 +848,7 @@ void SwCaptionOptPage::DrawSample() //#i61007# order of captions bool bOrderNumberingFirst = aLbCaptionOrder.GetSelectEntryPos() == 1; // number - USHORT nNumFmt = (USHORT)(ULONG)aFormatBox.GetEntryData( + sal_uInt16 nNumFmt = (sal_uInt16)(sal_uLong)aFormatBox.GetEntryData( aFormatBox.GetSelectEntryPos() ); if( SVX_NUM_NUMBER_NONE != nNumFmt ) { @@ -868,13 +868,13 @@ void SwCaptionOptPage::DrawSample() RES_SETEXPFLD, sFldTypeName ); if( pFldType && pFldType->GetOutlineLvl() < MAXLEVEL ) { - BYTE nLvl = pFldType->GetOutlineLvl(); + sal_uInt8 nLvl = pFldType->GetOutlineLvl(); SwNumberTree::tNumberVector aNumVector; - for( BYTE i = 0; i <= nLvl; ++i ) + for( sal_uInt8 i = 0; i <= nLvl; ++i ) aNumVector.push_back(1); String sNumber( pSh->GetOutlineNumRule()->MakeNumString( - aNumVector, FALSE )); + aNumVector, sal_False )); if( sNumber.Len() ) (aStr += sNumber) += pFldType->GetDelimiter(); } diff --git a/sw/source/ui/config/optload.src b/sw/source/ui/config/optload.src index a20d578f47..aa8b311db0 100644 --- a/sw/source/ui/config/optload.src +++ b/sw/source/ui/config/optload.src @@ -53,6 +53,7 @@ TabPage TP_OPTLOAD_PAGE }; RadioButton RB_ALWAYS { + HelpID = "sw:RadioButton:TP_OPTLOAD_PAGE:RB_ALWAYS"; Pos = MAP_APPFONT ( 18 , 26 ) ; Size = MAP_APPFONT ( 75 , 10 ) ; TabStop = TRUE ; @@ -60,6 +61,7 @@ TabPage TP_OPTLOAD_PAGE }; RadioButton RB_REQUEST { + HelpID = "sw:RadioButton:TP_OPTLOAD_PAGE:RB_REQUEST"; Pos = MAP_APPFONT ( 18 , 39 ) ; Size = MAP_APPFONT ( 75 , 10 ) ; TabStop = TRUE ; @@ -67,6 +69,7 @@ TabPage TP_OPTLOAD_PAGE }; RadioButton RB_NEVER { + HelpID = "sw:RadioButton:TP_OPTLOAD_PAGE:RB_NEVER"; Pos = MAP_APPFONT ( 18 , 52 ) ; Size = MAP_APPFONT ( 75 , 10 ) ; TabStop = TRUE ; @@ -80,12 +83,14 @@ TabPage TP_OPTLOAD_PAGE }; CheckBox CB_AUTO_UPDATE_FIELDS { + HelpID = "sw:CheckBox:TP_OPTLOAD_PAGE:CB_AUTO_UPDATE_FIELDS"; Pos = MAP_APPFONT ( 136 , 26) ; Size = MAP_APPFONT ( 118 , 10 ) ; Text [ en-US ] = "~Fields"; }; CheckBox CB_AUTO_UPDATE_CHARTS { + HelpID = "sw:CheckBox:TP_OPTLOAD_PAGE:CB_AUTO_UPDATE_CHARTS"; Pos = MAP_APPFONT ( 136 , 39) ; Size = MAP_APPFONT ( 109 , 10 ) ; Text [ en-US ] = "~Charts"; @@ -104,6 +109,7 @@ TabPage TP_OPTLOAD_PAGE }; ListBox LB_METRIC { + HelpID = "sw:ListBox:TP_OPTLOAD_PAGE:LB_METRIC"; Pos = MAP_APPFONT ( 130, 77 ) ; Size = MAP_APPFONT ( 50 , 50 ) ; Border = TRUE ; @@ -118,6 +124,7 @@ TabPage TP_OPTLOAD_PAGE }; MetricField MF_TAB { + HelpID = "sw:MetricField:TP_OPTLOAD_PAGE:MF_TAB"; Border = TRUE ; Pos = MAP_APPFONT ( 130 , 93 ) ; Size = MAP_APPFONT ( 50 , 12 ) ; @@ -134,6 +141,7 @@ TabPage TP_OPTLOAD_PAGE }; CheckBox CB_USE_SQUARE_PAGE_MODE { + HelpID = "sw:CheckBox:TP_OPTLOAD_PAGE:CB_USE_SQUARE_PAGE_MODE"; Pos = MAP_APPFONT ( 12 , 111) ; Size = MAP_APPFONT ( 248 , 10 ) ; Text [ en-US ] = "Use square page mode for text grid"; @@ -182,6 +190,7 @@ TabPage TP_OPTCAPTION_PAGE }; ListBox LB_ORDER { + HelpID = "sw:ListBox:TP_OPTCAPTION_PAGE:LB_ORDER"; Border = TRUE ; Pos = MAP_APPFONT ( 6 , 141 ) ; Size = MAP_APPFONT ( 106 , 60 ) ; @@ -231,6 +240,7 @@ TabPage TP_OPTCAPTION_PAGE }; ComboBox BOX_CATEGORY { + HelpID = "sw:ComboBox:TP_OPTCAPTION_PAGE:BOX_CATEGORY"; Pos = MAP_APPFONT ( 189 , 14 ) ; Size = MAP_APPFONT ( 59 , 61 ) ; DropDown = TRUE ; @@ -246,6 +256,7 @@ TabPage TP_OPTCAPTION_PAGE }; ListBox BOX_FORMAT { + HelpID = "sw:ListBox:TP_OPTCAPTION_PAGE:BOX_FORMAT"; Border = TRUE ; Pos = MAP_APPFONT ( 189 , 29 ) ; Size = MAP_APPFONT ( 59 , 61 ) ; @@ -261,6 +272,7 @@ TabPage TP_OPTCAPTION_PAGE }; Edit ED_NUM_SEP { + HelpID = "sw:Edit:TP_OPTCAPTION_PAGE:ED_NUM_SEP"; Pos = MAP_APPFONT ( 189 , 44 ) ; Size = MAP_APPFONT ( 59 , 12 ) ; Border = TRUE ; @@ -277,6 +289,7 @@ TabPage TP_OPTCAPTION_PAGE }; Edit EDT_TEXT { + HelpID = "sw:Edit:TP_OPTCAPTION_PAGE:EDT_TEXT"; Pos = MAP_APPFONT ( 189 , 59 ) ; Size = MAP_APPFONT ( 59 , 12 ) ; Border = TRUE ; @@ -292,6 +305,7 @@ TabPage TP_OPTCAPTION_PAGE }; ListBox BOX_POS { + HelpID = "sw:ListBox:TP_OPTCAPTION_PAGE:BOX_POS"; Pos = MAP_APPFONT ( 189 , 74 ) ; Size = MAP_APPFONT ( 59 , 61 ) ; DropDown = TRUE ; @@ -313,6 +327,7 @@ TabPage TP_OPTCAPTION_PAGE }; ListBox LB_LEVEL { + HelpID = "sw:ListBox:TP_OPTCAPTION_PAGE:LB_LEVEL"; Border = TRUE ; Pos = MAP_APPFONT ( 189 , 100 ) ; Size = MAP_APPFONT ( 59 , 60 ) ; @@ -331,6 +346,7 @@ TabPage TP_OPTCAPTION_PAGE }; Edit ED_SEPARATOR { + HelpID = "sw:Edit:TP_OPTCAPTION_PAGE:ED_SEPARATOR"; Pos = MAP_APPFONT ( 189 , 115 ) ; Size = MAP_APPFONT ( 59 , 12 ) ; Border = TRUE ; @@ -351,6 +367,7 @@ TabPage TP_OPTCAPTION_PAGE }; ListBox LB_CHARSTYLE { + HelpID = "sw:ListBox:TP_OPTCAPTION_PAGE:LB_CHARSTYLE"; Border = TRUE ; Pos = MAP_APPFONT ( 189 , 141 ) ; Size = MAP_APPFONT ( 59 , 60 ) ; @@ -363,6 +380,7 @@ TabPage TP_OPTCAPTION_PAGE }; CheckBox CB_APPLYBORDER { + HelpID = "sw:CheckBox:TP_OPTCAPTION_PAGE:CB_APPLYBORDER"; Pos = MAP_APPFONT ( 125 , 158 ) ; Size = MAP_APPFONT ( 124 , 10 ) ; Text [ en-US ] = "Apply border and shadow" ; diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx index 2568a64299..4602efe874 100644 --- a/sw/source/ui/config/optpage.cxx +++ b/sw/source/ui/config/optpage.cxx @@ -28,29 +28,20 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" + #ifdef SW_DLLIMPLEMENTATION #undef SW_DLLIMPLEMENTATION #endif - -#include <hintids.hxx> -#include <cmdid.h> -#include <vcl/svapp.hxx> #ifndef _SVSTDARR_HXX #define _SVSTDARR_STRINGSDTOR #include <svl/svstdarr.hxx> #endif -#include <svl/cjkoptions.hxx> -#include <svtools/ctrltool.hxx> -#include <svl/eitem.hxx> -#include <svx/htmlmode.hxx> -#include <sfx2/printer.hxx> -#include <sfx2/bindings.hxx> -#include <svx/xtable.hxx> -#include <editeng/fhgtitem.hxx> -#include <editeng/fontitem.hxx> -#include <editeng/langitem.hxx> -#include <svx/dlgutil.hxx> + +#include <optpage.hxx> +#include <doc.hxx> +#include <hintids.hxx> +#include <cmdid.h> #include <fmtcol.hxx> #include <charatr.hxx> #include <swtypes.hxx> @@ -64,8 +55,7 @@ #include <poolfmt.hxx> #include <uiitems.hxx> #include <initui.hxx> -#include <optpage.hxx> -#include <swprtopt.hxx> +#include <printdata.hxx> #include <modcfg.hxx> #include <srcview.hxx> #include <crstate.hxx> @@ -74,13 +64,26 @@ #include <config.hrc> #include <redlopt.hrc> #include <optdlg.hrc> -#include <svx/strarray.hxx> -#include <svl/slstitm.hxx> -#include <sfx2/request.hxx> #include <swwrtshitem.hxx> +#include <unomid.h> + +#include <editeng/fhgtitem.hxx> +#include <editeng/fontitem.hxx> +#include <editeng/langitem.hxx> +#include <sfx2/request.hxx> +#include <sfx2/printer.hxx> +#include <sfx2/bindings.hxx> +#include <svl/slstitm.hxx> #include <svl/ctloptions.hxx> +#include <svl/eitem.hxx> +#include <svl/cjkoptions.hxx> +#include <svtools/ctrltool.hxx> +#include <svx/htmlmode.hxx> +#include <svx/xtable.hxx> +#include <svx/dlgutil.hxx> +#include <svx/strarray.hxx> +#include <vcl/svapp.hxx> -#include <unomid.h> using namespace ::com::sun::star; @@ -116,7 +119,7 @@ SwContentOptPage::SwContentOptPage( Window* pParent, { FreeResource(); const SfxPoolItem* pItem; - if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_HTML_MODE, FALSE, &pItem ) + if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_HTML_MODE, sal_False, &pItem ) && ((SfxUInt16Item*)pItem)->GetValue() & HTMLMODE_ON) { aMetricLB.Show(); @@ -136,7 +139,7 @@ SwContentOptPage::SwContentOptPage( Window* pParent, aAnyRulerCB.SetClickHdl(LINK(this, SwContentOptPage, AnyRulerHdl)); SvxStringArray aMetricArr( SW_RES( STR_ARR_METRIC ) ); - for ( USHORT i = 0; i < aMetricArr.Count(); ++i ) + for ( sal_uInt16 i = 0; i < aMetricArr.Count(); ++i ) { String sMetric = aMetricArr.GetStringByPos( i ); FieldUnit eFUnit = (FieldUnit)aMetricArr.GetValue( i ); @@ -156,7 +159,7 @@ SwContentOptPage::SwContentOptPage( Window* pParent, // there isn't 'line' unit in HTML format if ( eFUnit != FUNIT_LINE ) { - USHORT nPos = aMetricLB.InsertEntry( sMetric ); + sal_uInt16 nPos = aMetricLB.InsertEntry( sMetric ); aMetricLB.SetEntryData( nPos, (void*)(long)eFUnit ); aHMetric.InsertEntry( sMetric ); aHMetric.SetEntryData( nPos, (void*)(long)eFUnit ); @@ -164,7 +167,7 @@ SwContentOptPage::SwContentOptPage( Window* pParent, // a vertical ruler has not the 'character' unit if ( eFUnit != FUNIT_CHAR ) { - USHORT nPos = aVMetric.InsertEntry( sMetric ); + sal_uInt16 nPos = aVMetric.InsertEntry( sMetric ); aVMetric.SetEntryData( nPos, (void*)(long)eFUnit ); } } @@ -183,13 +186,13 @@ SfxTabPage* SwContentOptPage::Create( Window* pParent, return new SwContentOptPage(pParent, rAttrSet); } -static void lcl_SelectMetricLB(ListBox& rMetric, USHORT nSID, const SfxItemSet& rSet) +static void lcl_SelectMetricLB(ListBox& rMetric, sal_uInt16 nSID, const SfxItemSet& rSet) { const SfxPoolItem* pItem; - if( rSet.GetItemState( nSID, FALSE, &pItem ) >= SFX_ITEM_AVAILABLE ) + if( rSet.GetItemState( nSID, sal_False, &pItem ) >= SFX_ITEM_AVAILABLE ) { FieldUnit eFieldUnit = (FieldUnit)((SfxUInt16Item*)pItem)->GetValue(); - for ( USHORT i = 0; i < rMetric.GetEntryCount(); ++i ) + for ( sal_uInt16 i = 0; i < rMetric.GetEntryCount(); ++i ) { if ( (int)(sal_IntPtr)rMetric.GetEntryData( i ) == (int)eFieldUnit ) { @@ -205,7 +208,7 @@ void SwContentOptPage::Reset(const SfxItemSet& rSet) { const SwElemItem* pElemAttr = 0; - rSet.GetItemState( FN_PARAM_ELEM , FALSE, + rSet.GetItemState( FN_PARAM_ELEM , sal_False, (const SfxPoolItem**)&pElemAttr ); if(pElemAttr) { @@ -232,7 +235,7 @@ void SwContentOptPage::Reset(const SfxItemSet& rSet) AnyRulerHdl(&aAnyRulerCB); } -BOOL SwContentOptPage::FillItemSet(SfxItemSet& rSet) +sal_Bool SwContentOptPage::FillItemSet(SfxItemSet& rSet) { const SwElemItem* pOldAttr = (const SwElemItem*) GetOldItem(GetItemSet(), FN_PARAM_ELEM); @@ -257,34 +260,34 @@ BOOL SwContentOptPage::FillItemSet(SfxItemSet& rSet) aElem.bSmoothScroll = aSmoothCBox.IsChecked(); - BOOL bRet = !pOldAttr || aElem != *pOldAttr; + sal_Bool bRet = !pOldAttr || aElem != *pOldAttr; if(bRet) bRet = 0 != rSet.Put(aElem); - USHORT nMPos = aMetricLB.GetSelectEntryPos(); - USHORT nGlobalMetricPos = nMPos; + sal_uInt16 nMPos = aMetricLB.GetSelectEntryPos(); + sal_uInt16 nGlobalMetricPos = nMPos; if ( nMPos != aMetricLB.GetSavedValue() ) { // Double-Cast for VA3.0 - USHORT nFieldUnit = (USHORT)(long)aMetricLB.GetEntryData( nMPos ); - rSet.Put( SfxUInt16Item( SID_ATTR_METRIC, (UINT16)nFieldUnit ) ); - bRet = TRUE; + sal_uInt16 nFieldUnit = (sal_uInt16)(long)aMetricLB.GetEntryData( nMPos ); + rSet.Put( SfxUInt16Item( SID_ATTR_METRIC, (sal_uInt16)nFieldUnit ) ); + bRet = sal_True; } nMPos = aHMetric.GetSelectEntryPos(); if ( nMPos != aHMetric.GetSavedValue() || nMPos != nGlobalMetricPos ) { // Double-Cast for VA3.0 - USHORT nFieldUnit = (USHORT)(long)aHMetric.GetEntryData( nMPos ); - rSet.Put( SfxUInt16Item( FN_HSCROLL_METRIC, (UINT16)nFieldUnit ) ); - bRet = TRUE; + sal_uInt16 nFieldUnit = (sal_uInt16)(long)aHMetric.GetEntryData( nMPos ); + rSet.Put( SfxUInt16Item( FN_HSCROLL_METRIC, (sal_uInt16)nFieldUnit ) ); + bRet = sal_True; } nMPos = aVMetric.GetSelectEntryPos(); if ( nMPos != aVMetric.GetSavedValue() || nMPos != nGlobalMetricPos ) { // Double-Cast for VA3.0 - USHORT nFieldUnit = (USHORT)(long)aVMetric.GetEntryData( nMPos ); - rSet.Put( SfxUInt16Item( FN_VSCROLL_METRIC, (UINT16)nFieldUnit ) ); - bRet = TRUE; + sal_uInt16 nFieldUnit = (sal_uInt16)(long)aVMetric.GetEntryData( nMPos ); + rSet.Put( SfxUInt16Item( FN_VSCROLL_METRIC, (sal_uInt16)nFieldUnit ) ); + bRet = sal_True; } return bRet; } @@ -297,7 +300,7 @@ IMPL_LINK(SwContentOptPage, VertRulerHdl, CheckBox*, pBox) IMPL_LINK( SwContentOptPage, AnyRulerHdl, CheckBox*, pBox) { - BOOL bChecked = pBox->IsChecked(); + sal_Bool bChecked = pBox->IsChecked(); aHRulerCBox .Enable(bChecked); aHMetric .Enable(bChecked); aVRulerCBox .Enable(bChecked); @@ -325,19 +328,19 @@ SwAddPrinterTabPage::SwAddPrinterTabPage( Window* pParent, aProspectCB (this, SW_RES(CB_PROSPECT)), aProspectCB_RTL (this, SW_RES(CB_PROSPECT_RTL)), aSeparatorRFL (this, SW_RES(FL_SEP_PRT_RIGHT)), + aFL3 (this, SW_RES(FL_3)), aNoRB (this, SW_RES(RB_NO)), aOnlyRB (this, SW_RES(RB_ONLY)), aEndRB (this, SW_RES(RB_END)), aEndPageRB (this, SW_RES(RB_PAGEEND)), - aFL3 (this, SW_RES(FL_3)), aFL4 (this, SW_RES(FL_4)), aPrintEmptyPagesCB(this, SW_RES(CB_PRINTEMPTYPAGES)), aPaperFromSetupCB(this, SW_RES(CB_PAPERFROMSETUP)), aFaxFT (this, SW_RES(FT_FAX)), aFaxLB (this, SW_RES(LB_FAX)), sNone(SW_RES(ST_NONE)), - bAttrModified( FALSE ), - bPreview ( FALSE ) + bAttrModified( sal_False ), + bPreview ( sal_False ) { Init(); FreeResource(); @@ -361,7 +364,7 @@ SwAddPrinterTabPage::SwAddPrinterTabPage( Window* pParent, aFaxLB.SetSelectHdl( LINK( this, SwAddPrinterTabPage, SelectHdl ) ); const SfxPoolItem* pItem; - if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_HTML_MODE, FALSE, &pItem ) + if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_HTML_MODE, sal_False, &pItem ) && ((SfxUInt16Item*)pItem)->GetValue() & HTMLMODE_ON) { aLeftPageCB .Hide(); @@ -391,7 +394,7 @@ SwAddPrinterTabPage::SwAddPrinterTabPage( Window* pParent, aProspectCB_RTL.Show(aCTLOptions.IsCTLFontEnabled()); } -void SwAddPrinterTabPage::SetPreview(BOOL bPrev) +void SwAddPrinterTabPage::SetPreview(sal_Bool bPrev) { bPreview = bPrev; @@ -415,13 +418,13 @@ SfxTabPage* SwAddPrinterTabPage::Create( Window* pParent, return ( new SwAddPrinterTabPage( pParent, rAttrSet ) ); } -BOOL SwAddPrinterTabPage::FillItemSet( SfxItemSet& rCoreSet ) +sal_Bool SwAddPrinterTabPage::FillItemSet( SfxItemSet& rCoreSet ) { if ( bAttrModified ) { SwAddPrinterItem aAddPrinterAttr (FN_PARAM_ADDPRINTER); aAddPrinterAttr.bPrintGraphic = aGrfCB.IsChecked(); - aAddPrinterAttr.bPrintTable = TRUE; // always enabled since CWS printerpullgpages /*aTabCB.IsChecked();*/ + aAddPrinterAttr.bPrintTable = sal_True; // always enabled since CWS printerpullgpages /*aTabCB.IsChecked();*/ aAddPrinterAttr.bPrintDraw = aGrfCB.IsChecked(); // UI merged with aGrfCB in CWS printerpullgpages /*aDrawCB.IsChecked()*/; aAddPrinterAttr.bPrintControl = aCtrlFldCB.IsChecked(); aAddPrinterAttr.bPrintPageBackground = aBackgroundCB.IsChecked(); @@ -431,12 +434,12 @@ BOOL SwAddPrinterTabPage::FillItemSet( SfxItemSet& rCoreSet ) aAddPrinterAttr.bPrintLeftPages = aLeftPageCB.IsChecked(); aAddPrinterAttr.bPrintRightPages = aRightPageCB.IsChecked(); - aAddPrinterAttr.bPrintReverse = FALSE; // handled by vcl itself since CWS printerpullpages /*aReverseCB.IsChecked()*/; + aAddPrinterAttr.bPrintReverse = sal_False; // handled by vcl itself since CWS printerpullpages /*aReverseCB.IsChecked()*/; aAddPrinterAttr.bPrintProspect = aProspectCB.IsChecked(); aAddPrinterAttr.bPrintProspectRTL = aProspectCB_RTL.IsChecked(); aAddPrinterAttr.bPaperFromSetup = aPaperFromSetupCB.IsChecked(); aAddPrinterAttr.bPrintEmptyPages = aPrintEmptyPagesCB.IsChecked(); - aAddPrinterAttr.bPrintSingleJobs = TRUE; // handled by vcl in new print dialog since CWS printerpullpages /*aSingleJobsCB.IsChecked()*/; + aAddPrinterAttr.bPrintSingleJobs = sal_True; // handled by vcl in new print dialog since CWS printerpullpages /*aSingleJobsCB.IsChecked()*/; if (aNoRB.IsChecked()) aAddPrinterAttr.nPrintPostIts = POSTITS_NONE; @@ -459,7 +462,7 @@ void SwAddPrinterTabPage::Reset( const SfxItemSet& ) const SfxItemSet& rSet = GetItemSet(); const SwAddPrinterItem* pAddPrinterAttr = 0; - if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_ADDPRINTER , FALSE, + if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_ADDPRINTER , sal_False, (const SfxPoolItem**)&pAddPrinterAttr )) { aGrfCB.Check( pAddPrinterAttr->bPrintGraphic || pAddPrinterAttr->bPrintDraw ); @@ -483,14 +486,14 @@ void SwAddPrinterTabPage::Reset( const SfxItemSet& ) } if (aProspectCB.IsChecked()) { - aProspectCB_RTL.Enable(TRUE); - aNoRB.Enable( FALSE ); - aOnlyRB.Enable( FALSE ); - aEndRB.Enable( FALSE ); - aEndPageRB.Enable( FALSE ); + aProspectCB_RTL.Enable(sal_True); + aNoRB.Enable( sal_False ); + aOnlyRB.Enable( sal_False ); + aEndRB.Enable( sal_False ); + aEndPageRB.Enable( sal_False ); } else - aProspectCB_RTL.Enable( FALSE ); + aProspectCB_RTL.Enable( sal_False ); } void SwAddPrinterTabPage::Init() @@ -500,10 +503,10 @@ void SwAddPrinterTabPage::Init() IMPL_LINK_INLINE_START( SwAddPrinterTabPage, AutoClickHdl, CheckBox *, EMPTYARG ) { - bAttrModified = TRUE; + bAttrModified = sal_True; bool bIsProspect = aProspectCB.IsChecked(); if (!bIsProspect) - aProspectCB_RTL.Check( FALSE ); + aProspectCB_RTL.Check( sal_False ); aProspectCB_RTL.Enable( bIsProspect ); aNoRB.Enable( !bIsProspect ); aOnlyRB.Enable( !bIsProspect ); @@ -516,14 +519,14 @@ IMPL_LINK_INLINE_END( SwAddPrinterTabPage, AutoClickHdl, CheckBox *, EMPTYARG ) void SwAddPrinterTabPage::SetFax( const SvStringsDtor& rFaxLst ) { aFaxLB.InsertEntry(sNone); - for ( USHORT i = 0; i < rFaxLst.Count(); ++i ) + for ( sal_uInt16 i = 0; i < rFaxLst.Count(); ++i ) aFaxLB.InsertEntry( *rFaxLst.GetObject(i) ); aFaxLB.SelectEntryPos(0); } IMPL_LINK_INLINE_START( SwAddPrinterTabPage, SelectHdl, ListBox *, EMPTYARG ) { - bAttrModified=TRUE; + bAttrModified=sal_True; return 0; } IMPL_LINK_INLINE_END( SwAddPrinterTabPage, SelectHdl, ListBox *, EMPTYARG ) @@ -590,20 +593,20 @@ SwStdFontTabPage::SwStdFontTabPage( Window* pParent, pWrtShell(0), eLanguage( GetAppLanguage() ), - bListDefault(FALSE), - bSetListDefault(TRUE), - bLabelDefault(FALSE), - bSetLabelDefault(TRUE), - bIdxDefault(FALSE), - bSetIdxDefault(TRUE), - bDeletePrinter(FALSE), - - bListHeightDefault (FALSE), - bSetListHeightDefault (FALSE), - bLabelHeightDefault (FALSE), - bSetLabelHeightDefault(FALSE), - bIndexHeightDefault (FALSE), - bSetIndexHeightDefault (FALSE), + bListDefault(sal_False), + bSetListDefault(sal_True), + bLabelDefault(sal_False), + bSetLabelDefault(sal_True), + bIdxDefault(sal_False), + bSetIdxDefault(sal_True), + bDeletePrinter(sal_False), + + bListHeightDefault (sal_False), + bSetListHeightDefault (sal_False), + bLabelHeightDefault (sal_False), + bSetLabelHeightDefault(sal_False), + bIndexHeightDefault (sal_False), + bSetIndexHeightDefault (sal_False), nFontGroup(FONT_GROUP_DEFAULT), @@ -646,28 +649,20 @@ SfxTabPage* SwStdFontTabPage::Create( Window* pParent, return new SwStdFontTabPage(pParent, rAttrSet); } -void lcl_SetColl(SwWrtShell* pWrtShell, USHORT nType, +void lcl_SetColl(SwWrtShell* pWrtShell, sal_uInt16 nType, SfxPrinter* pPrt, const String& rStyle, - USHORT nFontWhich) + sal_uInt16 nFontWhich) { - BOOL bDelete = FALSE; - const SfxFont* pFnt = pPrt ? pPrt->GetFontByName(rStyle): 0; - if(!pFnt) - { - pFnt = new SfxFont(FAMILY_DONTKNOW, rStyle); - bDelete = TRUE; - } + Font aFont( rStyle, Size( 0, 10 ) ); + if( pPrt ) + aFont = pPrt->GetFontMetric( aFont ); SwTxtFmtColl *pColl = pWrtShell->GetTxtCollFromPool(nType); - pColl->SetFmtAttr(SvxFontItem(pFnt->GetFamily(), pFnt->GetName(), - aEmptyStr, pFnt->GetPitch(), pFnt->GetCharSet(), nFontWhich)); - if(bDelete) - { - delete (SfxFont*) pFnt; - } + pColl->SetFmtAttr(SvxFontItem(aFont.GetFamily(), aFont.GetName(), + aEmptyStr, aFont.GetPitch(), aFont.GetCharSet(), nFontWhich)); } -void lcl_SetColl(SwWrtShell* pWrtShell, USHORT nType, - sal_Int32 nHeight, USHORT nFontHeightWhich) +void lcl_SetColl(SwWrtShell* pWrtShell, sal_uInt16 nType, + sal_Int32 nHeight, sal_uInt16 nFontHeightWhich) { float fSize = (float)nHeight / 10; nHeight = CalcToUnit( fSize, SFX_MAPUNIT_TWIP ); @@ -675,9 +670,9 @@ void lcl_SetColl(SwWrtShell* pWrtShell, USHORT nType, pColl->SetFmtAttr(SvxFontHeightItem(nHeight, 100, nFontHeightWhich)); } -BOOL SwStdFontTabPage::FillItemSet( SfxItemSet& ) +sal_Bool SwStdFontTabPage::FillItemSet( SfxItemSet& ) { - BOOL bNotDocOnly = !aDocOnlyCB.IsChecked(); + sal_Bool bNotDocOnly = !aDocOnlyCB.IsChecked(); SW_MOD()->GetModuleConfig()->SetDefaultFontInCurrDocOnly(!bNotDocOnly); String sStandard = aStandardBox.GetText(); @@ -733,32 +728,23 @@ BOOL SwStdFontTabPage::FillItemSet( SfxItemSet& ) { pWrtShell->StartAllAction(); SfxPrinter* pPrinter = pWrtShell->getIDocumentDeviceAccess()->getPrinter( false ); - BOOL bMod = FALSE; - USHORT nFontWhich = sal::static_int_cast< sal_uInt16, RES_CHRATR >( + sal_Bool bMod = sal_False; + sal_uInt16 nFontWhich = sal::static_int_cast< sal_uInt16, RES_CHRATR >( nFontGroup == FONT_GROUP_DEFAULT ? RES_CHRATR_FONT : FONT_GROUP_CJK == nFontGroup ? RES_CHRATR_CJK_FONT : RES_CHRATR_CTL_FONT); - USHORT nFontHeightWhich = sal::static_int_cast< sal_uInt16, RES_CHRATR >( + sal_uInt16 nFontHeightWhich = sal::static_int_cast< sal_uInt16, RES_CHRATR >( nFontGroup == FONT_GROUP_DEFAULT ? RES_CHRATR_FONTSIZE : FONT_GROUP_CJK == nFontGroup ? RES_CHRATR_CJK_FONTSIZE : RES_CHRATR_CTL_FONTSIZE); if(sStandard != sShellStd) { - BOOL bDelete = FALSE; - const SfxFont* pFnt = pPrinter ? pPrinter->GetFontByName(sStandard): 0; - if(!pFnt) - { - pFnt = new SfxFont(FAMILY_DONTKNOW, sStandard); - bDelete = TRUE; - } - pWrtShell->SetDefault(SvxFontItem(pFnt->GetFamily(), pFnt->GetName(), - aEmptyStr, pFnt->GetPitch(), pFnt->GetCharSet(), nFontWhich)); + Font aFont( sStandard, Size( 0, 10 ) ); + if( pPrinter ) + aFont = pPrinter->GetFontMetric( aFont ); + pWrtShell->SetDefault(SvxFontItem(aFont.GetFamily(), aFont.GetName(), + aEmptyStr, aFont.GetPitch(), aFont.GetCharSet(), nFontWhich)); SwTxtFmtColl *pColl = pWrtShell->GetTxtCollFromPool(RES_POOLCOLL_STANDARD); pColl->ResetFmtAttr(nFontWhich); - if(bDelete) - { - delete (SfxFont*) pFnt; - bDelete = FALSE; - } - bMod = TRUE; + bMod = sal_True; } if(bStandardHeightChanged) { @@ -766,69 +752,69 @@ BOOL SwStdFontTabPage::FillItemSet( SfxItemSet& ) pWrtShell->SetDefault(SvxFontHeightItem( CalcToUnit( fSize, SFX_MAPUNIT_TWIP ), 100, nFontHeightWhich ) ); SwTxtFmtColl *pColl = pWrtShell->GetTxtCollFromPool(RES_POOLCOLL_STANDARD); pColl->ResetFmtAttr(nFontHeightWhich); - bMod = TRUE; + bMod = sal_True; } if(sTitle != sShellTitle ) { lcl_SetColl(pWrtShell, RES_POOLCOLL_HEADLINE_BASE, pPrinter, sTitle, nFontWhich); - bMod = TRUE; + bMod = sal_True; } if(bTitleHeightChanged) { lcl_SetColl(pWrtShell, RES_POOLCOLL_HEADLINE_BASE, sal::static_int_cast< sal_uInt16, sal_Int64 >(aTitleHeightLB.GetValue()), nFontHeightWhich); - bMod = TRUE; + bMod = sal_True; } if(sList != sShellList && (!bListDefault || !bSetListDefault )) { lcl_SetColl(pWrtShell, RES_POOLCOLL_NUMBUL_BASE, pPrinter, sList, nFontWhich); - bMod = TRUE; + bMod = sal_True; } if(bListHeightChanged) { lcl_SetColl(pWrtShell, RES_POOLCOLL_NUMBUL_BASE, sal::static_int_cast< sal_uInt16, sal_Int64 >(aListHeightLB.GetValue()), nFontHeightWhich); - bMod = TRUE; + bMod = sal_True; } if(sLabel != sShellLabel && (!bLabelDefault || !bSetLabelDefault)) { lcl_SetColl(pWrtShell, RES_POOLCOLL_LABEL, pPrinter, sLabel, nFontWhich); - bMod = TRUE; + bMod = sal_True; } if(bLabelHeightChanged) { lcl_SetColl(pWrtShell, RES_POOLCOLL_LABEL, sal::static_int_cast< sal_uInt16, sal_Int64 >(aLabelHeightLB.GetValue()), nFontHeightWhich); - bMod = TRUE; + bMod = sal_True; } if(sIdx != sShellIndex && (!bIdxDefault || !bSetIdxDefault)) { lcl_SetColl(pWrtShell, RES_POOLCOLL_REGISTER_BASE, pPrinter, sIdx, nFontWhich); - bMod = TRUE; + bMod = sal_True; } if(bIndexHeightChanged) { lcl_SetColl(pWrtShell, RES_POOLCOLL_REGISTER_BASE, sal::static_int_cast< sal_uInt16, sal_Int64 >(aIndexHeightLB.GetValue()), nFontHeightWhich); - bMod = TRUE; + bMod = sal_True; } if ( bMod ) pWrtShell->SetModified(); pWrtShell->EndAllAction(); } - return FALSE; + return sal_False; } void SwStdFontTabPage::Reset( const SfxItemSet& rSet) { const SfxPoolItem* pLang; - USHORT nLangSlot = nFontGroup == FONT_GROUP_DEFAULT ? SID_ATTR_LANGUAGE : + sal_uInt16 nLangSlot = nFontGroup == FONT_GROUP_DEFAULT ? SID_ATTR_LANGUAGE : FONT_GROUP_CJK == nFontGroup ? SID_ATTR_CHAR_CJK_LANGUAGE : SID_ATTR_CHAR_CTL_LANGUAGE; - if( SFX_ITEM_SET == rSet.GetItemState(nLangSlot, FALSE, &pLang)) + if( SFX_ITEM_SET == rSet.GetItemState(nLangSlot, sal_False, &pLang)) eLanguage = ((const SvxLanguageItem*)pLang)->GetValue(); String sTmp(aStdChrFL.GetText()); @@ -842,7 +828,7 @@ void SwStdFontTabPage::Reset( const SfxItemSet& rSet) aStdChrFL.SetText(sTmp); const SfxPoolItem* pItem; - if(SFX_ITEM_SET == rSet.GetItemState(FN_PARAM_PRINTER, FALSE, &pItem)) + if(SFX_ITEM_SET == rSet.GetItemState(FN_PARAM_PRINTER, sal_False, &pItem)) { pPrt = (SfxPrinter*)((const SwPtrItem*)pItem)->GetValue(); } @@ -853,29 +839,38 @@ void SwStdFontTabPage::Reset( const SfxItemSet& rSet) SID_PRINTER_CHANGESTODOC, SID_PRINTER_CHANGESTODOC, 0 ); pPrt = new SfxPrinter(pPrinterSet); - bDeletePrinter = TRUE; + bDeletePrinter = sal_True; } pFontList = new FontList( pPrt ); // #i94536# prevent duplication of font entries when 'reset' button is pressed if( !aStandardBox.GetEntryCount() ) { - const USHORT nCount = pPrt->GetFontCount(); - for (USHORT i = 0; i < nCount; ++i) + // get the set of disctinct available family names + std::set< String > aFontNames; + int nFontNames = pPrt->GetDevFontCount(); + for( int i = 0; i < nFontNames; i++ ) { - const String &rString = pPrt->GetFont(i)->GetName(); - aStandardBox.InsertEntry( rString ); - aTitleBox .InsertEntry( rString ); - aListBox .InsertEntry( rString ); - aLabelBox .InsertEntry( rString ); - aIdxBox .InsertEntry( rString ); + FontInfo aInf( pPrt->GetDevFont( i ) ); + aFontNames.insert( aInf.GetName() ); + } + + // insert to listboxes + for( std::set< String >::const_iterator it = aFontNames.begin(); + it != aFontNames.end(); ++it ) + { + aStandardBox.InsertEntry( *it ); + aTitleBox .InsertEntry( *it ); + aListBox .InsertEntry( *it ); + aLabelBox .InsertEntry( *it ); + aIdxBox .InsertEntry( *it ); } } - if(SFX_ITEM_SET == rSet.GetItemState(FN_PARAM_STDFONTS, FALSE, &pItem)) + if(SFX_ITEM_SET == rSet.GetItemState(FN_PARAM_STDFONTS, sal_False, &pItem)) { pFontConfig = (SwStdFontConfig*)((const SwPtrItem*)pItem)->GetValue(); } - if(SFX_ITEM_SET == rSet.GetItemState(FN_PARAM_WRTSHELL, FALSE, &pItem)) + if(SFX_ITEM_SET == rSet.GetItemState(FN_PARAM_WRTSHELL, sal_False, &pItem)) { pWrtShell = (SwWrtShell*)((const SwPtrItem*)pItem)->GetValue(); } @@ -913,7 +908,7 @@ void SwStdFontTabPage::Reset( const SfxItemSet& rSet) if( nIndexHeight <= 0) nIndexHeight = pFontConfig->GetDefaultHeightFor( FONT_INDEX + nFontGroup * FONT_PER_GROUP, eLanguage); - aDocOnlyCB.Enable(FALSE); + aDocOnlyCB.Enable(sal_False); } else { @@ -922,7 +917,7 @@ void SwStdFontTabPage::Reset( const SfxItemSet& rSet) FONT_GROUP_CJK == nFontGroup ? pColl->GetCJKFont() : pColl->GetCTLFont(); sShellStd = sStdBackup = rFont.GetFamilyName(); - USHORT nFontHeightWhich = sal::static_int_cast< sal_uInt16, RES_CHRATR >( + sal_uInt16 nFontHeightWhich = sal::static_int_cast< sal_uInt16, RES_CHRATR >( nFontGroup == FONT_GROUP_DEFAULT ? RES_CHRATR_FONTSIZE : FONT_GROUP_CJK == nFontGroup ? RES_CHRATR_CJK_FONTSIZE : RES_CHRATR_CTL_FONTSIZE ); const SvxFontHeightItem& rFontHeightStandard = (const SvxFontHeightItem& )pColl->GetFmtAttr(nFontHeightWhich); @@ -936,37 +931,37 @@ void SwStdFontTabPage::Reset( const SfxItemSet& rSet) const SvxFontHeightItem& rFontHeightTitle = (const SvxFontHeightItem&)pColl->GetFmtAttr( nFontHeightWhich, sal_True ); nTitleHeight = (sal_Int32)rFontHeightTitle.GetHeight(); - USHORT nFontWhich = sal::static_int_cast< sal_uInt16, RES_CHRATR >( + sal_uInt16 nFontWhich = sal::static_int_cast< sal_uInt16, RES_CHRATR >( nFontGroup == FONT_GROUP_DEFAULT ? RES_CHRATR_FONT : FONT_GROUP_CJK == nFontGroup ? RES_CHRATR_CJK_FONT : RES_CHRATR_CTL_FONT); pColl = pWrtShell->GetTxtCollFromPool(RES_POOLCOLL_NUMBUL_BASE); const SvxFontItem& rFontLS = !nFontGroup ? pColl->GetFont() : FONT_GROUP_CJK == nFontGroup ? pColl->GetCJKFont() : pColl->GetCTLFont(); - bListDefault = SFX_ITEM_DEFAULT == pColl->GetAttrSet().GetItemState(nFontWhich, FALSE); + bListDefault = SFX_ITEM_DEFAULT == pColl->GetAttrSet().GetItemState(nFontWhich, sal_False); sShellList = sListBackup = rFontLS.GetFamilyName(); const SvxFontHeightItem& rFontHeightList = (const SvxFontHeightItem&)pColl->GetFmtAttr(nFontHeightWhich, sal_True); nListHeight = (sal_Int32)rFontHeightList.GetHeight(); - bListHeightDefault = SFX_ITEM_DEFAULT == pColl->GetAttrSet().GetItemState(nFontWhich, FALSE); + bListHeightDefault = SFX_ITEM_DEFAULT == pColl->GetAttrSet().GetItemState(nFontWhich, sal_False); pColl = pWrtShell->GetTxtCollFromPool(RES_POOLCOLL_LABEL); - bLabelDefault = SFX_ITEM_DEFAULT == pColl->GetAttrSet().GetItemState(nFontWhich, FALSE); + bLabelDefault = SFX_ITEM_DEFAULT == pColl->GetAttrSet().GetItemState(nFontWhich, sal_False); const SvxFontItem& rFontCP = !nFontGroup ? pColl->GetFont() : FONT_GROUP_CJK == nFontGroup ? pColl->GetCJKFont() : pColl->GetCTLFont(); sShellLabel = sCapBackup = rFontCP.GetFamilyName(); const SvxFontHeightItem& rFontHeightLabel = (const SvxFontHeightItem&)pColl->GetFmtAttr(nFontHeightWhich, sal_True); nLabelHeight = (sal_Int32)rFontHeightLabel.GetHeight(); - bLabelHeightDefault = SFX_ITEM_DEFAULT == pColl->GetAttrSet().GetItemState(nFontWhich, FALSE); + bLabelHeightDefault = SFX_ITEM_DEFAULT == pColl->GetAttrSet().GetItemState(nFontWhich, sal_False); pColl = pWrtShell->GetTxtCollFromPool(RES_POOLCOLL_REGISTER_BASE); - bIdxDefault = SFX_ITEM_DEFAULT == pColl->GetAttrSet().GetItemState(nFontWhich, FALSE); + bIdxDefault = SFX_ITEM_DEFAULT == pColl->GetAttrSet().GetItemState(nFontWhich, sal_False); const SvxFontItem& rFontIDX = !nFontGroup ? pColl->GetFont() : FONT_GROUP_CJK == nFontGroup ? pColl->GetCJKFont() : pColl->GetCTLFont(); sShellIndex = sIdxBackup = rFontIDX.GetFamilyName(); const SvxFontHeightItem& rFontHeightIndex = (const SvxFontHeightItem&)pColl->GetFmtAttr(nFontHeightWhich, sal_True); nIndexHeight = (sal_Int32)rFontHeightIndex.GetHeight(); - bIndexHeightDefault = SFX_ITEM_DEFAULT == pColl->GetAttrSet().GetItemState(nFontWhich, FALSE); + bIndexHeightDefault = SFX_ITEM_DEFAULT == pColl->GetAttrSet().GetItemState(nFontWhich, sal_False); } aStandardBox.SetText(sStdBackup ); aTitleBox .SetText(sOutBackup ); @@ -1052,15 +1047,15 @@ IMPL_LINK( SwStdFontTabPage, ModifyHdl, ComboBox*, pBox ) } else if(pBox == &aListBox) { - bSetListDefault = FALSE; + bSetListDefault = sal_False; } else if(pBox == &aLabelBox) { - bSetLabelDefault = FALSE; + bSetLabelDefault = sal_False; } else if(pBox == &aIdxBox) { - bSetIdxDefault = FALSE; + bSetIdxDefault = sal_False; } return 0; } @@ -1079,15 +1074,15 @@ IMPL_LINK( SwStdFontTabPage, ModifyHeightHdl, FontSizeBox*, pBox ) } else if(pBox == &aListHeightLB) { - bSetListHeightDefault = FALSE; + bSetListHeightDefault = sal_False; } else if(pBox == &aLabelHeightLB) { - bSetLabelHeightDefault = FALSE; + bSetLabelHeightDefault = sal_False; } else if(pBox == &aIndexHeightLB) { - bSetIndexHeightDefault = FALSE; + bSetIndexHeightDefault = sal_False; } return 0; } @@ -1166,7 +1161,7 @@ SwTableOptionsTabPage::SwTableOptionsTabPage( Window* pParent, const SfxItemSet& aFixPropFT( this, SW_RES(FT_FIXPROP )), aVarFT( this, SW_RES(FT_VAR )), pWrtShell(0), - bHTMLMode(FALSE) + bHTMLMode(sal_False) { FreeResource(); @@ -1186,22 +1181,22 @@ SfxTabPage* SwTableOptionsTabPage::Create( Window* pParent, return new SwTableOptionsTabPage(pParent, rAttrSet ); } -BOOL SwTableOptionsTabPage::FillItemSet( SfxItemSet& ) +sal_Bool SwTableOptionsTabPage::FillItemSet( SfxItemSet& ) { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; SwModuleOptions* pModOpt = SW_MOD()->GetModuleConfig(); if(aRowMoveMF.IsModified()) - pModOpt->SetTblHMove( (USHORT)aRowMoveMF.Denormalize( aRowMoveMF.GetValue(FUNIT_TWIP))); + pModOpt->SetTblHMove( (sal_uInt16)aRowMoveMF.Denormalize( aRowMoveMF.GetValue(FUNIT_TWIP))); if(aColMoveMF.IsModified()) - pModOpt->SetTblVMove( (USHORT)aColMoveMF.Denormalize( aColMoveMF.GetValue(FUNIT_TWIP))); + pModOpt->SetTblVMove( (sal_uInt16)aColMoveMF.Denormalize( aColMoveMF.GetValue(FUNIT_TWIP))); if(aRowInsertMF.IsModified()) - pModOpt->SetTblHInsert((USHORT)aRowInsertMF.Denormalize( aRowInsertMF.GetValue(FUNIT_TWIP))); + pModOpt->SetTblHInsert((sal_uInt16)aRowInsertMF.Denormalize( aRowInsertMF.GetValue(FUNIT_TWIP))); if(aColInsertMF.IsModified()) - pModOpt->SetTblVInsert((USHORT)aColInsertMF.Denormalize( aColInsertMF.GetValue(FUNIT_TWIP))); + pModOpt->SetTblVInsert((sal_uInt16)aColInsertMF.Denormalize( aColInsertMF.GetValue(FUNIT_TWIP))); TblChgMode eMode; if(aFixRB.IsChecked()) @@ -1218,7 +1213,7 @@ BOOL SwTableOptionsTabPage::FillItemSet( SfxItemSet& ) if(pWrtShell && nsSelectionType::SEL_TBL & pWrtShell->GetSelectionType()) { pWrtShell->SetTblChgMode(eMode); - static USHORT const aInva[] = + static sal_uInt16 aInva[] = { FN_TABLE_MODE_FIX, FN_TABLE_MODE_FIX_PROP, FN_TABLE_MODE_VARIABLE, @@ -1227,7 +1222,7 @@ BOOL SwTableOptionsTabPage::FillItemSet( SfxItemSet& ) pWrtShell->GetView().GetViewFrame()->GetBindings().Invalidate( aInva ); } - bRet = TRUE; + bRet = sal_True; } SwInsertTableOptions aInsOpts( 0, 0 ); @@ -1255,19 +1250,19 @@ BOOL SwTableOptionsTabPage::FillItemSet( SfxItemSet& ) if (aNumFormattingCB.GetSavedValue() != aNumFormattingCB.GetState()) { pModOpt->SetInsTblFormatNum(bHTMLMode, aNumFormattingCB.IsChecked()); - bRet = TRUE; + bRet = sal_True; } if (aNumFmtFormattingCB.GetSavedValue() != aNumFmtFormattingCB.GetState()) { pModOpt->SetInsTblChangeNumFormat(bHTMLMode, aNumFmtFormattingCB.IsChecked()); - bRet = TRUE; + bRet = sal_True; } if (aNumAlignmentCB.GetSavedValue() != aNumAlignmentCB.GetState()) { pModOpt->SetInsTblAlignNum(bHTMLMode, aNumAlignmentCB.IsChecked()); - bRet = TRUE; + bRet = sal_True; } return bRet; @@ -1298,7 +1293,7 @@ void SwTableOptionsTabPage::Reset( const SfxItemSet& rSet) case TBLVAR_CHGABS: aVarRB.Check(); break; } const SfxPoolItem* pItem; - if(SFX_ITEM_SET == rSet.GetItemState(SID_HTML_MODE, FALSE, &pItem)) + if(SFX_ITEM_SET == rSet.GetItemState(SID_HTML_MODE, sal_False, &pItem)) { bHTMLMode = 0 != (((const SfxUInt16Item*)pItem)->GetValue() & HTMLMODE_ON); } @@ -1311,7 +1306,7 @@ void SwTableOptionsTabPage::Reset( const SfxItemSet& rSet) } SwInsertTableOptions aInsOpts = pModOpt->GetInsTblFlags(bHTMLMode); - USHORT nInsTblFlags = aInsOpts.mnInsMode; + sal_uInt16 nInsTblFlags = aInsOpts.mnInsMode; aHeaderCB.Check(0 != (nInsTblFlags & tabopts::HEADLINE)); aRepeatHeaderCB.Check(aInsOpts.mnRowsToRepeat > 0); @@ -1373,24 +1368,26 @@ SwShdwCrsrOptionsTabPage::SwShdwCrsrOptionsTabPage( Window* pParent, aFillTabRB( this, SW_RES( RB_SHDWCRSFILLTAB )), aFillSpaceRB( this, SW_RES( RB_SHDWCRSFILLSPACE )), aCrsrOptFL ( this, SW_RES( FL_CRSR_OPT)), - aCrsrInProtCB( this, SW_RES( CB_ALLOW_IN_PROT )) + aCrsrInProtCB( this, SW_RES( CB_ALLOW_IN_PROT )), + m_aLayoutOptionsFL( this, SW_RES( FL_LAYOUT_OPTIONS ) ), + m_aMathBaselineAlignmentCB( this, SW_RES( CB_MATH_BASELINE_ALIGNMENT ) ), + m_pWrtShell( NULL ) { FreeResource(); const SfxPoolItem* pItem = 0; - SwShadowCursorItem aOpt; - if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_SHADOWCURSOR, FALSE, &pItem )) + SwShadowCursorItem aOpt; + if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_SHADOWCURSOR, sal_False, &pItem )) aOpt = *(SwShadowCursorItem*)pItem; - aOnOffCB.Check( aOpt.IsOn() ); - BYTE eMode = aOpt.GetMode(); + sal_uInt8 eMode = aOpt.GetMode(); aFillIndentRB.Check( FILL_INDENT == eMode ); aFillMarginRB.Check( FILL_MARGIN == eMode ); aFillTabRB.Check( FILL_TAB == eMode ); aFillSpaceRB.Check( FILL_SPACE == eMode ); - if(SFX_ITEM_SET == rSet.GetItemState(SID_HTML_MODE, FALSE, &pItem ) + if(SFX_ITEM_SET == rSet.GetItemState(SID_HTML_MODE, sal_False, &pItem ) && ((SfxUInt16Item*)pItem)->GetValue() & HTMLMODE_ON) { aTabCB .Hide(); @@ -1425,12 +1422,21 @@ SfxTabPage* SwShdwCrsrOptionsTabPage::Create( Window* pParent, const SfxItemSet& return new SwShdwCrsrOptionsTabPage( pParent, rSet ); } -BOOL SwShdwCrsrOptionsTabPage::FillItemSet( SfxItemSet& rSet ) + +void SwShdwCrsrOptionsTabPage::PageCreated( SfxAllItemSet aSet ) +{ + SFX_ITEMSET_ARG (&aSet,pWrtSh,SwWrtShellItem,SID_WRT_SHELL,sal_False); + if (pWrtSh) + SetWrtShell(pWrtSh->GetValue()); +} + + +sal_Bool SwShdwCrsrOptionsTabPage::FillItemSet( SfxItemSet& rSet ) { SwShadowCursorItem aOpt; aOpt.SetOn( aOnOffCB.IsChecked() ); - BYTE eMode; + sal_uInt8 eMode; if( aFillIndentRB.IsChecked() ) eMode= FILL_INDENT; else if( aFillMarginRB.IsChecked() ) @@ -1441,19 +1447,23 @@ BOOL SwShdwCrsrOptionsTabPage::FillItemSet( SfxItemSet& rSet ) eMode = FILL_SPACE; aOpt.SetMode( eMode ); - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; const SfxPoolItem* pItem = 0; - if( SFX_ITEM_SET != rSet.GetItemState( FN_PARAM_SHADOWCURSOR, FALSE, &pItem ) + if( SFX_ITEM_SET != rSet.GetItemState( FN_PARAM_SHADOWCURSOR, sal_False, &pItem ) || ((SwShadowCursorItem&)*pItem) != aOpt ) { rSet.Put( aOpt ); - bRet = TRUE; + bRet = sal_True; } + m_pWrtShell->GetDoc()->set( IDocumentSettingAccess::MATH_BASELINE_ALIGNMENT, + m_aMathBaselineAlignmentCB.IsChecked() ); + bRet |= m_aMathBaselineAlignmentCB.IsChecked() != m_aMathBaselineAlignmentCB.GetSavedValue(); + if( aCrsrInProtCB.IsChecked() != aCrsrInProtCB.GetSavedValue()) { rSet.Put(SfxBoolItem(FN_PARAM_CRSR_IN_PROTECTED, aCrsrInProtCB.IsChecked())); - bRet |= TRUE; + bRet |= sal_True; } const SwDocDisplayItem* pOldAttr = (const SwDocDisplayItem*) @@ -1483,26 +1493,28 @@ BOOL SwShdwCrsrOptionsTabPage::FillItemSet( SfxItemSet& rSet ) void SwShdwCrsrOptionsTabPage::Reset( const SfxItemSet& rSet ) { const SfxPoolItem* pItem = 0; - SwShadowCursorItem aOpt; - if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_SHADOWCURSOR, FALSE, &pItem )) + SwShadowCursorItem aOpt; + if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_SHADOWCURSOR, sal_False, &pItem )) aOpt = *(SwShadowCursorItem*)pItem; - aOnOffCB.Check( aOpt.IsOn() ); - BYTE eMode = aOpt.GetMode(); + sal_uInt8 eMode = aOpt.GetMode(); aFillIndentRB.Check( FILL_INDENT == eMode ); aFillMarginRB.Check( FILL_MARGIN == eMode ); aFillTabRB.Check( FILL_TAB == eMode ); aFillSpaceRB.Check( FILL_SPACE == eMode ); - if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_CRSR_IN_PROTECTED, FALSE, &pItem )) + m_aMathBaselineAlignmentCB.Check( m_pWrtShell->GetDoc()->get( IDocumentSettingAccess::MATH_BASELINE_ALIGNMENT ) ); + m_aMathBaselineAlignmentCB.SaveValue(); + + if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_CRSR_IN_PROTECTED, sal_False, &pItem )) aCrsrInProtCB.Check(((const SfxBoolItem*)pItem)->GetValue()); aCrsrInProtCB.SaveValue(); const SwDocDisplayItem* pDocDisplayAttr = 0; - rSet.GetItemState( FN_PARAM_DOCDISP, FALSE, + rSet.GetItemState( FN_PARAM_DOCDISP, sal_False, (const SfxPoolItem**)&pDocDisplayAttr ); if(pDocDisplayAttr) { @@ -1523,8 +1535,8 @@ void SwShdwCrsrOptionsTabPage::Reset( const SfxItemSet& rSet ) --------------------------------------------------*/ struct CharAttr { - USHORT nItemId; - USHORT nAttr; + sal_uInt16 nItemId; + sal_uInt16 nAttr; }; // Edit corresponds to Paste-attributes @@ -1544,15 +1556,15 @@ static CharAttr aRedlineAttr[] = }; // Items from aRedlineAttr relevant for InsertAttr: strikethrough is // not used -static USHORT aInsertAttrMap[] = { 0, 1, 2, 3, 4, 6, 7, 8, 9, 10 }; +static sal_uInt16 aInsertAttrMap[] = { 0, 1, 2, 3, 4, 6, 7, 8, 9, 10 }; // Items from aRedlineAttr relevant for DeleteAttr: underline and // double underline is not used -static USHORT aDeletedAttrMap[] = { 0, 1, 2, 5, 6, 7, 8, 9, 10 }; +static sal_uInt16 aDeletedAttrMap[] = { 0, 1, 2, 5, 6, 7, 8, 9, 10 }; // Items from aRedlineAttr relevant for ChangeAttr: strikethrough is // not used -static USHORT aChangedAttrMap[] = { 0, 1, 2, 3, 4, 6, 7, 8, 9, 10 }; +static sal_uInt16 aChangedAttrMap[] = { 0, 1, 2, 3, 4, 6, 7, 8, 9, 10 }; /*----------------------------------------------------------------------- Description: Preview of selection @@ -1573,18 +1585,18 @@ SwMarkPreview::SwMarkPreview( Window *pParent, const ResId& rResID ) : // Page aPage.SetSize(Size(aSz.Width() - 3, aSz.Height() - 3)); - ULONG nOutWPix = aPage.GetWidth(); - ULONG nOutHPix = aPage.GetHeight(); + sal_uLong nOutWPix = aPage.GetWidth(); + sal_uLong nOutHPix = aPage.GetHeight(); // PrintArea - ULONG nLBorder = 8; - ULONG nRBorder = 8; - ULONG nTBorder = 4; - ULONG nBBorder = 4; + sal_uLong nLBorder = 8; + sal_uLong nRBorder = 8; + sal_uLong nTBorder = 4; + sal_uLong nBBorder = 4; aLeftPagePrtArea = Rectangle(Point(nLBorder, nTBorder), Point((nOutWPix - 1) - nRBorder, (nOutHPix - 1) - nBBorder)); - USHORT nWidth = (USHORT)aLeftPagePrtArea.GetWidth(); - USHORT nKorr = (nWidth & 1) != 0 ? 0 : 1; + sal_uInt16 nWidth = (sal_uInt16)aLeftPagePrtArea.GetWidth(); + sal_uInt16 nKorr = (nWidth & 1) != 0 ? 0 : 1; aLeftPagePrtArea.SetSize(Size(nWidth / 2 - (nLBorder + nRBorder) / 2 + nKorr, aLeftPagePrtArea.GetHeight())); aRightPagePrtArea = aLeftPagePrtArea; @@ -1602,7 +1614,7 @@ void SwMarkPreview::InitColors( void ) const StyleSettings& rSettings = GetSettings().GetStyleSettings(); m_aBgCol = Color( rSettings.GetWindowColor() ); - BOOL bHC = rSettings.GetHighContrastMode(); + sal_Bool bHC = rSettings.GetHighContrastMode(); m_aLineCol = bHC? SwViewOption::GetFontColor() : Color( COL_BLACK ); m_aShadowCol = bHC? m_aBgCol : rSettings.GetShadowColor(); m_aTxtCol = bHC? SwViewOption::GetFontColor() : Color( COL_GRAY ); @@ -1671,9 +1683,9 @@ void SwMarkPreview::PaintPage(const Rectangle &rRect) DrawRect(rRect, m_aTransCol, m_aPrintAreaCol ); // draw Testparagraph - ULONG nLTxtBorder = 4; - ULONG nRTxtBorder = 4; - ULONG nTTxtBorder = 4; + sal_uLong nLTxtBorder = 4; + sal_uLong nRTxtBorder = 4; + sal_uLong nTTxtBorder = 4; Rectangle aTextLine = rRect; aTextLine.SetSize(Size(aTextLine.GetWidth(), 2)); @@ -1682,13 +1694,13 @@ void SwMarkPreview::PaintPage(const Rectangle &rRect) aTextLine.Move(0, nTTxtBorder); sal_Int32 nStep; - USHORT nLines; + sal_uInt16 nLines; nStep = aTextLine.GetHeight() + 2; - nLines = (USHORT)(rRect.GetHeight() / (aTextLine.GetHeight() + 2)) - 1; + nLines = (sal_uInt16)(rRect.GetHeight() / (aTextLine.GetHeight() + 2)) - 1; // simulate text - for (USHORT i = 0; i < nLines; ++i) + for (sal_uInt16 i = 0; i < nLines; ++i) { if (i == (nLines - 1)) aTextLine.SetSize(Size(aTextLine.GetWidth() / 2, aTextLine.GetHeight())); @@ -1712,9 +1724,9 @@ namespace { void lcl_FillRedlineAttrListBox( ListBox& rLB, const AuthorCharAttr& rAttrToSelect, - const USHORT* pAttrMap, const USHORT nAttrMapSize) + const sal_uInt16* pAttrMap, const sal_uInt16 nAttrMapSize) { - for (USHORT i = 0; i != nAttrMapSize; ++i) + for (sal_uInt16 i = 0; i != nAttrMapSize; ++i) { CharAttr& rAttr(aRedlineAttr[pAttrMap[i]]); rLB.SetEntryData(i, &rAttr); @@ -1766,7 +1778,7 @@ SwRedlineOptionsTabPage::SwRedlineOptionsTabPage( Window* pParent, { FreeResource(); - for(USHORT i = 0; i < aInsertLB.GetEntryCount(); i++) + for(sal_uInt16 i = 0; i < aInsertLB.GetEntryCount(); i++) { String sEntry(aInsertLB.GetEntry(i)); aDeletedLB.InsertEntry(sEntry); @@ -1793,6 +1805,13 @@ SwRedlineOptionsTabPage::SwRedlineOptionsTabPage( Window* pParent, aLk = LINK(this, SwRedlineOptionsTabPage, ChangedMaskPrevHdl); aMarkPosLB.SetSelectHdl( aLk ); aMarkColorLB.SetSelectHdl( aLk ); +//IAccessibility2 Impplementaton 2009----- + //solution: set different accessible name of four color box + aInsertColorLB.SetAccessibleName(::rtl::OUString( aInsertFT.GetDisplayText()) + ::rtl::OUString(aInsertColorFT.GetDisplayText())); + aDeletedColorLB.SetAccessibleName(::rtl::OUString( aDeletedFT.GetDisplayText()) + ::rtl::OUString( aDeletedColorFT.GetDisplayText())); + aChangedColorLB.SetAccessibleName(::rtl::OUString( aChangedFT.GetDisplayText()) + ::rtl::OUString( aChangedColorFT.GetDisplayText())); + aMarkColorLB.SetAccessibleName(::rtl::OUString( aMarkPosFT.GetDisplayText()) + ::rtl::OUString( aMarkColorFT.GetDisplayText())); +//-----IAccessibility2 Impplementaton 2009 } SwRedlineOptionsTabPage::~SwRedlineOptionsTabPage() @@ -1804,7 +1823,7 @@ SfxTabPage* SwRedlineOptionsTabPage::Create( Window* pParent, const SfxItemSet& return new SwRedlineOptionsTabPage( pParent, rSet ); } -BOOL SwRedlineOptionsTabPage::FillItemSet( SfxItemSet& ) +sal_Bool SwRedlineOptionsTabPage::FillItemSet( SfxItemSet& ) { CharAttr *pAttr; SwModuleOptions *pOpt = SW_MOD()->GetModuleConfig(); @@ -1818,9 +1837,9 @@ BOOL SwRedlineOptionsTabPage::FillItemSet( SfxItemSet& ) AuthorCharAttr aOldChangedAttr(pOpt->GetFormatAuthorAttr()); ColorData nOldMarkColor = pOpt->GetMarkAlignColor().GetColor(); - USHORT nOldMarkMode = pOpt->GetMarkAlignMode(); + sal_uInt16 nOldMarkMode = pOpt->GetMarkAlignMode(); - USHORT nPos = aInsertLB.GetSelectEntryPos(); + sal_uInt16 nPos = aInsertLB.GetSelectEntryPos(); if (nPos != LISTBOX_ENTRY_NOTFOUND) { pAttr = (CharAttr *)aInsertLB.GetEntryData(nPos); @@ -1928,7 +1947,7 @@ BOOL SwRedlineOptionsTabPage::FillItemSet( SfxItemSet& ) } } - return FALSE; + return sal_False; } void SwRedlineOptionsTabPage::Reset( const SfxItemSet& ) @@ -1946,10 +1965,10 @@ void SwRedlineOptionsTabPage::Reset( const SfxItemSet& ) // initialise colour list box String sColor; - aInsertColorLB.SetUpdateMode(FALSE); - aDeletedColorLB.SetUpdateMode(FALSE); - aChangedColorLB.SetUpdateMode(FALSE); - aMarkColorLB.SetUpdateMode(FALSE); + aInsertColorLB.SetUpdateMode(sal_False); + aDeletedColorLB.SetUpdateMode(sal_False); + aChangedColorLB.SetUpdateMode(sal_False); + aMarkColorLB.SetUpdateMode(sal_False); aInsertColorLB.InsertEntry(sNone); aDeletedColorLB.InsertEntry(sNone); @@ -1960,7 +1979,7 @@ void SwRedlineOptionsTabPage::Reset( const SfxItemSet& ) aChangedColorLB.InsertEntry(sAuthor); XColorTable* pColorTbl = XColorTable::GetStdColorTable(); - USHORT i; + sal_uInt16 i; for( i = 0; i < pColorTbl->Count(); ++i ) { XColorEntry* pEntry = pColorTbl->GetColor( i ); @@ -1972,10 +1991,10 @@ void SwRedlineOptionsTabPage::Reset( const SfxItemSet& ) aChangedColorLB.InsertEntry( aColor, sName ); aMarkColorLB.InsertEntry( aColor, sName ); } - aInsertColorLB.SetUpdateMode( TRUE ); - aDeletedColorLB.SetUpdateMode( TRUE ); - aChangedColorLB.SetUpdateMode( TRUE ); - aMarkColorLB.SetUpdateMode( TRUE ); + aInsertColorLB.SetUpdateMode( sal_True ); + aDeletedColorLB.SetUpdateMode( sal_True ); + aChangedColorLB.SetUpdateMode( sal_True ); + aMarkColorLB.SetUpdateMode( sal_True ); ColorData nColor = rInsertAttr.nColor; @@ -2026,13 +2045,13 @@ void SwRedlineOptionsTabPage::Reset( const SfxItemSet& ) aChangedLB.SelectEntryPos(0); lcl_FillRedlineAttrListBox(aInsertLB, rInsertAttr, aInsertAttrMap, - sizeof(aInsertAttrMap) / sizeof(USHORT)); + sizeof(aInsertAttrMap) / sizeof(sal_uInt16)); lcl_FillRedlineAttrListBox(aDeletedLB, rDeletedAttr, aDeletedAttrMap, - sizeof(aDeletedAttrMap) / sizeof(USHORT)); + sizeof(aDeletedAttrMap) / sizeof(sal_uInt16)); lcl_FillRedlineAttrListBox(aChangedLB, rChangedAttr, aChangedAttrMap, - sizeof(aChangedAttrMap) / sizeof(USHORT)); + sizeof(aChangedAttrMap) / sizeof(sal_uInt16)); - USHORT nPos = 0; + sal_uInt16 nPos = 0; switch (pOpt->GetMarkAlignMode()) { case text::HoriOrientation::NONE: nPos = 0; break; @@ -2089,7 +2108,7 @@ IMPL_LINK( SwRedlineOptionsTabPage, AttribHdl, ListBox *, pLB ) rFont.SetCaseMap(SVX_CASEMAP_NOT_MAPPED); rCJKFont.SetCaseMap(SVX_CASEMAP_NOT_MAPPED); - USHORT nPos = pColorLB->GetSelectEntryPos(); + sal_uInt16 nPos = pColorLB->GetSelectEntryPos(); switch( nPos ) { @@ -2184,7 +2203,7 @@ IMPL_LINK( SwRedlineOptionsTabPage, ColorHdl, ColorListBox *, pColorLB ) SvxFont& rFont = pPrev->GetFont(); SvxFont& rCJKFont = pPrev->GetCJKFont(); - USHORT nPos = pLB->GetSelectEntryPos(); + sal_uInt16 nPos = pLB->GetSelectEntryPos(); if( nPos == LISTBOX_ENTRY_NOTFOUND ) nPos = 0; @@ -2306,7 +2325,7 @@ SwTestTabPage::SwTestTabPage( Window* pParent, aTest8CBox ( this, 0 ), aTest9CBox ( this, 0 ), aTest10CBox ( this, 0 ), - bAttrModified( FALSE ) + bAttrModified( sal_False ) { lcl_SetPosSize(*this, Point(0,0), Size(260 , 135)); lcl_SetPosSize(aTestFL, Point(6,2), Size(209,8)); @@ -2353,7 +2372,7 @@ SfxTabPage* SwTestTabPage::Create( Window* pParent, return ( new SwTestTabPage( pParent, rAttrSet ) ); } -BOOL SwTestTabPage::FillItemSet( SfxItemSet& rCoreSet ) +sal_Bool SwTestTabPage::FillItemSet( SfxItemSet& rCoreSet ) { if ( bAttrModified ) @@ -2379,7 +2398,7 @@ void SwTestTabPage::Reset( const SfxItemSet& ) const SfxItemSet& rSet = GetItemSet(); const SwTestItem* pTestAttr = 0; - if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_SWTEST , FALSE, + if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_SWTEST , sal_False, (const SfxPoolItem**)&pTestAttr )) { aTest1CBox.Check(pTestAttr->bTest1); @@ -2413,7 +2432,7 @@ void SwTestTabPage::Init() IMPL_LINK_INLINE_START( SwTestTabPage, AutoClickHdl, CheckBox *, EMPTYARG ) { - bAttrModified = TRUE; + bAttrModified = sal_True; return 0; } IMPL_LINK_INLINE_END( SwTestTabPage, AutoClickHdl, CheckBox *, EMPTYARG ) diff --git a/sw/source/ui/config/prtopt.cxx b/sw/source/ui/config/prtopt.cxx index a29ea83833..1ee9e7e853 100644 --- a/sw/source/ui/config/prtopt.cxx +++ b/sw/source/ui/config/prtopt.cxx @@ -29,16 +29,15 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" - #include <unotools/configmgr.hxx> #include <prtopt.hxx> -#include <swprtopt.hxx> #include <osl/diagnose.h> #include <com/sun/star/uno/Any.hxx> #include <com/sun/star/uno/Sequence.hxx> #include <unomid.h> + using namespace utl; using rtl::OUString; using namespace com::sun::star::uno; @@ -154,7 +153,7 @@ void SwPrintOptions::Commit() Any* pValues = aValues.getArray(); const Type& rType = ::getBooleanCppuType(); - BOOL bVal; + sal_Bool bVal; for(int nProp = 0; nProp < aNames.getLength(); nProp++) { switch(nProp) diff --git a/sw/source/ui/config/redlopt.src b/sw/source/ui/config/redlopt.src index 2d5da19772..35211f60a7 100644 --- a/sw/source/ui/config/redlopt.src +++ b/sw/source/ui/config/redlopt.src @@ -65,6 +65,7 @@ TabPage TP_REDLINE_OPT }; ListBox LB_INS_ATTR { + HelpID = "sw:ListBox:TP_REDLINE_OPT:LB_INS_ATTR"; Pos = MAP_APPFONT ( 90 , 25 ) ; Size = MAP_APPFONT ( 80 , 80 ) ; TabStop = TRUE ; @@ -92,6 +93,7 @@ TabPage TP_REDLINE_OPT }; ListBox LB_INS_COL { + HelpID = "sw:ListBox:TP_REDLINE_OPT:LB_INS_COL"; Pos = MAP_APPFONT ( 90 , 40 ) ; Size = MAP_APPFONT ( 80 , 80 ) ; TabStop = TRUE ; @@ -118,6 +120,7 @@ TabPage TP_REDLINE_OPT }; ListBox LB_DEL_ATTR { + HelpID = "sw:ListBox:TP_REDLINE_OPT:LB_DEL_ATTR"; Pos = MAP_APPFONT ( 90 , 67 ) ; Size = MAP_APPFONT ( 80 , 80 ) ; TabStop = TRUE ; @@ -131,6 +134,7 @@ TabPage TP_REDLINE_OPT }; ListBox LB_DEL_COL { + HelpID = "sw:ListBox:TP_REDLINE_OPT:LB_DEL_COL"; Pos = MAP_APPFONT ( 90 , 82 ) ; Size = MAP_APPFONT ( 80 , 80 ) ; TabStop = TRUE ; @@ -157,6 +161,7 @@ TabPage TP_REDLINE_OPT }; ListBox LB_CHG_ATTR { + HelpID = "sw:ListBox:TP_REDLINE_OPT:LB_CHG_ATTR"; Pos = MAP_APPFONT ( 90 , 111 ) ; Size = MAP_APPFONT ( 80 , 80 ) ; TabStop = TRUE ; @@ -170,6 +175,7 @@ TabPage TP_REDLINE_OPT }; ListBox LB_CHG_COL { + HelpID = "sw:ListBox:TP_REDLINE_OPT:LB_CHG_COL"; Pos = MAP_APPFONT ( 90 , 126 ) ; Size = MAP_APPFONT ( 80 , 80 ) ; TabStop = TRUE ; @@ -196,6 +202,7 @@ TabPage TP_REDLINE_OPT }; ListBox LB_MARKPOS { + HelpID = "sw:ListBox:TP_REDLINE_OPT:LB_MARKPOS"; Pos = MAP_APPFONT ( 90 , 155 ) ; Size = MAP_APPFONT ( 80 , 80 ) ; TabStop = TRUE ; @@ -217,6 +224,7 @@ TabPage TP_REDLINE_OPT }; ListBox LB_LC_COL { + HelpID = "sw:ListBox:TP_REDLINE_OPT:LB_LC_COL"; Pos = MAP_APPFONT ( 90 , 170 ) ; Size = MAP_APPFONT ( 80 , 80 ) ; TabStop = TRUE ; diff --git a/sw/source/ui/config/uinums.cxx b/sw/source/ui/config/uinums.cxx index f17d483889..c72ea4680d 100644 --- a/sw/source/ui/config/uinums.cxx +++ b/sw/source/ui/config/uinums.cxx @@ -51,11 +51,11 @@ using namespace ::com::sun::star; -#define VERSION_30B ((USHORT)250) -#define VERSION_31B ((USHORT)326) -#define VERSION_40A ((USHORT)364) -#define VERSION_50A ((USHORT)373) -#define VERSION_53A ((USHORT)596) +#define VERSION_30B ((sal_uInt16)250) +#define VERSION_31B ((sal_uInt16)326) +#define VERSION_40A ((sal_uInt16)364) +#define VERSION_50A ((sal_uInt16)373) +#define VERSION_53A ((sal_uInt16)596) #define ACT_NUM_VERSION VERSION_53A #define NUMRULE_FILENAME "numrule.cfg" @@ -77,7 +77,7 @@ SwBaseNumRules::SwBaseNumRules( const String& rFileName ) : sFileName( rFileName ), nVersion(0), - bModified( FALSE ) + bModified( sal_False ) { Init(); } @@ -93,29 +93,29 @@ SwBaseNumRules::~SwBaseNumRules() INetURLObject aTempObj(sNm); sNm = aTempObj.GetFull(); SfxMedium aStrm( sNm, STREAM_WRITE | STREAM_TRUNC | - STREAM_SHARE_DENYALL, TRUE ); + STREAM_SHARE_DENYALL, sal_True ); Store( *aStrm.GetOutStream() ); } - for( USHORT i = 0; i < nMaxRules; ++i ) + for( sal_uInt16 i = 0; i < nMaxRules; ++i ) delete pNumRules[i]; } void SwBaseNumRules::Init() { - for(USHORT i = 0; i < nMaxRules; ++i ) + for(sal_uInt16 i = 0; i < nMaxRules; ++i ) pNumRules[i] = 0; String sNm( sFileName ); SvtPathOptions aOpt; if( aOpt.SearchFile( sNm, SvtPathOptions::PATH_USERCONFIG )) { - SfxMedium aStrm( sNm, STREAM_STD_READ, TRUE ); + SfxMedium aStrm( sNm, STREAM_STD_READ, sal_True ); Load( *aStrm.GetInStream() ); } } -void SwBaseNumRules::ApplyNumRules(const SwNumRulesWithName &rCopy, USHORT nIdx) +void SwBaseNumRules::ApplyNumRules(const SwNumRulesWithName &rCopy, sal_uInt16 nIdx) { OSL_ENSURE(nIdx < nMaxRules, "Array der NumRules ueberindiziert."); if( !pNumRules[nIdx] ) @@ -125,22 +125,22 @@ void SwBaseNumRules::ApplyNumRules(const SwNumRulesWithName &rCopy, USHORT nIdx) } // PROTECTED METHODS ---------------------------------------------------- -BOOL SwBaseNumRules::Store(SvStream &rStream) +sal_Bool SwBaseNumRules::Store(SvStream &rStream) { rStream << ACT_NUM_VERSION; // Write, what positions are occupied by a rule // Then write each of the rules - for(USHORT i = 0; i < nMaxRules; ++i) + for(sal_uInt16 i = 0; i < nMaxRules; ++i) { if(pNumRules[i]) { - rStream << (unsigned char) TRUE; + rStream << (unsigned char) sal_True; pNumRules[i]->Store( rStream ); } else - rStream << (unsigned char) FALSE; + rStream << (unsigned char) sal_False; } - return TRUE; + return sal_True; } int SwBaseNumRules::Load(SvStream &rStream) @@ -158,8 +158,8 @@ int SwBaseNumRules::Load(SvStream &rStream) else if( VERSION_30B == nVersion || VERSION_31B == nVersion || ACT_NUM_VERSION >= nVersion ) { - unsigned char bRule = FALSE; - for(USHORT i = 0; i < nMaxRules; ++i) + unsigned char bRule = sal_False; + for(sal_uInt16 i = 0; i < nMaxRules; ++i) { rStream >> bRule; if(bRule) @@ -183,9 +183,9 @@ SwChapterNumRules::SwChapterNumRules() : { } -void SwChapterNumRules::ApplyNumRules(const SwNumRulesWithName &rCopy, USHORT nIdx) +void SwChapterNumRules::ApplyNumRules(const SwNumRulesWithName &rCopy, sal_uInt16 nIdx) { - bModified = TRUE; + bModified = sal_True; SwBaseNumRules::ApplyNumRules(rCopy, nIdx); } @@ -193,7 +193,7 @@ SwNumRulesWithName::SwNumRulesWithName( const SwNumRule &rCopy, const String &rName ) : aName(rName) { - for( USHORT n = 0; n < MAXLEVEL; ++n ) + for( sal_uInt16 n = 0; n < MAXLEVEL; ++n ) { const SwNumFmt* pFmt = rCopy.GetNumFmt( n ); if( pFmt ) @@ -234,13 +234,13 @@ const SwNumRulesWithName& SwNumRulesWithName::operator=(const SwNumRulesWithName return *this; } -SwNumRulesWithName::SwNumRulesWithName( SvStream &rStream, USHORT nVersion ) +SwNumRulesWithName::SwNumRulesWithName( SvStream &rStream, sal_uInt16 nVersion ) { CharSet eEncoding = gsl_getSystemTextEncoding(); rStream.ReadByteString(aName, eEncoding); char c; - for(USHORT n = 0; n < MAXLEVEL; ++n ) + for(sal_uInt16 n = 0; n < MAXLEVEL; ++n ) { if( VERSION_30B == nVersion ) c = 1; @@ -262,9 +262,9 @@ void SwNumRulesWithName::MakeNumRule( SwWrtShell& rSh, SwNumRule& rChg ) const { // #i89178# rChg = SwNumRule( aName, numfunc::GetDefaultPositionAndSpaceMode() ); - rChg.SetAutoRule( FALSE ); + rChg.SetAutoRule( sal_False ); _SwNumFmtGlobal* pFmt; - for( USHORT n = 0; n < MAXLEVEL; ++n ) + for( sal_uInt16 n = 0; n < MAXLEVEL; ++n ) if( 0 != ( pFmt = aFmts[ n ] ) ) { SwNumFmt aNew; @@ -278,7 +278,7 @@ void SwNumRulesWithName::Store( SvStream &rStream ) CharSet eEncoding = gsl_getSystemTextEncoding(); rStream.WriteByteString(aName, eEncoding); - for( USHORT n = 0; n < MAXLEVEL; ++n ) + for( sal_uInt16 n = 0; n < MAXLEVEL; ++n ) { _SwNumFmtGlobal* pFmt = aFmts[ n ]; if( pFmt ) @@ -305,7 +305,7 @@ SwNumRulesWithName::_SwNumFmtGlobal::_SwNumFmtGlobal( const SwNumFmt& rFmt ) { SfxItemIter aIter( pFmt->GetAttrSet() ); const SfxPoolItem *pCurr = aIter.GetCurItem(); - while( TRUE ) + while( sal_True ) { aItems.Insert( pCurr->Clone(), aItems.Count() ); if( aIter.IsAtEnd() ) @@ -324,19 +324,19 @@ SwNumRulesWithName::_SwNumFmtGlobal::_SwNumFmtGlobal( const _SwNumFmtGlobal& rFm sCharFmtName( rFmt.sCharFmtName ), nCharPoolId( rFmt.nCharPoolId ) { - for( USHORT n = rFmt.aItems.Count(); n; ) + for( sal_uInt16 n = rFmt.aItems.Count(); n; ) aItems.Insert( rFmt.aItems[ --n ]->Clone(), aItems.Count() ); } SwNumRulesWithName::_SwNumFmtGlobal::_SwNumFmtGlobal( SvStream& rStream, - USHORT nVersion ) + sal_uInt16 nVersion ) : nCharPoolId( USHRT_MAX ) { CharSet eEncoding = gsl_getSystemTextEncoding(); { - USHORT nUS; + sal_uInt16 nUS; sal_Char cChar; - BOOL bFlag; + sal_Bool bFlag; String sStr; rStream >> nUS; aFmt.SetNumberingType((sal_Int16)nUS ); @@ -354,7 +354,7 @@ SwNumRulesWithName::_SwNumFmtGlobal::_SwNumFmtGlobal( SvStream& rStream, if( VERSION_30B == nVersion ) { long nL; - rStream >> cChar; aFmt.SetStart( (USHORT)cChar ); + rStream >> cChar; aFmt.SetStart( (sal_uInt16)cChar ); rStream.ReadByteString(sStr, eEncoding); aFmt.SetPrefix( sStr ); @@ -380,11 +380,11 @@ SwNumRulesWithName::_SwNumFmtGlobal::_SwNumFmtGlobal( SvStream& rStream, rStream >> bFlag; } - USHORT nFamily; - USHORT nCharSet; + sal_uInt16 nFamily; + sal_uInt16 nCharSet; short nWidth; short nHeight; - USHORT nPitch; + sal_uInt16 nPitch; String aName; rStream.ReadByteString(aName, eEncoding); @@ -409,14 +409,14 @@ SwNumRulesWithName::_SwNumFmtGlobal::_SwNumFmtGlobal( SvStream& rStream, if( VERSION_30B != nVersion ) { - USHORT nItemCount; + sal_uInt16 nItemCount; rStream >> nCharPoolId; rStream.ReadByteString(sCharFmtName, eEncoding); rStream >> nItemCount; while( nItemCount-- ) { - USHORT nWhich, nVers; + sal_uInt16 nWhich, nVers; rStream >> nWhich >> nVers; aItems.Insert( GetDfltAttr( nWhich )->Create( rStream, nVers ), aItems.Count() ); @@ -425,7 +425,7 @@ SwNumRulesWithName::_SwNumFmtGlobal::_SwNumFmtGlobal( SvStream& rStream, if( VERSION_40A == nVersion && SVX_NUM_BITMAP == aFmt.GetNumberingType() ) { - BYTE cF; + sal_uInt8 cF; Size aSz; rStream >> aSz.Width() >> aSz.Height(); @@ -435,7 +435,7 @@ SwNumRulesWithName::_SwNumFmtGlobal::_SwNumFmtGlobal( SvStream& rStream, { SvxBrushItem* pBrush = 0; SwFmtVertOrient* pVOrient = 0; - USHORT nVer; + sal_uInt16 nVer; if( cF & 1 ) { @@ -467,32 +467,32 @@ void SwNumRulesWithName::_SwNumFmtGlobal::Store( SvStream& rStream ) CharSet eEncoding = gsl_getSystemTextEncoding(); { String aName; - USHORT nFamily = FAMILY_DONTKNOW, nCharSet = 0, nPitch = 0; + sal_uInt16 nFamily = FAMILY_DONTKNOW, nCharSet = 0, nPitch = 0; short nWidth = 0, nHeight = 0; const Font* pFnt = aFmt.GetBulletFont(); if( pFnt ) { aName = pFnt->GetName(); - nFamily = (USHORT)pFnt->GetFamily(); - nCharSet = (USHORT)pFnt->GetCharSet(); + nFamily = (sal_uInt16)pFnt->GetFamily(); + nCharSet = (sal_uInt16)pFnt->GetCharSet(); nWidth = (short)pFnt->GetSize().Width(); nHeight = (short)pFnt->GetSize().Height(); - nPitch = (USHORT)pFnt->GetPitch(); + nPitch = (sal_uInt16)pFnt->GetPitch(); } - rStream << USHORT(aFmt.GetNumberingType()) + rStream << sal_uInt16(aFmt.GetNumberingType()) << aFmt.GetBulletChar() << (aFmt.GetIncludeUpperLevels() > 0) << aFmt.GetStart(); rStream.WriteByteString( aFmt.GetPrefix(), eEncoding ); rStream.WriteByteString( aFmt.GetSuffix(), eEncoding ); - rStream << USHORT( aFmt.GetNumAdjust() ) + rStream << sal_uInt16( aFmt.GetNumAdjust() ) << aFmt.GetAbsLSpace() << aFmt.GetFirstLineOffset() << aFmt.GetCharTextDistance() << aFmt.GetLSpace() - << FALSE;//aFmt.IsRelLSpace(); + << sal_False;//aFmt.IsRelLSpace(); rStream.WriteByteString( aName, eEncoding ); rStream << nFamily << nCharSet @@ -504,10 +504,10 @@ void SwNumRulesWithName::_SwNumFmtGlobal::Store( SvStream& rStream ) rStream.WriteByteString( sCharFmtName, eEncoding ); rStream << aItems.Count(); - for( USHORT n = aItems.Count(); n; ) + for( sal_uInt16 n = aItems.Count(); n; ) { SfxPoolItem* pItem = aItems[ --n ]; - USHORT nIVers = pItem->GetVersion( SOFFICE_FILEFORMAT_50 ); + sal_uInt16 nIVers = pItem->GetVersion( SOFFICE_FILEFORMAT_50 ); OSL_ENSURE( nIVers != USHRT_MAX, "Was'n das: Item-Version USHRT_MAX in der aktuellen Version" ); rStream << pItem->Which() @@ -519,21 +519,21 @@ void SwNumRulesWithName::_SwNumFmtGlobal::Store( SvStream& rStream ) if( SVX_NUM_BITMAP == aFmt.GetNumberingType() ) { - rStream << (INT32)aFmt.GetGraphicSize().Width() - << (INT32)aFmt.GetGraphicSize().Height(); - BYTE cFlg = ( 0 != aFmt.GetBrush() ? 1 : 0 ) + + rStream << (sal_Int32)aFmt.GetGraphicSize().Width() + << (sal_Int32)aFmt.GetGraphicSize().Height(); + sal_uInt8 cFlg = ( 0 != aFmt.GetBrush() ? 1 : 0 ) + ( 0 != aFmt.GetGraphicOrientation() ? 2 : 0 ); rStream << cFlg; if( aFmt.GetBrush() ) { - USHORT nVersion = aFmt.GetBrush()->GetVersion( SOFFICE_FILEFORMAT_50 ); + sal_uInt16 nVersion = aFmt.GetBrush()->GetVersion( SOFFICE_FILEFORMAT_50 ); rStream << nVersion; aFmt.GetBrush()->Store( rStream, nVersion ); } if( aFmt.GetGraphicOrientation() ) { - USHORT nVersion = aFmt.GetGraphicOrientation()->GetVersion( SOFFICE_FILEFORMAT_50 ); + sal_uInt16 nVersion = aFmt.GetGraphicOrientation()->GetVersion( SOFFICE_FILEFORMAT_50 ); rStream << nVersion; aFmt.GetGraphicOrientation()->Store( rStream, nVersion ); } @@ -547,8 +547,8 @@ void SwNumRulesWithName::_SwNumFmtGlobal::ChgNumFmt( SwWrtShell& rSh, if( sCharFmtName.Len() ) { // at first, look for the name - USHORT nArrLen = rSh.GetCharFmtCount(); - for( USHORT i = 1; i < nArrLen; ++i ) + sal_uInt16 nArrLen = rSh.GetCharFmtCount(); + for( sal_uInt16 i = 1; i < nArrLen; ++i ) { pFmt = &rSh.GetCharFmt( i ); if( COMPARE_EQUAL == pFmt->GetName().CompareTo( sCharFmtName )) @@ -562,13 +562,13 @@ void SwNumRulesWithName::_SwNumFmtGlobal::ChgNumFmt( SwWrtShell& rSh, if( IsPoolUserFmt( nCharPoolId ) ) { pFmt = rSh.MakeCharFmt( sCharFmtName ); - pFmt->SetAuto( FALSE ); + pFmt->SetAuto( sal_False ); } else pFmt = rSh.GetCharFmtFromPool( nCharPoolId ); if( !pFmt->GetDepends() ) // set attributes - for( USHORT n = aItems.Count(); n; ) + for( sal_uInt16 n = aItems.Count(); n; ) pFmt->SetFmtAttr( *aItems[ --n ] ); } } diff --git a/sw/source/ui/config/usrpref.cxx b/sw/source/ui/config/usrpref.cxx index 921a845204..7c1eec9e89 100644 --- a/sw/source/ui/config/usrpref.cxx +++ b/sw/source/ui/config/usrpref.cxx @@ -59,7 +59,7 @@ void SwMasterUsrPref::SetUsrPref(const SwViewOption &rCopy) *((SwViewOption*)this) = rCopy; } -SwMasterUsrPref::SwMasterUsrPref(BOOL bWeb) : +SwMasterUsrPref::SwMasterUsrPref(sal_Bool bWeb) : eFldUpdateFlags(AUTOUPD_OFF), nLinkUpdateMode(0), bIsHScrollMetricSet(sal_False), @@ -114,13 +114,13 @@ Sequence<OUString> SwContentViewConfig::GetPropertyNames() "NonprintingCharacter/Space", // 9 "NonprintingCharacter/Break", // 10 "NonprintingCharacter/ProtectedSpace", // 11 - "NonprintingCharacter/Tab", // 12 //not in Writer/Web - "NonprintingCharacter/HiddenText", // 13 - "NonprintingCharacter/HiddenParagraph", // 14 - "NonprintingCharacter/HiddenCharacter", // 15 - "Update/Link", // 16 - "Update/Field", // 17 - "Update/Chart" // 18 + "NonprintingCharacter/Tab", // 12 //not in Writer/Web + "NonprintingCharacter/HiddenText", // 13 + "NonprintingCharacter/HiddenParagraph", // 14 + "NonprintingCharacter/HiddenCharacter", // 15 + "Update/Link", // 16 + "Update/Field", // 17 + "Update/Chart" // 18 }; @@ -134,7 +134,7 @@ Sequence<OUString> SwContentViewConfig::GetPropertyNames() return aNames; } -SwContentViewConfig::SwContentViewConfig(BOOL bIsWeb, SwMasterUsrPref& rPar) : +SwContentViewConfig::SwContentViewConfig(sal_Bool bIsWeb, SwMasterUsrPref& rPar) : ConfigItem(bIsWeb ? C2U("Office.WriterWeb/Content") : C2U("Office.Writer/Content")), rParent(rPar), bWeb(bIsWeb) @@ -161,7 +161,7 @@ void SwContentViewConfig::Commit() for(int nProp = 0; nProp < aNames.getLength(); nProp++) { - sal_Bool bVal = FALSE; + sal_Bool bVal = sal_False; switch(nProp) { case 0: bVal = rParent.IsGraphic(); break;// "Display/GraphicObject", @@ -225,11 +225,11 @@ void SwContentViewConfig::Load() { sal_Int32 nSet = 0; pValues[nProp] >>= nSet; - rParent.SetUpdateLinkMode(nSet, TRUE); + rParent.SetUpdateLinkMode(nSet, sal_True); } break;// "Update/Link", - case 17: rParent.SetUpdateFields(bSet, TRUE); break;// "Update/Field", - case 18: rParent.SetUpdateCharts(bSet, TRUE); break;// "Update/Chart" + case 17: rParent.SetUpdateFields(bSet, sal_True); break;// "Update/Field", + case 18: rParent.SetUpdateCharts(bSet, sal_True); break;// "Update/Chart" } } } @@ -240,28 +240,30 @@ Sequence<OUString> SwLayoutViewConfig::GetPropertyNames() { static const char* aPropNames[] = { - "Line/Guide", // 0 - "Line/SimpleControlPoint", // 1 - "Line/LargeControlPoint", // 2 - "Window/HorizontalScroll", // 3 - "Window/VerticalScroll", // 4 - "Window/ShowRulers", // 5 - "Window/HorizontalRuler", // 6 - "Window/VerticalRuler", // 7 - "Window/HorizontalRulerUnit", // 8 - "Window/VerticalRulerUnit", // 9 - "Window/SmoothScroll", //10 - "Zoom/Value", //11 - "Zoom/Type", //12 - "Other/MeasureUnit", //13 - "Other/TabStop", //14 - "Window/IsVerticalRulerRight", //15 - "ViewLayout/Columns", //16 - "ViewLayout/BookMode", //17 - "Other/IsSquaredPageMode", //18 - "Other/ApplyCharUnit" //19 + "Line/Guide", // 0 + "Line/SimpleControlPoint", // 1 + "Line/LargeControlPoint", // 2 + "Window/HorizontalScroll", // 3 + "Window/VerticalScroll", // 4 + "Window/ShowRulers", // 5 + "Window/HorizontalRuler", // 6 + "Window/VerticalRuler", // 7 + "Window/HorizontalRulerUnit", // 8 + "Window/VerticalRulerUnit", // 9 + "Window/SmoothScroll", //10 + "Zoom/Value", //11 + "Zoom/Type", //12 + "Other/IsAlignMathObjectsToBaseline", //13 + "Other/MeasureUnit", //14 + // below properties are not available in WriterWeb + "Other/TabStop", //15 + "Window/IsVerticalRulerRight", //16 + "ViewLayout/Columns", //17 + "ViewLayout/BookMode", //18 + "Other/IsSquaredPageMode" //19 + "Other/ApplyCharUnit" //20 }; - const int nCount = bWeb ? 14 : 20; + const int nCount = bWeb ? 15 : 21; Sequence<OUString> aNames(nCount); OUString* pNames = aNames.getArray(); for(int i = 0; i < nCount; i++) @@ -271,7 +273,7 @@ Sequence<OUString> SwLayoutViewConfig::GetPropertyNames() return aNames; } -SwLayoutViewConfig::SwLayoutViewConfig(BOOL bIsWeb, SwMasterUsrPref& rPar) : +SwLayoutViewConfig::SwLayoutViewConfig(sal_Bool bIsWeb, SwMasterUsrPref& rPar) : ConfigItem(bIsWeb ? C2U("Office.WriterWeb/Layout") : C2U("Office.Writer/Layout"), CONFIG_MODE_DELAYED_UPDATE|CONFIG_MODE_RELEASE_TREE), rParent(rPar), @@ -292,40 +294,39 @@ void SwLayoutViewConfig::Commit() for(int nProp = 0; nProp < aNames.getLength(); nProp++) { - sal_Bool bSet; + Any &rVal = pValues[nProp]; switch(nProp) { - case 0: bSet = rParent.IsCrossHair(); break;// "Line/Guide", - case 1: bSet = rParent.IsSolidMarkHdl(); break;// "Line/SimpleControlPoint", - case 2: bSet = rParent.IsBigMarkHdl(); break;// "Line/LargeControlPoint", - case 3: bSet = rParent.IsViewHScrollBar(); break;// "Window/HorizontalScroll", - case 4: bSet = rParent.IsViewVScrollBar(); break;// "Window/VerticalScroll", - case 5: bSet = rParent.IsViewAnyRuler(); break; // "Window/ShowRulers" - // #i14593# use IsView*Ruler(TRUE) instead of IsView*Ruler() + case 0: rVal <<= (sal_Bool) rParent.IsCrossHair(); break; // "Line/Guide", + case 1: rVal <<= (sal_Bool) rParent.IsSolidMarkHdl(); break; // "Line/SimpleControlPoint", + case 2: rVal <<= (sal_Bool) rParent.IsBigMarkHdl(); break; // "Line/LargeControlPoint", + case 3: rVal <<= (sal_Bool) rParent.IsViewHScrollBar(); break; // "Window/HorizontalScroll", + case 4: rVal <<= (sal_Bool) rParent.IsViewVScrollBar(); break; // "Window/VerticalScroll", + case 5: rVal <<= (sal_Bool) rParent.IsViewAnyRuler(); break; // "Window/ShowRulers" + // #i14593# use IsView*Ruler(sal_True) instead of IsView*Ruler() // this preserves the single ruler states even if "Window/ShowRulers" is off - case 6: bSet = rParent.IsViewHRuler(TRUE); break;// "Window/HorizontalRuler", - case 7: bSet = rParent.IsViewVRuler(TRUE); break;// "Window/VerticalRuler", + case 6: rVal <<= (sal_Bool) rParent.IsViewHRuler(sal_True); break; // "Window/HorizontalRuler", + case 7: rVal <<= (sal_Bool) rParent.IsViewVRuler(sal_True); break; // "Window/VerticalRuler", case 8: if(rParent.bIsHScrollMetricSet) - pValues[nProp] <<= (sal_Int32)rParent.eHScrollMetric; // "Window/HorizontalRulerUnit" + rVal <<= (sal_Int32)rParent.eHScrollMetric; // "Window/HorizontalRulerUnit" break; case 9: if(rParent.bIsVScrollMetricSet) - pValues[nProp] <<= (sal_Int32)rParent.eVScrollMetric; // "Window/VerticalRulerUnit" + rVal <<= (sal_Int32)rParent.eVScrollMetric; // "Window/VerticalRulerUnit" break; - case 10: bSet = rParent.IsSmoothScroll(); break;// "Window/SmoothScroll", - case 11: pValues[nProp] <<= (sal_Int32)rParent.GetZoom(); break;// "Zoom/Value", - case 12: pValues[nProp] <<= (sal_Int32)rParent.GetZoomType(); break;// "Zoom/Type", - case 13: pValues[nProp] <<= (sal_Int32)rParent.GetMetric(); break;// "Other/MeasureUnit", - case 14: pValues[nProp] <<= static_cast<sal_Int32>(TWIP_TO_MM100(rParent.GetDefTab())); break;// "Other/TabStop", - case 15: bSet = rParent.IsVRulerRight(); break;// "Window/IsVerticalRulerRight", - case 16: pValues[nProp] <<= (sal_Int32)rParent.GetViewLayoutColumns(); break;// "ViewLayout/Columns", - case 17: bSet = rParent.IsViewLayoutBookMode(); break;// "ViewLayout/BookMode", - case 18: bSet = rParent.IsSquaredPageMode(); break;// "Other/IsSquaredPageMode", - case 19: bSet = rParent.IsApplyCharUnit(); break;// "Other/ApplyCharUnit", + case 10: rVal <<= (sal_Bool) rParent.IsSmoothScroll(); break; // "Window/SmoothScroll", + case 11: rVal <<= (sal_Int32)rParent.GetZoom(); break; // "Zoom/Value", + case 12: rVal <<= (sal_Int32)rParent.GetZoomType(); break; // "Zoom/Type", + case 13: rVal <<= (sal_Bool) rParent.IsAlignMathObjectsToBaseline(); break; // "Other/IsAlignMathObjectsToBaseline" + case 14: rVal <<= (sal_Int32)rParent.GetMetric(); break; // "Other/MeasureUnit", + case 15: rVal <<= static_cast<sal_Int32>(TWIP_TO_MM100(rParent.GetDefTab())); break;// "Other/TabStop", + case 16: rVal <<= (sal_Bool) rParent.IsVRulerRight(); break; // "Window/IsVerticalRulerRight", + case 17: rVal <<= (sal_Int32)rParent.GetViewLayoutColumns(); break; // "ViewLayout/Columns", + case 18: rVal <<= (sal_Bool) rParent.IsViewLayoutBookMode(); break; // "ViewLayout/BookMode", + case 19: rVal <<= (sal_Bool) rParent.IsSquaredPageMode(); break; // "Other/IsSquaredPageMode", + case 20: rVal <<= (sal_Bool) rParent.IsApplyCharUnit(); break; // "Other/IsSquaredPageMode", } - if(nProp < 8 || nProp == 10 || nProp == 15 || nProp == 17 || nProp == 18 || nProp == 19 ) - pValues[nProp].setValue(&bSet, ::getBooleanCppuType()); } PutProperties(aNames, aValues); } @@ -342,7 +343,11 @@ void SwLayoutViewConfig::Load() { if(pValues[nProp].hasValue()) { - sal_Bool bSet = nProp < 8 || nProp == 10 || nProp == 17 || nProp == 18 || nProp == 19 ? *(sal_Bool*)pValues[nProp].getValue() : sal_False; + sal_Int32 nInt32Val = 0; + sal_Bool bSet = sal_False; + pValues[nProp] >>= nInt32Val; + pValues[nProp] >>= bSet; + switch(nProp) { case 0: rParent.SetCrossHair(bSet); break;// "Line/Guide", @@ -356,59 +361,26 @@ void SwLayoutViewConfig::Load() case 8: { rParent.bIsHScrollMetricSet = sal_True; - sal_Int32 nUnit = 0; - pValues[nProp] >>= nUnit; - rParent.eHScrollMetric = ((FieldUnit)nUnit); // "Window/HorizontalRulerUnit" + rParent.eHScrollMetric = ((FieldUnit)nInt32Val); // "Window/HorizontalRulerUnit" } break; case 9: { rParent.bIsVScrollMetricSet = sal_True; - sal_Int32 nUnit = 0; - pValues[nProp] >>= nUnit; - rParent.eVScrollMetric = ((FieldUnit)nUnit); // "Window/VerticalRulerUnit" + rParent.eVScrollMetric = ((FieldUnit)nInt32Val); // "Window/VerticalRulerUnit" } break; case 10: rParent.SetSmoothScroll(bSet); break;// "Window/SmoothScroll", - case 11: - { - sal_Int32 nVal = 0; - pValues[nProp] >>= nVal; - rParent.SetZoom( static_cast< USHORT >(nVal) ); - } - break;// "Zoom/Value", - case 12: - { - sal_Int32 nVal = 0; - pValues[nProp] >>= nVal; - rParent.SetZoomType( static_cast< SvxZoomType >(nVal) ); - } - break;// "Zoom/Type", - case 13: - { - sal_Int32 nUnit = 0; - pValues[nProp] >>= nUnit; - rParent.SetMetric((FieldUnit)nUnit, TRUE); - } - break;// "Other/MeasureUnit", - case 14: - { - sal_Int32 nTab = 0; - pValues[nProp] >>= nTab; - rParent.SetDefTab(MM100_TO_TWIP(nTab), TRUE); - } - break;// "Other/TabStop", - case 15: rParent.SetVRulerRight(bSet); break;// "Window/IsVerticalRulerRight", - case 16: - { - sal_Int32 nColumns = 0; - pValues[nProp] >>= nColumns; - rParent.SetViewLayoutColumns( static_cast<USHORT>(nColumns) ); - } - break;// "ViewLayout/Columns", - case 17: rParent.SetViewLayoutBookMode(bSet); break;// "ViewLayout/BookMode", - case 18: rParent.SetDefaultPageMode(bSet,TRUE); break;// "Other/IsSquaredPageMode", - case 19: rParent.SetApplyCharUnit(bSet); break;// "Other/ApplyUserChar" + case 11: rParent.SetZoom( static_cast< sal_uInt16 >(nInt32Val) ); break;// "Zoom/Value", + case 12: rParent.SetZoomType( static_cast< SvxZoomType >(nInt32Val) ); break;// "Zoom/Type", + case 13: rParent.SetAlignMathObjectsToBaseline(bSet); break;// "Other/IsAlignMathObjectsToBaseline" + case 14: rParent.SetMetric((FieldUnit)nInt32Val, sal_True); break;// "Other/MeasureUnit", + case 15: rParent.SetDefTab(MM100_TO_TWIP(nInt32Val), sal_True); break;// "Other/TabStop", + case 16: rParent.SetVRulerRight(bSet); break;// "Window/IsVerticalRulerRight", + case 17: rParent.SetViewLayoutColumns( static_cast<sal_uInt16>(nInt32Val) ); break;// "ViewLayout/Columns", + case 18: rParent.SetViewLayoutBookMode(bSet); break;// "ViewLayout/BookMode", + case 19: rParent.SetDefaultPageMode(bSet,sal_True); break;// "Other/IsSquaredPageMode", + case 20: rParent.SetApplyCharUnit(bSet); break;// "Other/ApplyUserChar" } } } @@ -439,7 +411,7 @@ Sequence<OUString> SwGridConfig::GetPropertyNames() return aNames; } -SwGridConfig::SwGridConfig(BOOL bIsWeb, SwMasterUsrPref& rPar) : +SwGridConfig::SwGridConfig(sal_Bool bIsWeb, SwMasterUsrPref& rPar) : ConfigItem(bIsWeb ? C2U("Office.WriterWeb/Grid") : C2U("Office.Writer/Grid"), CONFIG_MODE_DELAYED_UPDATE|CONFIG_MODE_RELEASE_TREE), rParent(rPar), @@ -583,7 +555,7 @@ void SwCursorConfig::Load() switch(nProp) { case 0: rParent.SetShadowCursor(bSet); break;// "DirectCursor/UseDirectCursor", - case 1: rParent.SetShdwCrsrFillMode((BYTE)nSet); break;// "DirectCursor/Insert", + case 1: rParent.SetShdwCrsrFillMode((sal_uInt8)nSet); break;// "DirectCursor/Insert", case 2: rParent.SetCursorInProtectedArea(bSet); break;// "Option/ProtectedArea" } } diff --git a/sw/source/ui/config/viewopt.cxx b/sw/source/ui/config/viewopt.cxx index a0db43d368..2f36dc8618 100644 --- a/sw/source/ui/config/viewopt.cxx +++ b/sw/source/ui/config/viewopt.cxx @@ -53,7 +53,7 @@ #include <editeng/acorrcfg.hxx> #if OSL_DEBUG_LEVEL > 1 -BOOL SwViewOption::bTest9 = FALSE; //DrawingLayerNotLoading +sal_Bool SwViewOption::bTest9 = sal_False; //DrawingLayerNotLoading #endif Color SwViewOption::aDocBoundColor(COL_LIGHTGRAY); Color SwViewOption::aObjectBoundColor(COL_LIGHTGRAY); @@ -75,7 +75,7 @@ Color SwViewOption::aScriptIndicatorColor(COL_GREEN); Color SwViewOption::aShadowColor(COL_GRAY); sal_Int32 SwViewOption::nAppearanceFlags = VIEWOPT_DOC_BOUNDARIES|VIEWOPT_OBJECT_BOUNDARIES; -USHORT SwViewOption::nPixelTwips = 0; // one pixel on the screen +sal_uInt16 SwViewOption::nPixelTwips = 0; // one pixel on the screen #define LINEBREAK_SIZE 12, 8 @@ -88,7 +88,7 @@ USHORT SwViewOption::nPixelTwips = 0; // one pixel on the screen static const char aPostItStr[] = " "; -BOOL SwViewOption::IsEqualFlags( const SwViewOption &rOpt ) const +sal_Bool SwViewOption::IsEqualFlags( const SwViewOption &rOpt ) const { return nCoreOptions == rOpt.nCoreOptions && nCore2Options == rOpt.nCore2Options @@ -145,10 +145,10 @@ void SwViewOption::DrawRectPrinter( OutputDevice *pOut, pOut->SetLineColor( aOldColor ); } -USHORT SwViewOption::GetPostItsWidth( const OutputDevice *pOut ) const +sal_uInt16 SwViewOption::GetPostItsWidth( const OutputDevice *pOut ) const { OSL_ENSURE( pOut, "no Outdev" ); - return USHORT(pOut->GetTextWidth( String::CreateFromAscii(aPostItStr ))); + return sal_uInt16(pOut->GetTextWidth( String::CreateFromAscii(aPostItStr ))); } void SwViewOption::PaintPostIts( OutputDevice *pOut, const SwRect &rRect, sal_Bool bIsScript ) const @@ -158,7 +158,7 @@ void SwViewOption::PaintPostIts( OutputDevice *pOut, const SwRect &rRect, sal_Bo Color aOldLineColor( pOut->GetLineColor() ); pOut->SetLineColor( Color(COL_GRAY ) ); // to make it look nice, we subtract two pixels everywhere - USHORT nPix = GetPixelTwips() * 2; + sal_uInt16 nPix = GetPixelTwips() * 2; if( rRect.Width() <= 2 * nPix || rRect.Height() <= 2 * nPix ) nPix = 0; const Point aTopLeft( rRect.Left() + nPix, rRect.Top() + nPix ); @@ -176,14 +176,14 @@ SwViewOption::SwViewOption() : nPagePrevRow( 1 ), nPagePrevCol( 2 ), nShdwCrsrFillMode( FILL_TAB ), - bReadonly(FALSE), - bStarOneSetting(FALSE), - bIsPagePreview(FALSE), - bSelectionInReadonly(FALSE), + bReadonly(sal_False), + bStarOneSetting(sal_False), + bIsPagePreview(sal_False), + bSelectionInReadonly(sal_False), // #114856# Formular view - bFormView(FALSE), - bBookview(FALSE), - mbViewLayoutBookMode(FALSE), + bFormView(sal_False), + bBookview(sal_False), + mbViewLayoutBookMode(sal_False), bShowPlaceHolderFields( sal_True ), nZoom( 100 ), eZoom( SVX_ZOOM_PERCENT ), @@ -213,14 +213,14 @@ SwViewOption::SwViewOption() : #if OSL_DEBUG_LEVEL > 1 // correspond to the statements in ui/config/cfgvw.src bTest1 = bTest2 = bTest3 = bTest4 = - bTest5 = bTest6 = bTest7 = bTest8 = bTest10 = FALSE; + bTest5 = bTest6 = bTest7 = bTest8 = bTest10 = sal_False; #endif } SwViewOption::SwViewOption(const SwViewOption& rVOpt) { - bReadonly = FALSE; - bSelectionInReadonly = FALSE; + bReadonly = sal_False; + bSelectionInReadonly = sal_False; // #114856# Formular view bFormView = rVOpt.bFormView; nZoom = rVOpt.nZoom ; @@ -308,11 +308,11 @@ void SwViewOption::Init( Window *pWin ) { if( !nPixelTwips && pWin ) { - nPixelTwips = (USHORT)pWin->PixelToLogic( Size(1,1) ).Height(); + nPixelTwips = (sal_uInt16)pWin->PixelToLogic( Size(1,1) ).Height(); } } -BOOL SwViewOption::IsAutoCompleteWords() const +sal_Bool SwViewOption::IsAutoCompleteWords() const { const SvxSwAutoFmtFlags& rFlags = SvxAutoCorrCfg::Get()->GetAutoCorrect()->GetSwFlags(); return rFlags.bAutoCmpltCollectWords; @@ -325,9 +325,9 @@ AuthorCharAttr::AuthorCharAttr() : { } -USHORT GetHtmlMode(const SwDocShell* pShell) +sal_uInt16 GetHtmlMode(const SwDocShell* pShell) { - USHORT nRet = 0; + sal_uInt16 nRet = 0; if(!pShell || PTR_CAST(SwWebDocShell, pShell)) { nRet = HTMLMODE_ON; @@ -512,7 +512,7 @@ void SwViewOption::ApplyColorConfigValues(const svtools::ColorConfig& rConfig ) aScriptIndicatorColor.SetColor(rConfig.GetColorValue(svtools::WRITERSCRIPTINDICATOR).nColor); } -void SwViewOption::SetAppearanceFlag(sal_Int32 nFlag, BOOL bSet, BOOL bSaveInConfig ) +void SwViewOption::SetAppearanceFlag(sal_Int32 nFlag, sal_Bool bSet, sal_Bool bSaveInConfig ) { if(bSet) nAppearanceFlags |= nFlag; @@ -554,7 +554,7 @@ void SwViewOption::SetAppearanceFlag(sal_Int32 nFlag, BOOL bSet, BOOL bSaveInCon } } -BOOL SwViewOption::IsAppearanceFlag(sal_Int32 nFlag) +sal_Bool SwViewOption::IsAppearanceFlag(sal_Int32 nFlag) { return 0 != (nAppearanceFlags & nFlag); } diff --git a/sw/source/ui/dbui/addresslistdialog.cxx b/sw/source/ui/dbui/addresslistdialog.cxx index 6b3c1a494f..2fec46bf76 100644 --- a/sw/source/ui/dbui/addresslistdialog.cxx +++ b/sw/source/ui/dbui/addresslistdialog.cxx @@ -211,7 +211,7 @@ SwAddressListDialog::SwAddressListDialog(SwMailMergeAddressBlockPage* pParent) : m_aListLB.SetHelpId(HID_MM_ADDRESSLIST_TLB); static long nTabs[] = {2, 0, aSz.Width()/2 }; - m_aListLB.SetWindowBits( WB_SORT | WB_HSCROLL | WB_CLIPCHILDREN | WB_TABSTOP ); + m_aListLB.SetStyle( m_aListLB.GetStyle() | WB_SORT | WB_HSCROLL | WB_CLIPCHILDREN | WB_TABSTOP ); m_aListLB.SetSelectionMode( SINGLE_SELECTION ); m_aListLB.SetTabs(&nTabs[0], MAP_PIXEL); m_aOK.SetClickHdl( LINK( this, SwAddressListDialog, OKHdl_Impl)); @@ -228,7 +228,7 @@ SwAddressListDialog::SwAddressListDialog(SwMailMergeAddressBlockPage* pParent) : OSL_ENSURE(m_xDBContext.is(), "service 'com.sun.star.sdb.DatabaseContext' not found!"); sal_Bool bEnableEdit = sal_False; sal_Bool bEnableOK = sal_True; - m_aListLB.SelectAll( FALSE ); + m_aListLB.SelectAll( sal_False ); if(m_xDBContext.is()) { @@ -445,7 +445,7 @@ IMPL_LINK(SwAddressListDialog, CreateHdl_Impl, PushButton*, pButton) pUserData->sURL = sURL; m_pCreatedDataSource->SetUserData(pUserData); m_aListLB.Select(m_pCreatedDataSource); - m_aCreateListPB.Enable(FALSE); + m_aCreateListPB.Enable(sal_False); } catch(Exception& ) @@ -512,7 +512,7 @@ IMPL_STATIC_LINK(SwAddressListDialog, StaticListBoxSelectHdl_Impl, SvLBoxEntry*, pThis->m_aListLB.SetEntryText(pThis->m_sConnecting, pSelect, ITEMID_TABLE - 1); // allow painting of the new entry pThis->m_aListLB.Window::Invalidate(INVALIDATE_UPDATE); - for (USHORT i = 0; i < 10; i++) + for (sal_uInt16 i = 0; i < 10; i++) Application::Reschedule(); } @@ -674,7 +674,7 @@ IMPL_LINK(SwAddressListDialog, TableSelectHdl_Impl, PushButton*, pButton) IMPL_LINK(SwAddressListDialog, OKHdl_Impl, PushButton*, EMPTYARG) { - EndDialog(TRUE); + EndDialog(sal_True); return 0; } diff --git a/sw/source/ui/dbui/addresslistdialog.src b/sw/source/ui/dbui/addresslistdialog.src index 64fcaf7806..a9f933ecda 100644 --- a/sw/source/ui/dbui/addresslistdialog.src +++ b/sw/source/ui/dbui/addresslistdialog.src @@ -61,30 +61,35 @@ ModalDialog DLG_MM_ADDRESSLISTDIALOG }; PushButton PB_LOADLIST { + HelpID = "sw:PushButton:DLG_MM_ADDRESSLISTDIALOG:PB_LOADLIST"; Pos = MAP_APPFONT ( 194 , 43 ) ; Size = MAP_APPFONT ( 60 , 14 ) ; Text [ en-US ] = "~Add..."; }; PushButton PB_CREATELIST { + HelpID = "sw:PushButton:DLG_MM_ADDRESSLISTDIALOG:PB_CREATELIST"; Pos = MAP_APPFONT ( 194 , 60 ) ; Size = MAP_APPFONT ( 60 , 14 ) ; Text [ en-US ] = "~Create..."; }; PushButton PB_FILTER { + HelpID = "sw:PushButton:DLG_MM_ADDRESSLISTDIALOG:PB_FILTER"; Pos = MAP_APPFONT ( 194 , 77 ) ; Size = MAP_APPFONT ( 60 , 14 ) ; Text [ en-US ] = "~Filter..."; }; PushButton PB_EDIT { + HelpID = "sw:PushButton:DLG_MM_ADDRESSLISTDIALOG:PB_EDIT"; Pos = MAP_APPFONT ( 194 , 94 ) ; Size = MAP_APPFONT ( 60 , 14 ) ; Text [ en-US ] = "~Edit..."; }; PushButton PB_TABLE { + HelpID = "sw:PushButton:DLG_MM_ADDRESSLISTDIALOG:PB_TABLE"; Pos = MAP_APPFONT ( 194 , 111 ) ; Size = MAP_APPFONT ( 60 , 14 ) ; Text [ en-US ] = "Change ~Table..."; diff --git a/sw/source/ui/dbui/createaddresslistdialog.cxx b/sw/source/ui/dbui/createaddresslistdialog.cxx index 6364d5d065..85b5151649 100644 --- a/sw/source/ui/dbui/createaddresslistdialog.cxx +++ b/sw/source/ui/dbui/createaddresslistdialog.cxx @@ -212,11 +212,11 @@ void SwAddressControl_Impl::SetData(SwCSVData& rDBData) if(nContentHeight < m_aScrollBar.GetSizePixel().Height()) { nContentHeight = m_aScrollBar.GetSizePixel().Height(); - m_aScrollBar.Enable(FALSE); + m_aScrollBar.Enable(sal_False); } else { - m_aScrollBar.Enable(TRUE); + m_aScrollBar.Enable(sal_True); m_aScrollBar.SetRange(Range(0, nLines)); m_aScrollBar.SetThumbPos(0); m_aScrollBar.SetVisibleSize(nVisibleLines); @@ -339,7 +339,7 @@ long SwAddressControl_Impl::PreNotify( NotifyEvent& rNEvt ) if(rNEvt.GetType() == EVENT_COMMAND) { const CommandEvent* pCEvt = rNEvt.GetCommandEvent(); - USHORT nCmd = pCEvt->GetCommand(); + sal_uInt16 nCmd = pCEvt->GetCommand(); if( COMMAND_WHEEL == nCmd ) { Command(*pCEvt); @@ -399,7 +399,7 @@ SwCreateAddressListDialog::SwCreateAddressListDialog( if(m_sURL.Len()) { //file exists, has to be loaded here - SfxMedium aMedium( m_sURL, STREAM_READ, TRUE ); + SfxMedium aMedium( m_sURL, STREAM_READ, sal_True ); SvStream* pStream = aMedium.GetInStream(); if(pStream) { @@ -413,7 +413,7 @@ SwCreateAddressListDialog::SwCreateAddressListDialog( OUString sMiddle(sTempMiddle); String sLine; - BOOL bRead = pStream->ReadUniOrByteStringLine( sLine, RTL_TEXTENCODING_UTF8 ); + sal_Bool bRead = pStream->ReadUniOrByteStringLine( sLine, RTL_TEXTENCODING_UTF8 ); if(bRead) { @@ -458,7 +458,7 @@ SwCreateAddressListDialog::SwCreateAddressListDialog( //database has to be created const ResStringArray& rAddressHeader = rConfig.GetDefaultAddressHeaders(); sal_uInt32 nCount = rAddressHeader.Count(); - for(USHORT nHeader = 0; nHeader < nCount; ++nHeader) + for(sal_uInt16 nHeader = 0; nHeader < nCount; ++nHeader) m_pCSVData->aDBColumnHeaders.push_back( rAddressHeader.GetString(nHeader)); ::std::vector<OUString> aNewData; String sTemp; @@ -509,7 +509,7 @@ IMPL_LINK(SwCreateAddressListDialog, DeleteHdl_Impl, PushButton*, EMPTYARG) // if only one set is available then clear the data String sTemp; m_pCSVData->aDBData[0].assign(m_pCSVData->aDBData[0].size(), sTemp); - m_aDeletePB.Enable(FALSE); + m_aDeletePB.Enable(sal_False); } m_pAddressControl->SetCurrentDataSet(nCurrent); m_aSetNoNF.SetMax(m_pCSVData->aDBData.size()); @@ -586,7 +586,7 @@ IMPL_LINK(SwCreateAddressListDialog, OkHdl_Impl, PushButton*, EMPTYARG) } if(m_sURL.Len()) { - SfxMedium aMedium( m_sURL, STREAM_READWRITE|STREAM_TRUNC, TRUE ); + SfxMedium aMedium( m_sURL, STREAM_READWRITE|STREAM_TRUNC, sal_True ); SvStream* pStream = aMedium.GetOutStream(); pStream->SetLineDelimiter( LINEEND_LF ); pStream->SetStreamCharSet(RTL_TEXTENCODING_UTF8); @@ -769,7 +769,7 @@ IMPL_LINK(SwFindEntryDialog, FindEnableHdl_Impl, Edit*, EMPTYARG) IMPL_LINK(SwFindEntryDialog, CloseHdl_Impl, PushButton*, EMPTYARG) { - Show(FALSE); + Show(sal_False); return 0; } diff --git a/sw/source/ui/dbui/createaddresslistdialog.src b/sw/source/ui/dbui/createaddresslistdialog.src index d2e4e5f84e..1679aa18f2 100644 --- a/sw/source/ui/dbui/createaddresslistdialog.src +++ b/sw/source/ui/dbui/createaddresslistdialog.src @@ -67,24 +67,28 @@ ModalDialog DLG_MM_CREATEADDRESSLIST }; PushButton PB_NEW { + HelpID = "sw:PushButton:DLG_MM_CREATEADDRESSLIST:PB_NEW"; Pos = MAP_APPFONT ( 262 , 14 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "~New"; }; PushButton PB_DELETE { + HelpID = "sw:PushButton:DLG_MM_CREATEADDRESSLIST:PB_DELETE"; Pos = MAP_APPFONT ( 262 , 32 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "~Delete"; }; PushButton PB_FIND { + HelpID = "sw:PushButton:DLG_MM_CREATEADDRESSLIST:PB_FIND"; Pos = MAP_APPFONT ( 262 , 50 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "~Find..."; }; PushButton PB_CUSTOMIZE { + HelpID = "sw:PushButton:DLG_MM_CREATEADDRESSLIST:PB_CUSTOMIZE"; Pos = MAP_APPFONT ( 262 , 68 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "C~ustomize..."; @@ -97,18 +101,21 @@ ModalDialog DLG_MM_CREATEADDRESSLIST }; PushButton PB_START { + HelpID = "sw:PushButton:DLG_MM_CREATEADDRESSLIST:PB_START"; Pos = MAP_APPFONT ( 100 , 180 ) ; Size = MAP_APPFONT ( 20 , 14 ) ; Text = "|<"; }; PushButton PB_PREV { + HelpID = "sw:PushButton:DLG_MM_CREATEADDRESSLIST:PB_PREV"; Pos = MAP_APPFONT ( 123 , 180 ) ; Size = MAP_APPFONT ( 20 , 14 ) ; Text = "<"; }; NumericField NF_SETNO { + HelpID = "sw:NumericField:DLG_MM_CREATEADDRESSLIST:NF_SETNO"; Pos = MAP_APPFONT ( 146 , 180 ) ; Size = MAP_APPFONT ( 20 , 14 ) ; Border = TRUE; @@ -122,12 +129,14 @@ ModalDialog DLG_MM_CREATEADDRESSLIST }; PushButton PB_NEXT { + HelpID = "sw:PushButton:DLG_MM_CREATEADDRESSLIST:PB_NEXT"; Pos = MAP_APPFONT ( 169 , 180 ) ; Size = MAP_APPFONT ( 20 , 14 ) ; Text = ">"; }; PushButton PB_END { + HelpID = "sw:PushButton:DLG_MM_CREATEADDRESSLIST:PB_END"; Pos = MAP_APPFONT ( 192 , 180 ) ; Size = MAP_APPFONT ( 20 , 14 ) ; Text = ">|"; @@ -179,18 +188,21 @@ ModelessDialog DLG_MM_FIND_ENTRY }; Edit ED_FIND { + HelpID = "sw:Edit:DLG_MM_FIND_ENTRY:ED_FIND"; Pos = MAP_APPFONT ( 6 , 14) ; Size = MAP_APPFONT ( 120 , 12 ) ; Border = TRUE; }; CheckBox CB_FINDONLY { + HelpID = "sw:CheckBox:DLG_MM_FIND_ENTRY:CB_FINDONLY"; Pos = MAP_APPFONT ( 6 , 32 ) ; Size = MAP_APPFONT ( 120 , 10 ) ; Text [ en-US ] = "Find ~only in"; }; ListBox LB_FINDONLY { + HelpID = "sw:ListBox:DLG_MM_FIND_ENTRY:LB_FINDONLY"; Pos = MAP_APPFONT ( 12 , 45 ) ; Size = MAP_APPFONT ( 114 , 50 ) ; Border = TRUE; @@ -198,6 +210,7 @@ ModelessDialog DLG_MM_FIND_ENTRY }; PushButton PB_FIND { + HelpID = "sw:PushButton:DLG_MM_FIND_ENTRY:PB_FIND"; Pos = MAP_APPFONT ( 132 , 3 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; DefButton = TRUE; diff --git a/sw/source/ui/dbui/customizeaddresslistdialog.cxx b/sw/source/ui/dbui/customizeaddresslistdialog.cxx index 6d8f3b06a8..46dd609f3e 100644 --- a/sw/source/ui/dbui/customizeaddresslistdialog.cxx +++ b/sw/source/ui/dbui/customizeaddresslistdialog.cxx @@ -96,7 +96,7 @@ IMPL_LINK(SwCustomizeAddressListDialog, ListBoxSelectHdl_Impl, ListBox*, EMPTYAR IMPL_LINK(SwCustomizeAddressListDialog, AddRenameHdl_Impl, PushButton*, pButton) { bool bRename = pButton == &m_aRenamePB; - USHORT nPos = m_aFieldsLB.GetSelectEntryPos(); + sal_uInt16 nPos = m_aFieldsLB.GetSelectEntryPos(); if(nPos == LISTBOX_ENTRY_NOTFOUND) nPos = 0; @@ -139,7 +139,7 @@ IMPL_LINK(SwCustomizeAddressListDialog, AddRenameHdl_Impl, PushButton*, pButton) IMPL_LINK(SwCustomizeAddressListDialog, DeleteHdl_Impl, PushButton*, EMPTYARG) { - USHORT nPos = m_aFieldsLB.GetSelectEntryPos(); + sal_uInt16 nPos = m_aFieldsLB.GetSelectEntryPos(); m_aFieldsLB.RemoveEntry(m_aFieldsLB.GetSelectEntryPos()); m_aFieldsLB.SelectEntryPos(nPos > m_aFieldsLB.GetEntryCount() - 1 ? nPos - 1 : nPos); @@ -156,8 +156,8 @@ IMPL_LINK(SwCustomizeAddressListDialog, DeleteHdl_Impl, PushButton*, EMPTYARG) IMPL_LINK(SwCustomizeAddressListDialog, UpDownHdl_Impl, PushButton*, pButton) { - USHORT nPos; - USHORT nOldPos = nPos = m_aFieldsLB.GetSelectEntryPos(); + sal_uInt16 nPos; + sal_uInt16 nOldPos = nPos = m_aFieldsLB.GetSelectEntryPos(); String aTemp = m_aFieldsLB.GetEntry(nPos); m_aFieldsLB.RemoveEntry( nPos ); if(pButton == &m_aUpPB) @@ -184,8 +184,8 @@ IMPL_LINK(SwCustomizeAddressListDialog, UpDownHdl_Impl, PushButton*, pButton) void SwCustomizeAddressListDialog::UpdateButtons() { - USHORT nPos = m_aFieldsLB.GetSelectEntryPos(); - USHORT nEntries = m_aFieldsLB.GetEntryCount(); + sal_uInt16 nPos = m_aFieldsLB.GetSelectEntryPos(); + sal_uInt16 nEntries = m_aFieldsLB.GetEntryCount(); m_aUpPB.Enable(nPos > 0 && nEntries > 0); m_aDownPB.Enable(nPos < nEntries -1); m_aDeletePB.Enable(nEntries > 0); @@ -229,7 +229,7 @@ SwAddRenameEntryDialog::~SwAddRenameEntryDialog() IMPL_LINK(SwAddRenameEntryDialog, ModifyHdl_Impl, Edit*, pEdit) { ::rtl::OUString sEntry = pEdit->GetText(); - BOOL bFound = sEntry.getLength() ? FALSE : TRUE; + sal_Bool bFound = sEntry.getLength() ? sal_False : sal_True; if(!bFound) { @@ -239,7 +239,7 @@ IMPL_LINK(SwAddRenameEntryDialog, ModifyHdl_Impl, Edit*, pEdit) ++aHeaderIter) if(*aHeaderIter == sEntry) { - bFound = TRUE; + bFound = sal_True; break; } } diff --git a/sw/source/ui/dbui/customizeaddresslistdialog.src b/sw/source/ui/dbui/customizeaddresslistdialog.src index 38afd0bfe1..d95be1128a 100644 --- a/sw/source/ui/dbui/customizeaddresslistdialog.src +++ b/sw/source/ui/dbui/customizeaddresslistdialog.src @@ -47,30 +47,35 @@ ModalDialog DLG_MM_CUSTOMIZE_ADDRESS_LIST }; ListBox LB_FIELDS { + HelpID = "sw:ListBox:DLG_MM_CUSTOMIZE_ADDRESS_LIST:LB_FIELDS"; Pos = MAP_APPFONT ( 6 , 14 ) ; Size = MAP_APPFONT ( 112 , 120 ) ; Border = TRUE; }; PushButton PB_ADD { + HelpID = "sw:PushButton:DLG_MM_CUSTOMIZE_ADDRESS_LIST:PB_ADD"; Pos = MAP_APPFONT ( 144 , 3 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "~Add..."; }; PushButton PB_DELETE { + HelpID = "sw:PushButton:DLG_MM_CUSTOMIZE_ADDRESS_LIST:PB_DELETE"; Pos = MAP_APPFONT ( 144 , 20 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "~Delete"; }; PushButton PB_RENAME { + HelpID = "sw:PushButton:DLG_MM_CUSTOMIZE_ADDRESS_LIST:PB_RENAME"; Pos = MAP_APPFONT ( 144 , 37 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "~Rename..."; }; ImageButton PB_UP { + HelpID = "sw:ImageButton:DLG_MM_CUSTOMIZE_ADDRESS_LIST:PB_UP"; Pos = MAP_APPFONT ( 124 , 58 ) ; Size = MAP_APPFONT ( 14 , 14 ) ; SYMBOL = IMAGEBUTTON_ARROW_UP; @@ -78,6 +83,7 @@ ModalDialog DLG_MM_CUSTOMIZE_ADDRESS_LIST }; ImageButton PB_DOWN { + HelpID = "sw:ImageButton:DLG_MM_CUSTOMIZE_ADDRESS_LIST:PB_DOWN"; Pos = MAP_APPFONT ( 124 , 75 ) ; Size = MAP_APPFONT ( 14 , 14 ) ; SYMBOL = IMAGEBUTTON_ARROW_DOWN; @@ -124,6 +130,7 @@ ModalDialog DLG_MM_ADD_RENAME_ENTRY }; Edit ED_FIELDNAME { + HelpID = "sw:Edit:DLG_MM_ADD_RENAME_ENTRY:ED_FIELDNAME"; Pos = MAP_APPFONT ( 6 , 14 ) ; Size = MAP_APPFONT ( 120 , 12 ) ; Border = TRUE; diff --git a/sw/source/ui/dbui/dbinsdlg.cxx b/sw/source/ui/dbui/dbinsdlg.cxx index d4ef2891cd..ffa822ec7f 100644 --- a/sw/source/ui/dbui/dbinsdlg.cxx +++ b/sw/source/ui/dbui/dbinsdlg.cxx @@ -136,7 +136,7 @@ struct _DB_Column union { String* pText; SwField* pField; - ULONG nFormat; + sal_uLong nFormat; } DB_ColumnData; const SwInsDBColumn* pColInfo; @@ -154,7 +154,7 @@ struct _DB_Column eColType = DB_FILLTEXT; } - _DB_Column( const SwInsDBColumn& rInfo, ULONG nFormat ) + _DB_Column( const SwInsDBColumn& rInfo, sal_uLong nFormat ) { pColInfo = &rInfo; DB_ColumnData.nFormat = nFormat; @@ -193,15 +193,15 @@ struct _DB_ColumnConfigData { SwInsDBColumns aDBColumns; rtl::OUString sSource, sTable, sEdit, sTblList, sTmplNm, sTAutoFmtNm; - BOOL bIsTable : 1, + sal_Bool bIsTable : 1, bIsField : 1, bIsHeadlineOn : 1, bIsEmptyHeadln : 1; _DB_ColumnConfigData() { - bIsTable = bIsHeadlineOn = TRUE; - bIsField = bIsEmptyHeadln = FALSE; + bIsTable = bIsHeadlineOn = sal_True; + bIsField = bIsEmptyHeadln = sal_False; } ~_DB_ColumnConfigData(); @@ -304,7 +304,7 @@ SwInsertDBColAutoPilot::SwInsertDBColAutoPilot( SwView& rView, long nCount = aColNames.getLength(); for (long n = 0; n < nCount; n++) { - SwInsDBColumn* pNew = new SwInsDBColumn( pColNames[n], (USHORT)n ); + SwInsDBColumn* pNew = new SwInsDBColumn( pColNames[n], (sal_uInt16)n ); Any aCol = xCols->getByName(pColNames[n]); Reference <XPropertySet> xCol; aCol >>= xCol; @@ -328,7 +328,7 @@ SwInsertDBColAutoPilot::SwInsertDBColAutoPilot( SwView& rView, case DataType::TIME: case DataType::TIMESTAMP: { - pNew->bHasFmt = TRUE; + pNew->bHasFmt = sal_True; Any aFormat = xCol->getPropertyValue(C2U("FormatKey")); if(aFormat.hasValue()) { @@ -393,16 +393,16 @@ SwInsertDBColAutoPilot::SwInsertDBColAutoPilot( SwView& rView, // when the cursor is inside of a table, table must NEVER be selectable if( pView->GetWrtShell().GetTableFmt() ) { - aRbAsTable.Enable( FALSE ); - aRbAsField.Check( TRUE ); - aRbDbFmtFromDb.Check( TRUE ); + aRbAsTable.Enable( sal_False ); + aRbAsField.Check( sal_True ); + aRbDbFmtFromDb.Check( sal_True ); } else { - aRbAsTable.Check( TRUE ); - aRbDbFmtFromDb.Check( TRUE ); - aIbDbcolOneFrom.Enable( FALSE ); - aIbDbcolAllFrom.Enable( FALSE ); + aRbAsTable.Check( sal_True ); + aRbDbFmtFromDb.Check( sal_True ); + aIbDbcolOneFrom.Enable( sal_False ); + aIbDbcolAllFrom.Enable( sal_False ); } aRbAsTable.SetClickHdl( LINK(this, SwInsertDBColAutoPilot, PageHdl )); @@ -434,7 +434,7 @@ SwInsertDBColAutoPilot::SwInsertDBColAutoPilot( SwView& rView, aLbTblDbColumn.SetDoubleClickHdl( LINK( this, SwInsertDBColAutoPilot, DblClickHdl )); aLbTableCol.SetDoubleClickHdl( LINK( this, SwInsertDBColAutoPilot, DblClickHdl )); - for( USHORT n = 0; n < aDBColumns.Count(); ++n ) + for( sal_uInt16 n = 0; n < aDBColumns.Count(); ++n ) { const String& rS = aDBColumns[ n ]->sColumn; aLbTblDbColumn.InsertEntry( rS, n ); @@ -460,7 +460,7 @@ SwInsertDBColAutoPilot::~SwInsertDBColAutoPilot() IMPL_LINK( SwInsertDBColAutoPilot, PageHdl, Button*, pButton ) { - BOOL bShowTbl = pButton == &aRbAsTable; + sal_Bool bShowTbl = pButton == &aRbAsTable; String sTxt( pButton->GetText() ); aFlHead.SetText( MnemonicGenerator::EraseAllMnemonicChars( sTxt ) ); @@ -494,7 +494,7 @@ IMPL_LINK( SwInsertDBColAutoPilot, PageHdl, Button*, pButton ) IMPL_LINK( SwInsertDBColAutoPilot, DBFormatHdl, Button*, pButton ) { - USHORT nFndPos; + sal_uInt16 nFndPos; ListBox& rBox = aRbAsTable.IsChecked() ? ( 0 == aLbTableCol.GetEntryData( 0 ) ? aLbTblDbColumn @@ -504,7 +504,7 @@ IMPL_LINK( SwInsertDBColAutoPilot, DBFormatHdl, Button*, pButton ) SwInsDBColumn aSrch( rBox.GetSelectEntry(), 0 ); aDBColumns.Seek_Entry( &aSrch, &nFndPos ); - BOOL bFromDB = &aRbDbFmtFromDb == pButton; + sal_Bool bFromDB = &aRbDbFmtFromDb == pButton; aDBColumns[ nFndPos ]->bIsDBFmt = bFromDB; aLbDbFmtFromUsr.Enable( !bFromDB ); @@ -513,15 +513,15 @@ IMPL_LINK( SwInsertDBColAutoPilot, DBFormatHdl, Button*, pButton ) IMPL_LINK( SwInsertDBColAutoPilot, TblToFromHdl, Button*, pButton ) { - BOOL bChgEnable = TRUE, bEnableTo = TRUE, bEnableFrom = TRUE; - aLbTblDbColumn.SetUpdateMode( FALSE ); - aLbTableCol.SetUpdateMode( FALSE ); + sal_Bool bChgEnable = sal_True, bEnableTo = sal_True, bEnableFrom = sal_True; + aLbTblDbColumn.SetUpdateMode( sal_False ); + aLbTableCol.SetUpdateMode( sal_False ); if( pButton == &aIbDbcolAllTo ) { - bEnableTo = FALSE; + bEnableTo = sal_False; - USHORT n, nInsPos = aLbTableCol.GetSelectEntryPos(), + sal_uInt16 n, nInsPos = aLbTableCol.GetSelectEntryPos(), nCnt = aLbTblDbColumn.GetEntryCount(); if( LISTBOX_APPEND == nInsPos ) for( n = 0; n < nCnt; ++n ) @@ -537,7 +537,7 @@ IMPL_LINK( SwInsertDBColAutoPilot, TblToFromHdl, Button*, pButton ) else if( pButton == &aIbDbcolOneTo && LISTBOX_ENTRY_NOTFOUND != aLbTblDbColumn.GetSelectEntryPos() ) { - USHORT nInsPos = aLbTableCol.GetSelectEntryPos(), + sal_uInt16 nInsPos = aLbTableCol.GetSelectEntryPos(), nDelPos = aLbTblDbColumn.GetSelectEntryPos(), nTopPos = aLbTblDbColumn.GetTopEntry(); aLbTableCol.InsertEntry( aLbTblDbColumn.GetEntry( nDelPos ), nInsPos ); @@ -555,7 +555,7 @@ IMPL_LINK( SwInsertDBColAutoPilot, TblToFromHdl, Button*, pButton ) { if( LISTBOX_ENTRY_NOTFOUND != aLbTableCol.GetSelectEntryPos() ) { - USHORT nFndPos, nInsPos, + sal_uInt16 nFndPos, nInsPos, nDelPos = aLbTableCol.GetSelectEntryPos(), nTopPos = aLbTableCol.GetTopEntry(); @@ -592,24 +592,24 @@ IMPL_LINK( SwInsertDBColAutoPilot, TblToFromHdl, Button*, pButton ) } else if( pButton == &aIbDbcolAllFrom ) { - bEnableFrom = FALSE; + bEnableFrom = sal_False; aLbTblDbColumn.Clear(); aLbTableCol.Clear(); - for( USHORT n = 0; n < aDBColumns.Count(); ++n ) + for( sal_uInt16 n = 0; n < aDBColumns.Count(); ++n ) aLbTblDbColumn.InsertEntry( aDBColumns[ n ]->sColumn, n ); aLbTblDbColumn.SelectEntryPos( 0 ); } else if( pButton == &aIbDbcolToEdit ) { - bChgEnable = FALSE; + bChgEnable = sal_False; // move data to Edit: String aFld( aLbTxtDbColumn.GetSelectEntry() ); if( aFld.Len() ) { String aStr( aEdDbText.GetText() ); - USHORT nPos = (USHORT)aEdDbText.GetSelection().Min(); - USHORT nSel = USHORT(aEdDbText.GetSelection().Max()) - nPos; + sal_uInt16 nPos = (sal_uInt16)aEdDbText.GetSelection().Min(); + sal_uInt16 nSel = sal_uInt16(aEdDbText.GetSelection().Max()) - nPos; if( nSel ) // first delete the existing selection aStr.Erase( nPos, nSel ); @@ -646,14 +646,14 @@ IMPL_LINK( SwInsertDBColAutoPilot, TblToFromHdl, Button*, pButton ) aIbDbcolOneFrom.Enable( bEnableFrom ); aIbDbcolAllFrom.Enable( bEnableFrom ); - aRbDbFmtFromDb.Enable( FALSE ); - aRbDbFmtFromUsr.Enable( FALSE ); - aLbDbFmtFromUsr.Enable( FALSE ); + aRbDbFmtFromDb.Enable( sal_False ); + aRbDbFmtFromUsr.Enable( sal_False ); + aLbDbFmtFromUsr.Enable( sal_False ); aPbTblFormat.Enable( bEnableFrom ); } - aLbTblDbColumn.SetUpdateMode( TRUE ); - aLbTableCol.SetUpdateMode( TRUE ); + aLbTblDbColumn.SetUpdateMode( sal_True ); + aLbTableCol.SetUpdateMode( sal_True ); return 0; } @@ -677,10 +677,10 @@ IMPL_LINK( SwInsertDBColAutoPilot, DblClickHdl, ListBox*, pBox ) IMPL_LINK( SwInsertDBColAutoPilot, TblFmtHdl, PushButton*, pButton ) { SwWrtShell& rSh = pView->GetWrtShell(); - BOOL bNewSet = FALSE; + sal_Bool bNewSet = sal_False; if( !pTblSet ) { - bNewSet = TRUE; + bNewSet = sal_True; pTblSet = new SfxItemSet( rSh.GetAttrPool(), SwuiGetUITableAttrRange() ); // At first acquire the simple attributes @@ -697,19 +697,19 @@ IMPL_LINK( SwInsertDBColAutoPilot, TblFmtHdl, PushButton*, pButton ) SvxBoxInfoItem aBoxInfo( SID_ATTR_BORDER_INNER ); // table variant, when multiple table cells are selected - aBoxInfo.SetTable( TRUE ); + aBoxInfo.SetTable( sal_True ); // always show gap field - aBoxInfo.SetDist( TRUE); + aBoxInfo.SetDist( sal_True); // set minimum size in tables and paragraphs - aBoxInfo.SetMinDist( FALSE ); + aBoxInfo.SetMinDist( sal_False ); // always set default-gap aBoxInfo.SetDefDist( MIN_BORDER_DIST ); // Single lines can have DontCare-status only in tables - aBoxInfo.SetValid( VALID_DISABLE, TRUE ); + aBoxInfo.SetValid( VALID_DISABLE, sal_True ); pTblSet->Put( aBoxInfo ); SwGetCurColNumPara aPara; - const USHORT nNum = rSh.GetCurColNum( &aPara ); + const sal_uInt16 nNum = rSh.GetCurColNum( &aPara ); long nWidth; if( nNum ) @@ -722,11 +722,11 @@ IMPL_LINK( SwInsertDBColAutoPilot, TblFmtHdl, PushButton*, pButton ) long nWidth1 = 0, nStart1 = 0, nEnd1 = nWidth; - for( USHORT i = 0; i < nNum; ++i ) + for( sal_uInt16 i = 0; i < nNum; ++i ) { SwColumn* pCol = rCols[i]; nStart1 = pCol->GetLeft() + nWidth1; - nWidth1 += (long)rCol.CalcColWidth( i, (USHORT)nWidth ); + nWidth1 += (long)rCol.CalcColWidth( i, (sal_uInt16)nWidth ); nEnd1 = nWidth1 - pCol->GetRight(); } if(nStart1 || nEnd1 != nWidth) @@ -734,14 +734,14 @@ IMPL_LINK( SwInsertDBColAutoPilot, TblFmtHdl, PushButton*, pButton ) } else nWidth = rSh.GetAnyCurRect( - FRMTYPE_FLY_ANY & rSh.GetFrmType( 0, TRUE ) + FRMTYPE_FLY_ANY & rSh.GetFrmType( 0, sal_True ) ? RECT_FLY_PRT_EMBEDDED : RECT_PAGE_PRT ).Width(); SwTabCols aTabCols; aTabCols.SetRight( nWidth ); aTabCols.SetRightMax( nWidth ); - pRep = new SwTableRep( aTabCols, FALSE ); + pRep = new SwTableRep( aTabCols, sal_False ); pRep->SetAlign( text::HoriOrientation::NONE ); pRep->SetSpace( nWidth ); pRep->SetWidth( nWidth ); @@ -756,18 +756,18 @@ IMPL_LINK( SwInsertDBColAutoPilot, TblFmtHdl, PushButton*, pButton ) { // Number of columns has changed: then the TabCols have to be adjusted long nWidth = pRep->GetWidth(); - USHORT nCols = aLbTableCol.GetEntryCount() - 1; + sal_uInt16 nCols = aLbTableCol.GetEntryCount() - 1; SwTabCols aTabCols( nCols ); aTabCols.SetRight( nWidth ); aTabCols.SetRightMax( nWidth ); if( nCols ) - for( USHORT n = 0, nStep = (USHORT)(nWidth / (nCols+1)), nW = nStep; + for( sal_uInt16 n = 0, nStep = (sal_uInt16)(nWidth / (nCols+1)), nW = nStep; n < nCols; ++n, nW = nW + nStep ) { - aTabCols.Insert( nW, FALSE, n ); + aTabCols.Insert( nW, sal_False, n ); } delete pRep; - pRep = new SwTableRep( aTabCols, FALSE ); + pRep = new SwTableRep( aTabCols, sal_False ); pRep->SetAlign( text::HoriOrientation::NONE ); pRep->SetSpace( nWidth ); pRep->SetWidth( nWidth ); @@ -797,7 +797,7 @@ IMPL_LINK( SwInsertDBColAutoPilot, AutoFmtHdl, PushButton*, pButton ) SwAbstractDialogFactory* pFact = swui::GetFactory(); OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!"); - AbstractSwAutoFormatDlg* pDlg = pFact->CreateSwAutoFormatDlg(pButton, pView->GetWrtShellPtr(),DLG_AUTOFMT_TABLE, FALSE, pTAutoFmt); + AbstractSwAutoFormatDlg* pDlg = pFact->CreateSwAutoFormatDlg(pButton, pView->GetWrtShellPtr(),DLG_AUTOFMT_TABLE, sal_False, pTAutoFmt); OSL_ENSURE(pDlg, "Dialogdiet fail!"); if( RET_OK == pDlg->Execute()) pDlg->FillAutoFmtOfIndex( pTAutoFmt ); @@ -815,7 +815,7 @@ IMPL_LINK( SwInsertDBColAutoPilot, SelectHdl, ListBox*, pBox ) : &aLbTxtDbColumn ) : pBox; - USHORT nFndPos; + sal_uInt16 nFndPos; SwInsDBColumn aSrch( pGetBox->GetSelectEntry(), 0 ); aDBColumns.Seek_Entry( &aSrch, &nFndPos ); @@ -834,13 +834,13 @@ IMPL_LINK( SwInsertDBColAutoPilot, SelectHdl, ListBox*, pBox ) String sTxt( aFlFormat.GetText().Copy( 0, nGBFmtLen )); if( !aSrch.sColumn.getLength() ) { - aRbDbFmtFromDb.Enable( FALSE ); - aRbDbFmtFromUsr.Enable( FALSE ); - aLbDbFmtFromUsr.Enable( FALSE ); + aRbDbFmtFromDb.Enable( sal_False ); + aRbDbFmtFromUsr.Enable( sal_False ); + aLbDbFmtFromUsr.Enable( sal_False ); } else { - BOOL bEnableFmt = aDBColumns[ nFndPos ]->bHasFmt; + sal_Bool bEnableFmt = aDBColumns[ nFndPos ]->bHasFmt; aRbDbFmtFromDb.Enable( bEnableFmt ); aRbDbFmtFromUsr.Enable( bEnableFmt ); @@ -849,7 +849,7 @@ IMPL_LINK( SwInsertDBColAutoPilot, SelectHdl, ListBox*, pBox ) (( sTxt += C2S(" (" )) += String(aSrch.sColumn) ) += (sal_Unicode)')'; } - BOOL bIsDBFmt = aDBColumns[ nFndPos ]->bIsDBFmt; + sal_Bool bIsDBFmt = aDBColumns[ nFndPos ]->bIsDBFmt; aRbDbFmtFromDb.Check( bIsDBFmt ); aRbDbFmtFromUsr.Check( !bIsDBFmt ); aLbDbFmtFromUsr.Enable( !bIsDBFmt ); @@ -871,7 +871,7 @@ IMPL_LINK( SwInsertDBColAutoPilot, HeaderHdl, Button*, pButton ) { if( pButton == &aCbTableHeadon ) { - BOOL bEnable = aCbTableHeadon.IsChecked(); + sal_Bool bEnable = aCbTableHeadon.IsChecked(); aRbHeadlColnms.Enable( bEnable ); aRbHeadlEmpty.Enable( bEnable ); @@ -882,7 +882,7 @@ IMPL_LINK( SwInsertDBColAutoPilot, HeaderHdl, Button*, pButton ) static void lcl_InsTextInArr( const String& rTxt, _DB_Columns& rColArr ) { _DB_Column* pNew; - USHORT nSttPos = 0, nFndPos; + sal_uInt16 nSttPos = 0, nFndPos; while( STRING_NOTFOUND != ( nFndPos = rTxt.Search( '\x0A', nSttPos )) ) { if( 1 < nFndPos ) @@ -901,15 +901,15 @@ static void lcl_InsTextInArr( const String& rTxt, _DB_Columns& rColArr ) } } -BOOL SwInsertDBColAutoPilot::SplitTextToColArr( const String& rTxt, +sal_Bool SwInsertDBColAutoPilot::SplitTextToColArr( const String& rTxt, _DB_Columns& rColArr, - BOOL bInsField ) + sal_Bool bInsField ) { // create each of the database columns from the text again // and then save in an array // database columns are in <> and must be present in the columns' array: String sTxt( rTxt ); - USHORT nFndPos, nEndPos, nSttPos = 0; + sal_uInt16 nFndPos, nEndPos, nSttPos = 0; while( STRING_NOTFOUND != ( nFndPos = sTxt.Search( cDBFldStart, nSttPos ))) { @@ -935,8 +935,8 @@ BOOL SwInsertDBColAutoPilot::SplitTextToColArr( const String& rTxt, sTxt.Erase( 0, (xub_StrLen)(rFndCol.sColumn.getLength() + 2) ); nSttPos = 0; - USHORT nSubType = 0; - ULONG nFormat; + sal_uInt16 nSubType = 0; + sal_uLong nFormat; if( rFndCol.bHasFmt ) { if( rFndCol.bIsDBFmt ) @@ -985,7 +985,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection, SwWrtShell& rSh = pView->GetWrtShell(); //with the drag and drop interface no result set is initially available - BOOL bDisposeResultSet = FALSE; + sal_Bool bDisposeResultSet = sal_False; // we don't have a cursor, so we have to create our own RowSet if ( !xResultSet.is() ) { @@ -998,11 +998,11 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection, return; rSh.StartAllAction(); - BOOL bUndo = rSh.DoesUndo(); + sal_Bool bUndo = rSh.DoesUndo(); if( bUndo ) rSh.StartUndo( UNDO_EMPTY ); - BOOL bAsTable = aRbAsTable.IsChecked(); + sal_Bool bAsTable = aRbAsTable.IsChecked(); SvNumberFormatter& rNumFmtr = *rSh.GetNumberFormatter(); if( rSh.HasSelection() ) @@ -1016,22 +1016,22 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection, do{ // middle checked loop!! if( bAsTable ) // Daten als Tabelle einfuegen { - rSh.DoUndo( FALSE ); + rSh.DoUndo( sal_False ); - USHORT n, nRows = 0, nCols = aLbTableCol.GetEntryCount(); + sal_uInt16 n, nRows = 0, nCols = aLbTableCol.GetEntryCount(); if( aCbTableHeadon.IsChecked() ) nRows++; if( pSelection ) - nRows = nRows + (USHORT)rSelection.getLength(); + nRows = nRows + (sal_uInt16)rSelection.getLength(); else ++nRows; // prepare the array for the selected columns - SwInsDBColumns_SAR aColFlds( 255 >= nCols ? (BYTE)nCols : 255, 5 ); + SwInsDBColumns_SAR aColFlds( 255 >= nCols ? (sal_uInt8)nCols : 255, 5 ); for( n = 0; n < nCols; ++n ) { - USHORT nFndPos; + sal_uInt16 nFndPos; SwInsDBColumn aSrch( aLbTableCol.GetEntry( n ), 0 ); if( aDBColumns.Seek_Entry( &aSrch, &nFndPos ) ) aColFlds.Insert( aDBColumns[ nFndPos ], n ); @@ -1054,7 +1054,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection, const SwModuleOptions* pModOpt = SW_MOD()->GetModuleConfig(); - BOOL bHTML = 0 != (::GetHtmlMode( pView->GetDocShell() ) & HTMLMODE_ON); + sal_Bool bHTML = 0 != (::GetHtmlMode( pView->GetDocShell() ) & HTMLMODE_ON); rSh.InsertTable( pModOpt->GetInsTblFlags(bHTML), nRows, nCols, text::HoriOrientation::FULL, (pSelection ? pTAutoFmt : 0) ); @@ -1065,8 +1065,8 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection, SfxItemSet aTblSet( rSh.GetAttrPool(), RES_BOXATR_FORMAT, RES_BOXATR_VALUE ); - BOOL bIsAutoUpdateCells = rSh.IsAutoUpdateCells(); - rSh.SetAutoUpdateCells( FALSE ); + sal_Bool bIsAutoUpdateCells = rSh.IsAutoUpdateCells(); + rSh.SetAutoUpdateCells( sal_False ); if( aCbTableHeadon.IsChecked() ) @@ -1085,7 +1085,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection, for( sal_Int32 i = 0 ; ; ++i ) { - BOOL bBreak = FALSE; + sal_Bool bBreak = sal_False; try { if(pSelection) @@ -1099,7 +1099,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection, } catch(const Exception& ) { - bBreak = TRUE; + bBreak = sal_True; } if(bBreak) break; @@ -1198,7 +1198,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection, break; if( 10 == i ) - pWait = ::std::auto_ptr<SwWait>(new SwWait( *pView->GetDocShell(), TRUE )); + pWait = ::std::auto_ptr<SwWait>(new SwWait( *pView->GetDocShell(), sal_True )); } rSh.MoveTable( GetfnTableCurr(), GetfnTableStart() ); @@ -1228,7 +1228,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection, rSh.SwCrsrShell::Left(1,CRSR_SKIP_CHARS); } - rSh.DoUndo( FALSE ); + rSh.DoUndo( sal_False ); SwTxtFmtColl* pColl = 0; { @@ -1238,7 +1238,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection, pColl = rSh.FindTxtFmtCollByName( sTmplNm ); if( !pColl ) { - USHORT nId = SwStyleNameMapper::GetPoolIdFromUIName( sTmplNm, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL ); + sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName( sTmplNm, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL ); if( USHRT_MAX != nId ) pColl = rSh.GetTxtCollFromPool( nId ); else @@ -1282,12 +1282,12 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection, C2S("1"), aEmptyStr, aDBData ); - BOOL bSetCrsr = TRUE; - USHORT n = 0, nCols = aColArr.Count(); + sal_Bool bSetCrsr = sal_True; + sal_uInt16 n = 0, nCols = aColArr.Count(); ::sw::mark::IMark* pMark = NULL; for( sal_Int32 i = 0 ; ; ++i ) { - BOOL bBreak = FALSE; + sal_Bool bBreak = sal_False; try { if(pSelection) @@ -1301,7 +1301,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection, } catch(Exception&) { - bBreak = TRUE; + bBreak = sal_True; } if(bBreak) @@ -1355,7 +1355,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection, if(aStandard != aCompare) nValue += (aStandard - aCompare); } - pFld->ChgValue( nValue, TRUE ); + pFld->ChgValue( nValue, sal_True ); } pFld->SetInitialized(); @@ -1408,13 +1408,13 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection, ::rtl::OUString(), IDocumentMarkAccess::UNO_BOOKMARK ); rSh.SwCrsrShell::MovePara( GetfnParaCurr(), GetfnParaEnd() ); - bSetCrsr = FALSE; + bSetCrsr = sal_False; } } if( !pSelection ) { - BOOL bNext = xResultSet->next(); + sal_Bool bNext = xResultSet->next(); if(!bNext) break; } @@ -1428,7 +1428,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection, rSh.SwEditShell::SplitNode(); if( 10 == i ) - pWait = ::std::auto_ptr<SwWait>(new SwWait( *pView->GetDocShell(), TRUE )); + pWait = ::std::auto_ptr<SwWait>(new SwWait( *pView->GetDocShell(), sal_True )); } if( !bSetCrsr && pMark != NULL) @@ -1442,11 +1442,11 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection, } // write configuration Commit(); - }while( FALSE ); // middle checked loop + }while( sal_False ); // middle checked loop if( bUndo ) { - rSh.DoUndo( TRUE ); + rSh.DoUndo( sal_True ); rSh.AppendUndoForInsertFromDB( bAsTable ); rSh.EndUndo( UNDO_EMPTY ); } @@ -1481,15 +1481,15 @@ void SwInsertDBColAutoPilot::SetTabSet() { // remove the defaults again, it makes no sense to set them SvxBrushItem aBrush( RES_BACKGROUND ); - static USHORT const aIds[3] = + static sal_uInt16 aIds[3] = { RES_BACKGROUND, SID_ATTR_BRUSH_ROW, SID_ATTR_BRUSH_TABLE }; for( int i = 0; i < 3; ++i ) if( SFX_ITEM_SET == pTblSet->GetItemState( aIds[ i ], - FALSE, &pItem ) && *pItem == aBrush ) + sal_False, &pItem ) && *pItem == aBrush ) pTblSet->ClearItem( aIds[ i ] ); } - if( SFX_ITEM_SET == pTblSet->GetItemState( FN_PARAM_TABLE_NAME, FALSE, + if( SFX_ITEM_SET == pTblSet->GetItemState( FN_PARAM_TABLE_NAME, sal_False, &pItem ) && ((const SfxStringItem*)pItem)->GetValue() == rSh.GetTableFmt()->GetName() ) pTblSet->ClearItem( FN_PARAM_TABLE_NAME ); @@ -1630,7 +1630,7 @@ void SwInsertDBColAutoPilot::Commit() pValues[3].Value <<= rtl::OUString(aEdDbText.GetText()); String sTmp; - for( USHORT n = 0, nCnt = aLbTableCol.GetEntryCount(); n < nCnt; ++n ) + for( sal_uInt16 n = 0, nCnt = aLbTableCol.GetEntryCount(); n < nCnt; ++n ) ( sTmp += aLbTableCol.GetEntry( n ) ) += '\x0a'; if( sTmp.Len() ) @@ -1664,7 +1664,7 @@ void SwInsertDBColAutoPilot::Commit() rtl::OUString sPrevLang; SvNumberFormatter& rNFmtr = *pView->GetWrtShell().GetNumberFormatter(); - for(USHORT nCol = 0; nCol < aDBColumns.Count(); nCol++) + for(sal_uInt16 nCol = 0; nCol < aDBColumns.Count(); nCol++) { rtl::OUString sColumnNode = sNewNode; SwInsDBColumn* pColumn = aDBColumns[nCol]; @@ -1773,7 +1773,7 @@ void SwInsertDBColAutoPilot::Load() sal_Bool bFound = sal_False; for(sal_Int32 nRealColumn = 0; nRealColumn < aDBColumns.Count(); nRealColumn++) { - if(aDBColumns[(USHORT)nRealColumn]->sColumn == sColumn) + if(aDBColumns[(sal_uInt16)nRealColumn]->sColumn == sColumn) { bFound = sal_True; break; @@ -1804,7 +1804,7 @@ void SwInsertDBColAutoPilot::Load() pNewData->aDBColumns.Insert(pInsDBColumn); } - USHORT n = 0; + sal_uInt16 n = 0; String sTmp( pNewData->sTblList ); if( sTmp.Len() ) { @@ -1820,11 +1820,11 @@ void SwInsertDBColAutoPilot::Load() if( !aLbTblDbColumn.GetEntryCount() ) { - aIbDbcolAllTo.Enable( FALSE ); - aIbDbcolOneTo.Enable( FALSE ); + aIbDbcolAllTo.Enable( sal_False ); + aIbDbcolOneTo.Enable( sal_False ); } - aIbDbcolOneFrom.Enable( TRUE ); - aIbDbcolAllFrom.Enable( TRUE ); + aIbDbcolOneFrom.Enable( sal_True ); + aIbDbcolAllFrom.Enable( sal_True ); } aEdDbText.SetText( pNewData->sEdit ); @@ -1842,7 +1842,7 @@ void SwInsertDBColAutoPilot::Load() // then load the AutoFmt file and look for Autoformat first SwTableAutoFmtTbl aAutoFmtTbl; aAutoFmtTbl.Load(); - for( USHORT nAutoFmt = aAutoFmtTbl.Count(); nAutoFmt; ) + for( sal_uInt16 nAutoFmt = aAutoFmtTbl.Count(); nAutoFmt; ) if( sTmp == aAutoFmtTbl[ --nAutoFmt ]->GetName() ) { pTAutoFmt = new SwTableAutoFmt( *aAutoFmtTbl[ nAutoFmt ] ); @@ -1864,14 +1864,14 @@ void SwInsertDBColAutoPilot::Load() for( n = 0; n < aDBColumns.Count() ; ++n ) { SwInsDBColumn& rSet = *aDBColumns[ n ]; - for( USHORT m = 0; m < pNewData->aDBColumns.Count() ; ++m ) + for( sal_uInt16 m = 0; m < pNewData->aDBColumns.Count() ; ++m ) { SwInsDBColumn& rGet = *pNewData->aDBColumns[ m ]; if(rGet.sColumn == rSet.sColumn) { if( rGet.bHasFmt && !rGet.bIsDBFmt ) { - rSet.bIsDBFmt = FALSE; + rSet.bIsDBFmt = sal_False; rSet.nUsrNumFmt = rNFmtr.GetEntryKey( rGet.sUsrNumFmt, rGet.eUsrNumFmtLng ); if( NUMBERFORMAT_ENTRY_NOT_FOUND == rSet.nUsrNumFmt ) @@ -1891,7 +1891,7 @@ void SwInsertDBColAutoPilot::Load() // when the cursor is inside of a table, table must NEVER be selectable if( !aRbAsTable.IsEnabled() && aRbAsTable.IsChecked() ) - aRbAsField.Check( TRUE ); + aRbAsField.Check( sal_True ); delete pNewData; break; } diff --git a/sw/source/ui/dbui/dbinsdlg.src b/sw/source/ui/dbui/dbinsdlg.src index d08305dde1..5a3292d1d0 100644 --- a/sw/source/ui/dbui/dbinsdlg.src +++ b/sw/source/ui/dbui/dbinsdlg.src @@ -46,6 +46,7 @@ ModalDialog DLG_AP_INSERT_DB_SEL }; RadioButton RB_AS_TABLE { + HelpID = "sw:RadioButton:DLG_AP_INSERT_DB_SEL:RB_AS_TABLE"; Pos = MAP_APPFONT ( 80 , 6 ) ; Size = MAP_APPFONT ( 60 , 10 ) ; TabStop = TRUE ; @@ -54,6 +55,7 @@ ModalDialog DLG_AP_INSERT_DB_SEL }; RadioButton RB_AS_FIELD { + HelpID = "sw:RadioButton:DLG_AP_INSERT_DB_SEL:RB_AS_FIELD"; Pos = MAP_APPFONT ( 145 , 6 ) ; Size = MAP_APPFONT ( 60 , 10 ) ; TabStop = TRUE ; @@ -61,6 +63,7 @@ ModalDialog DLG_AP_INSERT_DB_SEL }; RadioButton RB_AS_TEXT { + HelpID = "sw:RadioButton:DLG_AP_INSERT_DB_SEL:RB_AS_TEXT"; Pos = MAP_APPFONT ( 210 , 6 ) ; Size = MAP_APPFONT ( 60 , 10 ) ; TabStop = TRUE ; @@ -106,6 +109,7 @@ ModalDialog DLG_AP_INSERT_DB_SEL }; RadioButton RB_DBFMT_FROM_DB { + HelpID = "sw:RadioButton:DLG_AP_INSERT_DB_SEL:RB_DBFMT_FROM_DB"; Pos = MAP_APPFONT ( 15 , 128 ) ; Size = MAP_APPFONT ( 90 , 10 ) ; TabStop = TRUE ; @@ -114,12 +118,14 @@ ModalDialog DLG_AP_INSERT_DB_SEL }; RadioButton RB_DBFMT_FROM_USR { + HelpID = "sw:RadioButton:DLG_AP_INSERT_DB_SEL:RB_DBFMT_FROM_USR"; Pos = MAP_APPFONT ( 15 , 143 ) ; Size = MAP_APPFONT ( 10 , 10 ) ; TabStop = TRUE ; }; ListBox LB_DBFMT_FROM_USR { + HelpID = "sw:ListBox:DLG_AP_INSERT_DB_SEL:LB_DBFMT_FROM_USR"; Border = TRUE ; Pos = MAP_APPFONT ( 30 , 142 ) ; Size = MAP_APPFONT ( 75 , 44 ) ; @@ -130,6 +136,7 @@ ModalDialog DLG_AP_INSERT_DB_SEL /* -------------- Page Text / Fields -------------------------------- */ ListBox LB_TXT_DB_COLUMN { + HelpID = "sw:ListBox:DLG_AP_INSERT_DB_SEL:LB_TXT_DB_COLUMN"; Border = TRUE ; Pos = MAP_APPFONT ( 12 , 41 ) ; Size = MAP_APPFONT ( 93 , 70 ) ; @@ -138,6 +145,7 @@ ModalDialog DLG_AP_INSERT_DB_SEL }; ImageButton IB_DBCOL_TOEDIT { + HelpID = "sw:ImageButton:DLG_AP_INSERT_DB_SEL:IB_DBCOL_TOEDIT"; Pos = MAP_APPFONT ( 111 , 41 ) ; Size = MAP_APPFONT ( 20 , 12 ) ; TabStop = TRUE ; @@ -153,6 +161,7 @@ ModalDialog DLG_AP_INSERT_DB_SEL }; MultiLineEdit ED_DB_TEXT { + HelpID = "sw:MultiLineEdit:DLG_AP_INSERT_DB_SEL:ED_DB_TEXT"; Border = TRUE ; Pos = MAP_APPFONT ( 137 , 41 ) ; Size = MAP_APPFONT ( 142 , 70 ) ; @@ -172,6 +181,7 @@ ModalDialog DLG_AP_INSERT_DB_SEL }; ListBox LB_DB_PARA_COLL { + HelpID = "sw:ListBox:DLG_AP_INSERT_DB_SEL:LB_DB_PARA_COLL"; Border = TRUE ; Pos = MAP_APPFONT ( 182 , 127 ) ; Size = MAP_APPFONT ( 97 , 59 ) ; @@ -183,6 +193,7 @@ ModalDialog DLG_AP_INSERT_DB_SEL /* -------------- Page Table ---------------------------------------- */ ListBox LB_TBL_DB_COLUMN { + HelpID = "sw:ListBox:DLG_AP_INSERT_DB_SEL:LB_TBL_DB_COLUMN"; Border = TRUE ; Pos = MAP_APPFONT ( 12 , 41 ) ; Size = MAP_APPFONT ( 93 , 70 ) ; @@ -190,6 +201,7 @@ ModalDialog DLG_AP_INSERT_DB_SEL }; ImageButton IB_DBCOL_ALL_TO { + HelpID = "sw:ImageButton:DLG_AP_INSERT_DB_SEL:IB_DBCOL_ALL_TO"; Pos = MAP_APPFONT ( 111 , 41 ) ; Size = MAP_APPFONT ( 20 , 12 ) ; TabStop = TRUE ; @@ -204,6 +216,7 @@ ModalDialog DLG_AP_INSERT_DB_SEL }; ImageButton IB_DBCOL_ONE_TO { + HelpID = "sw:ImageButton:DLG_AP_INSERT_DB_SEL:IB_DBCOL_ONE_TO"; Pos = MAP_APPFONT ( 111 , 56 ) ; Size = MAP_APPFONT ( 20 , 12 ) ; TabStop = TRUE ; @@ -218,6 +231,7 @@ ModalDialog DLG_AP_INSERT_DB_SEL }; ImageButton IB_DBCOL_ONE_FROM { + HelpID = "sw:ImageButton:DLG_AP_INSERT_DB_SEL:IB_DBCOL_ONE_FROM"; Pos = MAP_APPFONT ( 111 , 84 ) ; Size = MAP_APPFONT ( 20 , 12 ) ; TabStop = TRUE ; @@ -232,6 +246,7 @@ ModalDialog DLG_AP_INSERT_DB_SEL }; ImageButton IB_DBCOL_ALL_FROM { + HelpID = "sw:ImageButton:DLG_AP_INSERT_DB_SEL:IB_DBCOL_ALL_FROM"; Pos = MAP_APPFONT ( 111 , 99 ) ; Size = MAP_APPFONT ( 20 , 12 ) ; TabStop = TRUE ; @@ -253,6 +268,7 @@ ModalDialog DLG_AP_INSERT_DB_SEL }; ListBox LB_TABLE_COL { + HelpID = "sw:ListBox:DLG_AP_INSERT_DB_SEL:LB_TABLE_COL"; Border = TRUE ; Pos = MAP_APPFONT ( 137 , 41 ) ; Size = MAP_APPFONT ( 75 , 70 ) ; @@ -265,6 +281,7 @@ ModalDialog DLG_AP_INSERT_DB_SEL }; CheckBox CB_TABLE_HEADON { + HelpID = "sw:CheckBox:DLG_AP_INSERT_DB_SEL:CB_TABLE_HEADON"; Pos = MAP_APPFONT ( 111 , 128 ) ; Size = MAP_APPFONT ( 100 , 10 ) ; TabStop = TRUE ; @@ -273,6 +290,7 @@ ModalDialog DLG_AP_INSERT_DB_SEL }; RadioButton RB_HEADL_COLNMS { + HelpID = "sw:RadioButton:DLG_AP_INSERT_DB_SEL:RB_HEADL_COLNMS"; Pos = MAP_APPFONT ( 120 , 142 ) ; Size = MAP_APPFONT ( 90 , 10 ) ; TabStop = TRUE ; @@ -281,6 +299,7 @@ ModalDialog DLG_AP_INSERT_DB_SEL }; RadioButton RB_HEADL_EMPTY { + HelpID = "sw:RadioButton:DLG_AP_INSERT_DB_SEL:RB_HEADL_EMPTY"; Pos = MAP_APPFONT ( 120 , 155 ) ; Size = MAP_APPFONT ( 90 , 10 ) ; TabStop = TRUE ; @@ -288,6 +307,7 @@ ModalDialog DLG_AP_INSERT_DB_SEL }; PushButton PB_TBL_FORMAT { + HelpID = "sw:PushButton:DLG_AP_INSERT_DB_SEL:PB_TBL_FORMAT"; Pos = MAP_APPFONT ( 214 , 128 ) ; Size = MAP_APPFONT ( 65 , 12 ) ; Text [ en-US ] = "Pr~operties..." ; @@ -295,6 +315,7 @@ ModalDialog DLG_AP_INSERT_DB_SEL }; PushButton PB_TBL_AUTOFMT { + HelpID = "sw:PushButton:DLG_AP_INSERT_DB_SEL:PB_TBL_AUTOFMT"; Pos = MAP_APPFONT ( 214 , 144 ) ; Size = MAP_APPFONT ( 65 , 12 ) ; TabStop = TRUE ; diff --git a/sw/source/ui/dbui/dbmgr.cxx b/sw/source/ui/dbui/dbmgr.cxx index f23f6b50bc..60a7aad83e 100644 --- a/sw/source/ui/dbui/dbmgr.cxx +++ b/sw/source/ui/dbui/dbmgr.cxx @@ -61,10 +61,8 @@ #include <unotools/tempfile.hxx> #include <unotools/pathoptions.hxx> #include <svl/urihelper.hxx> -#ifndef _SVSTDARR_HXX #define _SVSTDARR_STRINGSDTOR #include <svl/svstdarr.hxx> -#endif #include <svl/zforlist.hxx> #include <svl/zformat.hxx> #include <svl/stritem.hxx> @@ -85,7 +83,6 @@ #include <swundo.hxx> #include <flddat.hxx> #include <modcfg.hxx> -#include <swprtopt.hxx> #include <shellio.hxx> #include <dbui.hxx> #include <dbmgr.hxx> @@ -135,6 +132,7 @@ #include <memory> #include <vector> #include <unomid.h> +#include <section.hxx> using namespace ::osl; using namespace ::svx; @@ -270,9 +268,9 @@ void lcl_InitNumberFormatter(SwDSParam& rParam, uno::Reference<XDataSource> xSou } } -BOOL lcl_MoveAbsolute(SwDSParam* pParam, long nAbsPos) +sal_Bool lcl_MoveAbsolute(SwDSParam* pParam, long nAbsPos) { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; try { if(pParam->bScrollable) @@ -290,7 +288,7 @@ BOOL lcl_MoveAbsolute(SwDSParam* pParam, long nAbsPos) return bRet; } -BOOL lcl_GetColumnCnt(SwDSParam* pParam, +sal_Bool lcl_GetColumnCnt(SwDSParam* pParam, const String& rColumnName, long nLanguage, String& rResult, double* pNumber) { uno::Reference< XColumnsSupplier > xColsSupp( pParam->xResultSet, UNO_QUERY ); @@ -303,7 +301,7 @@ BOOL lcl_GetColumnCnt(SwDSParam* pParam, { } if(!xCols.is() || !xCols->hasByName(rColumnName)) - return FALSE; + return sal_False; Any aCol = xCols->getByName(rColumnName); uno::Reference< XPropertySet > xColumnProps; aCol >>= xColumnProps; @@ -321,13 +319,13 @@ BOOL lcl_GetColumnCnt(SwDSParam* pParam, MsLangId::convertLanguageToLocale( (LanguageType)nLanguage, aFormatData.aLocale ); rResult = SwNewDBMgr::GetDBField( xColumnProps, aFormatData, pNumber); - return TRUE; + return sal_True; }; /*-------------------------------------------------------------------- Description: import data --------------------------------------------------------------------*/ -BOOL SwNewDBMgr::MergeNew(const SwMergeDescriptor& rMergeDesc ) +sal_Bool SwNewDBMgr::MergeNew(const SwMergeDescriptor& rMergeDesc ) { SetMergeType( rMergeDesc.nMergeType ); @@ -352,11 +350,11 @@ BOOL SwNewDBMgr::MergeNew(const SwMergeDescriptor& rMergeDesc ) if(!aData.sDataSource.getLength() || !aData.sCommand.getLength() || !xResSet.is()) { - return FALSE; + return sal_False; } pImpl->pMergeData = new SwDSParam(aData, xResSet, aSelection); - SwDSParam* pTemp = FindDSData(aData, FALSE); + SwDSParam* pTemp = FindDSData(aData, sal_False); if(pTemp) *pTemp = *pImpl->pMergeData; else @@ -366,7 +364,7 @@ BOOL SwNewDBMgr::MergeNew(const SwMergeDescriptor& rMergeDesc ) //DSData and set the correct CommandType SwDBData aTempData(aData); aData.nCommandType = -1; - pTemp = FindDSData(aData, FALSE); + pTemp = FindDSData(aData, sal_False); if(pTemp) *pTemp = *pImpl->pMergeData; else @@ -397,7 +395,7 @@ BOOL SwNewDBMgr::MergeNew(const SwMergeDescriptor& rMergeDesc ) pImpl->pMergeData->bEndOfDB = !pImpl->pMergeData->xResultSet->absolute( nPos ); pImpl->pMergeData->CheckEndOfDB(); if(pImpl->pMergeData->nSelectionIndex >= pImpl->pMergeData->aSelection.getLength()) - pImpl->pMergeData->bEndOfDB = TRUE; + pImpl->pMergeData->bEndOfDB = sal_True; } else { @@ -407,7 +405,7 @@ BOOL SwNewDBMgr::MergeNew(const SwMergeDescriptor& rMergeDesc ) } catch(Exception&) { - pImpl->pMergeData->bEndOfDB = TRUE; + pImpl->pMergeData->bEndOfDB = sal_True; pImpl->pMergeData->CheckEndOfDB(); OSL_ENSURE(false, "exception in MergeNew()"); } @@ -417,7 +415,7 @@ BOOL SwNewDBMgr::MergeNew(const SwMergeDescriptor& rMergeDesc ) lcl_InitNumberFormatter(*pImpl->pMergeData, xSource); rMergeDesc.rSh.ChgDBData(aData); - bInMerge = TRUE; + bInMerge = sal_True; if (IsInitDBFields()) { @@ -431,10 +429,10 @@ BOOL SwNewDBMgr::MergeNew(const SwMergeDescriptor& rMergeDesc ) sDBName += DB_DELIM; sDBName += String::CreateFromInt32(aInsertData.nCommandType); rMergeDesc.rSh.ChangeDBFields( aDBNames, sDBName); - SetInitDBFields(FALSE); + SetInitDBFields(sal_False); } - BOOL bRet = TRUE; + sal_Bool bRet = sal_True; switch(rMergeDesc.nMergeType) { case DBMGR_MERGE: @@ -464,16 +462,16 @@ BOOL SwNewDBMgr::MergeNew(const SwMergeDescriptor& rMergeDesc ) /*-------------------------------------------------------------------- Description: import data --------------------------------------------------------------------*/ -BOOL SwNewDBMgr::Merge(SwWrtShell* pSh) +sal_Bool SwNewDBMgr::Merge(SwWrtShell* pSh) { pSh->StartAllAction(); - pSh->ViewShell::UpdateFlds(TRUE); + pSh->ViewShell::UpdateFlds(sal_True); pSh->SetModified(); pSh->EndAllAction(); - return TRUE; + return sal_True; } void SwNewDBMgr::ImportFromConnection( SwWrtShell* pSh ) @@ -483,8 +481,8 @@ void SwNewDBMgr::ImportFromConnection( SwWrtShell* pSh ) { pSh->StartAllAction(); pSh->StartUndo(UNDO_EMPTY); - BOOL bGroupUndo(pSh->DoesGroupUndo()); - pSh->DoGroupUndo(FALSE); + sal_Bool bGroupUndo(pSh->DoesGroupUndo()); + pSh->DoGroupUndo(sal_False); if( pSh->HasSelection() ) pSh->DelRight(); @@ -492,12 +490,12 @@ void SwNewDBMgr::ImportFromConnection( SwWrtShell* pSh ) SwWait *pWait = 0; { - ULONG i = 0; + sal_uLong i = 0; do { ImportDBEntry(pSh); if( 10 == ++i ) - pWait = new SwWait( *pSh->GetView().GetDocShell(), TRUE); + pWait = new SwWait( *pSh->GetView().GetDocShell(), sal_True); } while(ToNextMergeRecord()); } @@ -510,10 +508,10 @@ void SwNewDBMgr::ImportFromConnection( SwWrtShell* pSh ) } } -String lcl_FindColumn(const String& sFormatStr,USHORT &nUsedPos, BYTE &nSeparator) +String lcl_FindColumn(const String& sFormatStr,sal_uInt16 &nUsedPos, sal_uInt8 &nSeparator) { String sReturn; - USHORT nLen = sFormatStr.Len(); + sal_uInt16 nLen = sFormatStr.Len(); nSeparator = 0xff; while(nUsedPos < nLen && nSeparator == 0xff) { @@ -548,13 +546,13 @@ void SwNewDBMgr::ImportDBEntry(SwWrtShell* pSh) uno::Reference< XColumnsSupplier > xColsSupp( pImpl->pMergeData->xResultSet, UNO_QUERY ); uno::Reference<XNameAccess> xCols = xColsSupp->getColumns(); String sFormatStr; - USHORT nFmtLen = sFormatStr.Len(); + sal_uInt16 nFmtLen = sFormatStr.Len(); if( nFmtLen ) { const char cSpace = ' '; const char cTab = '\t'; - USHORT nUsedPos = 0; - BYTE nSeparator; + sal_uInt16 nUsedPos = 0; + sal_uInt8 nSeparator; String sColumn = lcl_FindColumn(sFormatStr, nUsedPos, nSeparator); while( sColumn.Len() ) { @@ -614,19 +612,20 @@ void SwNewDBMgr::ImportDBEntry(SwWrtShell* pSh) /*-------------------------------------------------------------------- Description: fill Listbox with tablelist --------------------------------------------------------------------*/ -BOOL SwNewDBMgr::GetTableNames(ListBox* pListBox, const String& rDBName) +sal_Bool SwNewDBMgr::GetTableNames(ListBox* pListBox, const String& rDBName) { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; String sOldTableName(pListBox->GetSelectEntry()); pListBox->Clear(); - SwDSParam* pParam = FindDSConnection(rDBName, FALSE); + SwDSParam* pParam = FindDSConnection(rDBName, sal_False); uno::Reference< XConnection> xConnection; if(pParam && pParam->xConnection.is()) xConnection = pParam->xConnection; else { rtl::OUString sDBName(rDBName); - xConnection = RegisterConnection( sDBName ); + if ( sDBName.getLength() ) + xConnection = RegisterConnection( sDBName ); } if(xConnection.is()) { @@ -638,7 +637,7 @@ BOOL SwNewDBMgr::GetTableNames(ListBox* pListBox, const String& rDBName) const rtl::OUString* pTbls = aTbls.getConstArray(); for(long i = 0; i < aTbls.getLength(); i++) { - USHORT nEntry = pListBox->InsertEntry(pTbls[i]); + sal_uInt16 nEntry = pListBox->InsertEntry(pTbls[i]); pListBox->SetEntryData(nEntry, (void*)0); } } @@ -650,13 +649,13 @@ BOOL SwNewDBMgr::GetTableNames(ListBox* pListBox, const String& rDBName) const rtl::OUString* pQueries = aQueries.getConstArray(); for(long i = 0; i < aQueries.getLength(); i++) { - USHORT nEntry = pListBox->InsertEntry(pQueries[i]); + sal_uInt16 nEntry = pListBox->InsertEntry(pQueries[i]); pListBox->SetEntryData(nEntry, (void*)1); } } if (sOldTableName.Len()) pListBox->SelectEntry(sOldTableName); - bRet = TRUE; + bRet = sal_True; } return bRet; } @@ -664,8 +663,8 @@ BOOL SwNewDBMgr::GetTableNames(ListBox* pListBox, const String& rDBName) /*-------------------------------------------------------------------- Description: fill Listbox with column names of a database --------------------------------------------------------------------*/ -BOOL SwNewDBMgr::GetColumnNames(ListBox* pListBox, - const String& rDBName, const String& rTableName, BOOL bAppend) +sal_Bool SwNewDBMgr::GetColumnNames(ListBox* pListBox, + const String& rDBName, const String& rTableName, sal_Bool bAppend) { if (!bAppend) pListBox->Clear(); @@ -673,7 +672,7 @@ BOOL SwNewDBMgr::GetColumnNames(ListBox* pListBox, aData.sDataSource = rDBName; aData.sCommand = rTableName; aData.nCommandType = -1; - SwDSParam* pParam = FindDSData(aData, FALSE); + SwDSParam* pParam = FindDSData(aData, sal_False); uno::Reference< XConnection> xConnection; if(pParam && pParam->xConnection.is()) xConnection = pParam->xConnection; @@ -694,12 +693,12 @@ BOOL SwNewDBMgr::GetColumnNames(ListBox* pListBox, } ::comphelper::disposeComponent( xColsSupp ); } - return(TRUE); + return(sal_True); } -BOOL SwNewDBMgr::GetColumnNames(ListBox* pListBox, +sal_Bool SwNewDBMgr::GetColumnNames(ListBox* pListBox, uno::Reference< XConnection> xConnection, - const String& rTableName, BOOL bAppend) + const String& rTableName, sal_Bool bAppend) { if (!bAppend) pListBox->Clear(); @@ -715,7 +714,7 @@ BOOL SwNewDBMgr::GetColumnNames(ListBox* pListBox, } ::comphelper::disposeComponent( xColsSupp ); } - return(TRUE); + return(sal_True); } /*-------------------------------------------------------------------- @@ -723,10 +722,10 @@ BOOL SwNewDBMgr::GetColumnNames(ListBox* pListBox, --------------------------------------------------------------------*/ SwNewDBMgr::SwNewDBMgr() : nMergeType(DBMGR_INSERT), - bInitDBFields(FALSE), - bInMerge(FALSE), - bMergeSilent(FALSE), - bMergeLock(FALSE), + bInitDBFields(sal_False), + bInMerge(sal_False), + bMergeSilent(sal_False), + bMergeLock(sal_False), pImpl(new SwNewDBMgr_Impl(*this)), pMergeEvtSrc(NULL) { @@ -734,7 +733,7 @@ SwNewDBMgr::SwNewDBMgr() : SwNewDBMgr::~SwNewDBMgr() { - for(USHORT nPos = 0; nPos < aDataSourceParams.Count(); nPos++) + for(sal_uInt16 nPos = 0; nPos < aDataSourceParams.Count(); nPos++) { SwDSParam* pParam = aDataSourceParams[nPos]; if(pParam->xConnection.is()) @@ -757,7 +756,7 @@ SwNewDBMgr::~SwNewDBMgr() /*-------------------------------------------------------------------- Description: save bulk letters as single documents --------------------------------------------------------------------*/ -String lcl_FindUniqueName(SwWrtShell* pTargetShell, const String& rStartingPageDesc, ULONG nDocNo ) +String lcl_FindUniqueName(SwWrtShell* pTargetShell, const String& rStartingPageDesc, sal_uLong nDocNo ) { do { @@ -771,7 +770,7 @@ String lcl_FindUniqueName(SwWrtShell* pTargetShell, const String& rStartingPageD void lcl_CopyDynamicDefaults( const SwDoc& rSource, SwDoc& rTarget ) { - USHORT aRangeOfDefaults[] = { + sal_uInt16 aRangeOfDefaults[] = { RES_FRMATR_BEGIN, RES_FRMATR_END-1, RES_CHRATR_BEGIN, RES_CHRATR_END-1, RES_PARATR_BEGIN, RES_PARATR_END-1, @@ -782,8 +781,8 @@ void lcl_CopyDynamicDefaults( const SwDoc& rSource, SwDoc& rTarget ) SfxItemSet aNewDefaults( rTarget.GetAttrPool(), aRangeOfDefaults ); - USHORT nWhich; - USHORT nRange = 0; + sal_uInt16 nWhich; + sal_uInt16 nRange = 0; while( aRangeOfDefaults[nRange] != 0) { for( nWhich = aRangeOfDefaults[nRange]; nWhich < aRangeOfDefaults[nRange + 1]; ++nWhich ) @@ -802,7 +801,7 @@ void lcl_CopyFollowPageDesc( SwWrtShell& rTargetShell, const SwPageDesc& rSourcePageDesc, const SwPageDesc& rTargetPageDesc, - const ULONG nDocNo ) + const sal_uLong nDocNo ) { //now copy the follow page desc, too const SwPageDesc* pFollowPageDesc = rSourcePageDesc.GetFollow(); @@ -821,13 +820,30 @@ void lcl_CopyFollowPageDesc( } } -BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell, +void lcl_RemoveSectionLinks( SwWrtShell& rWorkShell ) +{ + //reset all links of the sections of synchronized labels + sal_uInt16 nSections = rWorkShell.GetSectionFmtCount(); + for( sal_uInt16 nSection = 0; nSection < nSections; ++nSection ) + { + SwSectionData aSectionData( *rWorkShell.GetSectionFmt( nSection ).GetSection() ); + if( aSectionData.GetType() == FILE_LINK_SECTION ) + { + aSectionData.SetType( CONTENT_SECTION ); + aSectionData.SetLinkFileName( String() ); + rWorkShell.UpdateSection( nSection, aSectionData ); + } + } + rWorkShell.SetLabelDoc( sal_False ); +} + +sal_Bool SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell, const SwMergeDescriptor& rMergeDescriptor) { //check if the doc is synchronized and contains at least one linked section - BOOL bSynchronizedDoc = pSourceShell->IsLabelDoc() && pSourceShell->GetSectionFmtCount() > 1; - BOOL bLoop = TRUE; - BOOL bEMail = rMergeDescriptor.nMergeType == DBMGR_MERGE_MAILING; + sal_Bool bSynchronizedDoc = pSourceShell->IsLabelDoc() && pSourceShell->GetSectionFmtCount() > 1; + sal_Bool bLoop = sal_True; + sal_Bool bEMail = rMergeDescriptor.nMergeType == DBMGR_MERGE_MAILING; const bool bAsSingleFile = rMergeDescriptor.nMergeType == DBMGR_MERGE_SINGLE_FILE; ::rtl::Reference< MailDispatcher > xMailDispatcher; @@ -852,14 +868,14 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell, uno::Reference< XPropertySet > xColumnProp; { - BOOL bColumnName = sEMailAddrFld.Len() > 0; + sal_Bool bColumnName = sEMailAddrFld.Len() > 0; if (bColumnName) { uno::Reference< XColumnsSupplier > xColsSupp( pImpl->pMergeData->xResultSet, UNO_QUERY ); uno::Reference<XNameAccess> xCols = xColsSupp->getColumns(); if(!xCols->hasByName(sEMailAddrFld)) - return FALSE; + return sal_False; Any aCol = xCols->getByName(sEMailAddrFld); aCol >>= xColumnProp; } @@ -895,16 +911,20 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell, pStoreToFilterOptions = &rMergeDescriptor.sSaveToFilterOptions; } } - bCancel = FALSE; + bCancel = sal_False; // in case of creating a single resulting file this has to be created here SwWrtShell* pTargetShell = 0; - SfxObjectShellRef xTargetDocShell; + + // the shell will be explicitly closed at the end of the method, but it is + // still more safe to use SfxObjectShellLock here + SfxObjectShellLock xTargetDocShell; + SwView* pTargetView = 0; std::auto_ptr< utl::TempFile > aTempFile; String sModifiedStartingPageDesc; String sStartingPageDesc; - USHORT nStartingPageNo = 0; + sal_uInt16 nStartingPageNo = 0; bool bPageStylesWithHeaderFooter = false; if(bAsSingleFile || rMergeDescriptor.bCreateSingleFile) { @@ -928,7 +948,7 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell, pTargetView->GetDocShell()->LoadStylesFromFile( sSourceDocumentURL, aOpt, sal_True ); //determine the page style and number used at the start of the source document - pSourceShell->SttEndDoc(TRUE); + pSourceShell->SttEndDoc(sal_True); nStartingPageNo = pSourceShell->GetVirtPageNum(); sStartingPageDesc = sModifiedStartingPageDesc = pSourceShell->GetPageDesc( pSourceShell->GetCurPageDesc()).GetName(); @@ -958,10 +978,10 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell, SfxViewFrame* pViewFrm = SfxViewFrame::GetFirst(pSourrceDocSh); while (pViewFrm) { - pViewFrm->GetDispatcher()->Lock(TRUE); + pViewFrm->GetDispatcher()->Lock(sal_True); pViewFrm = SfxViewFrame::GetNext(*pViewFrm, pSourrceDocSh); } - ULONG nDocNo = 1; + sal_uLong nDocNo = 1; long nStartRow, nEndRow; // collect temporary files @@ -1007,8 +1027,8 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell, if( !aTempFile->IsValid() ) { ErrorHandler::HandleError( ERRCODE_IO_NOTSUPPORTED ); - bLoop = FALSE; - bCancel = TRUE; + bLoop = sal_False; + bCancel = sal_True; } else { @@ -1020,12 +1040,13 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell, aPrtMonDlg.aPrintInfo.SetText(sStat); // computation time for Save-Monitor: - for (USHORT i = 0; i < 10; i++) + for (sal_uInt16 i = 0; i < 10; i++) Application::Reschedule(); - // create and save new document - SfxObjectShellRef xWorkDocSh( new SwDocShell( SFX_CREATE_MODE_INTERNAL )); - SfxMedium* pWorkMed = new SfxMedium( sSourceDocumentURL, STREAM_STD_READ, TRUE ); + // Create and save new document + // The SfxObjectShell will be closed explicitly later but it is more safe to use SfxObjectShellLock here + SfxObjectShellLock xWorkDocSh( new SwDocShell( SFX_CREATE_MODE_INTERNAL )); + SfxMedium* pWorkMed = new SfxMedium( sSourceDocumentURL, STREAM_STD_READ, sal_True ); pWorkMed->SetFilter( pSfxFlt ); if (xWorkDocSh->DoLoad(pWorkMed)) @@ -1060,12 +1081,16 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell, // copy created file into the target document rWorkShell.ConvertFieldsToText(); rWorkShell.SetNumberingRestart(); + if( bSynchronizedDoc ) + { + lcl_RemoveSectionLinks( rWorkShell ); + } // insert the document into the target document - rWorkShell.SttEndDoc(FALSE); - rWorkShell.SttEndDoc(TRUE); + rWorkShell.SttEndDoc(sal_False); + rWorkShell.SttEndDoc(sal_True); rWorkShell.SelAll(); - pTargetShell->SwCrsrShell::SttEndDoc( FALSE ); + pTargetShell->SwCrsrShell::SttEndDoc( sal_False ); //#i72517# the headers and footers are still those from the source - update in case of fields inside header/footer if( !nDocNo && bPageStylesWithHeaderFooter ) pTargetShell->GetView().GetDocShell()->_LoadStyles( *rWorkShell.GetView().GetDocShell(), sal_True ); @@ -1119,7 +1144,7 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell, String sFileURL = aTempFileURL.GetMainURL( INetURLObject::NO_DECODE ); SfxMedium* pDstMed = new SfxMedium( sFileURL, - STREAM_STD_READWRITE, TRUE ); + STREAM_STD_READWRITE, sal_True ); pDstMed->SetFilter( pStoreToFilter ); if(pDstMed->GetItemSet()) { @@ -1139,8 +1164,8 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell, { // error message ?? ErrorHandler::HandleError( xWorkDocSh->GetError() ); - bCancel = TRUE; - bLoop = FALSE; + bCancel = sal_True; + bLoop = sal_False; } if( bEMail ) { @@ -1176,7 +1201,7 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell, { { //read in the temporary file and use it as mail body - SfxMedium aMedium( sFileURL, STREAM_READ, TRUE); + SfxMedium aMedium( sFileURL, STREAM_READ, sal_True); SvStream* pInStream = aMedium.GetInStream(); OSL_ENSURE(pInStream, "no output file created?"); if(pInStream) @@ -1230,7 +1255,7 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell, } while( !bCancel && (bSynchronizedDoc && (nStartRow != nEndRow)? ExistsNextRecord() : ToNextMergeRecord())); - aPrtMonDlg.Show( FALSE ); + aPrtMonDlg.Show( sal_False ); // save the single output document if(rMergeDescriptor.bCreateSingleFile || bAsSingleFile) @@ -1241,7 +1266,7 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell, INetURLObject aTempFileURL(bAsSingleFile ? sSubject : aTempFile->GetURL()); SfxMedium* pDstMed = new SfxMedium( aTempFileURL.GetMainURL( INetURLObject::NO_DECODE ), - STREAM_STD_READWRITE, TRUE ); + STREAM_STD_READWRITE, sal_True ); pDstMed->SetFilter( pStoreToFilter ); if(pDstMed->GetItemSet()) { @@ -1257,7 +1282,7 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell, { // error message ?? ErrorHandler::HandleError( xTargetDocShell->GetError() ); - bLoop = FALSE; + bLoop = sal_False; } } else if( pTargetView ) // must be available! @@ -1315,7 +1340,7 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell, pViewFrm = SfxViewFrame::GetFirst(pSourrceDocSh); while (pViewFrm) { - pViewFrm->GetDispatcher()->Lock(FALSE); + pViewFrm->GetDispatcher()->Lock(sal_False); pViewFrm = SfxViewFrame::GetNext(*pViewFrm, pSourrceDocSh); } @@ -1338,7 +1363,7 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell, IMPL_LINK_INLINE_START( SwNewDBMgr, PrtCancelHdl, Button *, pButton ) { pButton->GetParent()->Hide(); - bCancel = TRUE; + bCancel = sal_True; return 0; } IMPL_LINK_INLINE_END( SwNewDBMgr, PrtCancelHdl, Button *, pButton ) @@ -1347,13 +1372,13 @@ IMPL_LINK_INLINE_END( SwNewDBMgr, PrtCancelHdl, Button *, pButton ) Description: determine the column's Numberformat and transfer to the forwarded Formatter, if applicable. --------------------------------------------------------------------*/ -ULONG SwNewDBMgr::GetColumnFmt( const String& rDBName, +sal_uLong SwNewDBMgr::GetColumnFmt( const String& rDBName, const String& rTableName, const String& rColNm, SvNumberFormatter* pNFmtr, long nLanguage ) { - ULONG nRet = 0; + sal_uLong nRet = 0; if(pNFmtr) { uno::Reference< XDataSource> xSource; @@ -1375,7 +1400,7 @@ ULONG SwNewDBMgr::GetColumnFmt( const String& rDBName, aData.sDataSource = rDBName; aData.sCommand = rTableName; aData.nCommandType = -1; - SwDSParam* pParam = FindDSData(aData, FALSE); + SwDSParam* pParam = FindDSData(aData, sal_False); if(pParam && pParam->xConnection.is()) { xConnection = pParam->xConnection; @@ -1427,19 +1452,20 @@ ULONG SwNewDBMgr::GetColumnFmt( const String& rDBName, return nRet; } -ULONG SwNewDBMgr::GetColumnFmt( uno::Reference< XDataSource> xSource, +sal_uLong SwNewDBMgr::GetColumnFmt( uno::Reference< XDataSource> xSource, uno::Reference< XConnection> xConnection, uno::Reference< XPropertySet> xColumn, SvNumberFormatter* pNFmtr, long nLanguage ) { // set the NumberFormat in the doc if applicable - ULONG nRet = 0; + sal_uLong nRet = 0; if(!xSource.is()) { uno::Reference<XChild> xChild(xConnection, UNO_QUERY); - xSource = uno::Reference<XDataSource>(xChild->getParent(), UNO_QUERY); + if ( xChild.is() ) + xSource = uno::Reference<XDataSource>(xChild->getParent(), UNO_QUERY); } if(xSource.is() && xConnection.is() && xColumn.is() && pNFmtr) { @@ -1517,7 +1543,7 @@ sal_Int32 SwNewDBMgr::GetColumnType( const String& rDBName, aData.sDataSource = rDBName; aData.sCommand = rTableName; aData.nCommandType = -1; - SwDSParam* pParam = FindDSData(aData, FALSE); + SwDSParam* pParam = FindDSData(aData, sal_False); uno::Reference< XConnection> xConnection; uno::Reference< XColumnsSupplier > xColsSupp; bool bDispose = false; @@ -1576,7 +1602,7 @@ uno::Reference< sdbc::XConnection> SwNewDBMgr::GetConnection(const String& rData uno::Reference< sdbcx::XColumnsSupplier> SwNewDBMgr::GetColumnSupplier(uno::Reference<sdbc::XConnection> xConnection, const String& rTableOrQuery, - BYTE eTableOrQuery) + sal_uInt8 eTableOrQuery) { Reference< sdbcx::XColumnsSupplier> xRet; try @@ -1668,7 +1694,7 @@ String SwNewDBMgr::GetDBField(uno::Reference<XPropertySet> xColumnProps, try { SwDbtoolsClient& aClient = SwNewDBMgr::GetDbtoolsClient(); - sRet = aClient.getValue( + sRet = aClient.getFormattedValue( xColumnProps, rDBFormatData.xFormatter, rDBFormatData.aLocale, @@ -1698,13 +1724,13 @@ String SwNewDBMgr::GetDBField(uno::Reference<XPropertySet> xColumnProps, void SwNewDBMgr::EndMerge() { OSL_ENSURE(bInMerge, "merge is not active"); - bInMerge = FALSE; + bInMerge = sal_False; delete pImpl->pMergeData; pImpl->pMergeData = 0; } // checks if a desired data source table or query is open -BOOL SwNewDBMgr::IsDataSourceOpen(const String& rDataSource, +sal_Bool SwNewDBMgr::IsDataSourceOpen(const String& rDataSource, const String& rTableOrQuery, sal_Bool bMergeOnly) { if(pImpl->pMergeData) @@ -1722,19 +1748,19 @@ BOOL SwNewDBMgr::IsDataSourceOpen(const String& rDataSource, aData.sDataSource = rDataSource; aData.sCommand = rTableOrQuery; aData.nCommandType = -1; - SwDSParam* pFound = FindDSData(aData, FALSE); + SwDSParam* pFound = FindDSData(aData, sal_False); return (pFound && pFound->xResultSet.is()); } return sal_False; } // read column data at a specified position -BOOL SwNewDBMgr::GetColumnCnt(const String& rSourceName, const String& rTableName, +sal_Bool SwNewDBMgr::GetColumnCnt(const String& rSourceName, const String& rTableName, const String& rColumnName, sal_uInt32 nAbsRecordId, long nLanguage, String& rResult, double* pNumber) { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; SwDSParam* pFound = 0; //check if it's the merge data source if(pImpl->pMergeData && @@ -1749,7 +1775,7 @@ BOOL SwNewDBMgr::GetColumnCnt(const String& rSourceName, const String& rTableNam aData.sDataSource = rSourceName; aData.sCommand = rTableName; aData.nCommandType = -1; - pFound = FindDSData(aData, FALSE); + pFound = FindDSData(aData, sal_False); } //check validity of supplied record Id if(pFound->aSelection.getLength()) @@ -1765,7 +1791,7 @@ BOOL SwNewDBMgr::GetColumnCnt(const String& rSourceName, const String& rTableNam bFound = sal_True; } if(!bFound) - return FALSE; + return sal_False; } if(pFound && pFound->xResultSet.is() && !pFound->bAfterSelection) { @@ -1776,10 +1802,10 @@ BOOL SwNewDBMgr::GetColumnCnt(const String& rSourceName, const String& rTableNam } catch(const Exception& ) { - return FALSE; + return sal_False; } //position to the desired index - BOOL bMove = TRUE; + sal_Bool bMove = sal_True; if ( nOldRow != static_cast<sal_Int32>(nAbsRecordId) ) bMove = lcl_MoveAbsolute(pFound, nAbsRecordId); if(bMove) @@ -1794,26 +1820,26 @@ BOOL SwNewDBMgr::GetColumnCnt(const String& rSourceName, const String& rTableNam // reads the column data at the current position -BOOL SwNewDBMgr::GetMergeColumnCnt(const String& rColumnName, USHORT nLanguage, +sal_Bool SwNewDBMgr::GetMergeColumnCnt(const String& rColumnName, sal_uInt16 nLanguage, String &rResult, double *pNumber, sal_uInt32 * /*pFormat*/) { if(!pImpl->pMergeData || !pImpl->pMergeData->xResultSet.is() || pImpl->pMergeData->bAfterSelection ) { rResult.Erase(); - return FALSE; + return sal_False; } - BOOL bRet = lcl_GetColumnCnt(pImpl->pMergeData, rColumnName, nLanguage, rResult, pNumber); + sal_Bool bRet = lcl_GetColumnCnt(pImpl->pMergeData, rColumnName, nLanguage, rResult, pNumber); return bRet; } -BOOL SwNewDBMgr::ToNextMergeRecord() +sal_Bool SwNewDBMgr::ToNextMergeRecord() { OSL_ENSURE(pImpl->pMergeData && pImpl->pMergeData->xResultSet.is(), "no data source in merge"); return ToNextRecord(pImpl->pMergeData); } -BOOL SwNewDBMgr::ToNextRecord( +sal_Bool SwNewDBMgr::ToNextRecord( const String& rDataSource, const String& rCommand, sal_Int32 /*nCommandType*/) { SwDSParam* pFound = 0; @@ -1827,20 +1853,20 @@ BOOL SwNewDBMgr::ToNextRecord( aData.sDataSource = rDataSource; aData.sCommand = rCommand; aData.nCommandType = -1; - pFound = FindDSData(aData, FALSE); + pFound = FindDSData(aData, sal_False); } return ToNextRecord(pFound); } -BOOL SwNewDBMgr::ToNextRecord(SwDSParam* pParam) +sal_Bool SwNewDBMgr::ToNextRecord(SwDSParam* pParam) { - BOOL bRet = TRUE; + sal_Bool bRet = sal_True; if(!pParam || !pParam->xResultSet.is() || pParam->bEndOfDB || (pParam->aSelection.getLength() && pParam->aSelection.getLength() <= pParam->nSelectionIndex)) { if(pParam) pParam->CheckEndOfDB(); - return FALSE; + return sal_False; } try { @@ -1852,7 +1878,7 @@ BOOL SwNewDBMgr::ToNextRecord(SwDSParam* pParam) pParam->CheckEndOfDB(); bRet = !pParam->bEndOfDB; if(pParam->nSelectionIndex >= pParam->aSelection.getLength()) - pParam->bEndOfDB = TRUE; + pParam->bEndOfDB = sal_True; } else { @@ -1880,7 +1906,7 @@ BOOL SwNewDBMgr::ToNextRecord(SwDSParam* pParam) to assure that the next page can be created in mail merge the cursor position must be validated ---------------------------------------------------------------------------*/ -BOOL SwNewDBMgr::ExistsNextRecord() const +sal_Bool SwNewDBMgr::ExistsNextRecord() const { return pImpl->pMergeData && !pImpl->pMergeData->bEndOfDB; } @@ -1890,7 +1916,7 @@ sal_uInt32 SwNewDBMgr::GetSelectedRecordId() sal_uInt32 nRet = 0; OSL_ENSURE(pImpl->pMergeData && pImpl->pMergeData->xResultSet.is(), "no data source in merge"); if(!pImpl->pMergeData || !pImpl->pMergeData->xResultSet.is()) - return FALSE; + return sal_False; try { nRet = pImpl->pMergeData->xResultSet->getRow(); @@ -1905,8 +1931,8 @@ sal_Bool SwNewDBMgr::ToRecordId(sal_Int32 nSet) { OSL_ENSURE(pImpl->pMergeData && pImpl->pMergeData->xResultSet.is(), "no data source in merge"); if(!pImpl->pMergeData || !pImpl->pMergeData->xResultSet.is()|| nSet < 0) - return FALSE; - sal_Bool bRet = FALSE; + return sal_False; + sal_Bool bRet = sal_False; sal_Int32 nAbsPos = nSet; if(nAbsPos >= 0) @@ -1918,7 +1944,7 @@ sal_Bool SwNewDBMgr::ToRecordId(sal_Int32 nSet) return bRet; } -BOOL SwNewDBMgr::OpenDataSource(const String& rDataSource, const String& rTableOrQuery, +sal_Bool SwNewDBMgr::OpenDataSource(const String& rDataSource, const String& rTableOrQuery, sal_Int32 nCommandType, bool bCreate) { SwDBData aData; @@ -1926,11 +1952,11 @@ BOOL SwNewDBMgr::OpenDataSource(const String& rDataSource, const String& rTableO aData.sCommand = rTableOrQuery; aData.nCommandType = nCommandType; - SwDSParam* pFound = FindDSData(aData, TRUE); + SwDSParam* pFound = FindDSData(aData, sal_True); uno::Reference< XDataSource> xSource; if(pFound->xResultSet.is()) - return TRUE; - SwDSParam* pParam = FindDSConnection(rDataSource, FALSE); + return sal_True; + SwDSParam* pParam = FindDSConnection(rDataSource, sal_False); uno::Reference< XConnection> xConnection; if(pParam && pParam->xConnection.is()) pFound->xConnection = pParam->xConnection; @@ -1952,7 +1978,7 @@ BOOL SwNewDBMgr::OpenDataSource(const String& rDataSource, const String& rTableO catch(Exception&) { // DB driver may not be ODBC 3.0 compliant - pFound->bScrollable = TRUE; + pFound->bScrollable = sal_True; } pFound->xStatement = pFound->xConnection->createStatement(); rtl::OUString aQuoteChar = xMetaData->getIdentifierQuoteString(); @@ -1981,7 +2007,7 @@ BOOL SwNewDBMgr::OpenDataSource(const String& rDataSource, const String& rTableO uno::Reference< XConnection> SwNewDBMgr::RegisterConnection(rtl::OUString& rDataSource) { - SwDSParam* pFound = SwNewDBMgr::FindDSConnection(rDataSource, TRUE); + SwDSParam* pFound = SwNewDBMgr::FindDSConnection(rDataSource, sal_True); uno::Reference< XDataSource> xSource; if(!pFound->xConnection.is()) { @@ -2015,7 +2041,7 @@ sal_uInt32 SwNewDBMgr::GetSelectedRecordId( aData.sDataSource = rDataSource; aData.sCommand = rTableOrQuery; aData.nCommandType = nCommandType; - SwDSParam* pFound = FindDSData(aData, FALSE); + SwDSParam* pFound = FindDSData(aData, sal_False); if(pFound && pFound->xResultSet.is()) { try @@ -2039,11 +2065,11 @@ sal_uInt32 SwNewDBMgr::GetSelectedRecordId( // close all data sources - after fields were updated -void SwNewDBMgr::CloseAll(BOOL bIncludingMerge) +void SwNewDBMgr::CloseAll(sal_Bool bIncludingMerge) { //the only thing done here is to reset the selection index //all connections stay open - for(USHORT nPos = 0; nPos < aDataSourceParams.Count(); nPos++) + for(sal_uInt16 nPos = 0; nPos < aDataSourceParams.Count(); nPos++) { SwDSParam* pParam = aDataSourceParams[nPos]; if(bIncludingMerge || pParam != pImpl->pMergeData) @@ -2062,7 +2088,7 @@ void SwNewDBMgr::CloseAll(BOOL bIncludingMerge) } } -SwDSParam* SwNewDBMgr::FindDSData(const SwDBData& rData, BOOL bCreate) +SwDSParam* SwNewDBMgr::FindDSData(const SwDBData& rData, sal_Bool bCreate) { //prefer merge data if available if(pImpl->pMergeData && rData.sDataSource == pImpl->pMergeData->sDataSource && @@ -2074,7 +2100,7 @@ SwDSParam* SwNewDBMgr::FindDSData(const SwDBData& rData, BOOL bCreate) } SwDSParam* pFound = 0; - for(USHORT nPos = aDataSourceParams.Count(); nPos; nPos--) + for(sal_uInt16 nPos = aDataSourceParams.Count(); nPos; nPos--) { SwDSParam* pParam = aDataSourceParams[nPos - 1]; if(rData.sDataSource == pParam->sDataSource && @@ -2111,7 +2137,7 @@ SwDSParam* SwNewDBMgr::FindDSData(const SwDBData& rData, BOOL bCreate) return pFound; } -SwDSParam* SwNewDBMgr::FindDSConnection(const rtl::OUString& rDataSource, BOOL bCreate) +SwDSParam* SwNewDBMgr::FindDSConnection(const rtl::OUString& rDataSource, sal_Bool bCreate) { //prefer merge data if available if(pImpl->pMergeData && rDataSource == pImpl->pMergeData->sDataSource ) @@ -2119,7 +2145,7 @@ SwDSParam* SwNewDBMgr::FindDSConnection(const rtl::OUString& rDataSource, BOOL return pImpl->pMergeData; } SwDSParam* pFound = 0; - for(USHORT nPos = 0; nPos < aDataSourceParams.Count(); nPos++) + for(sal_uInt16 nPos = 0; nPos < aDataSourceParams.Count(); nPos++) { SwDSParam* pParam = aDataSourceParams[nPos]; if(rDataSource == pParam->sDataSource) @@ -2361,7 +2387,7 @@ String SwNewDBMgr::LoadAndRegisterDataSource() void SwNewDBMgr::ExecuteFormLetter( SwWrtShell& rSh, const Sequence<PropertyValue>& rProperties, - BOOL bWithDataSourceBrowser) + sal_Bool bWithDataSourceBrowser) { //prevent second call if(pImpl->pMergeDialog) @@ -2393,7 +2419,7 @@ void SwNewDBMgr::ExecuteFormLetter( SwWrtShell& rSh, if(!xConnection.is()) { xConnection = SwNewDBMgr::RegisterConnection(sDataSource); - pFound = FindDSConnection(sDataSource, TRUE); + pFound = FindDSConnection(sDataSource, sal_True); } SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); OSL_ENSURE(pFact, "Dialogdiet fail!"); @@ -2413,6 +2439,7 @@ void SwNewDBMgr::ExecuteFormLetter( SwWrtShell& rSh, if(xResSet.is()) aDescriptor[daCursor] <<= xResSet; + // SfxObjectShellRef is ok, since there should be no control over the document lifetime here SfxObjectShellRef xDocShell = rSh.GetView().GetViewFrame()->GetObjectShell(); SFX_APP()->NotifyEvent(SfxEventHint(SW_EVENT_MAIL_MERGE, SwDocShell::GetEventName(STR_SW_EVENT_MAIL_MERGE), xDocShell)); { @@ -2443,8 +2470,10 @@ void SwNewDBMgr::ExecuteFormLetter( SwWrtShell& rSh, } else { - SfxObjectShellRef xWorkDocSh( new SwDocShell( SFX_CREATE_MODE_INTERNAL )); - SfxMedium* pWorkMed = new SfxMedium( sTempURL, STREAM_STD_READ, TRUE ); + // the shell will be explicitly closed, but it is more safe to use SfxObjectShellLock here + // especially for the case that the loading has failed + SfxObjectShellLock xWorkDocSh( new SwDocShell( SFX_CREATE_MODE_INTERNAL )); + SfxMedium* pWorkMed = new SfxMedium( sTempURL, STREAM_STD_READ, sal_True ); pWorkMed->SetFilter( pSfxFlt ); if( xWorkDocSh->DoLoad(pWorkMed) ) { @@ -2489,7 +2518,7 @@ void SwNewDBMgr::ExecuteFormLetter( SwWrtShell& rSh, } if(pFound) { - for(USHORT nPos = 0; nPos < aDataSourceParams.Count(); nPos++) + for(sal_uInt16 nPos = 0; nPos < aDataSourceParams.Count(); nPos++) { SwDSParam* pParam = aDataSourceParams[nPos]; if(pParam == pFound) @@ -2664,7 +2693,7 @@ sal_Int32 SwNewDBMgr::MergeDocuments( SwMailMergeConfigItem& rMMConfig, uno::Reference< XResultSet> xResultSet = rMMConfig.GetResultSet(); if(!xResultSet.is()) return false; - bInMerge = TRUE; + bInMerge = sal_True; sal_Int32 nRet = 0; pImpl->pMergeData = new SwDSParam( rMMConfig.GetCurrentDBData(), xResultSet, rMMConfig.GetSelection()); @@ -2678,7 +2707,7 @@ sal_Int32 SwNewDBMgr::MergeDocuments( SwMailMergeConfigItem& rMMConfig, pImpl->pMergeData->bEndOfDB = !pImpl->pMergeData->xResultSet->absolute( nPos ); pImpl->pMergeData->CheckEndOfDB(); if(pImpl->pMergeData->nSelectionIndex >= pImpl->pMergeData->aSelection.getLength()) - pImpl->pMergeData->bEndOfDB = TRUE; + pImpl->pMergeData->bEndOfDB = sal_True; } else { @@ -2688,13 +2717,13 @@ sal_Int32 SwNewDBMgr::MergeDocuments( SwMailMergeConfigItem& rMMConfig, } catch(Exception&) { - pImpl->pMergeData->bEndOfDB = TRUE; + pImpl->pMergeData->bEndOfDB = sal_True; pImpl->pMergeData->CheckEndOfDB(); OSL_ENSURE(false, "exception in MergeNew()"); } //bCancel is set from the PrintMonitor - bCancel = FALSE; + bCancel = sal_False; CreateMonitor aMonitorDlg(&rSourceView.GetEditWin()); aMonitorDlg.SetCancelHdl(LINK(this, SwNewDBMgr, PrtCancelHdl)); @@ -2704,15 +2733,15 @@ sal_Int32 SwNewDBMgr::MergeDocuments( SwMailMergeConfigItem& rMMConfig, aMonitorDlg.Invalidate(); aMonitorDlg.Update(); // the print monitor needs some time to act - for( USHORT i = 0; i < 25; i++) + for( sal_uInt16 i = 0; i < 25; i++) Application::Reschedule(); } SwWrtShell& rSourceShell = rSourceView.GetWrtShell(); - BOOL bSynchronizedDoc = rSourceShell.IsLabelDoc() && rSourceShell.GetSectionFmtCount() > 1; + sal_Bool bSynchronizedDoc = rSourceShell.IsLabelDoc() && rSourceShell.GetSectionFmtCount() > 1; //save the settings of the first - rSourceShell.SttEndDoc(TRUE); - USHORT nStartingPageNo = rSourceShell.GetVirtPageNum(); + rSourceShell.SttEndDoc(sal_True); + sal_uInt16 nStartingPageNo = rSourceShell.GetVirtPageNum(); String sModifiedStartingPageDesc; String sStartingPageDesc = sModifiedStartingPageDesc = rSourceShell.GetPageDesc( rSourceShell.GetCurPageDesc()).GetName(); @@ -2748,7 +2777,7 @@ sal_Int32 SwNewDBMgr::MergeDocuments( SwMailMergeConfigItem& rMMConfig, long nStartRow, nEndRow; - ULONG nDocNo = 1; + sal_uLong nDocNo = 1; sal_Int32 nDocCount = 0; if( !IsMergeSilent() && lcl_getCountFromResultSet( nDocCount, pImpl->pMergeData->xResultSet ) ) aMonitorDlg.SetTotalCount( nDocCount ); @@ -2762,12 +2791,13 @@ sal_Int32 SwNewDBMgr::MergeDocuments( SwMailMergeConfigItem& rMMConfig, aMonitorDlg.Invalidate(); aMonitorDlg.Update(); // the print monitor needs some time to act - for( USHORT i = 0; i < 25; i++) + for( sal_uInt16 i = 0; i < 25; i++) Application::Reschedule(); } // copy the source document - SfxObjectShellRef xWorkDocSh; + // the copy will be closed later, but it is more safe to use SfxObjectShellLock here + SfxObjectShellLock xWorkDocSh; if(nDocNo == 1 ) { uno::Reference< util::XCloneable > xClone( rSourceView.GetDocShell()->GetModel(), uno::UNO_QUERY); @@ -2789,8 +2819,14 @@ sal_Int32 SwNewDBMgr::MergeDocuments( SwMailMergeConfigItem& rMMConfig, SwNewDBMgr* pWorkDBMgr = pWorkDoc->GetNewDBMgr(); pWorkDoc->SetNewDBMgr( this ); pWorkDoc->EmbedAllLinks(); - if(UNDO_UI_DELETE_INVISIBLECNTNT == rWorkShell.GetUndoIds()) - rWorkShell.Undo(); + SwUndoId nLastUndoId(UNDO_EMPTY); + if (rWorkShell.GetLastUndoInfo(0, & nLastUndoId)) + { + if (UNDO_UI_DELETE_INVISIBLECNTNT == nLastUndoId) + { + rWorkShell.Undo(); + } + } // #i69485# lock fields to prevent access to the result set while calculating layout rWorkShell.LockExpFlds(); // create a layout @@ -2804,13 +2840,16 @@ sal_Int32 SwNewDBMgr::MergeDocuments( SwMailMergeConfigItem& rMMConfig, rWorkShell.RemoveInvisibleContent(); rWorkShell.ConvertFieldsToText(); rWorkShell.SetNumberingRestart(); - + if( bSynchronizedDoc ) + { + lcl_RemoveSectionLinks( rWorkShell ); + } // insert the document into the target document - rWorkShell.SttEndDoc(FALSE); - rWorkShell.SttEndDoc(TRUE); + rWorkShell.SttEndDoc(sal_False); + rWorkShell.SttEndDoc(sal_True); rWorkShell.SelAll(); - pTargetShell->SttEndDoc(FALSE); + pTargetShell->SttEndDoc(sal_False); //#i63806# put the styles to the target document //if the source uses headers or footers each new copy need to copy a new page styles @@ -2844,7 +2883,7 @@ sal_Int32 SwNewDBMgr::MergeDocuments( SwMailMergeConfigItem& rMMConfig, { pTargetShell->SetPageStyle(sModifiedStartingPageDesc); } - USHORT nPageCountBefore = pTargetShell->GetPageCnt(); + sal_uInt16 nPageCountBefore = pTargetShell->GetPageCnt(); OSL_ENSURE(!pTargetShell->GetTableFmt(),"target document ends with a table - paragraph should be appended"); //#i51359# add a second paragraph in case there's only one { @@ -2875,7 +2914,7 @@ sal_Int32 SwNewDBMgr::MergeDocuments( SwMailMergeConfigItem& rMMConfig, ++nRet; // the print monitor needs some time to act - for( USHORT i = 0; i < 25; i++) + for( sal_uInt16 i = 0; i < 25; i++) Application::Reschedule(); //restore the ole DBMgr @@ -2906,7 +2945,7 @@ sal_Int32 SwNewDBMgr::MergeDocuments( SwMailMergeConfigItem& rMMConfig, OSL_ENSURE(false, "exception caught in SwNewDBMgr::MergeDocuments"); } DELETEZ(pImpl->pMergeData); - bInMerge = FALSE; + bInMerge = sal_False; return nRet; } @@ -2924,7 +2963,7 @@ void SwConnectionDisposedListener_Impl::disposing( const EventObject& rSource ) { ::SolarMutexGuard aGuard; uno::Reference<XConnection> xSource(rSource.Source, UNO_QUERY); - for(USHORT nPos = rDBMgr.aDataSourceParams.Count(); nPos; nPos--) + for(sal_uInt16 nPos = rDBMgr.aDataSourceParams.Count(); nPos; nPos--) { SwDSParam* pParam = rDBMgr.aDataSourceParams[nPos - 1]; if(pParam->xConnection.is() && diff --git a/sw/source/ui/dbui/dbtree.cxx b/sw/source/ui/dbui/dbtree.cxx index 96d95a85d0..3595e44fc5 100644 --- a/sw/source/ui/dbui/dbtree.cxx +++ b/sw/source/ui/dbui/dbtree.cxx @@ -95,7 +95,7 @@ class SwDBTreeList_Impl : public cppu::WeakImplHelper1 < XContainerListener > virtual void SAL_CALL elementReplaced( const ContainerEvent& Event ) throw (RuntimeException); virtual void SAL_CALL disposing( const EventObject& Source ) throw (RuntimeException); - BOOL HasContext(); + sal_Bool HasContext(); SwWrtShell* GetWrtShell() { return pWrtSh;} void SetWrtShell(SwWrtShell& rSh) { pWrtSh = &rSh;} Reference< XNameAccess > GetContext() const {return xDBContext;} @@ -127,7 +127,7 @@ void SwDBTreeList_Impl::elementRemoved( const ContainerEvent& rEvent ) throw (Ru SolarMutexGuard aGuard; ::rtl::OUString sSource; rEvent.Accessor >>= sSource; - for(USHORT i = 0; i < aConnections.Count(); i++) + for(sal_uInt16 i = 0; i < aConnections.Count(); i++) { SwConnectionDataPtr pPtr = aConnections[i]; if(pPtr->sSourceName == sSource) @@ -148,7 +148,7 @@ void SwDBTreeList_Impl::elementReplaced( const ContainerEvent& rEvent ) throw (R elementRemoved(rEvent); } -BOOL SwDBTreeList_Impl::HasContext() +sal_Bool SwDBTreeList_Impl::HasContext() { if(!xDBContext.is()) { @@ -170,7 +170,7 @@ BOOL SwDBTreeList_Impl::HasContext() Reference<XConnection> SwDBTreeList_Impl::GetConnection(const rtl::OUString& rSourceName) { Reference<XConnection> xRet; - for(USHORT i = 0; i < aConnections.Count(); i++) + for(sal_uInt16 i = 0; i < aConnections.Count(); i++) { SwConnectionDataPtr pPtr = aConnections[i]; if(pPtr->sSourceName == rSourceName) @@ -191,12 +191,12 @@ Reference<XConnection> SwDBTreeList_Impl::GetConnection(const rtl::OUString& rS SwDBTreeList::SwDBTreeList(Window *pParent, const ResId& rResId, SwWrtShell* pSh, - const String& rDefDBName, const BOOL bShowCol): + const String& rDefDBName, const sal_Bool bShowCol): SvTreeListBox (pParent, rResId), aImageList (SW_RES(ILIST_DB_DLG )), sDefDBName (rDefDBName), - bInitialized (FALSE), + bInitialized (sal_False), bShowColumns (bShowCol), pImpl(new SwDBTreeList_Impl(pSh)) { @@ -216,7 +216,7 @@ void SwDBTreeList::InitTreeList() if(!pImpl->HasContext() && pImpl->GetWrtShell()) return; SetSelectionMode(SINGLE_SELECTION); - SetWindowBits(WB_HASLINES|WB_CLIPCHILDREN|WB_SORT|WB_HASBUTTONS|WB_HASBUTTONSATROOT|WB_HSCROLL); + SetStyle(GetStyle()|WB_HASLINES|WB_CLIPCHILDREN|WB_SORT|WB_HASBUTTONS|WB_HASBUTTONSATROOT|WB_HSCROLL); // don't set font, so that the Control's font is being applied! SetSpaceBetweenEntries(0); SetNodeBitmaps( aImageList.GetImage(IMG_COLLAPSE), @@ -234,24 +234,24 @@ void SwDBTreeList::InitTreeList() for(long i = 0; i < nCount; i++) { String sDBName(pDBNames[i]); - InsertEntry(sDBName, aImg, aImg, NULL, TRUE); + InsertEntry(sDBName, aImg, aImg, NULL, sal_True); } String sDBName(sDefDBName.GetToken(0, DB_DELIM)); String sTableName(sDefDBName.GetToken(1, DB_DELIM)); String sColumnName(sDefDBName.GetToken(2, DB_DELIM)); Select(sDBName, sTableName, sColumnName); - bInitialized = TRUE; + bInitialized = sal_True; } void SwDBTreeList::AddDataSource(const String& rSource) { Image aImg = aImageList.GetImage(IMG_DB); - SvLBoxEntry* pEntry = InsertEntry(rSource, aImg, aImg, NULL, TRUE); + SvLBoxEntry* pEntry = InsertEntry(rSource, aImg, aImg, NULL, sal_True); SvTreeListBox::Select(pEntry); } -void SwDBTreeList::ShowColumns(BOOL bShowCol) +void SwDBTreeList::ShowColumns(sal_Bool bShowCol) { if (bShowCol != bShowColumns) { @@ -259,7 +259,7 @@ void SwDBTreeList::ShowColumns(BOOL bShowCol) String sTableName, sColumnName; String sDBName(GetDBName(sTableName, sColumnName)); - SetUpdateMode(FALSE); + SetUpdateMode(sal_False); SvLBoxEntry* pEntry = First(); @@ -279,7 +279,7 @@ void SwDBTreeList::ShowColumns(BOOL bShowCol) { Select(sDBName, sTableName, sColumnName); // force RequestingChilds } - SetUpdateMode(TRUE); + SetUpdateMode(sal_True); } } @@ -298,7 +298,7 @@ void SwDBTreeList::RequestingChilds(SvLBoxEntry* pParent) if(!pImpl->GetContext()->hasByName(sSourceName)) return; Reference<XConnection> xConnection = pImpl->GetConnection(sSourceName); - BOOL bTable = pParent->GetUserData() == 0; + sal_Bool bTable = pParent->GetUserData() == 0; Reference<XColumnsSupplier> xColsSupplier; if(bTable) { @@ -420,7 +420,7 @@ IMPL_LINK( SwDBTreeList, DBCompare, SvSortData*, pData ) return DefaultCompare(pData); // otherwise call base class } -String SwDBTreeList::GetDBName(String& rTableName, String& rColumnName, BOOL* pbIsTable) +String SwDBTreeList::GetDBName(String& rTableName, String& rColumnName, sal_Bool* pbIsTable) { String sDBName; SvLBoxEntry* pEntry = FirstSelected(); @@ -449,8 +449,8 @@ void SwDBTreeList::Select(const String& rDBName, const String& rTableName, const { SvLBoxEntry* pParent; SvLBoxEntry* pChild; - USHORT nParent = 0; - USHORT nChild = 0; + sal_uInt16 nParent = 0; + sal_uInt16 nChild = 0; while ((pParent = GetEntry(nParent++)) != NULL) { diff --git a/sw/source/ui/dbui/dbui.src b/sw/source/ui/dbui/dbui.src index ce6b297064..b13e870604 100644 --- a/sw/source/ui/dbui/dbui.src +++ b/sw/source/ui/dbui/dbui.src @@ -31,6 +31,7 @@ ModalDialog DLG_DBSELECTION { + HelpID = "sw:ModalDialog:DLG_DBSELECTION"; OutputSize = TRUE ; SVLook = TRUE ; Size = MAP_APPFONT ( 168 , 132 ) ; diff --git a/sw/source/ui/dbui/mailmergechildwindow.cxx b/sw/source/ui/dbui/mailmergechildwindow.cxx index 610903c445..441373b525 100644 --- a/sw/source/ui/dbui/mailmergechildwindow.cxx +++ b/sw/source/ui/dbui/mailmergechildwindow.cxx @@ -60,7 +60,7 @@ using namespace ::com::sun::star; SFX_IMPL_FLOATINGWINDOW( SwMailMergeChildWindow, FN_MAILMERGE_CHILDWINDOW ) SwMailMergeChildWindow::SwMailMergeChildWindow( Window* _pParent, - USHORT nId, + sal_uInt16 nId, SfxBindings* pBindings, SfxChildWinInfo* pInfo ) : SfxChildWindow( _pParent, nId ) @@ -366,7 +366,7 @@ SwSendMailDialog::SwSendMailDialog(Window *pParent, SwMailMergeConfigItem& rConf m_aStatusLB.SetHelpId(HID_MM_MAILSTATUS_TLB); static long nTabs[] = {3, 0, nPos1, aSz.Width() }; - m_aStatusLB.SetWindowBits( WB_SORT | WB_HSCROLL | WB_CLIPCHILDREN | WB_TABSTOP ); + m_aStatusLB.SetStyle( m_aStatusLB.GetStyle() | WB_SORT | WB_HSCROLL | WB_CLIPCHILDREN | WB_TABSTOP ); m_aStatusLB.SetSelectionMode( SINGLE_SELECTION ); m_aStatusLB.SetTabs(&nTabs[0], MAP_PIXEL); m_aStatusLB.SetSpaceBetweenEntries(3); @@ -692,7 +692,7 @@ void SwSendMailDialog::UpdateTransferStatus() m_aErrorStatusFT.SetText(sStatus); if(m_pImpl->aDescriptors.size()) - m_aProgressBar.SetValue((USHORT)(m_nSendCount * 100 / m_pImpl->aDescriptors.size())); + m_aProgressBar.SetValue((sal_uInt16)(m_nSendCount * 100 / m_pImpl->aDescriptors.size())); else m_aProgressBar.SetValue(0); } diff --git a/sw/source/ui/dbui/mailmergechildwindow.src b/sw/source/ui/dbui/mailmergechildwindow.src index bdbf4e4917..0ca098fad1 100644 --- a/sw/source/ui/dbui/mailmergechildwindow.src +++ b/sw/source/ui/dbui/mailmergechildwindow.src @@ -244,6 +244,7 @@ ModalDialog DLG_MM_SENDWARNING }; MultiLineEdit ED_DETAILS { + HelpID = "sw:MultiLineEdit:DLG_MM_SENDWARNING:ED_DETAILS"; Pos = MAP_APPFONT ( 40 , 50 ) ; Size = MAP_APPFONT ( 194 , 50 ) ; Border = TRUE; diff --git a/sw/source/ui/dbui/mailmergehelper.cxx b/sw/source/ui/dbui/mailmergehelper.cxx index f267396f87..b2b75f3331 100644 --- a/sw/source/ui/dbui/mailmergehelper.cxx +++ b/sw/source/ui/dbui/mailmergehelper.cxx @@ -247,7 +247,7 @@ void SwAddressPreview::SetAddress(const ::rtl::OUString& rAddress) { pImpl->aAdresses.clear(); pImpl->aAdresses.push_back(rAddress); - aVScrollBar.Show(FALSE); + aVScrollBar.Show(sal_False); Invalidate(); } @@ -389,7 +389,7 @@ void SwAddressPreview::MouseButtonDown( const MouseEvent& rMEvt ) void SwAddressPreview::KeyInput( const KeyEvent& rKEvt ) { - USHORT nKey = rKEvt.GetKeyCode().GetCode(); + sal_uInt16 nKey = rKEvt.GetKeyCode().GetCode(); if(pImpl->nRows || pImpl->nColumns) { sal_uInt32 nSelectedRow = (pImpl->nSelectedAddress + 1)/ pImpl->nColumns; @@ -502,7 +502,7 @@ String SwAddressPreview::FillData( //find the appropriate assignment String sConvertedColumn = aItem.sText; - for(USHORT nColumn = 0; + for(sal_uInt16 nColumn = 0; nColumn < rDefHeaders.Count() && nColumn < aAssignment.getLength(); ++nColumn) { @@ -717,7 +717,7 @@ uno::Any SwMailTransferable::getTransferData( const datatransfer::DataFlavor& /* else { Sequence<sal_Int8> aData; - SfxMedium aMedium( m_aURL, STREAM_STD_READ, FALSE ); + SfxMedium aMedium( m_aURL, STREAM_STD_READ, sal_False ); SvStream* pStream = aMedium.GetInStream(); if ( aMedium.GetErrorCode() == ERRCODE_NONE && pStream) { diff --git a/sw/source/ui/dbui/mailmergewizard.src b/sw/source/ui/dbui/mailmergewizard.src index ad7d574800..2756f5ff7a 100644 --- a/sw/source/ui/dbui/mailmergewizard.src +++ b/sw/source/ui/dbui/mailmergewizard.src @@ -30,6 +30,7 @@ ModalDialog DLG_MAILMERGEWIZARD { + HelpID = "sw:ModalDialog:DLG_MAILMERGEWIZARD"; OutputSize = TRUE ; SVLook = TRUE ; Text [ en-US ] = "Mail Merge Wizard" ; diff --git a/sw/source/ui/dbui/makefile.mk b/sw/source/ui/dbui/makefile.mk deleted file mode 100644 index f125f07851..0000000000 --- a/sw/source/ui/dbui/makefile.mk +++ /dev/null @@ -1,108 +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=dbui -LIBTARGET=no -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- -IMGLST_SRS=$(SRS)$/dbui.srs -BMP_IN=$(PRJ)$/win/imglst - - -SRS1NAME=$(TARGET) -SRC1FILES = \ - addresslistdialog.src \ - createaddresslistdialog.src \ - customizeaddresslistdialog.src \ - dbinsdlg.src \ - dbui.src \ - dbtablepreviewdialog.src \ - mailmergechildwindow.src \ - mailmergewizard.src \ - mmdocselectpage.src \ - mmlayoutpage.src \ - mmoutputpage.src \ - mmoutputtypepage.src \ - mmaddressblockpage.src \ - mmgreetingspage.src \ - mmmergepage.src \ - mmpreparemergepage.src \ - selectdbtabledialog.src \ - -EXCEPTIONSFILES= \ - $(SLO)$/addresslistdialog.obj \ - $(SLO)$/createaddresslistdialog.obj \ - $(SLO)$/customizeaddresslistdialog.obj \ - $(SLO)$/dbinsdlg.obj \ - $(SLO)$/dbmgr.obj \ - $(SLO)$/dbtablepreviewdialog.obj \ - $(SLO)$/dbtree.obj \ - $(SLO)$/dbui.obj \ - $(SLO)$/maildispatcher.obj \ - $(SLO)$/mailmergechildwindow.obj \ - $(SLO)$/mailmergehelper.obj \ - $(SLO)$/mailmergewizard.obj \ - $(SLO)$/mmaddressblockpage.obj \ - $(SLO)$/mmconfigitem.obj \ - $(SLO)$/mmdocselectpage.obj \ - $(SLO)$/mmgreetingspage.obj \ - $(SLO)$/mmlayoutpage.obj \ - $(SLO)$/mmmergepage.obj \ - $(SLO)$/mmoutputpage.obj \ - $(SLO)$/mmoutputtypepage.obj \ - $(SLO)$/mmpreparemergepage.obj \ - $(SLO)$/selectdbtabledialog.obj - -SLOFILES = \ - $(EXCEPTIONSFILES) \ - $(SLO)$/swdbtoolsclient.obj - - -LIB1TARGET = $(SLB)$/$(TARGET).lib - -LIB1OBJFILES = \ - $(SLO)$/dbmgr.obj \ - $(SLO)$/dbtree.obj \ - $(SLO)$/dbui.obj \ - $(SLO)$/maildispatcher.obj \ - $(SLO)$/mailmergehelper.obj \ - $(SLO)$/mailmergechildwindow.obj \ - $(SLO)$/mmconfigitem.obj \ - $(SLO)$/swdbtoolsclient.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/ui/dbui/mmaddressblockpage.cxx b/sw/source/ui/dbui/mmaddressblockpage.cxx index ec237cb6ac..c651d291e8 100644 --- a/sw/source/ui/dbui/mmaddressblockpage.cxx +++ b/sw/source/ui/dbui/mmaddressblockpage.cxx @@ -296,16 +296,16 @@ IMPL_LINK(SwMailMergeAddressBlockPage, InsertDataHdl_Impl, ImageButton*, pButton } else { - BOOL bNext = pButton == &m_aNextSetIB; + sal_Bool bNext = pButton == &m_aNextSetIB; sal_Int32 nPos = rConfig.GetResultSetPosition(); rConfig.MoveResultSet( bNext ? ++nPos : --nPos); } m_pWizard->LeaveWait(); sal_Int32 nPos = rConfig.GetResultSetPosition(); - BOOL bEnable = TRUE; + sal_Bool bEnable = sal_True; if(nPos < 1) { - bEnable = FALSE; + bEnable = sal_False; nPos = 1; } else @@ -507,12 +507,12 @@ SwRestrictedComboBox::~SwRestrictedComboBox() void SwRestrictedComboBox::KeyInput(const KeyEvent& rEvt) { - BOOL bCallParent = TRUE; + sal_Bool bCallParent = sal_True; if(rEvt.GetCharCode()) { String sKey = rEvt.GetCharCode(); if( STRING_NOTFOUND != sForbiddenChars.Search(sKey)) - bCallParent = FALSE; + bCallParent = sal_False; } if(bCallParent) ComboBox::KeyInput(rEvt); @@ -522,11 +522,11 @@ void SwRestrictedComboBox::Modify() { Selection aSel = GetSelection(); String sTemp = GetText(); - for(USHORT i = 0; i < sForbiddenChars.Len(); i++) + for(sal_uInt16 i = 0; i < sForbiddenChars.Len(); i++) { sTemp.EraseAllChars( sForbiddenChars.GetChar(i) ); } - USHORT nDiff = GetText().Len() - sTemp.Len(); + sal_uInt16 nDiff = GetText().Len() - sTemp.Len(); if(nDiff) { aSel.setMin(aSel.getMin() - nDiff); @@ -617,7 +617,7 @@ SwCustomizeAddressBlockDialog::SwCustomizeAddressBlockDialog( } FreeResource(); const ResStringArray& rHeaders = m_rConfigItem.GetDefaultAddressHeaders(); - for(USHORT i = 0; i < rHeaders.Count(); ++i) + for(sal_uInt16 i = 0; i < rHeaders.Count(); ++i) { const XubString& rHeader = rHeaders.GetString( i ); SvLBoxEntry* pEntry = m_aAddressElementsLB.InsertEntry(rHeader); @@ -705,7 +705,7 @@ sal_Int32 SwCustomizeAddressBlockDialog::GetSelectedItem_Impl() sal_Int32 nRet = USER_DATA_NONE; String sSelected = m_aDragED.GetCurrentItem(); if(sSelected.Len()) - for(ULONG i = 0; i < m_aAddressElementsLB.GetEntryCount(); ++i) + for(sal_uLong i = 0; i < m_aAddressElementsLB.GetEntryCount(); ++i) { SvLBoxEntry* pEntry = m_aAddressElementsLB.GetEntry(i); String sEntry = m_aAddressElementsLB.GetEntryText(pEntry); @@ -722,7 +722,7 @@ bool SwCustomizeAddressBlockDialog::HasItem_Impl(sal_Int32 nUserData) { //get the entry from the ListBox String sEntry; - for(ULONG i = 0; i < m_aAddressElementsLB.GetEntryCount(); ++i) + for(sal_uLong i = 0; i < m_aAddressElementsLB.GetEntryCount(); ++i) { SvLBoxEntry* pEntry = m_aAddressElementsLB.GetEntry(i); if((sal_Int32)(sal_IntPtr)pEntry->GetUserData() == nUserData) @@ -841,7 +841,7 @@ void SwCustomizeAddressBlockDialog::SetAddress(const ::rtl::OUString& rAddress) //remove placeholders by the actual content if(m_aFieldFT.IsVisible()) { - for(ULONG i = 0; i < m_aAddressElementsLB.GetEntryCount(); ++i) + for(sal_uLong i = 0; i < m_aAddressElementsLB.GetEntryCount(); ++i) { SvLBoxEntry* pEntry = m_aAddressElementsLB.GetEntry(i); String sEntry = m_aAddressElementsLB.GetEntryText(pEntry); @@ -1010,8 +1010,27 @@ SwAssignFieldsControl::SwAssignFieldsControl( uno::Sequence< ::rtl::OUString> aAssignments = rConfigItem.GetColumnAssignment( rConfigItem.GetCurrentDBData() ); Link aMatchHdl = LINK(this, SwAssignFieldsControl, MatchHdl_Impl); Link aFocusHdl = LINK(this, SwAssignFieldsControl, GotFocusHdl_Impl); + + static const char* aHIDs[] = + { + HID_MM_HEADER_0, + HID_MM_HEADER_1, + HID_MM_HEADER_2, + HID_MM_HEADER_3, + HID_MM_HEADER_4, + HID_MM_HEADER_5, + HID_MM_HEADER_6, + HID_MM_HEADER_7, + HID_MM_HEADER_8, + HID_MM_HEADER_9, + HID_MM_HEADER_10, + HID_MM_HEADER_11, + HID_MM_HEADER_12, + HID_MM_HEADER_13 + }; + //fill the controls - for(USHORT i = 0; i < rHeaders.Count(); ++i) + for(sal_uInt16 i = 0; i < rHeaders.Count(); ++i) { const XubString& rHeader = rHeaders.GetString( i ); FixedInfo* pNewText = new FixedInfo(&m_aWindow, ResId( FT_FIELDS, *rResId.GetResMgr())); @@ -1019,7 +1038,7 @@ SwAssignFieldsControl::SwAssignFieldsControl( sLabel.Insert(rHeader, 1); pNewText->SetText(sLabel); ListBox* pNewLB = new ListBox(&m_aWindow, ResId(LB_FIELDS, *rResId.GetResMgr())); - pNewLB->SetHelpId( HID_MM_HEADER_0 + i ); + pNewLB->SetHelpId( aHIDs[i] ); pNewLB->SelectEntryPos(0); for(sal_Int32 nField = 0; nField < aFields.getLength(); ++nField) pNewLB->InsertEntry(pFields[nField]); @@ -1115,7 +1134,7 @@ long SwAssignFieldsControl::PreNotify( NotifyEvent& rNEvt ) if(rNEvt.GetType() == EVENT_COMMAND) { const CommandEvent* pCEvt = rNEvt.GetCommandEvent(); - USHORT nCmd = pCEvt->GetCommand(); + sal_uInt16 nCmd = pCEvt->GetCommand(); if( COMMAND_WHEEL == nCmd ) { Command(*pCEvt); @@ -1147,7 +1166,7 @@ IMPL_LINK(SwAssignFieldsControl, ScrollHdl_Impl, ScrollBar*, pScroll) // The first line has to be -(nThumb * m_nYOffset) in the negative long nMove = m_nFirstYPos - (*m_aMatches.begin())->GetPosPixel().Y() - (nThumb * m_nYOffset); - SetUpdateMode(FALSE); + SetUpdateMode(sal_False); long nIndex; ::std::vector<FixedInfo*>::iterator aFIIter; for(nIndex = 0, aFIIter = m_aFieldNames.begin(); aFIIter != m_aFieldNames.end(); ++aFIIter, ++nIndex) @@ -1157,7 +1176,7 @@ IMPL_LINK(SwAssignFieldsControl, ScrollHdl_Impl, ScrollBar*, pScroll) lcl_Move(*aLBIter, nMove); for(nIndex = 0, aFIIter = m_aPreviews.begin(); aFIIter != m_aPreviews.end(); ++aFIIter, ++nIndex) lcl_Move(*aFIIter, nMove); - SetUpdateMode(TRUE); + SetUpdateMode(sal_True); return 0; } @@ -1315,11 +1334,11 @@ DDListBox::DDListBox(SwCustomizeAddressBlockDialog* pParent, const ResId rResId) SvTreeListBox(pParent, rResId), m_pParentDialog(pParent) { - SetWindowBits( /*WB_HASBUTTONS|WB_HASBUTTONSATROOT|*/ + SetStyle( GetStyle() | /*WB_HASBUTTONS|WB_HASBUTTONSATROOT|*/ WB_CLIPCHILDREN ); SetSelectionMode( SINGLE_SELECTION ); SetDragDropMode( SV_DRAGDROP_CTRL_COPY ); - EnableAsyncDrag(TRUE); + EnableAsyncDrag(sal_True); SetHelpId(HID_MM_CUSTOMFIELDS); // expand selection to the complete width of the ListBox SetHighlightRange(); @@ -1366,7 +1385,7 @@ AddressMultiLineEdit::AddressMultiLineEdit(SwCustomizeAddressBlockDialog* pParen { GetTextView()->SupportProtectAttribute(sal_True); StartListening(*GetTextEngine()); - EnableFocusSelectionHide(FALSE); + EnableFocusSelectionHide(sal_False); } AddressMultiLineEdit::~AddressMultiLineEdit() @@ -1416,8 +1435,8 @@ void AddressMultiLineEdit::SetText( const String& rStr ) ExtTextEngine* pTextEngine = GetTextEngine(); TextAttribProtect aProtectAttr; - ULONG nParaCount = pTextEngine->GetParagraphCount(); - for(ULONG nPara = 0; nPara < nParaCount; ++nPara) + sal_uLong nParaCount = pTextEngine->GetParagraphCount(); + for(sal_uLong nPara = 0; nPara < nParaCount; ++nPara) { xub_StrLen nIndex = 0; String sPara = pTextEngine->GetText( nPara ); @@ -1428,11 +1447,11 @@ void AddressMultiLineEdit::SetText( const String& rStr ) } while(true) { - USHORT nStart = sPara.Search( '<', nIndex ); - USHORT nEnd = sPara.Search( '>', nStart ); + sal_uInt16 nStart = sPara.Search( '<', nIndex ); + sal_uInt16 nEnd = sPara.Search( '>', nStart ); nIndex = nEnd; if(nStart != STRING_NOTFOUND && nEnd != STRING_NOTFOUND) - pTextEngine->SetAttrib( aProtectAttr, nPara, nStart, nEnd + 1, FALSE ); + pTextEngine->SetAttrib( aProtectAttr, nPara, nStart, nEnd + 1, sal_False ); else break; } @@ -1458,8 +1477,8 @@ void AddressMultiLineEdit::InsertNewEntry( const String& rStr ) // insert new entry after current selected one. ExtTextView* pTextView = GetTextView(); const TextSelection& rSelection = pTextView->GetSelection(); - ULONG nPara = rSelection.GetStart().GetPara(); - USHORT nIndex = rSelection.GetEnd().GetIndex(); + sal_uLong nPara = rSelection.GetStart().GetPara(); + sal_uInt16 nIndex = rSelection.GetEnd().GetIndex(); ExtTextEngine *pTextEngine = GetTextEngine(); const TextCharAttrib *pAttrib; if(0 != (pAttrib = pTextEngine->FindCharAttrib( rSelection.GetStart(), TEXTATTR_PROTECTED ))) @@ -1474,7 +1493,7 @@ void AddressMultiLineEdit::InsertNewEntry( const String& rStr ) Modify(); } -void AddressMultiLineEdit::InsertNewEntryAtPosition( const String& rStr, ULONG nPara, USHORT nIndex ) +void AddressMultiLineEdit::InsertNewEntryAtPosition( const String& rStr, sal_uLong nPara, sal_uInt16 nIndex ) { ExtTextEngine* pTextEngine = GetTextEngine(); TextPaM aInsertPos( nPara, nIndex ); @@ -1500,7 +1519,7 @@ void AddressMultiLineEdit::RemoveCurrentEntry() (pBeginAttrib->GetStart() <= rSelection.GetStart().GetIndex() && pBeginAttrib->GetEnd() >= rSelection.GetEnd().GetIndex())) { - ULONG nPara = rSelection.GetStart().GetPara(); + sal_uLong nPara = rSelection.GetStart().GetPara(); TextSelection aEntrySel(TextPaM( nPara, pBeginAttrib->GetStart()), TextPaM(nPara, pBeginAttrib->GetEnd())); pTextEngine->ReplaceText(aEntrySel, String()); //restore the attributes @@ -1520,8 +1539,8 @@ void AddressMultiLineEdit::MoveCurrentItem(sal_uInt16 nMove) && pBeginAttrib->GetEnd() >= rSelection.GetEnd().GetIndex())) { //current item has been found - ULONG nPara = rSelection.GetStart().GetPara(); - USHORT nIndex = pBeginAttrib->GetStart(); + sal_uLong nPara = rSelection.GetStart().GetPara(); + sal_uInt16 nIndex = pBeginAttrib->GetStart(); TextSelection aEntrySel(TextPaM( nPara, pBeginAttrib->GetStart()), TextPaM(nPara, pBeginAttrib->GetEnd())); String sCurrentItem = pTextEngine->GetText(aEntrySel); pTextEngine->RemoveAttrib( nPara, *pBeginAttrib ); @@ -1625,7 +1644,7 @@ String AddressMultiLineEdit::GetCurrentItem() (pBeginAttrib->GetStart() <= rSelection.GetStart().GetIndex() && pBeginAttrib->GetEnd() >= rSelection.GetEnd().GetIndex())) { - ULONG nPara = rSelection.GetStart().GetPara(); + sal_uLong nPara = rSelection.GetStart().GetPara(); TextSelection aEntrySel(TextPaM( nPara, pBeginAttrib->GetStart()), TextPaM(nPara, pBeginAttrib->GetEnd())); sRet = pTextEngine->GetText( aEntrySel ); } @@ -1642,7 +1661,7 @@ void AddressMultiLineEdit::SelectCurrentItem() (pBeginAttrib->GetStart() <= rSelection.GetStart().GetIndex() && pBeginAttrib->GetEnd() >= rSelection.GetEnd().GetIndex())) { - ULONG nPara = rSelection.GetStart().GetPara(); + sal_uLong nPara = rSelection.GetStart().GetPara(); TextSelection aEntrySel(TextPaM( nPara, pBeginAttrib->GetStart()), TextPaM(nPara, pBeginAttrib->GetEnd())); pTextView->SetSelection(aEntrySel); Invalidate(); @@ -1653,8 +1672,8 @@ String AddressMultiLineEdit::GetAddress() { String sRet; ExtTextEngine* pTextEngine = GetTextEngine(); - ULONG nParaCount = pTextEngine->GetParagraphCount(); - for(ULONG nPara = nParaCount; nPara; --nPara) + sal_uLong nParaCount = pTextEngine->GetParagraphCount(); + for(sal_uLong nPara = nParaCount; nPara; --nPara) { String sPara = pTextEngine->GetText( nPara - 1); sPara.EraseTrailingChars(' '); diff --git a/sw/source/ui/dbui/mmaddressblockpage.hxx b/sw/source/ui/dbui/mmaddressblockpage.hxx index b6c0d0d8cd..e4a2f2fe31 100644 --- a/sw/source/ui/dbui/mmaddressblockpage.hxx +++ b/sw/source/ui/dbui/mmaddressblockpage.hxx @@ -186,7 +186,7 @@ public: String GetAddress(); void InsertNewEntry( const String& rStr ); - void InsertNewEntryAtPosition( const String& rStr, ULONG nPara, USHORT nIndex ); + void InsertNewEntryAtPosition( const String& rStr, sal_uLong nPara, sal_uInt16 nIndex ); void RemoveCurrentEntry(); void MoveCurrentItem(sal_uInt16 nMove); diff --git a/sw/source/ui/dbui/mmaddressblockpage.src b/sw/source/ui/dbui/mmaddressblockpage.src index 9058cfb7ee..3f8756f03c 100644 --- a/sw/source/ui/dbui/mmaddressblockpage.src +++ b/sw/source/ui/dbui/mmaddressblockpage.src @@ -63,6 +63,7 @@ TabPage DLG_MM_ADDRESSBLOCK_PAGE }; PushButton PB_ADDRESSLIST { + HelpID = "sw:PushButton:DLG_MM_ADDRESSBLOCK_PAGE:PB_ADDRESSLIST"; Pos = MAP_APPFONT ( 154 , 27 ) ; Size = MAP_APPFONT ( 100 , 14 ) ; Text[ en-US ] = "Select A~ddress List..."; @@ -91,6 +92,7 @@ TabPage DLG_MM_ADDRESSBLOCK_PAGE }; CheckBox CB_ADDRESS { + HelpID = "sw:CheckBox:DLG_MM_ADDRESSBLOCK_PAGE:CB_ADDRESS"; Pos = MAP_APPFONT ( 16 , 66 ) ; Size = MAP_APPFONT ( 242 , 10 ) ; Text[ en-US ] = "~This document shall contain an address block"; @@ -103,6 +105,7 @@ TabPage DLG_MM_ADDRESSBLOCK_PAGE }; PushButton PB_SETTINGS { + HelpID = "sw:PushButton:DLG_MM_ADDRESSBLOCK_PAGE:PB_SETTINGS"; Pos = MAP_APPFONT ( 194 , 110 ) ; Size = MAP_APPFONT ( 60 , 14 ) ; Group = FALSE; @@ -110,6 +113,7 @@ TabPage DLG_MM_ADDRESSBLOCK_PAGE }; CheckBox CB_HIDE_EMPTY_PARA { + HelpID = "sw:CheckBox:DLG_MM_ADDRESSBLOCK_PAGE:CB_HIDE_EMPTY_PARA"; Pos = MAP_APPFONT ( 24 , 127 ) ; Size = MAP_APPFONT ( 230 , 10 ) ; Text[ en-US ] = "~Suppress lines with just empty fields"; @@ -134,6 +138,7 @@ TabPage DLG_MM_ADDRESSBLOCK_PAGE }; PushButton PB_ASSIGN { + HelpID = "sw:PushButton:DLG_MM_ADDRESSBLOCK_PAGE:PB_ASSIGN"; Pos = MAP_APPFONT ( 194 , 151 ) ; Size = MAP_APPFONT ( 60 , 14 ) ; Text[ en-US ] = "Match ~Fields..."; @@ -169,6 +174,7 @@ TabPage DLG_MM_ADDRESSBLOCK_PAGE }; ImageButton IB_PREVSET { + HelpID = "sw:ImageButton:DLG_MM_ADDRESSBLOCK_PAGE:IB_PREVSET"; Pos = MAP_APPFONT ( 167 , 238 ) ; Size = MAP_APPFONT ( 10 , 10 ) ; SYMBOL = IMAGEBUTTON_PREV; @@ -176,6 +182,7 @@ TabPage DLG_MM_ADDRESSBLOCK_PAGE }; ImageButton IB_NEXTSET { + HelpID = "sw:ImageButton:DLG_MM_ADDRESSBLOCK_PAGE:IB_NEXTSET"; Pos = MAP_APPFONT ( 178 , 238 ) ; Size = MAP_APPFONT ( 10 , 10 ) ; SYMBOL = IMAGEBUTTON_NEXT ; @@ -212,18 +219,21 @@ ModalDialog DLG_MM_SELECTADDRESSBLOCK }; PushButton PB_NEW { + HelpID = "sw:PushButton:DLG_MM_SELECTADDRESSBLOCK:PB_NEW"; Pos = MAP_APPFONT ( 204 , 14 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text[ en-US ] = "~New..."; }; PushButton PB_CUSTOMIZE { + HelpID = "sw:PushButton:DLG_MM_SELECTADDRESSBLOCK:PB_CUSTOMIZE"; Pos = MAP_APPFONT ( 204 , 31 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text[ en-US ] = "~Edit..."; }; PushButton PB_DELETE { + HelpID = "sw:PushButton:DLG_MM_SELECTADDRESSBLOCK:PB_DELETE"; Pos = MAP_APPFONT ( 204 , 48 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Group = FALSE; @@ -238,24 +248,28 @@ ModalDialog DLG_MM_SELECTADDRESSBLOCK }; RadioButton RB_NEVER { + HelpID = "sw:RadioButton:DLG_MM_SELECTADDRESSBLOCK:RB_NEVER"; Pos = MAP_APPFONT ( 12 , 131 ) ; Size = MAP_APPFONT ( 150 , 10 ) ; Text[ en-US ] = "N~ever include the country/region"; }; RadioButton RB_ALWAYS { + HelpID = "sw:RadioButton:DLG_MM_SELECTADDRESSBLOCK:RB_ALWAYS"; Pos = MAP_APPFONT ( 12 , 145 ) ; Size = MAP_APPFONT ( 150 , 10 ) ; Text[ en-US ] = "~Always include the country/region"; }; RadioButton RB_DEPENDENT { + HelpID = "sw:RadioButton:DLG_MM_SELECTADDRESSBLOCK:RB_DEPENDENT"; Pos = MAP_APPFONT ( 12 , 159 ) ; Size = MAP_APPFONT ( 150 , 10 ) ; Text[ en-US ] = "Only ~include the country/region if it is not:"; }; Edit ED_COUNTRY { + HelpID = "sw:Edit:DLG_MM_SELECTADDRESSBLOCK:ED_COUNTRY"; Pos = MAP_APPFONT ( 18 , 172 ) ; Size = MAP_APPFONT ( 180 , 12 ) ; Border = TRUE; @@ -330,6 +344,7 @@ ModalDialog DLG_MM_CUSTOMIZEADDRESSBLOCK }; ImageButton IB_INSERTFIELD { + HelpID = "sw:ImageButton:DLG_MM_CUSTOMIZEADDRESSBLOCK:IB_INSERTFIELD"; Pos = MAP_APPFONT ( 80 , 29 ) ; Size = MAP_APPFONT ( 14 , 14 ) ; Symbol = IMAGEBUTTON_ARROW_RIGHT; @@ -341,6 +356,7 @@ ModalDialog DLG_MM_CUSTOMIZEADDRESSBLOCK }; ImageButton IB_REMOVEFIELD { + HelpID = "sw:ImageButton:DLG_MM_CUSTOMIZEADDRESSBLOCK:IB_REMOVEFIELD"; Pos = MAP_APPFONT ( 80 , 46 ) ; Size = MAP_APPFONT ( 14 , 14 ) ; Symbol = IMAGEBUTTON_ARROW_LEFT; @@ -362,12 +378,14 @@ ModalDialog DLG_MM_CUSTOMIZEADDRESSBLOCK }; MultiLineEdit ED_DRAG { + HelpID = "sw:MultiLineEdit:DLG_MM_CUSTOMIZEADDRESSBLOCK:ED_DRAG"; Pos = MAP_APPFONT ( 106 , 14 ) ; Size = MAP_APPFONT ( 160 , 60 ) ; Border = TRUE; }; ImageButton IB_UP { + HelpID = "sw:ImageButton:DLG_MM_CUSTOMIZEADDRESSBLOCK:IB_UP"; Pos = MAP_APPFONT ( 285 , 14 ) ; Size = MAP_APPFONT ( 14 , 14 ) ; Symbol = IMAGEBUTTON_ARROW_UP; @@ -375,6 +393,7 @@ ModalDialog DLG_MM_CUSTOMIZEADDRESSBLOCK }; ImageButton IB_LEFT { + HelpID = "sw:ImageButton:DLG_MM_CUSTOMIZEADDRESSBLOCK:IB_LEFT"; Pos = MAP_APPFONT ( 270 , 29 ) ; Size = MAP_APPFONT ( 14 , 14 ) ; Symbol = IMAGEBUTTON_ARROW_LEFT; @@ -382,6 +401,7 @@ ModalDialog DLG_MM_CUSTOMIZEADDRESSBLOCK }; ImageButton IB_RIGHT { + HelpID = "sw:ImageButton:DLG_MM_CUSTOMIZEADDRESSBLOCK:IB_RIGHT"; Pos = MAP_APPFONT ( 300 , 29 ) ; Size = MAP_APPFONT ( 14 , 14 ) ; Symbol = IMAGEBUTTON_ARROW_RIGHT; @@ -389,6 +409,7 @@ ModalDialog DLG_MM_CUSTOMIZEADDRESSBLOCK }; ImageButton IB_DOWN { + HelpID = "sw:ImageButton:DLG_MM_CUSTOMIZEADDRESSBLOCK:IB_DOWN"; Pos = MAP_APPFONT ( 285 , 48 ) ; Size = MAP_APPFONT ( 14 , 14 ) ; Symbol = IMAGEBUTTON_ARROW_DOWN; @@ -403,6 +424,7 @@ ModalDialog DLG_MM_CUSTOMIZEADDRESSBLOCK }; ComboBox CB_FIELD { + HelpID = "sw:ComboBox:DLG_MM_CUSTOMIZEADDRESSBLOCK:CB_FIELD"; Pos = MAP_APPFONT ( 106 , 89 ) ; Size = MAP_APPFONT ( 160 , 50 ) ; Border = TRUE; @@ -551,6 +573,7 @@ ModalDialog DLG_MM_ASSIGNFIELDS }; ListBox LB_FIELDS { + HelpID = "sw:ListBox:DLG_MM_ASSIGNFIELDS:LB_FIELDS"; Pos = MAP_APPFONT ( 83 , 4 ) ; Size = MAP_APPFONT ( 74 , 50 ) ; TabStop = TRUE; diff --git a/sw/source/ui/dbui/mmconfigitem.cxx b/sw/source/ui/dbui/mmconfigitem.cxx index 7deaefb2db..9dd2379093 100644 --- a/sw/source/ui/dbui/mmconfigitem.cxx +++ b/sw/source/ui/dbui/mmconfigitem.cxx @@ -408,7 +408,7 @@ void lcl_ConvertToNumbers(OUString& rBlock, const ResStringArray& rHeaders ) //convert the strings used for UI to numbers used for the configuration String sBlock(rBlock); sBlock.SearchAndReplaceAllAscii("\n", String::CreateFromAscii("\\n")); - for(USHORT i = 0; i < rHeaders.Count(); ++i) + for(sal_uInt16 i = 0; i < rHeaders.Count(); ++i) { String sHeader = rHeaders.GetString( i ); sHeader.Insert('<', 0); @@ -997,7 +997,7 @@ sal_Int32 SwMailMergeConfigItem::MoveResultSet(sal_Int32 nTarget) { if(nTarget > 0) { - BOOL bMoved = m_pImpl->xResultSet->absolute(nTarget); + sal_Bool bMoved = m_pImpl->xResultSet->absolute(nTarget); if(!bMoved) { if(nTarget > 1) @@ -1326,7 +1326,7 @@ bool SwMailMergeConfigItem::IsAddressFieldsAssigned() const if(aItem.bIsColumn) { String sConvertedColumn = aItem.sText; - for(USHORT nColumn = 0; + for(sal_uInt16 nColumn = 0; nColumn < rHeaders.Count() && nColumn < aAssignment.getLength(); ++nColumn) { @@ -1385,7 +1385,7 @@ bool SwMailMergeConfigItem::IsGreetingFieldsAssigned() const if(aItem.bIsColumn) { String sConvertedColumn = aItem.sText; - for(USHORT nColumn = 0; + for(sal_uInt16 nColumn = 0; nColumn < rHeaders.Count() && nColumn < aAssignment.getLength(); ++nColumn) { @@ -1666,13 +1666,13 @@ sal_uInt32 SwMailMergeConfigItem::GetMergedDocumentCount() const SwView* lcl_ExistsView(SwView* pView) { const TypeId aType(TYPE(SwView)); - SfxViewShell* pViewShell = SfxViewShell::GetFirst( &aType, FALSE ); + SfxViewShell* pViewShell = SfxViewShell::GetFirst( &aType, sal_False ); while(pViewShell) { if(pViewShell == pView) return pView; - pViewShell = SfxViewShell::GetNext( *pViewShell, &aType, FALSE ); + pViewShell = SfxViewShell::GetNext( *pViewShell, &aType, sal_False ); } return 0; } diff --git a/sw/source/ui/dbui/mmdocselectpage.cxx b/sw/source/ui/dbui/mmdocselectpage.cxx index 232dbed83e..10fb6251ba 100644 --- a/sw/source/ui/dbui/mmdocselectpage.cxx +++ b/sw/source/ui/dbui/mmdocselectpage.cxx @@ -132,7 +132,7 @@ IMPL_LINK(SwMailMergeDocSelectPage, FileSelectHdl, PushButton*, pButton) { m_aLoadTemplateRB.Check(); SfxNewFileDialog* pNewFileDlg = new SfxNewFileDialog(this, 0); - USHORT nRet = pNewFileDlg->Execute(); + sal_uInt16 nRet = pNewFileDlg->Execute(); if(RET_TEMPLATE_LOAD == nRet) bTemplate = false; else if(RET_CANCEL != nRet) diff --git a/sw/source/ui/dbui/mmdocselectpage.src b/sw/source/ui/dbui/mmdocselectpage.src index ace679af4f..9f6c1df5df 100644 --- a/sw/source/ui/dbui/mmdocselectpage.src +++ b/sw/source/ui/dbui/mmdocselectpage.src @@ -47,48 +47,56 @@ TabPage DLG_MM_DOCSELECT_PAGE }; RadioButton RB_CURRENTDOC { + HelpID = "sw:RadioButton:DLG_MM_DOCSELECT_PAGE:RB_CURRENTDOC"; Pos = MAP_APPFONT ( 12 , 48 ) ; Size = MAP_APPFONT ( 190 , 10 ) ; Text[ en-US ] = "Use the current ~document"; }; RadioButton RB_NEWDOC { + HelpID = "sw:RadioButton:DLG_MM_DOCSELECT_PAGE:RB_NEWDOC"; Pos = MAP_APPFONT ( 12 , 66 ) ; Size = MAP_APPFONT ( 190 , 10 ) ; Text[ en-US ] = "Create a ne~w document"; }; RadioButton RB_LOADDOC { + HelpID = "sw:RadioButton:DLG_MM_DOCSELECT_PAGE:RB_LOADDOC"; Pos = MAP_APPFONT ( 12 , 84) ; Size = MAP_APPFONT ( 190 , 10 ) ; Text[ en-US ] = "Start from ~existing document"; }; PushButton PB_LOADDOC { + HelpID = "sw:PushButton:DLG_MM_DOCSELECT_PAGE:PB_LOADDOC"; Pos = MAP_APPFONT ( 204 , 80) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text[ en-US ] = "B~rowse..."; }; RadioButton RB_LOADTEMPLATE { + HelpID = "sw:RadioButton:DLG_MM_DOCSELECT_PAGE:RB_LOADTEMPLATE"; Pos = MAP_APPFONT ( 12 , 103 ) ; Size = MAP_APPFONT ( 190 , 10 ) ; Text[ en-US ] = "Start from a t~emplate"; }; PushButton PB_BROWSETEMPLATE { + HelpID = "sw:PushButton:DLG_MM_DOCSELECT_PAGE:PB_BROWSETEMPLATE"; Pos = MAP_APPFONT ( 204 , 99 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text[ en-US ] = "B~rowse..."; }; RadioButton RB_RECENTDOC { + HelpID = "sw:RadioButton:DLG_MM_DOCSELECT_PAGE:RB_RECENTDOC"; Pos = MAP_APPFONT ( 12 , 120) ; Size = MAP_APPFONT ( 190 , 10 ) ; Text[ en-US ] = "Start fro~m a recently saved starting document"; }; ListBox LB_RECENTDOC { + HelpID = "sw:ListBox:DLG_MM_DOCSELECT_PAGE:LB_RECENTDOC"; Pos = MAP_APPFONT ( 20 , 134 ) ; Size = MAP_APPFONT ( 180 , 50 ) ; DropDown = TRUE; diff --git a/sw/source/ui/dbui/mmgreetingspage.cxx b/sw/source/ui/dbui/mmgreetingspage.cxx index c8cd2d8cd7..b9803d0615 100644 --- a/sw/source/ui/dbui/mmgreetingspage.cxx +++ b/sw/source/ui/dbui/mmgreetingspage.cxx @@ -56,7 +56,7 @@ void lcl_FillGreetingsBox(ListBox& rBox, const Sequence< ::rtl::OUString> rEntries = rConfig.GetGreetings(eType); for(sal_Int32 nEntry = 0; nEntry < rEntries.getLength(); ++nEntry) rBox.InsertEntry(rEntries[nEntry]); - rBox.SelectEntryPos((USHORT)rConfig.GetCurrentGreeting(eType)); + rBox.SelectEntryPos((sal_uInt16)rConfig.GetCurrentGreeting(eType)); } void lcl_FillGreetingsBox(ComboBox& rBox, @@ -66,7 +66,7 @@ void lcl_FillGreetingsBox(ComboBox& rBox, const Sequence< ::rtl::OUString> rEntries = rConfig.GetGreetings(eType); for(sal_Int32 nEntry = 0; nEntry < rEntries.getLength(); ++nEntry) rBox.InsertEntry(rEntries[nEntry]); - rBox.SelectEntryPos((USHORT)rConfig.GetCurrentGreeting(eType)); + rBox.SelectEntryPos((sal_uInt16)rConfig.GetCurrentGreeting(eType)); } void lcl_StoreGreetingsBox(ListBox& rBox, @@ -75,7 +75,7 @@ void lcl_StoreGreetingsBox(ListBox& rBox, { Sequence< ::rtl::OUString> aEntries(rBox.GetEntryCount()); ::rtl::OUString* pEntries = aEntries.getArray(); - for(USHORT nEntry = 0; nEntry < rBox.GetEntryCount(); ++nEntry) + for(sal_uInt16 nEntry = 0; nEntry < rBox.GetEntryCount(); ++nEntry) pEntries[nEntry] = rBox.GetEntry(nEntry); rConfig.SetGreetings(eType, aEntries); rConfig.SetCurrentGreeting(eType, rBox.GetSelectEntryPos()); @@ -87,7 +87,7 @@ void lcl_StoreGreetingsBox(ComboBox& rBox, { Sequence< ::rtl::OUString> aEntries(rBox.GetEntryCount()); ::rtl::OUString* pEntries = aEntries.getArray(); - for(USHORT nEntry = 0; nEntry < rBox.GetEntryCount(); ++nEntry) + for(sal_uInt16 nEntry = 0; nEntry < rBox.GetEntryCount(); ++nEntry) pEntries[nEntry] = rBox.GetEntry(nEntry); rConfig.SetGreetings(eType, aEntries); rConfig.SetCurrentGreeting(eType, rBox.GetSelectEntryPos()); @@ -95,7 +95,7 @@ void lcl_StoreGreetingsBox(ComboBox& rBox, IMPL_LINK(SwGreetingsHandler, IndividualHdl_Impl, CheckBox*, EMPTYARG) { - BOOL bIndividual = m_pPersonalizedCB->IsEnabled() && m_pPersonalizedCB->IsChecked(); + sal_Bool bIndividual = m_pPersonalizedCB->IsEnabled() && m_pPersonalizedCB->IsChecked(); m_pFemaleFT->Enable(bIndividual); m_pFemaleLB->Enable(bIndividual); m_pFemalePB->Enable(bIndividual); @@ -388,10 +388,10 @@ sal_Bool SwMailMergeGreetingsPage::commitPage( ::svt::WizardTypes::CommitPage lcl_StoreGreetingsBox(m_aFemaleLB, rConfig, SwMailMergeConfigItem::FEMALE); lcl_StoreGreetingsBox(m_aMaleLB, rConfig, SwMailMergeConfigItem::MALE); - USHORT nCurrentTextPos = m_aNeutralCB.GetEntryPos( m_aNeutralCB.GetText() ); + sal_uInt16 nCurrentTextPos = m_aNeutralCB.GetEntryPos( m_aNeutralCB.GetText() ); if(LISTBOX_ENTRY_NOTFOUND == nCurrentTextPos) { - USHORT nCount = m_aNeutralCB.GetEntryCount(); + sal_uInt16 nCount = m_aNeutralCB.GetEntryCount(); m_aNeutralCB.InsertEntry( m_aNeutralCB.GetText(), nCount ); m_aNeutralCB.SelectEntryPos(nCount); } @@ -427,15 +427,15 @@ IMPL_LINK(SwMailMergeGreetingsPage, InsertDataHdl_Impl, ImageButton*, pButton) } else { - BOOL bNext = pButton == &m_aNextSetIB; + sal_Bool bNext = pButton == &m_aNextSetIB; sal_Int32 nPos = rConfig.GetResultSetPosition(); rConfig.MoveResultSet( bNext ? ++nPos : --nPos); } sal_Int32 nPos = rConfig.GetResultSetPosition(); - BOOL bEnable = TRUE; + sal_Bool bEnable = sal_True; if(nPos < 1) { - bEnable = FALSE; + bEnable = sal_False; nPos = 1; } else diff --git a/sw/source/ui/dbui/mmgreetingspage.src b/sw/source/ui/dbui/mmgreetingspage.src index fff77d9240..5cae953a35 100644 --- a/sw/source/ui/dbui/mmgreetingspage.src +++ b/sw/source/ui/dbui/mmgreetingspage.src @@ -144,6 +144,7 @@ TabPage DLG_MM_GREETINGS_PAGE }; CheckBox CB_GREETINGLINE { + HelpID = "sw:CheckBox:DLG_MM_GREETINGS_PAGE:CB_GREETINGLINE"; Pos = MAP_APPFONT ( 12 , 27 ); Size = MAP_APPFONT ( 242 , 10 ); Text[ en-US ] = "This document should contain a salutation"; @@ -163,6 +164,7 @@ TabPage DLG_MM_GREETINGS_PAGE }; PushButton PB_ASSIGN { + HelpID = "sw:PushButton:DLG_MM_GREETINGS_PAGE:PB_ASSIGN"; Pos = MAP_APPFONT ( 204 , 179 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text[ en-US ] = "~Match fields..."; @@ -175,6 +177,7 @@ TabPage DLG_MM_GREETINGS_PAGE }; ImageButton IB_PREVSET { + HelpID = "sw:ImageButton:DLG_MM_GREETINGS_PAGE:IB_PREVSET"; Pos = MAP_APPFONT ( 177 , 204 ) ; Size = MAP_APPFONT ( 10 , 10 ) ; SYMBOL = IMAGEBUTTON_PREV; @@ -182,6 +185,7 @@ TabPage DLG_MM_GREETINGS_PAGE }; ImageButton IB_NEXTSET { + HelpID = "sw:ImageButton:DLG_MM_GREETINGS_PAGE:IB_NEXTSET"; Pos = MAP_APPFONT ( 188 , 204 ) ; Size = MAP_APPFONT ( 10 , 10 ) ; SYMBOL = IMAGEBUTTON_NEXT ; @@ -208,6 +212,7 @@ ModalDialog DLG_MM_MAILBODY Text [ en-US ] = "E-Mail Message"; CheckBox CB_GREETINGLINE { + HelpID = "sw:CheckBox:DLG_MM_MAILBODY:CB_GREETINGLINE"; Pos = MAP_APPFONT ( 6 , 3 ) ; Size = MAP_APPFONT ( 242 , 10 ) ; Text[ en-US ] = "This e-mail should contain a salutation"; @@ -221,6 +226,7 @@ ModalDialog DLG_MM_MAILBODY }; MultiLineEdit MLE_BODY { + HelpID = "sw:MultiLineEdit:DLG_MM_MAILBODY:MLE_BODY"; Pos = MAP_APPFONT ( 12, 151 ) ; Size = MAP_APPFONT ( 180 , 50 ) ; Border = TRUE; diff --git a/sw/source/ui/dbui/mmlayoutpage.cxx b/sw/source/ui/dbui/mmlayoutpage.cxx index eaa6dbe660..2e772aea98 100644 --- a/sw/source/ui/dbui/mmlayoutpage.cxx +++ b/sw/source/ui/dbui/mmlayoutpage.cxx @@ -147,8 +147,8 @@ SwMailMergeLayoutPage::SwMailMergeLayoutPage( SwMailMergeWizard* _pParent) : m_pExampleFrame = new SwOneExampleFrame( m_aExampleWIN, EX_SHOW_DEFAULT_PAGE, &aLink, &m_sExampleURL ); - m_aExampleWIN.Show( FALSE ); - m_aExampleContainerWIN.Show(TRUE); + m_aExampleWIN.Show( sal_False ); + m_aExampleContainerWIN.Show(sal_True); m_aLeftMF.SetValue(m_aLeftMF.Normalize(DEFAULT_LEFT_DISTANCE), FUNIT_TWIP); m_aTopMF.SetValue(m_aTopMF.Normalize(DEFAULT_TOP_DISTANCE), FUNIT_TWIP); @@ -230,7 +230,7 @@ void SwMailMergeLayoutPage::ActivatePage() m_pExampleWrtShell->GotoFly( m_pAddressBlockFormat->GetName() ); m_pExampleWrtShell->DelRight(); m_pAddressBlockFormat = 0; - m_pExampleWrtShell->Pop(FALSE); + m_pExampleWrtShell->Pop(sal_False); } else { @@ -368,7 +368,7 @@ SwFrmFmt* SwMailMergeLayoutPage::InsertAddressFrame( if(aItem.bIsColumn) { String sConvertedColumn = aItem.sText; - for(USHORT nColumn = 0; + for(sal_uInt16 nColumn = 0; nColumn < rHeaders.Count() && nColumn < aAssignment.getLength(); ++nColumn) { @@ -459,7 +459,7 @@ void SwMailMergeLayoutPage::InsertGreeting(SwWrtShell& rShell, SwMailMergeConfig { //there's already text at the desired position //go to start of the doc, directly! - rShell.SttEndDoc(TRUE); + rShell.SttEndDoc(sal_True); //and go by paragraph until the position is reached long nYPos = rShell.GetCharRect().Top(); while(nYPos < GREETING_TOP_DISTANCE) @@ -625,7 +625,7 @@ void SwMailMergeLayoutPage::InsertGreeting(SwWrtShell& rShell, SwMailMergeConfig { String sDB(sDBName); String sConvertedColumn = aItem.sText; - for(USHORT nColumn = 0; + for(sal_uInt16 nColumn = 0; nColumn < rHeaders.Count() && nColumn < aAssignment.getLength(); ++nColumn) { @@ -666,7 +666,7 @@ void SwMailMergeLayoutPage::InsertGreeting(SwWrtShell& rShell, SwMailMergeConfig { rShell.Push(); rShell.SplitNode(); - rShell.Pop(FALSE); + rShell.Pop(sal_False); } //put the cursor to the start of the paragraph rShell.SttPara(); @@ -676,8 +676,8 @@ void SwMailMergeLayoutPage::InsertGreeting(SwWrtShell& rShell, SwMailMergeConfig IMPL_LINK(SwMailMergeLayoutPage, PreviewLoadedHdl_Impl, void*, EMPTYARG) { - m_aExampleWIN.Show( TRUE ); - m_aExampleContainerWIN.Show(FALSE); + m_aExampleWIN.Show( sal_True ); + m_aExampleContainerWIN.Show(sal_False); Reference< XModel > & xModel = m_pExampleFrame->GetModel(); //now the ViewOptions should be set properly @@ -763,7 +763,7 @@ IMPL_LINK(SwMailMergeLayoutPage, ChangeAddressHdl_Impl, MetricField*, EMPTYARG) IMPL_LINK(SwMailMergeLayoutPage, GreetingsHdl_Impl, PushButton*, pButton) { bool bDown = pButton == &m_aDownPB; - BOOL bMoved = m_pExampleWrtShell->MoveParagraph( bDown ? 1 : -1 ); + sal_Bool bMoved = m_pExampleWrtShell->MoveParagraph( bDown ? 1 : -1 ); if (bMoved || bDown) m_pWizard->GetConfigItem().MoveGreeting(bDown ? 1 : -1 ); if(!bMoved && bDown) diff --git a/sw/source/ui/dbui/mmlayoutpage.src b/sw/source/ui/dbui/mmlayoutpage.src index 07582a45ef..94e1387306 100644 --- a/sw/source/ui/dbui/mmlayoutpage.src +++ b/sw/source/ui/dbui/mmlayoutpage.src @@ -48,6 +48,7 @@ TabPage DLG_MM_LAYOUT_PAGE }; CheckBox CB_ALIGN { + HelpID = "sw:CheckBox:DLG_MM_LAYOUT_PAGE:CB_ALIGN"; Pos = MAP_APPFONT ( 6 , 40 ) ; Size = MAP_APPFONT ( 118 , 10 ) ; Text[ en-US ] = "Align to text body"; @@ -60,6 +61,7 @@ TabPage DLG_MM_LAYOUT_PAGE }; MetricField MF_LEFT { + HelpID = "sw:MetricField:DLG_MM_LAYOUT_PAGE:MF_LEFT"; Pos = MAP_APPFONT ( 78 , 52 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; Border = TRUE ; @@ -83,6 +85,7 @@ TabPage DLG_MM_LAYOUT_PAGE }; MetricField MF_TOP { + HelpID = "sw:MetricField:DLG_MM_LAYOUT_PAGE:MF_TOP"; Pos = MAP_APPFONT ( 78 , 67 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; Border = TRUE ; @@ -112,6 +115,7 @@ TabPage DLG_MM_LAYOUT_PAGE }; PushButton MF_UP { + HelpID = "sw:PushButton:DLG_MM_LAYOUT_PAGE:MF_UP"; Pos = MAP_APPFONT ( 68 , 96 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text[ en-US ] = "~Up"; @@ -124,6 +128,7 @@ TabPage DLG_MM_LAYOUT_PAGE }; PushButton PB_DOWN { + HelpID = "sw:PushButton:DLG_MM_LAYOUT_PAGE:PB_DOWN"; Pos = MAP_APPFONT ( 68 , 113 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text[ en-US ] = "~Down"; @@ -143,6 +148,7 @@ TabPage DLG_MM_LAYOUT_PAGE }; ListBox LB_ZOOM { + HelpID = "sw:ListBox:DLG_MM_LAYOUT_PAGE:LB_ZOOM"; Pos = MAP_APPFONT ( 204 , 182 ) ; Size = MAP_APPFONT ( 50 , 50 ) ; Border = TRUE; diff --git a/sw/source/ui/dbui/mmmergepage.src b/sw/source/ui/dbui/mmmergepage.src index fd9fffc0de..8480e97e0e 100644 --- a/sw/source/ui/dbui/mmmergepage.src +++ b/sw/source/ui/dbui/mmmergepage.src @@ -49,6 +49,7 @@ TabPage DLG_MM_MERGE_PAGE }; PushButton PB_EDIT { + HelpID = "sw:PushButton:DLG_MM_MERGE_PAGE:PB_EDIT"; Pos = MAP_APPFONT ( 70 , 67 ) ; Size = MAP_APPFONT ( 120 , 14 ) ; Text [ en-US ] = "~Edit individual document..."; @@ -67,30 +68,35 @@ TabPage DLG_MM_MERGE_PAGE }; Edit ED_FIND { + HelpID = "sw:Edit:DLG_MM_MERGE_PAGE:ED_FIND"; Pos = MAP_APPFONT ( 55 ,114 ) ; Size = MAP_APPFONT ( 140 , 12 ) ; Border = TRUE; }; PushButton PB_FIND { + HelpID = "sw:PushButton:DLG_MM_MERGE_PAGE:PB_FIND"; Pos = MAP_APPFONT ( 198 ,113 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "~Find..."; }; CheckBox CB_WHOLEWORDS { + HelpID = "sw:CheckBox:DLG_MM_MERGE_PAGE:CB_WHOLEWORDS"; Pos = MAP_APPFONT ( 55 , 131 ) ; Size = MAP_APPFONT ( 180 , 10 ) ; Text [ en-US ] = "Whole wor~ds only"; }; CheckBox CB_BACKWARDS { + HelpID = "sw:CheckBox:DLG_MM_MERGE_PAGE:CB_BACKWARDS"; Pos = MAP_APPFONT ( 55 , 144 ) ; Size = MAP_APPFONT ( 180 , 10 ) ; Text [ en-US ] = "Back~wards"; }; CheckBox CB_MATCHCASE { + HelpID = "sw:CheckBox:DLG_MM_MERGE_PAGE:CB_MATCHCASE"; Pos = MAP_APPFONT ( 55 , 157 ) ; Size = MAP_APPFONT ( 180 , 10 ) ; Text [ en-US ] = "Ma~tch case"; diff --git a/sw/source/ui/dbui/mmoutputpage.cxx b/sw/source/ui/dbui/mmoutputpage.cxx index 4ed4fbf5e8..4189a4e467 100644 --- a/sw/source/ui/dbui/mmoutputpage.cxx +++ b/sw/source/ui/dbui/mmoutputpage.cxx @@ -84,7 +84,7 @@ using namespace svt; using namespace ::com::sun::star; using namespace ::com::sun::star::uno; -String lcl_GetExtensionForDocType(ULONG nDocType) +String lcl_GetExtensionForDocType(sal_uLong nDocType) { String sExtension; switch( nDocType ) @@ -447,7 +447,7 @@ IMPL_LINK(SwMailMergeOutputPage, OutputTypeHdl_Impl, RadioButton*, pButton) &m_aSendAllRB, &m_aSendDocumentsPB, 0 }; - SetUpdateMode(TRUE); + SetUpdateMode(sal_True); Control** pControl = aControls; do { @@ -543,7 +543,7 @@ IMPL_LINK(SwMailMergeOutputPage, OutputTypeHdl_Impl, RadioButton*, pButton) String sAttach( m_sDefaultAttachmentST ); sAttach += '.'; sAttach += lcl_GetExtensionForDocType( - (ULONG)m_aSendAsLB.GetEntryData(m_aSendAsLB.GetSelectEntryPos())); + (sal_uLong)m_aSendAsLB.GetEntryData(m_aSendAsLB.GetSelectEntryPos())); m_aAttachmentED.SetText( sAttach ); } @@ -589,7 +589,7 @@ IMPL_LINK(SwMailMergeOutputPage, OutputTypeHdl_Impl, RadioButton*, pButton) } m_aFromRB.GetClickHdl().Call(m_aFromRB.IsChecked() ? &m_aFromRB : 0); - SetUpdateMode(FALSE); + SetUpdateMode(sal_False); return 0; } @@ -647,9 +647,9 @@ IMPL_LINK(SwMailMergeOutputPage, SaveStartHdl_Impl, PushButton*, pButton) rConfigItem.AddSavedDocument( aURL.GetMainURL(INetURLObject::DECODE_TO_IURI)); - pButton->Enable(FALSE); + pButton->Enable(sal_False); m_pWizard->enableButtons(WZB_FINISH, sal_True); - pButton->Enable(FALSE); + pButton->Enable(sal_False); } } @@ -782,7 +782,8 @@ IMPL_LINK(SwMailMergeOutputPage, SaveOutputHdl_Impl, PushButton*, pButton) aSaveMonitor.aPrintInfo.SetText(sStat); //now extract a document from the target document - SfxObjectShellRef xTempDocShell( new SwDocShell( SFX_CREATE_MODE_STANDARD ) ); + // the shell will be closed at the end, but it is more safe to use SfxObjectShellLock here + SfxObjectShellLock xTempDocShell( new SwDocShell( SFX_CREATE_MODE_STANDARD ) ); xTempDocShell->DoInitNew( 0 ); SfxViewFrame* pTempFrame = SfxViewFrame::LoadHiddenDocument( *xTempDocShell, 0 ); SwView* pTempView = static_cast<SwView*>( pTempFrame->GetViewShell() ); @@ -797,7 +798,7 @@ IMPL_LINK(SwMailMergeOutputPage, SaveOutputHdl_Impl, PushButton*, pButton) sTargetTempURL, aOpt, sal_True ); pTargetView->GetWrtShell().PastePages(pTempView->GetWrtShell(), - (USHORT)rInfo.nStartPageInTarget, (USHORT)rInfo.nEndPageInTarget ); + (sal_uInt16)rInfo.nStartPageInTarget, (sal_uInt16)rInfo.nEndPageInTarget ); pTargetView->GetWrtShell().EndAction(); //then save it String sOutPath = aURL.GetMainURL(INetURLObject::DECODE_TO_IURI); @@ -907,7 +908,7 @@ IMPL_LINK(SwMailMergeOutputPage, PrintHdl_Impl, PushButton*, EMPTYARG) if(nEnd > rConfigItem.GetMergedDocumentCount()) nEnd = rConfigItem.GetMergedDocumentCount(); } - rConfigItem.SetPrintRange( (USHORT)nBegin, (USHORT)nEnd ); + rConfigItem.SetPrintRange( (sal_uInt16)nBegin, (sal_uInt16)nEnd ); SwDocMergeInfo& rStartInfo = rConfigItem.GetDocumentMergeInfo(nBegin); SwDocMergeInfo& rEndInfo = rConfigItem.GetDocumentMergeInfo(nEnd - 1); @@ -955,7 +956,7 @@ IMPL_LINK(SwMailMergeOutputPage, PrinterSetupHdl_Impl, PushButton*, pButton) IMPL_LINK(SwMailMergeOutputPage, SendTypeHdl_Impl, ListBox*, pBox) { - ULONG nDocType = (ULONG)pBox->GetEntryData(pBox->GetSelectEntryPos()); + sal_uLong nDocType = (sal_uLong)pBox->GetEntryData(pBox->GetSelectEntryPos()); sal_Bool bEnable = MM_DOCTYPE_HTML != nDocType && MM_DOCTYPE_TEXT != nDocType; m_aSendAsPB.Enable( bEnable ); m_aAttachmentFT.Enable( bEnable ); @@ -1008,7 +1009,7 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton) !SwMailMergeHelper::CheckMailAddress(rConfigItem.GetMailAddress()) ) { QueryBox aQuery(pButton, WB_YES_NO_CANCEL, m_sConfigureMail); - USHORT nRet = aQuery.Execute(); + sal_uInt16 nRet = aQuery.Execute(); if(RET_YES == nRet ) { SfxAllItemSet aSet(pTargetView->GetPool()); @@ -1020,8 +1021,6 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton) if(nRet != RET_OK && nRet != RET_YES) return 0; } - //create the send dialog - SwSendMailDialog* pDlg = new SwSendMailDialog( pButton, rConfigItem ); //add the documents sal_uInt32 nBegin = 0; sal_uInt32 nEnd = 0; @@ -1041,12 +1040,31 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton) rtl_TextEncoding eEncoding = ::gsl_getSystemTextEncoding(); SfxFilterContainer* pFilterContainer = SwDocShell::Factory().GetFilterContainer(); const SfxFilter *pSfxFlt = 0; - ULONG nDocType = (ULONG)m_aSendAsLB.GetEntryData(m_aSendAsLB.GetSelectEntryPos()); + sal_uLong nDocType = (sal_uLong)m_aSendAsLB.GetEntryData(m_aSendAsLB.GetSelectEntryPos()); String sExtension = lcl_GetExtensionForDocType(nDocType); switch( nDocType ) { case MM_DOCTYPE_OOO : break; - case MM_DOCTYPE_PDF : break; + case MM_DOCTYPE_PDF : + { + //the method SwIOSystemGetFilterOfFormat( ) returns the template filter + //because it uses the same user data :-( + SfxFilterMatcher aMatcher( pFilterContainer->GetName() ); + SfxFilterMatcherIter aIter( &aMatcher ); + const SfxFilter* pFilter = aIter.First(); + String sFilterMime( String::CreateFromAscii( "application/pdf" )); + while ( pFilter ) + { + if( pFilter->GetMimeType() == sFilterMime && pFilter->CanExport() ) + { + pSfxFlt = pFilter; + break; + } + pFilter = aIter.Next(); + } + + } + break; case MM_DOCTYPE_WORD: { //the method SwIOSystemGetFilterOfFormat( ) returns the template filter @@ -1112,7 +1130,7 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton) ++nTokenCount; } sAttach.SetToken( nTokenCount - 1, '.', lcl_GetExtensionForDocType( - (ULONG)m_aSendAsLB.GetEntryData(m_aSendAsLB.GetSelectEntryPos()))); + (sal_uLong)m_aSendAsLB.GetEntryData(m_aSendAsLB.GetSelectEntryPos()))); m_aAttachmentED.SetText(sAttach); } else @@ -1130,8 +1148,8 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton) if(MM_DOCTYPE_TEXT == nDocType) { SwAsciiOptions aOpt; - USHORT nAppScriptType = GetI18NScriptTypeOfLanguage( (USHORT)GetAppLanguage() ); - USHORT nWhich = GetWhichOfScript( RES_CHRATR_LANGUAGE, nAppScriptType); + sal_uInt16 nAppScriptType = GetI18NScriptTypeOfLanguage( (sal_uInt16)GetAppLanguage() ); + sal_uInt16 nWhich = GetWhichOfScript( RES_CHRATR_LANGUAGE, nAppScriptType); aOpt.SetLanguage( ((SvxLanguageItem&)pTargetView->GetWrtShell(). GetDefault( nWhich )).GetLanguage()); aOpt.SetParaFlags( LINEEND_CR ); @@ -1152,6 +1170,8 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton) uno::Reference< frame::XStorable > xStore( pTargetView->GetDocShell()->GetModel(), uno::UNO_QUERY); xStore->storeToURL( sTargetTempURL, aValues ); + //create the send dialog + SwSendMailDialog* pDlg = new SwSendMailDialog( pButton, rConfigItem ); pDlg->SetDocumentCount( nEnd ); pDlg->ShowDialog(); //help to force painting the dialog @@ -1165,7 +1185,8 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton) SwDocMergeInfo& rInfo = rConfigItem.GetDocumentMergeInfo(nDoc); //now extract a document from the target document - SfxObjectShellRef xTempDocShell( new SwDocShell( SFX_CREATE_MODE_STANDARD ) ); + // the shell will be closed at the end, but it is more safe to use SfxObjectShellLock here + SfxObjectShellLock xTempDocShell( new SwDocShell( SFX_CREATE_MODE_STANDARD ) ); xTempDocShell->DoInitNew( 0 ); SfxViewFrame* pTempFrame = SfxViewFrame::LoadHiddenDocument( *xTempDocShell, 0 ); SwView* pTempView = static_cast<SwView*>( pTempFrame->GetViewShell() ); @@ -1179,7 +1200,7 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton) pTempView->GetDocShell()->LoadStylesFromFile( sTargetTempURL, aOpt, sal_True ); pTargetView->GetWrtShell().PastePages(pTempView->GetWrtShell(), - (USHORT)rInfo.nStartPageInTarget, (USHORT)rInfo.nEndPageInTarget ); + (sal_uInt16)rInfo.nStartPageInTarget, (sal_uInt16)rInfo.nEndPageInTarget ); pTargetView->GetWrtShell().EndAction(); //then save it @@ -1216,7 +1237,7 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton) { { //read in the temporary file and use it as mail body - SfxMedium aMedium( aName.GetValue(), STREAM_READ, TRUE); + SfxMedium aMedium( aName.GetValue(), STREAM_READ, sal_True); SvStream* pInStream = aMedium.GetInStream(); if(pInStream) pInStream->SetStreamCharSet( eEncoding ); diff --git a/sw/source/ui/dbui/mmoutputpage.src b/sw/source/ui/dbui/mmoutputpage.src index 29e54bbb40..4801706083 100644 --- a/sw/source/ui/dbui/mmoutputpage.src +++ b/sw/source/ui/dbui/mmoutputpage.src @@ -48,24 +48,28 @@ TabPage DLG_MM_OUTPUT_PAGE }; RadioButton RB_SAVESTARTDOC { + HelpID = "sw:RadioButton:DLG_MM_OUTPUT_PAGE:RB_SAVESTARTDOC"; Pos = MAP_APPFONT ( 45 , 40 ) ; Size = MAP_APPFONT ( 209 , 10 ) ; Text[ en-US ] = "~Save starting document"; }; RadioButton RB_SAVEMERGEDDOC { + HelpID = "sw:RadioButton:DLG_MM_OUTPUT_PAGE:RB_SAVEMERGEDDOC"; Pos = MAP_APPFONT ( 45 , 53 ) ; Size = MAP_APPFONT ( 209 , 10 ) ; Text[ en-US ] = "Save ~merged document" ; }; RadioButton RB_PRINT { + HelpID = "sw:RadioButton:DLG_MM_OUTPUT_PAGE:RB_PRINT"; Pos = MAP_APPFONT ( 45 , 66 ) ; Size = MAP_APPFONT ( 209 , 10 ) ; Text[ en-US ] = "~Print merged document"; }; RadioButton RB_SENDMAIL { + HelpID = "sw:RadioButton:DLG_MM_OUTPUT_PAGE:RB_SENDMAIL"; Pos = MAP_APPFONT ( 45 , 79 ) ; Size = MAP_APPFONT ( 209 , 10 ) ; Text[ en-US ] = "Send merged document as ~E-Mail"; @@ -77,30 +81,35 @@ TabPage DLG_MM_OUTPUT_PAGE }; PushButton PB_SAVESTARTDOC { + HelpID = "sw:PushButton:DLG_MM_OUTPUT_PAGE:PB_SAVESTARTDOC"; Pos = MAP_APPFONT ( 55 , 108 ) ; Size = MAP_APPFONT ( 100 , 14 ) ; Text[ en-US ] = "Save starting ~document"; }; RadioButton RB_SAVEASONE { + HelpID = "sw:RadioButton:DLG_MM_OUTPUT_PAGE:RB_SAVEASONE"; Pos = MAP_APPFONT ( 45 , 109 ) ; Size = MAP_APPFONT ( 150 , 10 ) ; Text[ en-US ] = "S~ave as single document"; }; RadioButton RB_SAVEINDIVIDUAL { + HelpID = "sw:RadioButton:DLG_MM_OUTPUT_PAGE:RB_SAVEINDIVIDUAL"; Pos = MAP_APPFONT ( 45, 123 ) ; Size = MAP_APPFONT ( 150 , 10 ) ; Text[ en-US ] = "Sa~ve as individual documents"; }; RadioButton RB_FROM { + HelpID = "sw:RadioButton:DLG_MM_OUTPUT_PAGE:RB_FROM"; Pos = MAP_APPFONT ( 45 , 137 ) ; Size = MAP_APPFONT ( 30 , 10 ) ; Text[ en-US ] = "~From"; }; NumericField NF_FROM { + HelpID = "sw:NumericField:DLG_MM_OUTPUT_PAGE:NF_FROM"; Pos = MAP_APPFONT ( 78 , 136 ) ; Size = MAP_APPFONT ( 20 , 10 ) ; Border = TRUE; @@ -120,6 +129,7 @@ TabPage DLG_MM_OUTPUT_PAGE }; NumericField NF_TO { + HelpID = "sw:NumericField:DLG_MM_OUTPUT_PAGE:NF_TO"; Pos = MAP_APPFONT ( 124 , 136 ) ; Size = MAP_APPFONT ( 20 , 10 ) ; Border = TRUE; @@ -132,6 +142,7 @@ TabPage DLG_MM_OUTPUT_PAGE }; PushButton PB_SAVENOW { + HelpID = "sw:PushButton:DLG_MM_OUTPUT_PAGE:PB_SAVENOW"; Pos = MAP_APPFONT ( 45 , 150 ) ; Size = MAP_APPFONT ( 80 , 14 ) ; Text[ en-US ] = "Save Do~cuments"; @@ -144,6 +155,7 @@ TabPage DLG_MM_OUTPUT_PAGE }; ListBox LB_PRINT { + HelpID = "sw:ListBox:DLG_MM_OUTPUT_PAGE:LB_PRINT"; Pos = MAP_APPFONT ( 45 , 109 ) ; Size = MAP_APPFONT ( 147 , 50 ) ; Border = TRUE; @@ -152,18 +164,21 @@ TabPage DLG_MM_OUTPUT_PAGE }; PushButton PB_PRINTERSETTINGS { + HelpID = "sw:PushButton:DLG_MM_OUTPUT_PAGE:PB_PRINTERSETTINGS"; Pos = MAP_APPFONT ( 198 , 108 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text[ en-US ] = "P~roperties..."; }; RadioButton RB_PRINTALL { + HelpID = "sw:RadioButton:DLG_MM_OUTPUT_PAGE:RB_PRINTALL"; Pos = MAP_APPFONT ( 45 , 126 ) ; Size = MAP_APPFONT ( 150 , 10 ) ; Text[ en-US ] = "Print ~all documents"; }; PushButton PB_PRINTNOW { + HelpID = "sw:PushButton:DLG_MM_OUTPUT_PAGE:PB_PRINTNOW"; Pos = MAP_APPFONT ( 45 , 155 ) ; Size = MAP_APPFONT ( 80 , 14 ) ; Text[ en-US ] = "Prin~t Documents"; @@ -177,6 +192,7 @@ TabPage DLG_MM_OUTPUT_PAGE }; ListBox LB_MAILTO { + HelpID = "sw:ListBox:DLG_MM_OUTPUT_PAGE:LB_MAILTO"; Pos = MAP_APPFONT ( 45 , 109 ) ; Size = MAP_APPFONT ( 147 , 50 ) ; DropDown = TRUE; @@ -184,6 +200,7 @@ TabPage DLG_MM_OUTPUT_PAGE }; PushButton PB_COPYTO { + HelpID = "sw:PushButton:DLG_MM_OUTPUT_PAGE:PB_COPYTO"; Pos = MAP_APPFONT ( 198 , 108 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text[ en-US ] = "~Copy to..."; @@ -196,6 +213,7 @@ TabPage DLG_MM_OUTPUT_PAGE }; Edit ED_SUBJECT { + HelpID = "sw:Edit:DLG_MM_OUTPUT_PAGE:ED_SUBJECT"; Pos = MAP_APPFONT ( 45 , 125 ) ; Size = MAP_APPFONT ( 147 , 12 ) ; Border = TRUE; @@ -208,6 +226,7 @@ TabPage DLG_MM_OUTPUT_PAGE }; ListBox LB_SENDAS { + HelpID = "sw:ListBox:DLG_MM_OUTPUT_PAGE:LB_SENDAS"; Pos = MAP_APPFONT ( 45 , 141 ) ; Size = MAP_APPFONT (147 , 70 ) ; DropDown = TRUE; @@ -231,6 +250,7 @@ TabPage DLG_MM_OUTPUT_PAGE }; PushButton PB_SENDAS { + HelpID = "sw:PushButton:DLG_MM_OUTPUT_PAGE:PB_SENDAS"; Pos = MAP_APPFONT ( 198 , 140 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text[ en-US ] = "Pr~operties..."; @@ -243,18 +263,21 @@ TabPage DLG_MM_OUTPUT_PAGE }; Edit ED_ATTACHMENT { + HelpID = "sw:Edit:DLG_MM_OUTPUT_PAGE:ED_ATTACHMENT"; Pos = MAP_APPFONT ( 45 , 168 ) ; Size = MAP_APPFONT ( 147 , 12 ) ; Border = TRUE; }; RadioButton RB_SENDALL { + HelpID = "sw:RadioButton:DLG_MM_OUTPUT_PAGE:RB_SENDALL"; Pos = MAP_APPFONT ( 45 , 184 ) ; Size = MAP_APPFONT ( 153 , 10 ) ; Text[ en-US ] = "S~end all documents"; }; PushButton PB_SENDDOCUMENTS { + HelpID = "sw:PushButton:DLG_MM_OUTPUT_PAGE:PB_SENDDOCUMENTS"; Pos = MAP_APPFONT ( 45 , 212 ) ; Size = MAP_APPFONT ( 80 , 14 ) ; Text[ en-US ] = "Se~nd documents"; @@ -321,6 +344,7 @@ ModalDialog DLG_MM_COPYTO }; Edit ED_CC { + HelpID = "sw:Edit:DLG_MM_COPYTO:ED_CC"; Pos = MAP_APPFONT ( 40 , 15 ) ; Size = MAP_APPFONT ( 204 , 12 ) ; Border = TRUE; @@ -333,6 +357,7 @@ ModalDialog DLG_MM_COPYTO }; Edit ED_BCC { + HelpID = "sw:Edit:DLG_MM_COPYTO:ED_BCC"; Pos = MAP_APPFONT ( 40 , 31 ) ; Size = MAP_APPFONT ( 204 , 12 ) ; Border = TRUE; @@ -396,6 +421,7 @@ ModalDialog DLG_MM_SAVEWARNING }; Edit ED_FILENAME { + HelpID = "sw:Edit:DLG_MM_SAVEWARNING:ED_FILENAME"; Pos = MAP_APPFONT ( 40 , 50 ) ; Size = MAP_APPFONT ( 154 , 12 ) ; Border = TRUE; @@ -439,6 +465,7 @@ ModalDialog DLG_MM_QUERY }; Edit ED_TEXT { + HelpID = "sw:Edit:DLG_MM_QUERY:ED_TEXT"; Pos = MAP_APPFONT ( 40 , 39 ) ; Size = MAP_APPFONT ( 194 , 12 ) ; Border = TRUE; diff --git a/sw/source/ui/dbui/mmoutputtypepage.src b/sw/source/ui/dbui/mmoutputtypepage.src index a6dd74cc7a..72d7e39365 100644 --- a/sw/source/ui/dbui/mmoutputtypepage.src +++ b/sw/source/ui/dbui/mmoutputtypepage.src @@ -48,12 +48,14 @@ TabPage DLG_MM_OUTPUTTYPE_PAGE }; RadioButton RB_LETTER { + HelpID = "sw:RadioButton:DLG_MM_OUTPUTTYPE_PAGE:RB_LETTER"; Pos = MAP_APPFONT ( 12 , 43 ) ; Size = MAP_APPFONT ( 240 , 10 ) ; Text[ en-US ] = "~Letter"; }; RadioButton RB_MAIL { + HelpID = "sw:RadioButton:DLG_MM_OUTPUTTYPE_PAGE:RB_MAIL"; Pos = MAP_APPFONT ( 12 , 57 ) ; Size = MAP_APPFONT ( 240 , 10 ) ; Text[ en-US ] = "~E-mail message"; diff --git a/sw/source/ui/dbui/mmpreparemergepage.src b/sw/source/ui/dbui/mmpreparemergepage.src index b1ecd375d4..c763cfa465 100644 --- a/sw/source/ui/dbui/mmpreparemergepage.src +++ b/sw/source/ui/dbui/mmpreparemergepage.src @@ -57,6 +57,7 @@ TabPage DLG_MM_PREPAREMERGE_PAGE PushButton PB_FIRST { + HelpID = "sw:PushButton:DLG_MM_PREPAREMERGE_PAGE:PB_FIRST"; Pos = MAP_APPFONT ( 75 , 55 ) ; Size = MAP_APPFONT ( 20 , 14 ) ; Text = "|<" ; @@ -64,6 +65,7 @@ TabPage DLG_MM_PREPAREMERGE_PAGE }; PushButton PB_PREV { + HelpID = "sw:PushButton:DLG_MM_PREPAREMERGE_PAGE:PB_PREV"; Pos = MAP_APPFONT ( 98 , 55 ) ; Size = MAP_APPFONT ( 20 , 14 ) ; Text = "<" ; @@ -71,6 +73,7 @@ TabPage DLG_MM_PREPAREMERGE_PAGE }; NumericField ED_RECORD { + HelpID = "sw:NumericField:DLG_MM_PREPAREMERGE_PAGE:ED_RECORD"; Pos = MAP_APPFONT ( 121 , 56 ) ; Size = MAP_APPFONT ( 20 , 12 ) ; Border = TRUE ; @@ -83,6 +86,7 @@ TabPage DLG_MM_PREPAREMERGE_PAGE }; PushButton PB_NEXT { + HelpID = "sw:PushButton:DLG_MM_PREPAREMERGE_PAGE:PB_NEXT"; Pos = MAP_APPFONT ( 144 , 55 ) ; Size = MAP_APPFONT ( 20 , 14 ) ; Text = ">" ; @@ -90,6 +94,7 @@ TabPage DLG_MM_PREPAREMERGE_PAGE }; PushButton PB_LAST { + HelpID = "sw:PushButton:DLG_MM_PREPAREMERGE_PAGE:PB_LAST"; Pos = MAP_APPFONT ( 167 , 55 ) ; Size = MAP_APPFONT ( 20 , 14 ) ; Text = ">|" ; @@ -97,6 +102,7 @@ TabPage DLG_MM_PREPAREMERGE_PAGE }; CheckBox CB_EXCLUDE { + HelpID = "sw:CheckBox:DLG_MM_PREPAREMERGE_PAGE:CB_EXCLUDE"; Pos = MAP_APPFONT ( 75, 77 ) ; Size = MAP_APPFONT ( 179 , 10 ) ; Text[ en-US ] = "E~xclude this recipient"; @@ -116,6 +122,7 @@ TabPage DLG_MM_PREPAREMERGE_PAGE }; PushButton PB_EDIT { + HelpID = "sw:PushButton:DLG_MM_PREPAREMERGE_PAGE:PB_EDIT"; Pos = MAP_APPFONT ( 90 , 185 ) ; Size = MAP_APPFONT ( 80 , 14 ) ; Text[ en-US ] = "~Edit Document..."; diff --git a/sw/source/ui/dbui/selectdbtabledialog.cxx b/sw/source/ui/dbui/selectdbtabledialog.cxx index 1e31befb3d..1eed784443 100644 --- a/sw/source/ui/dbui/selectdbtabledialog.cxx +++ b/sw/source/ui/dbui/selectdbtabledialog.cxx @@ -107,11 +107,11 @@ SwSelectDBTableDialog::SwSelectDBTableDialog(Window* pParent, static long nTabs[] = {3, 0, aSz.Width()/2, aSz.Width() }; m_aTableLB.SetTabs(&nTabs[0], MAP_PIXEL); m_aTableLB.SetHelpId(HID_MM_SELECTDBTABLEDDIALOG_LISTBOX); - m_aTableLB.SetWindowBits( WB_CLIPCHILDREN ); + m_aTableLB.SetStyle( m_aTableLB.GetStyle() | WB_CLIPCHILDREN ); m_aTableLB.SetSpaceBetweenEntries(3); m_aTableLB.SetSelectionMode( SINGLE_SELECTION ); m_aTableLB.SetDragDropMode( 0 ); - m_aTableLB.EnableAsyncDrag(FALSE); + m_aTableLB.EnableAsyncDrag(sal_False); m_aPreviewPB.SetClickHdl(LINK(this, SwSelectDBTableDialog, PreviewHdl)); diff --git a/sw/source/ui/dbui/selectdbtabledialog.src b/sw/source/ui/dbui/selectdbtabledialog.src index 467cb8333e..61d68f6fde 100644 --- a/sw/source/ui/dbui/selectdbtabledialog.src +++ b/sw/source/ui/dbui/selectdbtabledialog.src @@ -54,6 +54,7 @@ ModalDialog DLG_MM_SELECTDBTABLEDDIALOG }; PushButton PB_PREVIEW { + HelpID = "sw:PushButton:DLG_MM_SELECTDBTABLEDDIALOG:PB_PREVIEW"; Pos = MAP_APPFONT ( 6 , 84 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "~Preview"; diff --git a/sw/source/ui/dbui/swdbtoolsclient.cxx b/sw/source/ui/dbui/swdbtoolsclient.cxx index c27dfe3205..657935b6a0 100644 --- a/sw/source/ui/dbui/swdbtoolsclient.cxx +++ b/sw/source/ui/dbui/swdbtoolsclient.cxx @@ -211,7 +211,7 @@ sal_Int32 SwDbtoolsClient::getDefaultNumberFormat( return nRet; } -::rtl::OUString SwDbtoolsClient::getValue( +::rtl::OUString SwDbtoolsClient::getFormattedValue( const uno::Reference< beans::XPropertySet>& _rxColumn, const uno::Reference< util::XNumberFormatter>& _rxFormatter, const lang::Locale& _rLocale, @@ -223,7 +223,7 @@ sal_Int32 SwDbtoolsClient::getDefaultNumberFormat( getAccessTypeConversion(); rtl::OUString sRet; if(xConversion.is()) - sRet = xConversion->getValue(_rxColumn, _rxFormatter, _rLocale, _rNullDate); + sRet = xConversion->getFormattedValue(_rxColumn, _rxFormatter, _rLocale, _rNullDate); return sRet; } diff --git a/sw/source/ui/dialog/SwSpellDialogChildWindow.cxx b/sw/source/ui/dialog/SwSpellDialogChildWindow.cxx index 0bf23a60a6..e0dbe64e3c 100644 --- a/sw/source/ui/dialog/SwSpellDialogChildWindow.cxx +++ b/sw/source/ui/dialog/SwSpellDialogChildWindow.cxx @@ -81,7 +81,7 @@ struct SpellState bool m_bLostFocus; //restart and progress information - USHORT m_SpellStartPosition; + sal_uInt16 m_SpellStartPosition; bool m_bBodySpelled; //body already spelled bool m_bOtherSpelled; //frames, footnotes, headers and footers spelled bool m_bStartedInOther; //started the spelling insided of the _other_ area @@ -150,7 +150,7 @@ void lcl_LeaveDrawText(SwWrtShell& rSh) { if(rSh.GetDrawView()) { - rSh.GetDrawView()->SdrEndTextEdit( TRUE ); + rSh.GetDrawView()->SdrEndTextEdit( sal_True ); Point aPt(LONG_MIN, LONG_MIN); //go out of the frame rSh.SelectObj(aPt, SW_LEAVE_FRAME); @@ -161,7 +161,7 @@ void lcl_LeaveDrawText(SwWrtShell& rSh) SwSpellDialogChildWindow::SwSpellDialogChildWindow ( Window* _pParent, - USHORT nId, + sal_uInt16 nId, SfxBindings* pBindings, SfxChildWinInfo* pInfo) : svx::SpellDialogChildWindow ( @@ -185,7 +185,7 @@ SwSpellDialogChildWindow::~SwSpellDialogChildWindow () SfxChildWinInfo SwSpellDialogChildWindow::GetInfo (void) const { SfxChildWinInfo aInfo = svx::SpellDialogChildWindow::GetInfo(); - aInfo.bVisible = FALSE; + aInfo.bVisible = sal_False; return aInfo; } @@ -245,7 +245,7 @@ svx::SpellPortions SwSpellDialogChildWindow::GetNextWrongSentence(bool bRecheck) { m_pSpellState->pOtherCursor = new SwPaM(*pWrtShell->GetCrsr()->GetPoint()); m_pSpellState->m_bStartedInOther = true; - pWrtShell->SpellStart( DOCPOS_OTHERSTART, DOCPOS_OTHEREND, DOCPOS_CURR, FALSE ); + pWrtShell->SpellStart( DOCPOS_OTHERSTART, DOCPOS_OTHEREND, DOCPOS_CURR, sal_False ); } else { @@ -258,7 +258,7 @@ svx::SpellPortions SwSpellDialogChildWindow::GetNextWrongSentence(bool bRecheck) *pWrtShell->GetDoc(), *pCrsr->Start(), pCrsr->End()); } - pWrtShell->SpellStart( DOCPOS_START, DOCPOS_END, DOCPOS_CURR, FALSE ); + pWrtShell->SpellStart( DOCPOS_START, DOCPOS_END, DOCPOS_CURR, sal_False ); } } else @@ -303,7 +303,7 @@ The code below would only be part of the solution. //if there's any that has not been spelled yet if(!m_pSpellState->m_bOtherSpelled && pWrtShell->HasOtherCnt()) { - pWrtShell->SpellStart(DOCPOS_OTHERSTART, DOCPOS_OTHEREND, DOCPOS_OTHERSTART, FALSE ); + pWrtShell->SpellStart(DOCPOS_OTHERSTART, DOCPOS_OTHEREND, DOCPOS_OTHERSTART, sal_False ); if(!pWrtShell->SpellSentence(aRet, m_bIsGrammarCheckingOn)) { pWrtShell->SpellEnd(); @@ -315,7 +315,7 @@ The code below would only be part of the solution. //if no result has been found try at the body text - completely if(!m_pSpellState->m_bBodySpelled && !aRet.size()) { - pWrtShell->SpellStart(DOCPOS_START, DOCPOS_END, DOCPOS_START, FALSE ); + pWrtShell->SpellStart(DOCPOS_START, DOCPOS_END, DOCPOS_START, sal_False ); if(!pWrtShell->SpellSentence(aRet, m_bIsGrammarCheckingOn)) { m_pSpellState->m_bBodySpelled = true; @@ -344,7 +344,7 @@ The code below would only be part of the solution. pWrtShell->SpellEnd(); delete m_pSpellState->pOtherCursor; m_pSpellState->pOtherCursor = 0; - pWrtShell->SpellStart(DOCPOS_OTHERSTART, DOCPOS_CURR, DOCPOS_OTHERSTART, FALSE ); + pWrtShell->SpellStart(DOCPOS_OTHERSTART, DOCPOS_CURR, DOCPOS_OTHERSTART, sal_False ); pWrtShell->SpellSentence(aRet, m_bIsGrammarCheckingOn); } if(!aRet.size()) @@ -357,7 +357,7 @@ The code below would only be part of the solution. //has the body been spelled? if(!m_pSpellState->m_bBodySpelled) { - pWrtShell->SpellStart(DOCPOS_START, DOCPOS_END, DOCPOS_START, FALSE ); + pWrtShell->SpellStart(DOCPOS_START, DOCPOS_END, DOCPOS_START, sal_False ); if(!pWrtShell->SpellSentence(aRet, m_bIsGrammarCheckingOn)) { m_pSpellState->m_bBodySpelled = true; @@ -370,7 +370,7 @@ The code below would only be part of the solution. m_pSpellState->m_bBodySpelled = true; if(!m_pSpellState->m_bOtherSpelled && pWrtShell->HasOtherCnt()) { - pWrtShell->SpellStart(DOCPOS_OTHERSTART, DOCPOS_OTHEREND, DOCPOS_OTHERSTART, FALSE ); + pWrtShell->SpellStart(DOCPOS_OTHERSTART, DOCPOS_OTHEREND, DOCPOS_OTHERSTART, sal_False ); if(!pWrtShell->SpellSentence(aRet, m_bIsGrammarCheckingOn)) { pWrtShell->SpellEnd(); @@ -405,7 +405,7 @@ The code below would only be part of the solution. if(m_pSpellState->m_xStartRange.is()) { LockFocusNotification( true ); - USHORT nRet = QueryBox( GetWindow(), SW_RES(RID_QB_SPELL_CONTINUE)).Execute(); + sal_uInt16 nRet = QueryBox( GetWindow(), SW_RES(RID_QB_SPELL_CONTINUE)).Execute(); if(RET_YES == nRet) { SwUnoInternalPaM aPam(*pWrtShell->GetDoc()); @@ -559,8 +559,8 @@ void SwSpellDialogChildWindow::GetFocus() case SHELL_MODE_TABLE_LIST_TEXT: { SwPaM* pCursor = pWrtShell->GetCrsr(); - if(m_pSpellState->m_pPointNode != pCursor->GetNode(TRUE) || - m_pSpellState->m_pMarkNode != pCursor->GetNode(FALSE)|| + if(m_pSpellState->m_pPointNode != pCursor->GetNode(sal_True) || + m_pSpellState->m_pMarkNode != pCursor->GetNode(sal_False)|| m_pSpellState->m_nPointPos != pCursor->GetPoint()->nContent.GetIndex()|| m_pSpellState->m_nMarkPos != pCursor->GetMark()->nContent.GetIndex()) bInvalidate = true; @@ -616,8 +616,8 @@ void SwSpellDialogChildWindow::LoseFocus() { //store a node pointer and a pam-position to be able to check on next GetFocus(); SwPaM* pCursor = pWrtShell->GetCrsr(); - m_pSpellState->m_pPointNode = pCursor->GetNode(TRUE); - m_pSpellState->m_pMarkNode = pCursor->GetNode(FALSE); + m_pSpellState->m_pPointNode = pCursor->GetNode(sal_True); + m_pSpellState->m_pMarkNode = pCursor->GetNode(sal_False); m_pSpellState->m_nPointPos = pCursor->GetPoint()->nContent.GetIndex(); m_pSpellState->m_nMarkPos = pCursor->GetMark()->nContent.GetIndex(); @@ -658,7 +658,7 @@ SwWrtShell* SwSpellDialogChildWindow::GetWrtShell_Impl() SwView* pView = 0; if(pDispatch) { - USHORT nShellIdx = 0; + sal_uInt16 nShellIdx = 0; SfxShell* pShell; while(0 != (pShell = pDispatch->GetShell(nShellIdx++))) if(pShell->ISA(SwView)) @@ -846,13 +846,13 @@ bool SwSpellDialogChildWindow::FindNextDrawTextError_Impl(SwWrtShell& rSh) { //now the current one has to be deselected if(pCurrentTextObj) - pDrView->SdrEndTextEdit( TRUE ); + pDrView->SdrEndTextEdit( sal_True ); //and the found one should be activated rSh.MakeVisible(pTextObj->GetLogicRect()); Point aTmp( 0,0 ); rSh.SelectObj( aTmp, 0, pTextObj ); SdrPageView* pPV = pDrView->GetSdrPageView(); - rView.BeginTextEdit( pTextObj, pPV, &rView.GetEditWin(), FALSE, TRUE ); + rView.BeginTextEdit( pTextObj, pPV, &rView.GetEditWin(), sal_False, sal_True ); rView.AttrChangedNotify(&rSh); bNextDoc = true; } diff --git a/sw/source/ui/dialog/abstract.cxx b/sw/source/ui/dialog/abstract.cxx index a43317d5c7..056c06c7a3 100644 --- a/sw/source/ui/dialog/abstract.cxx +++ b/sw/source/ui/dialog/abstract.cxx @@ -61,14 +61,14 @@ SwInsertAbstractDlg::~SwInsertAbstractDlg() { } -BYTE SwInsertAbstractDlg::GetLevel() const +sal_uInt8 SwInsertAbstractDlg::GetLevel() const { - return static_cast< BYTE >(aLevelNF.GetValue() - 1); + return static_cast< sal_uInt8 >(aLevelNF.GetValue() - 1); } -BYTE SwInsertAbstractDlg::GetPara() const +sal_uInt8 SwInsertAbstractDlg::GetPara() const { - return (BYTE) aParaNF.GetValue(); + return (sal_uInt8) aParaNF.GetValue(); } diff --git a/sw/source/ui/dialog/abstract.src b/sw/source/ui/dialog/abstract.src index 6a35ffcd53..5abdc5aff0 100644 --- a/sw/source/ui/dialog/abstract.src +++ b/sw/source/ui/dialog/abstract.src @@ -50,6 +50,7 @@ ModalDialog DLG_INSERT_ABSTRACT }; NumericField NF_LEVEL { + HelpID = "sw:NumericField:DLG_INSERT_ABSTRACT:NF_LEVEL"; Border = TRUE ; Pos = MAP_APPFONT ( 153 , 12 ) ; Size = MAP_APPFONT ( 24 , 12 ) ; @@ -71,6 +72,7 @@ ModalDialog DLG_INSERT_ABSTRACT }; NumericField NF_PARA { + HelpID = "sw:NumericField:DLG_INSERT_ABSTRACT:NF_PARA"; Border = TRUE ; Pos = MAP_APPFONT ( 153 , 27 ) ; Size = MAP_APPFONT ( 24 , 12 ) ; diff --git a/sw/source/ui/dialog/ascfldlg.cxx b/sw/source/ui/dialog/ascfldlg.cxx index 3f7b493f70..11fa3926ed 100644 --- a/sw/source/ui/dialog/ascfldlg.cxx +++ b/sw/source/ui/dialog/ascfldlg.cxx @@ -54,13 +54,15 @@ #include <dialog.hrc> #include <ascfldlg.hrc> +#include "vcl/metric.hxx" + using namespace ::com::sun::star; const sal_Unicode cDialogExtraDataClose = '}'; const char sDialogImpExtraData[] = "EncImpDlg:{"; const char sDialogExpExtraData[] = "EncExpDlg:{"; -const USHORT nDialogExtraDataLen = 11; // 12345678901 +const sal_uInt16 nDialogExtraDataLen = 11; // 12345678901 SwAsciiFilterDlg::SwAsciiFilterDlg( Window* pParent, SwDocShell& rDocSh, SvStream* pStream ) @@ -80,7 +82,7 @@ SwAsciiFilterDlg::SwAsciiFilterDlg( Window* pParent, SwDocShell& rDocSh, aCancelPB( this, SW_RES( PB_CANCEL )), aHelpPB( this, SW_RES( PB_HELP )), sSystemCharSet( SW_RES( STR_SYS_CHARSET )), - bSaveLineStatus( TRUE ) + bSaveLineStatus( sal_True ) { FreeResource(); @@ -89,7 +91,7 @@ SwAsciiFilterDlg::SwAsciiFilterDlg( Window* pParent, SwDocShell& rDocSh, const String& rFindNm = String::CreateFromAscii( pStream ? sDialogImpExtraData : sDialogExpExtraData); - USHORT nEnd, nStt = GetExtraData().Search( rFindNm ); + sal_uInt16 nEnd, nStt = GetExtraData().Search( rFindNm ); if( STRING_NOTFOUND != nStt ) { nStt += nDialogExtraDataLen; @@ -107,8 +109,8 @@ SwAsciiFilterDlg::SwAsciiFilterDlg( Window* pParent, SwDocShell& rDocSh, if( pStream ) { char aBuffer[ 4098 ]; - ULONG nOldPos = pStream->Tell(); - ULONG nBytesRead = pStream->Read( aBuffer, 4096 ); + sal_uLong nOldPos = pStream->Tell(); + sal_uLong nBytesRead = pStream->Read( aBuffer, 4096 ); pStream->Seek( nOldPos ); if( nBytesRead <= 4096 ) @@ -119,13 +121,13 @@ SwAsciiFilterDlg::SwAsciiFilterDlg( Window* pParent, SwDocShell& rDocSh, aBuffer[ nBytesRead + 2 ] = '0'; } - BOOL bCR = FALSE, bLF = FALSE, bNullChar = FALSE; - for( USHORT nCnt = 0; nCnt < nBytesRead; ++nCnt ) + sal_Bool bCR = sal_False, bLF = sal_False, bNullChar = sal_False; + for( sal_uInt16 nCnt = 0; nCnt < nBytesRead; ++nCnt ) switch( aBuffer[ nCnt ] ) { - case 0x0: bNullChar = TRUE; break; - case 0xA: bLF = TRUE; break; - case 0xD: bCR = TRUE; break; + case 0x0: bNullChar = sal_True; break; + case 0xA: bLF = sal_True; break; + case 0xD: bCR = sal_True; break; case 0xC: case 0x1A: case 0x9: break; @@ -153,9 +155,9 @@ SwAsciiFilterDlg::SwAsciiFilterDlg( Window* pParent, SwDocShell& rDocSh, SwDoc* pDoc = rDocSh.GetDoc(); - USHORT nAppScriptType = GetI18NScriptTypeOfLanguage( (USHORT)GetAppLanguage() ); + sal_uInt16 nAppScriptType = GetI18NScriptTypeOfLanguage( (sal_uInt16)GetAppLanguage() ); { - BOOL bDelPrinter = FALSE; + sal_Bool bDelPrinter = sal_False; SfxPrinter* pPrt = pDoc ? pDoc->getPrinter(false) : 0; if( !pPrt ) { @@ -164,21 +166,31 @@ SwAsciiFilterDlg::SwAsciiFilterDlg( Window* pParent, SwDocShell& rDocSh, SID_PRINTER_CHANGESTODOC, SID_PRINTER_CHANGESTODOC, 0 ); pPrt = new SfxPrinter( pSet ); - bDelPrinter = TRUE; + bDelPrinter = sal_True; } - - const USHORT nCount = pPrt->GetFontCount(); - for (USHORT i = 0; i < nCount; ++i) + + + // get the set of disctinct available family names + std::set< String > aFontNames; + int nFontNames = pPrt->GetDevFontCount(); + for( int i = 0; i < nFontNames; i++ ) + { + FontInfo aInf( pPrt->GetDevFont( i ) ); + aFontNames.insert( aInf.GetName() ); + } + + // insert to listbox + for( std::set< String >::const_iterator it = aFontNames.begin(); + it != aFontNames.end(); ++it ) { - const String &rStr = pPrt->GetFont(i)->GetName(); - aFontLB.InsertEntry( rStr ); + aFontLB.InsertEntry( *it ); } if( !aOpt.GetFontName().Len() ) { if(pDoc) { - USHORT nFontRes = RES_CHRATR_FONT; + sal_uInt16 nFontRes = RES_CHRATR_FONT; if(SCRIPTTYPE_ASIAN == nAppScriptType) nFontRes = RES_CHRATR_CJK_FONT; else if(SCRIPTTYPE_COMPLEX == nAppScriptType) @@ -189,7 +201,7 @@ SwAsciiFilterDlg::SwAsciiFilterDlg( Window* pParent, SwDocShell& rDocSh, } else { - USHORT nFontType = FONT_STANDARD; + sal_uInt16 nFontType = FONT_STANDARD; if(SCRIPTTYPE_ASIAN == nAppScriptType) nFontType = FONT_STANDARD_CJK; else if(SCRIPTTYPE_COMPLEX == nAppScriptType) @@ -209,7 +221,7 @@ SwAsciiFilterDlg::SwAsciiFilterDlg( Window* pParent, SwDocShell& rDocSh, { if(pDoc) { - USHORT nWhich = GetWhichOfScript( RES_CHRATR_LANGUAGE, nAppScriptType); + sal_uInt16 nWhich = GetWhichOfScript( RES_CHRATR_LANGUAGE, nAppScriptType); aOpt.SetLanguage( ((SvxLanguageItem&)pDoc-> GetDefault( nWhich )).GetLanguage()); } @@ -232,7 +244,7 @@ SwAsciiFilterDlg::SwAsciiFilterDlg( Window* pParent, SwDocShell& rDocSh, } } - aLanguageLB.SetLanguageList( LANG_LIST_ALL, TRUE, FALSE ); + aLanguageLB.SetLanguageList( LANG_LIST_ALL, sal_True, sal_False ); aLanguageLB.SelectLanguage( aOpt.GetLanguage() ); } } @@ -290,18 +302,18 @@ SwAsciiFilterDlg::~SwAsciiFilterDlg() void SwAsciiFilterDlg::FillOptions( SwAsciiOptions& rOptions ) { - ULONG nCCode = aCharSetLB.GetSelectTextEncoding(); + sal_uLong nCCode = aCharSetLB.GetSelectTextEncoding(); String sFont; - ULONG nLng = 0; + sal_uLong nLng = 0; if( aFontLB.IsVisible() ) { sFont = aFontLB.GetSelectEntry(); - nLng = (ULONG)aLanguageLB.GetSelectLanguage(); + nLng = (sal_uLong)aLanguageLB.GetSelectLanguage(); } rOptions.SetFontName( sFont ); rOptions.SetCharSet( rtl_TextEncoding( nCCode ) ); - rOptions.SetLanguage( USHORT( nLng ) ); + rOptions.SetLanguage( sal_uInt16( nLng ) ); rOptions.SetParaFlags( GetCRLF() ); // save the user settings @@ -312,7 +324,7 @@ void SwAsciiFilterDlg::FillOptions( SwAsciiOptions& rOptions ) const String& rFindNm = String::CreateFromAscii( aFontLB.IsVisible() ? sDialogImpExtraData : sDialogExpExtraData); - USHORT nEnd, nStt = GetExtraData().Search( rFindNm ); + sal_uInt16 nEnd, nStt = GetExtraData().Search( rFindNm ); if( STRING_NOTFOUND != nStt ) { // called twice, so remove "old" settings @@ -406,7 +418,7 @@ IMPL_LINK( SwAsciiFilterDlg, CharSetSelHdl, SvxTextEncodingBox*, pBox ) } } - bSaveLineStatus = FALSE; + bSaveLineStatus = sal_False; if( eEnd != (LineEnd)-1 ) // changed? { if( eOldEnd != eEnd ) @@ -419,7 +431,7 @@ IMPL_LINK( SwAsciiFilterDlg, CharSetSelHdl, SvxTextEncodingBox*, pBox ) aCR_RB.Check( aCR_RB.GetSavedValue() ); aLF_RB.Check( aLF_RB.GetSavedValue() ); } - bSaveLineStatus = TRUE; + bSaveLineStatus = sal_True; if( nOldLng != nLng && aFontLB.IsVisible() ) aLanguageLB.SelectLanguage( nLng ); diff --git a/sw/source/ui/dialog/ascfldlg.src b/sw/source/ui/dialog/ascfldlg.src index f10fed8a87..66be6d35c9 100644 --- a/sw/source/ui/dialog/ascfldlg.src +++ b/sw/source/ui/dialog/ascfldlg.src @@ -50,6 +50,7 @@ ModalDialog DLG_ASCII_FILTER }; ListBox LB_CHARSET { + HelpID = "sw:ListBox:DLG_ASCII_FILTER:LB_CHARSET"; Pos = MAP_APPFONT ( 80 , 14 ) ; Size = MAP_APPFONT ( 90 , 61 ) ; TabStop = TRUE ; @@ -64,6 +65,7 @@ ModalDialog DLG_ASCII_FILTER }; ListBox LB_FONT { + HelpID = "sw:ListBox:DLG_ASCII_FILTER:LB_FONT"; Pos = MAP_APPFONT ( 80 , 30 ) ; Size = MAP_APPFONT ( 90 , 61 ) ; TabStop = TRUE ; @@ -78,6 +80,7 @@ ModalDialog DLG_ASCII_FILTER }; ListBox LB_LANGUAGE { + HelpID = "sw:ListBox:DLG_ASCII_FILTER:LB_LANGUAGE"; Pos = MAP_APPFONT ( 80 , 46 ) ; Size = MAP_APPFONT ( 90 , 61 ) ; TabStop = TRUE ; @@ -92,6 +95,7 @@ ModalDialog DLG_ASCII_FILTER }; RadioButton RB_CRLF { + HelpID = "sw:RadioButton:DLG_ASCII_FILTER:RB_CRLF"; Pos = MAP_APPFONT ( 80 , 64 ) ; Size = MAP_APPFONT ( 40 , 10 ) ; TabStop = TRUE ; @@ -100,6 +104,7 @@ ModalDialog DLG_ASCII_FILTER }; RadioButton RB_CR { + HelpID = "sw:RadioButton:DLG_ASCII_FILTER:RB_CR"; Pos = MAP_APPFONT ( 121 , 64 ) ; Size = MAP_APPFONT ( 20 , 10 ) ; // TabStop = TRUE ; @@ -107,6 +112,7 @@ ModalDialog DLG_ASCII_FILTER }; RadioButton RB_LF { + HelpID = "sw:RadioButton:DLG_ASCII_FILTER:RB_LF"; Pos = MAP_APPFONT ( 155 , 64 ) ; Size = MAP_APPFONT ( 20 , 10 ) ; // TabStop = TRUE ; diff --git a/sw/source/ui/dialog/docstdlg.cxx b/sw/source/ui/dialog/docstdlg.cxx index 5b889003f1..12b5738520 100644 --- a/sw/source/ui/dialog/docstdlg.cxx +++ b/sw/source/ui/dialog/docstdlg.cxx @@ -61,23 +61,21 @@ SfxTabPage * SwDocStatPage::Create(Window *pParent, const SfxItemSet &rSet) SwDocStatPage::SwDocStatPage(Window *pParent, const SfxItemSet &rSet) : SfxTabPage (pParent, SW_RES(TP_DOC_STAT), rSet), - + aPageLbl (this, SW_RES( FT_PAGE )), + aPageNo (this, SW_RES( FT_PAGE_COUNT )), aTableLbl (this, SW_RES( FT_TABLE )), + aTableNo (this, SW_RES( FT_TABLE_COUNT)), aGrfLbl (this, SW_RES( FT_GRF )), + aGrfNo (this, SW_RES( FT_GRF_COUNT )), aOLELbl (this, SW_RES( FT_OLE )), - aPageLbl (this, SW_RES( FT_PAGE )), + aOLENo (this, SW_RES( FT_OLE_COUNT )), aParaLbl (this, SW_RES( FT_PARA )), + aParaNo (this, SW_RES( FT_PARA_COUNT )), aWordLbl (this, SW_RES( FT_WORD )), + aWordNo (this, SW_RES( FT_WORD_COUNT )), aCharLbl (this, SW_RES( FT_CHAR )), + aCharNo (this, SW_RES( FT_CHAR_COUNT )), aLineLbl (this, SW_RES( FT_LINE )), - - aTableNo (this, SW_RES( FT_TABLE_COUNT)), - aGrfNo (this, SW_RES( FT_GRF_COUNT )), - aOLENo (this, SW_RES( FT_OLE_COUNT )), - aPageNo (this, SW_RES( FT_PAGE_COUNT )), - aParaNo (this, SW_RES( FT_PARA_COUNT )), - aWordNo (this, SW_RES( FT_WORD_COUNT )), - aCharNo (this, SW_RES( FT_CHAR_COUNT )), aLineNo (this, SW_RES( FT_LINE_COUNT )), aUpdatePB (this, SW_RES( PB_PDATE )) { @@ -89,9 +87,9 @@ SwDocStatPage::SwDocStatPage(Window *pParent, const SfxItemSet &rSet) : SwFEShell* pFEShell = pDocShell->GetFEShell(); if(!pFEShell) { - aUpdatePB.Show(FALSE); - aLineLbl.Show(FALSE); - aLineNo .Show(FALSE); + aUpdatePB.Show(sal_False); + aLineLbl.Show(sal_False); + aLineNo .Show(sal_False); } } @@ -106,9 +104,9 @@ SwDocStatPage::SwDocStatPage(Window *pParent, const SfxItemSet &rSet) : --------------------------------------------------------------------*/ -BOOL SwDocStatPage::FillItemSet(SfxItemSet & /*rSet*/) +sal_Bool SwDocStatPage::FillItemSet(SfxItemSet & /*rSet*/) { - return FALSE; + return sal_False; } void SwDocStatPage::Reset(const SfxItemSet &/*rSet*/) @@ -146,7 +144,7 @@ void SwDocStatPage::Update() OSL_ENSURE( pSh, "Shell not found" ); - SwWait aWait( *pSh->GetDoc()->GetDocShell(), TRUE ); + SwWait aWait( *pSh->GetDoc()->GetDocShell(), sal_True ); pSh->StartAction(); aDocStat = pSh->GetDoc()->GetDocStat(); pSh->GetDoc()->UpdateDocStat( aDocStat ); @@ -164,7 +162,7 @@ IMPL_LINK( SwDocStatPage, UpdateHdl, PushButton*, EMPTYARG) SwDocShell* pDocShell = (SwDocShell*) SfxObjectShell::Current(); SwFEShell* pFEShell = pDocShell->GetFEShell(); if(pFEShell) - aLineNo.SetText( String::CreateFromInt32( pFEShell->GetLineCount(FALSE))); + aLineNo.SetText( String::CreateFromInt32( pFEShell->GetLineCount(sal_False))); //pButton->Disable(); return 0; } diff --git a/sw/source/ui/dialog/docstdlg.src b/sw/source/ui/dialog/docstdlg.src index 5926321d88..3cce7454c5 100644 --- a/sw/source/ui/dialog/docstdlg.src +++ b/sw/source/ui/dialog/docstdlg.src @@ -140,6 +140,7 @@ TabPage TP_DOC_STAT }; PushButton PB_PDATE { + HelpID = "sw:PushButton:TP_DOC_STAT:PB_PDATE"; Pos = MAP_APPFONT ( 204 , 94 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "~Update" ; diff --git a/sw/source/ui/dialog/macassgn.cxx b/sw/source/ui/dialog/macassgn.cxx index 6daac06469..69b8d43773 100644 --- a/sw/source/ui/dialog/macassgn.cxx +++ b/sw/source/ui/dialog/macassgn.cxx @@ -64,9 +64,9 @@ SfxEventNamesItem SwMacroAssignDlg::AddEvents( DlgEventType eType ) { SfxEventNamesItem aItem(SID_EVENTCONFIG); - BOOL bHtmlMode = FALSE; - USHORT nHtmlMode = ::GetHtmlMode((const SwDocShell*)SfxObjectShell::Current()); - bHtmlMode = nHtmlMode & HTMLMODE_ON ? TRUE : FALSE; + sal_Bool bHtmlMode = sal_False; + sal_uInt16 nHtmlMode = ::GetHtmlMode((const SwDocShell*)SfxObjectShell::Current()); + bHtmlMode = nHtmlMode & HTMLMODE_ON ? sal_True : sal_False; switch( eType ) { @@ -127,10 +127,10 @@ SfxEventNamesItem SwMacroAssignDlg::AddEvents( DlgEventType eType ) } -BOOL SwMacroAssignDlg::INetFmtDlg( Window* pParent, SwWrtShell& rSh, +sal_Bool SwMacroAssignDlg::INetFmtDlg( Window* pParent, SwWrtShell& rSh, SvxMacroItem*& rpINetItem ) { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; SfxItemSet aSet( rSh.GetAttrPool(), RES_FRMMACRO, RES_FRMMACRO, SID_EVENTCONFIG, SID_EVENTCONFIG, 0 ); SvxMacroItem aItem( RES_FRMMACRO ); if( !rpINetItem ) @@ -149,13 +149,13 @@ BOOL SwMacroAssignDlg::INetFmtDlg( Window* pParent, SwWrtShell& rSh, { const SfxItemSet* pOutSet = pMacroDlg->GetOutputItemSet(); const SfxPoolItem* pItem; - if( SFX_ITEM_SET == pOutSet->GetItemState( RES_FRMMACRO, FALSE, &pItem )) + if( SFX_ITEM_SET == pOutSet->GetItemState( RES_FRMMACRO, sal_False, &pItem )) { rpINetItem->SetMacroTable( ((SvxMacroItem*)pItem)->GetMacroTable() ); - bRet = TRUE; + bRet = sal_True; } } return bRet; } -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
\ No newline at end of file diff --git a/sw/source/ui/dialog/makefile.mk b/sw/source/ui/dialog/makefile.mk deleted file mode 100644 index 033703f686..0000000000 --- a/sw/source/ui/dialog/makefile.mk +++ /dev/null @@ -1,99 +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=dialog -LIBTARGET=no - -# future: DEMO\dialog.srs - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -SRS1NAME=$(TARGET) -SRC1FILES = \ - abstract.src \ - ascfldlg.src \ - dialog.src \ - docstdlg.src \ - regionsw.src \ - wordcountdialog.src - -EXCEPTIONSFILES = \ - $(SLO)$/SwSpellDialogChildWindow.obj \ - $(SLO)$/abstract.obj \ - $(SLO)$/addrdlg.obj \ - $(SLO)$/ascfldlg.obj \ - $(SLO)$/docstdlg.obj \ - $(SLO)$/macassgn.obj \ - $(SLO)$/regionsw.obj \ - $(SLO)$/swabstdlg.obj \ - $(SLO)$/swdialmgr.obj \ - $(SLO)$/swdlgfact.obj \ - $(SLO)$/swuiexp.obj \ - $(SLO)$/uiregionsw.obj \ - $(SLO)$/wordcountdialog.obj - -SLOFILES = \ - $(EXCEPTIONSFILES) \ - $(SLO)$/swwrtshitem.obj - -LIB1TARGET = $(SLB)$/$(TARGET).lib - -LIB1OBJFILES = \ - $(SLO)$/regionsw.obj \ - $(SLO)$/swabstdlg.obj \ - $(SLO)$/SwSpellDialogChildWindow.obj \ - $(SLO)$/swwrtshitem.obj - -# $(SLO)$/macassgn.obj \ - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk -$(INCCOM)$/swuilib.hxx: makefile.mk -.IF "$(GUI)"=="UNX" - $(RM) $@ - echo \#define DLL_NAME \"libswui$(DLLPOSTFIX)$(DLLPOST)\" >$@ -.ELSE - echo \#define DLL_NAME \"swui$(DLLPOSTFIX)$(DLLPOST)\" >$@ -.ENDIF - -$(SLO)$/swabstdlg.obj : $(INCCOM)$/swuilib.hxx - - - - - - - diff --git a/sw/source/ui/dialog/regionsw.cxx b/sw/source/ui/dialog/regionsw.cxx index d4a237d9e9..fe6d9132de 100644 --- a/sw/source/ui/dialog/regionsw.cxx +++ b/sw/source/ui/dialog/regionsw.cxx @@ -107,7 +107,7 @@ void SwBaseShell::InsertRegionDialog(SfxRequest& rReq) const SfxPoolItem *pItem = 0; String aTmpStr; if ( SFX_ITEM_SET == - pSet->GetItemState(FN_PARAM_REGION_NAME, TRUE, &pItem) ) + pSet->GetItemState(FN_PARAM_REGION_NAME, sal_True, &pItem) ) aTmpStr = rSh.GetUniqueSectionName( &((const SfxStringItem *)pItem)->GetValue() ); else @@ -117,36 +117,36 @@ void SwBaseShell::InsertRegionDialog(SfxRequest& rReq) rReq.SetReturnValue(SfxStringItem(FN_INSERT_REGION, aTmpStr)); aSet.Put( *pSet ); - if(SFX_ITEM_SET == pSet->GetItemState(SID_ATTR_COLUMNS, FALSE, &pItem)|| - SFX_ITEM_SET == pSet->GetItemState(FN_INSERT_REGION, FALSE, &pItem)) + if(SFX_ITEM_SET == pSet->GetItemState(SID_ATTR_COLUMNS, sal_False, &pItem)|| + SFX_ITEM_SET == pSet->GetItemState(FN_INSERT_REGION, sal_False, &pItem)) { SwFmtCol aCol; SwRect aRect; rSh.CalcBoundRect(aRect, FLY_AS_CHAR); long nWidth = aRect.Width(); - USHORT nCol = ((SfxUInt16Item *)pItem)->GetValue(); + sal_uInt16 nCol = ((SfxUInt16Item *)pItem)->GetValue(); if(nCol) { - aCol.Init( nCol, 0, static_cast< USHORT >(nWidth) ); + aCol.Init( nCol, 0, static_cast< sal_uInt16 >(nWidth) ); aSet.Put(aCol); } } - else if(SFX_ITEM_SET == pSet->GetItemState(RES_COL, FALSE, &pItem)) + else if(SFX_ITEM_SET == pSet->GetItemState(RES_COL, sal_False, &pItem)) { aSet.Put(*pItem); } - const BOOL bHidden = SFX_ITEM_SET == - pSet->GetItemState(FN_PARAM_REGION_HIDDEN, TRUE, &pItem)? - (BOOL)((const SfxBoolItem *)pItem)->GetValue():FALSE; - const BOOL bProtect = SFX_ITEM_SET == - pSet->GetItemState(FN_PARAM_REGION_PROTECT, TRUE, &pItem)? - (BOOL)((const SfxBoolItem *)pItem)->GetValue():FALSE; + const sal_Bool bHidden = SFX_ITEM_SET == + pSet->GetItemState(FN_PARAM_REGION_HIDDEN, sal_True, &pItem)? + (sal_Bool)((const SfxBoolItem *)pItem)->GetValue():sal_False; + const sal_Bool bProtect = SFX_ITEM_SET == + pSet->GetItemState(FN_PARAM_REGION_PROTECT, sal_True, &pItem)? + (sal_Bool)((const SfxBoolItem *)pItem)->GetValue():sal_False; // #114856# edit in readonly sections - const BOOL bEditInReadonly = SFX_ITEM_SET == - pSet->GetItemState(FN_PARAM_REGION_EDIT_IN_READONLY, TRUE, &pItem)? - (BOOL)((const SfxBoolItem *)pItem)->GetValue():FALSE; + const sal_Bool bEditInReadonly = SFX_ITEM_SET == + pSet->GetItemState(FN_PARAM_REGION_EDIT_IN_READONLY, sal_True, &pItem)? + (sal_Bool)((const SfxBoolItem *)pItem)->GetValue():sal_False; aSection.SetProtectFlag(bProtect); aSection.SetHidden(bHidden); @@ -154,16 +154,16 @@ void SwBaseShell::InsertRegionDialog(SfxRequest& rReq) aSection.SetEditInReadonlyFlag(bEditInReadonly); if(SFX_ITEM_SET == - pSet->GetItemState(FN_PARAM_REGION_CONDITION, TRUE, &pItem)) + pSet->GetItemState(FN_PARAM_REGION_CONDITION, sal_True, &pItem)) aSection.SetCondition(((const SfxStringItem *)pItem)->GetValue()); String aFile, aSub; if(SFX_ITEM_SET == - pSet->GetItemState(FN_PARAM_1, TRUE, &pItem)) + pSet->GetItemState(FN_PARAM_1, sal_True, &pItem)) aFile = ((const SfxStringItem *)pItem)->GetValue(); if(SFX_ITEM_SET == - pSet->GetItemState(FN_PARAM_3, TRUE, &pItem)) + pSet->GetItemState(FN_PARAM_3, sal_True, &pItem)) aSub = ((const SfxStringItem *)pItem)->GetValue(); @@ -174,7 +174,7 @@ void SwBaseShell::InsertRegionDialog(SfxRequest& rReq) sLinkFileName.SetToken(0, sfx2::cTokenSeperator,aFile); if(SFX_ITEM_SET == - pSet->GetItemState(FN_PARAM_2, TRUE, &pItem)) + pSet->GetItemState(FN_PARAM_2, sal_True, &pItem)) sLinkFileName.SetToken(1, sfx2::cTokenSeperator, ((const SfxStringItem *)pItem)->GetValue()); @@ -220,10 +220,10 @@ IMPL_STATIC_LINK( SwWrtShell, InsertRegionDialog, SwSectionData*, pSect ) void SwBaseShell::EditRegionDialog(SfxRequest& rReq) { const SfxItemSet* pArgs = rReq.GetArgs(); - USHORT nSlot = rReq.GetSlot(); + sal_uInt16 nSlot = rReq.GetSlot(); const SfxPoolItem* pItem = 0; if(pArgs) - pArgs->GetItemState(nSlot, FALSE, &pItem); + pArgs->GetItemState(nSlot, sal_False, &pItem); SwWrtShell& rWrtShell = GetShell(); switch ( nSlot ) @@ -231,7 +231,7 @@ void SwBaseShell::EditRegionDialog(SfxRequest& rReq) case FN_EDIT_REGION: { Window* pParentWin = &GetView().GetViewFrame()->GetWindow(); - BOOL bStart = TRUE; + sal_Bool bStart = sal_True; if(bStart) { SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); diff --git a/sw/source/ui/dialog/regionsw.src b/sw/source/ui/dialog/regionsw.src index 428cf45198..8f249a890f 100644 --- a/sw/source/ui/dialog/regionsw.src +++ b/sw/source/ui/dialog/regionsw.src @@ -87,7 +87,7 @@ *************************************************************************/ ModalDialog MD_EDIT_REGION { - HelpID = FN_EDIT_REGION ; + HelpID = CMD_FN_EDIT_REGION ; OutputSize = TRUE ; SVLook = TRUE ; Size = MAP_APPFONT ( 316 , 185 ) ; @@ -102,6 +102,7 @@ ModalDialog MD_EDIT_REGION }; Edit ED_RANAME { + HelpID = "sw:Edit:MD_EDIT_REGION:ED_RANAME"; Border = TRUE ; Pos = MAP_APPFONT ( 12 , 14 ) ; Size = MAP_APPFONT ( 71 , 12 ) ; @@ -124,6 +125,7 @@ ModalDialog MD_EDIT_REGION }; TriStateBox CB_FILE { + HelpID = "sw:TriStateBox:MD_EDIT_REGION:CB_FILE"; Pos = MAP_APPFONT ( 98 , 14 ) ; Size = MAP_APPFONT ( 59 , 10 ) ; TabStop = TRUE ; @@ -131,6 +133,7 @@ ModalDialog MD_EDIT_REGION }; CheckBox CB_DDE { + HelpID = "sw:CheckBox:MD_EDIT_REGION:CB_DDE"; Pos = MAP_APPFONT ( 98 , 28 ) ; Size = MAP_APPFONT ( 30 , 10 ) ; Disable = TRUE ; @@ -152,6 +155,7 @@ ModalDialog MD_EDIT_REGION }; Edit ED_FILE { + HelpID = "sw:Edit:MD_EDIT_REGION:ED_FILE"; Border = TRUE ; Pos = MAP_APPFONT ( 165 , 42 ) ; Size = MAP_APPFONT ( 68 , 12 ) ; @@ -160,6 +164,7 @@ ModalDialog MD_EDIT_REGION }; PushButton PB_FILE { + HelpID = "sw:PushButton:MD_EDIT_REGION:PB_FILE"; Pos = MAP_APPFONT ( 239 , 42 ) ; Size = MAP_APPFONT ( 12 , 12 ) ; TabStop = TRUE ; @@ -175,6 +180,7 @@ ModalDialog MD_EDIT_REGION }; ComboBox LB_SUBREG { + HelpID = "sw:ComboBox:MD_EDIT_REGION:LB_SUBREG"; Pos = MAP_APPFONT ( 165 , 57 ) ; Size = MAP_APPFONT ( 68 , 50 ) ; Disable = TRUE ; @@ -191,6 +197,7 @@ ModalDialog MD_EDIT_REGION }; TriStateBox CB_PROTECT { + HelpID = "sw:TriStateBox:MD_EDIT_REGION:CB_PROTECT"; Pos = MAP_APPFONT ( 98 , 86 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; TabStop = TRUE ; @@ -200,6 +207,7 @@ ModalDialog MD_EDIT_REGION }; CheckBox CB_PASSWD { + HelpID = "sw:CheckBox:MD_EDIT_REGION:CB_PASSWD"; Pos = MAP_APPFONT ( 107 , 100 ) ; Size = MAP_APPFONT ( 100 , 10 ) ; TabStop = TRUE ; @@ -207,6 +215,7 @@ ModalDialog MD_EDIT_REGION }; PushButton PB_PASSWD { + HelpID = "sw:PushButton:MD_EDIT_REGION:PB_PASSWD"; Pos = MAP_APPFONT ( 239 , 98 ) ; Size = MAP_APPFONT ( 12 , 12 ) ; TabStop = TRUE ; @@ -221,6 +230,7 @@ ModalDialog MD_EDIT_REGION }; TriStateBox CB_HIDE { + HelpID = "sw:TriStateBox:MD_EDIT_REGION:CB_HIDE"; Pos = MAP_APPFONT ( 98 , 127 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; TabStop = TRUE ; @@ -236,6 +246,7 @@ ModalDialog MD_EDIT_REGION }; Edit ED_CONDITION { + HelpID = "sw:Edit:MD_EDIT_REGION:ED_CONDITION"; Border = TRUE ; Pos = MAP_APPFONT ( 165 , 141) ; Size = MAP_APPFONT ( 86 , 12 ) ; @@ -252,6 +263,7 @@ ModalDialog MD_EDIT_REGION }; TriStateBox CB_EDIT_IN_READONLY { + HelpID = "sw:TriStateBox:MD_EDIT_REGION:CB_EDIT_IN_READONLY"; Pos = MAP_APPFONT ( 98 , 170 ) ; Size = MAP_APPFONT ( 156 , 10 ) ; TabStop = TRUE ; @@ -275,6 +287,7 @@ ModalDialog MD_EDIT_REGION }; PushButton PB_OPTIONS { + HelpID = "sw:PushButton:MD_EDIT_REGION:PB_OPTIONS"; Pos = MAP_APPFONT ( 263 , 40 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; TabStop = TRUE ; @@ -283,6 +296,7 @@ ModalDialog MD_EDIT_REGION }; PushButton CB_DISMISS { + HelpID = "sw:PushButton:MD_EDIT_REGION:CB_DISMISS"; Pos = MAP_APPFONT ( 263 , 57 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Disable = TRUE ; @@ -406,6 +420,7 @@ TabPage TP_INSERT_SECTION }; ComboBox ED_RNAME { + HelpID = "sw:ComboBox:TP_INSERT_SECTION:ED_RNAME"; Pos = MAP_APPFONT ( 12 , 14 ) ; Size = MAP_APPFONT ( 69 , 140 ) ; TabStop = TRUE ; @@ -421,6 +436,7 @@ TabPage TP_INSERT_SECTION }; CheckBox CB_FILE { + HelpID = "sw:CheckBox:TP_INSERT_SECTION:CB_FILE"; Pos = MAP_APPFONT ( 96 , 14 ) ; Size = MAP_APPFONT ( 60 , 10 ) ; TabStop = TRUE ; @@ -428,6 +444,7 @@ TabPage TP_INSERT_SECTION }; CheckBox CB_DDE { + HelpID = "sw:CheckBox:TP_INSERT_SECTION:CB_DDE"; Pos = MAP_APPFONT ( 96 , 28) ; Size = MAP_APPFONT ( 60 , 10 ) ; Disable = TRUE ; @@ -449,6 +466,7 @@ TabPage TP_INSERT_SECTION }; Edit ED_FILE { + HelpID = "sw:Edit:TP_INSERT_SECTION:ED_FILE"; Border = TRUE ; Pos = MAP_APPFONT ( 160 , 42 ) ; Size = MAP_APPFONT ( 76 , 12 ) ; @@ -457,6 +475,7 @@ TabPage TP_INSERT_SECTION }; PushButton PB_FILE { + HelpID = "sw:PushButton:TP_INSERT_SECTION:PB_FILE"; Pos = MAP_APPFONT ( 239 , 42 ) ; Size = MAP_APPFONT ( 12 , 12 ) ; Disable = TRUE ; @@ -472,6 +491,7 @@ TabPage TP_INSERT_SECTION }; ComboBox LB_SUBREG { + HelpID = "sw:ComboBox:TP_INSERT_SECTION:LB_SUBREG"; Pos = MAP_APPFONT ( 160 , 58 ) ; Size = MAP_APPFONT ( 76 , 50 ) ; DropDown = TRUE ; @@ -488,6 +508,7 @@ TabPage TP_INSERT_SECTION }; CheckBox CB_PROTECT { + HelpID = "sw:CheckBox:TP_INSERT_SECTION:CB_PROTECT"; Pos = MAP_APPFONT ( 96 , 87 ) ; Size = MAP_APPFONT ( 100 , 10 ) ; TabStop = TRUE ; @@ -495,6 +516,7 @@ TabPage TP_INSERT_SECTION }; CheckBox CB_PASSWD { + HelpID = "sw:CheckBox:TP_INSERT_SECTION:CB_PASSWD"; Pos = MAP_APPFONT ( 105 , 101 ) ; Size = MAP_APPFONT ( 100 , 10 ) ; TabStop = TRUE ; @@ -502,6 +524,7 @@ TabPage TP_INSERT_SECTION }; PushButton PB_PASSWD { + HelpID = "sw:PushButton:TP_INSERT_SECTION:PB_PASSWD"; Pos = MAP_APPFONT ( 239 , 99 ) ; Size = MAP_APPFONT ( 12 , 12 ) ; TabStop = TRUE ; @@ -516,6 +539,7 @@ TabPage TP_INSERT_SECTION }; CheckBox CB_HIDE { + HelpID = "sw:CheckBox:TP_INSERT_SECTION:CB_HIDE"; Pos = MAP_APPFONT ( 96 , 128 ) ; Size = MAP_APPFONT ( 100 , 10 ) ; CB_HIDE_TEXT @@ -529,6 +553,7 @@ TabPage TP_INSERT_SECTION }; Edit ED_CONDITION { + HelpID = "sw:Edit:TP_INSERT_SECTION:ED_CONDITION"; Border = TRUE ; Pos = MAP_APPFONT ( 160 , 142 ) ; Size = MAP_APPFONT ( 91 , 12 ) ; @@ -545,6 +570,7 @@ TabPage TP_INSERT_SECTION }; CheckBox CB_EDIT_IN_READONLY { + HelpID = "sw:CheckBox:TP_INSERT_SECTION:CB_EDIT_IN_READONLY"; Pos = MAP_APPFONT ( 96 , 170 ) ; Size = MAP_APPFONT ( 158 , 10 ) ; CB_EDIT_IN_READONLY_TEXT @@ -609,6 +635,7 @@ TabPage TP_SECTION_FTNENDNOTES }; CheckBox CB_FTN_AT_TXTEND { + HelpID = "sw:CheckBox:TP_SECTION_FTNENDNOTES:CB_FTN_AT_TXTEND"; Pos = MAP_APPFONT ( 12 , 14 ) ; Size = MAP_APPFONT ( 90 , 10 ) ; TabStop = TRUE ; @@ -617,6 +644,7 @@ TabPage TP_SECTION_FTNENDNOTES }; CheckBox CB_FTN_NUM { + HelpID = "sw:CheckBox:TP_SECTION_FTNENDNOTES:CB_FTN_NUM"; Pos = MAP_APPFONT ( 18 , 29 ) ; Size = MAP_APPFONT ( 100 , 10 ) ; TabStop = TRUE ; @@ -631,6 +659,7 @@ TabPage TP_SECTION_FTNENDNOTES }; NumericField FLD_FTN_OFFSET { + HelpID = "sw:NumericField:TP_SECTION_FTNENDNOTES:FLD_FTN_OFFSET"; Pos = MAP_APPFONT ( 90 , 44 ) ; Size = MAP_APPFONT ( 30 , 12 ) ; Spin = TRUE ; @@ -643,6 +672,7 @@ TabPage TP_SECTION_FTNENDNOTES }; CheckBox CB_FTN_NUM_FMT { + HelpID = "sw:CheckBox:TP_SECTION_FTNENDNOTES:CB_FTN_NUM_FMT"; Pos = MAP_APPFONT ( 24 , 61 ) ; Size = MAP_APPFONT ( 100 , 10 ) ; TabStop = TRUE ; @@ -657,6 +687,7 @@ TabPage TP_SECTION_FTNENDNOTES }; Edit ED_FTN_PREFIX { + HelpID = "sw:Edit:TP_SECTION_FTNENDNOTES:ED_FTN_PREFIX"; Border = TRUE ; Pos = MAP_APPFONT ( 90 , 74 ) ; Size = MAP_APPFONT ( 30 , 12 ) ; @@ -666,6 +697,7 @@ TabPage TP_SECTION_FTNENDNOTES }; ListBox LB_FTN_NUMVIEW { + HelpID = "sw:ListBox:TP_SECTION_FTNENDNOTES:LB_FTN_NUMVIEW"; Border = TRUE ; Pos = MAP_APPFONT ( 123 , 74 ) ; Size = MAP_APPFONT ( 62 , 50 ) ; @@ -682,6 +714,7 @@ TabPage TP_SECTION_FTNENDNOTES }; Edit ED_FTN_SUFFIX { + HelpID = "sw:Edit:TP_SECTION_FTNENDNOTES:ED_FTN_SUFFIX"; Border = TRUE ; Pos = MAP_APPFONT ( 219 , 74 ) ; Size = MAP_APPFONT ( 30 , 12 ) ; @@ -700,6 +733,7 @@ TabPage TP_SECTION_FTNENDNOTES }; CheckBox CB_END_AT_TXTEND { + HelpID = "sw:CheckBox:TP_SECTION_FTNENDNOTES:CB_END_AT_TXTEND"; Pos = MAP_APPFONT ( 12 , 103 ) ; Size = MAP_APPFONT ( 100 , 10 ) ; TabStop = TRUE ; @@ -707,6 +741,7 @@ TabPage TP_SECTION_FTNENDNOTES }; CheckBox CB_END_NUM { + HelpID = "sw:CheckBox:TP_SECTION_FTNENDNOTES:CB_END_NUM"; Pos = MAP_APPFONT ( 16 , 118 ) ; Size = MAP_APPFONT ( 100 , 10 ) ; TabStop = TRUE ; @@ -721,6 +756,7 @@ TabPage TP_SECTION_FTNENDNOTES }; NumericField FLD_END_OFFSET { + HelpID = "sw:NumericField:TP_SECTION_FTNENDNOTES:FLD_END_OFFSET"; Pos = MAP_APPFONT ( 90 , 133 ) ; Size = MAP_APPFONT ( 30 , 12 ) ; Spin = TRUE ; @@ -733,6 +769,7 @@ TabPage TP_SECTION_FTNENDNOTES }; CheckBox CB_END_NUM_FMT { + HelpID = "sw:CheckBox:TP_SECTION_FTNENDNOTES:CB_END_NUM_FMT"; Pos = MAP_APPFONT ( 24 , 150 ) ; Size = MAP_APPFONT ( 100 , 10 ) ; TabStop = TRUE ; @@ -748,6 +785,7 @@ TabPage TP_SECTION_FTNENDNOTES }; Edit ED_END_PREFIX { + HelpID = "sw:Edit:TP_SECTION_FTNENDNOTES:ED_END_PREFIX"; Border = TRUE ; Pos = MAP_APPFONT ( 90 , 163 ) ; Size = MAP_APPFONT ( 30 , 12 ) ; @@ -757,6 +795,7 @@ TabPage TP_SECTION_FTNENDNOTES }; ListBox LB_END_NUMVIEW { + HelpID = "sw:ListBox:TP_SECTION_FTNENDNOTES:LB_END_NUMVIEW"; Border = TRUE ; Pos = MAP_APPFONT ( 123 , 163 ) ; Size = MAP_APPFONT ( 62 , 50 ) ; @@ -774,6 +813,7 @@ TabPage TP_SECTION_FTNENDNOTES }; Edit ED_END_SUFFIX { + HelpID = "sw:Edit:TP_SECTION_FTNENDNOTES:ED_END_SUFFIX"; Border = TRUE ; Pos = MAP_APPFONT ( 219 , 163 ) ; Size = MAP_APPFONT ( 30 , 12 ) ; @@ -805,6 +845,7 @@ TabPage TP_SECTION_INDENTS }; MetricField MF_BEFORE { + HelpID = "sw:MetricField:TP_SECTION_INDENTS:MF_BEFORE"; Border = TRUE ; Pos = MAP_APPFONT ( 135 , 14 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -828,6 +869,7 @@ TabPage TP_SECTION_INDENTS }; MetricField MF_AFTER { + HelpID = "sw:MetricField:TP_SECTION_INDENTS:MF_AFTER"; Border = TRUE ; Pos = MAP_APPFONT ( 135 , 30 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; diff --git a/sw/source/ui/dialog/swabstdlg.cxx b/sw/source/ui/dialog/swabstdlg.cxx index f6f9756a85..4b8de38dee 100644 --- a/sw/source/ui/dialog/swabstdlg.cxx +++ b/sw/source/ui/dialog/swabstdlg.cxx @@ -30,10 +30,10 @@ #include "precompiled_sw.hxx" #include "swabstdlg.hxx" -#include "swuilib.hxx" #include <osl/module.hxx> #include <tools/string.hxx> +#include <vcl/unohelp.hxx> typedef SwAbstractDialogFactory* (__LOADONCALLAPI *SwFuncPtrCreateDialogFactory)(); @@ -43,7 +43,8 @@ SwAbstractDialogFactory* SwAbstractDialogFactory::Create() { SwFuncPtrCreateDialogFactory fp = 0; static ::osl::Module aDialogLibrary; - if ( aDialogLibrary.is() || aDialogLibrary.loadRelative( &thisModule, String( RTL_CONSTASCII_USTRINGPARAM( DLL_NAME ) ) ) ) + static const ::rtl::OUString sLibName(::vcl::unohelper::CreateLibraryName("swui", sal_True)); + if ( aDialogLibrary.is() || aDialogLibrary.loadRelative( &thisModule, String( sLibName ) ) ) fp = ( SwAbstractDialogFactory* (__LOADONCALLAPI*)() ) aDialogLibrary.getFunctionSymbol( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CreateDialogFactory"))); if ( fp ) diff --git a/sw/source/ui/dialog/swdlgfact.cxx b/sw/source/ui/dialog/swdlgfact.cxx index d943911d32..96cd7eae99 100644 --- a/sw/source/ui/dialog/swdlgfact.cxx +++ b/sw/source/ui/dialog/swdlgfact.cxx @@ -144,7 +144,7 @@ IMPL_ABSTDLG_BASE(AbstractInsertSectionTabDialog_Impl); IMPL_ABSTDLG_BASE(AbstractIndexMarkFloatDlg_Impl); IMPL_ABSTDLG_BASE(AbstractAuthMarkFloatDlg_Impl); -void AbstractTabDialog_Impl::SetCurPageId( USHORT nId ) +void AbstractTabDialog_Impl::SetCurPageId( sal_uInt16 nId ) { pDlg->SetCurPageId( nId ); } @@ -154,7 +154,7 @@ const SfxItemSet* AbstractTabDialog_Impl::GetOutputItemSet() const return pDlg->GetOutputItemSet(); } -const USHORT* AbstractTabDialog_Impl::GetInputRanges(const SfxItemPool& pItem ) +const sal_uInt16* AbstractTabDialog_Impl::GetInputRanges(const SfxItemPool& pItem ) { return pDlg->GetInputRanges( pItem ); } @@ -180,12 +180,11 @@ void AbstractSwWordCountDialog_Impl::SetValues(const SwDocStat& rCurrent, con pDlg->SetValues(rCurrent, rDoc); } -BYTE AbstractSwInsertAbstractDlg_Impl::GetLevel() const +sal_uInt8 AbstractSwInsertAbstractDlg_Impl::GetLevel() const { return pDlg->GetLevel(); } - -BYTE AbstractSwInsertAbstractDlg_Impl::GetPara() const +sal_uInt8 AbstractSwInsertAbstractDlg_Impl::GetPara() const { return pDlg->GetPara(); } @@ -221,12 +220,12 @@ String AbstractSwBreakDlg_Impl::GetTemplateName() return pDlg->GetTemplateName(); } -USHORT AbstractSwBreakDlg_Impl:: GetKind() +sal_uInt16 AbstractSwBreakDlg_Impl:: GetKind() { return pDlg->GetKind(); } -USHORT AbstractSwBreakDlg_Impl:: GetPageNumber() +sal_uInt16 AbstractSwBreakDlg_Impl:: GetPageNumber() { return pDlg->GetPageNumber(); } @@ -245,7 +244,7 @@ void AbstractSwInsertDBColAutoPilot_Impl::DataToDoc( const uno::Sequence< uno::A pDlg->DataToDoc(rSelection, rxSource, xConnection, xResultSet); } -ByteString AbstractDropDownFieldDialog_Impl::GetWindowState( ULONG nMask ) const +ByteString AbstractDropDownFieldDialog_Impl::GetWindowState( sal_uLong nMask ) const { return pDlg->GetWindowState(nMask); } @@ -255,7 +254,7 @@ void AbstractDropDownFieldDialog_Impl::SetWindowState( const ByteString& r pDlg->SetWindowState(rStr); } -void AbstractSwLabDlg_Impl::SetCurPageId( USHORT nId ) +void AbstractSwLabDlg_Impl::SetCurPageId( sal_uInt16 nId ) { pDlg->SetCurPageId( nId ); } @@ -265,7 +264,7 @@ const SfxItemSet* AbstractSwLabDlg_Impl::GetOutputItemSet() const return pDlg->GetOutputItemSet(); } -const USHORT* AbstractSwLabDlg_Impl::GetInputRanges(const SfxItemPool& pItem ) +const sal_uInt16* AbstractSwLabDlg_Impl::GetInputRanges(const SfxItemPool& pItem ) { return pDlg->GetInputRanges( pItem ); } @@ -300,12 +299,12 @@ void AbstractSwSelGlossaryDlg_Impl::InsertGlos(const String &rRegion, const Stri pDlg->InsertGlos( rRegion, rGlosName ); } -USHORT AbstractSwSelGlossaryDlg_Impl::GetSelectedIdx() const +sal_uInt16 AbstractSwSelGlossaryDlg_Impl::GetSelectedIdx() const { return pDlg->GetSelectedIdx(); } -void AbstractSwSelGlossaryDlg_Impl::SelectEntryPos(USHORT nIdx) +void AbstractSwSelGlossaryDlg_Impl::SelectEntryPos(sal_uInt16 nIdx) { pDlg->SelectEntryPos( nIdx ); } @@ -315,7 +314,7 @@ void AbstractSwAutoFormatDlg_Impl::FillAutoFmtOfIndex( SwTableAutoFmt*& rToFill pDlg->FillAutoFmtOfIndex(rToFill); } -void AbstractSwFldDlg_Impl::SetCurPageId( USHORT nId ) +void AbstractSwFldDlg_Impl::SetCurPageId( sal_uInt16 nId ) { pDlg->SetCurPageId( nId ); } @@ -325,7 +324,7 @@ const SfxItemSet* AbstractSwFldDlg_Impl::GetOutputItemSet() const return pDlg->GetOutputItemSet(); } -const USHORT* AbstractSwFldDlg_Impl::GetInputRanges(const SfxItemPool& pItem ) +const sal_uInt16* AbstractSwFldDlg_Impl::GetInputRanges(const SfxItemPool& pItem ) { return pDlg->GetInputRanges( pItem ); } @@ -345,7 +344,7 @@ String AbstractSwFldDlg_Impl::GetText() const return pDlg->GetText(); } -void AbstractSwFldDlg_Impl::Start( BOOL bShowl ) +void AbstractSwFldDlg_Impl::Start( sal_Bool bShowl ) { pDlg->Start( bShowl ); } @@ -369,8 +368,7 @@ Window* AbstractSwFldDlg_Impl::GetWindow() { return (Window*)pDlg; } - -void AbstractSwFldDlg_Impl::ShowPage( USHORT nId ) +void AbstractSwFldDlg_Impl::ShowPage( sal_uInt16 nId ) { pDlg->ShowPage(nId); } @@ -387,7 +385,7 @@ void AbstractSwRenameXNamedDlg_Impl::SetAlternativeAccess( pDlg->SetAlternativeAccess( xSecond, xThird); } -void AbstractSwModalRedlineAcceptDlg_Impl::AcceptAll( BOOL bAccept ) +void AbstractSwModalRedlineAcceptDlg_Impl::AcceptAll( sal_Bool bAccept ) { pDlg->AcceptAll( bAccept); } @@ -407,7 +405,7 @@ void AbstractFldInputDlg_Impl::SetWindowState( const ByteString& rStr ) pDlg->SetWindowState( rStr ); } -ByteString AbstractFldInputDlg_Impl::GetWindowState( ULONG nMask ) const +ByteString AbstractFldInputDlg_Impl::GetWindowState( sal_uLong nMask ) const { return pDlg->GetWindowState( nMask ); } @@ -416,8 +414,7 @@ String AbstractInsFootNoteDlg_Impl::GetFontName() { return pDlg->GetFontName(); } - -BOOL AbstractInsFootNoteDlg_Impl::IsEndNote() +sal_Bool AbstractInsFootNoteDlg_Impl::IsEndNote() { return pDlg->IsEndNote(); } @@ -426,10 +423,9 @@ String AbstractInsFootNoteDlg_Impl::GetStr() { return pDlg->GetStr(); } - -void AbstractInsFootNoteDlg_Impl::SetHelpId( ULONG nHelpId ) +void AbstractInsFootNoteDlg_Impl::SetHelpId( const rtl::OString& sHelpId ) { - pDlg->SetHelpId( nHelpId ); + pDlg->SetHelpId( sHelpId ); } void AbstractInsFootNoteDlg_Impl::SetText( const XubString& rStr ) @@ -441,18 +437,16 @@ String AbstractInsertGrfRulerDlg_Impl::GetGraphicName() { return pDlg->GetGraphicName(); } - -BOOL AbstractInsertGrfRulerDlg_Impl::IsSimpleLine() +sal_Bool AbstractInsertGrfRulerDlg_Impl::IsSimpleLine() { return pDlg->IsSimpleLine(); } - -BOOL AbstractInsertGrfRulerDlg_Impl::HasImages() const +sal_Bool AbstractInsertGrfRulerDlg_Impl::HasImages() const { return pDlg->HasImages(); } -void AbstractInsTableDlg_Impl::GetValues( String& rName, USHORT& rRow, USHORT& rCol, +void AbstractInsTableDlg_Impl::GetValues( String& rName, sal_uInt16& rRow, sal_uInt16& rCol, SwInsertTableOptions& rInsTblFlags, String& rTableAutoFmtName, SwTableAutoFmt *& prTAFmt ) { @@ -468,23 +462,20 @@ String AbstractJavaEditDialog_Impl::GetType() { return pDlg->GetType(); } - -BOOL AbstractJavaEditDialog_Impl::IsUrl() +sal_Bool AbstractJavaEditDialog_Impl::IsUrl() { return pDlg->IsUrl(); } - -BOOL AbstractJavaEditDialog_Impl::IsNew() +sal_Bool AbstractJavaEditDialog_Impl::IsNew() { return pDlg->IsNew(); } - -BOOL AbstractJavaEditDialog_Impl::IsUpdate() +sal_Bool AbstractJavaEditDialog_Impl::IsUpdate() { return pDlg->IsUpdate(); } -USHORT AbstractMailMergeDlg_Impl::GetMergeType() +sal_uInt16 AbstractMailMergeDlg_Impl::GetMergeType() { return pDlg->GetMergeType(); } @@ -504,12 +495,12 @@ uno::Reference< sdbc::XResultSet> AbstractMailMergeDlg_Impl::GetResultSet() cons return pDlg->GetResultSet(); } -BOOL AbstractMailMergeCreateFromDlg_Impl::IsThisDocument() const +sal_Bool AbstractMailMergeCreateFromDlg_Impl::IsThisDocument() const { return pDlg->IsThisDocument(); } -BOOL AbstractMailMergeFieldConnectionsDlg_Impl::IsUseExistingConnections() const +sal_Bool AbstractMailMergeFieldConnectionsDlg_Impl::IsUseExistingConnections() const { return pDlg->IsUseExistingConnections(); } @@ -607,8 +598,7 @@ const String& AbstractMailMergeWizard_Impl::GetReloadDocument() const { return pDlg->GetReloadDocument(); } - -BOOL AbstractMailMergeWizard_Impl::ShowPage( USHORT nLevel ) +sal_Bool AbstractMailMergeWizard_Impl::ShowPage( sal_uInt16 nLevel ) { return pDlg->skipUntil(nLevel); } @@ -754,7 +744,7 @@ VclAbstractDialog * SwAbstractDialogFactory_Impl::CreateSwChangeDBDlg( SwView& r SfxAbstractTabDialog * SwAbstractDialogFactory_Impl::CreateSwCharDlg(Window* pParent, SwView& pVw, const SfxItemSet& rCoreSet, int nResId, // add for SwCharDlg - const String* pFmtStr , BOOL bIsDrwTxtDlg ) + const String* pFmtStr , sal_Bool bIsDrwTxtDlg ) { SfxTabDialog* pDlg=NULL; @@ -849,7 +839,7 @@ SfxAbstractTabDialog * SwAbstractDialogFactory_Impl::CreateSwFootNoteOptionDlg( } AbstractDropDownFieldDialog * SwAbstractDialogFactory_Impl::CreateDropDownFieldDialog ( Window *pParent, SwWrtShell &rSh, //add for DropDownFieldDialog - SwField* pField,int nResId, BOOL bNextButton ) + SwField* pField,int nResId, sal_Bool bNextButton ) { sw::DropDownFieldDialog* pDlg=NULL; switch ( nResId ) @@ -869,7 +859,7 @@ AbstractDropDownFieldDialog * SwAbstractDialogFactory_Impl::CreateDropDownField SfxAbstractTabDialog* SwAbstractDialogFactory_Impl::CreateSwEnvDlg ( Window* pParent, const SfxItemSet& rSet, SwWrtShell* pWrtSh, Printer* pPrt, - BOOL bInsert,int nResId ) //add for SwEnvDlg + sal_Bool bInsert,int nResId ) //add for SwEnvDlg { SfxTabDialog* pDlg=NULL; switch ( nResId ) @@ -888,7 +878,7 @@ SfxAbstractTabDialog* SwAbstractDialogFactory_Impl::CreateSwEnvDlg ( Window* pPa } AbstractSwLabDlg* SwAbstractDialogFactory_Impl::CreateSwLabDlg ( Window* pParent, const SfxItemSet& rSet, //add for SwLabDlg - SwNewDBMgr* pNewDBMgr, BOOL bLabel,int nResId ) + SwNewDBMgr* pNewDBMgr, sal_Bool bLabel,int nResId ) { SwLabDlg* pDlg=NULL; switch ( nResId ) @@ -914,10 +904,10 @@ SwLabDlgMethod SwAbstractDialogFactory_Impl::GetSwLabDlgStaticMethod () SfxAbstractTabDialog* SwAbstractDialogFactory_Impl::CreateSwParaDlg ( Window *pParent, SwView& rVw, const SfxItemSet& rCoreSet , - BYTE nDialogMode, + sal_uInt8 nDialogMode, int nResId, const String *pCollName, - BOOL bDraw , UINT16 nDefPage) + sal_Bool bDraw , sal_uInt16 nDefPage) { SfxTabDialog* pDlg=NULL; switch ( nResId ) @@ -988,7 +978,7 @@ AbstractSwSelGlossaryDlg * SwAbstractDialogFactory_Impl::CreateSwSelGlossaryDlg AbstractSwAutoFormatDlg * SwAbstractDialogFactory_Impl::CreateSwAutoFormatDlg( Window* pParent, SwWrtShell* pShell, int nResId, - BOOL bSetAutoFmt, + sal_Bool bSetAutoFmt, const SwTableAutoFmt* pSelFmt ) { SwAutoFormatDlg* pDlg=NULL; @@ -1007,7 +997,7 @@ AbstractSwAutoFormatDlg * SwAbstractDialogFactory_Impl::CreateSwAutoFormatDlg( W return 0; } -SfxAbstractDialog * SwAbstractDialogFactory_Impl::CreateSwBorderDlg (Window* pParent, SfxItemSet& rSet, USHORT nType,int nResId ) +SfxAbstractDialog * SwAbstractDialogFactory_Impl::CreateSwBorderDlg (Window* pParent, SfxItemSet& rSet, sal_uInt16 nType,int nResId ) { SfxModalDialog* pDlg=NULL; switch ( nResId ) @@ -1024,7 +1014,7 @@ SfxAbstractDialog * SwAbstractDialogFactory_Impl::CreateSwBorderDlg (Window* pPa return 0; } -SfxAbstractDialog* SwAbstractDialogFactory_Impl::CreateSwWrapDlg ( Window* pParent, SfxItemSet& rSet, SwWrtShell* pSh, BOOL bDrawMode, int nResId ) +SfxAbstractDialog* SwAbstractDialogFactory_Impl::CreateSwWrapDlg ( Window* pParent, SfxItemSet& rSet, SwWrtShell* pSh, sal_Bool bDrawMode, int nResId ) { SfxModalDialog* pDlg=NULL; switch ( nResId ) @@ -1150,7 +1140,7 @@ AbstractSwModalRedlineAcceptDlg * SwAbstractDialogFactory_Impl::CreateSwModalRed } VclAbstractDialog * SwAbstractDialogFactory_Impl::CreateSwVclDialog( int nResId, - Window* pParent, BOOL& rWithPrev ) //add for SwMergeTblDlg + Window* pParent, sal_Bool& rWithPrev ) //add for SwMergeTblDlg { Dialog* pDlg=NULL; switch ( nResId ) @@ -1169,10 +1159,10 @@ VclAbstractDialog * SwAbstractDialogFactory_Impl::CreateSwVclDialog( int nResId, SfxAbstractTabDialog* SwAbstractDialogFactory_Impl::CreateFrmTabDialog( int nResId, SfxViewFrame *pFrame, Window *pParent, const SfxItemSet& rCoreSet, - BOOL bNewFrm, - USHORT nResType, - BOOL bFmt, - UINT16 nDefPage, + sal_Bool bNewFrm, + sal_uInt16 nResType, + sal_Bool bFmt, + sal_uInt16 nDefPage, const String* pFmtStr ) //add for SwFrmDlg { SfxTabDialog* pDlg=NULL; @@ -1195,10 +1185,10 @@ SfxAbstractTabDialog* SwAbstractDialogFactory_Impl::CreateFrmTabDialog( int nRes SfxAbstractTabDialog* SwAbstractDialogFactory_Impl::CreateTemplateDialog( int nResId, Window* pParent, SfxStyleSheetBase& rBase, - USHORT nRegion, - BOOL bColumn, + sal_uInt16 nRegion, + sal_Bool bColumn, SwWrtShell* pActShell, - BOOL bNew ) //add for SwTemplateDlg + sal_Bool bNew ) //add for SwTemplateDlg { SfxTabDialog* pDlg=NULL; switch ( nResId ) @@ -1236,7 +1226,7 @@ AbstractGlossaryDlg* SwAbstractDialogFactory_Impl::CreateGlossaryDlg( int nResId AbstractFldInputDlg* SwAbstractDialogFactory_Impl::CreateFldInputDlg( int nResId, Window *pParent, SwWrtShell &rSh, - SwField* pField, BOOL bNextButton ) //add for SwFldInputDlg + SwField* pField, sal_Bool bNextButton ) //add for SwFldInputDlg { SwFldInputDlg* pDlg=NULL; switch ( nResId ) @@ -1253,7 +1243,7 @@ AbstractFldInputDlg* SwAbstractDialogFactory_Impl::CreateFldInputDlg( int nResId } AbstractInsFootNoteDlg* SwAbstractDialogFactory_Impl::CreateInsFootNoteDlg( int nResId, - Window * pParent, SwWrtShell &rSh, BOOL bEd ) //add for SwInsFootNoteDlg + Window * pParent, SwWrtShell &rSh, sal_Bool bEd ) //add for SwInsFootNoteDlg { SwInsFootNoteDlg* pDlg=NULL; switch ( nResId ) @@ -1278,7 +1268,7 @@ VclAbstractDialog * SwAbstractDialogFactory_Impl::CreateTitlePageDlg ( Window *p } VclAbstractDialog * SwAbstractDialogFactory_Impl::CreateVclSwViewDialog( int nResId, - SwView& rView, BOOL /*bCol*/ ) //add for SwInsRowColDlg, SwLineNumberingDlg + SwView& rView, sal_Bool /*bCol*/ ) //add for SwInsRowColDlg, SwLineNumberingDlg { Dialog* pDlg=NULL; switch ( nResId ) @@ -1446,8 +1436,8 @@ SfxAbstractTabDialog* SwAbstractDialogFactory_Impl::CreateSwTabDialog( int nResI AbstractMultiTOXTabDialog * SwAbstractDialogFactory_Impl::CreateMultiTOXTabDialog( int nResId, Window* pParent, const SfxItemSet& rSet, SwWrtShell &rShell, - SwTOXBase* pCurTOX, USHORT nToxType, - BOOL bGlobal ) //add for SwMultiTOXTabDialog + SwTOXBase* pCurTOX, sal_uInt16 nToxType, + sal_Bool bGlobal ) //add for SwMultiTOXTabDialog { SwMultiTOXTabDialog* pDlg=NULL; switch ( nResId ) @@ -1569,7 +1559,7 @@ AbstractMailMergeWizard* SwAbstractDialogFactory_Impl::CreateMailMergeWizard( } //add for static func in SwGlossaryDlg -GlossaryGetCurrGroup SwAbstractDialogFactory_Impl::GetGlossaryCurrGroupFunc( USHORT nId ) +GlossaryGetCurrGroup SwAbstractDialogFactory_Impl::GetGlossaryCurrGroupFunc( sal_uInt16 nId ) { switch ( nId ) { @@ -1580,7 +1570,7 @@ GlossaryGetCurrGroup SwAbstractDialogFactory_Impl::GetGlossaryCurrGroupFunc( USH } return 0; } -GlossarySetActGroup SwAbstractDialogFactory_Impl::SetGlossaryActGroupFunc( USHORT nId ) +GlossarySetActGroup SwAbstractDialogFactory_Impl::SetGlossaryActGroupFunc( sal_uInt16 nId ) { switch ( nId ) { @@ -1593,7 +1583,7 @@ GlossarySetActGroup SwAbstractDialogFactory_Impl::SetGlossaryActGroupFunc( USHOR } //------------------ Factories for TabPages -CreateTabPage SwAbstractDialogFactory_Impl::GetTabPageCreatorFunc( USHORT nId ) +CreateTabPage SwAbstractDialogFactory_Impl::GetTabPageCreatorFunc( sal_uInt16 nId ) { CreateTabPage pRet = 0; switch ( nId ) @@ -1656,7 +1646,7 @@ CreateTabPage SwAbstractDialogFactory_Impl::GetTabPageCreatorFunc( USHORT nId ) return pRet; } -GetTabPageRanges SwAbstractDialogFactory_Impl::GetTabPageRangesFunc( USHORT nId ) +GetTabPageRanges SwAbstractDialogFactory_Impl::GetTabPageRangesFunc( sal_uInt16 nId ) { switch ( nId ) { diff --git a/sw/source/ui/dialog/swdlgfact.hxx b/sw/source/ui/dialog/swdlgfact.hxx index 29cf162d11..1f18e01eae 100644 --- a/sw/source/ui/dialog/swdlgfact.hxx +++ b/sw/source/ui/dialog/swdlgfact.hxx @@ -64,7 +64,7 @@ public: \ {} \ virtual ~Class(); \ virtual short Execute() ; -// virtual void Show( BOOL bVisible = TRUE, USHORT nFlags = 0 ) +// virtual void Show( sal_Bool bVisible = sal_True, sal_uInt16 nFlags = 0 ) #define IMPL_ABSTDLG_BASE(Class) \ Class::~Class() \ @@ -87,8 +87,8 @@ class AbstractSwWordCountDialog_Impl : public AbstractSwWordCountDialog class AbstractSwInsertAbstractDlg_Impl : public AbstractSwInsertAbstractDlg { DECL_ABSTDLG_BASE(AbstractSwInsertAbstractDlg_Impl,SwInsertAbstractDlg) - virtual BYTE GetLevel() const ; - virtual BYTE GetPara() const ; + virtual sal_uInt8 GetLevel() const ; + virtual sal_uInt8 GetPara() const ; }; //add for SwInsertAbstractDlg end @@ -125,8 +125,8 @@ class AbstractSwBreakDlg_Impl : public AbstractSwBreakDlg // add for SwBreakDlg { DECL_ABSTDLG_BASE(AbstractSwBreakDlg_Impl,SwBreakDlg) virtual String GetTemplateName(); - virtual USHORT GetKind(); - virtual USHORT GetPageNumber(); + virtual sal_uInt16 GetKind(); + virtual sal_uInt16 GetPageNumber(); }; class AbstractSplitTableDialog_Impl : public AbstractSplitTableDialog // add for @@ -141,9 +141,9 @@ class AbstractSplitTableDialog_Impl : public AbstractSplitTableDialog // add for class AbstractTabDialog_Impl : public SfxAbstractTabDialog { DECL_ABSTDLG_BASE( AbstractTabDialog_Impl,SfxTabDialog ) - virtual void SetCurPageId( USHORT nId ); + virtual void SetCurPageId( sal_uInt16 nId ); virtual const SfxItemSet* GetOutputItemSet() const; - virtual const USHORT* GetInputRanges( const SfxItemPool& pItem ); + virtual const sal_uInt16* GetInputRanges( const SfxItemPool& pItem ); virtual void SetInputSet( const SfxItemSet* pInSet ); //From class Window. virtual void SetText( const XubString& rStr ); @@ -175,7 +175,7 @@ class AbstractSwInsertDBColAutoPilot_Impl : public AbstractSwInsertDBColAutoPil class AbstractDropDownFieldDialog_Impl : public AbstractDropDownFieldDialog //add for DropDownFieldDialog { DECL_ABSTDLG_BASE(AbstractDropDownFieldDialog_Impl, sw::DropDownFieldDialog) - virtual ByteString GetWindowState( ULONG nMask = WINDOWSTATE_MASK_ALL ) const; //this method inherit from SystemWindow + virtual ByteString GetWindowState( sal_uLong nMask = WINDOWSTATE_MASK_ALL ) const; //this method inherit from SystemWindow virtual void SetWindowState( const ByteString& rStr );//this method inherit from SystemWindow }; //add for DropDownFieldDialog end @@ -184,9 +184,9 @@ class AbstractDropDownFieldDialog_Impl : public AbstractDropDownFieldDialog //ad class AbstractSwLabDlg_Impl : public AbstractSwLabDlg { DECL_ABSTDLG_BASE(AbstractSwLabDlg_Impl,SwLabDlg) - virtual void SetCurPageId( USHORT nId ); + virtual void SetCurPageId( sal_uInt16 nId ); virtual const SfxItemSet* GetOutputItemSet() const; - virtual const USHORT* GetInputRanges( const SfxItemPool& pItem ); + virtual const sal_uInt16* GetInputRanges( const SfxItemPool& pItem ); virtual void SetInputSet( const SfxItemSet* pInSet ); //From class Window. virtual void SetText( const XubString& rStr ); @@ -201,8 +201,8 @@ class AbstractSwSelGlossaryDlg_Impl : public AbstractSwSelGlossaryDlg { DECL_ABSTDLG_BASE(AbstractSwSelGlossaryDlg_Impl,SwSelGlossaryDlg) virtual void InsertGlos(const String &rRegion, const String &rGlosName); // inline - virtual USHORT GetSelectedIdx() const; // inline - virtual void SelectEntryPos(USHORT nIdx); // inline + virtual sal_uInt16 GetSelectedIdx() const; // inline + virtual void SelectEntryPos(sal_uInt16 nIdx); // inline }; //add for SwSelGlossaryDlg end @@ -219,15 +219,15 @@ class AbstractSwAutoFormatDlg_Impl : public AbstractSwAutoFormatDlg class AbstractSwFldDlg_Impl : public AbstractSwFldDlg //add for SwFldDlg { DECL_ABSTDLG_BASE(AbstractSwFldDlg_Impl,SwFldDlg ) - virtual void SetCurPageId( USHORT nId ); + virtual void SetCurPageId( sal_uInt16 nId ); virtual const SfxItemSet* GetOutputItemSet() const; - virtual const USHORT* GetInputRanges( const SfxItemPool& pItem ); + virtual const sal_uInt16* GetInputRanges( const SfxItemPool& pItem ); virtual void SetInputSet( const SfxItemSet* pInSet ); //From class Window. virtual void SetText( const XubString& rStr ); virtual String GetText() const; - virtual void Start( BOOL bShow = TRUE ); //this method from SfxTabDialog - virtual void ShowPage( USHORT nId );// this method from SfxTabDialog + virtual void Start( sal_Bool bShow = sal_True ); //this method from SfxTabDialog + virtual void ShowPage( sal_uInt16 nId );// this method from SfxTabDialog virtual void Initialize(SfxChildWinInfo *pInfo); virtual void ReInitDlg(); virtual void ActivateDatabasePage(); @@ -249,7 +249,7 @@ class AbstractSwRenameXNamedDlg_Impl : public AbstractSwRenameXNamedDlg class AbstractSwModalRedlineAcceptDlg_Impl : public AbstractSwModalRedlineAcceptDlg { DECL_ABSTDLG_BASE(AbstractSwModalRedlineAcceptDlg_Impl,SwModalRedlineAcceptDlg ) - virtual void AcceptAll( BOOL bAccept ); + virtual void AcceptAll( sal_Bool bAccept ); }; //add for SwModalRedlineAcceptDlg end @@ -270,7 +270,7 @@ class AbstractFldInputDlg_Impl : public AbstractFldInputDlg DECL_ABSTDLG_BASE(AbstractFldInputDlg_Impl,SwFldInputDlg) //from class SalFrame virtual void SetWindowState( const ByteString& rStr ) ; - virtual ByteString GetWindowState( ULONG nMask = WINDOWSTATE_MASK_ALL ) const ; + virtual ByteString GetWindowState( sal_uLong nMask = WINDOWSTATE_MASK_ALL ) const ; }; //for SwFldInputDlg end @@ -280,10 +280,10 @@ class AbstractInsFootNoteDlg_Impl : public AbstractInsFootNoteDlg { DECL_ABSTDLG_BASE(AbstractInsFootNoteDlg_Impl,SwInsFootNoteDlg) virtual String GetFontName(); - virtual BOOL IsEndNote(); + virtual sal_Bool IsEndNote(); virtual String GetStr(); //from class Window - virtual void SetHelpId( ULONG nHelpId ); + virtual void SetHelpId( const rtl::OString& sHelpId ); virtual void SetText( const XubString& rStr ); }; //for SwInsFootNoteDlg end @@ -294,8 +294,8 @@ class AbstractInsertGrfRulerDlg_Impl : public AbstractInsertGrfRulerDlg { DECL_ABSTDLG_BASE(AbstractInsertGrfRulerDlg_Impl,SwInsertGrfRulerDlg) virtual String GetGraphicName(); - virtual BOOL IsSimpleLine(); - virtual BOOL HasImages() const ; + virtual sal_Bool IsSimpleLine(); + virtual sal_Bool HasImages() const ; }; //for SwInsertGrfRulerDlg end @@ -304,7 +304,7 @@ class SwInsTableDlg; class AbstractInsTableDlg_Impl : public AbstractInsTableDlg { DECL_ABSTDLG_BASE(AbstractInsTableDlg_Impl,SwInsTableDlg) - virtual void GetValues( String& rName, USHORT& rRow, USHORT& rCol, + virtual void GetValues( String& rName, sal_uInt16& rRow, sal_uInt16& rCol, SwInsertTableOptions& rInsTblFlags, String& rTableAutoFmtName, SwTableAutoFmt *& prTAFmt ); }; @@ -317,9 +317,9 @@ class AbstractJavaEditDialog_Impl : public AbstractJavaEditDialog DECL_ABSTDLG_BASE(AbstractJavaEditDialog_Impl,SwJavaEditDialog) virtual String GetText(); virtual String GetType(); - virtual BOOL IsUrl(); - virtual BOOL IsNew(); - virtual BOOL IsUpdate(); + virtual sal_Bool IsUrl(); + virtual sal_Bool IsNew(); + virtual sal_Bool IsUpdate(); }; //for SwJavaEditDialog end @@ -328,7 +328,7 @@ class SwMailMergeDlg; class AbstractMailMergeDlg_Impl : public AbstractMailMergeDlg { DECL_ABSTDLG_BASE(AbstractMailMergeDlg_Impl,SwMailMergeDlg) - virtual USHORT GetMergeType() ; + virtual sal_uInt16 GetMergeType() ; virtual const ::rtl::OUString& GetSaveFilter() const; virtual const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > GetSelection() const ; virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet> GetResultSet() const; @@ -339,7 +339,7 @@ class SwMailMergeCreateFromDlg; class AbstractMailMergeCreateFromDlg_Impl : public AbstractMailMergeCreateFromDlg { DECL_ABSTDLG_BASE(AbstractMailMergeCreateFromDlg_Impl,SwMailMergeCreateFromDlg) - virtual BOOL IsThisDocument() const ; + virtual sal_Bool IsThisDocument() const ; }; //for SwMailMergeCreateFromDlg end //for SwMailMergeFieldConnectionsDlg begin @@ -347,7 +347,7 @@ class SwMailMergeFieldConnectionsDlg; class AbstractMailMergeFieldConnectionsDlg_Impl : public AbstractMailMergeFieldConnectionsDlg { DECL_ABSTDLG_BASE(AbstractMailMergeFieldConnectionsDlg_Impl,SwMailMergeFieldConnectionsDlg) - virtual BOOL IsUseExistingConnections() const ; + virtual sal_Bool IsUseExistingConnections() const ; }; //for SwMailMergeFieldConnectionsDlg end @@ -418,7 +418,7 @@ public: virtual void SetReloadDocument(const String& rURL); virtual const String& GetReloadDocument() const; - virtual BOOL ShowPage( USHORT nLevel ); + virtual sal_Bool ShowPage( sal_uInt16 nLevel ); virtual sal_uInt16 GetRestartPage() const; }; @@ -441,7 +441,7 @@ public: virtual AbstractSwBreakDlg * CreateSwBreakDlg ( Window *pParent, SwWrtShell &rSh,int nResId ); // add for SwBreakDlg virtual VclAbstractDialog * CreateSwChangeDBDlg( SwView& rVw, int nResId ); //add for SwChangeDBDlg virtual SfxAbstractTabDialog * CreateSwCharDlg( Window* pParent, SwView& pVw, const SfxItemSet& rCoreSet, int nResId, // add for SwCharDlg - const String* pFmtStr = 0, BOOL bIsDrwTxtDlg = FALSE); + const String* pFmtStr = 0, sal_Bool bIsDrwTxtDlg = sal_False); virtual AbstractSwConvertTableDlg* CreateSwConvertTableDlg ( SwView& rView, int nResId, bool bToTable ); //add for SwConvertTableDlg virtual VclAbstractDialog * CreateSwCaptionDialog ( Window *pParent, SwView &rV,int nResId); //add for SwCaptionDialog @@ -452,20 +452,20 @@ public: virtual SfxAbstractTabDialog * CreateSwFootNoteOptionDlg( Window *pParent, SwWrtShell &rSh,int nResId);//add for SwFootNoteOptionDlg virtual AbstractDropDownFieldDialog * CreateDropDownFieldDialog ( Window *pParent, SwWrtShell &rSh, //add for DropDownFieldDialog - SwField* pField,int nResId, BOOL bNextButton = FALSE ); - virtual SfxAbstractTabDialog* CreateSwEnvDlg ( Window* pParent, const SfxItemSet& rSet, SwWrtShell* pWrtSh, Printer* pPrt, BOOL bInsert,int nResId ); //add for SwEnvDlg + SwField* pField,int nResId, sal_Bool bNextButton = sal_False ); + virtual SfxAbstractTabDialog* CreateSwEnvDlg ( Window* pParent, const SfxItemSet& rSet, SwWrtShell* pWrtSh, Printer* pPrt, sal_Bool bInsert,int nResId ); //add for SwEnvDlg virtual AbstractSwLabDlg* CreateSwLabDlg ( Window* pParent, const SfxItemSet& rSet, //add for SwLabDlg - SwNewDBMgr* pNewDBMgr, BOOL bLabel,int nResId ); + SwNewDBMgr* pNewDBMgr, sal_Bool bLabel,int nResId ); virtual SwLabDlgMethod GetSwLabDlgStaticMethod (); //add for SwLabDlg virtual SfxAbstractTabDialog* CreateSwParaDlg ( Window *pParent, //add for SwParaDlg SwView& rVw, const SfxItemSet& rCoreSet, - BYTE nDialogMode, + sal_uInt8 nDialogMode, int nResId, const String *pCollName = 0, - BOOL bDraw = FALSE, - UINT16 nDefPage = 0); + sal_Bool bDraw = sal_False, + sal_uInt16 nDefPage = 0); virtual AbstractSwSelGlossaryDlg * CreateSwSelGlossaryDlg ( Window * pParent, const String &rShortName, int nResId ); //add for SwSelGlossaryDlg virtual VclAbstractDialog * CreateVclAbstractDialog ( Window * pParent, SwWrtShell &rSh, int nResId ); //add for SwTableHeightDlg SwSortDlg @@ -473,11 +473,11 @@ public: virtual AbstractSwAutoFormatDlg * CreateSwAutoFormatDlg( Window* pParent, SwWrtShell* pShell, //add for SwAutoFormatDlg int nResId, - BOOL bSetAutoFmt = TRUE, + sal_Bool bSetAutoFmt = sal_True, const SwTableAutoFmt* pSelFmt = 0 ); - virtual SfxAbstractDialog * CreateSwBorderDlg (Window* pParent, SfxItemSet& rSet, USHORT nType,int nResId );//add for SwBorderDlg + virtual SfxAbstractDialog * CreateSwBorderDlg (Window* pParent, SfxItemSet& rSet, sal_uInt16 nType,int nResId );//add for SwBorderDlg - virtual SfxAbstractDialog * CreateSwWrapDlg ( Window* pParent, SfxItemSet& rSet, SwWrtShell* pSh, BOOL bDrawMode, int nResId ); //add for SwWrapDlg + virtual SfxAbstractDialog * CreateSwWrapDlg ( Window* pParent, SfxItemSet& rSet, SwWrtShell* pSh, sal_Bool bDrawMode, int nResId ); //add for SwWrapDlg virtual VclAbstractDialog * CreateSwTableWidthDlg ( Window *pParent, SwTableFUNC &rFnc , int nResId ); //add for SwTableWidthDlg virtual SfxAbstractTabDialog* CreateSwTableTabDlg( Window* pParent, SfxItemPool& Pool, const SfxItemSet* pItemSet, SwWrtShell* pSh,int nResId ); //add for SwTableTabDlg @@ -489,34 +489,34 @@ public: virtual AbstractSwModalRedlineAcceptDlg * CreateSwModalRedlineAcceptDlg ( Window *pParent, int nResId ); //add for SwModalRedlineAcceptDlg virtual VclAbstractDialog* CreateSwVclDialog( int nResId, - Window* pParent, BOOL& rWithPrev ); //add for SwMergeTblDlg + Window* pParent, sal_Bool& rWithPrev ); //add for SwMergeTblDlg virtual SfxAbstractTabDialog* CreateFrmTabDialog( int nResId, SfxViewFrame *pFrame, Window *pParent, const SfxItemSet& rCoreSet, - BOOL bNewFrm = TRUE, - USHORT nResType = DLG_FRM_STD, - BOOL bFmt = FALSE, - UINT16 nDefPage = 0, + sal_Bool bNewFrm = sal_True, + sal_uInt16 nResType = DLG_FRM_STD, + sal_Bool bFmt = sal_False, + sal_uInt16 nDefPage = 0, const String* pFmtStr = 0); //add for SwFrmDlg virtual SfxAbstractTabDialog* CreateTemplateDialog( int nResId, Window* pParent, SfxStyleSheetBase& rBase, - USHORT nRegion, - BOOL bColumn = FALSE, + sal_uInt16 nRegion, + sal_Bool bColumn = sal_False, SwWrtShell* pActShell = 0, - BOOL bNew = FALSE ); //add for SwTemplateDlg + sal_Bool bNew = sal_False ); //add for SwTemplateDlg virtual AbstractGlossaryDlg* CreateGlossaryDlg( int nResId, SfxViewFrame* pViewFrame, SwGlossaryHdl* pGlosHdl, SwWrtShell *pWrtShell); //add for SwGlossaryDlg virtual AbstractFldInputDlg* CreateFldInputDlg( int nResId, Window *pParent, SwWrtShell &rSh, - SwField* pField, BOOL bNextButton = FALSE ); //add for SwFldInputDlg + SwField* pField, sal_Bool bNextButton = sal_False ); //add for SwFldInputDlg virtual AbstractInsFootNoteDlg* CreateInsFootNoteDlg( int nResId, - Window * pParent, SwWrtShell &rSh, BOOL bEd = FALSE); //add for SwInsFootNoteDlg + Window * pParent, SwWrtShell &rSh, sal_Bool bEd = sal_False); //add for SwInsFootNoteDlg virtual VclAbstractDialog * CreateTitlePageDlg ( Window * pParent ); virtual VclAbstractDialog * CreateVclSwViewDialog( int nResId, - SwView& rView, BOOL bCol = FALSE ); //add for SwInsRowColDlg, SwLineNumberingDlg + SwView& rView, sal_Bool bCol = sal_False ); //add for SwInsRowColDlg, SwLineNumberingDlg virtual AbstractInsertGrfRulerDlg* CreateInsertGrfRulerDlg( int nResId, Window * pParent ); //add for SwInsertGrfRulerDlg virtual AbstractInsTableDlg* CreateInsTableDlg( int nResId, @@ -543,8 +543,8 @@ public: virtual AbstractMultiTOXTabDialog* CreateMultiTOXTabDialog( int nResId, Window* pParent, const SfxItemSet& rSet, SwWrtShell &rShell, - SwTOXBase* pCurTOX, USHORT nToxType = USHRT_MAX, - BOOL bGlobal = FALSE); //add for SwMultiTOXTabDialog + SwTOXBase* pCurTOX, sal_uInt16 nToxType = USHRT_MAX, + sal_Bool bGlobal = sal_False); //add for SwMultiTOXTabDialog virtual AbstractEditRegionDlg* CreateEditRegionDlg( int nResId, Window* pParent, SwWrtShell& rWrtSh ); //add for SwEditRegionDlg virtual AbstractInsertSectionTabDialog* CreateInsertSectionTabDialog( int nResId, @@ -567,13 +567,13 @@ public: virtual AbstractMailMergeWizard* CreateMailMergeWizard(SwView& rView, SwMailMergeConfigItem& rConfigItem); //add for static func in SwGlossaryDlg - virtual GlossaryGetCurrGroup GetGlossaryCurrGroupFunc( USHORT nId ); - virtual GlossarySetActGroup SetGlossaryActGroupFunc( USHORT nId ); + virtual GlossaryGetCurrGroup GetGlossaryCurrGroupFunc( sal_uInt16 nId ); + virtual GlossarySetActGroup SetGlossaryActGroupFunc( sal_uInt16 nId ); // For TabPage - virtual CreateTabPage GetTabPageCreatorFunc( USHORT nId ); + virtual CreateTabPage GetTabPageCreatorFunc( sal_uInt16 nId ); - virtual GetTabPageRanges GetTabPageRangesFunc( USHORT nId ); + virtual GetTabPageRanges GetTabPageRangesFunc( sal_uInt16 nId ); }; @@ -584,5 +584,4 @@ struct SwDialogsResMgr #endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
\ No newline at end of file diff --git a/sw/source/ui/dialog/swwrtshitem.cxx b/sw/source/ui/dialog/swwrtshitem.cxx index 6975975c3c..6bfcd3d8da 100644 --- a/sw/source/ui/dialog/swwrtshitem.cxx +++ b/sw/source/ui/dialog/swwrtshitem.cxx @@ -30,7 +30,7 @@ #include "precompiled_sw.hxx" #include "swwrtshitem.hxx" TYPEINIT1(SwWrtShellItem,SfxPoolItem); -SwWrtShellItem::SwWrtShellItem( USHORT _nWhich, SwWrtShell* pSh ) +SwWrtShellItem::SwWrtShellItem( sal_uInt16 _nWhich, SwWrtShell* pSh ) : SfxPoolItem( _nWhich ), pWrtSh( pSh ) { diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx index 137b69e9fd..74a1dbe86f 100644 --- a/sw/source/ui/dialog/uiregionsw.cxx +++ b/sw/source/ui/dialog/uiregionsw.cxx @@ -94,8 +94,8 @@ void lcl_FillList( SwWrtShell& rSh, ComboBox& rSubRegions, ComboBox* pAvailNames const SwSectionFmt* pFmt; if( !pNewFmt ) { - USHORT nCount = rSh.GetSectionFmtCount(); - for(USHORT i=0;i<nCount;i++) + sal_uInt16 nCount = rSh.GetSectionFmtCount(); + for(sal_uInt16 i=0;i<nCount;i++) { SectionType eTmpType; if( !(pFmt = &rSh.GetSectionFmt(i))->GetParent() && @@ -115,11 +115,11 @@ void lcl_FillList( SwWrtShell& rSh, ComboBox& rSubRegions, ComboBox* pAvailNames else { SwSections aTmpArr; - USHORT nCnt = pNewFmt->GetChildSections(aTmpArr,SORTSECT_POS); + sal_uInt16 nCnt = pNewFmt->GetChildSections(aTmpArr,SORTSECT_POS); if( nCnt ) { SectionType eTmpType; - for( USHORT n = 0; n < nCnt; ++n ) + for( sal_uInt16 n = 0; n < nCnt; ++n ) if( (pFmt = aTmpArr[n]->GetFmt())->IsInNodesArr()&& (eTmpType = pFmt->GetSection()->GetType()) != TOX_CONTENT_SECTION && TOX_HEADER_SECTION != eTmpType ) @@ -174,7 +174,7 @@ private: SwFmtNoBalancedColumns m_Balance; SvxFrameDirectionItem m_FrmDirItem; SvxLRSpaceItem m_LRSpaceItem; - USHORT m_nArrPos; + sal_uInt16 m_nArrPos; // shows, if maybe textcontent is in the region bool m_bContent : 1; // for multiselection, mark at first, then work with TreeListBox! @@ -182,7 +182,7 @@ private: uno::Sequence<sal_Int8> m_TempPasswd; public: - SectRepr(USHORT nPos, SwSection& rSect); + SectRepr(sal_uInt16 nPos, SwSection& rSect); bool operator==(SectRepr& rSectRef) const { return m_nArrPos == rSectRef.GetArrPos(); } @@ -199,7 +199,7 @@ public: SvxFrameDirectionItem& GetFrmDir() { return m_FrmDirItem; } SvxLRSpaceItem& GetLRSpace() { return m_LRSpaceItem; } - USHORT GetArrPos() const { return m_nArrPos; } + sal_uInt16 GetArrPos() const { return m_nArrPos; } String GetFile() const; String GetSubRegion() const; void SetFile(String const& rFile); @@ -220,7 +220,7 @@ public: SV_IMPL_OP_PTRARR_SORT( SectReprArr, SectReprPtr ) -SectRepr::SectRepr( USHORT nPos, SwSection& rSect ) +SectRepr::SectRepr( sal_uInt16 nPos, SwSection& rSect ) : m_SectionData( rSect ) , m_Brush( RES_BACKGROUND ) , m_FrmDirItem( FRMDIR_ENVIRONMENT, RES_FRAMEDIR ) @@ -325,7 +325,7 @@ String SectRepr::GetFile() const { if (DDE_LINK_SECTION == m_SectionData.GetType()) { - USHORT n = sLinkFile.SearchAndReplace( sfx2::cTokenSeperator, ' ' ); + sal_uInt16 n = sLinkFile.SearchAndReplace( sfx2::cTokenSeperator, ' ' ); sLinkFile.SearchAndReplace( sfx2::cTokenSeperator, ' ', n ); } else @@ -422,7 +422,7 @@ SwEditRegionDlg::SwEditRegionDlg( Window* pParent, SwWrtShell& rWrtSh ) aTree.SetHelpId(HID_REGION_TREE); aTree.SetSelectionMode( MULTIPLE_SELECTION ); - aTree.SetWindowBits(WB_HASBUTTONSATROOT|WB_CLIPCHILDREN|WB_HSCROLL); + aTree.SetStyle(aTree.GetStyle()|WB_HASBUTTONSATROOT|WB_CLIPCHILDREN|WB_HSCROLL); aTree.SetSpaceBetweenEntries(0); if(bWeb) @@ -446,13 +446,17 @@ SwEditRegionDlg::SwEditRegionDlg( Window* pParent, SwWrtShell& rWrtSh ) aTree.Select( aTree.First() ); aTree.Show(); bDontCheckPasswd = sal_False; + + aPasswdPB.SetAccessibleRelationMemberOf(&aProtectFL); + aPasswdPB.SetAccessibleRelationLabeledBy(&aPasswdCB); + aSubRegionED.SetAccessibleName(aSubRegionFT.GetText()); } -BOOL SwEditRegionDlg::CheckPasswd(CheckBox* pBox) +sal_Bool SwEditRegionDlg::CheckPasswd(CheckBox* pBox) { if(bDontCheckPasswd) - return TRUE; - sal_Bool bRet = TRUE; + return sal_True; + sal_Bool bRet = sal_True; SvLBoxEntry* pEntry = aTree.FirstSelected(); while( pEntry ) { @@ -461,7 +465,7 @@ BOOL SwEditRegionDlg::CheckPasswd(CheckBox* pBox) && pRepr->GetSectionData().GetPassword().getLength()) { SwTestPasswdDlg aPasswdDlg(this); - bRet = FALSE; + bRet = sal_False; if (aPasswdDlg.Execute()) { String sNewPasswd( aPasswdDlg.GetPassword() ); @@ -471,7 +475,7 @@ BOOL SwEditRegionDlg::CheckPasswd(CheckBox* pBox) pRepr->GetSectionData().GetPassword(), sNewPasswd)) { pRepr->SetTempPasswd(aNewPasswd); - bRet = TRUE; + bRet = sal_True; } else { @@ -503,8 +507,8 @@ void SwEditRegionDlg::RecurseList( const SwSectionFmt* pFmt, SvLBoxEntry* pEntry if (!pFmt) { - USHORT nCount=rSh.GetSectionFmtCount(); - for ( USHORT n=0; n < nCount; n++ ) + sal_uInt16 nCount=rSh.GetSectionFmtCount(); + for ( sal_uInt16 n=0; n < nCount; n++ ) { SectionType eTmpType; if( !( pFmt = &rSh.GetSectionFmt(n))->GetParent() && @@ -529,10 +533,10 @@ void SwEditRegionDlg::RecurseList( const SwSectionFmt* pFmt, SvLBoxEntry* pEntry { SwSections aTmpArr; SvLBoxEntry* pNEntry; - USHORT nCnt = pFmt->GetChildSections(aTmpArr,SORTSECT_POS); + sal_uInt16 nCnt = pFmt->GetChildSections(aTmpArr,SORTSECT_POS); if( nCnt ) { - for( USHORT n = 0; n < nCnt; ++n ) + for( sal_uInt16 n = 0; n < nCnt; ++n ) { SectionType eTmpType; pFmt = aTmpArr[n]->GetFmt(); @@ -564,10 +568,10 @@ void SwEditRegionDlg::RecurseList( const SwSectionFmt* pFmt, SvLBoxEntry* pEntry } } -USHORT SwEditRegionDlg::FindArrPos(const SwSectionFmt* pFmt ) +sal_uInt16 SwEditRegionDlg::FindArrPos(const SwSectionFmt* pFmt ) { - USHORT nCount=rSh.GetSectionFmtCount(); - for (USHORT i=0;i<nCount;i++) + sal_uInt16 nCount=rSh.GetSectionFmtCount(); + for (sal_uInt16 i=0;i<nCount;i++) if (pFmt==&rSh.GetSectionFmt(i)) return i; @@ -600,7 +604,7 @@ void SwEditRegionDlg::SelectSection(const String& rSectionName) } if(pEntry) { - aTree.SelectAll( FALSE); + aTree.SelectAll( sal_False); aTree.Select(pEntry); aTree.MakeVisible(pEntry); } @@ -615,21 +619,21 @@ IMPL_LINK( SwEditRegionDlg, GetFirstEntryHdl, SvTreeListBox *, pBox ) { bDontCheckPasswd = sal_True; SvLBoxEntry* pEntry=pBox->FirstSelected(); - aHideCB .Enable(TRUE); + aHideCB .Enable(sal_True); // edit in readonly sections - aEditInReadonlyCB.Enable(TRUE); + aEditInReadonlyCB.Enable(sal_True); - aProtectCB .Enable(TRUE); - aFileCB .Enable(TRUE); + aProtectCB .Enable(sal_True); + aFileCB .Enable(sal_True); UNO_NMSPC::Sequence <sal_Int8> aCurPasswd; if( 1 < pBox->GetSelectionCount() ) { - aHideCB.EnableTriState( TRUE ); - aProtectCB.EnableTriState( TRUE ); + aHideCB.EnableTriState( sal_True ); + aProtectCB.EnableTriState( sal_True ); // edit in readonly sections - aEditInReadonlyCB.EnableTriState ( TRUE ); + aEditInReadonlyCB.EnableTriState ( sal_True ); - aFileCB.EnableTriState( TRUE ); + aFileCB.EnableTriState( sal_True ); bool bHiddenValid = true; bool bProtectValid = true; @@ -641,10 +645,10 @@ IMPL_LINK( SwEditRegionDlg, GetFirstEntryHdl, SvTreeListBox *, pBox ) bool bHidden = true; bool bProtect = true; String sCondition; - BOOL bFirst = TRUE; - BOOL bFileValid = TRUE; - BOOL bFile = TRUE; - BOOL bPasswdValid = TRUE; + sal_Bool bFirst = sal_True; + sal_Bool bFileValid = sal_True; + sal_Bool bFile = sal_True; + sal_Bool bPasswdValid = sal_True; while( pEntry ) { @@ -665,7 +669,7 @@ IMPL_LINK( SwEditRegionDlg, GetFirstEntryHdl, SvTreeListBox *, pBox ) { String sTemp(rData.GetCondition()); if(sCondition != sTemp) - bConditionValid = FALSE; + bConditionValid = sal_False; bHiddenValid = (bHidden == rData.IsHidden()); bProtectValid = (bProtect == rData.IsProtectFlag()); // edit in readonly sections @@ -677,7 +681,7 @@ IMPL_LINK( SwEditRegionDlg, GetFirstEntryHdl, SvTreeListBox *, pBox ) bPasswdValid = (aCurPasswd == rData.GetPassword()); } pEntry = pBox->NextSelected(pEntry); - bFirst = FALSE; + bFirst = sal_False; } aHideCB.SetState( !bHiddenValid ? STATE_DONTKNOW : @@ -695,26 +699,26 @@ IMPL_LINK( SwEditRegionDlg, GetFirstEntryHdl, SvTreeListBox *, pBox ) aConditionED.SetText(sCondition); else { - aConditionFT.Enable(FALSE); - aConditionED.Enable(FALSE); + aConditionFT.Enable(sal_False); + aConditionED.Enable(sal_False); } - aFilePB.Enable(FALSE); - aFileNameFT .Enable(FALSE); - aFileNameED .Enable(FALSE); - aSubRegionFT.Enable(FALSE); - aSubRegionED.Enable(FALSE); - aCurName .Enable(FALSE); - aOptionsPB .Enable(FALSE); - aDDECB .Enable(FALSE); - aDDECommandFT .Enable(FALSE); - BOOL bPasswdEnabled = aProtectCB.GetState() == STATE_CHECK; + aFilePB.Enable(sal_False); + aFileNameFT .Enable(sal_False); + aFileNameED .Enable(sal_False); + aSubRegionFT.Enable(sal_False); + aSubRegionED.Enable(sal_False); + aCurName .Enable(sal_False); + aOptionsPB .Enable(sal_False); + aDDECB .Enable(sal_False); + aDDECommandFT .Enable(sal_False); + sal_Bool bPasswdEnabled = aProtectCB.GetState() == STATE_CHECK; aPasswdCB.Enable(bPasswdEnabled); aPasswdPB.Enable(bPasswdEnabled); if(!bPasswdValid) { pEntry = pBox->FirstSelected(); - pBox->SelectAll( FALSE ); + pBox->SelectAll( sal_False ); pBox->Select( pEntry ); GetFirstEntryHdl(pBox); return 0; @@ -724,14 +728,14 @@ IMPL_LINK( SwEditRegionDlg, GetFirstEntryHdl, SvTreeListBox *, pBox ) } else if (pEntry ) { - aCurName .Enable(TRUE); - aOptionsPB .Enable(TRUE); + aCurName .Enable(sal_True); + aOptionsPB .Enable(sal_True); SectRepr* pRepr=(SectRepr*) pEntry->GetUserData(); SwSectionData const& rData( pRepr->GetSectionData() ); aConditionED.SetText(rData.GetCondition()); aHideCB.Enable(); aHideCB.SetState((rData.IsHidden()) ? STATE_CHECK : STATE_NOCHECK); - BOOL bHide = STATE_CHECK == aHideCB.GetState(); + sal_Bool bHide = STATE_CHECK == aHideCB.GetState(); aConditionED.Enable(bHide); aConditionFT.Enable(bHide); aPasswdCB.Check(rData.GetPassword().getLength() > 0); @@ -747,17 +751,17 @@ IMPL_LINK( SwEditRegionDlg, GetFirstEntryHdl, SvTreeListBox *, pBox ) aSubRegionED.Clear(); if(aFile.Len()||sSub.Len()) { - aFileCB.Check(TRUE); + aFileCB.Check(sal_True); aFileNameED.SetText(aFile); aSubRegionED.SetText(sSub); aDDECB.Check(rData.GetType() == DDE_LINK_SECTION); } else { - aFileCB.Check(FALSE); + aFileCB.Check(sal_False); aFileNameED.SetText(aFile); - aDDECB.Enable(FALSE); - aDDECB.Check(FALSE); + aDDECB.Enable(sal_False); + aDDECB.Check(sal_False); } UseFileHdl(&aFileCB); DDEHdl( &aDDECB ); @@ -770,7 +774,7 @@ IMPL_LINK( SwEditRegionDlg, GetFirstEntryHdl, SvTreeListBox *, pBox ) ? STATE_CHECK : STATE_NOCHECK); aEditInReadonlyCB.Enable(); - BOOL bPasswdEnabled = aProtectCB.IsChecked(); + sal_Bool bPasswdEnabled = aProtectCB.IsChecked(); aPasswdCB.Enable(bPasswdEnabled); aPasswdPB.Enable(bPasswdEnabled); } @@ -782,24 +786,24 @@ IMPL_LINK( SwEditRegionDlg, DeselectHdl, SvTreeListBox *, pBox ) { if( !pBox->GetSelectionCount() ) { - aHideCB .Enable(FALSE); - aProtectCB .Enable(FALSE); + aHideCB .Enable(sal_False); + aProtectCB .Enable(sal_False); // edit in readonly sections - aEditInReadonlyCB.Enable(FALSE); - - aPasswdCB .Enable(FALSE); - aPasswdCB .Enable(FALSE); - aConditionFT .Enable(FALSE); - aConditionED.Enable(FALSE); - aFileCB .Enable(FALSE); - aFilePB .Enable(FALSE); - aFileNameFT .Enable(FALSE); - aFileNameED .Enable(FALSE); - aSubRegionFT .Enable(FALSE); - aSubRegionED .Enable(FALSE); - aCurName .Enable(FALSE); - aDDECB .Enable(FALSE); - aDDECommandFT .Enable(FALSE); + aEditInReadonlyCB.Enable(sal_False); + + aPasswdCB .Enable(sal_False); + aPasswdCB .Enable(sal_False); + aConditionFT .Enable(sal_False); + aConditionED.Enable(sal_False); + aFileCB .Enable(sal_False); + aFilePB .Enable(sal_False); + aFileNameFT .Enable(sal_False); + aFileNameED .Enable(sal_False); + aSubRegionFT .Enable(sal_False); + aSubRegionED .Enable(sal_False); + aCurName .Enable(sal_False); + aDDECB .Enable(sal_False); + aDDECommandFT .Enable(sal_False); UseFileHdl(&aFileCB); DDEHdl( &aDDECB ); @@ -826,7 +830,7 @@ IMPL_LINK( SwEditRegionDlg, OkHdl, CheckBox *, EMPTYARG ) rSh.StartAllAction(); rSh.StartUndo(); - rSh.ResetSelect( 0,FALSE ); + rSh.ResetSelect( 0,sal_False ); SvLBoxEntry* pEntry = aTree.First(); while( pEntry ) @@ -837,20 +841,20 @@ IMPL_LINK( SwEditRegionDlg, OkHdl, CheckBox *, EMPTYARG ) { pRepr->GetSectionData().SetPassword(uno::Sequence<sal_Int8 >()); } - USHORT nNewPos = rDocFmts.GetPos( pFmt ); + sal_uInt16 nNewPos = rDocFmts.GetPos( pFmt ); if( USHRT_MAX != nNewPos ) { - SfxItemSet* pSet = pFmt->GetAttrSet().Clone( FALSE ); + SfxItemSet* pSet = pFmt->GetAttrSet().Clone( sal_False ); if( pFmt->GetCol() != pRepr->GetCol() ) pSet->Put( pRepr->GetCol() ); - if( pFmt->GetBackground(FALSE) != pRepr->GetBackground() ) + if( pFmt->GetBackground(sal_False) != pRepr->GetBackground() ) pSet->Put( pRepr->GetBackground() ); - if( pFmt->GetFtnAtTxtEnd(FALSE) != pRepr->GetFtnNtAtEnd() ) + if( pFmt->GetFtnAtTxtEnd(sal_False) != pRepr->GetFtnNtAtEnd() ) pSet->Put( pRepr->GetFtnNtAtEnd() ); - if( pFmt->GetEndAtTxtEnd(FALSE) != pRepr->GetEndNtAtEnd() ) + if( pFmt->GetEndAtTxtEnd(sal_False) != pRepr->GetEndNtAtEnd() ) pSet->Put( pRepr->GetEndNtAtEnd() ); if( pFmt->GetBalancedColumns() != pRepr->GetBalance() ) @@ -869,10 +873,10 @@ IMPL_LINK( SwEditRegionDlg, OkHdl, CheckBox *, EMPTYARG ) pEntry = aTree.Next( pEntry ); } - for(USHORT i = aSectReprArr.Count(); i; ) + for(sal_uInt16 i = aSectReprArr.Count(); i; ) { SwSectionFmt* pFmt = aOrigArray[ aSectReprArr[ --i ]->GetArrPos() ]; - USHORT nNewPos = rDocFmts.GetPos( pFmt ); + sal_uInt16 nNewPos = rDocFmts.GetPos( pFmt ); if( USHRT_MAX != nNewPos ) rSh.DelSectionFmt( nNewPos ); } @@ -896,10 +900,10 @@ IMPL_LINK( SwEditRegionDlg, ChangeProtectHdl, TriStateBox *, pBox ) { if(!CheckPasswd(pBox)) return 0; - pBox->EnableTriState( FALSE ); + pBox->EnableTriState( sal_False ); SvLBoxEntry* pEntry=aTree.FirstSelected(); OSL_ENSURE(pEntry,"no entry found"); - BOOL bCheck = STATE_CHECK == pBox->GetState(); + sal_Bool bCheck = STATE_CHECK == pBox->GetState(); while( pEntry ) { SectReprPtr pRepr = (SectReprPtr) pEntry->GetUserData(); @@ -922,7 +926,7 @@ IMPL_LINK( SwEditRegionDlg, ChangeHideHdl, TriStateBox *, pBox ) { if(!CheckPasswd(pBox)) return 0; - pBox->EnableTriState( FALSE ); + pBox->EnableTriState( sal_False ); SvLBoxEntry* pEntry=aTree.FirstSelected(); OSL_ENSURE(pEntry,"no entry found"); while( pEntry ) @@ -938,7 +942,7 @@ IMPL_LINK( SwEditRegionDlg, ChangeHideHdl, TriStateBox *, pBox ) pEntry = aTree.NextSelected(pEntry); } - BOOL bHide = STATE_CHECK == pBox->GetState(); + sal_Bool bHide = STATE_CHECK == pBox->GetState(); aConditionED.Enable(bHide); aConditionFT.Enable(bHide); return 0; @@ -951,7 +955,7 @@ IMPL_LINK( SwEditRegionDlg, ChangeEditInReadonlyHdl, TriStateBox *, pBox ) { if(!CheckPasswd(pBox)) return 0; - pBox->EnableTriState( FALSE ); + pBox->EnableTriState( sal_False ); SvLBoxEntry* pEntry=aTree.FirstSelected(); OSL_ENSURE(pEntry,"no entry found"); while( pEntry ) @@ -988,14 +992,14 @@ IMPL_LINK( SwEditRegionDlg, ChangeDismissHdl, CheckBox *, EMPTYARG ) { const SectReprPtr pSectRepr = (SectRepr*)pEntry->GetUserData(); SvLBoxEntry* pRemove = 0; - BOOL bRestart = FALSE; + sal_Bool bRestart = sal_False; if(pSectRepr->IsSelected()) { aSectReprArr.Insert( pSectRepr ); while( (pChild = aTree.FirstChild(pEntry) )!= 0 ) { // because of the repositioning we have to start at the beginning again - bRestart = TRUE; + bRestart = sal_True; pParent=aTree.GetParent(pEntry); aTree.GetModel()->Move(pChild, pParent, aTree.GetModel()->GetRelPos(pEntry)); } @@ -1011,20 +1015,20 @@ IMPL_LINK( SwEditRegionDlg, ChangeDismissHdl, CheckBox *, EMPTYARG ) if ( (pEntry=aTree.FirstSelected()) == 0 ) { - aConditionFT. Enable(FALSE); - aConditionED. Enable(FALSE); - aDismiss. Enable(FALSE); - aCurName. Enable(FALSE); - aProtectCB. Enable(FALSE); - aPasswdCB. Enable(FALSE); - aHideCB. Enable(FALSE); + aConditionFT. Enable(sal_False); + aConditionED. Enable(sal_False); + aDismiss. Enable(sal_False); + aCurName. Enable(sal_False); + aProtectCB. Enable(sal_False); + aPasswdCB. Enable(sal_False); + aHideCB. Enable(sal_False); // edit in readonly sections - aEditInReadonlyCB.Enable(FALSE); + aEditInReadonlyCB.Enable(sal_False); aEditInReadonlyCB.SetState(STATE_NOCHECK); aProtectCB. SetState(STATE_NOCHECK); - aPasswdCB. Check(FALSE); + aPasswdCB. Check(sal_False); aHideCB. SetState(STATE_NOCHECK); - aFileCB. Check(FALSE); + aFileCB. Check(sal_False); // otherwise the focus would be on HelpButton aOK.GrabFocus(); UseFileHdl(&aFileCB); @@ -1040,22 +1044,22 @@ IMPL_LINK( SwEditRegionDlg, UseFileHdl, CheckBox *, pBox ) if(!CheckPasswd(pBox)) return 0; SvLBoxEntry* pEntry = aTree.FirstSelected(); - pBox->EnableTriState(FALSE); - BOOL bMulti = 1 < aTree.GetSelectionCount(); - BOOL bFile = pBox->IsChecked(); + pBox->EnableTriState(sal_False); + sal_Bool bMulti = 1 < aTree.GetSelectionCount(); + sal_Bool bFile = pBox->IsChecked(); if(pEntry) { while(pEntry) { const SectReprPtr pSectRepr = (SectRepr*)pEntry->GetUserData(); - BOOL bContent = pSectRepr->IsContent(); + sal_Bool bContent = pSectRepr->IsContent(); if( pBox->IsChecked() && bContent && rSh.HasSelection() ) { if( RET_NO == QueryBox( this, SW_RES(QB_CONNECT) ).Execute() ) - pBox->Check( FALSE ); + pBox->Check( sal_False ); } if( bFile ) - pSectRepr->SetContent(FALSE); + pSectRepr->SetContent(sal_False); else { pSectRepr->SetFile(aEmptyStr); @@ -1080,23 +1084,23 @@ IMPL_LINK( SwEditRegionDlg, UseFileHdl, CheckBox *, pBox ) } else { - aDDECB.Check(FALSE); + aDDECB.Check(sal_False); DDEHdl(&aDDECB); aSubRegionED.SetText(aEmptyStr); } } else { - pBox->Check(FALSE); - pBox->Enable(FALSE); - aFilePB.Enable(FALSE); - aFileNameED.Enable(FALSE); - aFileNameFT.Enable(FALSE); - aSubRegionED.Enable(FALSE); - aSubRegionFT.Enable(FALSE); - aDDECB.Check(FALSE); - aDDECB.Enable(FALSE); - aDDECommandFT.Enable(FALSE); + pBox->Check(sal_False); + pBox->Enable(sal_False); + aFilePB.Enable(sal_False); + aFileNameED.Enable(sal_False); + aFileNameFT.Enable(sal_False); + aSubRegionED.Enable(sal_False); + aSubRegionFT.Enable(sal_False); + aDDECB.Check(sal_False); + aDDECB.Enable(sal_False); + aDDECommandFT.Enable(sal_False); } return 0; } @@ -1168,19 +1172,19 @@ IMPL_LINK( SwEditRegionDlg, OptionsHdl, PushButton *, EMPTYARG ) *pFtnItem, *pEndItem, *pBalanceItem, *pFrmDirItem, *pLRSpaceItem; SfxItemState eColState = pOutSet->GetItemState( - RES_COL, FALSE, &pColItem ); + RES_COL, sal_False, &pColItem ); SfxItemState eBrushState = pOutSet->GetItemState( - RES_BACKGROUND, FALSE, &pBrushItem ); + RES_BACKGROUND, sal_False, &pBrushItem ); SfxItemState eFtnState = pOutSet->GetItemState( - RES_FTN_AT_TXTEND, FALSE, &pFtnItem ); + RES_FTN_AT_TXTEND, sal_False, &pFtnItem ); SfxItemState eEndState = pOutSet->GetItemState( - RES_END_AT_TXTEND, FALSE, &pEndItem ); + RES_END_AT_TXTEND, sal_False, &pEndItem ); SfxItemState eBalanceState = pOutSet->GetItemState( - RES_COLUMNBALANCE, FALSE, &pBalanceItem ); + RES_COLUMNBALANCE, sal_False, &pBalanceItem ); SfxItemState eFrmDirState = pOutSet->GetItemState( - RES_FRAMEDIR, FALSE, &pFrmDirItem ); + RES_FRAMEDIR, sal_False, &pFrmDirItem ); SfxItemState eLRState = pOutSet->GetItemState( - RES_LR_SPACE, FALSE, &pLRSpaceItem); + RES_LR_SPACE, sal_False, &pLRSpaceItem); if( SFX_ITEM_SET == eColState || SFX_ITEM_SET == eBrushState || @@ -1239,7 +1243,7 @@ IMPL_LINK( SwEditRegionDlg, FileNameHdl, Edit *, pEdit ) if( aDDECB.IsChecked() ) { String sLink( pEdit->GetText() ); - USHORT nPos = 0; + sal_uInt16 nPos = 0; while( STRING_NOTFOUND != (nPos = sLink.SearchAscii( " ", nPos )) ) sLink.Erase( nPos--, 1 ); @@ -1279,10 +1283,10 @@ IMPL_LINK( SwEditRegionDlg, DDEHdl, CheckBox*, pBox ) SvLBoxEntry* pEntry=aTree.FirstSelected(); if(pEntry) { - BOOL bFile = aFileCB.IsChecked(); + sal_Bool bFile = aFileCB.IsChecked(); SectReprPtr pSectRepr = (SectRepr*)pEntry->GetUserData(); SwSectionData & rData( pSectRepr->GetSectionData() ); - BOOL bDDE = pBox->IsChecked(); + sal_Bool bDDE = pBox->IsChecked(); if(bDDE) { aFileNameFT.Hide(); @@ -1297,6 +1301,7 @@ IMPL_LINK( SwEditRegionDlg, DDEHdl, CheckBox*, pBox ) rData.SetLinkFilePassword( aEmptyStr ); } rData.SetType(DDE_LINK_SECTION); + aFileNameED.SetAccessibleName(aDDECommandFT.GetText()); } else { @@ -1315,6 +1320,7 @@ IMPL_LINK( SwEditRegionDlg, DDEHdl, CheckBox*, pBox ) rData.SetLinkFilePassword( aEmptyStr ); aFileNameED.SetText(aEmptyStr); } + aFileNameED.SetAccessibleName(aFileNameFT.GetText()); } aFilePB.Enable(bFile && !bDDE); } @@ -1359,7 +1365,7 @@ IMPL_LINK( SwEditRegionDlg, ChangePasswdHdl, Button *, pBox ) else { if(!bChange) - aPasswdCB.Check(FALSE); + aPasswdCB.Check(sal_False); break; } } @@ -1425,7 +1431,7 @@ IMPL_LINK( SwEditRegionDlg, DlgClosedHdl, sfx2::FileDialogHelper *, _pFileDlg ) sFileName = pMedium->GetURLObject().GetMainURL( INetURLObject::NO_DECODE ); sFilterName = pMedium->GetFilter()->GetFilterName(); const SfxPoolItem* pItem; - if ( SFX_ITEM_SET == pMedium->GetItemSet()->GetItemState( SID_PASSWORD, FALSE, &pItem ) ) + if ( SFX_ITEM_SET == pMedium->GetItemSet()->GetItemState( SID_PASSWORD, sal_False, &pItem ) ) sPassword = ( (SfxStringItem*)pItem )->GetValue(); ::lcl_ReadSections( *pMedium, aSubRegionED ); delete pMedium; @@ -1475,7 +1481,7 @@ IMPL_LINK( SwEditRegionDlg, SubRegionEventHdl, VclWindowEvent *, pEvent ) return 0; } -Image SwEditRegionDlg::BuildBitmap(BOOL bProtect,BOOL bHidden) +Image SwEditRegionDlg::BuildBitmap( sal_Bool bProtect, sal_Bool bHidden ) { ImageList& rImgLst = aImageIL; return rImgLst.GetImage((!bHidden+(bProtect<<1)) + 1); @@ -1496,7 +1502,7 @@ static void lcl_ReadSections( SfxMedium& rMedium, ComboBox& rBox ) nFormat == SOT_FORMATSTR_ID_STARWRITER_8 || nFormat == SOT_FORMATSTR_ID_STARWRITERGLOB_8) SwGetReaderXML()->GetSectionList( rMedium, aArr ); - for( USHORT n = 0; n < aArr.Count(); ++n ) + for( sal_uInt16 n = 0; n < aArr.Count(); ++n ) rBox.InsertEntry( *aArr[ n ] ); aArr.DeleteAndDestroy(0, aArr.Count()); @@ -1523,7 +1529,7 @@ SwInsertSectionTabDialog::SwInsertSectionTabDialog( SvxHtmlOptions* pHtmlOpt = SvxHtmlOptions::Get(); long nHtmlMode = pHtmlOpt->GetExportMode(); - BOOL bWeb = 0 != PTR_CAST( SwWebDocShell, rSh.GetView().GetDocShell() ); + sal_Bool bWeb = 0 != PTR_CAST( SwWebDocShell, rSh.GetView().GetDocShell() ); if(bWeb) { RemoveTabPage(TP_SECTION_FTNENDNOTES); @@ -1538,7 +1544,7 @@ SwInsertSectionTabDialog::~SwInsertSectionTabDialog() { } -void SwInsertSectionTabDialog::PageCreated( USHORT nId, SfxTabPage &rPage ) +void SwInsertSectionTabDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) { if(TP_INSERT_SECTION == nId) ((SwInsertSectionTabPage&)rPage).SetWrtShell(rWrtSh); @@ -1552,8 +1558,8 @@ void SwInsertSectionTabDialog::PageCreated( USHORT nId, SfxTabPage &rPage ) { const SwFmtFrmSize& rSize = (const SwFmtFrmSize&)GetInputSetImpl()->Get(RES_FRM_SIZE); ((SwColumnPage&)rPage).SetPageWidth(rSize.GetWidth()); - ((SwColumnPage&)rPage).ShowBalance(TRUE); - ((SwColumnPage&)rPage).SetInSection(TRUE); + ((SwColumnPage&)rPage).ShowBalance(sal_True); + ((SwColumnPage&)rPage).SetInSection(sal_True); } else if(TP_SECTION_INDENTS == nId) ((SwSectionIndentTabPage&)rPage).SetWrtShell(rWrtSh); @@ -1578,7 +1584,7 @@ short SwInsertSectionTabDialog::Ok() { SfxRequest aRequest( pViewFrm, FN_INSERT_REGION); const SfxPoolItem* pCol; - if(SFX_ITEM_SET == pOutputItemSet->GetItemState(RES_COL, FALSE, &pCol)) + if(SFX_ITEM_SET == pOutputItemSet->GetItemState(RES_COL, sal_False, &pCol)) { aRequest.AppendItem(SfxUInt16Item(SID_ATTR_COLUMNS, ((const SwFmtCol*)pCol)->GetColumns().Count())); @@ -1649,6 +1655,7 @@ SwInsertSectionTabPage::SwInsertSectionTabPage( aCurName.SetModifyHdl ( LINK( this, SwInsertSectionTabPage, NameEditHdl)); aDDECB.SetClickHdl ( LINK( this, SwInsertSectionTabPage, DDEHdl )); ChangeProtectHdl(&aProtectCB); + aPasswdPB.SetAccessibleRelationMemberOf(&aProtectFL); aSubRegionED.EnableAutocomplete( sal_True, sal_True ); } @@ -1661,7 +1668,7 @@ void SwInsertSectionTabPage::SetWrtShell(SwWrtShell& rSh) { m_pWrtSh = &rSh; - BOOL bWeb = 0 != PTR_CAST(SwWebDocShell, m_pWrtSh->GetView().GetDocShell()); + sal_Bool bWeb = 0 != PTR_CAST(SwWebDocShell, m_pWrtSh->GetView().GetDocShell()); if(bWeb) { aHideCB .Hide(); @@ -1693,11 +1700,11 @@ void SwInsertSectionTabPage::SetWrtShell(SwWrtShell& rSh) } } -BOOL SwInsertSectionTabPage::FillItemSet( SfxItemSet& ) +sal_Bool SwInsertSectionTabPage::FillItemSet( SfxItemSet& ) { SwSectionData aSection(CONTENT_SECTION, aCurName.GetText()); aSection.SetCondition(aConditionED.GetText()); - BOOL bProtected = aProtectCB.IsChecked(); + sal_Bool bProtected = aProtectCB.IsChecked(); aSection.SetProtectFlag(bProtected); aSection.SetHidden(aHideCB.IsChecked()); // edit in readonly sections @@ -1709,7 +1716,7 @@ BOOL SwInsertSectionTabPage::FillItemSet( SfxItemSet& ) } String sFileName = aFileNameED.GetText(); String sSubRegion = aSubRegionED.GetText(); - BOOL bDDe = aDDECB.IsChecked(); + sal_Bool bDDe = aDDECB.IsChecked(); if(aFileCB.IsChecked() && (sFileName.Len() || sSubRegion.Len() || bDDe)) { String aLinkFile; @@ -1717,7 +1724,7 @@ BOOL SwInsertSectionTabPage::FillItemSet( SfxItemSet& ) { aLinkFile = sFileName; - USHORT nPos = 0; + sal_uInt16 nPos = 0; while( STRING_NOTFOUND != (nPos = aLinkFile.SearchAscii( " ", nPos )) ) aLinkFile.Erase( nPos--, 1 ); @@ -1752,7 +1759,7 @@ BOOL SwInsertSectionTabPage::FillItemSet( SfxItemSet& ) } } ((SwInsertSectionTabDialog*)GetTabDialog())->SetSectionData(aSection); - return TRUE; + return sal_True; } void SwInsertSectionTabPage::Reset( const SfxItemSet& ) @@ -1767,7 +1774,7 @@ SfxTabPage* SwInsertSectionTabPage::Create( Window* pParent, IMPL_LINK( SwInsertSectionTabPage, ChangeHideHdl, CheckBox *, pBox ) { - BOOL bHide = pBox->IsChecked(); + sal_Bool bHide = pBox->IsChecked(); aConditionED.Enable(bHide); aConditionFT.Enable(bHide); return 0; @@ -1809,7 +1816,7 @@ IMPL_LINK( SwInsertSectionTabPage, ChangePasswdHdl, Button *, pButton ) } } else if(!bChange) - aPasswdCB.Check(FALSE); + aPasswdCB.Check(sal_False); } } else @@ -1831,10 +1838,10 @@ IMPL_LINK( SwInsertSectionTabPage, UseFileHdl, CheckBox *, pBox ) { if( m_pWrtSh->HasSelection() && RET_NO == QueryBox( this, SW_RES(QB_CONNECT) ).Execute() ) - pBox->Check( FALSE ); + pBox->Check( sal_False ); } - BOOL bFile = pBox->IsChecked(); + sal_Bool bFile = pBox->IsChecked(); aFileNameFT.Enable(bFile); aFileNameED.Enable(bFile); aFilePB.Enable(bFile); @@ -1845,11 +1852,11 @@ IMPL_LINK( SwInsertSectionTabPage, UseFileHdl, CheckBox *, pBox ) if( bFile ) { aFileNameED.GrabFocus(); - aProtectCB.Check( TRUE ); + aProtectCB.Check( sal_True ); } else { - aDDECB.Check(FALSE); + aDDECB.Check(sal_False); DDEHdl(&aDDECB); } return 0; @@ -1868,8 +1875,8 @@ IMPL_LINK( SwInsertSectionTabPage, FileSearchHdl, PushButton *, EMPTYARG ) IMPL_LINK( SwInsertSectionTabPage, DDEHdl, CheckBox*, pBox ) { - BOOL bDDE = pBox->IsChecked(); - BOOL bFile = aFileCB.IsChecked(); + sal_Bool bDDE = pBox->IsChecked(); + sal_Bool bFile = aFileCB.IsChecked(); aFilePB.Enable(!bDDE && bFile); if(bDDE) { @@ -1878,6 +1885,7 @@ IMPL_LINK( SwInsertSectionTabPage, DDEHdl, CheckBox*, pBox ) aDDECommandFT.Show(); aSubRegionFT.Hide(); aSubRegionED.Hide(); + aFileNameED.SetAccessibleName(aDDECommandFT.GetText()); } else { @@ -1887,6 +1895,7 @@ IMPL_LINK( SwInsertSectionTabPage, DDEHdl, CheckBox*, pBox ) aSubRegionFT.Show(); aSubRegionED.Show(); aSubRegionED.Enable(bFile); + aFileNameED.SetAccessibleName(aFileNameFT.GetText()); } return 0; } @@ -1901,7 +1910,7 @@ IMPL_LINK( SwInsertSectionTabPage, DlgClosedHdl, sfx2::FileDialogHelper *, _pFil m_sFileName = pMedium->GetURLObject().GetMainURL( INetURLObject::NO_DECODE ); m_sFilterName = pMedium->GetFilter()->GetFilterName(); const SfxPoolItem* pItem; - if ( SFX_ITEM_SET == pMedium->GetItemSet()->GetItemState( SID_PASSWORD, FALSE, &pItem ) ) + if ( SFX_ITEM_SET == pMedium->GetItemSet()->GetItemState( SID_PASSWORD, sal_False, &pItem ) ) m_sFilePasswd = ( (SfxStringItem*)pItem )->GetValue(); aFileNameED.SetText( INetURLObject::decode( m_sFileName, INET_HEX_ESCAPE, INetURLObject::DECODE_UNAMBIGUOUS, RTL_TEXTENCODING_UTF8 ) ); @@ -1928,12 +1937,12 @@ IMPL_LINK( SwInsertSectionTabPage, DlgClosedHdl, sfx2::FileDialogHelper *, _pFil // 5 - A, .., AA, .., - 9 // 6 - a, .., aa, .., - 10 -inline USHORT GetNumPos( USHORT n ) +inline sal_uInt16 GetNumPos( sal_uInt16 n ) { return SVX_NUM_ARABIC < n ? n - 4 : n; } -inline SvxExtNumType GetNumType( USHORT n ) +inline SvxExtNumType GetNumType( sal_uInt16 n ) { return (SvxExtNumType)(4 < n ? n + 4 : n ); } @@ -1984,7 +1993,7 @@ SwSectionFtnEndTabPage::~SwSectionFtnEndTabPage() { } -BOOL SwSectionFtnEndTabPage::FillItemSet( SfxItemSet& rSet ) +sal_Bool SwSectionFtnEndTabPage::FillItemSet( SfxItemSet& rSet ) { SwFmtFtnAtTxtEnd aFtn( aFtnNtAtTextEndCB.IsChecked() ? ( aFtnNtNumCB.IsChecked() @@ -2003,7 +2012,7 @@ BOOL SwSectionFtnEndTabPage::FillItemSet( SfxItemSet& rSet ) // no break; case FTNEND_ATTXTEND_OWNNUMSEQ: - aFtn.SetOffset( static_cast< USHORT >( aFtnOffsetFld.GetValue()-1 ) ); + aFtn.SetOffset( static_cast< sal_uInt16 >( aFtnOffsetFld.GetValue()-1 ) ); // no break; } @@ -2024,17 +2033,17 @@ BOOL SwSectionFtnEndTabPage::FillItemSet( SfxItemSet& rSet ) // no break; case FTNEND_ATTXTEND_OWNNUMSEQ: - aEnd.SetOffset( static_cast< USHORT >( aEndOffsetFld.GetValue()-1 ) ); + aEnd.SetOffset( static_cast< sal_uInt16 >( aEndOffsetFld.GetValue()-1 ) ); // no break; } rSet.Put( aFtn ); rSet.Put( aEnd ); - return TRUE; + return sal_True; } -void SwSectionFtnEndTabPage::ResetState( BOOL bFtn, +void SwSectionFtnEndTabPage::ResetState( sal_Bool bFtn, const SwFmtFtnEndAtTxtEnd& rAttr ) { CheckBox *pNtAtTextEndCB, *pNtNumCB, *pNtNumFmtCB; @@ -2071,7 +2080,7 @@ void SwSectionFtnEndTabPage::ResetState( BOOL bFtn, pOffsetFld = &aEndOffsetFld; } - USHORT eState = rAttr.GetValue(); + sal_uInt16 eState = rAttr.GetValue(); switch( eState ) { case FTNEND_ATTXTEND_OWNNUMANDFMT: @@ -2095,31 +2104,31 @@ void SwSectionFtnEndTabPage::ResetState( BOOL bFtn, switch( eState ) { case FTNEND_ATPGORDOCEND: - pNtNumCB->Enable( FALSE ); + pNtNumCB->Enable( sal_False ); // no break; case FTNEND_ATTXTEND: - pNtNumFmtCB->Enable( FALSE ); - pOffsetFld->Enable( FALSE ); - pOffsetTxt->Enable( FALSE ); + pNtNumFmtCB->Enable( sal_False ); + pOffsetFld->Enable( sal_False ); + pOffsetTxt->Enable( sal_False ); // no break; case FTNEND_ATTXTEND_OWNNUMSEQ: - pNumViewBox->Enable( FALSE ); - pPrefixFT->Enable( FALSE ); - pPrefixED->Enable( FALSE ); - pSuffixFT->Enable( FALSE ); - pSuffixED->Enable( FALSE ); + pNumViewBox->Enable( sal_False ); + pPrefixFT->Enable( sal_False ); + pPrefixED->Enable( sal_False ); + pSuffixFT->Enable( sal_False ); + pSuffixED->Enable( sal_False ); // no break; } } void SwSectionFtnEndTabPage::Reset( const SfxItemSet& rSet ) { - ResetState( TRUE, (const SwFmtFtnAtTxtEnd&)rSet.Get( - RES_FTN_AT_TXTEND, FALSE )); - ResetState( FALSE, (const SwFmtEndAtTxtEnd&)rSet.Get( - RES_END_AT_TXTEND, FALSE )); + ResetState( sal_True, (const SwFmtFtnAtTxtEnd&)rSet.Get( + RES_FTN_AT_TXTEND, sal_False )); + ResetState( sal_False, (const SwFmtEndAtTxtEnd&)rSet.Get( + RES_END_AT_TXTEND, sal_False )); } SfxTabPage* SwSectionFtnEndTabPage::Create( Window* pParent, @@ -2130,7 +2139,7 @@ SfxTabPage* SwSectionFtnEndTabPage::Create( Window* pParent, IMPL_LINK( SwSectionFtnEndTabPage, FootEndHdl, CheckBox *, pBox ) { - BOOL bFoot = &aFtnNtAtTextEndCB == pBox || &aFtnNtNumCB == pBox || + sal_Bool bFoot = &aFtnNtAtTextEndCB == pBox || &aFtnNtNumCB == pBox || &aFtnNtNumFmtCB == pBox ; CheckBox *pNumBox, *pNumFmtBox, *pEndBox; @@ -2167,9 +2176,9 @@ IMPL_LINK( SwSectionFtnEndTabPage, FootEndHdl, CheckBox *, pBox ) pSuffixED = &aEndSuffixED; } - BOOL bEnableAtEnd = STATE_CHECK == pEndBox->GetState(); - BOOL bEnableNum = bEnableAtEnd && STATE_CHECK == pNumBox->GetState(); - BOOL bEnableNumFmt = bEnableNum && STATE_CHECK == pNumFmtBox->GetState(); + sal_Bool bEnableAtEnd = STATE_CHECK == pEndBox->GetState(); + sal_Bool bEnableNum = bEnableAtEnd && STATE_CHECK == pNumBox->GetState(); + sal_Bool bEnableNumFmt = bEnableNum && STATE_CHECK == pNumFmtBox->GetState(); pNumBox->Enable( bEnableAtEnd ); pOffsetTxt->Enable( bEnableNum ); @@ -2199,7 +2208,7 @@ SwSectionPropertyTabDialog::SwSectionPropertyTabDialog( SvxHtmlOptions* pHtmlOpt = SvxHtmlOptions::Get(); long nHtmlMode = pHtmlOpt->GetExportMode(); - BOOL bWeb = 0 != PTR_CAST( SwWebDocShell, rSh.GetView().GetDocShell() ); + sal_Bool bWeb = 0 != PTR_CAST( SwWebDocShell, rSh.GetView().GetDocShell() ); if(bWeb) { RemoveTabPage(TP_SECTION_FTNENDNOTES); @@ -2213,7 +2222,7 @@ SwSectionPropertyTabDialog::~SwSectionPropertyTabDialog() { } -void SwSectionPropertyTabDialog::PageCreated( USHORT nId, SfxTabPage &rPage ) +void SwSectionPropertyTabDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) { if( TP_BACKGROUND == nId ) { @@ -2223,8 +2232,8 @@ void SwSectionPropertyTabDialog::PageCreated( USHORT nId, SfxTabPage &rPage ) } else if( TP_COLUMN == nId ) { - ((SwColumnPage&)rPage).ShowBalance(TRUE); - ((SwColumnPage&)rPage).SetInSection(TRUE); + ((SwColumnPage&)rPage).ShowBalance(sal_True); + ((SwColumnPage&)rPage).SetInSection(sal_True); } else if(TP_SECTION_INDENTS == nId) ((SwSectionIndentTabPage&)rPage).SetWrtShell(rWrtSh); @@ -2243,13 +2252,14 @@ SwSectionIndentTabPage::SwSectionIndentTabPage( Window *pParent, const SfxItemSe Link aLk = LINK(this, SwSectionIndentTabPage, IndentModifyHdl); aBeforeMF.SetModifyHdl(aLk); aAfterMF.SetModifyHdl(aLk); + aPreviewWin.SetAccessibleName(aIndentFL.GetText()); } SwSectionIndentTabPage::~SwSectionIndentTabPage() { } -BOOL SwSectionIndentTabPage::FillItemSet( SfxItemSet& rSet) +sal_Bool SwSectionIndentTabPage::FillItemSet( SfxItemSet& rSet) { if(aBeforeMF.IsValueModified() || aAfterMF.IsValueModified()) @@ -2259,13 +2269,13 @@ BOOL SwSectionIndentTabPage::FillItemSet( SfxItemSet& rSet) static_cast< long >(aAfterMF.Denormalize(aAfterMF.GetValue(FUNIT_TWIP))), 0, 0, RES_LR_SPACE); rSet.Put(aLRSpace); } - return TRUE; + return sal_True; } void SwSectionIndentTabPage::Reset( const SfxItemSet& rSet) { //this page doesn't show up in HTML mode - FieldUnit aMetric = ::GetDfltMetric(FALSE); + FieldUnit aMetric = ::GetDfltMetric(sal_False); SetMetric(aBeforeMF, aMetric); SetMetric(aAfterMF , aMetric); @@ -2307,7 +2317,7 @@ IMPL_LINK(SwSectionIndentTabPage, IndentModifyHdl, MetricField*, EMPTYARG) { aPreviewWin.SetLeftMargin( static_cast< long >(aBeforeMF.Denormalize(aBeforeMF.GetValue(FUNIT_TWIP))) ); aPreviewWin.SetRightMargin( static_cast< long >(aAfterMF.Denormalize(aAfterMF.GetValue(FUNIT_TWIP))) ); - aPreviewWin.Draw(TRUE); + aPreviewWin.Draw(sal_True); return 0; } diff --git a/sw/source/ui/dochdl/gloshdl.cxx b/sw/source/ui/dochdl/gloshdl.cxx index 527db65cdc..ba831d380b 100644 --- a/sw/source/ui/dochdl/gloshdl.cxx +++ b/sw/source/ui/dochdl/gloshdl.cxx @@ -123,7 +123,7 @@ void SwGlossaryHdl::GlossaryDlg() Description: set the default group; if called from the dialog the group is created temporarily for faster access ------------------------------------------------------------------------*/ -void SwGlossaryHdl::SetCurGroup(const String &rGrp, BOOL bApi, BOOL bAlwaysCreateNew ) +void SwGlossaryHdl::SetCurGroup(const String &rGrp, sal_Bool bApi, sal_Bool bAlwaysCreateNew ) { String sGroup(rGrp); if(STRING_NOTFOUND == sGroup.Search(GLOS_DELIM) && !FindGroupName(sGroup)) @@ -133,7 +133,7 @@ void SwGlossaryHdl::SetCurGroup(const String &rGrp, BOOL bApi, BOOL bAlwaysCreat } if(pCurGrp) { - BOOL bPathEqual = FALSE; + sal_Bool bPathEqual = sal_False; if(!bAlwaysCreateNew) { INetURLObject aTemp( pCurGrp->GetFileName() ); @@ -141,8 +141,8 @@ void SwGlossaryHdl::SetCurGroup(const String &rGrp, BOOL bApi, BOOL bAlwaysCreat aTemp.removeSegment(); const String sCurEntryPath = aTemp.GetMainURL(INetURLObject::NO_DECODE); const SvStrings* pPathArr = rStatGlossaries.GetPathArray(); - USHORT nCurrentPath = USHRT_MAX; - for(USHORT nPath = 0; nPath < pPathArr->Count(); nPath++) + sal_uInt16 nCurrentPath = USHRT_MAX; + for(sal_uInt16 nPath = 0; nPath < pPathArr->Count(); nPath++) { if(sCurEntryPath == *(*pPathArr)[nPath]) { @@ -151,10 +151,10 @@ void SwGlossaryHdl::SetCurGroup(const String &rGrp, BOOL bApi, BOOL bAlwaysCreat } } String sPath = sGroup.GetToken(1, GLOS_DELIM); - USHORT nComparePath = (USHORT)sPath.ToInt32(); + sal_uInt16 nComparePath = (sal_uInt16)sPath.ToInt32(); if(nCurrentPath == nComparePath && sGroup.GetToken(0, GLOS_DELIM) == sCurBase) - bPathEqual = TRUE; + bPathEqual = sal_True; } // When path changed, the name is not reliable @@ -169,21 +169,21 @@ void SwGlossaryHdl::SetCurGroup(const String &rGrp, BOOL bApi, BOOL bAlwaysCreat rStatGlossaries.PutGroupDoc(pCurGrp); pCurGrp = 0; } - pCurGrp = rStatGlossaries.GetGroupDoc(aCurGrp, TRUE); + pCurGrp = rStatGlossaries.GetGroupDoc(aCurGrp, sal_True); } } -USHORT SwGlossaryHdl::GetGroupCnt() const +sal_uInt16 SwGlossaryHdl::GetGroupCnt() const { return rStatGlossaries.GetGroupCnt(); } -String SwGlossaryHdl::GetGroupName( USHORT nId, String* pTitle ) +String SwGlossaryHdl::GetGroupName( sal_uInt16 nId, String* pTitle ) { String sRet = rStatGlossaries.GetGroupName(nId); if(pTitle) { - SwTextBlocks* pGroup = rStatGlossaries.GetGroupDoc(sRet, FALSE); + SwTextBlocks* pGroup = rStatGlossaries.GetGroupDoc(sRet, sal_False); if(pGroup && !pGroup->GetError()) { *pTitle = pGroup->GetName(); @@ -200,27 +200,27 @@ String SwGlossaryHdl::GetGroupName( USHORT nId, String* pTitle ) return sRet; } -BOOL SwGlossaryHdl::NewGroup(String &rGrpName, const String& rTitle) +sal_Bool SwGlossaryHdl::NewGroup(String &rGrpName, const String& rTitle) { if(STRING_NOTFOUND == rGrpName.Search(GLOS_DELIM)) FindGroupName(rGrpName); return rStatGlossaries.NewGroupDoc(rGrpName, rTitle); } -BOOL SwGlossaryHdl::RenameGroup(const String & rOld, String& rNew, const String& rNewTitle) +sal_Bool SwGlossaryHdl::RenameGroup(const String & rOld, String& rNew, const String& rNewTitle) { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; String sOldGroup(rOld); if(STRING_NOTFOUND == rOld.Search(GLOS_DELIM)) FindGroupName(sOldGroup); if(rOld == rNew) { - SwTextBlocks* pGroup = rStatGlossaries.GetGroupDoc(sOldGroup, FALSE); + SwTextBlocks* pGroup = rStatGlossaries.GetGroupDoc(sOldGroup, sal_False); if(pGroup) { pGroup->SetName(rNewTitle); rStatGlossaries.PutGroupDoc( pGroup ); - bRet = TRUE; + bRet = sal_True; } } else @@ -237,19 +237,19 @@ BOOL SwGlossaryHdl::RenameGroup(const String & rOld, String& rNew, const String& return bRet; } -BOOL SwGlossaryHdl::CopyOrMove( const String& rSourceGroupName, String& rSourceShortName, - const String& rDestGroupName, const String& rLongName, BOOL bMove ) +sal_Bool SwGlossaryHdl::CopyOrMove( const String& rSourceGroupName, String& rSourceShortName, + const String& rDestGroupName, const String& rLongName, sal_Bool bMove ) { - SwTextBlocks* pSourceGroup = rStatGlossaries.GetGroupDoc(rSourceGroupName, FALSE); + SwTextBlocks* pSourceGroup = rStatGlossaries.GetGroupDoc(rSourceGroupName, sal_False); - SwTextBlocks* pDestGroup = rStatGlossaries.GetGroupDoc(rDestGroupName, FALSE); + SwTextBlocks* pDestGroup = rStatGlossaries.GetGroupDoc(rDestGroupName, sal_False); if(pDestGroup->IsReadOnly() || (bMove && pSourceGroup->IsReadOnly()) ) - return FALSE; + return sal_False; //The index must be determined here because rSourceShortName maybe changed in CopyBlock - USHORT nDeleteIdx = pSourceGroup->GetIndex( rSourceShortName ); + sal_uInt16 nDeleteIdx = pSourceGroup->GetIndex( rSourceShortName ); OSL_ENSURE(USHRT_MAX != nDeleteIdx, "entry not found"); - ULONG nRet = pSourceGroup->CopyBlock( *pDestGroup, rSourceShortName, rLongName ); + sal_uLong nRet = pSourceGroup->CopyBlock( *pDestGroup, rSourceShortName, rLongName ); if(!nRet && bMove) { // the index must be existing @@ -263,7 +263,7 @@ BOOL SwGlossaryHdl::CopyOrMove( const String& rSourceGroupName, String& rSource /*------------------------------------------------------------------------ Description: delete a autotext-file-group ------------------------------------------------------------------------*/ -BOOL SwGlossaryHdl::DelGroup(const String &rGrpName) +sal_Bool SwGlossaryHdl::DelGroup(const String &rGrpName) { String sGroup(rGrpName); if(STRING_NOTFOUND == sGroup.Search(GLOS_DELIM)) @@ -276,26 +276,26 @@ BOOL SwGlossaryHdl::DelGroup(const String &rGrpName) if(aMac_Tmp == sGroup) DELETEZ(pCurGrp); } - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } /*------------------------------------------------------------------------ Description: ask for number of autotexts ------------------------------------------------------------------------*/ -USHORT SwGlossaryHdl::GetGlossaryCnt() +sal_uInt16 SwGlossaryHdl::GetGlossaryCnt() { return pCurGrp ? pCurGrp->GetCount() : 0; } -String SwGlossaryHdl::GetGlossaryName( USHORT nId ) +String SwGlossaryHdl::GetGlossaryName( sal_uInt16 nId ) { OSL_ENSURE(nId < GetGlossaryCnt(), "Textbausteinarray ueberindiziert."); return pCurGrp->GetLongName( nId ); } -String SwGlossaryHdl::GetGlossaryShortName(USHORT nId) +String SwGlossaryHdl::GetGlossaryShortName(sal_uInt16 nId) { OSL_ENSURE(nId < GetGlossaryCnt(), "Textbausteinarray ueberindiziert."); return pCurGrp->GetShortName( nId ); @@ -308,11 +308,11 @@ String SwGlossaryHdl::GetGlossaryShortName(const String &rName) { String sReturn; SwTextBlocks *pTmp = - pCurGrp ? pCurGrp: rStatGlossaries.GetGroupDoc( aCurGrp, FALSE ); + pCurGrp ? pCurGrp: rStatGlossaries.GetGroupDoc( aCurGrp, sal_False ); if(pTmp) { - USHORT nIdx = pTmp->GetLongIndex( rName ); - if( nIdx != (USHORT) -1 ) + sal_uInt16 nIdx = pTmp->GetLongIndex( rName ); + if( nIdx != (sal_uInt16) -1 ) sReturn = pTmp->GetShortName( nIdx ); if( !pCurGrp ) rStatGlossaries.PutGroupDoc( pTmp ); @@ -323,79 +323,79 @@ String SwGlossaryHdl::GetGlossaryShortName(const String &rName) /*------------------------------------------------------------------------ Description: short name for autotext already used? ------------------------------------------------------------------------*/ -BOOL SwGlossaryHdl::HasShortName(const String& rShortName) const +sal_Bool SwGlossaryHdl::HasShortName(const String& rShortName) const { SwTextBlocks *pBlock = pCurGrp ? pCurGrp : rStatGlossaries.GetGroupDoc( aCurGrp ); - BOOL bRet = pBlock->GetIndex( rShortName ) != (USHORT) -1; + sal_Bool bRet = pBlock->GetIndex( rShortName ) != (sal_uInt16) -1; if( !pCurGrp ) rStatGlossaries.PutGroupDoc( pBlock ); return bRet; } -BOOL SwGlossaryHdl::ConvertToNew(SwTextBlocks& /*rOld*/) +sal_Bool SwGlossaryHdl::ConvertToNew(SwTextBlocks& /*rOld*/) { - return TRUE; + return sal_True; } /*------------------------------------------------------------------------ Desription: Create autotext ------------------------------------------------------------------------*/ -BOOL SwGlossaryHdl::NewGlossary(const String& rName, const String& rShortName, - BOOL bCreateGroup, BOOL bNoAttr) +sal_Bool SwGlossaryHdl::NewGlossary(const String& rName, const String& rShortName, + sal_Bool bCreateGroup, sal_Bool bNoAttr) { SwTextBlocks *pTmp = pCurGrp ? pCurGrp: rStatGlossaries.GetGroupDoc( aCurGrp, bCreateGroup ); //pTmp == 0 if the AutoText path setting is wrong if(!pTmp) - return FALSE; + return sal_False; if(!ConvertToNew(*pTmp)) - return FALSE; + return sal_False; String sOnlyTxt; String* pOnlyTxt = 0; if( bNoAttr ) { if( !pWrtShell->GetSelectedText( sOnlyTxt, GETSELTXT_PARABRK_TO_ONLYCR )) - return FALSE; + return sal_False; pOnlyTxt = &sOnlyTxt; } const SvxAutoCorrCfg* pCfg = SvxAutoCorrCfg::Get(); - const USHORT nSuccess = pWrtShell->MakeGlossary( *pTmp, rName, rShortName, + const sal_uInt16 nSuccess = pWrtShell->MakeGlossary( *pTmp, rName, rShortName, pCfg->IsSaveRelFile(), pOnlyTxt ); - if(nSuccess == (USHORT) -1 ) + if(nSuccess == (sal_uInt16) -1 ) { InfoBox(pWrtShell->GetView().GetWindow(), SW_RES(MSG_ERR_INSERT_GLOS)).Execute(); } if( !pCurGrp ) rStatGlossaries.PutGroupDoc( pTmp ); - return BOOL( nSuccess != (USHORT) -1 ); + return sal_Bool( nSuccess != (sal_uInt16) -1 ); } /*------------------------------------------------------------------------ Description: Delete a autotext ------------------------------------------------------------------------*/ -BOOL SwGlossaryHdl::DelGlossary(const String &rShortName) +sal_Bool SwGlossaryHdl::DelGlossary(const String &rShortName) { SwTextBlocks *pGlossary = pCurGrp ? pCurGrp : rStatGlossaries.GetGroupDoc(aCurGrp); //pTmp == 0 if the AutoText path setting is wrong if(!pGlossary || !ConvertToNew(*pGlossary)) - return FALSE; + return sal_False; - USHORT nIdx = pGlossary->GetIndex( rShortName ); - if( nIdx != (USHORT) -1 ) + sal_uInt16 nIdx = pGlossary->GetIndex( rShortName ); + if( nIdx != (sal_uInt16) -1 ) pGlossary->Delete( nIdx ); if( !pCurGrp ) rStatGlossaries.PutGroupDoc( pGlossary ); - return TRUE; + return sal_True; } /*------------------------------------------------------------------------ Description: expand short name ------------------------------------------------------------------------*/ -BOOL SwGlossaryHdl::ExpandGlossary() +sal_Bool SwGlossaryHdl::ExpandGlossary() { OSL_ENSURE(pWrtShell->CanInsert(), "illegal"); SwTextBlocks *pGlossary; @@ -429,37 +429,37 @@ BOOL SwGlossaryHdl::ExpandGlossary() if(pWrtShell->IsSelection()) aShortName = pWrtShell->GetSelTxt(); } - return pGlossary ? Expand( aShortName, &rStatGlossaries, pGlossary ) : FALSE; + return pGlossary ? Expand( aShortName, &rStatGlossaries, pGlossary ) : sal_False; } -BOOL SwGlossaryHdl::Expand( const String& rShortName, +sal_Bool SwGlossaryHdl::Expand( const String& rShortName, SwGlossaries *pGlossaries, SwTextBlocks *pGlossary ) { TextBlockInfoArr aFoundArr; String aShortName( rShortName ); - BOOL bCancel = FALSE; + sal_Bool bCancel = sal_False; // search for text block //#b6633427# - don't prefer current group depending on configuration setting const SvxAutoCorrCfg* pCfg = SvxAutoCorrCfg::Get(); - USHORT nFound = !pCfg->IsSearchInAllCategories() ? pGlossary->GetIndex( aShortName ) : -1; + sal_uInt16 nFound = !pCfg->IsSearchInAllCategories() ? pGlossary->GetIndex( aShortName ) : -1; // if not found then search in all groups - if( nFound == (USHORT) -1 ) + if( nFound == (sal_uInt16) -1 ) { const ::utl::TransliterationWrapper& rSCmp = GetAppCmpStrIgnore(); SwGlossaryList* pGlossaryList = ::GetGlossaryList(); - USHORT nGroupCount = pGlossaryList->GetGroupCount(); - for(USHORT i = 1; i <= nGroupCount; i++) + sal_uInt16 nGroupCount = pGlossaryList->GetGroupCount(); + for(sal_uInt16 i = 1; i <= nGroupCount; i++) { // get group name with path-extension String sTitle; - String sGroupName = pGlossaryList->GetGroupName(i - 1, FALSE, &sTitle); + String sGroupName = pGlossaryList->GetGroupName(i - 1, sal_False, &sTitle); if(sGroupName == pGlossary->GetName()) continue; - USHORT nBlockCount = pGlossaryList->GetBlockCount(i -1); + sal_uInt16 nBlockCount = pGlossaryList->GetBlockCount(i -1); if(nBlockCount) { - for(USHORT j = 0; j < nBlockCount; j++) + for(sal_uInt16 j = 0; j < nBlockCount; j++) { String sEntry; String sLongName(pGlossaryList->GetBlockName(i - 1, j, sEntry)); @@ -490,13 +490,13 @@ BOOL SwGlossaryHdl::Expand( const String& rShortName, AbstractSwSelGlossaryDlg* pDlg = pFact->CreateSwSelGlossaryDlg( 0, aShortName, DLG_SEL_GLOS ); OSL_ENSURE(pDlg, "Dialogdiet fail!"); - for(USHORT i = 0; i < aFoundArr.Count(); ++i) + for(sal_uInt16 i = 0; i < aFoundArr.Count(); ++i) { TextBlockInfo_Impl* pData = aFoundArr.GetObject(i); pDlg->InsertGlos(pData->sTitle, pData->sLongName); } pDlg->SelectEntryPos(0); - const USHORT nRet = RET_OK == pDlg->Execute()? + const sal_uInt16 nRet = RET_OK == pDlg->Execute()? pDlg->GetSelectedIdx(): LISTBOX_ENTRY_NOTFOUND; delete pDlg; @@ -508,21 +508,21 @@ BOOL SwGlossaryHdl::Expand( const String& rShortName, } else { - nFound = (USHORT) -1; - bCancel = TRUE; + nFound = (sal_uInt16) -1; + bCancel = sal_True; } } } } // not found - if( nFound == (USHORT) -1 ) + if( nFound == (sal_uInt16) -1 ) { if( !bCancel ) { pGlossaries->PutGroupDoc(pGlossary); - const USHORT nMaxLen = 50; + const sal_uInt16 nMaxLen = 50; if(pWrtShell->IsSelection() && aShortName.Len() > nMaxLen) { aShortName.Erase(nMaxLen); @@ -533,7 +533,7 @@ BOOL SwGlossaryHdl::Expand( const String& rShortName, InfoBox( pWrtShell->GetView().GetWindow(), aTmp ).Execute(); } - return FALSE; + return sal_False; } else { @@ -554,7 +554,7 @@ BOOL SwGlossaryHdl::Expand( const String& rShortName, pWrtShell->StartAllAction(); // cache all InputFields - SwInputFieldList aFldLst( pWrtShell, TRUE ); + SwInputFieldList aFldLst( pWrtShell, sal_True ); pWrtShell->InsertGlossary(*pGlossary, aShortName); pWrtShell->EndAllAction(); @@ -569,13 +569,13 @@ BOOL SwGlossaryHdl::Expand( const String& rShortName, pWrtShell->UpdateInputFlds( &aFldLst ); } pGlossaries->PutGroupDoc(pGlossary); - return TRUE; + return sal_True; } /*------------------------------------------------------------------------ Description: add autotext ------------------------------------------------------------------------*/ -BOOL SwGlossaryHdl::InsertGlossary(const String &rName) +sal_Bool SwGlossaryHdl::InsertGlossary(const String &rName) { OSL_ENSURE(pWrtShell->CanInsert(), "illegal"); @@ -583,7 +583,7 @@ BOOL SwGlossaryHdl::InsertGlossary(const String &rName) pCurGrp? pCurGrp: rStatGlossaries.GetGroupDoc(aCurGrp); if (!pGlos) - return FALSE; + return sal_False; SvxMacro aStartMacro(aEmptyStr, aEmptyStr, STARBASIC); SvxMacro aEndMacro(aEmptyStr, aEmptyStr, STARBASIC); @@ -600,7 +600,7 @@ BOOL SwGlossaryHdl::InsertGlossary(const String &rName) pWrtShell->StartAllAction(); // cache all InputFields - SwInputFieldList aFldLst( pWrtShell, TRUE ); + SwInputFieldList aFldLst( pWrtShell, sal_True ); pWrtShell->InsertGlossary(*pGlos, rName); pWrtShell->EndAllAction(); @@ -615,7 +615,7 @@ BOOL SwGlossaryHdl::InsertGlossary(const String &rName) if(!pCurGrp) rStatGlossaries.PutGroupDoc(pGlos); - return TRUE; + return sal_True; } /*------------------------------------------------------------------------ @@ -634,7 +634,7 @@ void SwGlossaryHdl::SetMacros(const String& rShortName, aMacroTbl.Insert( SW_EVENT_START_INS_GLOSSARY, new SvxMacro(*pStart)); if( pEnd ) aMacroTbl.Insert( SW_EVENT_END_INS_GLOSSARY, new SvxMacro(*pEnd)); - USHORT nIdx = pGlos->GetIndex( rShortName ); + sal_uInt16 nIdx = pGlos->GetIndex( rShortName ); if( !pGlos->SetMacroTable( nIdx, aMacroTbl ) && pGlos->GetError() ) ErrorHandler::HandleError( pGlos->GetError() ); @@ -650,7 +650,7 @@ void SwGlossaryHdl::GetMacros( const String &rShortName, SwTextBlocks *pGlos = pGlossary ? pGlossary : pCurGrp ? pCurGrp : rStatGlossaries.GetGroupDoc(aCurGrp); - USHORT nIndex = pGlos->GetIndex( rShortName ); + sal_uInt16 nIndex = pGlos->GetIndex( rShortName ); if( nIndex != USHRT_MAX ) { SvxMacroTableDtor aMacroTbl; @@ -692,20 +692,20 @@ SwGlossaryHdl::~SwGlossaryHdl() /*------------------------------------------------------------------------ Description: rename an autotext ------------------------------------------------------------------------*/ -BOOL SwGlossaryHdl::Rename(const String& rOldShort, const String& rNewShortName, +sal_Bool SwGlossaryHdl::Rename(const String& rOldShort, const String& rNewShortName, const String& rNewName ) { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; SwTextBlocks *pGlossary = pCurGrp ? pCurGrp : rStatGlossaries.GetGroupDoc(aCurGrp); if(pGlossary) { if(!ConvertToNew(*pGlossary)) - return FALSE; + return sal_False; - USHORT nIdx = pGlossary->GetIndex( rOldShort ); - USHORT nOldLongIdx = pGlossary->GetLongIndex( rNewName ); - USHORT nOldIdx = pGlossary->GetIndex( rNewShortName ); + sal_uInt16 nIdx = pGlossary->GetIndex( rOldShort ); + sal_uInt16 nOldLongIdx = pGlossary->GetLongIndex( rNewName ); + sal_uInt16 nOldIdx = pGlossary->GetIndex( rNewShortName ); if( nIdx != USHRT_MAX && (nOldLongIdx == USHRT_MAX || nOldLongIdx == nIdx )&& @@ -723,7 +723,7 @@ BOOL SwGlossaryHdl::Rename(const String& rOldShort, const String& rNewShortName, } -BOOL SwGlossaryHdl::IsReadOnly( const String* pGrpNm ) const +sal_Bool SwGlossaryHdl::IsReadOnly( const String* pGrpNm ) const { SwTextBlocks *pGlossary = 0; @@ -734,18 +734,18 @@ BOOL SwGlossaryHdl::IsReadOnly( const String* pGrpNm ) const else pGlossary = rStatGlossaries.GetGroupDoc(aCurGrp); - BOOL bRet = pGlossary ? pGlossary->IsReadOnly() : TRUE; + sal_Bool bRet = pGlossary ? pGlossary->IsReadOnly() : sal_True; if( pGrpNm || !pCurGrp ) delete pGlossary; return bRet; } -BOOL SwGlossaryHdl::IsOld() const +sal_Bool SwGlossaryHdl::IsOld() const { SwTextBlocks *pGlossary = pCurGrp ? pCurGrp : rStatGlossaries.GetGroupDoc(aCurGrp); - BOOL bRet = pGlossary ? pGlossary->IsOld() : FALSE; + sal_Bool bRet = pGlossary ? pGlossary->IsOld() : sal_False; if( !pCurGrp ) delete pGlossary; return bRet; @@ -754,12 +754,12 @@ BOOL SwGlossaryHdl::IsOld() const /*-------------------------------------------------- find group without path index --------------------------------------------------*/ -BOOL SwGlossaryHdl::FindGroupName(String & rGroup) +sal_Bool SwGlossaryHdl::FindGroupName(String & rGroup) { return rStatGlossaries.FindGroupName(rGroup); } -BOOL SwGlossaryHdl::CopyToClipboard(SwWrtShell& rSh, const String& rShortName) +sal_Bool SwGlossaryHdl::CopyToClipboard(SwWrtShell& rSh, const String& rShortName) { SwTextBlocks *pGlossary = pCurGrp ? pCurGrp : rStatGlossaries.GetGroupDoc(aCurGrp); @@ -774,16 +774,16 @@ BOOL SwGlossaryHdl::CopyToClipboard(SwWrtShell& rSh, const String& rShortName) return 0 != nRet; } -BOOL SwGlossaryHdl::ImportGlossaries( const String& rName ) +sal_Bool SwGlossaryHdl::ImportGlossaries( const String& rName ) { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; if( rName.Len() ) { const SfxFilter* pFilter = 0; - SfxMedium* pMed = new SfxMedium( rName, STREAM_READ, TRUE, 0, 0 ); + SfxMedium* pMed = new SfxMedium( rName, STREAM_READ, sal_True, 0, 0 ); SfxFilterMatcher aMatcher( String::CreateFromAscii("swriter") ); - pMed->UseInteractionHandler( TRUE ); - if( !aMatcher.GuessFilter( *pMed, &pFilter, FALSE ) ) + pMed->UseInteractionHandler( sal_True ); + if( !aMatcher.GuessFilter( *pMed, &pFilter, sal_False ) ) { SwTextBlocks *pGlossary; pMed->SetFilter( pFilter ); diff --git a/sw/source/ui/dochdl/makefile.mk b/sw/source/ui/dochdl/makefile.mk deleted file mode 100644 index 5728eaa3c3..0000000000 --- a/sw/source/ui/dochdl/makefile.mk +++ /dev/null @@ -1,65 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=dochdl -LIBTARGET=no -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -SRS1NAME=$(TARGET) -SRC1FILES = \ - dochdl.src \ - selglos.src - -SLOFILES = \ - $(EXCEPTIONSFILES) - -EXCEPTIONSFILES = \ - $(SLO)$/gloshdl.obj \ - $(SLO)$/selglos.obj \ - $(SLO)$/swdtflvr.obj - -# $(SLO)$/dataex.obj \ - -LIB1TARGET = $(SLB)$/$(TARGET).lib - -LIB1OBJFILES = \ - $(SLO)$/gloshdl.obj \ - $(SLO)$/swdtflvr.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/ui/dochdl/selglos.src b/sw/source/ui/dochdl/selglos.src index e1ca43a07c..134edfd3f7 100644 --- a/sw/source/ui/dochdl/selglos.src +++ b/sw/source/ui/dochdl/selglos.src @@ -33,7 +33,7 @@ // #define DLG_SEL_GLOS 256 ModalDialog DLG_SEL_GLOS { - HelpID = FN_EXPAND_GLOSSARY ; + HelpID = CMD_FN_EXPAND_GLOSSARY ; OutputSize = TRUE ; SVLook = TRUE ; Size = MAP_APPFONT ( 220 , 100 ) ; @@ -66,6 +66,7 @@ ModalDialog DLG_SEL_GLOS }; ListBox LB_GLOS { + HelpID = "sw:ListBox:DLG_SEL_GLOS:LB_GLOS"; Border = TRUE ; Pos = MAP_APPFONT ( 12 , 14 ) ; Size = MAP_APPFONT ( 140 , 74 ) ; diff --git a/sw/source/ui/dochdl/swdtflvr.cxx b/sw/source/ui/dochdl/swdtflvr.cxx index 8f441da67a..4732b8e51b 100644 --- a/sw/source/ui/dochdl/swdtflvr.cxx +++ b/sw/source/ui/dochdl/swdtflvr.cxx @@ -89,6 +89,7 @@ #include <shellio.hxx> #include <ddefld.hxx> #include <doc.hxx> +#include <IDocumentUndoRedo.hxx> #include <pagedesc.hxx> #include <IMark.hxx> #include <docary.hxx> @@ -133,15 +134,14 @@ // #109590# #include <swcrsr.hxx> #include <SwRewriter.hxx> -#include <undobj.hxx> #include <globals.hrc> #include <osl/mutex.hxx> #include <vcl/svapp.hxx> #include <swserv.hxx> -extern BOOL bFrmDrag; -extern BOOL bDDINetAttr; -extern BOOL bExecuteDrag; +extern sal_Bool bFrmDrag; +extern sal_Bool bDDINetAttr; +extern sal_Bool bExecuteDrag; #define OLESIZE 11905 - 2 * lMinBorder, 6 * MM50 @@ -188,11 +188,11 @@ class SwTrnsfrDdeLink : public ::sfx2::SvBaseLink ::sfx2::SvLinkSourceRef refObj; SwTransferable& rTrnsfr; SwDocShell* pDocShell; - ULONG nOldTimeOut; - BOOL bDelBookmrk : 1; - BOOL bInDisconnect : 1; + sal_uLong nOldTimeOut; + sal_Bool bDelBookmrk : 1; + sal_Bool bInDisconnect : 1; - BOOL FindDocShell(); + sal_Bool FindDocShell(); using sfx2::SvBaseLink::Disconnect; @@ -206,9 +206,9 @@ public: const uno::Any & rValue ); virtual void Closed(); - BOOL WriteData( SvStream& rStrm ); + sal_Bool WriteData( SvStream& rStrm ); - void Disconnect( BOOL bRemoveDataAdvise ); + void Disconnect( sal_Bool bRemoveDataAdvise ); }; // helper class for Action and Undo enclosing @@ -219,7 +219,7 @@ class SwTrnsfrActionAndUndo public: SwTrnsfrActionAndUndo( SwWrtShell *pS, SwUndoId nId, const SwRewriter * pRewriter = 0, - BOOL bDelSel = FALSE) + sal_Bool bDelSel = sal_False) : pSh( pS ), eUndoId( nId ) { pSh->StartUndo( eUndoId, pRewriter ); @@ -229,7 +229,7 @@ public: } ~SwTrnsfrActionAndUndo() { - pSh->EndUndo( eUndoId ); + pSh->EndUndo(); pSh->EndAllAction(); } }; @@ -271,7 +271,7 @@ SwTransferable::~SwTransferable() // the DDELink still needs the WrtShell! if( refDdeLink.Is() ) { - ((SwTrnsfrDdeLink*)&refDdeLink)->Disconnect( TRUE ); + ((SwTrnsfrDdeLink*)&refDdeLink)->Disconnect( sal_True ); refDdeLink.Clear(); } @@ -432,14 +432,14 @@ sal_Bool SwTransferable::GetData( const DATA_FLAVOR& rFlavor ) pClpDocFac = new SwDocFac; SwDoc *const pTmpDoc = lcl_GetDoc(*pClpDocFac); - pTmpDoc->SetRefForDocShell( boost::addressof(aDocShellRef) ); pTmpDoc->LockExpFlds(); // never update fields - leave text as it is pWrtShell->Copy( pTmpDoc ); // in CORE a new one was created (OLE-Objekte copied!) + aDocShellRef = pTmpDoc->GetTmpDocShell(); if( aDocShellRef.Is() ) SwTransferable::InitOle( aDocShellRef, *pTmpDoc ); - pTmpDoc->SetRefForDocShell( 0 ); + pTmpDoc->SetTmpDocShell( (SfxObjectShell*)NULL ); if( nSelectionType & nsSelectionType::SEL_TXT && !pWrtShell->HasMark() ) { @@ -447,7 +447,7 @@ sal_Bool SwTransferable::GetData( const DATA_FLAVOR& rFlavor ) Point aPos( SwEditWin::GetDDStartPosX(), SwEditWin::GetDDStartPosY()); - BOOL bSelect = bExecuteDrag && + sal_Bool bSelect = bExecuteDrag && pWrtShell->GetView().GetDocShell() && !pWrtShell->GetView().GetDocShell()->IsReadOnly(); if( pWrtShell->GetContentAtPos( aPos, aCntntAtPos, bSelect ) ) @@ -661,7 +661,7 @@ sal_Bool SwTransferable::WriteObject( SotStorageStreamRef& xStream, pEmbObj->SetupStorage( xWorkStore, SOFFICE_FILEFORMAT_CURRENT, sal_False ); // mba: no BaseURL for clipboard SfxMedium aMedium( xWorkStore, String() ); - bRet = pEmbObj->DoSaveObjectAs( aMedium, FALSE ); + bRet = pEmbObj->DoSaveObjectAs( aMedium, sal_False ); pEmbObj->DoSaveCompleted(); uno::Reference< embed::XTransactedObject > xTransact( xWorkStore, uno::UNO_QUERY ); @@ -676,7 +676,7 @@ sal_Bool SwTransferable::WriteObject( SotStorageStreamRef& xStream, delete pSrcStm; } - bRet = TRUE; + bRet = sal_True; xWorkStore->dispose(); xWorkStore = uno::Reference < embed::XStorage >(); @@ -719,7 +719,7 @@ sal_Bool SwTransferable::WriteObject( SotStorageStreamRef& xStream, xWrt->SetAsciiOptions( aAOpt ); // no start char for clipboard - xWrt->bUCS2_WithStartChar = FALSE; + xWrt->bUCS2_WithStartChar = sal_False; } break; } @@ -727,9 +727,9 @@ sal_Bool SwTransferable::WriteObject( SotStorageStreamRef& xStream, if( xWrt.Is() ) { SwDoc* pDoc = (SwDoc*)pObject; - xWrt->bWriteClipboardDoc = TRUE; + xWrt->bWriteClipboardDoc = sal_True; xWrt->bWriteOnlyFirstTable = 0 != (TRNSFR_TABELLE & eBufferType); - xWrt->SetShowProgress( FALSE ); + xWrt->SetShowProgress( sal_False ); SwWriter aWrt( *xStream, *pDoc ); if( !IsError( aWrt.Write( xWrt )) ) { @@ -744,7 +744,7 @@ sal_Bool SwTransferable::WriteObject( SotStorageStreamRef& xStream, int SwTransferable::Cut() { - int nRet = Copy( TRUE ); + int nRet = Copy( sal_True ); if( nRet ) DeleteSelection(); return nRet; @@ -763,7 +763,7 @@ void SwTransferable::DeleteSelection() pWrtShell->EndUndo( UNDO_DELETE ); } -int SwTransferable::PrepareForCopy( BOOL bIsCut ) +int SwTransferable::PrepareForCopy( sal_Bool bIsCut ) { int nRet = 1; if(!pWrtShell) @@ -821,7 +821,7 @@ int SwTransferable::PrepareForCopy( BOOL bIsCut ) { SwWait *pWait = 0; if( pWrtShell->ShouldWait() ) - pWait = new SwWait( *pWrtShell->GetView().GetDocShell(), TRUE ); + pWait = new SwWait( *pWrtShell->GetView().GetDocShell(), sal_True ); pClpDocFac = new SwDocFac; @@ -834,7 +834,6 @@ int SwTransferable::PrepareForCopy( BOOL bIsCut ) SwDoc *const pTmpDoc = lcl_GetDoc(*pClpDocFac); - pTmpDoc->SetRefForDocShell( boost::addressof(aDocShellRef) ); pTmpDoc->LockExpFlds(); // nie die Felder updaten - Text so belassen pWrtShell->Copy( pTmpDoc ); @@ -857,16 +856,17 @@ int SwTransferable::PrepareForCopy( BOOL bIsCut ) } // a new one was created in CORE (OLE-Objekte copied!) + aDocShellRef = pTmpDoc->GetTmpDocShell(); if( aDocShellRef.Is() ) SwTransferable::InitOle( aDocShellRef, *pTmpDoc ); - pTmpDoc->SetRefForDocShell( 0 ); + pTmpDoc->SetTmpDocShell( (SfxObjectShell*)NULL ); if( pWrtShell->IsObjSelected() ) eBufferType = TRNSFR_DRAWING; else { eBufferType = TRNSFR_DOCUMENT; - if (pWrtShell->IntelligentCut(nSelection, FALSE) != SwWrtShell::NO_WORD) + if (pWrtShell->IntelligentCut(nSelection, sal_False) != SwWrtShell::NO_WORD) eBufferType = (TransferBufferType)(TRNSFR_DOCUMENT_WORD | eBufferType); } @@ -934,7 +934,7 @@ int SwTransferable::PrepareForCopy( BOOL bIsCut ) //ObjectDescriptor was already filly from the old DocShell. //Now adjust it. Thus in GetData the first query can still //be answered with delayed rendering. - aObjDesc.mbCanLink = FALSE; + aObjDesc.mbCanLink = sal_False; Size aSz( OLESIZE ); aObjDesc.maSize = OutputDevice::LogicToLogic( aSz, MAP_TWIP, MAP_100TH_MM ); @@ -968,7 +968,7 @@ int SwTransferable::PrepareForCopy( BOOL bIsCut ) return nRet; } -int SwTransferable::Copy( BOOL bIsCut ) +int SwTransferable::Copy( sal_Bool bIsCut ) { int nRet = PrepareForCopy( bIsCut ); if ( nRet ) @@ -982,7 +982,7 @@ int SwTransferable::CalculateAndCopy() { if(!pWrtShell) return 0; - SwWait aWait( *pWrtShell->GetView().GetDocShell(), TRUE ); + SwWait aWait( *pWrtShell->GetView().GetDocShell(), sal_True ); String aStr( pWrtShell->Calculate() ); @@ -1002,7 +1002,7 @@ int SwTransferable::CopyGlossary( SwTextBlocks& rGlossary, { if(!pWrtShell) return 0; - SwWait aWait( *pWrtShell->GetView().GetDocShell(), TRUE ); + SwWait aWait( *pWrtShell->GetView().GetDocShell(), sal_True ); pClpDocFac = new SwDocFac; SwDoc *const pCDoc = lcl_GetDoc(*pClpDocFac); @@ -1012,15 +1012,15 @@ int SwTransferable::CopyGlossary( SwTextBlocks& rGlossary, SwCntntNode* pCNd = rNds.GoNext( &aNodeIdx ); // go to 1st ContentNode SwPaM aPam( *pCNd ); - pCDoc->SetRefForDocShell( boost::addressof(aDocShellRef) ); pCDoc->LockExpFlds(); // never update fields - leave text as it is pCDoc->InsertGlossary( rGlossary, rStr, aPam, 0 ); // a new one was created in CORE (OLE-Objects copied!) + aDocShellRef = pCDoc->GetTmpDocShell(); if( aDocShellRef.Is() ) SwTransferable::InitOle( aDocShellRef, *pCDoc ); - pCDoc->SetRefForDocShell( 0 ); + pCDoc->SetTmpDocShell( (SfxObjectShell*)NULL ); eBufferType = TRNSFR_DOCUMENT; @@ -1033,7 +1033,7 @@ int SwTransferable::CopyGlossary( SwTextBlocks& rGlossary, //ObjectDescriptor was already filled from the old DocShell. //Now adjust it. Thus in GetData the first query can still //be answered with delayed rendering. - aObjDesc.mbCanLink = FALSE; + aObjDesc.mbCanLink = sal_False; Size aSz( OLESIZE ); aObjDesc.maSize = OutputDevice::LogicToLogic( aSz, MAP_TWIP, MAP_100TH_MM ); @@ -1050,7 +1050,7 @@ static inline uno::Reference < XTransferable > * lcl_getTransferPointer ( uno::R return &xRef; } -BOOL SwTransferable::IsPaste( const SwWrtShell& rSh, +sal_Bool SwTransferable::IsPaste( const SwWrtShell& rSh, const TransferableDataHelper& rData ) { // Check the common case first: We can always paste our own data! @@ -1065,8 +1065,8 @@ BOOL SwTransferable::IsPaste( const SwWrtShell& rSh, // determine the proper paste action, and return true if we find one uno::Reference<XTransferable> xTransferable( rData.GetXTransferable() ); - USHORT nDestination = SwTransferable::GetSotDestination( rSh ); - USHORT nSourceOptions = + sal_uInt16 nDestination = SwTransferable::GetSotDestination( rSh ); + sal_uInt16 nSourceOptions = (( EXCHG_DEST_DOC_TEXTFRAME == nDestination || EXCHG_DEST_SWDOC_FREE_AREA == nDestination || EXCHG_DEST_DOC_TEXTFRAME_WEB == nDestination || @@ -1074,9 +1074,9 @@ BOOL SwTransferable::IsPaste( const SwWrtShell& rSh, ? EXCHG_IN_ACTION_COPY : EXCHG_IN_ACTION_MOVE); - ULONG nFormat; // output param for GetExchangeAction - USHORT nEventAction; // output param for GetExchangeAction - USHORT nAction = SotExchange::GetExchangeAction( + sal_uLong nFormat; // output param for GetExchangeAction + sal_uInt16 nEventAction; // output param for GetExchangeAction + sal_uInt16 nAction = SotExchange::GetExchangeAction( rData.GetDataFlavorExVector(), nDestination, nSourceOptions, /* ?? */ @@ -1093,9 +1093,9 @@ BOOL SwTransferable::IsPaste( const SwWrtShell& rSh, int SwTransferable::Paste( SwWrtShell& rSh, TransferableDataHelper& rData ) { - USHORT nEventAction, nAction=0, + sal_uInt16 nEventAction, nAction=0, nDestination = SwTransferable::GetSotDestination( rSh ); - ULONG nFormat = 0; + sal_uLong nFormat = 0; if( GetSwTransferable( rData ) ) { @@ -1103,7 +1103,7 @@ int SwTransferable::Paste( SwWrtShell& rSh, TransferableDataHelper& rData ) } else { - USHORT nSourceOptions = + sal_uInt16 nSourceOptions = (( EXCHG_DEST_DOC_TEXTFRAME == nDestination || EXCHG_DEST_SWDOC_FREE_AREA == nDestination || EXCHG_DEST_DOC_TEXTFRAME_WEB == nDestination || @@ -1132,18 +1132,18 @@ int SwTransferable::Paste( SwWrtShell& rSh, TransferableDataHelper& rData ) return EXCHG_INOUT_ACTION_NONE != nAction && SwTransferable::PasteData( rData, rSh, nAction, nFormat, - nDestination, FALSE, FALSE ); + nDestination, sal_False, sal_False ); } int SwTransferable::PasteData( TransferableDataHelper& rData, - SwWrtShell& rSh, USHORT nAction, ULONG nFormat, - USHORT nDestination, BOOL bIsPasteFmt, + SwWrtShell& rSh, sal_uInt16 nAction, sal_uLong nFormat, + sal_uInt16 nDestination, sal_Bool bIsPasteFmt, sal_Bool bIsDefault, const Point* pPt, sal_Int8 nDropAction, - BOOL bPasteSelection ) + sal_Bool bPasteSelection ) { SwWait aWait( *rSh.GetView(). - GetDocShell(), FALSE ); + GetDocShell(), sal_False ); SwTrnsfrActionAndUndo* pAction = 0; SwModule* pMod = SW_MOD(); @@ -1166,11 +1166,11 @@ int SwTransferable::PasteData( TransferableDataHelper& rData, case EXCHG_DEST_DOC_URLBUTTON: case EXCHG_DEST_DOC_GROUPOBJ: // select frames/objects - SwTransferable::SetSelInShell( rSh, TRUE, pPt ); + SwTransferable::SetSelInShell( rSh, sal_True, pPt ); break; default: - SwTransferable::SetSelInShell( rSh, FALSE, pPt ); + SwTransferable::SetSelInShell( rSh, sal_False, pPt ); break; } } @@ -1185,21 +1185,21 @@ int SwTransferable::PasteData( TransferableDataHelper& rData, // - at ReRead of a graphic/DDEData // - at D&D, for the right selection was taken care of // in Drop-Handler - BOOL bDelSel = FALSE; + sal_Bool bDelSel = sal_False; switch( nDestination ) { case EXCHG_DEST_DOC_TEXTFRAME: case EXCHG_DEST_SWDOC_FREE_AREA: case EXCHG_DEST_DOC_TEXTFRAME_WEB: case EXCHG_DEST_SWDOC_FREE_AREA_WEB: - bDelSel = TRUE; + bDelSel = sal_True; break; } if( bDelSel ) // #i34830# pAction = new SwTrnsfrActionAndUndo( &rSh, UNDO_PASTE_CLIPBOARD, NULL, - TRUE ); + sal_True ); } SwTransferable *pTrans=0, *pTunneledTrans=GetSwTransferable( rData ); @@ -1225,10 +1225,10 @@ int SwTransferable::PasteData( TransferableDataHelper& rData, } // in Drag&Drop MessageBoxes must not be showed - BOOL bMsg = 0 == pPt; - BYTE nActionFlags = static_cast< BYTE >(( nAction >> 8 ) & 0xFF); + sal_Bool bMsg = 0 == pPt; + sal_uInt8 nActionFlags = static_cast< sal_uInt8 >(( nAction >> 8 ) & 0xFF); - USHORT nClearedAction = ( nAction & EXCHG_ACTION_MASK ); + sal_uInt16 nClearedAction = ( nAction & EXCHG_ACTION_MASK ); // delete selections switch( nClearedAction ) @@ -1348,7 +1348,7 @@ int SwTransferable::PasteData( TransferableDataHelper& rData, case SOT_FORMATSTR_ID_NETSCAPE_IMAGE: nRet = SwTransferable::_PasteTargetURL( rData, rSh, SW_PASTESDR_INSERT, - pPt, TRUE ); + pPt, sal_True ); break; default: @@ -1371,7 +1371,7 @@ int SwTransferable::PasteData( TransferableDataHelper& rData, case EXCHG_OUT_ACTION_INSERT_DDE: { - BOOL bReRead = 0 != CNT_HasGrf( rSh.GetCntType() ); + sal_Bool bReRead = 0 != CNT_HasGrf( rSh.GetCntType() ); nRet = SwTransferable::_PasteDDE( rData, rSh, bReRead, bMsg ); } break; @@ -1486,10 +1486,10 @@ int SwTransferable::PasteData( TransferableDataHelper& rData, return nRet; } -USHORT SwTransferable::GetSotDestination( const SwWrtShell& rSh, +sal_uInt16 SwTransferable::GetSotDestination( const SwWrtShell& rSh, const Point* pPt ) { - USHORT nRet = EXCHG_INOUT_ACTION_NONE; + sal_uInt16 nRet = EXCHG_INOUT_ACTION_NONE; ObjCntType eOType; if( pPt ) @@ -1504,7 +1504,7 @@ USHORT SwTransferable::GetSotDestination( const SwWrtShell& rSh, { case OBJCNT_GRF: { - BOOL bIMap, bLink; + sal_Bool bIMap, bLink; if( pPt ) { bIMap = 0 != rSh.GetFmtFromObj( *pPt )->GetURL().GetMap(); @@ -1557,9 +1557,9 @@ USHORT SwTransferable::GetSotDestination( const SwWrtShell& rSh, } int SwTransferable::_PasteFileContent( TransferableDataHelper& rData, - SwWrtShell& rSh, ULONG nFmt, BOOL bMsg ) + SwWrtShell& rSh, sal_uLong nFmt, sal_Bool bMsg ) { - USHORT nResId = MSG_CLPBRD_FORMAT_ERROR; + sal_uInt16 nResId = MSG_CLPBRD_FORMAT_ERROR; int nRet = 0; MSE40HTMLClipFormatObj aMSE40ClpObj; @@ -1600,9 +1600,9 @@ int SwTransferable::_PasteFileContent( TransferableDataHelper& rData, { pStream = aMSE40ClpObj.IsValid( *xStrm ); pRead = ReadHTML; - pRead->SetReadUTF8( TRUE ); + pRead->SetReadUTF8( sal_True ); - BOOL bNoComments = + sal_Bool bNoComments = ( nFmt == SOT_FORMATSTR_ID_HTML_NO_COMMENT ); pRead->SetIgnoreHTMLComments( bNoComments ); } @@ -1614,7 +1614,7 @@ int SwTransferable::_PasteFileContent( TransferableDataHelper& rData, else if( !pRead ) { pRead = ReadHTML; - pRead->SetReadUTF8( TRUE ); + pRead->SetReadUTF8( sal_True ); } } } @@ -1651,7 +1651,7 @@ int SwTransferable::_PasteFileContent( TransferableDataHelper& rData, } int SwTransferable::_PasteOLE( TransferableDataHelper& rData, SwWrtShell& rSh, - ULONG nFmt, BYTE nActionFlags, BOOL bMsg ) + sal_uLong nFmt, sal_uInt8 nActionFlags, sal_Bool bMsg ) { int nRet = 0; TransferableObjectDescriptor aObjDesc; @@ -1774,7 +1774,7 @@ int SwTransferable::_PasteOLE( TransferableDataHelper& rData, SwWrtShell& rSh, // try to get the replacement image from the clipboard Graphic aGraphic; - ULONG nGrFormat = 0; + sal_uLong nGrFormat = 0; // insert replacement image ( if there is one ) into the object helper if ( nGrFormat ) @@ -1850,7 +1850,7 @@ int SwTransferable::_PasteOLE( TransferableDataHelper& rData, SwWrtShell& rSh, if( nRet && ( nActionFlags & ( EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL >> 8) )) - SwTransferable::_PasteTargetURL( rData, rSh, 0, 0, FALSE ); + SwTransferable::_PasteTargetURL( rData, rSh, 0, 0, sal_False ); // let the object be unloaded if possible SwOLEObj::UnloadObject( xObj, rSh.GetDoc(), embed::Aspects::MSOLE_CONTENT ); @@ -1860,8 +1860,8 @@ int SwTransferable::_PasteOLE( TransferableDataHelper& rData, SwWrtShell& rSh, } int SwTransferable::_PasteTargetURL( TransferableDataHelper& rData, - SwWrtShell& rSh, USHORT nAction, - const Point* pPt, BOOL bInsertGRF ) + SwWrtShell& rSh, sal_uInt16 nAction, + const Point* pPt, sal_Bool bInsertGRF ) { int nRet = 0; INetImage aINetImg; @@ -1884,7 +1884,7 @@ int SwTransferable::_PasteTargetURL( TransferableDataHelper& rData, switch( nAction ) { case SW_PASTESDR_INSERT: - SwTransferable::SetSelInShell( rSh, FALSE, pPt ); + SwTransferable::SetSelInShell( rSh, sal_False, pPt ); rSh.Insert( sURL, aEmptyStr, aGrf ); break; @@ -1893,7 +1893,7 @@ int SwTransferable::_PasteTargetURL( TransferableDataHelper& rData, { rSh.ReplaceSdrObj( sURL, aEmptyStr, &aGrf ); Point aPt( pPt ? *pPt : rSh.GetCrsrDocPos() ); - SwTransferable::SetSelInShell( rSh, TRUE, &aPt ); + SwTransferable::SetSelInShell( rSh, sal_True, &aPt ); } else rSh.ReRead( sURL, aEmptyStr, &aGrf ); @@ -1906,7 +1906,7 @@ int SwTransferable::_PasteTargetURL( TransferableDataHelper& rData, rSh.ReRead( sURL, aEmptyStr, &aGrf ); else { - SwTransferable::SetSelInShell( rSh, FALSE, pPt ); + SwTransferable::SetSelInShell( rSh, sal_False, pPt ); rSh.Insert( sURL, aEmptyStr, aGrf ); } break; @@ -1928,7 +1928,7 @@ int SwTransferable::_PasteTargetURL( TransferableDataHelper& rData, if( aURL.GetURL() != aINetImg.GetTargetURL() || aURL.GetTargetFrameName() != aINetImg.GetTargetFrame() ) { - aURL.SetURL( aINetImg.GetTargetURL(), FALSE ); + aURL.SetURL( aINetImg.GetTargetURL(), sal_False ); aURL.SetTargetFrameName( aINetImg.GetTargetFrame() ); aSet.Put( aURL ); rSh.SetFlyFrmAttr( aSet ); @@ -1937,7 +1937,7 @@ int SwTransferable::_PasteTargetURL( TransferableDataHelper& rData, return nRet; } -void SwTransferable::SetSelInShell( SwWrtShell& rSh, BOOL bSelectFrm, +void SwTransferable::SetSelInShell( SwWrtShell& rSh, sal_Bool bSelectFrm, const Point* pPt ) { if( bSelectFrm ) @@ -1950,7 +1950,7 @@ void SwTransferable::SetSelInShell( SwWrtShell& rSh, BOOL bSelectFrm, { rSh.HideCrsr(); rSh.EnterSelFrmMode( pPt ); - bFrmDrag = TRUE; + bFrmDrag = sal_True; } } } @@ -1961,20 +1961,20 @@ void SwTransferable::SetSelInShell( SwWrtShell& rSh, BOOL bSelectFrm, rSh.UnSelectFrm(); rSh.LeaveSelFrmMode(); rSh.GetView().GetEditWin().StopInsFrm(); - bFrmDrag = FALSE; + bFrmDrag = sal_False; } else if( rSh.GetView().GetDrawFuncPtr() ) rSh.GetView().GetEditWin().StopInsFrm(); rSh.EnterStdMode(); if( pPt ) - rSh.SwCrsrShell::SetCrsr( *pPt, TRUE ); + rSh.SwCrsrShell::SetCrsr( *pPt, sal_True ); } } int SwTransferable::_PasteDDE( TransferableDataHelper& rData, - SwWrtShell& rWrtShell, BOOL bReReadGrf, - BOOL bMsg ) + SwWrtShell& rWrtShell, sal_Bool bReReadGrf, + sal_Bool bMsg ) { // data from Clipboardformat String aApp, aTopic, aItem; @@ -1997,7 +1997,7 @@ int SwTransferable::_PasteDDE( TransferableDataHelper& rData, sfx2::MakeLnkName( aCmd, &aApp, aTopic, aItem ); // do we want to read in a graphic now? - ULONG nFormat; + sal_uLong nFormat; if( !rData.HasFormat( FORMAT_RTF ) && !rData.HasFormat( SOT_FORMATSTR_ID_HTML ) && !rData.HasFormat( FORMAT_STRING ) && @@ -2019,10 +2019,10 @@ int SwTransferable::_PasteDDE( TransferableDataHelper& rData, } SwFieldType* pTyp = 0; - USHORT i = 1,j; + sal_uInt16 i = 1,j; String aName; - BOOL bAlreadyThere = FALSE, bDoublePaste = FALSE; - USHORT nSize = rWrtShell.GetFldTypeCount(); + sal_Bool bAlreadyThere = sal_False, bDoublePaste = sal_False; + sal_uInt16 nSize = rWrtShell.GetFldTypeCount(); const ::utl::TransliterationWrapper& rColl = ::GetAppCmpStrIgnore(); do { @@ -2038,7 +2038,7 @@ int SwTransferable::_PasteDDE( TransferableDataHelper& rData, sfx2::LINKUPDATE_ALWAYS == ((SwDDEFieldType*)pTyp)->GetType() ) { aName = pTyp->GetName(); - bDoublePaste = TRUE; + bDoublePaste = sal_True; break; } else if( rColl.isEqual( aName, pTyp->GetName() ) ) @@ -2046,10 +2046,10 @@ int SwTransferable::_PasteDDE( TransferableDataHelper& rData, } } if( j == nSize ) - bAlreadyThere = FALSE; + bAlreadyThere = sal_False; else { - bAlreadyThere = TRUE; + bAlreadyThere = sal_True; i++; } } @@ -2116,7 +2116,7 @@ int SwTransferable::_PasteDDE( TransferableDataHelper& rData, rWrtShell.Insert( aSwDDEField ); } - } while( FALSE ); + } while( sal_False ); } else pDDETyp = 0; // remove FieldTypes again @@ -2136,8 +2136,8 @@ int SwTransferable::_PasteDDE( TransferableDataHelper& rData, } int SwTransferable::_PasteSdrFormat( TransferableDataHelper& rData, - SwWrtShell& rSh, USHORT nAction, - const Point* pPt, BYTE nActionFlags ) + SwWrtShell& rSh, sal_uInt16 nAction, + const Point* pPt, sal_uInt8 nActionFlags ) { int nRet = 0; SotStorageStreamRef xStrm; @@ -2149,20 +2149,20 @@ int SwTransferable::_PasteSdrFormat( TransferableDataHelper& rData, if( nRet && ( nActionFlags & ( EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL >> 8) )) - SwTransferable::_PasteTargetURL( rData, rSh, 0, 0, FALSE ); + SwTransferable::_PasteTargetURL( rData, rSh, 0, 0, sal_False ); } return nRet; } int SwTransferable::_PasteGrf( TransferableDataHelper& rData, SwWrtShell& rSh, - ULONG nFmt, USHORT nAction, const Point* pPt, - BYTE nActionFlags, BOOL /*bMsg*/ ) + sal_uLong nFmt, sal_uInt16 nAction, const Point* pPt, + sal_uInt8 nActionFlags, sal_Bool /*bMsg*/ ) { int nRet = 0; Graphic aGrf; INetBookmark aBkmk; - BOOL bCheckForGrf = FALSE, bCheckForImageMap = FALSE; + sal_Bool bCheckForGrf = sal_False, bCheckForImageMap = sal_False; switch( nFmt ) { @@ -2179,7 +2179,7 @@ int SwTransferable::_PasteGrf( TransferableDataHelper& rData, SwWrtShell& rSh, if( SW_PASTESDR_SETATTR == nAction ) nFmt = SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK; else - bCheckForGrf = TRUE; + bCheckForGrf = sal_True; } break; @@ -2194,7 +2194,7 @@ int SwTransferable::_PasteGrf( TransferableDataHelper& rData, SwWrtShell& rSh, aBkmk = INetBookmark( URIHelper::SmartRel2Abs(INetURLObject(), sTxt, Link(), false ), sDesc ); - bCheckForGrf = TRUE; + bCheckForGrf = sal_True; bCheckForImageMap = SW_PASTESDR_REPLACE == nAction; } } @@ -2218,7 +2218,7 @@ int SwTransferable::_PasteGrf( TransferableDataHelper& rData, SwWrtShell& rSh, { // then set as hyperlink after the graphic nFmt = SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK; - nRet = TRUE; + nRet = sal_True; } } @@ -2231,7 +2231,7 @@ int SwTransferable::_PasteGrf( TransferableDataHelper& rData, SwWrtShell& rSh, switch( nAction ) { case SW_PASTESDR_INSERT: - SwTransferable::SetSelInShell( rSh, FALSE, pPt ); + SwTransferable::SetSelInShell( rSh, sal_False, pPt ); rSh.Insert( sURL, aEmptyStr, aGrf ); break; @@ -2240,7 +2240,7 @@ int SwTransferable::_PasteGrf( TransferableDataHelper& rData, SwWrtShell& rSh, { rSh.ReplaceSdrObj( sURL, aEmptyStr, &aGrf ); Point aPt( pPt ? *pPt : rSh.GetCrsrDocPos() ); - SwTransferable::SetSelInShell( rSh, TRUE, &aPt ); + SwTransferable::SetSelInShell( rSh, sal_True, &aPt ); } else rSh.ReRead( sURL, aEmptyStr, &aGrf ); @@ -2254,7 +2254,7 @@ int SwTransferable::_PasteGrf( TransferableDataHelper& rData, SwWrtShell& rSh, SfxItemSet aSet( rSh.GetAttrPool(), RES_URL, RES_URL ); rSh.GetFlyFrmAttr( aSet ); SwFmtURL aURL( (SwFmtURL&)aSet.Get( RES_URL ) ); - aURL.SetURL( aBkmk.GetURL(), FALSE ); + aURL.SetURL( aBkmk.GetURL(), sal_False ); aSet.Put( aURL ); rSh.SetFlyFrmAttr( aSet ); } @@ -2265,7 +2265,7 @@ int SwTransferable::_PasteGrf( TransferableDataHelper& rData, SwWrtShell& rSh, rSh.ReRead( sURL, aEmptyStr, &aGrf ); else { - SwTransferable::SetSelInShell( rSh, FALSE, pPt ); + SwTransferable::SetSelInShell( rSh, sal_False, pPt ); rSh.Insert( aBkmk.GetURL(), aEmptyStr, aGrf ); } break; @@ -2284,14 +2284,14 @@ int SwTransferable::_PasteGrf( TransferableDataHelper& rData, SwWrtShell& rSh, if( nActionFlags & ( EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL >> 8) ) - SwTransferable::_PasteTargetURL( rData, rSh, 0, 0, FALSE ); + SwTransferable::_PasteTargetURL( rData, rSh, 0, 0, sal_False ); } else if( bCheckForImageMap ) { // or should the file be an ImageMap-File? ImageMap aMap; SfxMedium aMed( INetURLObject(aBkmk.GetURL()).GetFull(), - STREAM_STD_READ, FALSE ); + STREAM_STD_READ, sal_False ); SvStream* pStream = aMed.GetInStream(); if( pStream != NULL && !pStream->GetError() && @@ -2338,7 +2338,7 @@ int SwTransferable::_PasteImageMap( TransferableDataHelper& rData, } int SwTransferable::_PasteAsHyperlink( TransferableDataHelper& rData, - SwWrtShell& rSh, ULONG nFmt ) + SwWrtShell& rSh, sal_uLong nFmt ) { int nRet = 0; String sFile; @@ -2362,7 +2362,7 @@ int SwTransferable::_PasteAsHyperlink( TransferableDataHelper& rData, SfxItemSet aSet( rSh.GetAttrPool(), RES_URL, RES_URL ); rSh.GetFlyFrmAttr( aSet ); SwFmtURL aURL2( (SwFmtURL&)aSet.Get( RES_URL ) ); - aURL2.SetURL( sFile, FALSE ); + aURL2.SetURL( sFile, sal_False ); if( !aURL2.GetName().Len() ) aURL2.SetName( sFile ); aSet.Put( aURL2 ); @@ -2376,15 +2376,15 @@ int SwTransferable::_PasteAsHyperlink( TransferableDataHelper& rData, sDesc.Len() ? sDesc : sFile ); } } - nRet = TRUE; + nRet = sal_True; } return nRet; } int SwTransferable::_PasteFileName( TransferableDataHelper& rData, - SwWrtShell& rSh, ULONG nFmt, - USHORT nAction, const Point* pPt, - BYTE nActionFlags, BOOL bMsg ) + SwWrtShell& rSh, sal_uLong nFmt, + sal_uInt16 nAction, const Point* pPt, + sal_uInt8 nActionFlags, sal_Bool bMsg ) { int nRet = SwTransferable::_PasteGrf( rData, rSh, nFmt, nAction, pPt, nActionFlags, bMsg ); @@ -2409,7 +2409,7 @@ int SwTransferable::_PasteFileName( TransferableDataHelper& rData, } else { - BOOL bIsURLFile = SwTransferable::_CheckForURLOrLNKFile( rData, sFile, &sDesc ); + sal_Bool bIsURLFile = SwTransferable::_CheckForURLOrLNKFile( rData, sFile, &sDesc ); //Own FileFormat? --> insert, not for StarWriter/Web String sFileURL = URIHelper::SmartRel2Abs(INetURLObject(), sFile, Link(), false ); @@ -2449,7 +2449,7 @@ int SwTransferable::_PasteFileName( TransferableDataHelper& rData, SfxItemSet aSet( rSh.GetAttrPool(), RES_URL, RES_URL ); rSh.GetFlyFrmAttr( aSet ); SwFmtURL aURL2( (SwFmtURL&)aSet.Get( RES_URL ) ); - aURL2.SetURL( sFile, FALSE ); + aURL2.SetURL( sFile, sal_False ); if( !aURL2.GetName().Len() ) aURL2.SetName( sFile ); aSet.Put( aURL2 ); @@ -2463,7 +2463,7 @@ int SwTransferable::_PasteFileName( TransferableDataHelper& rData, sDesc.Len() ? sDesc : sFile ); } } - nRet = TRUE; + nRet = sal_True; } } } @@ -2472,14 +2472,14 @@ int SwTransferable::_PasteFileName( TransferableDataHelper& rData, } int SwTransferable::_PasteDBData( TransferableDataHelper& rData, - SwWrtShell& rSh, ULONG nFmt, BOOL bLink, - const Point* pDragPt, BOOL bMsg ) + SwWrtShell& rSh, sal_uLong nFmt, sal_Bool bLink, + const Point* pDragPt, sal_Bool bMsg ) { int nRet = 0; String sTxt; if( rData.GetString( nFmt, sTxt ) && sTxt.Len() ) { - USHORT nWh = SOT_FORMATSTR_ID_SBA_CTRLDATAEXCHANGE == nFmt + sal_uInt16 nWh = SOT_FORMATSTR_ID_SBA_CTRLDATAEXCHANGE == nFmt ? 0 : SOT_FORMATSTR_ID_SBA_DATAEXCHANGE == nFmt ? (bLink @@ -2514,14 +2514,14 @@ int SwTransferable::_PasteDBData( TransferableDataHelper& rData, SfxUsrAnyItem* pColumnNameItem = 0; SfxUsrAnyItem* pSelectionItem = 0; - BOOL bDataAvailable = TRUE; + sal_Bool bDataAvailable = sal_True; ODataAccessDescriptor aDesc; if(bHaveColumnDescriptor) aDesc = OColumnTransferable::extractColumnDescriptor(rData); else if(ODataAccessObjectTransferable::canExtractObjectDescriptor(rVector) ) aDesc = ODataAccessObjectTransferable::extractObjectDescriptor(rData); else - bDataAvailable = FALSE; + bDataAvailable = sal_False; if ( bDataAvailable ) { @@ -2574,30 +2574,30 @@ int SwTransferable::_PasteDBData( TransferableDataHelper& rData, } int SwTransferable::_PasteFileList( TransferableDataHelper& rData, - SwWrtShell& rSh, BOOL bLink, - const Point* pPt, BOOL bMsg ) + SwWrtShell& rSh, sal_Bool bLink, + const Point* pPt, sal_Bool bMsg ) { int nRet = 0; FileList aFileList; if( rData.GetFileList( SOT_FORMAT_FILE_LIST, aFileList ) && aFileList.Count() ) { - USHORT nAct = bLink ? SW_PASTESDR_SETATTR : SW_PASTESDR_INSERT; + sal_uInt16 nAct = bLink ? SW_PASTESDR_SETATTR : SW_PASTESDR_INSERT; String sFlyNm; // iterate over the filelist - for( ULONG n = 0, nEnd = aFileList.Count(); n < nEnd; ++n ) + for( sal_uLong n = 0, nEnd = aFileList.Count(); n < nEnd; ++n ) { TransferDataContainer* pHlp = new TransferDataContainer; pHlp->CopyString( FORMAT_FILE, aFileList.GetFile( n )); TransferableDataHelper aData( pHlp ); if( SwTransferable::_PasteFileName( aData, rSh, SOT_FORMAT_FILE, nAct, - pPt, FALSE, bMsg )) + pPt, sal_False, bMsg )) { if( bLink ) { sFlyNm = rSh.GetFlyName(); - SwTransferable::SetSelInShell( rSh, FALSE, pPt ); + SwTransferable::SetSelInShell( rSh, sal_False, pPt ); } nRet = 1; } @@ -2612,17 +2612,17 @@ int SwTransferable::_PasteFileList( TransferableDataHelper& rData, return nRet; } -BOOL SwTransferable::_CheckForURLOrLNKFile( TransferableDataHelper& rData, +sal_Bool SwTransferable::_CheckForURLOrLNKFile( TransferableDataHelper& rData, String& rFileName, String* pTitle ) { - BOOL bIsURLFile = FALSE; + sal_Bool bIsURLFile = sal_False; INetBookmark aBkmk; if( rData.GetINetBookmark( SOT_FORMATSTR_ID_SOLK, aBkmk ) ) { rFileName = aBkmk.GetURL(); if( pTitle ) *pTitle = aBkmk.GetDescription(); - bIsURLFile = TRUE; + bIsURLFile = sal_True; } else { @@ -2639,7 +2639,7 @@ BOOL SwTransferable::_CheckForURLOrLNKFile( TransferableDataHelper& rData, return bIsURLFile; } -BOOL SwTransferable::IsPasteSpecial( const SwWrtShell& rWrtShell, +sal_Bool SwTransferable::IsPasteSpecial( const SwWrtShell& rWrtShell, const TransferableDataHelper& rData ) { // we can paste-special if there's an entry in the paste-special-format list @@ -2650,12 +2650,12 @@ BOOL SwTransferable::IsPasteSpecial( const SwWrtShell& rWrtShell, int SwTransferable::PasteFormat( SwWrtShell& rSh, TransferableDataHelper& rData, - ULONG nFormat ) + sal_uLong nFormat ) { - SwWait aWait( *rSh.GetView().GetDocShell(), FALSE ); + SwWait aWait( *rSh.GetView().GetDocShell(), sal_False ); int nRet = 0; - ULONG nPrivateFmt = FORMAT_PRIVATE; + sal_uLong nPrivateFmt = FORMAT_PRIVATE; SwTransferable *pClipboard = GetSwTransferable( rData ); if( pClipboard && ((TRNSFR_DOCUMENT|TRNSFR_GRAPHIC|TRNSFR_OLE) & pClipboard->eBufferType )) @@ -2666,7 +2666,7 @@ int SwTransferable::PasteFormat( SwWrtShell& rSh, else if( rData.HasFormat( nFormat ) ) { uno::Reference<XTransferable> xTransferable( rData.GetXTransferable() ); - USHORT nEventAction, + sal_uInt16 nEventAction, nDestination = SwTransferable::GetSotDestination( rSh ), nSourceOptions = (( EXCHG_DEST_DOC_TEXTFRAME == nDestination || @@ -2685,15 +2685,15 @@ int SwTransferable::PasteFormat( SwWrtShell& rSh, if( EXCHG_INOUT_ACTION_NONE != nAction ) nRet = SwTransferable::PasteData( rData, rSh, nAction, nFormat, - nDestination, TRUE, FALSE ); + nDestination, sal_True, sal_False ); } return nRet; } int SwTransferable::_TestAllowedFormat( const TransferableDataHelper& rData, - ULONG nFormat, USHORT nDestination ) + sal_uLong nFormat, sal_uInt16 nDestination ) { - USHORT nAction = EXCHG_INOUT_ACTION_NONE, nEventAction; + sal_uInt16 nAction = EXCHG_INOUT_ACTION_NONE, nEventAction; if( rData.HasFormat( nFormat )) { uno::Reference<XTransferable> xTransferable( rData.GetXTransferable() ); nAction = SotExchange::GetExchangeAction( @@ -2710,7 +2710,7 @@ int SwTransferable::_TestAllowedFormat( const TransferableDataHelper& rData, * the list of formats which will be offered to the user in the 'Paste * Special...' dialog and the paste button menu */ -static USHORT aPasteSpecialIds[] = +static sal_uInt16 aPasteSpecialIds[] = { SOT_FORMATSTR_ID_HTML, SOT_FORMATSTR_ID_HTML_SIMPLE, @@ -2734,7 +2734,7 @@ int SwTransferable::PasteUnformatted( SwWrtShell& rSh, TransferableDataHelper& r return SwTransferable::PasteFormat( rSh, rData, SOT_FORMAT_STRING ); } -int SwTransferable::PasteSpecial( SwWrtShell& rSh, TransferableDataHelper& rData, ULONG& rFormatUsed ) +int SwTransferable::PasteSpecial( SwWrtShell& rSh, TransferableDataHelper& rData, sal_uLong& rFormatUsed ) { int nRet = 0; SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); @@ -2743,13 +2743,13 @@ int SwTransferable::PasteSpecial( SwWrtShell& rSh, TransferableDataHelper& rData DataFlavorExVector aFormats( rData.GetDataFlavorExVector() ); TransferableObjectDescriptor aDesc; - USHORT nDest = SwTransferable::GetSotDestination( rSh ); + sal_uInt16 nDest = SwTransferable::GetSotDestination( rSh ); SwTransferable *pClipboard = GetSwTransferable( rData ); if( pClipboard ) { aDesc = pClipboard->aObjDesc; - USHORT nResId; + sal_uInt16 nResId; if( pClipboard->eBufferType & TRNSFR_DOCUMENT ) nResId = STR_PRIVATETEXT; else if( pClipboard->eBufferType & TRNSFR_GRAPHIC ) @@ -2789,11 +2789,11 @@ int SwTransferable::PasteSpecial( SwWrtShell& rSh, TransferableDataHelper& rData if( SwTransferable::_TestAllowedFormat( rData, SOT_FORMATSTR_ID_LINK, nDest )) pDlg->Insert( SOT_FORMATSTR_ID_LINK, SW_RES(STR_DDEFORMAT) ); - for( USHORT* pIds = aPasteSpecialIds; *pIds; ++pIds ) + for( sal_uInt16* pIds = aPasteSpecialIds; *pIds; ++pIds ) if( SwTransferable::_TestAllowedFormat( rData, *pIds, nDest )) pDlg->Insert( *pIds, aEmptyStr ); - ULONG nFormat = pDlg->GetFormat( rData.GetTransferable() ); + sal_uLong nFormat = pDlg->GetFormat( rData.GetTransferable() ); if( nFormat ) nRet = SwTransferable::PasteFormat( rSh, rData, nFormat ); @@ -2809,12 +2809,12 @@ void SwTransferable::FillClipFmtItem( const SwWrtShell& rSh, const TransferableDataHelper& rData, SvxClipboardFmtItem & rToFill ) { - USHORT nDest = SwTransferable::GetSotDestination( rSh ); + sal_uInt16 nDest = SwTransferable::GetSotDestination( rSh ); SwTransferable *pClipboard = GetSwTransferable( rData ); if( pClipboard ) { - USHORT nResId; + sal_uInt16 nResId; if( pClipboard->eBufferType & TRNSFR_DOCUMENT ) nResId = STR_PRIVATETEXT; else if( pClipboard->eBufferType & TRNSFR_GRAPHIC ) @@ -2853,7 +2853,7 @@ void SwTransferable::FillClipFmtItem( const SwWrtShell& rSh, if( SwTransferable::_TestAllowedFormat( rData, SOT_FORMATSTR_ID_LINK, nDest )) rToFill.AddClipbrdFormat( SOT_FORMATSTR_ID_LINK, SW_RES(STR_DDEFORMAT) ); - for( USHORT* pIds = aPasteSpecialIds; *pIds; ++pIds ) + for( sal_uInt16* pIds = aPasteSpecialIds; *pIds; ++pIds ) if( SwTransferable::_TestAllowedFormat( rData, *pIds, nDest )) rToFill.AddClipbrdFormat( *pIds, aEmptyStr ); } @@ -2894,7 +2894,7 @@ void SwTransferable::SetDataForDragAndDrop( const Point& rSttPos ) { eBufferType = TRNSFR_DOCUMENT; if( SwWrtShell::NO_WORD != - pWrtShell->IntelligentCut( nSelection, FALSE )) + pWrtShell->IntelligentCut( nSelection, sal_False )) eBufferType = TransferBufferType( TRNSFR_DOCUMENT_WORD | eBufferType); } @@ -2947,7 +2947,7 @@ void SwTransferable::SetDataForDragAndDrop( const Point& rSttPos ) //ObjectDescriptor was already filled from the old DocShell. //Now adjust it. Thus in GetData the first query can still //be answered with delayed rendering. - aObjDesc.mbCanLink = FALSE; + aObjDesc.mbCanLink = sal_False; aObjDesc.maDragStartPos = rSttPos; aObjDesc.maSize = OutputDevice::LogicToLogic( Size( OLESIZE ), MAP_TWIP, MAP_100TH_MM ); @@ -2997,9 +2997,9 @@ void SwTransferable::StartDrag( Window* pWin, const Point& rPos ) if(!pWrtShell) return; bOldIdle = pWrtShell->GetViewOptions()->IsIdle(); - bCleanUp = TRUE; + bCleanUp = sal_True; - ((SwViewOption *)pWrtShell->GetViewOptions())->SetIdle( FALSE ); + ((SwViewOption *)pWrtShell->GetViewOptions())->SetIdle( sal_False ); if( pWrtShell->IsSelFrmMode() ) pWrtShell->ShowCrsr(); @@ -3034,7 +3034,7 @@ void SwTransferable::DragFinished( sal_Int8 nAction ) { if ( !(pWrtShell->IsSelFrmMode() || pWrtShell->IsObjSelected()) ) //SmartCut, take one of the blanks along - pWrtShell->IntelligentCut( pWrtShell->GetSelectionType(), TRUE ); + pWrtShell->IntelligentCut( pWrtShell->GetSelectionType(), sal_True ); pWrtShell->DelRight(); } pWrtShell->EndUndo( UNDO_UI_DRAG_AND_MOVE ); @@ -3066,7 +3066,7 @@ int SwTransferable::PrivatePaste( SwWrtShell& rShell ) // (otherwise it's not pasted into a TableSelection!!!) OSL_ENSURE( !rShell.ActionPend(), "Paste darf nie eine Actionklammerung haben" ); if ( !pClpDocFac ) - return sal_False; // the return value of the SwFEShell::Paste also is BOOL! + return sal_False; // the return value of the SwFEShell::Paste also is sal_Bool! const int nSelection = rShell.GetSelectionType(); @@ -3090,12 +3090,12 @@ int SwTransferable::PrivatePaste( SwWrtShell& rShell ) { // position the cursor again Point aPt( rShell.GetCharRect().Pos() ); - rShell.SwCrsrShell::SetCrsr( aPt, TRUE ); + rShell.SwCrsrShell::SetCrsr( aPt, sal_True ); } rShell.SetRetainSelection( false ); } - BOOL bInWrd = FALSE, bEndWrd = FALSE, bSttWrd = FALSE, + sal_Bool bInWrd = sal_False, bEndWrd = sal_False, bSttWrd = sal_False, bSmart = 0 != (TRNSFR_DOCUMENT_WORD & eBufferType); if( bSmart ) { @@ -3126,15 +3126,15 @@ int SwTransferable::PrivatePaste( SwWrtShell& rShell ) } int SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt, - BOOL bMove, BOOL bIsXSelection ) + sal_Bool bMove, sal_Bool bIsXSelection ) { int cWord = 0; - BOOL bInWrd = FALSE; - BOOL bEndWrd = FALSE; - BOOL bSttWrd = FALSE; - BOOL bSttPara= FALSE; - BOOL bTblSel = FALSE; - BOOL bFrmSel = FALSE; + sal_Bool bInWrd = sal_False; + sal_Bool bEndWrd = sal_False; + sal_Bool bSttWrd = sal_False; + sal_Bool bSttPara= sal_False; + sal_Bool bTblSel = sal_False; + sal_Bool bFrmSel = sal_False; SwWrtShell& rSrcSh = *GetShell(); @@ -3153,7 +3153,7 @@ int SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt, { rSh.HideCrsr(); rSh.EnterSelFrmMode( &rDragPt ); - bFrmDrag = TRUE; + bFrmDrag = sal_True; } const int nSelection = rSh.GetSelectionType(); @@ -3164,7 +3164,7 @@ int SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt, SfxItemSet aSet( rSh.GetAttrPool(), RES_URL, RES_URL ); rSh.GetFlyFrmAttr( aSet ); SwFmtURL aURL( (SwFmtURL&)aSet.Get( RES_URL ) ); - aURL.SetURL( aTmp.GetURL(), FALSE ); + aURL.SetURL( aTmp.GetURL(), sal_False ); aSet.Put( aURL ); rSh.SetFlyFrmAttr( aSet ); return 1; @@ -3175,7 +3175,7 @@ int SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt, rSh.LeaveSelFrmMode(); rSh.UnSelectFrm(); rSh.ShowCrsr(); - bFrmDrag = FALSE; + bFrmDrag = sal_False; } } } @@ -3196,14 +3196,14 @@ int SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt, return 0; if( rSrcSh.IsTableMode() ) - bTblSel = TRUE; + bTblSel = sal_True; else if( rSrcSh.IsSelFrmMode() || rSrcSh.IsObjSelected() ) { // don't move position-protected objects! if( bMove && rSrcSh.IsSelObjProtected( FLYPROTECT_POS ) ) return 0; - bFrmSel = TRUE; + bFrmSel = sal_True; } const int nSel = rSrcSh.GetSelectionType(); @@ -3224,8 +3224,8 @@ int SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt, if( &rSrcSh != &rSh ) { rSh.EnterStdMode(); - rSh.SwCrsrShell::SetCrsr( rDragPt, TRUE ); - cWord = rSrcSh.IntelligentCut( nSel, FALSE ); + rSh.SwCrsrShell::SetCrsr( rDragPt, sal_True ); + cWord = rSrcSh.IntelligentCut( nSel, sal_False ); } else if( !bTblSel && !bFrmSel ) { @@ -3240,9 +3240,9 @@ int SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt, rSh.SwCrsrShell::CreateCrsr(); } - rSh.SwCrsrShell::SetCrsr( rDragPt, TRUE, false ); + rSh.SwCrsrShell::SetCrsr( rDragPt, sal_True, false ); rSh.GoPrevCrsr(); - cWord = rSh.IntelligentCut( rSh.GetSelectionType(), FALSE ); + cWord = rSh.IntelligentCut( rSh.GetSelectionType(), sal_False ); rSh.GoNextCrsr(); } @@ -3259,13 +3259,13 @@ int SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt, if( &rSrcSh == &rSh ) { rSh.GoPrevCrsr(); - rSh.SwCrsrShell::SetCrsr( aSttPt, TRUE ); + rSh.SwCrsrShell::SetCrsr( aSttPt, sal_True ); rSh.SelectTxtAttr( RES_TXTATR_INETFMT ); if( rSh.ChgCurrPam( rDragPt ) ) { // don't copy/move inside of yourself rSh.DestroyCrsr(); - rSh.EndUndo( eUndoId ); + rSh.EndUndo(); rSh.EndAction(); rSh.EndAction(); return 0; @@ -3274,14 +3274,14 @@ int SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt, } else { - rSrcSh.SwCrsrShell::SetCrsr( aSttPt, TRUE ); + rSrcSh.SwCrsrShell::SetCrsr( aSttPt, sal_True ); rSrcSh.SelectTxtAttr( RES_TXTATR_INETFMT ); } // is there an URL attribute at the insert point? Then replace that, // so simply put up a selection? rSh.DelINetAttrWithText(); - bDDINetAttr = TRUE; + bDDINetAttr = sal_True; } if ( rSrcSh.IsSelFrmMode() ) @@ -3290,7 +3290,7 @@ int SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt, aSttPt -= aSttPt - rSrcSh.GetObjRect().Pos(); } - BOOL bRet = rSrcSh.SwFEShell::Copy( &rSh, aSttPt, rDragPt, bMove, + sal_Bool bRet = rSrcSh.SwFEShell::Copy( &rSh, aSttPt, rDragPt, bMove, !bIsXSelection ); if( !bIsXSelection ) @@ -3308,14 +3308,14 @@ int SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt, //SmartCut, take one of the blanks along. rSh.SwCrsrShell::DestroyCrsr(); if ( cWord == SwWrtShell::WORD_SPACE_BEFORE ) - rSh.ExtendSelection( FALSE ); + rSh.ExtendSelection( sal_False ); else if ( cWord == SwWrtShell::WORD_SPACE_AFTER ) rSh.ExtendSelection(); rSrcSh.DelRight(); } } rSrcSh.KillPams(); - rSrcSh.Pop( FALSE ); + rSrcSh.Pop( sal_False ); /* after dragging a table selection inside one shell set cursor to the drop position. */ @@ -3373,8 +3373,8 @@ int SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt, rSrcSh.LeaveSelFrmMode(); if( rSrcSh.GetDoc() != rSh.GetDoc() ) - rSrcSh.EndUndo( eUndoId ); - rSh.EndUndo( eUndoId ); + rSrcSh.EndUndo(); + rSh.EndUndo(); // put the shell in the right state if( &rSrcSh != &rSh && ( rSh.IsFrmSelected() || rSh.IsObjSelected() )) @@ -3456,7 +3456,7 @@ SwTransferable* SwTransferable::GetSwTransferable( const TransferableDataHelper& SwTrnsfrDdeLink::SwTrnsfrDdeLink( SwTransferable& rTrans, SwWrtShell& rSh ) : rTrnsfr( rTrans ), pDocShell( 0 ), - bDelBookmrk( FALSE ), bInDisconnect( FALSE ) + bDelBookmrk( sal_False ), bInDisconnect( sal_False ) { // we only end up here with table- or text selection const int nSelection = rSh.GetSelectionType(); @@ -3469,9 +3469,9 @@ SwTrnsfrDdeLink::SwTrnsfrDdeLink( SwTransferable& rTrans, SwWrtShell& rSh ) else { // creating a temp. bookmark without undo - BOOL bUndo = rSh.DoesUndo(); - rSh.DoUndo( FALSE ); - BOOL bIsModified = rSh.IsModified(); + sal_Bool bUndo = rSh.DoesUndo(); + rSh.DoUndo( sal_False ); + sal_Bool bIsModified = rSh.IsModified(); ::sw::mark::IMark* pMark = rSh.SetBookmark( KeyCode(), @@ -3481,7 +3481,7 @@ SwTrnsfrDdeLink::SwTrnsfrDdeLink( SwTransferable& rTrans, SwWrtShell& rSh ) if(pMark) { sName = pMark->GetName(); - bDelBookmrk = TRUE; + bDelBookmrk = sal_True; if( !bIsModified ) rSh.ResetModified(); } @@ -3510,7 +3510,7 @@ SwTrnsfrDdeLink::SwTrnsfrDdeLink( SwTransferable& rTrans, SwWrtShell& rSh ) SwTrnsfrDdeLink::~SwTrnsfrDdeLink() { if( refObj.Is() ) - Disconnect( TRUE ); + Disconnect( sal_True ); } void SwTrnsfrDdeLink::DataChanged( const String& , @@ -3521,14 +3521,14 @@ void SwTrnsfrDdeLink::DataChanged( const String& , { if( FindDocShell() && pDocShell->GetView() ) rTrnsfr.RemoveDDELinkFormat( pDocShell->GetView()->GetEditWin() ); - Disconnect( FALSE ); + Disconnect( sal_False ); } } -BOOL SwTrnsfrDdeLink::WriteData( SvStream& rStrm ) +sal_Bool SwTrnsfrDdeLink::WriteData( SvStream& rStrm ) { if( !refObj.Is() || !FindDocShell() ) - return FALSE; + return sal_False; rtl_TextEncoding eEncoding = DDE_TXT_ENCODING; const ByteString aAppNm( GetpApp()->GetAppName(), eEncoding ); @@ -3589,25 +3589,24 @@ BOOL SwTrnsfrDdeLink::WriteData( SvStream& rStrm ) return true; } -void SwTrnsfrDdeLink::Disconnect( BOOL bRemoveDataAdvise ) +void SwTrnsfrDdeLink::Disconnect( sal_Bool bRemoveDataAdvise ) { // don't accept DataChanged anymore, when already in Disconnect! // (DTOR from Bookmark sends a DataChanged!) - BOOL bOldDisconnect = bInDisconnect; - bInDisconnect = TRUE; + sal_Bool bOldDisconnect = bInDisconnect; + bInDisconnect = sal_True; // destroy the unused bookmark again (without Undo!)? if( bDelBookmrk && refObj.Is() && FindDocShell() ) { SwDoc* pDoc = pDocShell->GetDoc(); - BOOL bUndo = pDoc->DoesUndo(); - pDoc->DoUndo( FALSE ); + ::sw::UndoGuard const undoGuard(pDoc->GetIDocumentUndoRedo()); // #i58448# Link aSavedOle2Link( pDoc->GetOle2Link() ); pDoc->SetOle2Link( Link() ); - BOOL bIsModified = pDoc->IsModified(); + sal_Bool bIsModified = pDoc->IsModified(); IDocumentMarkAccess* const pMarkAccess = pDoc->getIDocumentMarkAccess(); pMarkAccess->deleteMark(pMarkAccess->findMark(sName)); @@ -3617,8 +3616,7 @@ void SwTrnsfrDdeLink::Disconnect( BOOL bRemoveDataAdvise ) // #i58448# pDoc->SetOle2Link( aSavedOle2Link ); - pDoc->DoUndo( bUndo ); - bDelBookmrk = FALSE; + bDelBookmrk = sal_False; } if( refObj.Is() ) @@ -3636,7 +3634,7 @@ void SwTrnsfrDdeLink::Disconnect( BOOL bRemoveDataAdvise ) bInDisconnect = bOldDisconnect; } -BOOL SwTrnsfrDdeLink::FindDocShell() +sal_Bool SwTrnsfrDdeLink::FindDocShell() { TypeId aType( TYPE( SwDocShell ) ); SfxObjectShell* pTmpSh = SfxObjectShell::GetFirst( &aType ); @@ -3645,14 +3643,14 @@ BOOL SwTrnsfrDdeLink::FindDocShell() if( pTmpSh == pDocShell ) // that's what we want to have { if( pDocShell->GetDoc() ) - return TRUE; + return sal_True; break; // the Doc is not there anymore, so leave! } pTmpSh = SfxObjectShell::GetNext( *pTmpSh, &aType ); } pDocShell = 0; - return FALSE; + return sal_False; } void SwTrnsfrDdeLink::Closed() diff --git a/sw/source/ui/docvw/AnnotationMenuButton.cxx b/sw/source/ui/docvw/AnnotationMenuButton.cxx index 27f7ddb789..4407e1c6fd 100644 --- a/sw/source/ui/docvw/AnnotationMenuButton.cxx +++ b/sw/source/ui/docvw/AnnotationMenuButton.cxx @@ -47,13 +47,13 @@ namespace sw { namespace annotation { -Color ColorFromAlphaColor( const UINT8 aTransparency, +Color ColorFromAlphaColor( const sal_uInt8 aTransparency, const Color &aFront, const Color &aBack ) { - return Color((UINT8)(aFront.GetRed() * aTransparency/(double)255 + aBack.GetRed() * (1-aTransparency/(double)255)), - (UINT8)(aFront.GetGreen() * aTransparency/(double)255 + aBack.GetGreen() * (1-aTransparency/(double)255)), - (UINT8)(aFront.GetBlue() * aTransparency/(double)255 + aBack.GetBlue() * (1-aTransparency/(double)255))); + return Color((sal_uInt8)(aFront.GetRed() * aTransparency/(double)255 + aBack.GetRed() * (1-aTransparency/(double)255)), + (sal_uInt8)(aFront.GetGreen() * aTransparency/(double)255 + aBack.GetGreen() * (1-aTransparency/(double)255)), + (sal_uInt8)(aFront.GetBlue() * aTransparency/(double)255 + aBack.GetBlue() * (1-aTransparency/(double)255))); } AnnotationMenuButton::AnnotationMenuButton( sw::sidebarwindows::SwSidebarWin& rSidebarWin ) @@ -83,20 +83,13 @@ void AnnotationMenuButton::MouseButtonDown( const MouseEvent& rMEvt ) if ( mrSidebarWin.IsReadOnly() ) { pButtonPopup->EnableItem( FN_REPLY, false ); - pButtonPopup->EnableItem( FN_DELETE_NOTE, false ); + pButtonPopup->EnableItem( FN_DELETE_COMMENT, false ); pButtonPopup->EnableItem( FN_DELETE_NOTE_AUTHOR, false ); pButtonPopup->EnableItem( FN_DELETE_ALL_NOTES, false ); } else { - if ( mrSidebarWin.IsProtected() ) - { - pButtonPopup->EnableItem( FN_DELETE_NOTE, false ); - } - else - { - pButtonPopup->EnableItem( FN_DELETE_NOTE, true ); - } + pButtonPopup->EnableItem( FN_DELETE_COMMENT, !mrSidebarWin.IsProtected() ); pButtonPopup->EnableItem( FN_DELETE_NOTE_AUTHOR, true ); pButtonPopup->EnableItem( FN_DELETE_ALL_NOTES, true ); } @@ -204,7 +197,7 @@ void AnnotationMenuButton::Paint( const Rectangle& /*rRect*/ ) void AnnotationMenuButton::KeyInput( const KeyEvent& rKeyEvt ) { const KeyCode& rKeyCode = rKeyEvt.GetKeyCode(); - const USHORT nKey = rKeyCode.GetCode(); + const sal_uInt16 nKey = rKeyCode.GetCode(); if ( nKey == KEY_TAB ) { mrSidebarWin.ActivatePostIt(); diff --git a/sw/source/ui/docvw/AnnotationWin.cxx b/sw/source/ui/docvw/AnnotationWin.cxx index 7dfd298cfd..9cf7dd76d0 100644 --- a/sw/source/ui/docvw/AnnotationWin.cxx +++ b/sw/source/ui/docvw/AnnotationWin.cxx @@ -26,7 +26,6 @@ * ************************************************************************/ - #include "precompiled_sw.hxx" #include <AnnotationWin.hxx> @@ -60,8 +59,10 @@ #include <wrtsh.hxx> #include <docsh.hxx> #include <doc.hxx> +#include <IDocumentUndoRedo.hxx> #include <SwUndoField.hxx> + namespace sw { namespace annotation { SwAnnotationWin::SwAnnotationWin( SwEditWin& rEditWin, @@ -86,7 +87,7 @@ void SwAnnotationWin::SetPostItText() { // get text from SwPostItField and insert into our textview Engine()->SetModifyHdl( Link() ); - Engine()->EnableUndo( FALSE ); + Engine()->EnableUndo( sal_False ); mpFld = static_cast<SwPostItField*>(mpFmtFld->GetFld()); if( mpFld->GetTextObject() ) Engine()->SetText( *mpFld->GetTextObject() ); @@ -99,7 +100,7 @@ void SwAnnotationWin::SetPostItText() Engine()->ClearModifyFlag(); Engine()->GetUndoManager().Clear(); - Engine()->EnableUndo( TRUE ); + Engine()->EnableUndo( sal_True ); Engine()->SetModifyHdl( LINK( this, SwAnnotationWin, ModifyHdl ) ); Invalidate(); } @@ -114,7 +115,8 @@ void SwAnnotationWin::UpdateData() SwField* pOldField = mpFld->Copy(); mpFld->SetPar2(Engine()->GetEditEngine().GetText()); mpFld->SetTextObject(Engine()->CreateParaObject()); - DocView().GetDocShell()->GetDoc()->AppendUndo(new SwUndoFieldFromDoc(aPosition, *pOldField, *mpFld, 0, true)); + DocView().GetDocShell()->GetDoc()->GetIDocumentUndoRedo().AppendUndo( + new SwUndoFieldFromDoc(aPosition, *pOldField, *mpFld, 0, true)); delete pOldField; // so we get a new layout of notes (anchor position is still the same and we would otherwise not get one) Mgr().SetLayout(); @@ -244,7 +246,8 @@ void SwAnnotationWin::InitAnswer(OutlinerParaObject* pText) SwField* pOldField = mpFld->Copy(); mpFld->SetPar2(Engine()->GetEditEngine().GetText()); mpFld->SetTextObject(Engine()->CreateParaObject()); - DocView().GetDocShell()->GetDoc()->AppendUndo(new SwUndoFieldFromDoc(aPosition, *pOldField, *mpFld, 0, true)); + DocView().GetDocShell()->GetDoc()->GetIDocumentUndoRedo().AppendUndo( + new SwUndoFieldFromDoc(aPosition, *pOldField, *mpFld, 0, true)); delete pOldField; Engine()->SetModifyHdl( LINK( this, SwAnnotationWin, ModifyHdl ) ); Engine()->ClearModifyFlag(); @@ -254,8 +257,8 @@ void SwAnnotationWin::InitAnswer(OutlinerParaObject* pText) SvxLanguageItem SwAnnotationWin::GetLanguage(void) { // set initial language for outliner - USHORT nScriptType = SvtLanguageOptions::GetScriptTypeOfLanguage( mpFld->GetLanguage() ); - USHORT nLangWhichId = 0; + sal_uInt16 nScriptType = SvtLanguageOptions::GetScriptTypeOfLanguage( mpFld->GetLanguage() ); + sal_uInt16 nLangWhichId = 0; switch (nScriptType) { case SCRIPTTYPE_LATIN : nLangWhichId = EE_CHAR_LANGUAGE ; break; diff --git a/sw/source/ui/docvw/PostItMgr.cxx b/sw/source/ui/docvw/PostItMgr.cxx index 7dcdad761e..9363fd1328 100644 --- a/sw/source/ui/docvw/PostItMgr.cxx +++ b/sw/source/ui/docvw/PostItMgr.cxx @@ -60,7 +60,6 @@ #include <redline.hxx> #include <docary.hxx> #include <SwRewriter.hxx> -#include <undobj.hxx> #include <tools/color.hxx> #include <swmodule.hxx> @@ -363,8 +362,8 @@ void SwPostItMgr::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) { if ((*i)->pPostIt) { - USHORT nScriptType = SvtLanguageOptions::GetScriptTypeOfLanguage( (*i)->GetFmtFld()->GetFld()->GetLanguage() ); - USHORT nLangWhichId = 0; + sal_uInt16 nScriptType = SvtLanguageOptions::GetScriptTypeOfLanguage( (*i)->GetFmtFld()->GetFld()->GetLanguage() ); + sal_uInt16 nLangWhichId = 0; switch (nScriptType) { case SCRIPTTYPE_LATIN : nLangWhichId = EE_CHAR_LANGUAGE ; break; @@ -892,7 +891,7 @@ void SwPostItMgr::MakeVisible(const SwSidebarWin* pPostIt,long aPage ) mpWrtShell->MakeVisible(SwRect(mpEditWin->PixelToLogic(aNoteRect))); } -bool SwPostItMgr::ArrowEnabled(USHORT aDirection,unsigned long aPage) const +bool SwPostItMgr::ArrowEnabled(sal_uInt16 aDirection,unsigned long aPage) const { switch (aDirection) { @@ -908,7 +907,7 @@ bool SwPostItMgr::ArrowEnabled(USHORT aDirection,unsigned long aPage) const } } -Color SwPostItMgr::GetArrowColor(USHORT aDirection,unsigned long aPage) const +Color SwPostItMgr::GetArrowColor(sal_uInt16 aDirection,unsigned long aPage) const { if (ArrowEnabled(aDirection,aPage)) { @@ -1164,7 +1163,7 @@ void SwPostItMgr::Delete(String aAuthor) mpWrtShell->GotoField( *(*i) ); mpWrtShell->DelRight(); } - mpWrtShell->EndUndo( UNDO_DELETE ); + mpWrtShell->EndUndo(); PrepareView(); mpWrtShell->EndAllAction(); mbLayout = true; @@ -1193,7 +1192,7 @@ void SwPostItMgr::Delete() mpWrtShell->DelRight(); } - mpWrtShell->EndUndo( UNDO_DELETE ); + mpWrtShell->EndUndo(); PrepareView(); mpWrtShell->EndAllAction(); mbLayout = true; @@ -1266,7 +1265,7 @@ sw::annotation::SwAnnotationWin* SwPostItMgr::GetAnnotationWin(const SwPostItFie return NULL; } -SwSidebarWin* SwPostItMgr::GetNextPostIt( USHORT aDirection, +SwSidebarWin* SwPostItMgr::GetNextPostIt( sal_uInt16 aDirection, SwSidebarWin* aPostIt ) { if (mvPostItFlds.size()>1) diff --git a/sw/source/ui/docvw/SidebarTxtControl.cxx b/sw/source/ui/docvw/SidebarTxtControl.cxx index 8389c2f788..8d5b369933 100644 --- a/sw/source/ui/docvw/SidebarTxtControl.cxx +++ b/sw/source/ui/docvw/SidebarTxtControl.cxx @@ -62,7 +62,6 @@ #include <wrtsh.hxx> #include <shellres.hxx> #include <SwRewriter.hxx> -#include <undobj.hxx> namespace css = ::com::sun::star; @@ -114,7 +113,7 @@ void SidebarTxtControl::LoseFocus() void SidebarTxtControl::RequestHelp(const HelpEvent &rEvt) { - USHORT nResId = 0; + sal_uInt16 nResId = 0; switch( mrSidebarWin.GetLayoutStatus() ) { case SwPostItHelper::INSERTED: nResId = STR_REDLINE_INSERT; break; @@ -179,7 +178,7 @@ void SidebarTxtControl::Paint( const Rectangle& rRect) void SidebarTxtControl::KeyInput( const KeyEvent& rKeyEvt ) { const KeyCode& rKeyCode = rKeyEvt.GetKeyCode(); - USHORT nKey = rKeyCode.GetCode(); + sal_uInt16 nKey = rKeyCode.GetCode(); if ( ( rKeyCode.IsMod1() && rKeyCode.IsMod2() ) && ( (nKey == KEY_PAGEUP) || (nKey == KEY_PAGEDOWN) ) ) { @@ -234,7 +233,7 @@ void SidebarTxtControl::KeyInput( const KeyEvent& rKeyEvt ) } } - mrDocView.GetViewFrame()->GetBindings().InvalidateAll(FALSE); + mrDocView.GetViewFrame()->GetBindings().InvalidateAll(sal_False); } void SidebarTxtControl::MouseMove( const MouseEvent& rMEvt ) @@ -301,7 +300,7 @@ void SidebarTxtControl::MouseButtonDown( const MouseEvent& rMEvt ) { GetTextView()->MouseButtonDown( rMEvt ); } - mrDocView.GetViewFrame()->GetBindings().InvalidateAll(FALSE); + mrDocView.GetViewFrame()->GetBindings().InvalidateAll(sal_False); } void SidebarTxtControl::MouseButtonUp( const MouseEvent& rMEvt ) @@ -331,7 +330,7 @@ void SidebarTxtControl::Command( const CommandEvent& rCEvt ) { if ( !mrSidebarWin.IsProtected() && GetTextView() && - GetTextView()->IsWrongSpelledWordAtPos( rCEvt.GetMousePosPixel(),TRUE )) + GetTextView()->IsWrongSpelledWordAtPos( rCEvt.GetMousePosPixel(),sal_True )) { Link aLink = LINK(this, SidebarTxtControl, OnlineSpellCallback); GetTextView()->ExecuteSpellPopup(rCEvt.GetMousePosPixel(),&aLink); diff --git a/sw/source/ui/docvw/SidebarTxtControlAcc.cxx b/sw/source/ui/docvw/SidebarTxtControlAcc.cxx index 9197cacf01..52ddacabb3 100644 --- a/sw/source/ui/docvw/SidebarTxtControlAcc.cxx +++ b/sw/source/ui/docvw/SidebarTxtControlAcc.cxx @@ -78,7 +78,7 @@ class SidebarTextEditSource : public SvxEditSource, SidebarTextEditSource::SidebarTextEditSource( SidebarTxtControl& rSidebarTxtControl ) : SvxEditSource() , mrSidebarTxtControl( rSidebarTxtControl ) - , mTextForwarder( *(rSidebarTxtControl.GetTextView()->GetOutliner()), FALSE ) + , mTextForwarder( *(rSidebarTxtControl.GetTextView()->GetOutliner()), sal_False ) , mViewForwarder( *(rSidebarTxtControl.GetTextView()) ) { if ( mrSidebarTxtControl.GetTextView() ) diff --git a/sw/source/ui/docvw/SidebarWin.cxx b/sw/source/ui/docvw/SidebarWin.cxx index 8bb1f90db3..d521b651a0 100644 --- a/sw/source/ui/docvw/SidebarWin.cxx +++ b/sw/source/ui/docvw/SidebarWin.cxx @@ -332,7 +332,7 @@ void SwSidebarWin::InitControls() SwDocShell* aShell = mrView.GetDocShell(); mpOutliner = new Outliner(&aShell->GetPool(),OUTLINERMODE_TEXTOBJECT); aShell->GetDoc()->SetCalcFieldValueHdl( mpOutliner ); - mpOutliner->SetUpdateMode( TRUE ); + mpOutliner->SetUpdateMode( sal_True ); Rescale(); mpOutlinerView = new OutlinerView ( mpOutliner, mpSidebarTxtControl ); @@ -355,7 +355,7 @@ void SwSidebarWin::InitControls() mpVScrollbar->AddEventListener( LINK( this, SwSidebarWin, WindowEventListener ) ); const SwViewOption* pVOpt = mrView.GetWrtShellPtr()->GetViewOptions(); - ULONG nCntrl = mpOutliner->GetControlWord(); + sal_uLong nCntrl = mpOutliner->GetControlWord(); // TODO: crash when AUTOCOMPLETE enabled nCntrl |= EE_CNTRL_MARKFIELDS | EE_CNTRL_PASTESPECIAL | EE_CNTRL_AUTOCORRECT | EV_CNTRL_AUTOSCROLL | EE_CNTRL_URLSFXEXECUTE; // | EE_CNTRL_AUTOCOMPLETE; if (pVOpt->IsFieldShadings()) @@ -771,7 +771,7 @@ void SwSidebarWin::SetSidebarPosition(sw::sidebarwindows::SidebarPosition eSideb meSidebarPosition = eSidebarPosition; } -void SwSidebarWin::SetReadonly(BOOL bSet) +void SwSidebarWin::SetReadonly(sal_Bool bSet) { mbReadonly = bSet; GetOutlinerView()->SetReadOnly(bSet); @@ -783,7 +783,7 @@ void SwSidebarWin::SetLanguage(const SvxLanguageItem aNewItem) Engine()->SetModifyHdl( Link() ); ESelection aOld = GetOutlinerView()->GetSelection(); - ESelection aNewSelection( 0, 0, (USHORT)Engine()->GetParagraphCount()-1, USHRT_MAX ); + ESelection aNewSelection( 0, 0, (sal_uInt16)Engine()->GetParagraphCount()-1, USHRT_MAX ); GetOutlinerView()->SetSelection( aNewSelection ); SfxItemSet aEditAttr(GetOutlinerView()->GetAttribs()); aEditAttr.Put(aNewItem); @@ -793,7 +793,7 @@ void SwSidebarWin::SetLanguage(const SvxLanguageItem aNewItem) Engine()->SetModifyHdl( pLink ); const SwViewOption* pVOpt = mrView.GetWrtShellPtr()->GetViewOptions(); - ULONG nCntrl = Engine()->GetControlWord(); + sal_uLong nCntrl = Engine()->GetControlWord(); // turn off if (!pVOpt->IsOnlineSpell()) nCntrl &= ~EE_CNTRL_ONLINESPELLING; @@ -913,7 +913,7 @@ void SwSidebarWin::ToggleInsMode() } } -void SwSidebarWin::ExecuteCommand(USHORT nSlot) +void SwSidebarWin::ExecuteCommand(sal_uInt16 nSlot) { mrMgr.AssureStdModeAtShell(); @@ -936,7 +936,6 @@ void SwSidebarWin::ExecuteCommand(USHORT nSlot) break; } case FN_DELETE_COMMENT: - case FN_DELETE_NOTE: //Delete(); // do not kill the parent of our open popup menu mnEventId = Application::PostUserEvent( LINK( this, SwSidebarWin, DeleteHdl), 0 ); @@ -972,7 +971,7 @@ long SwSidebarWin::GetPostItTextHeight() return mpOutliner ? LogicToPixel(mpOutliner->CalcTextSize()).Height() : 0; } -void SwSidebarWin::SwitchToPostIt(USHORT aDirection) +void SwSidebarWin::SwitchToPostIt(sal_uInt16 aDirection) { SwSidebarWin* pPostIt = mrMgr.GetNextPostIt(aDirection, this); if (pPostIt) @@ -1012,8 +1011,8 @@ IMPL_LINK( SwSidebarWin, WindowEventListener, VclSimpleEvent*, pEvent ) else if ( pWinEvent->GetId() == VCLEVENT_WINDOW_ACTIVATE && pWinEvent->GetWindow() == mpSidebarTxtControl ) { - const BOOL bLockView = mrView.GetWrtShell().IsViewLocked(); - mrView.GetWrtShell().LockView( TRUE ); + const sal_Bool bLockView = mrView.GetWrtShell().IsViewLocked(); + mrView.GetWrtShell().LockView( sal_True ); if ( !IsPreview() ) { @@ -1069,8 +1068,8 @@ IMPL_LINK(SwSidebarWin, DeleteHdl, void*, EMPTYARG) void SwSidebarWin::ResetAttributes() { - mpOutlinerView->RemoveAttribsKeepLanguages(TRUE); - mpOutliner->RemoveFields(TRUE); + mpOutlinerView->RemoveAttribsKeepLanguages(sal_True); + mpOutliner->RemoveFields(sal_True); mpOutlinerView->SetAttribs(DefaultItem()); } @@ -1108,7 +1107,7 @@ sal_Int32 SwSidebarWin::GetMinimumSizeWithoutMeta() void SwSidebarWin::SetSpellChecking() { const SwViewOption* pVOpt = mrView.GetWrtShellPtr()->GetViewOptions(); - ULONG nCntrl = mpOutliner->GetControlWord(); + sal_uLong nCntrl = mpOutliner->GetControlWord(); if (pVOpt->IsOnlineSpell()) nCntrl |= EE_CNTRL_ONLINESPELLING; else @@ -1204,7 +1203,7 @@ void SwSidebarWin::SwitchToFieldPos() GotoPos(); sal_uInt32 aCount = MoveCaret(); if (aCount) - mrView.GetDocShell()->GetWrtShell()->SwCrsrShell::Right(aCount, 0, FALSE); + mrView.GetDocShell()->GetWrtShell()->SwCrsrShell::Right(aCount, 0, sal_False); GrabFocusToDocument(); } diff --git a/sw/source/ui/docvw/access.src b/sw/source/ui/docvw/access.src index 42081d3ab7..d455c01d0c 100644 --- a/sw/source/ui/docvw/access.src +++ b/sw/source/ui/docvw/access.src @@ -100,3 +100,22 @@ String STR_ACCESS_ANNOTATION_BUTTON_DESC Text [ en-US ] = "Activate this button to open a list of actions which can be performed on this comment and other comments"; }; +//IAccessibility2 Implementation 2009----- +String STR_ACCESS_PREVIEW_DOC_NAME +{ + Text [ en-US ] = "Document preview"; +}; +String STR_ACCESS_PREVIEW_DOC_SUFFIX +{ + Text [ en-US ] = "(Preview mode)"; +}; +String STR_ACCESS_DOC_WORDPROCESSING +{ + Text [ en-US ] = "%PRODUCTNAME Document"; +}; +String STR_ACCESS_DOC_WORDPROCESSING_READONLY +{ + Text [ en-US ] = "(read-only)"; +}; +//-----IAccessibility2 Implementation 2009 + diff --git a/sw/source/ui/docvw/docvw.src b/sw/source/ui/docvw/docvw.src index 658690396b..b4f57bbcc2 100644 --- a/sw/source/ui/docvw/docvw.src +++ b/sw/source/ui/docvw/docvw.src @@ -36,56 +36,56 @@ Menu MN_READONLY_POPUP MenuItem { Identifier = MN_READONLY_OPENURL ; - HelpID = SID_OPENDOC ; + HelpId = CMD_SID_OPENDOC ; Text [ en-US ] = "~Open" ; }; MenuItem { Identifier = MN_READONLY_OPENURLNEW ; - HelpID = SID_OPENDOC ; + HelpId = CMD_SID_OPENDOC ; Text [ en-US ] = "Open in New Window" ; }; MenuItem { Identifier = MN_READONLY_EDITDOC ; - HelpID = SID_EDITDOC ; + HelpId = CMD_SID_EDITDOC ; Text [ en-US ] = "~Edit" ; }; MenuItem { Identifier = MN_READONLY_SELECTION_MODE ; - HelpID = FN_READONLY_SELECTION_MODE ; + HelpId = CMD_FN_READONLY_SELECTION_MODE ; Text [ en-US ] = "Select Text"; }; MenuItem { Identifier = MN_READONLY_RELOAD; - HelpID = SID_RELOAD; + HelpId = CMD_SID_RELOAD; Text [ en-US ] = "Re~load"; }; MenuItem { Identifier = MN_READONLY_RELOAD_FRAME; - HelpID = SID_RELOAD; + HelpId = CMD_SID_RELOAD; Text [ en-US ] = "Reload Frame"; }; MenuItem { Identifier = MN_READONLY_SOURCEVIEW ; - HelpID = HID_SOURCEVIEW ; + HelpId = HID_SOURCEVIEW ; Text [ en-US ] = "HT~ML Source" ; }; SEPARATOR MenuItem { Identifier = MN_READONLY_BROWSE_BACKWARD ; - HelpID = SID_BROWSE_BACKWARD ; + HelpId = CMD_SID_BROWSE_BACKWARD ; Text [ en-US ] = "Backwards" ; }; MenuItem { Identifier = MN_READONLY_BROWSE_FORWARD ; - HelpID = SID_BROWSE_FORWARD ; + HelpId = CMD_SID_BROWSE_FORWARD ; Text [ en-US ] = "~Forward" ; }; SEPARATOR @@ -187,14 +187,14 @@ Menu MN_READONLY_POPUP MenuItem { Identifier = SID_WIN_FULLSCREEN; - HelpID = SID_WIN_FULLSCREEN; + HelpId = CMD_SID_WIN_FULLSCREEN; Text [ en-US ] = "Leave Full-Screen Mode" ; }; SEPARATOR MenuItem { Identifier = MN_READONLY_COPY ; - HelpID = SID_COPY; + HelpId = CMD_SID_COPY; Text [ en-US ] = "~Copy" ; }; }; diff --git a/sw/source/ui/docvw/edtdd.cxx b/sw/source/ui/docvw/edtdd.cxx index 1f2112d345..a9bde42a20 100644 --- a/sw/source/ui/docvw/edtdd.cxx +++ b/sw/source/ui/docvw/edtdd.cxx @@ -57,27 +57,27 @@ using namespace ::com::sun::star; // no include "dbgoutsw.hxx" here!!!!!! -extern BOOL bNoInterrupt; -extern BOOL bFrmDrag; -extern BOOL bDDTimerStarted; +extern sal_Bool bNoInterrupt; +extern sal_Bool bFrmDrag; +extern sal_Bool bDDTimerStarted; -BOOL bExecuteDrag = FALSE; +sal_Bool bExecuteDrag = sal_False; void SwEditWin::StartDDTimer() { aTimer.SetTimeoutHdl(LINK(this, SwEditWin, DDHandler)); aTimer.SetTimeout(480); aTimer.Start(); - bDDTimerStarted = TRUE; + bDDTimerStarted = sal_True; } void SwEditWin::StopDDTimer(SwWrtShell *pSh, const Point &rPt) { aTimer.Stop(); - bDDTimerStarted = FALSE; + bDDTimerStarted = sal_False; if(!pSh->IsSelFrmMode()) - (pSh->*pSh->fnSetCrsr)(&rPt,FALSE); + (pSh->*pSh->fnSetCrsr)(&rPt,sal_False); aTimer.SetTimeoutHdl(LINK(this,SwEditWin, TimerHandler)); } @@ -86,36 +86,36 @@ void SwEditWin::StartDrag( sal_Int8 /*nAction*/, const Point& rPosPixel ) SwWrtShell &rSh = rView.GetWrtShell(); if( rSh.GetDrawView() ) { - CommandEvent aDragEvent( rPosPixel, COMMAND_STARTDRAG, TRUE ); + CommandEvent aDragEvent( rPosPixel, COMMAND_STARTDRAG, sal_True ); if( rSh.GetDrawView()->Command( aDragEvent, this ) ) { - rView.GetViewFrame()->GetBindings().InvalidateAll(FALSE); + rView.GetViewFrame()->GetBindings().InvalidateAll(sal_False); return; // Event von der SdrView ausgewertet } } if ( !pApplyTempl && !rSh.IsDrawCreate() && !IsDrawAction()) { - BOOL bStart = FALSE, bDelSelect = FALSE; + sal_Bool bStart = sal_False, bDelSelect = sal_False; SdrObject *pObj = NULL; Point aDocPos( PixelToLogic( rPosPixel ) ); - if ( !rSh.IsInSelect() && rSh.ChgCurrPam( aDocPos, TRUE, TRUE)) + if ( !rSh.IsInSelect() && rSh.ChgCurrPam( aDocPos, sal_True, sal_True)) //We are not selecting and aren't at a selection - bStart = TRUE; + bStart = sal_True; else if ( !bFrmDrag && rSh.IsSelFrmMode() && rSh.IsInsideSelectedObj( aDocPos ) ) { //We are not dragging internally and are not at an //object (frame, draw object) - bStart = TRUE; + bStart = sal_True; } else if( !bFrmDrag && rView.GetDocShell()->IsReadOnly() && OBJCNT_NONE != rSh.GetObjCntType( aDocPos, pObj )) { rSh.LockPaint(); if( rSh.SelectObj( aDocPos, 0, pObj )) - bStart = bDelSelect = TRUE; + bStart = bDelSelect = sal_True; else rSh.UnlockPaint(); } @@ -124,15 +124,15 @@ void SwEditWin::StartDrag( sal_Int8 /*nAction*/, const Point& rPosPixel ) SwContentAtPos aSwContentAtPos( SwContentAtPos::SW_INETATTR ); bStart = rSh.GetContentAtPos( aDocPos, aSwContentAtPos, - FALSE ); + sal_False ); } if ( bStart && !bIsInDrag ) { - bMBPressed = FALSE; + bMBPressed = sal_False; ReleaseMouse(); - bFrmDrag = FALSE; - bExecuteDrag = TRUE; + bFrmDrag = sal_False; + bExecuteDrag = sal_True; SwEditWin::nDDStartPosY = aDocPos.Y(); SwEditWin::nDDStartPosX = aDocPos.X(); aMovePos = aDocPos; @@ -151,7 +151,7 @@ void SwEditWin::StartExecuteDrag() if( !bExecuteDrag || bIsInDrag ) return; - bIsInDrag = TRUE; + bIsInDrag = sal_True; SwTransferable* pTransfer = new SwTransferable( rView.GetWrtShell() ); uno::Reference< @@ -164,7 +164,7 @@ void SwEditWin::DragFinished() { DropCleanup(); aTimer.SetTimeoutHdl( LINK(this,SwEditWin, TimerHandler) ); - bIsInDrag = FALSE; + bIsInDrag = sal_False; } @@ -173,11 +173,11 @@ void SwEditWin::DropCleanup() SwWrtShell &rSh = rView.GetWrtShell(); // reset statuses - bNoInterrupt = FALSE; + bNoInterrupt = sal_False; if ( bOldIdleSet ) { ((SwViewOption*)rSh.GetViewOptions())->SetIdle( bOldIdle ); - bOldIdleSet = FALSE; + bOldIdleSet = sal_False; } if ( pUserMarker ) CleanupDropUserMarker(); @@ -238,7 +238,7 @@ sal_Int8 SwEditWin::ExecuteDrop( const ExecuteDropEvent& rEvt ) // (according to KA due to Java D&D), we'll have to // reevaluate the drop action once more _with_ the // Transferable. - USHORT nEventAction; + sal_uInt16 nEventAction; sal_Int8 nUserOpt = rEvt.mbDefault ? EXCHG_IN_ACTION_DEFAULT : rEvt.mnAction; m_nDropAction = SotExchange::GetExchangeAction( @@ -252,17 +252,17 @@ sal_Int8 SwEditWin::ExecuteDrop( const ExecuteDropEvent& rEvt ) TransferableDataHelper aData( rEvt.maDropEvent.Transferable ); nRet = rEvt.mnAction; if( !SwTransferable::PasteData( aData, rSh, m_nDropAction, m_nDropFormat, - m_nDropDestination, FALSE, rEvt.mbDefault, &aDocPt, nRet)) + m_nDropDestination, sal_False, rEvt.mbDefault, &aDocPt, nRet)) nRet = DND_ACTION_NONE; else if ( SW_MOD()->pDragDrop ) //Don't clean up anymore at internal D&D! - SW_MOD()->pDragDrop->SetCleanUp( FALSE ); + SW_MOD()->pDragDrop->SetCleanUp( sal_False ); return nRet; } -USHORT SwEditWin::GetDropDestination( const Point& rPixPnt, SdrObject ** ppObj ) +sal_uInt16 SwEditWin::GetDropDestination( const Point& rPixPnt, SdrObject ** ppObj ) { SwWrtShell &rSh = rView.GetWrtShell(); const Point aDocPt( PixelToLogic( rPixPnt ) ); @@ -287,7 +287,7 @@ USHORT SwEditWin::GetDropDestination( const Point& rPixPnt, SdrObject ** ppObj ) } //What do we want to drop on now? - USHORT nDropDestination = 0; + sal_uInt16 nDropDestination = 0; //Did anything else arrive from the DrawingEngine? if( OBJCNT_NONE != eType ) @@ -296,7 +296,7 @@ USHORT SwEditWin::GetDropDestination( const Point& rPixPnt, SdrObject ** ppObj ) { case OBJCNT_GRF: { - BOOL bLink, + sal_Bool bLink, bIMap = 0 != rSh.GetFmtFromObj( aDocPt )->GetURL().GetMap(); String aDummy; rSh.GetGrfAtPos( aDocPt, aDummy, bLink ); @@ -362,14 +362,14 @@ sal_Int8 SwEditWin::AcceptDrop( const AcceptDropEvent& rEvt ) aWin.Right() -= nMargin; aWin.Bottom() -= nMargin; if(!aWin.IsInside(aPixPt)) { - static ULONG last_tick = 0; - ULONG current_tick = Time::GetSystemTicks(); + static sal_uLong last_tick = 0; + sal_uLong current_tick = Time::GetSystemTicks(); if((current_tick-last_tick) > 500) { last_tick = current_tick; if(!bOldIdleSet) { bOldIdle = rSh.GetViewOptions()->IsIdle(); - ((SwViewOption *)rSh.GetViewOptions())->SetIdle(FALSE); - bOldIdleSet = TRUE; + ((SwViewOption *)rSh.GetViewOptions())->SetIdle(sal_False); + bOldIdleSet = sal_True; } CleanupDropUserMarker(); if(aPixPt.X() > aWin.Right()) aPixPt.X() += nMargin; @@ -384,7 +384,7 @@ sal_Int8 SwEditWin::AcceptDrop( const AcceptDropEvent& rEvt ) if(bOldIdleSet) { ((SwViewOption *)rSh.GetViewOptions())->SetIdle( bOldIdle ); - bOldIdleSet = FALSE; + bOldIdleSet = sal_False; } SdrObject *pObj = NULL; @@ -392,7 +392,7 @@ sal_Int8 SwEditWin::AcceptDrop( const AcceptDropEvent& rEvt ) if( !m_nDropDestination ) return DND_ACTION_NONE; - USHORT nEventAction; + sal_uInt16 nEventAction; sal_Int8 nUserOpt = rEvt.mbDefault ? EXCHG_IN_ACTION_DEFAULT : rEvt.mnAction; @@ -410,21 +410,21 @@ sal_Int8 SwEditWin::AcceptDrop( const AcceptDropEvent& rEvt ) SwModule *pMod = SW_MOD(); if( pMod->pDragDrop ) { - BOOL bCleanup = FALSE; + sal_Bool bCleanup = sal_False; //Drawing objects in Headers/Footers are not allowed SwWrtShell *pSrcSh = pMod->pDragDrop->GetShell(); if( (pSrcSh->GetSelFrmType() == FRMTYPE_DRAWOBJ) && pSrcSh->IsSelContainsControl() && - (rSh.GetFrmType( &aDocPt, FALSE ) & (FRMTYPE_HEADER|FRMTYPE_FOOTER)) ) + (rSh.GetFrmType( &aDocPt, sal_False ) & (FRMTYPE_HEADER|FRMTYPE_FOOTER)) ) { - bCleanup = TRUE; + bCleanup = sal_True; } // don't more position protected objects! else if( DND_ACTION_MOVE == rEvt.mnAction && pSrcSh->IsSelObjProtected( FLYPROTECT_POS ) ) { - bCleanup = TRUE; + bCleanup = sal_True; } else if( rEvt.mbDefault ) { @@ -496,16 +496,16 @@ sal_Int8 SwEditWin::AcceptDrop( const AcceptDropEvent& rEvt ) IMPL_LINK( SwEditWin, DDHandler, Timer *, EMPTYARG ) { - bDDTimerStarted = FALSE; + bDDTimerStarted = sal_False; aTimer.Stop(); aTimer.SetTimeout(240); - bMBPressed = FALSE; + bMBPressed = sal_False; ReleaseMouse(); - bFrmDrag = FALSE; + bFrmDrag = sal_False; if ( rView.GetViewFrame() ) { - bExecuteDrag = TRUE; + bExecuteDrag = sal_True; StartExecuteDrag(); } return 0; diff --git a/sw/source/ui/docvw/edtwin.cxx b/sw/source/ui/docvw/edtwin.cxx index 97614ab6bd..5e1565169d 100644 --- a/sw/source/ui/docvw/edtwin.cxx +++ b/sw/source/ui/docvw/edtwin.cxx @@ -147,22 +147,22 @@ using namespace ::com::sun::star; --------------------------------------------------------------------*/ static bool bInputLanguageSwitched = false; -extern BOOL bNoInterrupt; // in mainwn.cxx +extern sal_Bool bNoInterrupt; // in mainwn.cxx // Usually in MouseButtonUp a selection is revoked when the selection is // not currently being pulled open. Unfortunately in MouseButtonDown there // is being selected at double/triple click. That selection is completely // finished in the Handler and thus can't be distinguished in the Up. // To resolve this bHoldSelection is set in Down at evaluated in Up. -static BOOL bHoldSelection = FALSE; - -BOOL bFrmDrag = FALSE; -BOOL bValidCrsrPos = FALSE; -BOOL bModePushed = FALSE; -BOOL bDDTimerStarted = FALSE; -BOOL bFlushCharBuffer = FALSE; -BOOL SwEditWin::bReplaceQuote = FALSE; -BOOL bDDINetAttr = FALSE; +static sal_Bool bHoldSelection = sal_False; + +sal_Bool bFrmDrag = sal_False; +sal_Bool bValidCrsrPos = sal_False; +sal_Bool bModePushed = sal_False; +sal_Bool bDDTimerStarted = sal_False; +sal_Bool bFlushCharBuffer = sal_False; +sal_Bool SwEditWin::bReplaceQuote = sal_False; +sal_Bool bDDINetAttr = sal_False; SdrHdlKind eSdrMoveHdl = HDL_USER; QuickHelpData* SwEditWin::pQuickHlpData = 0; @@ -171,9 +171,9 @@ long SwEditWin::nDDStartPosY = 0; long SwEditWin::nDDStartPosX = 0; Color SwEditWin::aTextBackColor(COL_YELLOW); Color SwEditWin::aTextColor(COL_RED); -BOOL SwEditWin::bTransparentBackColor = FALSE; // background not transparent +sal_Bool SwEditWin::bTransparentBackColor = sal_False; // background not transparent -extern BOOL bExecuteDrag; +extern sal_Bool bExecuteDrag; SfxShell* lcl_GetShellFromDispatcher( SwView& rView, TypeId nType ); @@ -226,27 +226,27 @@ public: struct QuickHelpData { SvStringsISortDtor aArr; - USHORT* pAttrs; + sal_uInt16* pAttrs; CommandExtTextInputData* pCETID; - ULONG nTipId; - USHORT nLen, nCurArrPos; - BOOL bClear : 1, bChkInsBlank : 1, bIsTip : 1, bIsAutoText : 1; + sal_uLong nTipId; + sal_uInt16 nLen, nCurArrPos; + sal_Bool bClear : 1, bChkInsBlank : 1, bIsTip : 1, bIsAutoText : 1; QuickHelpData() : pAttrs( 0 ), pCETID( 0 ) { ClearCntnt(); } void Move( QuickHelpData& rCpy ); void ClearCntnt(); - void Start( SwWrtShell& rSh, USHORT nWrdLen ); + void Start( SwWrtShell& rSh, sal_uInt16 nWrdLen ); void Stop( SwWrtShell& rSh ); - BOOL HasCntnt() const { return aArr.Count() && 0 != nLen; } + sal_Bool HasCntnt() const { return aArr.Count() && 0 != nLen; } - void Inc( BOOL bEndLess ) + void Inc( sal_Bool bEndLess ) { if( ++nCurArrPos >= aArr.Count() ) nCurArrPos = (bEndLess && !bIsAutoText )? 0 : nCurArrPos-1; } - void Dec( BOOL bEndLess ) + void Dec( sal_Bool bEndLess ) { if( 0 == nCurArrPos-- ) nCurArrPos = (bEndLess && !bIsAutoText ) ? aArr.Count()-1 : 0; @@ -261,7 +261,7 @@ struct QuickHelpData #define HIT_PIX 2 /* hit tolerance in pixel */ #define MIN_MOVE 4 -inline BOOL IsMinMove(const Point &rStartPos, const Point &rLPt) +inline sal_Bool IsMinMove(const Point &rStartPos, const Point &rLPt) { return Abs(rStartPos.X() - rLPt.X()) > MIN_MOVE || Abs(rStartPos.Y() - rLPt.Y()) > MIN_MOVE; @@ -273,9 +273,9 @@ inline BOOL IsMinMove(const Point &rStartPos, const Point &rLPt) in selecting, with DrawObjects; at SwgFlys to trigger hyperlinks if applicable (DownLoad/NewWindow!) --------------------------------------------------------------------*/ -inline BOOL IsDrawObjSelectable( const SwWrtShell& rSh, const Point& rPt ) +inline sal_Bool IsDrawObjSelectable( const SwWrtShell& rSh, const Point& rPt ) { - BOOL bRet = TRUE; + sal_Bool bRet = sal_True; SdrObject* pObj; switch( rSh.GetObjCntType( rPt, pObj )) { @@ -283,7 +283,7 @@ inline BOOL IsDrawObjSelectable( const SwWrtShell& rSh, const Point& rPt ) case OBJCNT_FLY: case OBJCNT_GRF: case OBJCNT_OLE: - bRet = FALSE; + bRet = sal_False; break; default:; //prevent warning } @@ -294,7 +294,7 @@ inline BOOL IsDrawObjSelectable( const SwWrtShell& rSh, const Point& rPt ) Description: switch pointer --------------------------------------------------------------------*/ -void SwEditWin::UpdatePointer(const Point &rLPt, USHORT nModifier ) +void SwEditWin::UpdatePointer(const Point &rLPt, sal_uInt16 nModifier ) { SwWrtShell &rSh = rView.GetWrtShell(); if( pApplyTempl ) @@ -377,43 +377,43 @@ void SwEditWin::UpdatePointer(const Point &rLPt, USHORT nModifier ) return; } - BOOL bExecHyperlinks = rView.GetDocShell()->IsReadOnly(); + sal_Bool bExecHyperlinks = rView.GetDocShell()->IsReadOnly(); if ( !bExecHyperlinks ) { SvtSecurityOptions aSecOpts; - const BOOL bSecureOption = aSecOpts.IsOptionSet( SvtSecurityOptions::E_CTRLCLICK_HYPERLINK ); + const sal_Bool bSecureOption = aSecOpts.IsOptionSet( SvtSecurityOptions::E_CTRLCLICK_HYPERLINK ); if ( ( bSecureOption && nModifier == KEY_MOD1 ) || ( !bSecureOption && nModifier != KEY_MOD1 ) ) - bExecHyperlinks = TRUE; + bExecHyperlinks = sal_True; } - const BOOL bExecSmarttags = nModifier == KEY_MOD1; + const sal_Bool bExecSmarttags = nModifier == KEY_MOD1; SdrView *pSdrView = rSh.GetDrawView(); - BOOL bPrefSdrPointer = FALSE; - BOOL bHitHandle = FALSE; - BOOL bCntAtPos = FALSE; - BOOL bIsDocReadOnly = rView.GetDocShell()->IsReadOnly() && + sal_Bool bPrefSdrPointer = sal_False; + sal_Bool bHitHandle = sal_False; + sal_Bool bCntAtPos = sal_False; + sal_Bool bIsDocReadOnly = rView.GetDocShell()->IsReadOnly() && rSh.IsCrsrReadonly(); aActHitType = SDRHIT_NONE; PointerStyle eStyle = POINTER_TEXT; if ( !pSdrView ) - bCntAtPos = TRUE; - else if ( TRUE == (bHitHandle = pSdrView->PickHandle( rLPt ) != 0) ) + bCntAtPos = sal_True; + else if ( sal_True == (bHitHandle = pSdrView->PickHandle( rLPt ) != 0) ) { aActHitType = SDRHIT_OBJECT; - bPrefSdrPointer = TRUE; + bPrefSdrPointer = sal_True; } else { - const BOOL bNotInSelObj = !rSh.IsInsideSelectedObj( rLPt ); + const sal_Bool bNotInSelObj = !rSh.IsInsideSelectedObj( rLPt ); if ( rView.GetDrawFuncPtr() && !bInsDraw && bNotInSelObj ) { aActHitType = SDRHIT_OBJECT; if (IsObjectSelect()) eStyle = POINTER_ARROW; else - bPrefSdrPointer = TRUE; + bPrefSdrPointer = sal_True; } else { @@ -438,7 +438,7 @@ void SwEditWin::UpdatePointer(const Point &rLPt, USHORT nModifier ) if (pSdrView->IsTextEdit()) { aActHitType = SDRHIT_NONE; - bPrefSdrPointer = TRUE; + bPrefSdrPointer = sal_True; } else { @@ -448,7 +448,7 @@ void SwEditWin::UpdatePointer(const Point &rLPt, USHORT nModifier ) if (eHit == SDRHIT_URLFIELD && bExecHyperlinks) { aActHitType = SDRHIT_OBJECT; - bPrefSdrPointer = TRUE; + bPrefSdrPointer = sal_True; } else { @@ -487,9 +487,9 @@ void SwEditWin::UpdatePointer(const Point &rLPt, USHORT nModifier ) else { if ( rView.GetDrawFuncPtr() ) - bPrefSdrPointer = TRUE; + bPrefSdrPointer = sal_True; else - bCntAtPos = TRUE; + bCntAtPos = sal_True; } } } @@ -552,7 +552,7 @@ IMPL_LINK( SwEditWin, TimerHandler, Timer *, EMPTYARG ) SwWrtShell &rSh = rView.GetWrtShell(); Point aModPt( aMovePos ); const SwRect aOldVis( rSh.VisArea() ); - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; if ( !rSh.VisArea().IsInside( aModPt ) ) { @@ -560,12 +560,12 @@ IMPL_LINK( SwEditWin, TimerHandler, Timer *, EMPTYARG ) { const int nMaxScroll = 40; rView.Scroll( Rectangle(aModPt,Size(1,1)), nMaxScroll, nMaxScroll); - bDone = TRUE; + bDone = sal_True; } else if ( bFrmDrag ) { - (rSh.*rSh.fnDrag)(&aModPt,FALSE); - bDone = TRUE; + (rSh.*rSh.fnDrag)(&aModPt,sal_False); + bDone = sal_True; } if ( !bDone ) aModPt = rSh.GetCntntPos( aModPt,aModPt.Y() > rSh.VisArea().Bottom() ); @@ -578,7 +578,7 @@ IMPL_LINK( SwEditWin, TimerHandler, Timer *, EMPTYARG ) rSh.SelectTableRowCol( *pRowColumnSelectionStart, &aPos, bIsRowDrag ); } else - (rSh.*rSh.fnSetCrsr)( &aModPt, FALSE ); + (rSh.*rSh.fnSetCrsr)( &aModPt, sal_False ); // It can be that a "jump" over a table cannot be accomplished like // that. So we jump over the table by Up/Down here. @@ -588,9 +588,9 @@ IMPL_LINK( SwEditWin, TimerHandler, Timer *, EMPTYARG ) // take the center point of VisArea to // decide in which direction the user want. if( aModPt.Y() < ( rVisArea.Top() + rVisArea.Height() / 2 ) ) - rSh.Up( TRUE, 1 ); + rSh.Up( sal_True, 1 ); else - rSh.Down( TRUE, 1 ); + rSh.Down( sal_True, 1 ); } } @@ -634,14 +634,14 @@ inline void SwEditWin::EnterArea() Description: insert mode for frames ------------------------------------------------------------------------*/ -void SwEditWin::InsFrm(USHORT nCols) +void SwEditWin::InsFrm(sal_uInt16 nCols) { - StdDrawMode( OBJ_NONE, FALSE ); - bInsFrm = TRUE; + StdDrawMode( OBJ_NONE, sal_False ); + bInsFrm = sal_True; nInsFrmColCount = nCols; } -void SwEditWin::StdDrawMode( SdrObjKind eSdrObjectKind, BOOL bObjSelect ) +void SwEditWin::StdDrawMode( SdrObjKind eSdrObjectKind, sal_Bool bObjSelect ) { SetSdrDrawMode( eSdrObjectKind ); @@ -655,8 +655,8 @@ void SwEditWin::StdDrawMode( SdrObjKind eSdrObjectKind, BOOL bObjSelect ) if (bObjSelect) rView.GetDrawFuncPtr()->Activate( SID_OBJECT_SELECT ); else - rView.GetDrawFuncPtr()->Activate( sal::static_int_cast< USHORT >(eSdrObjectKind) ); - bInsFrm = FALSE; + rView.GetDrawFuncPtr()->Activate( sal::static_int_cast< sal_uInt16 >(eSdrObjectKind) ); + bInsFrm = sal_False; nInsFrmColCount = 1; } @@ -668,23 +668,23 @@ void SwEditWin::StopInsFrm() rView.SetDrawFuncPtr(NULL); } rView.LeaveDrawCreate(); // leave construction mode - bInsFrm = FALSE; + bInsFrm = sal_False; nInsFrmColCount = 1; } /*-------------------------------------------------------------------- --------------------------------------------------------------------*/ -BOOL SwEditWin::IsInputSequenceCheckingRequired( const String &rText, const SwPaM& rCrsr ) const +sal_Bool SwEditWin::IsInputSequenceCheckingRequired( const String &rText, const SwPaM& rCrsr ) const { const SvtCTLOptions& rCTLOptions = SW_MOD()->GetCTLOptions(); if ( !rCTLOptions.IsCTLFontEnabled() || !rCTLOptions.IsCTLSequenceChecking() ) - return FALSE; + return sal_False; const xub_StrLen nFirstPos = rCrsr.Start()->nContent.GetIndex(); if ( 0 == nFirstPos ) /* first char needs not to be checked */ - return FALSE; + return sal_False; SwBreakIt *pBreakIter = SwBreakIt::Get(); uno::Reference < i18n::XBreakIterator > xBI = pBreakIter->GetBreakIter(); @@ -796,7 +796,7 @@ void SwEditWin::FlushInBuffer() // at this point now we will insert the buffer text 'normally' some lines below... - rSh.Pop( FALSE ); // pop old cursor from stack + rSh.Pop( sal_False ); // pop old cursor from stack if (!aInBuffer.Len()) return; @@ -831,7 +831,7 @@ void SwEditWin::FlushInBuffer() sal_Bool bLang = true; if(eBufferLanguage != LANGUAGE_DONTKNOW) { - USHORT nWhich = 0; + sal_uInt16 nWhich = 0; switch( GetI18NScriptTypeOfLanguage( eBufferLanguage )) { case i18n::ScriptType::ASIAN: nWhich = RES_CHRATR_CJK_LANGUAGE; break; @@ -843,7 +843,7 @@ void SwEditWin::FlushInBuffer() { SfxItemSet aLangSet(rView.GetPool(), nWhich, nWhich); rSh.GetCurAttr(aLangSet); - if(SFX_ITEM_DEFAULT <= aLangSet.GetItemState(nWhich, TRUE)) + if(SFX_ITEM_DEFAULT <= aLangSet.GetItemState(nWhich, sal_True)) { LanguageType eLang = static_cast<const SvxLanguageItem&>(aLangSet.Get(nWhich)).GetLanguage(); if ( eLang == eBufferLanguage ) @@ -910,7 +910,7 @@ void SwEditWin::FlushInBuffer() rSh.Insert( aInBuffer ); eBufferLanguage = LANGUAGE_DONTKNOW; aInBuffer.Erase(); - bFlushCharBuffer = FALSE; + bFlushCharBuffer = sal_False; } } @@ -923,7 +923,7 @@ void SwEditWin::FlushInBuffer() #define MOVE_RIGHT_SMALL 6 #define MOVE_DOWN_SMALL 7 -void SwEditWin::ChangeFly( BYTE nDir, BOOL bWeb ) +void SwEditWin::ChangeFly( sal_uInt8 nDir, sal_Bool bWeb ) { SwWrtShell &rSh = rView.GetWrtShell(); SwRect aTmp = rSh.GetFlyRect(); @@ -952,10 +952,10 @@ void SwEditWin::ChangeFly( BYTE nDir, BOOL bWeb ) aSnap = rSh.GetViewOptions()->GetSnapSize(); short nDiv = rSh.GetViewOptions()->GetDivisionX(); if ( nDiv > 0 ) - aSnap.Width() = Max( (ULONG)1, (ULONG)aSnap.Width() / nDiv ); + aSnap.Width() = Max( (sal_uLong)1, (sal_uLong)aSnap.Width() / nDiv ); nDiv = rSh.GetViewOptions()->GetDivisionY(); if ( nDiv > 0 ) - aSnap.Height() = Max( (ULONG)1, (ULONG)aSnap.Height() / nDiv ); + aSnap.Height() = Max( (sal_uLong)1, (sal_uLong)aSnap.Height() / nDiv ); } SwRect aBoundRect; @@ -991,7 +991,7 @@ void SwEditWin::ChangeFly( BYTE nDir, BOOL bWeb ) case MOVE_DOWN_BIG: aTmp.Top( aTmp.Top() + nDown ); break; default: OSL_ENSURE(true, "ChangeFly: Unknown direction." ); } - BOOL bSet = FALSE; + sal_Bool bSet = sal_False; if ((FLY_AS_CHAR == eAnchorId) && ( nDir % 2 )) { long aDiff = aTmp.Top() - aRefPoint.Y(); @@ -1004,7 +1004,7 @@ void SwEditWin::ChangeFly( BYTE nDir, BOOL bWeb ) if( bWeb ) { eNew = aVert.GetVertOrient(); - BOOL bDown = 0 != ( nDir & 0x02 ); + sal_Bool bDown = 0 != ( nDir & 0x02 ); switch( eNew ) { case text::VertOrientation::CHAR_TOP: @@ -1035,7 +1035,7 @@ void SwEditWin::ChangeFly( BYTE nDir, BOOL bWeb ) } aVert.SetVertOrient( eNew ); aSet.Put( aVert ); - bSet = TRUE; + bSet = sal_True; } if (bWeb && (FLY_AT_PARA == eAnchorId) && ( nDir==MOVE_LEFT_SMALL || nDir==MOVE_RIGHT_BIG )) @@ -1059,23 +1059,23 @@ void SwEditWin::ChangeFly( BYTE nDir, BOOL bWeb ) { aHori.SetHoriOrient( eNew ); aSet.Put( aHori ); - bSet = TRUE; + bSet = sal_True; } } rSh.StartAllAction(); if( bSet ) rSh.SetFlyFrmAttr( aSet ); - BOOL bSetPos = (FLY_AS_CHAR != eAnchorId); + sal_Bool bSetPos = (FLY_AS_CHAR != eAnchorId); if(bSetPos && bWeb) { if (FLY_AT_PAGE != eAnchorId) { - bSetPos = FALSE; + bSetPos = sal_False; } else { bSetPos = (::GetHtmlMode(rView.GetDocShell()) & HTMLMODE_SOME_ABS_POS) ? - TRUE : FALSE; + sal_True : sal_False; } } if( bSetPos ) @@ -1084,7 +1084,7 @@ void SwEditWin::ChangeFly( BYTE nDir, BOOL bWeb ) } } -void SwEditWin::ChangeDrawing( BYTE nDir ) +void SwEditWin::ChangeDrawing( sal_uInt8 nDir ) { // start undo action in order to get only one // undo action for this change. @@ -1094,7 +1094,7 @@ void SwEditWin::ChangeDrawing( BYTE nDir ) long nX = 0; long nY = 0; sal_Bool bOnePixel = sal_False; - USHORT nAnchorDir = SW_MOVE_UP; + sal_uInt16 nAnchorDir = SW_MOVE_UP; switch(nDir) { case MOVE_LEFT_SMALL: @@ -1128,14 +1128,14 @@ void SwEditWin::ChangeDrawing( BYTE nDir ) if(0 != nX || 0 != nY) { - BYTE nProtect = rSh.IsSelObjProtected( FLYPROTECT_POS|FLYPROTECT_SIZE ); + sal_uInt8 nProtect = rSh.IsSelObjProtected( FLYPROTECT_POS|FLYPROTECT_SIZE ); Size aSnap( rSh.GetViewOptions()->GetSnapSize() ); short nDiv = rSh.GetViewOptions()->GetDivisionX(); if ( nDiv > 0 ) - aSnap.Width() = Max( (ULONG)1, (ULONG)aSnap.Width() / nDiv ); + aSnap.Width() = Max( (sal_uLong)1, (sal_uLong)aSnap.Width() / nDiv ); nDiv = rSh.GetViewOptions()->GetDivisionY(); if ( nDiv > 0 ) - aSnap.Height() = Max( (ULONG)1, (ULONG)aSnap.Height() / nDiv ); + aSnap.Height() = Max( (sal_uLong)1, (sal_uLong)aSnap.Height() / nDiv ); if(bOnePixel) aSnap = PixelToLogic(Size(1,1)); @@ -1154,8 +1154,8 @@ void SwEditWin::ChangeDrawing( BYTE nDir ) if(0 == (nProtect&FLYPROTECT_POS)) { // Check if object is anchored as character and move direction - BOOL bDummy; - bool bVertAnchor = rSh.IsFrmVertical( TRUE, bDummy ); + sal_Bool bDummy1, bDummy2; + const bool bVertAnchor = rSh.IsFrmVertical( sal_True, bDummy1, bDummy2 ); bool bHoriMove = !bVertAnchor == !( nDir % 2 ); bool bMoveAllowed = !bHoriMove || (rSh.GetAnchorId() != FLY_AS_CHAR); @@ -1191,14 +1191,14 @@ void SwEditWin::ChangeDrawing( BYTE nDir ) if(pSdrView->IsDragObj()) { - BOOL bWasNoSnap = static_cast< BOOL >(rDragStat.IsNoSnap()); - BOOL bWasSnapEnabled = pSdrView->IsSnapEnabled(); + sal_Bool bWasNoSnap = static_cast< sal_Bool >(rDragStat.IsNoSnap()); + sal_Bool bWasSnapEnabled = pSdrView->IsSnapEnabled(); // switch snapping off if(!bWasNoSnap) - ((SdrDragStat&)rDragStat).SetNoSnap(TRUE); + ((SdrDragStat&)rDragStat).SetNoSnap(sal_True); if(bWasSnapEnabled) - pSdrView->SetSnapEnabled(FALSE); + pSdrView->SetSnapEnabled(sal_False); pSdrView->MovAction(aEndPoint); pSdrView->EndDragObj(); @@ -1244,7 +1244,7 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt) aKeyInputFlushTimer.Stop(); SwWrtShell &rSh = rView.GetWrtShell(); - BOOL bIsDocReadOnly = rView.GetDocShell()->IsReadOnly() && + sal_Bool bIsDocReadOnly = rView.GetDocShell()->IsReadOnly() && rSh.IsCrsrReadonly(); //if the language changes the buffer must be flushed @@ -1265,7 +1265,7 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt) // OS:the DrawView also needs a readonly-Flag as well if ( !bIsDocReadOnly && rSh.GetDrawView() && rSh.GetDrawView()->KeyInput( rKEvt, this ) ) { - rSh.GetView().GetViewFrame()->GetBindings().InvalidateAll( FALSE ); + rSh.GetView().GetViewFrame()->GetBindings().InvalidateAll( sal_False ); rSh.SetModified(); return; // Event evaluated by SdrView } @@ -1276,10 +1276,10 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt) rSh.Edit(); } - BOOL bFlushBuffer = FALSE; - BOOL bNormalChar = FALSE; - BOOL bChkInsBlank = pQuickHlpData->bChkInsBlank; - pQuickHlpData->bChkInsBlank = FALSE; + sal_Bool bFlushBuffer = sal_False; + sal_Bool bNormalChar = sal_False; + sal_Bool bChkInsBlank = pQuickHlpData->bChkInsBlank; + pQuickHlpData->bChkInsBlank = sal_False; #if OSL_DEBUG_LEVEL > 1 if (rKEvt.GetKeyCode().GetCode() == KEY_F12) @@ -1305,7 +1305,7 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt) // must changed from switch to if, because the Linux // compiler has problem with the code. Has to remove if the new general // handler exist. - USHORT nKey = rKEvt.GetKeyCode().GetCode(); + sal_uInt16 nKey = rKEvt.GetKeyCode().GetCode(); if( KEY_UP == nKey || KEY_DOWN == nKey || KEY_LEFT == nKey || KEY_RIGHT == nKey ) @@ -1322,11 +1322,14 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt) if( ( bVertText && ( !bTblCrsr || bVertTable ) ) || ( bTblCrsr && bVertTable ) ) { + // Attempt to integrate cursor travelling for mongolian layout does not work. + // Thus, back to previous mapping of cursor keys to direction keys. if( KEY_UP == nKey ) nKey = KEY_LEFT; else if( KEY_DOWN == nKey ) nKey = KEY_RIGHT; else if( KEY_LEFT == nKey ) nKey = KEY_DOWN; else if( KEY_RIGHT == nKey ) nKey = KEY_UP; } + if ( rSh.IsInRightToLeftText() ) { if( KEY_LEFT == nKey ) nKey = KEY_RIGHT; @@ -1355,7 +1358,7 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt) const SwFrmFmt* pFlyFmt = rSh.GetFlyFrmFmt(); if( pFlyFmt ) { - USHORT nEvent; + sal_uInt16 nEvent; if( 32 <= aCh && 0 == (( KEY_MOD1 | KEY_MOD2 ) & rKeyCode.GetModifier() )) @@ -1416,8 +1419,8 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt) SwModuleOptions* pModOpt = SW_MOD()->GetModuleConfig(); TblChgWidthHeightType eTblChgMode = nsTblChgWidthHeightType::WH_COL_LEFT; // initialization just for warning-free code - USHORT nTblChgSize = 0; - BOOL bStopKeyInputTimer = TRUE; + sal_uInt16 nTblChgSize = 0; + sal_Bool bStopKeyInputTimer = sal_True; String sFmlEntry; enum SW_KeyState { KS_Start, @@ -1464,7 +1467,7 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt) SW_KeyState eKeyState = bIsDocReadOnly ? KS_CheckDocReadOnlyKeys : KS_CheckKey, eNextKeyState = KS_Ende; - BYTE nDir = 0; + sal_uInt8 nDir = 0; if (nKS_NUMDOWN_Count > 0) nKS_NUMDOWN_Count--; @@ -1508,12 +1511,12 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt) else rSh.SttSelect(); rSh.MoveSection( fnSectionCurr, fnSectionEnd ); - rSh.Pop( TRUE ); + rSh.Pop( sal_True ); rSh.EndSelect(); sFmlEntry = '='; } else - rSh.Pop( FALSE ); + rSh.Pop( sal_False ); } else { @@ -1606,7 +1609,7 @@ KEYINPUT_CHECKTABLE: case KEY_LEFT: case KEY_LEFT | KEY_MOD1: { - BOOL bMod1 = 0 != (rKeyCode.GetModifier() & KEY_MOD1); + sal_Bool bMod1 = 0 != (rKeyCode.GetModifier() & KEY_MOD1); if(!bMod1) { eFlyState = KS_Fly_Change; @@ -1628,7 +1631,7 @@ KEYINPUT_CHECKTABLE: case KEY_UP: case KEY_UP | KEY_MOD1: { - BOOL bMod1 = 0 != (rKeyCode.GetModifier() & KEY_MOD1); + sal_Bool bMod1 = 0 != (rKeyCode.GetModifier() & KEY_MOD1); if(!bMod1) { eFlyState = KS_Fly_Change; @@ -1644,7 +1647,7 @@ KEYINPUT_CHECKTABLE: case KEY_DOWN: case KEY_DOWN | KEY_MOD1: { - BOOL bMod1 = 0 != (rKeyCode.GetModifier() & KEY_MOD1); + sal_Bool bMod1 = 0 != (rKeyCode.GetModifier() & KEY_MOD1); if(!bMod1) { eFlyState = KS_Fly_Change; @@ -1661,7 +1664,7 @@ KEYINPUT_CHECKTABLE: KEYINPUT_CHECKTABLE_INSDEL: if( rSh.IsTableMode() || !rSh.GetTableFmt() || !bTblInsDelMode || - FALSE /* table protected */ + sal_False /* table protected */ ) { const int nSelectionType = rSh.GetSelectionType(); @@ -1688,7 +1691,7 @@ KEYINPUT_CHECKTABLE_INSDEL: if ( !rSh.HasReadonlySel() ) { if (rSh.IsInFrontOfLabel() && - rSh.NumOrNoNum(FALSE)) + rSh.NumOrNoNum(sal_False)) eKeyState = KS_NumOrNoNum; } else @@ -1702,22 +1705,22 @@ KEYINPUT_CHECKTABLE_INSDEL: if( !rSh.IsTableMode() && rSh.GetTableFmt() ) { eKeyState = KS_Ende; - bTblInsDelMode = TRUE; - bTblIsInsMode = FALSE; - bTblIsColMode = TRUE; + bTblInsDelMode = sal_True; + bTblIsInsMode = sal_False; + bTblIsColMode = sal_True; aKeyInputTimer.Start(); - bStopKeyInputTimer = FALSE; + bStopKeyInputTimer = sal_False; } break; case KEY_INSERT | KEY_MOD2: if( !rSh.IsTableMode() && rSh.GetTableFmt() ) { eKeyState = KS_Ende; - bTblInsDelMode = TRUE; - bTblIsInsMode = TRUE; - bTblIsColMode = TRUE; + bTblInsDelMode = sal_True; + bTblIsInsMode = sal_True; + bTblIsColMode = sal_True; aKeyInputTimer.Start(); - bStopKeyInputTimer = FALSE; + bStopKeyInputTimer = sal_False; } break; @@ -1768,7 +1771,7 @@ KEYINPUT_CHECKTABLE_INSDEL: case KEY_BACKSPACE | KEY_SHIFT: if( !rSh.HasReadonlySel() ) { - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; // try to add comment for code snip: // Remove the paragraph indent, if the cursor is at the // beginning of a paragraph, there is no selection @@ -1798,13 +1801,13 @@ KEYINPUT_CHECKTABLE_INSDEL: { eKeyState = KS_NumUp; nKS_NUMDOWN_Count = 2; - bDone = TRUE; + bDone = sal_True; } else if (nKS_NUMINDENTINC_Count > 0) { eKeyState = KS_NumIndentDec; nKS_NUMINDENTINC_Count = 2; - bDone = TRUE; + bDone = sal_True; } } @@ -1845,7 +1848,7 @@ KEYINPUT_CHECKTABLE_INSDEL: } } if ( bCallNumOrNoNum && - rSh.NumOrNoNum( !bOnlyBackspaceKey, TRUE ) ) + rSh.NumOrNoNum( !bOnlyBackspaceKey, sal_True ) ) { eKeyState = KS_NumOrNoNum; } @@ -1870,9 +1873,9 @@ KEYINPUT_CHECKTABLE_INSDEL: { #ifdef SW_CRSR_TIMER - BOOL bOld = rSh.ChgCrsrTimerFlag( FALSE ); + sal_Bool bOld = rSh.ChgCrsrTimerFlag( sal_False ); #endif - if (rSh.IsFormProtected() || rSh.GetCurrentFieldmark() || rSh.GetChar(FALSE)==CH_TXT_ATR_FORMELEMENT) + if (rSh.IsFormProtected() || rSh.GetCurrentFieldmark() || rSh.GetChar(sal_False)==CH_TXT_ATR_FORMELEMENT) { eKeyState=KS_GotoNextFieldMark; } @@ -1922,9 +1925,10 @@ KEYINPUT_CHECKTABLE_INSDEL: case KEY_TAB | KEY_SHIFT: { #ifdef SW_CRSR_TIMER - BOOL bOld = rSh.ChgCrsrTimerFlag( FALSE ); + sal_Bool bOld = rSh.ChgCrsrTimerFlag( sal_False ); + sal_Bool bOld = rSh.ChgCrsrTimerFlag( sal_False ); #endif - if (rSh.IsFormProtected() || rSh.GetCurrentFieldmark()|| rSh.GetChar(FALSE)==CH_TXT_ATR_FORMELEMENT) { + if (rSh.IsFormProtected() || rSh.GetCurrentFieldmark()|| rSh.GetChar(sal_False)==CH_TXT_ATR_FORMELEMENT) { eKeyState=KS_GotoPrevFieldMark; } else if( rSh.GetCurNumRule() && rSh.IsSttOfPara() && @@ -2028,7 +2032,7 @@ KEYINPUT_CHECKTABLE_INSDEL: { case KEY_TAB: case KEY_TAB | KEY_SHIFT: - bNormalChar = FALSE; + bNormalChar = sal_False; eKeyState = KS_Ende; if ( rSh.GetSelectionType() & (nsSelectionType::SEL_GRF | @@ -2054,10 +2058,10 @@ KEYINPUT_CHECKTABLE_INSDEL: { SfxItemSet aSet(rSh.GetAttrPool(), RES_TXTATR_INETFMT, RES_TXTATR_INETFMT); rSh.GetCurAttr(aSet); - if(SFX_ITEM_SET == aSet.GetItemState(RES_TXTATR_INETFMT, FALSE)) + if(SFX_ITEM_SET == aSet.GetItemState(RES_TXTATR_INETFMT, sal_False)) { - const SfxPoolItem& rItem = aSet.Get(RES_TXTATR_INETFMT, TRUE); - bNormalChar = FALSE; + const SfxPoolItem& rItem = aSet.Get(RES_TXTATR_INETFMT, sal_True); + bNormalChar = sal_False; eKeyState = KS_Ende; rSh.ClickToINetAttr((const SwFmtINetFmt&)rItem, URLLOAD_NOFILTER); } @@ -2074,12 +2078,12 @@ KEYINPUT_CHECKTABLE_INSDEL: switch ( rKeyCode.GetModifier() | rKeyCode.GetCode() ) { case KEY_RIGHT | KEY_MOD2: - rSh.Right( CRSR_SKIP_CHARS, FALSE, 1, FALSE ); + rSh.Right( CRSR_SKIP_CHARS, sal_False, 1, sal_False ); eKeyState = KS_Ende; FlushInBuffer(); break; case KEY_LEFT | KEY_MOD2: - rSh.Left( CRSR_SKIP_CHARS, FALSE, 1, FALSE ); + rSh.Left( CRSR_SKIP_CHARS, sal_False, 1, sal_False ); eKeyState = KS_Ende; FlushInBuffer(); break; @@ -2098,14 +2102,14 @@ KEYINPUT_CHECKTABLE_INSDEL: if (bNormalChar && rSh.IsInFrontOfLabel()) { - rSh.NumOrNoNum(FALSE); + rSh.NumOrNoNum(sal_False); } if( aInBuffer.Len() && ( !bNormalChar || bIsDocReadOnly )) FlushInBuffer(); if( rView.KeyInput( aKeyEvent ) ) - bFlushBuffer = TRUE, bNormalChar = FALSE; + bFlushBuffer = sal_True, bNormalChar = sal_False; else { // Because Sfx accelerators are only called when they were @@ -2141,7 +2145,7 @@ KEYINPUT_CHECKTABLE_INSDEL: } else { - bNormalChar = FALSE; + bNormalChar = sal_False; Window::KeyInput( aKeyEvent ); } } @@ -2190,7 +2194,7 @@ KEYINPUT_CHECKTABLE_INSDEL: aCh = '\t'; // no break! case KS_InsChar: - if (rSh.GetChar(FALSE)==CH_TXT_ATR_FORMELEMENT) + if (rSh.GetChar(sal_False)==CH_TXT_ATR_FORMELEMENT) { ::sw::mark::ICheckboxFieldmark* pFieldmark = dynamic_cast< ::sw::mark::ICheckboxFieldmark* > @@ -2223,7 +2227,7 @@ KEYINPUT_CHECKTABLE_INSDEL: } else if(!rSh.HasReadonlySel()) { - BOOL bIsNormalChar = GetAppCharClass().isLetterNumeric( + sal_Bool bIsNormalChar = GetAppCharClass().isLetterNumeric( String( aCh ), 0 ); if( bChkInsBlank && bIsNormalChar && (aInBuffer.Len() || !rSh.IsSttPara() || !rSh.IsEndPara() )) @@ -2233,8 +2237,8 @@ KEYINPUT_CHECKTABLE_INSDEL: aInBuffer.Expand( aInBuffer.Len() + 1, ' ' ); } - BOOL bIsAutoCorrectChar = SvxAutoCorrect::IsAutoCorrectChar( aCh ); - BOOL bRunNext = pACorr && pACorr->HasRunNext(); + sal_Bool bIsAutoCorrectChar = SvxAutoCorrect::IsAutoCorrectChar( aCh ); + sal_Bool bRunNext = pACorr && pACorr->HasRunNext(); if( !aKeyEvent.GetRepeat() && pACorr && ( bIsAutoCorrectChar || bRunNext ) && pACfg->IsAutoFmtByInput() && (( pACorr->IsAutoCorrFlag( ChgWeightUnderl ) && @@ -2294,7 +2298,7 @@ KEYINPUT_CHECKTABLE_INSDEL: default: { - USHORT nSlotId = 0; + sal_uInt16 nSlotId = 0; FlushInBuffer(); switch( eKeyState ) { @@ -2315,11 +2319,11 @@ KEYINPUT_CHECKTABLE_INSDEL: break; case KS_NumDown: - rSh.NumUpDown( TRUE ); + rSh.NumUpDown( sal_True ); nKS_NUMDOWN_Count = 2; break; case KS_NumUp: - rSh.NumUpDown( FALSE ); + rSh.NumUpDown( sal_False ); break; case KS_NumIndentInc: @@ -2362,7 +2366,7 @@ KEYINPUT_CHECKTABLE_INSDEL: nSlotId = FN_GOTO_PREV_CELL; break; case KS_AutoFmtByInput: - rSh.SplitNode( TRUE ); + rSh.SplitNode( sal_True ); break; case KS_NextObject: @@ -2395,11 +2399,11 @@ KEYINPUT_CHECKTABLE_INSDEL: if(pList->GetShortName( sFnd, sShrtNm, sGroup)) { rSh.SttSelect(); - rSh.ExtendSelection( FALSE, aTmpQHD.nLen ); + rSh.ExtendSelection( sal_False, aTmpQHD.nLen ); SwGlossaryHdl* pGlosHdl = GetView().GetGlosHdl(); - pGlosHdl->SetCurGroup(sGroup, TRUE); + pGlosHdl->SetCurGroup(sGroup, sal_True); pGlosHdl->InsertGlossary( sShrtNm); - pQuickHlpData->bChkInsBlank = TRUE; + pQuickHlpData->bChkInsBlank = sal_True; } } else @@ -2419,7 +2423,7 @@ KEYINPUT_CHECKTABLE_INSDEL: case KS_EditFormula: { - const USHORT nId = SwInputChild::GetChildWindowId(); + const sal_uInt16 nId = SwInputChild::GetChildWindowId(); SfxViewFrame* pVFrame = GetView().GetViewFrame(); pVFrame->ToggleChildWindow( nId ); @@ -2494,7 +2498,7 @@ KEYINPUT_CHECKTABLE_INSDEL: if( bStopKeyInputTimer ) { aKeyInputTimer.Stop(); - bTblInsDelMode = FALSE; + bTblInsDelMode = sal_False; } // in case the buffered characters are inserted @@ -2502,7 +2506,7 @@ KEYINPUT_CHECKTABLE_INSDEL: { // bFlushCharBuffer was not resetted here // why not? - BOOL bSave = bFlushCharBuffer; + sal_Bool bSave = bFlushCharBuffer; FlushInBuffer(); bFlushCharBuffer = bSave; @@ -2528,7 +2532,7 @@ void SwEditWin::RstMBDownFlags() // of the modal dialog (like on WINDOWS). // So reset the statuses here and release the mouse // for the dialog. - bMBPressed = bNoInterrupt = FALSE; + bMBPressed = bNoInterrupt = sal_False; EnterArea(); ReleaseMouse(); } @@ -2544,7 +2548,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) // the contex menu is closed by VCL asynchronously which in the end // would work on deleted objects or the context menu has no parent anymore) SfxInPlaceClient* pIPClient = rSh.GetSfxViewShell()->GetIPClient(); - BOOL bIsOleActive = ( pIPClient && pIPClient->IsObjectInPlaceActive() ); + sal_Bool bIsOleActive = ( pIPClient && pIPClient->IsObjectInPlaceActive() ); if ( bIsOleActive && PopupMenu::IsInExecute() ) return; @@ -2560,7 +2564,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) //ignore key modifiers for format paintbrush { - BOOL bExecFormatPaintbrush = pApplyTempl && pApplyTempl->pFormatClipboard + sal_Bool bExecFormatPaintbrush = pApplyTempl && pApplyTempl->pFormatClipboard && pApplyTempl->pFormatClipboard->HasContent(); if( bExecFormatPaintbrush ) rMEvt = MouseEvent( _rMEvt.GetPosPixel(), _rMEvt.GetClicks(), @@ -2575,7 +2579,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) if ( IsChainMode() ) { - SetChainMode( FALSE ); + SetChainMode( sal_False ); SwRect aDummy; SwFlyFrmFmt *pFmt = (SwFlyFrmFmt*)rSh.GetFlyFrmFmt(); if ( !rSh.Chainable( aDummy, *pFmt, aDocPos ) ) @@ -2588,12 +2592,12 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) // work but in practice ... lcl_SelectShellForDrop( rView ); - BOOL bIsDocReadOnly = rView.GetDocShell()->IsReadOnly(); - BOOL bCallBase = TRUE; + sal_Bool bIsDocReadOnly = rView.GetDocShell()->IsReadOnly(); + sal_Bool bCallBase = sal_True; if( pQuickHlpData->bClear ) pQuickHlpData->Stop( rSh ); - pQuickHlpData->bChkInsBlank = FALSE; + pQuickHlpData->bChkInsBlank = sal_False; if( rSh.FinishOLEObj() ) return; // end InPlace and the click doesn't count anymore @@ -2605,17 +2609,17 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) { if (pSdrView->MouseButtonDown( rMEvt, this ) ) { - rSh.GetView().GetViewFrame()->GetBindings().InvalidateAll(FALSE); + rSh.GetView().GetViewFrame()->GetBindings().InvalidateAll(sal_False); return; // SdrView's event evaluated } } - bIsInMove = FALSE; + bIsInMove = sal_False; aStartPos = rMEvt.GetPosPixel(); aRszMvHdlPt.X() = 0, aRszMvHdlPt.Y() = 0; - BYTE nMouseTabCol = 0; - const BOOL bTmp = !rSh.IsDrawCreate() && !pApplyTempl && !rSh.IsInSelect() && + sal_uInt8 nMouseTabCol = 0; + const sal_Bool bTmp = !rSh.IsDrawCreate() && !pApplyTempl && !rSh.IsInSelect() && rMEvt.GetClicks() == 1 && MOUSE_LEFT == rMEvt.GetButtons(); if ( bTmp && 0 != (nMouseTabCol = rSh.WhichMouseTabCol( aDocPos ) ) && @@ -2631,7 +2635,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) bIsRowDrag = SW_TABROWSEL_HORI == nMouseTabCol|| SW_TABROWSEL_HORI_RTL == nMouseTabCol || SW_TABCOLSEL_VERT == nMouseTabCol; - bMBPressed = TRUE; + bMBPressed = sal_True; CaptureMouse(); } return; @@ -2641,9 +2645,9 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) { // comes from table columns out of the document. if(SW_TABCOL_VERT == nMouseTabCol || SW_TABCOL_HORI == nMouseTabCol) - rView.SetTabColFromDoc( TRUE ); + rView.SetTabColFromDoc( sal_True ); else - rView.SetTabRowFromDoc( TRUE ); + rView.SetTabRowFromDoc( sal_True ); rView.SetTabColFromDocPos( aDocPos ); rView.InvalidateRulerPos(); @@ -2652,11 +2656,11 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) if ( RulerColumnDrag( rMEvt, (SW_TABCOL_VERT == nMouseTabCol || SW_TABROW_HORI == nMouseTabCol)) ) { - rView.SetTabColFromDoc( FALSE ); - rView.SetTabRowFromDoc( FALSE ); + rView.SetTabColFromDoc( sal_False ); + rView.SetTabRowFromDoc( sal_False ); rView.InvalidateRulerPos(); rBind.Update(); - bCallBase = FALSE; + bCallBase = sal_False; } else { @@ -2679,7 +2683,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) rView.SetNumRuleNodeFromDoc( NULL ); rView.InvalidateRulerPos(); rBind.Update(); - bCallBase = FALSE; + bCallBase = sal_False; } else { @@ -2703,8 +2707,8 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) // click releases the selection. if ( MOUSE_LEFT == rMEvt.GetButtons() ) { - BOOL bOnlyText = FALSE; - bMBPressed = bNoInterrupt = TRUE; + sal_Bool bOnlyText = sal_False; + bMBPressed = bNoInterrupt = sal_True; nKS_NUMDOWN_Count = 0; CaptureMouse(); @@ -2733,7 +2737,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) } if ( EnterDrawMode( rMEvt, aDocPos ) ) { - bNoInterrupt = FALSE; + bNoInterrupt = sal_False; return; } else if ( rView.GetDrawFuncPtr() && bInsFrm ) @@ -2748,7 +2752,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) if ( rSh.IsSelFrmMode()) { SdrHdl* pHdl = rSh.GetDrawView()->PickHandle(aDocPos); - BOOL bHitHandle = pHdl && pHdl->GetKind() != HDL_ANCHOR && + sal_Bool bHitHandle = pHdl && pHdl->GetKind() != HDL_ANCHOR && pHdl->GetKind() != HDL_ANCHOR_TR; if ((rSh.IsInsideSelectedObj(aDocPos) || bHitHandle) && @@ -2764,30 +2768,30 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) SwEditWin::nDDStartPosY = aDocPos.Y(); SwEditWin::nDDStartPosX = aDocPos.X(); } - bFrmDrag = TRUE; + bFrmDrag = sal_True; } - bNoInterrupt = FALSE; + bNoInterrupt = sal_False; return; } } } } - BOOL bExecHyperlinks = rView.GetDocShell()->IsReadOnly(); + sal_Bool bExecHyperlinks = rView.GetDocShell()->IsReadOnly(); if ( !bExecHyperlinks ) { SvtSecurityOptions aSecOpts; - const BOOL bSecureOption = aSecOpts.IsOptionSet( SvtSecurityOptions::E_CTRLCLICK_HYPERLINK ); + const sal_Bool bSecureOption = aSecOpts.IsOptionSet( SvtSecurityOptions::E_CTRLCLICK_HYPERLINK ); if ( ( bSecureOption && rMEvt.GetModifier() == KEY_MOD1 ) || ( !bSecureOption && rMEvt.GetModifier() != KEY_MOD1 ) ) - bExecHyperlinks = TRUE; + bExecHyperlinks = sal_True; } - BYTE nNumberOfClicks = static_cast< BYTE >(rMEvt.GetClicks() % 4); + sal_uInt8 nNumberOfClicks = static_cast< sal_uInt8 >(rMEvt.GetClicks() % 4); if ( 0 == nNumberOfClicks && 0 < rMEvt.GetClicks() ) nNumberOfClicks = 4; - BOOL bExecDrawTextLink = FALSE; + sal_Bool bExecDrawTextLink = sal_False; switch ( rMEvt.GetModifier() + rMEvt.GetButtons() ) { @@ -2809,7 +2813,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) pSdrView->PickAnything(rMEvt, SDRMOUSEBUTTONDOWN, aVEvt); if (aVEvt.eEvent == SDREVENT_EXECUTEURL) - bExecDrawTextLink = TRUE; + bExecDrawTextLink = sal_True; } // only try to select frame, if pointer already was @@ -2826,12 +2830,12 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) rView.NoRotate(); rSh.HideCrsr(); - BOOL bUnLockView = !rSh.IsViewLocked(); - rSh.LockView( TRUE ); - BOOL bSelObj = rSh.SelectObj( aDocPos, + sal_Bool bUnLockView = !rSh.IsViewLocked(); + rSh.LockView( sal_True ); + sal_Bool bSelObj = rSh.SelectObj( aDocPos, rMEvt.IsMod1() ? SW_ENTER_GROUP : 0); if( bUnLockView ) - rSh.LockView( FALSE ); + rSh.LockView( sal_False ); if( bSelObj ) { @@ -2850,13 +2854,13 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) } rSh.EnterSelFrmMode( &aDocPos ); - bFrmDrag = TRUE; + bFrmDrag = sal_True; UpdatePointer( aDocPos, rMEvt.GetModifier() ); } return; } else - bOnlyText = static_cast< BOOL >(rSh.IsObjSelectable( aDocPos )); + bOnlyText = static_cast< sal_Bool >(rSh.IsObjSelectable( aDocPos )); if (!rView.GetDrawFuncPtr()) rSh.ShowCrsr(); @@ -2881,9 +2885,9 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) } else { - BOOL bUnLockView = !rSh.IsViewLocked(); - rSh.LockView( TRUE ); - BYTE nFlag = rMEvt.IsShift() ? SW_ADD_SELECT :0; + sal_Bool bUnLockView = !rSh.IsViewLocked(); + rSh.LockView( sal_True ); + sal_uInt8 nFlag = rMEvt.IsShift() ? SW_ADD_SELECT :0; if( rMEvt.IsMod1() ) nFlag = nFlag | SW_ENTER_GROUP; @@ -2894,18 +2898,18 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) rView.AttrChangedNotify(&rSh); } - BOOL bSelObj = rSh.SelectObj( aDocPos, nFlag ); + sal_Bool bSelObj = rSh.SelectObj( aDocPos, nFlag ); if( bUnLockView ) - rSh.LockView( FALSE ); + rSh.LockView( sal_False ); if( !bSelObj ) { // move cursor here so that it is not drawn in the // frame first; ShowCrsr() happens in LeaveSelFrmMode() - bValidCrsrPos = !(CRSR_POSCHG & (rSh.*rSh.fnSetCrsr)(&aDocPos,FALSE)); + bValidCrsrPos = !(CRSR_POSCHG & (rSh.*rSh.fnSetCrsr)(&aDocPos,sal_False)); rSh.LeaveSelFrmMode(); rView.AttrChangedNotify( &rSh ); - bCallBase = FALSE; + bCallBase = sal_False; } else { @@ -2913,7 +2917,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) rSh.EnterSelFrmMode( &aDocPos ); rSh.SelFlyGrabCrsr(); rSh.MakeSelVisible(); - bFrmDrag = TRUE; + bFrmDrag = sal_True; if( rSh.IsFrmSelected() && rView.GetDrawFuncPtr() ) { @@ -2932,7 +2936,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) } case 2: { - bFrmDrag = FALSE; + bFrmDrag = sal_False; if ( !bIsDocReadOnly && rSh.IsInsideSelectedObj(aDocPos) && 0 == rSh.IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT ) ) @@ -2978,7 +2982,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) return; SwField *pFld; - BOOL bFtn = FALSE; + sal_Bool bFtn = sal_False; if( !bIsDocReadOnly && ( 0 != ( pFld = rSh.GetCurFld() ) || @@ -2989,7 +2993,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) GetView().GetViewFrame()->GetBindings().Execute( FN_EDIT_FOOTNOTE ); else { - USHORT nTypeId = pFld->GetTypeId(); + sal_uInt16 nTypeId = pFld->GetTypeId(); SfxViewFrame* pVFrame = GetView().GetViewFrame(); switch( nTypeId ) { @@ -2997,8 +3001,8 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) case TYP_SCRIPTFLD: { // if it's a Readonly region, status has to be enabled - USHORT nSlot = TYP_POSTITFLD == nTypeId ? FN_POSTIT : FN_JAVAEDIT; - SfxBoolItem aItem(nSlot, TRUE); + sal_uInt16 nSlot = TYP_POSTITFLD == nTypeId ? FN_POSTIT : FN_JAVAEDIT; + SfxBoolItem aItem(nSlot, sal_True); pVFrame->GetBindings().SetState(aItem); pVFrame->GetBindings().Execute(nSlot); break; @@ -3026,13 +3030,13 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) } else rSh.SelWrd( &aDocPos ); - bHoldSelection = TRUE; + bHoldSelection = sal_True; return; } case 3: case 4: { - bFrmDrag = FALSE; + bFrmDrag = sal_False; // in extended mode double and triple // click has no effect. if ( rSh.IsExtMode() ) @@ -3058,7 +3062,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) if ( bMod ) rSh.LeaveAddMode(); - bHoldSelection = TRUE; + bHoldSelection = sal_True; return; } @@ -3069,7 +3073,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) case MOUSE_LEFT + KEY_SHIFT: case MOUSE_LEFT + KEY_SHIFT + KEY_MOD1: { - BOOL bLockView = bWasShdwCrsr; + sal_Bool bLockView = bWasShdwCrsr; switch ( rMEvt.GetModifier() ) { @@ -3087,7 +3091,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) rSh.EnterSelFrmMode( &aDocPos ); SwEditWin::nDDStartPosY = aDocPos.Y(); SwEditWin::nDDStartPosX = aDocPos.X(); - bFrmDrag = TRUE; + bFrmDrag = sal_True; return; } } @@ -3095,8 +3099,8 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) else if( rSh.IsSelFrmMode() && rSh.GetDrawView()->PickHandle( aDocPos )) { - bFrmDrag = TRUE; - bNoInterrupt = FALSE; + bFrmDrag = sal_True; + bNoInterrupt = sal_False; return; } } @@ -3116,7 +3120,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) rSh.EnterSelFrmMode( &aDocPos ); SwEditWin::nDDStartPosY = aDocPos.Y(); SwEditWin::nDDStartPosX = aDocPos.X(); - bFrmDrag = TRUE; + bFrmDrag = sal_True; return; } } @@ -3124,8 +3128,8 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) else if( rSh.IsSelFrmMode() && rSh.GetDrawView()->PickHandle( aDocPos )) { - bFrmDrag = TRUE; - bNoInterrupt = FALSE; + bFrmDrag = sal_True; + bNoInterrupt = sal_False; return; } else @@ -3133,15 +3137,15 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) if ( !rSh.IsAddMode() && !rSh.IsExtMode() && !rSh.IsBlockMode() ) { rSh.PushMode(); - bModePushed = TRUE; + bModePushed = sal_True; - BOOL bUnLockView = !rSh.IsViewLocked(); - rSh.LockView( TRUE ); + sal_Bool bUnLockView = !rSh.IsViewLocked(); + rSh.LockView( sal_True ); rSh.EnterAddMode(); if( bUnLockView ) - rSh.LockView( FALSE ); + rSh.LockView( sal_False ); } - bCallBase = FALSE; + bCallBase = sal_False; } } break; @@ -3150,14 +3154,14 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) if ( !rSh.IsAddMode() && !rSh.IsExtMode() && !rSh.IsBlockMode() ) { rSh.PushMode(); - bModePushed = TRUE; - BOOL bUnLockView = !rSh.IsViewLocked(); - rSh.LockView( TRUE ); + bModePushed = sal_True; + sal_Bool bUnLockView = !rSh.IsViewLocked(); + rSh.LockView( sal_True ); rSh.EnterBlockMode(); if( bUnLockView ) - rSh.LockView( FALSE ); + rSh.LockView( sal_False ); } - bCallBase = FALSE; + bCallBase = sal_False; } break; case KEY_SHIFT: @@ -3175,7 +3179,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) { rSh.LeaveSelFrmMode(); rView.AttrChangedNotify(&rSh); - bFrmDrag = FALSE; + bFrmDrag = sal_False; } } else @@ -3184,7 +3188,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) rSh.EnterSelFrmMode( &aDocPos ); SwEditWin::nDDStartPosY = aDocPos.Y(); SwEditWin::nDDStartPosX = aDocPos.X(); - bFrmDrag = TRUE; + bFrmDrag = sal_True; return; } } @@ -3197,7 +3201,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) rSh.EnterSelFrmMode( &aDocPos ); SwEditWin::nDDStartPosY = aDocPos.Y(); SwEditWin::nDDStartPosX = aDocPos.X(); - bFrmDrag = TRUE; + bFrmDrag = sal_True; return; } if ( rSh.IsSelFrmMode() ) @@ -3205,18 +3209,18 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) rSh.UnSelectFrm(); rSh.LeaveSelFrmMode(); rView.AttrChangedNotify(&rSh); - bFrmDrag = FALSE; + bFrmDrag = sal_False; } if ( !rSh.IsExtMode() ) { // don't start a selection when an // URL field or a graphic is clicked - BOOL bSttSelect = rSh.HasSelection() || + sal_Bool bSttSelect = rSh.HasSelection() || Pointer(POINTER_REFHAND) != GetPointer(); if( !bSttSelect ) { - bSttSelect = TRUE; + bSttSelect = sal_True; if( bExecHyperlinks ) { SwContentAtPos aCntntAtPos( @@ -3228,12 +3232,12 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) if( !rSh.IsViewLocked() && !rSh.IsReadOnlyAvailable() && aCntntAtPos.IsInProtectSect() ) - bLockView = TRUE; + bLockView = sal_True; - bSttSelect = FALSE; + bSttSelect = sal_False; } else if( rSh.IsURLGrfAtPos( aDocPos )) - bSttSelect = FALSE; + bSttSelect = sal_False; } } @@ -3241,7 +3245,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) rSh.SttSelect(); } } - bCallBase = FALSE; + bCallBase = sal_False; break; } default: @@ -3249,10 +3253,10 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) { SwContentAtPos aCntntAtPos( SwContentAtPos::SW_CLICKFIELD | SwContentAtPos::SW_INETATTR ); - if( rSh.GetContentAtPos( aDocPos, aCntntAtPos, FALSE ) && + if( rSh.GetContentAtPos( aDocPos, aCntntAtPos, sal_False ) && !rSh.IsReadOnlyAvailable() && aCntntAtPos.IsInProtectSect() ) - bLockView = TRUE; + bLockView = sal_True; } } @@ -3262,19 +3266,19 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) rSh.ClearGCAttr(); } - BOOL bOverSelect = rSh.ChgCurrPam( aDocPos ), bOverURLGrf = FALSE; + sal_Bool bOverSelect = rSh.ChgCurrPam( aDocPos ), bOverURLGrf = sal_False; if( !bOverSelect ) bOverURLGrf = bOverSelect = 0 != rSh.IsURLGrfAtPos( aDocPos ); if ( !bOverSelect ) { - const BOOL bTmpNoInterrupt = bNoInterrupt; - bNoInterrupt = FALSE; + const sal_Bool bTmpNoInterrupt = bNoInterrupt; + bNoInterrupt = sal_False; if( !rSh.IsViewLocked() && bLockView ) - rSh.LockView( TRUE ); + rSh.LockView( sal_True ); else - bLockView = FALSE; + bLockView = sal_False; int nTmpSetCrsr = 0; @@ -3283,7 +3287,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) MV_KONTEXT( &rSh ); nTmpSetCrsr = (rSh.*rSh.fnSetCrsr)(&aDocPos,bOnlyText); bValidCrsrPos = !(CRSR_POSCHG & nTmpSetCrsr); - bCallBase = FALSE; + bCallBase = sal_False; } // notify the edit window that from now on we do not use the input language @@ -3291,7 +3295,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) SetUseInputLanguage( sal_False ); if( bLockView ) - rSh.LockView( FALSE ); + rSh.LockView( sal_False ); bNoInterrupt = bTmpNoInterrupt; } @@ -3308,7 +3312,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) if( !rSh.IsFrmSelected() ) rSh.GotoNextFly(); rSh.EnterSelFrmMode(); - bCallBase = FALSE; + bCallBase = sal_False; } } // don't reset here any longer so that, in case through MouseMove @@ -3332,7 +3336,7 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt) //ignore key modifiers for format paintbrush { - BOOL bExecFormatPaintbrush = pApplyTempl && pApplyTempl->pFormatClipboard + sal_Bool bExecFormatPaintbrush = pApplyTempl && pApplyTempl->pFormatClipboard && pApplyTempl->pFormatClipboard->HasContent(); if( bExecFormatPaintbrush ) rMEvt = MouseEvent( _rMEvt.GetPosPixel(), _rMEvt.GetClicks(), @@ -3348,7 +3352,7 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt) if( pShadCrsr && 0 != (rMEvt.GetModifier() + rMEvt.GetButtons() ) ) delete pShadCrsr, pShadCrsr = 0; - BOOL bIsDocReadOnly = rView.GetDocShell()->IsReadOnly(); + sal_Bool bIsDocReadOnly = rView.GetDocShell()->IsReadOnly(); SET_CURR_SHELL( &rSh ); @@ -3377,7 +3381,7 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt) } const Point aOldPt( rSh.VisArea().Pos() ); - const BOOL bInsWin = rSh.VisArea().IsInside( aDocPt ); + const sal_Bool bInsWin = rSh.VisArea().IsInside( aDocPt ); if( pShadCrsr && !bInsWin ) delete pShadCrsr, pShadCrsr = 0; @@ -3437,13 +3441,13 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt) } } - BYTE nMouseTabCol; + sal_uInt8 nMouseTabCol; if( !bIsDocReadOnly && bInsWin && !pApplyTempl && !rSh.IsInSelect() ) { if ( SW_TABCOL_NONE != (nMouseTabCol = rSh.WhichMouseTabCol( aDocPt ) ) && !rSh.IsObjSelectable( aDocPt ) ) { - USHORT nPointer = USHRT_MAX; + sal_uInt16 nPointer = USHRT_MAX; bool bChkTblSel = false; switch ( nMouseTabCol ) @@ -3491,7 +3495,7 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt) { // i#42921 - consider vertical mode SwTxtNode* pNodeAtPos = rSh.GetNumRuleNodeAtPos( aDocPt ); - const USHORT nPointer = + const sal_uInt16 nPointer = rSh.IsVerticalModeAtNdAndPos( *pNodeAtPos, aDocPt ) ? POINTER_VSIZEBAR : POINTER_HSIZEBAR; @@ -3501,7 +3505,7 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt) } } - BOOL bDelShadCrsr = TRUE; + sal_Bool bDelShadCrsr = sal_True; switch ( rMEvt.GetModifier() + rMEvt.GetButtons() ) { @@ -3551,10 +3555,10 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt) EnterArea(); if ( rView.GetDrawFuncPtr() ) { - pSdrView->SetOrtho(FALSE); + pSdrView->SetOrtho(sal_False); rView.GetDrawFuncPtr()->MouseMove( rMEvt ); } - bIsInMove = TRUE; + bIsInMove = sal_True; } return; } @@ -3585,7 +3589,7 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt) eSdrMoveHdl = pHdl ? pHdl->GetKind() : HDL_MOVE; } - USHORT nEvent = HDL_MOVE == eSdrMoveHdl + sal_uInt16 nEvent = HDL_MOVE == eSdrMoveHdl ? SW_EVENT_FRM_MOVE : SW_EVENT_FRM_RESIZE; @@ -3596,7 +3600,7 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt) aRszMvHdlPt != aDocPt ) { aRszMvHdlPt = aDocPt; - USHORT nPos = 0; + sal_uInt16 nPos = 0; String sRet; SbxArrayRef xArgs = new SbxArray; SbxVariableRef xVar = new SbxVariable; @@ -3606,7 +3610,7 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt) if( SW_EVENT_FRM_RESIZE == nEvent ) { xVar = new SbxVariable; - xVar->PutUShort( static_cast< UINT16 >(eSdrMoveHdl) ); + xVar->PutUShort( static_cast< sal_uInt16 >(eSdrMoveHdl) ); xArgs->Put( &xVar, ++nPos ); } @@ -3634,17 +3638,17 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt) if ( rMEvt.IsShift() ) { - pSdrView->SetOrtho(TRUE); - pSdrView->SetAngleSnapEnabled(TRUE); + pSdrView->SetOrtho(sal_True); + pSdrView->SetAngleSnapEnabled(sal_True); } else { - pSdrView->SetOrtho(FALSE); - pSdrView->SetAngleSnapEnabled(FALSE); + pSdrView->SetOrtho(sal_False); + pSdrView->SetAngleSnapEnabled(sal_False); } (rSh.*rSh.fnDrag)( &aDocPt, rMEvt.IsShift() ); - bIsInMove = TRUE; + bIsInMove = sal_True; } else if( bIsDocReadOnly ) break; @@ -3666,9 +3670,9 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt) if ( pSdrView ) { if ( rMEvt.IsShift() ) - pSdrView->SetOrtho(TRUE); + pSdrView->SetOrtho(sal_True); else - pSdrView->SetOrtho(FALSE); + pSdrView->SetOrtho(sal_False); } if ( !bInsWin ) { @@ -3683,14 +3687,14 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt) rMEvt.GetModifier() + rMEvt.GetButtons() ) && rSh.Is_FnDragEQBeginDrag() && !rSh.IsAddMode() )) { - (rSh.*rSh.fnDrag)( &aDocPt,FALSE ); + (rSh.*rSh.fnDrag)( &aDocPt,sal_False ); - bValidCrsrPos = !(CRSR_POSCHG & (rSh.*rSh.fnSetCrsr)(&aDocPt,FALSE)); + bValidCrsrPos = !(CRSR_POSCHG & (rSh.*rSh.fnSetCrsr)(&aDocPt,sal_False)); EnterArea(); } } } - bDDINetAttr = FALSE; + bDDINetAttr = sal_False; break; case 0: { @@ -3703,7 +3707,7 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt) // TODO: do the same thing for redlines SW_REDLINE SwRect aFldRect; SwContentAtPos aCntntAtPos( SwContentAtPos::SW_FIELD); - if( rSh.GetContentAtPos( aDocPt, aCntntAtPos, FALSE, &aFldRect ) ) + if( rSh.GetContentAtPos( aDocPt, aCntntAtPos, sal_False, &aFldRect ) ) { const SwField* pFld = aCntntAtPos.aFnd.pFld; if (pFld->Which()== RES_POSTITFLD) @@ -3722,7 +3726,7 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt) case KEY_MOD1: if ( !bInsDraw ) { - BOOL bTstShdwCrsr = TRUE; + sal_Bool bTstShdwCrsr = sal_True; UpdatePointer( aDocPt, rMEvt.GetModifier() ); @@ -3737,7 +3741,7 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt) if( pINet || 0 != ( pTmp = pFmt = rSh.GetFmtFromAnyObj( aDocPt ))) { - bTstShdwCrsr = FALSE; + bTstShdwCrsr = sal_False; if( pTmp == pINet ) aSaveCallEvent.Set( pINet ); else @@ -3755,7 +3759,7 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt) { if( aLastCallEvent.HasEvent() ) rSh.CallEvent( SFX_EVENT_MOUSEOUT_OBJECT, - aLastCallEvent, TRUE ); + aLastCallEvent, sal_True ); // 0 says that the object doesn't have any table if( !rSh.CallEvent( SFX_EVENT_MOUSEOVER_OBJECT, aSaveCallEvent )) @@ -3766,7 +3770,7 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt) { // cursor was on an object rSh.CallEvent( SFX_EVENT_MOUSEOUT_OBJECT, - aLastCallEvent, TRUE ); + aLastCallEvent, sal_True ); } if( bTstShdwCrsr && bInsWin && !bIsDocReadOnly && @@ -3786,8 +3790,8 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt) SwViewOption::GetDirectCursorColor() ); if( text::HoriOrientation::RIGHT != eOrient && text::HoriOrientation::CENTER != eOrient ) eOrient = text::HoriOrientation::LEFT; - pShadCrsr->SetPos( aRect.Pos(), aRect.Height(), static_cast< USHORT >(eOrient) ); - bDelShadCrsr = FALSE; + pShadCrsr->SetPos( aRect.Pos(), aRect.Height(), static_cast< sal_uInt16 >(eOrient) ); + bDelShadCrsr = sal_False; } } } @@ -3795,8 +3799,8 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt) case MOUSE_LEFT + KEY_MOD2: if( rSh.IsBlockMode() && !rMEvt.IsSynthetic() ) { - (rSh.*rSh.fnDrag)( &aDocPt,FALSE ); - bValidCrsrPos = !(CRSR_POSCHG & (rSh.*rSh.fnSetCrsr)(&aDocPt,FALSE)); + (rSh.*rSh.fnDrag)( &aDocPt,sal_False ); + bValidCrsrPos = !(CRSR_POSCHG & (rSh.*rSh.fnSetCrsr)(&aDocPt,sal_False)); EnterArea(); } break; @@ -3804,7 +3808,7 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt) if( bDelShadCrsr && pShadCrsr ) delete pShadCrsr, pShadCrsr = 0; - bWasShdwCrsr = FALSE; + bWasShdwCrsr = sal_False; } /*-------------------------------------------------------------------- @@ -3813,10 +3817,10 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt) void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) { - BOOL bCallBase = TRUE; + sal_Bool bCallBase = sal_True; - BOOL bCallShadowCrsr = bWasShdwCrsr; - bWasShdwCrsr = FALSE; + sal_Bool bCallShadowCrsr = bWasShdwCrsr; + bWasShdwCrsr = sal_False; if( pShadCrsr ) delete pShadCrsr, pShadCrsr = 0; @@ -3827,7 +3831,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) eSdrMoveHdl = HDL_USER; // for MoveEvents - reset again // preventively reset - rView.SetTabColFromDoc( FALSE ); + rView.SetTabColFromDoc( sal_False ); rView.SetNumRuleNodeFromDoc(NULL); SwWrtShell &rSh = rView.GetWrtShell(); @@ -3835,11 +3839,11 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) SdrView *pSdrView = rSh.GetDrawView(); if ( pSdrView ) { - pSdrView->SetOrtho(FALSE); + pSdrView->SetOrtho(sal_False); if ( pSdrView->MouseButtonUp( rMEvt,this ) ) { - rSh.GetView().GetViewFrame()->GetBindings().InvalidateAll(FALSE); + rSh.GetView().GetViewFrame()->GetBindings().InvalidateAll(sal_False); return; // SdrView's event evaluated } } @@ -3857,13 +3861,13 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) if ( bDDTimerStarted ) { StopDDTimer( &rSh, aDocPt ); - bMBPressed = FALSE; + bMBPressed = sal_False; if ( rSh.IsSelFrmMode() ) { - (rSh.*rSh.fnEndDrag)( &aDocPt, FALSE ); - bFrmDrag = FALSE; + (rSh.*rSh.fnEndDrag)( &aDocPt, sal_False ); + bFrmDrag = sal_False; } - bNoInterrupt = FALSE; + bNoInterrupt = sal_False; ReleaseMouse(); return; } @@ -3873,7 +3877,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) Point aPnt( pAnchorMarker->GetLastPos() ); DELETEZ( pAnchorMarker ); if( aPnt.X() || aPnt.Y() ) - rSh.FindAnchorPos( aPnt, TRUE ); + rSh.FindAnchorPos( aPnt, sal_True ); } if ( bInsDraw && rView.GetDrawFuncPtr() ) { @@ -3896,7 +3900,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) { rSh.EnterSelFrmMode(); if (!rView.GetDrawFuncPtr()) - StdDrawMode( OBJ_NONE, TRUE ); + StdDrawMode( OBJ_NONE, sal_True ); } else if ( rSh.IsFrmSelected() ) { @@ -3906,7 +3910,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) else { const Point aDocPos( PixelToLogic( aStartPos ) ); - bValidCrsrPos = !(CRSR_POSCHG & (rSh.*rSh.fnSetCrsr)(&aDocPos,FALSE)); + bValidCrsrPos = !(CRSR_POSCHG & (rSh.*rSh.fnSetCrsr)(&aDocPos,sal_False)); rSh.Edit(); } @@ -3915,17 +3919,17 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) else if (rMEvt.GetButtons() == MOUSE_RIGHT && rSh.IsDrawCreate()) rView.GetDrawFuncPtr()->BreakCreate(); // abort drawing - bNoInterrupt = FALSE; + bNoInterrupt = sal_False; ReleaseMouse(); return; } - BOOL bPopMode = FALSE; + sal_Bool bPopMode = sal_False; switch ( rMEvt.GetModifier() + rMEvt.GetButtons() ) { case MOUSE_LEFT: if ( bInsDraw && rSh.IsDrawCreate() ) { - if ( rView.GetDrawFuncPtr() && rView.GetDrawFuncPtr()->MouseButtonUp(rMEvt) == TRUE ) + if ( rView.GetDrawFuncPtr() && rView.GetDrawFuncPtr()->MouseButtonUp(rMEvt) == sal_True ) { rView.GetDrawFuncPtr()->Deactivate(); rView.AttrChangedNotify( &rSh ); @@ -3934,7 +3938,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) if ( rView.GetDrawFuncPtr() && bInsFrm ) StopInsFrm(); } - bCallBase = FALSE; + bCallBase = sal_False; break; } case MOUSE_LEFT + KEY_MOD1: @@ -3964,12 +3968,12 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) if ( aSttPt != aEndPt ) { rSh.StartUndo( UNDO_UI_DRAG_AND_COPY ); - rSh.Copy(&rSh, aSttPt, aEndPt, FALSE); + rSh.Copy(&rSh, aSttPt, aEndPt, sal_False); rSh.EndUndo( UNDO_UI_DRAG_AND_COPY ); } } else - (rSh.*rSh.fnEndDrag)( &aDocPt,FALSE ); + (rSh.*rSh.fnEndDrag)( &aDocPt,sal_False ); } else { @@ -3977,7 +3981,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) const SwFrmFmt* pFlyFmt; const SvxMacro* pMacro; - USHORT nEvent = HDL_MOVE == eOldSdrMoveHdl + sal_uInt16 nEvent = HDL_MOVE == eOldSdrMoveHdl ? SW_EVENT_FRM_MOVE : SW_EVENT_FRM_RESIZE; @@ -3987,7 +3991,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) { const Point aSttPt( PixelToLogic( aStartPos ) ); aRszMvHdlPt = aDocPt; - USHORT nPos = 0; + sal_uInt16 nPos = 0; SbxArrayRef xArgs = new SbxArray; SbxVariableRef xVar = new SbxVariable; xVar->PutString( pFlyFmt->GetName() ); @@ -3996,7 +4000,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) if( SW_EVENT_FRM_RESIZE == nEvent ) { xVar = new SbxVariable; - xVar->PutUShort( static_cast< UINT16 >(eOldSdrMoveHdl) ); + xVar->PutUShort( static_cast< sal_uInt16 >(eOldSdrMoveHdl) ); xArgs->Put( &xVar, ++nPos ); } @@ -4018,82 +4022,82 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) CaptureMouse(); } } - (rSh.*rSh.fnEndDrag)( &aDocPt,FALSE ); + (rSh.*rSh.fnEndDrag)( &aDocPt,sal_False ); } - bFrmDrag = FALSE; - bCallBase = FALSE; + bFrmDrag = sal_False; + bCallBase = sal_False; break; } - bPopMode = TRUE; + bPopMode = sal_True; // no break case MOUSE_LEFT + KEY_SHIFT: if (rSh.IsSelFrmMode()) { - (rSh.*rSh.fnEndDrag)( &aDocPt, FALSE ); - bFrmDrag = FALSE; - bCallBase = FALSE; + (rSh.*rSh.fnEndDrag)( &aDocPt, sal_False ); + bFrmDrag = sal_False; + bCallBase = sal_False; break; } if( bHoldSelection ) { // the EndDrag should be called in any case - bHoldSelection = FALSE; - (rSh.*rSh.fnEndDrag)( &aDocPt, FALSE ); + bHoldSelection = sal_False; + (rSh.*rSh.fnEndDrag)( &aDocPt, sal_False ); } else { if ( !rSh.IsInSelect() && rSh.ChgCurrPam( aDocPt ) ) { - const BOOL bTmpNoInterrupt = bNoInterrupt; - bNoInterrupt = FALSE; + const sal_Bool bTmpNoInterrupt = bNoInterrupt; + bNoInterrupt = sal_False; { // create only temporary move context because otherwise // the query to the content form doesn't work!!! MV_KONTEXT( &rSh ); const Point aDocPos( PixelToLogic( aStartPos ) ); - bValidCrsrPos = !(CRSR_POSCHG & (rSh.*rSh.fnSetCrsr)(&aDocPos,FALSE)); + bValidCrsrPos = !(CRSR_POSCHG & (rSh.*rSh.fnSetCrsr)(&aDocPos,sal_False)); } bNoInterrupt = bTmpNoInterrupt; } else { - BOOL bInSel = rSh.IsInSelect(); - (rSh.*rSh.fnEndDrag)( &aDocPt, FALSE ); + sal_Bool bInSel = rSh.IsInSelect(); + (rSh.*rSh.fnEndDrag)( &aDocPt, sal_False ); // Internetfield? --> call link (load doc!!) if( !bInSel ) { - USHORT nFilter = URLLOAD_NOFILTER; + sal_uInt16 nFilter = URLLOAD_NOFILTER; if( KEY_MOD1 == rMEvt.GetModifier() ) nFilter |= URLLOAD_NEWVIEW; - BOOL bExecHyperlinks = rView.GetDocShell()->IsReadOnly(); + sal_Bool bExecHyperlinks = rView.GetDocShell()->IsReadOnly(); if ( !bExecHyperlinks ) { SvtSecurityOptions aSecOpts; - const BOOL bSecureOption = aSecOpts.IsOptionSet( SvtSecurityOptions::E_CTRLCLICK_HYPERLINK ); + const sal_Bool bSecureOption = aSecOpts.IsOptionSet( SvtSecurityOptions::E_CTRLCLICK_HYPERLINK ); if ( ( bSecureOption && rMEvt.GetModifier() == KEY_MOD1 ) || ( !bSecureOption && rMEvt.GetModifier() != KEY_MOD1 ) ) - bExecHyperlinks = TRUE; + bExecHyperlinks = sal_True; } - const BOOL bExecSmarttags = rMEvt.GetModifier() == KEY_MOD1; + const sal_Bool bExecSmarttags = rMEvt.GetModifier() == KEY_MOD1; if(pApplyTempl) - bExecHyperlinks = FALSE; + bExecHyperlinks = sal_False; SwContentAtPos aCntntAtPos( SwContentAtPos::SW_CLICKFIELD | SwContentAtPos::SW_INETATTR | SwContentAtPos::SW_SMARTTAG | SwContentAtPos::SW_FORMCTRL); - if( rSh.GetContentAtPos( aDocPt, aCntntAtPos, TRUE ) ) + if( rSh.GetContentAtPos( aDocPt, aCntntAtPos, sal_True ) ) { - BOOL bViewLocked = rSh.IsViewLocked(); + sal_Bool bViewLocked = rSh.IsViewLocked(); if( !bViewLocked && !rSh.IsReadOnlyAvailable() && aCntntAtPos.IsInProtectSect() ) - rSh.LockView( TRUE ); + rSh.LockView( sal_True ); ReleaseMouse(); @@ -4135,12 +4139,12 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) } rSh.LockView( bViewLocked ); - bCallShadowCrsr = FALSE; + bCallShadowCrsr = sal_False; } else { aCntntAtPos = SwContentAtPos( SwContentAtPos::SW_FTN ); - if( !rSh.GetContentAtPos( aDocPt, aCntntAtPos, TRUE ) && bExecHyperlinks ) + if( !rSh.GetContentAtPos( aDocPt, aCntntAtPos, sal_True ) && bExecHyperlinks ) { SdrViewEvent aVEvt; @@ -4157,14 +4161,14 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) String sTarget(pField->GetTargetFrame()); ::LoadURL( sURL, &rSh, nFilter, &sTarget); } - bCallShadowCrsr = FALSE; + bCallShadowCrsr = sal_False; } else { // hit graphic ReleaseMouse(); if( rSh.ClickToINetGrf( aDocPt, nFilter )) - bCallShadowCrsr = FALSE; + bCallShadowCrsr = sal_False; } } } @@ -4176,14 +4180,20 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) !GetConnectMetaFile() && rSh.VisArea().IsInside( aDocPt )) { - if( UNDO_INS_FROM_SHADOWCRSR == rSh.GetUndoIds() ) - rSh.Undo(); + SwUndoId nLastUndoId(UNDO_EMPTY); + if (rSh.GetLastUndoInfo(0, & nLastUndoId)) + { + if (UNDO_INS_FROM_SHADOWCRSR == nLastUndoId) + { + rSh.Undo(); + } + } SwFillMode eMode = (SwFillMode)rSh.GetViewOptions()->GetShdwCrsrFillMode(); rSh.SetShadowCrsrPos( aDocPt, eMode ); } } } - bCallBase = FALSE; + bCallBase = sal_False; } @@ -4191,8 +4201,8 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) if ( bPopMode && bModePushed ) { rSh.PopMode(); - bModePushed = FALSE; - bCallBase = FALSE; + bModePushed = sal_False; + bCallBase = sal_False; } break; @@ -4230,7 +4240,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) } else if( pApplyTempl->nColor ) { - USHORT nId = 0; + sal_uInt16 nId = 0; switch( pApplyTempl->nColor ) { case SID_ATTR_CHAR_COLOR_EXT: @@ -4257,8 +4267,8 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) rSh.EnterStdMode(); rSh.SetVisCrsr(aDocPt); - pApplyTempl->bUndo = TRUE; - bCallBase = FALSE; + pApplyTempl->bUndo = sal_True; + bCallBase = sal_False; aTemplateTimer.Stop(); } else if(rMEvt.GetClicks() == 1) @@ -4278,8 +4288,8 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) & eSelection ) && !rSh.HasReadonlySel() ) { rSh.SetTxtFmtColl( pApplyTempl->aColl.pTxtColl ); - pApplyTempl->bUndo = TRUE; - bCallBase = FALSE; + pApplyTempl->bUndo = sal_True; + bCallBase = sal_False; if ( pApplyTempl->aColl.pTxtColl ) aStyleName = pApplyTempl->aColl.pTxtColl->GetName(); } @@ -4292,8 +4302,8 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) rSh.UnSetVisCrsr(); rSh.EnterStdMode(); rSh.SetVisCrsr(aDocPt); - pApplyTempl->bUndo = TRUE; - bCallBase = FALSE; + pApplyTempl->bUndo = sal_True; + bCallBase = sal_False; if ( pApplyTempl->aColl.pCharFmt ) aStyleName = pApplyTempl->aColl.pCharFmt->GetName(); } @@ -4303,9 +4313,9 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) const SwFrmFmt* pFmt = rSh.GetFmtFromObj( aDocPt ); if(PTR_CAST(SwFlyFrmFmt, pFmt)) { - rSh.SetFrmFmt( pApplyTempl->aColl.pFrmFmt, FALSE, &aDocPt ); - pApplyTempl->bUndo = TRUE; - bCallBase = FALSE; + rSh.SetFrmFmt( pApplyTempl->aColl.pFrmFmt, sal_False, &aDocPt ); + pApplyTempl->bUndo = sal_True; + bCallBase = sal_False; if( pApplyTempl->aColl.pFrmFmt ) aStyleName = pApplyTempl->aColl.pFrmFmt->GetName(); } @@ -4316,7 +4326,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) rSh.ChgCurPageDesc( *pApplyTempl->aColl.pPageDesc ); if ( pApplyTempl->aColl.pPageDesc ) aStyleName = pApplyTempl->aColl.pPageDesc->GetName(); - bCallBase = FALSE; + bCallBase = sal_False; break; case SFX_STYLE_FAMILY_PSEUDO: if( !rSh.HasReadonlySel() ) @@ -4324,8 +4334,8 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) rSh.SetCurNumRule( *pApplyTempl->aColl.pNumRule, false, pApplyTempl->aColl.pNumRule->GetDefaultListId() ); - bCallBase = FALSE; - pApplyTempl->bUndo = TRUE; + bCallBase = sal_False; + pApplyTempl->bUndo = sal_True; if( pApplyTempl->aColl.pNumRule ) aStyleName = pApplyTempl->aColl.pNumRule->GetName(); } @@ -4341,7 +4351,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) { SfxRequest aReq( rView.GetViewFrame(), SID_STYLE_APPLY ); aReq.AppendItem( SfxStringItem( SID_STYLE_APPLY, aStyleName ) ); - aReq.AppendItem( SfxUInt16Item( SID_STYLE_FAMILY, (USHORT) pApplyTempl->eType ) ); + aReq.AppendItem( SfxUInt16Item( SID_STYLE_FAMILY, (sal_uInt16) pApplyTempl->eType ) ); aReq.Done(); } } @@ -4351,12 +4361,12 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) ReleaseMouse(); // Only processed MouseEvents arrive here; only at these the moduses can // be resetted. - bMBPressed = FALSE; + bMBPressed = sal_False; //sicherheitshalber aufrufen, da jetzt das Selektieren bestimmt zu Ende ist. //Andernfalls koennte der Timeout des Timers Kummer machen. EnterArea(); - bNoInterrupt = FALSE; + bNoInterrupt = sal_False; if (bCallBase) Window::MouseButtonUp(rMEvt); @@ -4368,7 +4378,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) void SwEditWin::SetApplyTemplate(const SwApplyTemplate &rTempl) { - static BOOL bIdle = FALSE; + static sal_Bool bIdle = sal_False; DELETEZ(pApplyTempl); SwWrtShell &rSh = rView.GetWrtShell(); @@ -4376,25 +4386,25 @@ void SwEditWin::SetApplyTemplate(const SwApplyTemplate &rTempl) { pApplyTempl = new SwApplyTemplate( rTempl ); SetPointer( POINTER_FILL );//@todo #i20119# maybe better a new brush pointer here in future - rSh.NoEdit( FALSE ); + rSh.NoEdit( sal_False ); bIdle = rSh.GetViewOptions()->IsIdle(); - ((SwViewOption *)rSh.GetViewOptions())->SetIdle( FALSE ); + ((SwViewOption *)rSh.GetViewOptions())->SetIdle( sal_False ); } else if(rTempl.nColor) { pApplyTempl = new SwApplyTemplate( rTempl ); SetPointer( POINTER_FILL ); - rSh.NoEdit( FALSE ); + rSh.NoEdit( sal_False ); bIdle = rSh.GetViewOptions()->IsIdle(); - ((SwViewOption *)rSh.GetViewOptions())->SetIdle( FALSE ); + ((SwViewOption *)rSh.GetViewOptions())->SetIdle( sal_False ); } else if( rTempl.eType ) { pApplyTempl = new SwApplyTemplate( rTempl ); SetPointer( POINTER_FILL ); - rSh.NoEdit( FALSE ); + rSh.NoEdit( sal_False ); bIdle = rSh.GetViewOptions()->IsIdle(); - ((SwViewOption *)rSh.GetViewOptions())->SetIdle( FALSE ); + ((SwViewOption *)rSh.GetViewOptions())->SetIdle( sal_False ); } else { @@ -4406,7 +4416,7 @@ void SwEditWin::SetApplyTemplate(const SwApplyTemplate &rTempl) rSh.Edit(); } - static USHORT const aInva[] = + static sal_uInt16 aInva[] = { SID_STYLE_WATERCAN, SID_ATTR_CHAR_COLOR_EXT, @@ -4443,8 +4453,8 @@ SwEditWin::SwEditWin(Window *pParent, SwView &rMyView): nInsFrmColCount( 1 ), eDrawMode(OBJ_NONE), - bLockInput(FALSE), - bObjectSelect( FALSE ), + bLockInput(sal_False), + bObjectSelect( sal_False ), nKS_NUMDOWN_Count(0), nKS_NUMINDENTINC_Count(0) { @@ -4453,7 +4463,7 @@ SwEditWin::SwEditWin(Window *pParent, SwView &rMyView): SetDialogControlFlags( WINDOW_DLGCTRL_RETURN | WINDOW_DLGCTRL_WANTFOCUS ); bLinkRemoved = bMBPressed = bInsDraw = bInsFrm = - bIsInDrag = bOldIdle = bOldIdleSet = bChainMode = bWasShdwCrsr = FALSE; + bIsInDrag = bOldIdle = bOldIdleSet = bChainMode = bWasShdwCrsr = sal_False; // initially use the input language bUseInputLanguage = sal_True; @@ -4462,7 +4472,7 @@ SwEditWin::SwEditWin(Window *pParent, SwView &rMyView): SetPointer( POINTER_TEXT ); aTimer.SetTimeoutHdl(LINK(this, SwEditWin, TimerHandler)); - bTblInsDelMode = FALSE; + bTblInsDelMode = sal_False; aKeyInputTimer.SetTimeout( 3000 ); aKeyInputTimer.SetTimeoutHdl(LINK(this, SwEditWin, KeyInputTimerHandler)); @@ -4491,7 +4501,7 @@ SwEditWin::~SwEditWin() delete pRowColumnSelectionStart; if( pQuickHlpData->bClear && rView.GetWrtShellPtr() ) pQuickHlpData->Stop( rView.GetWrtShell() ); - bExecuteDrag = FALSE; + bExecuteDrag = sal_False; delete pApplyTempl; rView.SetDrawFuncPtr(NULL); @@ -4509,7 +4519,7 @@ SwEditWin::~SwEditWin() void SwEditWin::EnterDrawTextMode( const Point& aDocPos ) { - if ( rView.EnterDrawTextMode(aDocPos) == TRUE ) + if ( rView.EnterDrawTextMode(aDocPos) == sal_True ) { if (rView.GetDrawFuncPtr()) { @@ -4526,7 +4536,7 @@ void SwEditWin::EnterDrawTextMode( const Point& aDocPos ) * Description: turn on DrawMode ******************************************************************************/ -BOOL SwEditWin::EnterDrawMode(const MouseEvent& rMEvt, const Point& aDocPos) +sal_Bool SwEditWin::EnterDrawMode(const MouseEvent& rMEvt, const Point& aDocPos) { SwWrtShell &rSh = rView.GetWrtShell(); SdrView *pSdrView = rSh.GetDrawView(); @@ -4534,17 +4544,17 @@ BOOL SwEditWin::EnterDrawMode(const MouseEvent& rMEvt, const Point& aDocPos) if ( rView.GetDrawFuncPtr() ) { if (rSh.IsDrawCreate()) - return TRUE; + return sal_True; - BOOL bRet = rView.GetDrawFuncPtr()->MouseButtonDown( rMEvt ); + sal_Bool bRet = rView.GetDrawFuncPtr()->MouseButtonDown( rMEvt ); rView.AttrChangedNotify( &rSh ); return bRet; } if ( pSdrView && pSdrView->IsTextEdit() ) { - BOOL bUnLockView = !rSh.IsViewLocked(); - rSh.LockView( TRUE ); + sal_Bool bUnLockView = !rSh.IsViewLocked(); + rSh.LockView( sal_True ); rSh.EndTextEdit(); // clicked aside, end Edit rSh.SelectObj( aDocPos ); @@ -4554,17 +4564,17 @@ BOOL SwEditWin::EnterDrawMode(const MouseEvent& rMEvt, const Point& aDocPos) { SwEditWin::nDDStartPosY = aDocPos.Y(); SwEditWin::nDDStartPosX = aDocPos.X(); - bFrmDrag = TRUE; + bFrmDrag = sal_True; } if( bUnLockView ) - rSh.LockView( FALSE ); + rSh.LockView( sal_False ); rView.AttrChangedNotify( &rSh ); - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } -BOOL SwEditWin::IsDrawSelMode() +sal_Bool SwEditWin::IsDrawSelMode() { return IsObjectSelect(); } @@ -4608,20 +4618,20 @@ void SwEditWin::Command( const CommandEvent& rCEvt ) // to deactivate the inplace client without any problem regarding parent // windows and code on the stack. SfxInPlaceClient* pIPClient = rSh.GetSfxViewShell()->GetIPClient(); - BOOL bIsOleActive = ( pIPClient && pIPClient->IsObjectInPlaceActive() ); + sal_Bool bIsOleActive = ( pIPClient && pIPClient->IsObjectInPlaceActive() ); if ( bIsOleActive && ( rCEvt.GetCommand() == COMMAND_CONTEXTMENU )) { rSh.FinishOLEObj(); return; } - BOOL bCallBase = TRUE; + sal_Bool bCallBase = sal_True; switch ( rCEvt.GetCommand() ) { case COMMAND_CONTEXTMENU: { - const USHORT nId = SwInputChild::GetChildWindowId(); + const sal_uInt16 nId = SwInputChild::GetChildWindowId(); SwInputChild* pChildWin = (SwInputChild*)GetView().GetViewFrame()-> GetChildWindow( nId ); @@ -4634,11 +4644,11 @@ void SwEditWin::Command( const CommandEvent& rCEvt ) SET_CURR_SHELL( &rSh ); if (!pApplyTempl) { - if (bNoInterrupt == TRUE) + if (bNoInterrupt == sal_True) { ReleaseMouse(); - bNoInterrupt = FALSE; - bMBPressed = FALSE; + bNoInterrupt = sal_False; + bMBPressed = sal_False; } Point aDocPos( PixelToLogic( rCEvt.GetMousePosPixel() ) ); if ( !rCEvt.IsMouseEvent() ) @@ -4665,7 +4675,7 @@ void SwEditWin::Command( const CommandEvent& rCEvt ) { if ( pMenu ) { - USHORT nExecId = ((PopupMenu*)pMenu)->Execute(this, aPixPos); + sal_uInt16 nExecId = ((PopupMenu*)pMenu)->Execute(this, aPixPos); if( !::ExecuteMenuCommand( *static_cast<PopupMenu*>(pMenu), *rView.GetViewFrame(), nExecId )) pROPopup->Execute(this, nExecId); } @@ -4679,7 +4689,7 @@ void SwEditWin::Command( const CommandEvent& rCEvt ) } else if (pApplyTempl->bUndo) rSh.Do(SwWrtShell::UNDO); - bCallBase = FALSE; + bCallBase = sal_False; } } break; @@ -4697,7 +4707,7 @@ void SwEditWin::Command( const CommandEvent& rCEvt ) // forward to Outliner if applicable if ( rSh.HasDrawView() && rSh.GetDrawView()->IsTextEdit() ) { - bCallBase = FALSE; + bCallBase = sal_False; rSh.GetDrawView()->GetTextEditOutlinerView()->Command( rCEvt ); break; } @@ -4706,7 +4716,7 @@ void SwEditWin::Command( const CommandEvent& rCEvt ) if ( VOICECOMMANDTYPE_CONTROL == pCData->GetType() ) break; - USHORT nSlotId = 0; + sal_uInt16 nSlotId = 0; SfxPoolItem *pItem = 0; switch ( pCData->GetCommand() ) @@ -4765,7 +4775,7 @@ void SwEditWin::Command( const CommandEvent& rCEvt ) } if ( nSlotId ) { - bCallBase = FALSE; + bCallBase = sal_False; if ( pItem ) { const SfxPoolItem* aArgs[2]; @@ -4783,13 +4793,13 @@ void SwEditWin::Command( const CommandEvent& rCEvt ) case COMMAND_STARTEXTTEXTINPUT: { - BOOL bIsDocReadOnly = rView.GetDocShell()->IsReadOnly() && + sal_Bool bIsDocReadOnly = rView.GetDocShell()->IsReadOnly() && rSh.IsCrsrReadonly(); if(!bIsDocReadOnly) { if( rSh.HasDrawView() && rSh.GetDrawView()->IsTextEdit() ) { - bCallBase = FALSE; + bCallBase = sal_False; rSh.GetDrawView()->GetTextEditOutlinerView()->Command( rCEvt ); } else @@ -4797,7 +4807,7 @@ void SwEditWin::Command( const CommandEvent& rCEvt ) if( rSh.HasSelection() ) rSh.DelRight(); - bCallBase = FALSE; + bCallBase = sal_False; LanguageType eInputLanguage = GetInputLanguage(); rSh.CreateExtTextInput(eInputLanguage); } @@ -4806,18 +4816,18 @@ void SwEditWin::Command( const CommandEvent& rCEvt ) } case COMMAND_ENDEXTTEXTINPUT: { - BOOL bIsDocReadOnly = rView.GetDocShell()->IsReadOnly() && + sal_Bool bIsDocReadOnly = rView.GetDocShell()->IsReadOnly() && rSh.IsCrsrReadonly(); if(!bIsDocReadOnly) { if( rSh.HasDrawView() && rSh.GetDrawView()->IsTextEdit() ) { - bCallBase = FALSE; + bCallBase = sal_False; rSh.GetDrawView()->GetTextEditOutlinerView()->Command( rCEvt ); } else { - bCallBase = FALSE; + bCallBase = sal_False; String sRecord = rSh.DeleteExtTextInput(); uno::Reference< frame::XDispatchRecorder > xRecorder = rView.GetViewFrame()->GetBindings().GetRecorder(); @@ -4857,7 +4867,7 @@ void SwEditWin::Command( const CommandEvent& rCEvt ) break; case COMMAND_EXTTEXTINPUT: { - BOOL bIsDocReadOnly = rView.GetDocShell()->IsReadOnly() && + sal_Bool bIsDocReadOnly = rView.GetDocShell()->IsReadOnly() && rSh.IsCrsrReadonly(); if(!bIsDocReadOnly) { @@ -4870,7 +4880,7 @@ void SwEditWin::Command( const CommandEvent& rCEvt ) String sWord; if( rSh.HasDrawView() && rSh.GetDrawView()->IsTextEdit() ) { - bCallBase = FALSE; + bCallBase = sal_False; rSh.GetDrawView()->GetTextEditOutlinerView()->Command( rCEvt ); } else @@ -4879,7 +4889,7 @@ void SwEditWin::Command( const CommandEvent& rCEvt ) if( pData ) { sWord = pData->GetText(); - bCallBase = FALSE; + bCallBase = sal_False; rSh.SetExtTextInputData( *pData ); } } @@ -4912,8 +4922,8 @@ void SwEditWin::Command( const CommandEvent& rCEvt ) if( !aDataHelper.GetXTransferable().is() ) break; - ULONG nDropFormat; - USHORT nEventAction, nDropAction, nDropDestination; + sal_uLong nDropFormat; + sal_uInt16 nEventAction, nDropAction, nDropDestination; nDropDestination = GetDropDestination( rCEvt.GetMousePosPixel() ); if( !nDropDestination ) break; @@ -4927,9 +4937,9 @@ void SwEditWin::Command( const CommandEvent& rCEvt ) { const Point aDocPt( PixelToLogic( rCEvt.GetMousePosPixel() ) ); SwTransferable::PasteData( aDataHelper, rSh, nDropAction, - nDropFormat, nDropDestination, FALSE, - FALSE, &aDocPt, EXCHG_IN_ACTION_COPY, - TRUE ); + nDropFormat, nDropDestination, sal_False, + sal_False, &aDocPt, EXCHG_IN_ACTION_COPY, + sal_True ); } } break; @@ -4938,7 +4948,7 @@ void SwEditWin::Command( const CommandEvent& rCEvt ) const CommandModKeyData* pCommandData = (const CommandModKeyData*)rCEvt.GetData(); if(pCommandData->IsMod1() && !pCommandData->IsMod2()) { - USHORT nSlot = 0; + sal_uInt16 nSlot = 0; if(pCommandData->IsLeftShift() && !pCommandData->IsRightShift()) nSlot = SID_ATTR_PARA_LEFT_TO_RIGHT; else if(!pCommandData->IsLeftShift() && pCommandData->IsRightShift()) @@ -4961,10 +4971,10 @@ void SwEditWin::Command( const CommandEvent& rCEvt ) const CommandSelectionChangeData *pData = rCEvt.GetSelectionChangeData(); rSh.SttCrsrMove(); rSh.GoStartSentence(); - rSh.GetCrsr()->GetPoint()->nContent += sal::static_int_cast<sal_uInt16, ULONG>(pData->GetStart()); + rSh.GetCrsr()->GetPoint()->nContent += sal::static_int_cast<sal_uInt16, sal_uLong>(pData->GetStart()); rSh.SetMark(); - rSh.GetCrsr()->GetMark()->nContent += sal::static_int_cast<sal_uInt16, ULONG>(pData->GetEnd() - pData->GetStart()); - rSh.EndCrsrMove( TRUE ); + rSh.GetCrsr()->GetMark()->nContent += sal::static_int_cast<sal_uInt16, sal_uLong>(pData->GetEnd() - pData->GetStart()); + rSh.EndCrsrMove( sal_True ); } break; case COMMAND_PREPARERECONVERSION: @@ -4988,9 +4998,9 @@ void SwEditWin::Command( const CommandEvent& rCEvt ) if( pCrsr ) { - ULONG nPosNodeIdx = pCrsr->GetPoint()->nNode.GetIndex(); + sal_uLong nPosNodeIdx = pCrsr->GetPoint()->nNode.GetIndex(); xub_StrLen nPosIdx = pCrsr->GetPoint()->nContent.GetIndex(); - ULONG nMarkNodeIdx = pCrsr->GetMark()->nNode.GetIndex(); + sal_uLong nMarkNodeIdx = pCrsr->GetMark()->nNode.GetIndex(); xub_StrLen nMarkIdx = pCrsr->GetMark()->nContent.GetIndex(); if( !rSh.GetCrsr()->HasMark() ) @@ -5004,7 +5014,7 @@ void SwEditWin::Command( const CommandEvent& rCEvt ) rSh.GetCrsr()->GetPoint()->nContent = nPosIdx; rSh.GetCrsr()->GetMark()->nNode = nPosNodeIdx; rSh.GetCrsr()->GetMark()->nContent = - rSh.GetCrsr()->GetCntntNode( TRUE )->Len(); + rSh.GetCrsr()->GetCntntNode( sal_True )->Len(); } else if( nPosNodeIdx == nMarkNodeIdx ) { @@ -5019,10 +5029,10 @@ void SwEditWin::Command( const CommandEvent& rCEvt ) rSh.GetCrsr()->GetMark()->nContent = nMarkIdx; rSh.GetCrsr()->GetPoint()->nNode = nMarkNodeIdx; rSh.GetCrsr()->GetPoint()->nContent = - rSh.GetCrsr()->GetCntntNode( FALSE )->Len(); + rSh.GetCrsr()->GetCntntNode( sal_False )->Len(); } - rSh.EndCrsrMove( TRUE ); + rSh.EndCrsrMove( sal_True ); } } break; @@ -5037,9 +5047,9 @@ void SwEditWin::Command( const CommandEvent& rCEvt ) /* i#18686 select the object/cursor at the mouse position of the context menu request */ -BOOL SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos ) +sal_Bool SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos ) { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; const Point aDocPos( PixelToLogic( rMousePos ) ); const bool bIsInsideSelectedObj( rSh.IsInsideSelectedObj( aDocPos ) ); //create a synthetic mouse event out of the coordinates @@ -5069,7 +5079,7 @@ BOOL SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos ) if(!aSelection.IsZero()) { SdrOutliner* pOutliner = pSdrView->GetTextEditOutliner(); - BOOL bVertical = pOutliner->IsVertical(); + sal_Bool bVertical = pOutliner->IsVertical(); const EditEngine& rEditEng = pOutliner->GetEditEngine(); Point aEEPos(aDocPos); const Rectangle& rOutputArea = pOLV->GetOutputArea(); @@ -5091,7 +5101,7 @@ BOOL SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos ) aSelection.Adjust(); if(!aCompare.IsLess(aSelection) && !aCompare.IsGreater(aSelection)) { - return FALSE; + return sal_False; } } @@ -5100,15 +5110,15 @@ BOOL SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos ) if (pSdrView->MouseButtonDown( aMEvt, this ) ) { pSdrView->MouseButtonUp( aMEvt, this ); - rSh.GetView().GetViewFrame()->GetBindings().InvalidateAll(FALSE); - return TRUE; + rSh.GetView().GetViewFrame()->GetBindings().InvalidateAll(sal_False); + return sal_True; } } rSh.ResetCursorStack(); if ( EnterDrawMode( aMEvt, aDocPos ) ) { - return TRUE; + return sal_True; } if ( rView.GetDrawFuncPtr() && bInsFrm ) { @@ -5129,15 +5139,15 @@ BOOL SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos ) rView.NoRotate(); rSh.HideCrsr(); - BOOL bUnLockView = !rSh.IsViewLocked(); - rSh.LockView( TRUE ); - BOOL bSelObj = rSh.SelectObj( aDocPos, 0); + sal_Bool bUnLockView = !rSh.IsViewLocked(); + rSh.LockView( sal_True ); + sal_Bool bSelObj = rSh.SelectObj( aDocPos, 0); if( bUnLockView ) - rSh.LockView( FALSE ); + rSh.LockView( sal_False ); if( bSelObj ) { - bRet = TRUE; + bRet = sal_True; // in case the frame was deselected in the macro // just the cursor has to be displayed again. if( FRMTYPE_NONE == rSh.GetSelFrmType() ) @@ -5153,7 +5163,7 @@ BOOL SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos ) } rSh.EnterSelFrmMode( &aDocPos ); - bFrmDrag = TRUE; + bFrmDrag = sal_True; UpdatePointer( aDocPos, 0 ); return bRet; } @@ -5168,31 +5178,31 @@ BOOL SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos ) !bIsInsideSelectedObj)) { rView.NoRotate(); - BOOL bUnLockView = !rSh.IsViewLocked(); - rSh.LockView( TRUE ); - BYTE nFlag = 0; + sal_Bool bUnLockView = !rSh.IsViewLocked(); + rSh.LockView( sal_True ); + sal_uInt8 nFlag = 0; if ( rSh.IsSelFrmMode() ) { rSh.UnSelectFrm(); rSh.LeaveSelFrmMode(); rView.AttrChangedNotify(&rSh); - bRet = TRUE; + bRet = sal_True; } - BOOL bSelObj = rSh.SelectObj( aDocPos, nFlag ); + sal_Bool bSelObj = rSh.SelectObj( aDocPos, nFlag ); if( bUnLockView ) - rSh.LockView( FALSE ); + rSh.LockView( sal_False ); if( !bSelObj ) { // move cursor here so that it is not drawn in the // frame at first; ShowCrsr() happens in LeaveSelFrmMode() - bValidCrsrPos = !(CRSR_POSCHG & (rSh.*rSh.fnSetCrsr)(&aDocPos,FALSE)); + bValidCrsrPos = !(CRSR_POSCHG & (rSh.*rSh.fnSetCrsr)(&aDocPos,sal_False)); rSh.LeaveSelFrmMode(); rView.LeaveDrawCreate(); rView.AttrChangedNotify( &rSh ); - bRet = TRUE; + bRet = sal_True; } else { @@ -5200,7 +5210,7 @@ BOOL SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos ) rSh.EnterSelFrmMode( &aDocPos ); rSh.SelFlyGrabCrsr(); rSh.MakeSelVisible(); - bFrmDrag = TRUE; + bFrmDrag = sal_True; if( rSh.IsFrmSelected() && rView.GetDrawFuncPtr() ) { @@ -5210,13 +5220,13 @@ BOOL SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos ) rView.AttrChangedNotify( &rSh ); } UpdatePointer( aDocPos, 0 ); - bRet = TRUE; + bRet = sal_True; } } else if ( rSh.IsSelFrmMode() && bIsInsideSelectedObj ) { // ## object at the mouse cursor is already selected - do nothing - return FALSE; + return sal_False; } if ( rSh.IsGCAttr() ) @@ -5225,7 +5235,7 @@ BOOL SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos ) rSh.ClearGCAttr(); } - BOOL bOverSelect = rSh.ChgCurrPam( aDocPos ), bOverURLGrf = FALSE; + sal_Bool bOverSelect = rSh.ChgCurrPam( aDocPos ), bOverURLGrf = sal_False; if( !bOverSelect ) bOverURLGrf = bOverSelect = 0 != rSh.IsURLGrfAtPos( aDocPos ); @@ -5234,8 +5244,8 @@ BOOL SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos ) { // create only temporary move context because otherwise // the query against the content form doesn't work!!! MV_KONTEXT( &rSh ); - (rSh.*rSh.fnSetCrsr)(&aDocPos, FALSE); - bRet = TRUE; + (rSh.*rSh.fnSetCrsr)(&aDocPos, sal_False); + bRet = sal_True; } } if( !bOverURLGrf ) @@ -5248,7 +5258,7 @@ BOOL SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos ) if( !rSh.IsFrmSelected() ) rSh.GotoNextFly(); rSh.EnterSelFrmMode(); - bRet = TRUE; + bRet = sal_True; } } return bRet; @@ -5259,7 +5269,7 @@ SfxShell* lcl_GetShellFromDispatcher( SwView& rView, TypeId nType ) // determine Shell SfxShell* pShell; SfxDispatcher* pDispatcher = rView.GetViewFrame()->GetDispatcher(); - for(USHORT i = 0; TRUE; ++i ) + for(sal_uInt16 i = 0; sal_True; ++i ) { pShell = pDispatcher->GetShell( i ); if( !pShell || pShell->IsA( nType ) ) @@ -5280,7 +5290,7 @@ IMPL_LINK( SwEditWin, KeyInputFlushHandler, Timer *, EMPTYARG ) IMPL_LINK( SwEditWin, KeyInputTimerHandler, Timer *, EMPTYARG ) { - bTblInsDelMode = FALSE; + bTblInsDelMode = sal_False; return 0; } @@ -5307,7 +5317,7 @@ IMPL_LINK(SwEditWin, TemplateTimerHdl, Timer*, EMPTYARG) return 0; } -void SwEditWin::SetChainMode( BOOL bOn ) +void SwEditWin::SetChainMode( sal_Bool bOn ) { if ( !bChainMode ) StopInsFrm(); @@ -5322,7 +5332,7 @@ void SwEditWin::SetChainMode( BOOL bOn ) if ( !bChainMode ) rView.GetViewFrame()->HideStatusText(); - static USHORT const aInva[] = + static sal_uInt16 aInva[] = { FN_FRAME_CHAIN, FN_FRAME_UNCHAIN, 0 }; @@ -5348,7 +5358,7 @@ void QuickHelpData::Move( QuickHelpData& rCpy ) { // move pointer aArr.Insert( &rCpy.aArr ); - rCpy.aArr.Remove( (USHORT)0, rCpy.aArr.Count() ); + rCpy.aArr.Remove( (sal_uInt16)0, rCpy.aArr.Count() ); bClear = rCpy.bClear; nLen = rCpy.nLen; nCurArrPos = rCpy.nCurArrPos; @@ -5369,16 +5379,16 @@ void QuickHelpData::Move( QuickHelpData& rCpy ) void QuickHelpData::ClearCntnt() { nLen = nCurArrPos = 0; - bClear = bChkInsBlank = FALSE; + bClear = bChkInsBlank = sal_False; nTipId = 0; aArr.DeleteAndDestroy( 0 , aArr.Count() ); - bIsTip = TRUE; - bIsAutoText = TRUE; + bIsTip = sal_True; + bIsAutoText = sal_True; delete pCETID, pCETID = 0; delete[] pAttrs, pAttrs = 0; } -void QuickHelpData::Start( SwWrtShell& rSh, USHORT nWrdLen ) +void QuickHelpData::Start( SwWrtShell& rSh, sal_uInt16 nWrdLen ) { if( pCETID ) delete pCETID, pCETID = 0; if( pAttrs ) delete[] pAttrs, pAttrs = 0; @@ -5388,7 +5398,7 @@ void QuickHelpData::Start( SwWrtShell& rSh, USHORT nWrdLen ) nLen = nWrdLen; nCurArrPos = 0; } - bClear = TRUE; + bClear = sal_True; Window& rWin = rSh.GetView().GetEditWin(); if( bIsTip ) @@ -5404,13 +5414,13 @@ void QuickHelpData::Start( SwWrtShell& rSh, USHORT nWrdLen ) { String sStr( *aArr[ nCurArrPos ] ); sStr.Erase( 0, nLen ); - USHORT nL = sStr.Len(); - pAttrs = new USHORT[ nL ]; - for( USHORT n = nL; n; ) + sal_uInt16 nL = sStr.Len(); + pAttrs = new sal_uInt16[ nL ]; + for( sal_uInt16 n = nL; n; ) *(pAttrs + --n ) = EXTTEXTINPUT_ATTR_DOTTEDUNDERLINE | EXTTEXTINPUT_ATTR_HIGHLIGHT; pCETID = new CommandExtTextInputData( sStr, pAttrs, nL, - 0, 0, 0, FALSE ); + 0, 0, 0, sal_False ); rSh.CreateExtTextInput(rWin.GetInputLanguage()); rSh.SetExtTextInputData( *pCETID ); } @@ -5419,7 +5429,7 @@ void QuickHelpData::Start( SwWrtShell& rSh, USHORT nWrdLen ) void QuickHelpData::Stop( SwWrtShell& rSh ) { if( !bIsTip ) - rSh.DeleteExtTextInput( 0, FALSE ); + rSh.DeleteExtTextInput( 0, sal_False ); else if( nTipId ) Help::HideTip( nTipId ); ClearCntnt(); @@ -5456,7 +5466,7 @@ void QuickHelpData::FillStrArr( SwWrtShell& rSh, const String& rWord ) // and than add all words from the AutoCompleteWord-List const SwAutoCompleteWord& rACLst = rSh.GetAutoCompleteWords(); - USHORT nStt, nEnd; + sal_uInt16 nStt, nEnd; if( rACLst.GetRange( rWord, nStt, nEnd ) ) { while( nStt < nEnd ) @@ -5510,12 +5520,12 @@ void SwEditWin::ShowAutoTextCorrectQuickHelp( if( pQuickHlpData->aArr.Count() ) { - pQuickHlpData->bIsTip = TRUE; - pQuickHlpData->bIsAutoText = TRUE; + pQuickHlpData->bIsTip = sal_True; + pQuickHlpData->bIsAutoText = sal_True; } else if( pACorr->GetSwFlags().bAutoCompleteWords ) { - pQuickHlpData->bIsAutoText = FALSE; + pQuickHlpData->bIsAutoText = sal_False; pQuickHlpData->bIsTip = bFromIME || !pACorr || pACorr->GetSwFlags().bAutoCmpltShowAsTip; diff --git a/sw/source/ui/docvw/edtwin2.cxx b/sw/source/ui/docvw/edtwin2.cxx index f6134e03fd..83d9e7eea6 100644 --- a/sw/source/ui/docvw/edtwin2.cxx +++ b/sw/source/ui/docvw/edtwin2.cxx @@ -84,9 +84,9 @@ /*-------------------------------------------------------------------- Description: KeyEvents --------------------------------------------------------------------*/ -static void lcl_GetRedlineHelp( const SwRedline& rRedl, String& rTxt, BOOL bBalloon ) +static void lcl_GetRedlineHelp( const SwRedline& rRedl, String& rTxt, sal_Bool bBalloon ) { - USHORT nResId = 0; + sal_uInt16 nResId = 0; switch( rRedl.GetType() ) { case nsRedlineType_t::REDLINE_INSERT: nResId = STR_REDLINE_INSERT; break; @@ -112,14 +112,14 @@ static void lcl_GetRedlineHelp( const SwRedline& rRedl, String& rTxt, BOOL bBall void SwEditWin::RequestHelp(const HelpEvent &rEvt) { SwWrtShell &rSh = rView.GetWrtShell(); - BOOL bQuickBalloon = 0 != (rEvt.GetMode() & ( HELPMODE_QUICK | HELPMODE_BALLOON )); + sal_Bool bQuickBalloon = 0 != (rEvt.GetMode() & ( HELPMODE_QUICK | HELPMODE_BALLOON )); if(bQuickBalloon && rSh.GetViewOptions()->IsPreventTips()) return; - BOOL bWeiter = TRUE; + sal_Bool bWeiter = sal_True; SET_CURR_SHELL(&rSh); String sTxt; Point aPos( PixelToLogic( ScreenToOutputPixel( rEvt.GetMousePosPixel() ) )); - BOOL bBalloon = static_cast< BOOL >(rEvt.GetMode() & HELPMODE_BALLOON); + sal_Bool bBalloon = static_cast< sal_Bool >(rEvt.GetMode() & HELPMODE_BALLOON); SdrView *pSdrView = rSh.GetDrawView(); @@ -149,9 +149,9 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt) #endif SwContentAtPos::SW_TABLEBOXFML ); - if( rSh.GetContentAtPos( aPos, aCntntAtPos, FALSE, &aFldRect ) ) + if( rSh.GetContentAtPos( aPos, aCntntAtPos, sal_False, &aFldRect ) ) { - USHORT nStyle = 0; // style of quick help + sal_uInt16 nStyle = 0; // style of quick help switch( aCntntAtPos.eCntntAtPos ) { case SwContentAtPos::SW_TABLEBOXFML: @@ -224,7 +224,7 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt) } } // #i80029# - BOOL bExecHyperlinks = rView.GetDocShell()->IsReadOnly(); + sal_Bool bExecHyperlinks = rView.GetDocShell()->IsReadOnly(); if ( !bExecHyperlinks ) { SvtSecurityOptions aSecOpts; @@ -301,10 +301,9 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt) case RES_TABLEFLD: case RES_GETEXPFLD: { - USHORT nOldSubType = pFld->GetSubType(); + sal_uInt16 nOldSubType = pFld->GetSubType(); ((SwField*)pFld)->SetSubType(nsSwExtendedSubType::SUB_CMD); - sTxt = - pFld->ExpandField(rSh.GetDoc()->IsClipBoard()); + sTxt = pFld->ExpandField(true); ((SwField*)pFld)->SetSubType(nOldSubType); } break; @@ -314,14 +313,14 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt) break; } case RES_INPUTFLD: // BubbleHelp, because the suggestion could be quite long - bBalloon = TRUE; + bBalloon = sal_True; /* no break */ case RES_JUMPEDITFLD: sTxt = pFld->GetPar2(); break; case RES_DBFLD: - sTxt = ((SwDBField*)pFld)->GetCntnt(TRUE); + sTxt = pFld->GetFieldName(); break; case RES_USERFLD: @@ -369,7 +368,7 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt) if( !sTxt.Len() ) { aCntntAtPos.eCntntAtPos = SwContentAtPos::SW_REDLINE; - if( rSh.GetContentAtPos( aPos, aCntntAtPos, FALSE, &aFldRect ) ) + if( rSh.GetContentAtPos( aPos, aCntntAtPos, sal_False, &aFldRect ) ) lcl_GetRedlineHelp( *aCntntAtPos.aFnd.pRedl, sTxt, bBalloon ); } @@ -393,12 +392,12 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt) } } - bWeiter = FALSE; + bWeiter = sal_False; } if( bWeiter ) { - BYTE nTabCols = rSh.WhichMouseTabCol(aPos); - USHORT nTabRes = 0; + sal_uInt8 nTabCols = rSh.WhichMouseTabCol(aPos); + sal_uInt16 nTabRes = 0; switch(nTabCols) { case SW_TABCOL_HORI: @@ -432,7 +431,7 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt) Rectangle aRect(rEvt.GetMousePosPixel(), aTxtSize); Help::ShowQuickHelp(this, aRect, sTxt); } - bWeiter = FALSE; + bWeiter = sal_False; } } @@ -451,7 +450,7 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt) pObj = aVEvt.pObj; sTxt = pField->GetURL(); - bWeiter = FALSE; + bWeiter = sal_False; } } if (bWeiter && eHit == SDRHIT_TEXTEDIT) @@ -476,7 +475,7 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt) if (pField ) { sTxt = ((const SvxURLField*) pField)->GetURL(); - bWeiter = FALSE; + bWeiter = sal_False; } } } @@ -515,7 +514,7 @@ void SwEditWin::Paint(const Rectangle& rRect) SwWrtShell* pWrtShell = GetView().GetWrtShellPtr(); if(!pWrtShell) return; - BOOL bPaintShadowCrsr = FALSE; + sal_Bool bPaintShadowCrsr = sal_False; if( pShadCrsr ) { Rectangle aRect( pShadCrsr->GetRect()); @@ -528,7 +527,7 @@ void SwEditWin::Paint(const Rectangle& rRect) // resides somewhat above, then everything is clipped outside // and we have to make the "inner part" at the end of the // Paint visible again. Otherwise Paint errors occur! - bPaintShadowCrsr = TRUE; + bPaintShadowCrsr = sal_True; } } diff --git a/sw/source/ui/docvw/edtwin3.cxx b/sw/source/ui/docvw/edtwin3.cxx index 516404854f..ccac547822 100644 --- a/sw/source/ui/docvw/edtwin3.cxx +++ b/sw/source/ui/docvw/edtwin3.cxx @@ -57,7 +57,7 @@ void ScrollMDI( ViewShell* pVwSh, const SwRect &rRect, - USHORT nRangeX, USHORT nRangeY) + sal_uInt16 nRangeX, sal_uInt16 nRangeY) { SfxViewShell *pSfxVwSh = pVwSh->GetSfxViewShell(); if (pSfxVwSh && pSfxVwSh->ISA(SwView)) @@ -70,12 +70,12 @@ void ScrollMDI( ViewShell* pVwSh, const SwRect &rRect, -BOOL IsScrollMDI( ViewShell* pVwSh, const SwRect &rRect ) +sal_Bool IsScrollMDI( ViewShell* pVwSh, const SwRect &rRect ) { SfxViewShell *pSfxVwSh = pVwSh->GetSfxViewShell(); if (pSfxVwSh && pSfxVwSh->ISA(SwView)) return (((SwView *)pSfxVwSh)->IsScroll(rRect.SVRect())); - return FALSE; + return sal_False; } /*-------------------------------------------------------------------- @@ -102,7 +102,7 @@ void SizeNotify(ViewShell* pVwSh, const Size &rSize) -void PageNumNotify( ViewShell* pVwSh, USHORT nPhyNum, USHORT nVirtNum, +void PageNumNotify( ViewShell* pVwSh, sal_uInt16 nPhyNum, sal_uInt16 nVirtNum, const String& rPgStr) { SfxViewShell *pSfxVwSh = pVwSh->GetSfxViewShell(); @@ -127,7 +127,7 @@ void FrameNotify( ViewShell* pVwSh, FlyMode eMode ) /*-------------------------------------------------------------------- Description: Notify for page number update --------------------------------------------------------------------*/ -BOOL SwEditWin::RulerColumnDrag( const MouseEvent& rMEvt, BOOL bVerticalMode) +sal_Bool SwEditWin::RulerColumnDrag( const MouseEvent& rMEvt, sal_Bool bVerticalMode) { SvxRuler& rRuler = bVerticalMode ? rView.GetVLineal() : rView.GetHLineal(); return (!rRuler.StartDocDrag( rMEvt, RULER_TYPE_BORDER ) && @@ -138,7 +138,7 @@ BOOL SwEditWin::RulerColumnDrag( const MouseEvent& rMEvt, BOOL bVerticalMode) // #i23726# // #i42921# - add 3rd parameter <bVerticalMode> in order // to consider vertical layout -BOOL SwEditWin::RulerMarginDrag( const MouseEvent& rMEvt, +sal_Bool SwEditWin::RulerMarginDrag( const MouseEvent& rMEvt, const bool bVerticalMode ) { SvxRuler& rRuler = bVerticalMode ? rView.GetVLineal() : rView.GetHLineal(); @@ -163,12 +163,12 @@ void RepaintPagePreview( ViewShell* pVwSh, const SwRect& rRect ) ((SwPagePreView *)pSfxVwSh)->RepaintCoreRect( rRect ); } -BOOL JumpToSwMark( ViewShell* pVwSh, const String& rMark ) +sal_Bool JumpToSwMark( ViewShell* pVwSh, const String& rMark ) { SfxViewShell *pSfxVwSh = pVwSh->GetSfxViewShell(); if( pSfxVwSh && pSfxVwSh->ISA( SwView ) ) return ((SwView *)pSfxVwSh)->JumpToSwMark( rMark ); - return FALSE; + return sal_False; } void SwEditWin::DataChanged( const DataChangedEvent& rDCEvt ) @@ -180,8 +180,8 @@ void SwEditWin::DataChanged( const DataChangedEvent& rDCEvt ) // the SwWrtShell if(!pSh) return; - BOOL bViewWasLocked = pSh->IsViewLocked(), bUnlockPaint = FALSE; - pSh->LockView( TRUE ); + sal_Bool bViewWasLocked = pSh->IsViewLocked(), bUnlockPaint = sal_False; + pSh->LockView( sal_True ); switch( rDCEvt.GetType() ) { case DATACHANGED_SETTINGS: @@ -192,7 +192,7 @@ void SwEditWin::DataChanged( const DataChangedEvent& rDCEvt ) if( rDCEvt.GetFlags() & SETTINGS_STYLE ) { pSh->LockPaint(); - bUnlockPaint = TRUE; + bUnlockPaint = sal_True; ViewShell::DeleteReplacementBitmaps(); GetView().InvalidateBorder(); //Scrollbar work } @@ -203,7 +203,7 @@ void SwEditWin::DataChanged( const DataChangedEvent& rDCEvt ) case DATACHANGED_FONTS: case DATACHANGED_FONTSUBSTITUTION: pSh->LockPaint(); - bUnlockPaint = TRUE; + bUnlockPaint = sal_True; GetView().GetDocShell()->UpdateFontList(); //e.g. printer change break; } diff --git a/sw/source/ui/docvw/extedit.cxx b/sw/source/ui/docvw/extedit.cxx index 9e289e2ffa..bf39575bbf 100644 --- a/sw/source/ui/docvw/extedit.cxx +++ b/sw/source/ui/docvw/extedit.cxx @@ -121,7 +121,7 @@ void EditWithExternalTool(GraphicObject *pGraphicObject, SwWrtShell *rSh) //Write Graphic to the Temp File GraphicFilter& rGF = *GraphicFilter::GetGraphicFilter(); - USHORT nFilter(rGF.GetExportFormatNumber(fExt)); + sal_uInt16 nFilter(rGF.GetExportFormatNumber(fExt)); String aFilter(rGF.GetExportFormatShortName(nFilter)); String sPath(tempFileName.getStr()); diff --git a/sw/source/ui/docvw/makefile.mk b/sw/source/ui/docvw/makefile.mk deleted file mode 100644 index 5e9f739a77..0000000000 --- a/sw/source/ui/docvw/makefile.mk +++ /dev/null @@ -1,70 +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=docvw -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -SRS1NAME=$(TARGET) -SRC1FILES = \ - access.src \ - docvw.src \ - annotation.src - -SLOFILES = \ - $(SLO)$/edtdd.obj \ - $(SLO)$/edtwin.obj \ - $(SLO)$/edtwin2.obj \ - $(SLO)$/edtwin3.obj \ - $(SLO)$/romenu.obj \ - $(SLO)$/extedit.obj \ - $(SLO)$/srcedtw.obj \ - $(SLO)$/PostItMgr.obj \ - $(SLO)$/frmsidebarwincontainer.obj \ - $(SLO)$/AnchorOverlayObject.obj \ - $(SLO)$/ShadowOverlayObject.obj \ - $(SLO)$/SidebarWin.obj \ - $(SLO)$/SidebarWinAcc.obj \ - $(SLO)$/AnnotationWin.obj \ - $(SLO)$/AnnotationMenuButton.obj \ - $(SLO)$/SidebarTxtControl.obj \ - $(SLO)$/SidebarTxtControlAcc.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/ui/docvw/romenu.cxx b/sw/source/ui/docvw/romenu.cxx index ed80f5debf..29656e4d35 100644 --- a/sw/source/ui/docvw/romenu.cxx +++ b/sw/source/ui/docvw/romenu.cxx @@ -99,13 +99,13 @@ SwReadOnlyPopup::~SwReadOnlyPopup() delete pTargetURL; } -void SwReadOnlyPopup::Check( USHORT nMID, USHORT nSID, SfxDispatcher &rDis ) +void SwReadOnlyPopup::Check( sal_uInt16 nMID, sal_uInt16 nSID, SfxDispatcher &rDis ) { SfxPoolItem *_pItem = 0; SfxItemState eState = rDis.GetBindings()->QueryState( nSID, _pItem ); if (eState >= SFX_ITEM_AVAILABLE) { - EnableItem( nMID, TRUE ); + EnableItem( nMID, sal_True ); if (_pItem) { CheckItem ( nMID, !_pItem->ISA(SfxVoidItem) && @@ -113,11 +113,11 @@ void SwReadOnlyPopup::Check( USHORT nMID, USHORT nSID, SfxDispatcher &rDis ) ((SfxBoolItem*)_pItem)->GetValue()); //remove full screen entry when not in full screen mode if(SID_WIN_FULLSCREEN == nSID && !IsItemChecked(SID_WIN_FULLSCREEN) ) - EnableItem(nMID, FALSE); + EnableItem(nMID, sal_False); } } else - EnableItem( nMID, FALSE ); + EnableItem( nMID, sal_False ); delete _pItem; } @@ -136,7 +136,7 @@ SwReadOnlyPopup::SwReadOnlyPopup( const Point &rDPos, SwView &rV ) : if ( !sURL.Len() ) { SwContentAtPos aCntntAtPos( SwContentAtPos::SW_INETATTR ); - if( rSh.GetContentAtPos( rDocPos, aCntntAtPos, FALSE)) + if( rSh.GetContentAtPos( rDocPos, aCntntAtPos, sal_False)) { SwFmtINetFmt &rIItem = *(SwFmtINetFmt*)aCntntAtPos.aFnd.pAttr; sURL = rIItem.GetValue(); @@ -145,12 +145,12 @@ SwReadOnlyPopup::SwReadOnlyPopup( const Point &rDPos, SwView &rV ) : } } - BOOL bLink = FALSE; + sal_Bool bLink = sal_False; const Graphic *pGrf; if ( 0 == (pGrf = rSh.GetGrfAtPos( rDocPos, sGrfName, bLink )) ) { - EnableItem( MN_READONLY_SAVEGRAPHIC, FALSE ); - EnableItem( MN_READONLY_COPYGRAPHIC, FALSE ); + EnableItem( MN_READONLY_SAVEGRAPHIC, sal_False ); + EnableItem( MN_READONLY_COPYGRAPHIC, sal_False ); } else { @@ -158,7 +158,7 @@ SwReadOnlyPopup::SwReadOnlyPopup( const Point &rDPos, SwView &rV ) : const SwFrmFmt* pGrfFmt = rSh.GetFmtFromObj( rDocPos ); const SfxPoolItem* pURLItem; if( pGrfFmt && SFX_ITEM_SET == pGrfFmt->GetItemState( - RES_URL, TRUE, &pURLItem )) + RES_URL, sal_True, &pURLItem )) { const SwFmtURL& rURL = *(SwFmtURL*)pURLItem; if( rURL.GetMap() ) @@ -180,7 +180,7 @@ SwReadOnlyPopup::SwReadOnlyPopup( const Point &rDPos, SwView &rV ) : pMenu->CheckItem( MN_READONLY_TOGALLERYLINK, bGrfToGalleryAsLnk ); pMenu->CheckItem( MN_READONLY_TOGALLERYCOPY, !bGrfToGalleryAsLnk ); - for ( USHORT i=0; i < aThemeList.size(); ++i ) + for ( sal_uInt16 i=0; i < aThemeList.size(); ++i ) pMenu->InsertItem( MN_READONLY_GRAPHICTOGALLERY+i + 3, aThemeList[ i ] ); } else @@ -193,12 +193,12 @@ SwReadOnlyPopup::SwReadOnlyPopup( const Point &rDPos, SwView &rV ) : SfxDispatcher &rDis = *pVFrame->GetDispatcher(); const SwPageDesc &rDesc = rSh.GetPageDesc( rSh.GetCurPageDesc() ); pItem = &rDesc.GetMaster().GetBackground(); - BOOL bEnableBackGallery = FALSE, - bEnableBack = FALSE; + sal_Bool bEnableBackGallery = sal_False, + bEnableBack = sal_False; if ( GPOS_NONE != pItem->GetGraphicPos() ) { - bEnableBack = TRUE; + bEnableBack = sal_True; if ( pItem->GetGraphicLink() ) { if ( aThemeList.empty() ) @@ -209,9 +209,9 @@ SwReadOnlyPopup::SwReadOnlyPopup( const Point &rDPos, SwView &rV ) : PopupMenu *pMenu = GetPopupMenu(MN_READONLY_BACKGROUNDTOGALLERY); pMenu->CheckItem( MN_READONLY_TOGALLERYLINK, bGrfToGalleryAsLnk ); pMenu->CheckItem( MN_READONLY_TOGALLERYCOPY, !bGrfToGalleryAsLnk ); - bEnableBackGallery = TRUE; + bEnableBackGallery = sal_True; - for ( USHORT i=0; i < aThemeList.size(); ++i ) + for ( sal_uInt16 i=0; i < aThemeList.size(); ++i ) pMenu->InsertItem( MN_READONLY_GRAPHICTOGALLERY+i + 3, aThemeList[ i ] ); } } @@ -222,9 +222,9 @@ SwReadOnlyPopup::SwReadOnlyPopup( const Point &rDPos, SwView &rV ) : if ( !rSh.GetViewOptions()->IsGraphic() ) CheckItem( MN_READONLY_GRAPHICOFF ); else - EnableItem( MN_READONLY_LOADGRAPHIC, FALSE ); + EnableItem( MN_READONLY_LOADGRAPHIC, sal_False ); - BOOL bReloadFrame = 0 != rSh.GetView().GetViewFrame()->GetFrame().GetParentFrame(); + sal_Bool bReloadFrame = 0 != rSh.GetView().GetViewFrame()->GetFrame().GetParentFrame(); EnableItem( MN_READONLY_RELOAD_FRAME, bReloadFrame ); EnableItem( MN_READONLY_RELOAD, !bReloadFrame); @@ -245,7 +245,7 @@ SwReadOnlyPopup::SwReadOnlyPopup( const Point &rDPos, SwView &rV ) : SfxItemState eState = pVFrame->GetBindings().QueryState( SID_COPY, pState ); Check( MN_READONLY_COPY, SID_COPY, rDis ); if(eState < SFX_ITEM_AVAILABLE) - EnableItem( MN_READONLY_COPY, FALSE ); + EnableItem( MN_READONLY_COPY, sal_False ); eState = pVFrame->GetBindings().QueryState( SID_EDITDOC, pState ); if ( @@ -253,23 +253,23 @@ SwReadOnlyPopup::SwReadOnlyPopup( const Point &rDPos, SwView &rV ) : (rSh.IsGlobalDoc() && rView.GetDocShell()->IsReadOnlyUI()) ) { - EnableItem( MN_READONLY_EDITDOC, FALSE ); + EnableItem( MN_READONLY_EDITDOC, sal_False ); } if ( !sURL.Len() ) { - EnableItem( MN_READONLY_OPENURL, FALSE ); - EnableItem( MN_READONLY_OPENURLNEW, FALSE ); - EnableItem( MN_READONLY_COPYLINK, FALSE ); + EnableItem( MN_READONLY_OPENURL, sal_False ); + EnableItem( MN_READONLY_OPENURLNEW, sal_False ); + EnableItem( MN_READONLY_COPYLINK, sal_False ); } Check( SID_WIN_FULLSCREEN, SID_WIN_FULLSCREEN, rDis ); - RemoveDisabledEntries( TRUE, TRUE ); + RemoveDisabledEntries( sal_True, sal_True ); } void SwReadOnlyPopup::Execute( Window* pWin, const Point &rPixPos ) { - USHORT nId = PopupMenu::Execute( + sal_uInt16 nId = PopupMenu::Execute( pWin, rPixPos ); Execute(pWin, nId); @@ -278,14 +278,14 @@ void SwReadOnlyPopup::Execute( Window* pWin, const Point &rPixPos ) /*-- 17.03.2004 13:06:18--------------------------------------------------- execute the resulting ID only - necessary to support XContextMenuInterception -----------------------------------------------------------------------*/ -void SwReadOnlyPopup::Execute( Window* pWin, USHORT nId ) +void SwReadOnlyPopup::Execute( Window* pWin, sal_uInt16 nId ) { SwWrtShell &rSh = rView.GetWrtShell(); SfxDispatcher &rDis = *rView.GetViewFrame()->GetDispatcher(); if ( nId >= MN_READONLY_GRAPHICTOGALLERY ) { String sTmp; - USHORT nSaveId; + sal_uInt16 nSaveId; if ( nId >= MN_READONLY_BACKGROUNDTOGALLERY ) { nId -= MN_READONLY_BACKGROUNDTOGALLERY+3; @@ -309,8 +309,8 @@ void SwReadOnlyPopup::Execute( Window* pWin, USHORT nId ) TransferDataContainer* pClipCntnr = 0; - USHORT nExecId = USHRT_MAX; - USHORT nFilter = USHRT_MAX; + sal_uInt16 nExecId = USHRT_MAX; + sal_uInt16 nFilter = USHRT_MAX; switch( nId ) { case SID_WIN_FULLSCREEN : nExecId = SID_WIN_FULLSCREEN; break; @@ -351,9 +351,9 @@ void SwReadOnlyPopup::Execute( Window* pWin, USHORT nId ) case MN_READONLY_LOADGRAPHIC: { - BOOL bModified = rSh.IsModified(); + sal_Bool bModified = rSh.IsModified(); SwViewOption aOpt( *rSh.GetViewOptions() ); - aOpt.SetGraphic( TRUE ); + aOpt.SetGraphic( sal_True ); rSh.ApplyViewOptions( aOpt ); if(!bModified) rSh.ResetModified(); @@ -364,10 +364,10 @@ void SwReadOnlyPopup::Execute( Window* pWin, USHORT nId ) case MN_READONLY_PLUGINOFF: nExecId = SID_PLUGINS_ACTIVE; break; #endif case MN_READONLY_TOGALLERYLINK: - SW_MOD()->GetModuleConfig()->SetGrfToGalleryAsLnk( TRUE ); + SW_MOD()->GetModuleConfig()->SetGrfToGalleryAsLnk( sal_True ); break; case MN_READONLY_TOGALLERYCOPY: - SW_MOD()->GetModuleConfig()->SetGrfToGalleryAsLnk( FALSE ); + SW_MOD()->GetModuleConfig()->SetGrfToGalleryAsLnk( sal_False ); break; default: //forward the id to the SfxBindings @@ -386,7 +386,7 @@ void SwReadOnlyPopup::Execute( Window* pWin, USHORT nId ) } } -String SwReadOnlyPopup::SaveGraphic( USHORT nId ) +String SwReadOnlyPopup::SaveGraphic( sal_uInt16 nId ) { // fish out the graphic's name @@ -430,18 +430,18 @@ String ExportGraphic( const Graphic &rGraphic, const String &rGrfName ) aDlgHelper.SetFileName( aURL.GetName() ); GraphicFilter& rGF = *GraphicFilter::GetGraphicFilter(); - const USHORT nCount = rGF.GetExportFormatCount(); + const sal_uInt16 nCount = rGF.GetExportFormatCount(); String aExt( aURL.GetExtension() ); if( !aExt.Len() ) GetPreferedExtension( aExt, rGraphic ); aExt.ToLowerAscii(); - USHORT nDfltFilter = USHRT_MAX; + sal_uInt16 nDfltFilter = USHRT_MAX; Reference<XFilterManager> xFltMgr(xFP, UNO_QUERY); - for ( USHORT i = 0; i < nCount; i++ ) + for ( sal_uInt16 i = 0; i < nCount; i++ ) { xFltMgr->appendFilter( rGF.GetExportFormatName( i ), rGF.GetExportWildcard( i ) ); if ( COMPARE_EQUAL == aExt.CompareIgnoreCaseToAscii(rGF.GetExportFormatShortName( i ).ToLowerAscii() )) @@ -451,7 +451,7 @@ String ExportGraphic( const Graphic &rGraphic, const String &rGrfName ) { // "wrong" extension? GetPreferedExtension( aExt, rGraphic ); - for ( USHORT i = 0; i < nCount; ++i ) + for ( sal_uInt16 i = 0; i < nCount; ++i ) if ( aExt == rGF.GetExportFormatShortName( i ).ToLowerAscii() ) { nDfltFilter = i; @@ -475,11 +475,11 @@ String ExportGraphic( const Graphic &rGraphic, const String &rGrfName ) { // try to save the original graphic SfxMedium aIn( rGrfName, STREAM_READ | STREAM_NOCREATE, - TRUE ); + sal_True ); if( aIn.GetInStream() && !aIn.GetInStream()->GetError() ) { SfxMedium aOut( sPath, STREAM_WRITE | STREAM_SHARE_DENYNONE, - FALSE); + sal_False); if( aOut.GetOutStream() && !aOut.GetOutStream()->GetError()) { *aOut.GetOutStream() << *aIn.GetInStream(); @@ -494,7 +494,7 @@ String ExportGraphic( const Graphic &rGraphic, const String &rGrfName ) } } - USHORT nFilter; + sal_uInt16 nFilter; if ( xFltMgr->getCurrentFilter().getLength() && rGF.GetExportFormatCount() ) nFilter = rGF.GetExportFormatNumber( xFltMgr->getCurrentFilter() ); else diff --git a/sw/source/ui/docvw/romenu.hxx b/sw/source/ui/docvw/romenu.hxx index afa37e189b..f138d841fd 100644 --- a/sw/source/ui/docvw/romenu.hxx +++ b/sw/source/ui/docvw/romenu.hxx @@ -49,12 +49,12 @@ class SwReadOnlyPopup : public PopupMenu sDescription, sGrfName; std::vector<String> aThemeList; - BOOL bGrfToGalleryAsLnk; + sal_Bool bGrfToGalleryAsLnk; ImageMap* pImageMap; INetImage* pTargetURL; - void Check( USHORT nMID, USHORT nSID, SfxDispatcher &rDis ); - String SaveGraphic( USHORT nId ); + void Check( sal_uInt16 nMID, sal_uInt16 nSID, SfxDispatcher &rDis ); + String SaveGraphic( sal_uInt16 nId ); using PopupMenu::Execute; @@ -63,7 +63,7 @@ public: ~SwReadOnlyPopup(); void Execute( Window* pWin, const Point &rPPos ); - void Execute( Window* pWin, USHORT nId ); + void Execute( Window* pWin, sal_uInt16 nId ); }; void GetPreferedExtension( String &rExt, const Graphic &rGrf ); diff --git a/sw/source/ui/docvw/srcedtw.cxx b/sw/source/ui/docvw/srcedtw.cxx index 447b42c35f..d15150c1b6 100644 --- a/sw/source/ui/docvw/srcedtw.cxx +++ b/sw/source/ui/docvw/srcedtw.cxx @@ -51,12 +51,14 @@ #include <docsh.hxx> #include <srcview.hxx> #include <helpid.h> +#include <deque> + struct SwTextPortion { - USHORT nLine; - USHORT nStart, nEnd; + sal_uInt16 nLine; + sal_uInt16 nStart, nEnd; svtools::ColorConfigEntry eType; }; @@ -64,9 +66,7 @@ struct SwTextPortion #define MAX_HIGHLIGHTTIME 200 #define SYNTAX_HIGHLIGHT_TIMEOUT 200 -SV_DECL_VARARR(SwTextPortions, SwTextPortion,16,16) - -SV_IMPL_VARARR(SwTextPortions, SwTextPortion) +typedef std::deque<SwTextPortion> SwTextPortions; static void lcl_Highlight(const String& rSource, SwTextPortions& aPortionList) { @@ -81,12 +81,12 @@ static void lcl_Highlight(const String& rSource, SwTextPortions& aPortionList) const sal_Unicode cCR = 0x0d; - const USHORT nStrLen = rSource.Len(); - USHORT nInsert = 0; // number of inserted portions - USHORT nActPos = 0; // position, where '<' was found - USHORT nOffset = 0; // Offset of nActPos to '<' - USHORT nPortStart = USHRT_MAX; // for the TextPortion - USHORT nPortEnd = 0; // + const sal_uInt16 nStrLen = rSource.Len(); + sal_uInt16 nInsert = 0; // number of inserted portions + sal_uInt16 nActPos = 0; // position, where '<' was found + sal_uInt16 nOffset = 0; // Offset of nActPos to '<' + sal_uInt16 nPortStart = USHRT_MAX; // for the TextPortion + sal_uInt16 nPortEnd = 0; // SwTextPortion aText; while(nActPos < nStrLen) { @@ -103,7 +103,8 @@ static void lcl_Highlight(const String& rSource, SwTextPortions& aPortionList) aText.nStart += 1; aText.nEnd = nActPos - 1; aText.eType = svtools::HTMLUNKNOWN; - aPortionList.Insert(aText, nInsert++); + aPortionList.push_back( aText ); + nInsert++; } sal_Unicode cFollowFirst = rSource.GetChar((xub_StrLen)(nActPos + 1)); sal_Unicode cFollowNext = rSource.GetChar((xub_StrLen)(nActPos + 2)); @@ -130,7 +131,7 @@ static void lcl_Highlight(const String& rSource, SwTextPortions& aPortionList) if(svtools::HTMLUNKNOWN == eFoundType) { // now here a keyword could follow - USHORT nSrchPos = nActPos; + sal_uInt16 nSrchPos = nActPos; while(++nSrchPos < nStrLen - 1) { sal_Unicode cNext = rSource.GetChar(nSrchPos); @@ -171,18 +172,18 @@ static void lcl_Highlight(const String& rSource, SwTextPortions& aPortionList) // now we still have to look for '>' if(svtools::HTMLUNKNOWN != eFoundType) { - BOOL bFound = FALSE; - for(USHORT i = nPortEnd; i < nStrLen; i++) + sal_Bool bFound = sal_False; + for(sal_uInt16 i = nPortEnd; i < nStrLen; i++) if(cCloseBracket == rSource.GetChar(i)) { - bFound = TRUE; + bFound = sal_True; nPortEnd = i; break; } if(!bFound && (eFoundType == svtools::HTMLCOMMENT)) { // comment without ending in this line - bFound = TRUE; + bFound = sal_True; nPortEnd = nStrLen - 1; } @@ -193,7 +194,8 @@ static void lcl_Highlight(const String& rSource, SwTextPortions& aPortionList) aTextPortion.nStart = nPortStart + 1; aTextPortion.nEnd = nPortEnd; aTextPortion.eType = eFoundType; - aPortionList.Insert(aTextPortion, nInsert++); + aPortionList.push_back( aTextPortion ); + nInsert++; eFoundType = svtools::HTMLUNKNOWN; } @@ -207,7 +209,8 @@ static void lcl_Highlight(const String& rSource, SwTextPortions& aPortionList) aText.nStart = nPortEnd + 1; aText.nEnd = nActPos - 1; aText.eType = svtools::HTMLUNKNOWN; - aPortionList.Insert(aText, nInsert++); + aPortionList.push_back( aText ); + nInsert++; } } @@ -226,8 +229,8 @@ SwSrcEditWindow::SwSrcEditWindow( Window* pParent, SwSrcView* pParentView ) : nCurTextWidth(0), nStartLine(USHRT_MAX), eSourceEncoding(gsl_getSystemTextEncoding()), - bDoSyntaxHighlight(TRUE), - bHighlighting(FALSE) + bDoSyntaxHighlight(sal_True), + bHighlighting(sal_False) { SetHelpId(HID_SOURCE_EDITWIN); CreateTextEngine(); @@ -397,9 +400,9 @@ void TextViewOutWin::Command( const CommandEvent& rCEvt ) void TextViewOutWin::KeyInput( const KeyEvent& rKEvt ) { - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; SwSrcEditWindow* pSrcEditWin = (SwSrcEditWindow*)GetParent(); - BOOL bChange = !pSrcEditWin->IsReadonly() || !TextEngine::DoesKeyChangeText( rKEvt ); + sal_Bool bChange = !pSrcEditWin->IsReadonly() || !TextEngine::DoesKeyChangeText( rKEvt ); if(bChange) bDone = pTextView->KeyInput( rKEvt ); @@ -460,14 +463,14 @@ void SwSrcEditWindow::CreateTextEngine() pTextEngine = new ExtTextEngine; pTextView = new ExtTextView( pTextEngine, pOutWin ); - pTextView->SetAutoIndentMode(TRUE); + pTextView->SetAutoIndentMode(sal_True); pOutWin->SetTextView(pTextView); - pTextEngine->SetUpdateMode( FALSE ); + pTextEngine->SetUpdateMode( sal_False ); pTextEngine->InsertView( pTextView ); Font aFont; - aFont.SetTransparent( FALSE ); + aFont.SetTransparent( sal_False ); aFont.SetFillColor( rCol ); SetPointFont( aFont ); aFont = GetFont(); @@ -478,10 +481,10 @@ void SwSrcEditWindow::CreateTextEngine() aSyntaxIdleTimer.SetTimeout( SYNTAX_HIGHLIGHT_TIMEOUT ); aSyntaxIdleTimer.SetTimeoutHdl( LINK( this, SwSrcEditWindow, SyntaxTimerHdl ) ); - pTextEngine->EnableUndo( TRUE ); - pTextEngine->SetUpdateMode( TRUE ); + pTextEngine->EnableUndo( sal_True ); + pTextEngine->SetUpdateMode( sal_True ); - pTextView->ShowCursor( TRUE, TRUE ); + pTextView->ShowCursor( sal_True, sal_True ); InitScrollBars(); StartListening( *pTextEngine ); @@ -519,14 +522,14 @@ IMPL_LINK(SwSrcEditWindow, ScrollHdl, ScrollBar*, pScroll) { long nDiff = pTextView->GetStartDocPos().Y() - pScroll->GetThumbPos(); GetTextView()->Scroll( 0, nDiff ); - pTextView->ShowCursor( FALSE, TRUE ); + pTextView->ShowCursor( sal_False, sal_True ); pScroll->SetThumbPos( pTextView->GetStartDocPos().Y() ); } else { long nDiff = pTextView->GetStartDocPos().X() - pScroll->GetThumbPos(); GetTextView()->Scroll( nDiff, 0 ); - pTextView->ShowCursor( FALSE, TRUE ); + pTextView->ShowCursor( sal_False, sal_True ); pScroll->SetThumbPos( pTextView->GetStartDocPos().X() ); } GetSrcView()->GetViewFrame()->GetBindings().Invalidate( SID_TABLE_CELL ); @@ -538,18 +541,18 @@ IMPL_LINK( SwSrcEditWindow, SyntaxTimerHdl, Timer *, pTimer ) Time aSyntaxCheckStart; OSL_ENSURE( pTextView, "Noch keine View, aber Syntax-Highlight ?!" ); - bHighlighting = TRUE; - USHORT nLine; - USHORT nCount = 0; + bHighlighting = sal_True; + sal_uInt16 nLine; + sal_uInt16 nCount = 0; // at first the region around the cursor is processed TextSelection aSel = pTextView->GetSelection(); - USHORT nCur = (USHORT)aSel.GetStart().GetPara(); + sal_uInt16 nCur = (sal_uInt16)aSel.GetStart().GetPara(); if(nCur > 40) nCur -= 40; else nCur = 0; if(aSyntaxLineTable.Count()) - for(USHORT i = 0; i < 80 && nCount < 40; i++, nCur++) + for(sal_uInt16 i = 0; i < 80 && nCount < 40; i++, nCur++) { void * p = aSyntaxLineTable.Get(nCur); if(p) @@ -571,9 +574,9 @@ IMPL_LINK( SwSrcEditWindow, SyntaxTimerHdl, Timer *, pTimer ) void* p = aSyntaxLineTable.First(); while ( p && nCount < MAX_SYNTAX_HIGHLIGHT) { - nLine = (USHORT)aSyntaxLineTable.GetCurKey(); + nLine = (sal_uInt16)aSyntaxLineTable.GetCurKey(); DoSyntaxHighlight( nLine ); - USHORT nCurKey = (USHORT)aSyntaxLineTable.GetCurKey(); + sal_uInt16 nCurKey = (sal_uInt16)aSyntaxLineTable.GetCurKey(); p = aSyntaxLineTable.Next(); aSyntaxLineTable.Remove(nCurKey); nCount ++; @@ -592,50 +595,50 @@ IMPL_LINK( SwSrcEditWindow, SyntaxTimerHdl, Timer *, pTimer ) nCurTextWidth = pTextEngine->CalcTextWidth() + 25; // kleine Toleranz if ( nCurTextWidth != nPrevTextWidth ) SetScrollBarRanges(); - bHighlighting = FALSE; + bHighlighting = sal_False; return 0; } -void SwSrcEditWindow::DoSyntaxHighlight( USHORT nPara ) +void SwSrcEditWindow::DoSyntaxHighlight( sal_uInt16 nPara ) { // Because of DelayedSyntaxHighlight it could happen, // that the line doesn't exist anymore! if ( nPara < pTextEngine->GetParagraphCount() ) { - BOOL bTempModified = IsModified(); - pTextEngine->RemoveAttribs( nPara, (BOOL)TRUE ); + sal_Bool bTempModified = IsModified(); + pTextEngine->RemoveAttribs( nPara, (sal_Bool)sal_True ); String aSource( pTextEngine->GetText( nPara ) ); - pTextEngine->SetUpdateMode( FALSE ); + pTextEngine->SetUpdateMode( sal_False ); ImpDoHighlight( aSource, nPara ); TextView* pTmp = pTextEngine->GetActiveView(); - pTmp->SetAutoScroll(FALSE); + pTmp->SetAutoScroll(sal_False); pTextEngine->SetActiveView(0); - pTextEngine->SetUpdateMode( TRUE ); + pTextEngine->SetUpdateMode( sal_True ); pTextEngine->SetActiveView(pTmp); - pTmp->SetAutoScroll(TRUE); - pTmp->ShowCursor( FALSE/*pTmp->IsAutoScroll()*/ ); + pTmp->SetAutoScroll(sal_True); + pTmp->ShowCursor( sal_False/*pTmp->IsAutoScroll()*/ ); if(!bTempModified) ClearModifyFlag(); } } -void SwSrcEditWindow::DoDelayedSyntaxHighlight( USHORT nPara ) +void SwSrcEditWindow::DoDelayedSyntaxHighlight( sal_uInt16 nPara ) { if ( !bHighlighting && bDoSyntaxHighlight ) { - aSyntaxLineTable.Insert( nPara, (void*)(USHORT)1 ); + aSyntaxLineTable.Insert( nPara, (void*)(sal_uInt16)1 ); aSyntaxIdleTimer.Start(); } } -void SwSrcEditWindow::ImpDoHighlight( const String& rSource, USHORT nLineOff ) +void SwSrcEditWindow::ImpDoHighlight( const String& rSource, sal_uInt16 nLineOff ) { SwTextPortions aPortionList; lcl_Highlight(rSource, aPortionList); - USHORT nCount = aPortionList.Count(); + size_t nCount = aPortionList.size(); if ( !nCount ) return; @@ -643,7 +646,7 @@ void SwSrcEditWindow::ImpDoHighlight( const String& rSource, USHORT nLineOff ) if ( rLast.nStart > rLast.nEnd ) // Only until Bug from MD is resolved { nCount--; - aPortionList.Remove( nCount); + aPortionList.pop_back(); if ( !nCount ) return; } @@ -651,19 +654,19 @@ void SwSrcEditWindow::ImpDoHighlight( const String& rSource, USHORT nLineOff ) // maybe optimize: // If frequently the same color, blank without color in between, // maybe summarize or at least the blank; for less attributes - BOOL bOptimizeHighlight = TRUE; // war in der BasicIDE static + sal_Bool bOptimizeHighlight = sal_True; // war in der BasicIDE static if ( bOptimizeHighlight ) { // Only blanks and tabs have to be attributed along. // When two identical attributes are placed consecutively, // it optimises the TextEngine. - USHORT nLastEnd = 0; + sal_uInt16 nLastEnd = 0; - for ( USHORT i = 0; i < nCount; i++ ) + for ( size_t i = 0; i < nCount; i++ ) { SwTextPortion& r = aPortionList[i]; #if OSL_DEBUG_LEVEL > 1 - USHORT nLine = aPortionList[0].nLine; + sal_uInt16 nLine = aPortionList[0].nLine; OSL_ENSURE( r.nLine == nLine, "doch mehrere Zeilen ?" ); #endif if ( r.nStart > r.nEnd ) // only until Bug from MD is resolved @@ -681,7 +684,7 @@ void SwSrcEditWindow::ImpDoHighlight( const String& rSource, USHORT nLineOff ) } } - for ( USHORT i = 0; i < aPortionList.Count(); i++ ) + for ( size_t i = 0; i < aPortionList.size(); i++ ) { SwTextPortion& r = aPortionList[i]; if ( r.nStart > r.nEnd ) // only until Bug from MD is resolved @@ -692,8 +695,8 @@ void SwSrcEditWindow::ImpDoHighlight( const String& rSource, USHORT nLineOff ) r.eType != svtools::HTMLUNKNOWN) r.eType = svtools::HTMLUNKNOWN; Color aColor((ColorData)SW_MOD()->GetColorConfig().GetColorValue((svtools::ColorConfigEntry)r.eType).nColor); - USHORT nLine = nLineOff+r.nLine; // - pTextEngine->SetAttrib( TextAttribFontColor( aColor ), nLine, r.nStart, r.nEnd+1, TRUE ); + sal_uInt16 nLine = nLineOff+r.nLine; // + pTextEngine->SetAttrib( TextAttribFontColor( aColor ), nLine, r.nStart, r.nEnd+1, sal_True ); } } @@ -717,7 +720,7 @@ void SwSrcEditWindow::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint ) else if( ( rTextHint.GetId() == TEXT_HINT_PARAINSERTED ) || ( rTextHint.GetId() == TEXT_HINT_PARACONTENTCHANGED ) ) { - DoDelayedSyntaxHighlight( (USHORT)rTextHint.GetValue() ); + DoDelayedSyntaxHighlight( (sal_uInt16)rTextHint.GetValue() ); } } } @@ -728,7 +731,7 @@ void SwSrcEditWindow::ConfigurationChanged( utl::ConfigurationBroadcaster* pBrdC SetFont(); } -void SwSrcEditWindow::Invalidate(USHORT ) +void SwSrcEditWindow::Invalidate(sal_uInt16 ) { pOutWin->Invalidate(); Window::Invalidate(); @@ -764,7 +767,7 @@ void SwSrcEditWindow::GetFocus() pOutWin->GrabFocus(); } -BOOL lcl_GetLanguagesForEncoding(rtl_TextEncoding eEnc, LanguageType aLanguages[]) +sal_Bool lcl_GetLanguagesForEncoding(rtl_TextEncoding eEnc, LanguageType aLanguages[]) { switch(eEnc) { diff --git a/sw/source/ui/envelp/envfmt.cxx b/sw/source/ui/envelp/envfmt.cxx index d0d608a8bb..381ec6cd1e 100644 --- a/sw/source/ui/envelp/envfmt.cxx +++ b/sw/source/ui/envelp/envfmt.cxx @@ -112,7 +112,7 @@ SwEnvFmtPage::SwEnvFmtPage(Window* pParent, const SfxItemSet& rSet) : SetExchangeSupport(); // Metrics - FieldUnit aMetric = ::GetDfltMetric(FALSE); + FieldUnit aMetric = ::GetDfltMetric(sal_False); SetMetric(aAddrLeftField, aMetric); SetMetric(aAddrTopField, aMetric); SetMetric(aSendLeftField, aMetric); @@ -157,29 +157,29 @@ SwEnvFmtPage::SwEnvFmtPage(Window* pParent, const SfxItemSet& rSet) : aSizeFormatBox .SetSelectHdl(LINK(this, SwEnvFmtPage, FormatHdl)); // aSizeFormatBox - for (USHORT i = PAPER_A3; i <= PAPER_KAI32BIG; i++) + for (sal_uInt16 i = PAPER_A3; i <= PAPER_KAI32BIG; i++) { if (i != PAPER_USER) { String aPaperName = SvxPaperInfo::GetName((Paper) i), aEntryName; - USHORT nPos = 0; - BOOL bFound = FALSE; + sal_uInt16 nPos = 0; + sal_Bool bFound = sal_False; while (nPos < aSizeFormatBox.GetEntryCount() && !bFound) { aEntryName = aSizeFormatBox.GetEntry(i); if (aEntryName < aPaperName) nPos++; else - bFound = TRUE; + bFound = sal_True; } aSizeFormatBox.InsertEntry(aPaperName, nPos); - aIDs.Insert((USHORT) i, nPos); + aIDs.Insert((sal_uInt16) i, nPos); } } aSizeFormatBox.InsertEntry(SvxPaperInfo::GetName(PAPER_USER)); - aIDs.Insert((USHORT) PAPER_USER, aIDs.Count()); + aIDs.Insert((sal_uInt16) PAPER_USER, aIDs.Count()); } @@ -201,13 +201,13 @@ IMPL_LINK_INLINE_START( SwEnvFmtPage, ModifyHdl, Edit *, pEdit ) if (pEdit == &aSizeWidthField || pEdit == &aSizeHeightField) { Paper ePaper = SvxPaperInfo::GetSvxPaper( - Size(lHeight, lWidth), MAP_TWIP, TRUE); - for (USHORT i = 0; i < aIDs.Count(); i++) - if (aIDs[i] == (USHORT)ePaper) + Size(lHeight, lWidth), MAP_TWIP, sal_True); + for (sal_uInt16 i = 0; i < aIDs.Count(); i++) + if (aIDs[i] == (sal_uInt16)ePaper) aSizeFormatBox.SelectEntryPos(i); // remember user size - if (aIDs[aSizeFormatBox.GetSelectEntryPos()] == (USHORT)PAPER_USER) + if (aIDs[aSizeFormatBox.GetSelectEntryPos()] == (sal_uInt16)PAPER_USER) { lUserW = lWidth ; lUserH = lHeight; @@ -231,9 +231,9 @@ IMPL_LINK( SwEnvFmtPage, EditHdl, MenuButton *, pButton ) OSL_ENSURE(pSh, "Shell missing"); // determine collection-ptr - BOOL bSender = pButton != &aAddrEditButton; + sal_Bool bSender = pButton != &aAddrEditButton; - SwTxtFmtColl* pColl = pSh->GetTxtCollFromPool( static_cast< USHORT >( + SwTxtFmtColl* pColl = pSh->GetTxtCollFromPool( static_cast< sal_uInt16 >( bSender ? RES_POOLCOLL_SENDADRESS : RES_POOLCOLL_JAKETADRESS)); OSL_ENSURE(pColl, "Text collection missing"); @@ -251,7 +251,7 @@ IMPL_LINK( SwEnvFmtPage, EditHdl, MenuButton *, pButton ) const SfxPoolItem *pTmpBrush; if( SFX_ITEM_SET == aTmpSet.GetItemState( RES_CHRATR_BACKGROUND, - TRUE, &pTmpBrush ) ) + sal_True, &pTmpBrush ) ) { SvxBrushItem aTmpBrush( *((SvxBrushItem*)pTmpBrush) ); aTmpBrush.SetWhich( RES_BACKGROUND ); @@ -269,7 +269,7 @@ IMPL_LINK( SwEnvFmtPage, EditHdl, MenuButton *, pButton ) { SfxItemSet aOutputSet( *pDlg->GetOutputItemSet() ); if( SFX_ITEM_SET == aOutputSet.GetItemState( RES_BACKGROUND, - FALSE, &pTmpBrush ) ) + sal_False, &pTmpBrush ) ) { SvxBrushItem aTmpBrush( *((SvxBrushItem*)pTmpBrush) ); aTmpBrush.SetWhich( RES_CHRATR_BACKGROUND ); @@ -294,7 +294,7 @@ IMPL_LINK( SwEnvFmtPage, EditHdl, MenuButton *, pButton ) const SvxTabStopItem& rDefTabs = (const SvxTabStopItem&) pSh->GetView().GetCurShell()->GetPool().GetDefaultItem(RES_PARATR_TABSTOP); - USHORT nDefDist = ::GetTabDist( rDefTabs ); + sal_uInt16 nDefDist = ::GetTabDist( rDefTabs ); SfxUInt16Item aDefDistItem( SID_ATTR_TABSTOP_DEFAULTS, nDefDist ); aTmpSet.Put( aDefDistItem ); @@ -318,10 +318,10 @@ IMPL_LINK( SwEnvFmtPage, EditHdl, MenuButton *, pButton ) // maybe relocate defaults const SfxPoolItem* pItem = 0; SfxItemSet* pOutputSet = (SfxItemSet*)pDlg->GetOutputItemSet(); - USHORT nNewDist; + sal_uInt16 nNewDist; if( SFX_ITEM_SET == pOutputSet->GetItemState( SID_ATTR_TABSTOP_DEFAULTS, - FALSE, &pItem ) && + sal_False, &pItem ) && nDefDist != (nNewDist = ((SfxUInt16Item*)pItem)->GetValue()) ) { SvxTabStopItem aDefTabs( 0, 0, SVX_TAB_ADJUST_DEFAULT, RES_PARATR_TABSTOP ); @@ -345,16 +345,16 @@ IMPL_LINK( SwEnvFmtPage, EditHdl, MenuButton *, pButton ) Description: A temporary Itemset that gets discarded at abort ------------------------------------------------------------------------*/ -SfxItemSet *SwEnvFmtPage::GetCollItemSet(SwTxtFmtColl* pColl, BOOL bSender) +SfxItemSet *SwEnvFmtPage::GetCollItemSet(SwTxtFmtColl* pColl, sal_Bool bSender) { SfxItemSet *&pAddrSet = bSender ? GetParent()->pSenderSet : GetParent()->pAddresseeSet; if (!pAddrSet) { // determine range (merge both Itemsets' ranges) - const USHORT *pRanges = pColl->GetAttrSet().GetRanges(); + const sal_uInt16 *pRanges = pColl->GetAttrSet().GetRanges(); - static USHORT const aRanges[] = + static sal_uInt16 const aRanges[] = { RES_PARATR_BEGIN, RES_PARATR_ADJUST, RES_PARATR_TABSTOP, RES_PARATR_END-1, @@ -368,12 +368,12 @@ SfxItemSet *SwEnvFmtPage::GetCollItemSet(SwTxtFmtColl* pColl, BOOL bSender) }; // BruteForce merge because MergeRange in SvTools is buggy: - USHORT i = 0; + sal_uInt16 i = 0; SvLongsSort aMergedRanges( 0, 10 ); while (pRanges[i]) { - for (USHORT nPos = pRanges[i]; nPos <= pRanges[i+1]; nPos++) + for (sal_uInt16 nPos = pRanges[i]; nPos <= pRanges[i+1]; nPos++) aMergedRanges.Insert(nPos); i += 2; } @@ -382,13 +382,13 @@ SfxItemSet *SwEnvFmtPage::GetCollItemSet(SwTxtFmtColl* pColl, BOOL bSender) while (aRanges[i]) { - for (USHORT nPos = aRanges[i]; nPos <= aRanges[i+1]; nPos++) + for (sal_uInt16 nPos = aRanges[i]; nPos <= aRanges[i+1]; nPos++) aMergedRanges.Insert(nPos); i += 2; } // compact ranges - std::vector<USHORT> aCompactedRanges; + std::vector<sal_uInt16> aCompactedRanges; aCompactedRanges.push_back(aMergedRanges[0]); @@ -408,7 +408,7 @@ SfxItemSet *SwEnvFmtPage::GetCollItemSet(SwTxtFmtColl* pColl, BOOL bSender) } // create new ranges - USHORT *pNewRanges = new USHORT[aCompactedRanges.size() + 1]; + sal_uInt16 *pNewRanges = new sal_uInt16[aCompactedRanges.size() + 1]; for (i = 0; i < aCompactedRanges.size(); ++i) pNewRanges[i] = aCompactedRanges[i]; @@ -433,8 +433,8 @@ IMPL_LINK( SwEnvFmtPage, FormatHdl, ListBox *, EMPTYARG ) long lAddrFromLeft; long lAddrFromTop; - USHORT nPaper = aIDs[aSizeFormatBox.GetSelectEntryPos()]; - if (nPaper != (USHORT)PAPER_USER) + sal_uInt16 nPaper = aIDs[aSizeFormatBox.GetSelectEntryPos()]; + if (nPaper != (sal_uInt16)PAPER_USER) { Size aSz = SvxPaperInfo::GetPaperSize((Paper)nPaper); lWidth = Max(aSz.Width(), aSz.Height()); @@ -529,8 +529,8 @@ void SwEnvFmtPage::FillItem(SwEnvItem& rItem) rItem.lSendFromLeft = static_cast< sal_Int32 >(GetFldVal(aSendLeftField)); rItem.lSendFromTop = static_cast< sal_Int32 >(GetFldVal(aSendTopField )); - USHORT nPaper = aIDs[aSizeFormatBox.GetSelectEntryPos()]; - if (nPaper == (USHORT)PAPER_USER) + sal_uInt16 nPaper = aIDs[aSizeFormatBox.GetSelectEntryPos()]; + if (nPaper == (sal_uInt16)PAPER_USER) { long lWVal = static_cast< long >(GetFldVal(aSizeWidthField )); long lHVal = static_cast< long >(GetFldVal(aSizeHeightField)); @@ -546,11 +546,11 @@ void SwEnvFmtPage::FillItem(SwEnvItem& rItem) } } -BOOL SwEnvFmtPage::FillItemSet(SfxItemSet& rSet) +sal_Bool SwEnvFmtPage::FillItemSet(SfxItemSet& rSet) { FillItem(GetParent()->aEnvItem); rSet.Put(GetParent()->aEnvItem); - return TRUE; + return sal_True; } void SwEnvFmtPage::Reset(const SfxItemSet& rSet) @@ -559,9 +559,9 @@ void SwEnvFmtPage::Reset(const SfxItemSet& rSet) Paper ePaper = SvxPaperInfo::GetSvxPaper( Size( Min(rItem.lWidth, rItem.lHeight), - Max(rItem.lWidth, rItem.lHeight)), MAP_TWIP, TRUE); - for (USHORT i = 0; i < (USHORT) aIDs.Count(); i++) - if (aIDs[i] == (USHORT)ePaper) + Max(rItem.lWidth, rItem.lHeight)), MAP_TWIP, sal_True); + for (sal_uInt16 i = 0; i < (sal_uInt16) aIDs.Count(); i++) + if (aIDs[i] == (sal_uInt16)ePaper) aSizeFormatBox.SelectEntryPos(i); // Metric fields diff --git a/sw/source/ui/envelp/envfmt.hxx b/sw/source/ui/envelp/envfmt.hxx index 96fb9a68e8..de5845d007 100644 --- a/sw/source/ui/envelp/envfmt.hxx +++ b/sw/source/ui/envelp/envfmt.hxx @@ -83,7 +83,7 @@ class SwEnvFmtPage : public SfxTabPage void SetMinMax(); - SfxItemSet *GetCollItemSet(SwTxtFmtColl* pColl, BOOL bSender); + SfxItemSet *GetCollItemSet(SwTxtFmtColl* pColl, sal_Bool bSender); using Window::GetParent; SwEnvDlg *GetParent() {return (SwEnvDlg*) SfxTabPage::GetParent()->GetParent();} @@ -98,7 +98,7 @@ public: virtual void ActivatePage(const SfxItemSet& rSet); virtual int DeactivatePage(SfxItemSet* pSet = 0); void FillItem(SwEnvItem& rItem); - virtual BOOL FillItemSet(SfxItemSet& rSet); + virtual sal_Bool FillItemSet(SfxItemSet& rSet); virtual void Reset(const SfxItemSet& rSet); }; diff --git a/sw/source/ui/envelp/envfmt.src b/sw/source/ui/envelp/envfmt.src index 57132b7754..fbba44527b 100644 --- a/sw/source/ui/envelp/envfmt.src +++ b/sw/source/ui/envelp/envfmt.src @@ -56,6 +56,7 @@ TabPage TP_ENV_FMT }; MetricField FLD_ADDR_LEFT { + HelpID = "sw:MetricField:TP_ENV_FMT:FLD_ADDR_LEFT"; Border = TRUE ; Pos = MAP_APPFONT ( 60 , 25 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -80,6 +81,7 @@ TabPage TP_ENV_FMT }; MetricField FLD_ADDR_TOP { + HelpID = "sw:MetricField:TP_ENV_FMT:FLD_ADDR_TOP"; Border = TRUE ; Pos = MAP_APPFONT ( 60 , 41 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -104,6 +106,7 @@ TabPage TP_ENV_FMT }; MenuButton BTN_ADDR_EDIT { + HelpID = "sw:MenuButton:TP_ENV_FMT:BTN_ADDR_EDIT"; Pos = MAP_APPFONT ( 194 , 24 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; TabStop = TRUE ; @@ -131,6 +134,7 @@ TabPage TP_ENV_FMT }; MetricField FLD_SEND_LEFT { + HelpID = "sw:MetricField:TP_ENV_FMT:FLD_SEND_LEFT"; Border = TRUE ; Pos = MAP_APPFONT ( 60 , 78 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -155,6 +159,7 @@ TabPage TP_ENV_FMT }; MetricField FLD_SEND_TOP { + HelpID = "sw:MetricField:TP_ENV_FMT:FLD_SEND_TOP"; Border = TRUE ; Pos = MAP_APPFONT ( 60 , 94 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -179,6 +184,7 @@ TabPage TP_ENV_FMT }; MenuButton BTN_SEND_EDIT { + HelpID = "sw:MenuButton:TP_ENV_FMT:BTN_SEND_EDIT"; Pos = MAP_APPFONT ( 194 , 77 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "Edit" ; @@ -199,6 +205,7 @@ TabPage TP_ENV_FMT }; ListBox BOX_SIZE_FORMAT { + HelpID = "sw:ListBox:TP_ENV_FMT:BOX_SIZE_FORMAT"; Border = TRUE ; Pos = MAP_APPFONT ( 60 , 120 ) ; Size = MAP_APPFONT ( 40 , 72 ) ; @@ -214,6 +221,7 @@ TabPage TP_ENV_FMT }; MetricField FLD_SIZE_WIDTH { + HelpID = "sw:MetricField:TP_ENV_FMT:FLD_SIZE_WIDTH"; Border = TRUE ; Pos = MAP_APPFONT ( 60 , 136 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -238,6 +246,7 @@ TabPage TP_ENV_FMT }; MetricField FLD_SIZE_HEIGHT { + HelpID = "sw:MetricField:TP_ENV_FMT:FLD_SIZE_HEIGHT"; Border = TRUE ; Pos = MAP_APPFONT ( 60 , 152 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; diff --git a/sw/source/ui/envelp/envimg.cxx b/sw/source/ui/envelp/envimg.cxx index d4e0bdfee9..ff9e07ee5f 100644 --- a/sw/source/ui/envelp/envimg.cxx +++ b/sw/source/ui/envelp/envimg.cxx @@ -47,7 +47,7 @@ #include <unomid.h> -#ifdef WIN +#ifdef WNT #define NEXTLINE UniString::CreateFromAscii("\r\n") #else #define NEXTLINE '\n' @@ -68,7 +68,7 @@ SW_DLLPUBLIC String MakeSender() String sRet; String sSenderToken(SW_RES(STR_SENDER_TOKENS)); xub_StrLen nSttPos = 0, nTokenCount = sSenderToken.GetTokenCount(';'); - BOOL bLastLength = TRUE; + sal_Bool bLastLength = sal_True; for( xub_StrLen i = 0; i < nTokenCount; i++ ) { String sToken = sSenderToken.GetToken( 0, ';', nSttPos ); @@ -82,7 +82,7 @@ SW_DLLPUBLIC String MakeSender() { if(bLastLength) sRet +=NEXTLINE; - bLastLength = TRUE; + bLastLength = sal_True; } else if(sToken.EqualsAscii("FIRSTNAME")) sRet += (String)rUserOpt.GetFirstName(); @@ -108,7 +108,7 @@ SwEnvItem::SwEnvItem() : SfxPoolItem(FN_ENVELOP) { aAddrText = aEmptyStr; - bSend = TRUE; + bSend = sal_True; aSendText = MakeSender(); lSendFromLeft = 566; // 1 cm lSendFromTop = 566; // 1 cm @@ -116,7 +116,7 @@ SwEnvItem::SwEnvItem() : lWidth = aEnvSz.Width(); lHeight = aEnvSz.Height(); eAlign = ENV_HOR_LEFT; - bPrintFromAbove = TRUE; + bPrintFromAbove = sal_True; lShiftRight = 0; lShiftDown = 0; @@ -310,7 +310,7 @@ Sequence<rtl::OUString> SwEnvCfgItem::GetPropertyNames() return aNames; } -bool SwEnvItem::QueryValue( Any& rVal, BYTE nMemberId ) const +bool SwEnvItem::QueryValue( Any& rVal, sal_uInt8 nMemberId ) const { sal_Bool bRet = true; switch(nMemberId & ~CONVERT_TWIPS) @@ -335,7 +335,7 @@ bool SwEnvItem::QueryValue( Any& rVal, BYTE nMemberId ) const return bRet; } -bool SwEnvItem::PutValue(const Any& rVal, BYTE nMemberId) +bool SwEnvItem::PutValue(const Any& rVal, sal_uInt8 nMemberId) { bool bRet = false; switch(nMemberId & ~CONVERT_TWIPS) diff --git a/sw/source/ui/envelp/envlop.src b/sw/source/ui/envelp/envlop.src index 9c91079353..8ef8a8ad89 100644 --- a/sw/source/ui/envelp/envlop.src +++ b/sw/source/ui/envelp/envlop.src @@ -85,6 +85,7 @@ TabPage TP_ENV_ENV }; MultiLineEdit EDT_ADDR { + HelpID = "sw:MultiLineEdit:TP_ENV_ENV:EDT_ADDR"; Border = TRUE ; Pos = MAP_APPFONT ( 6 , 17 ) ; Size = MAP_APPFONT ( 124 , 66 ) ; @@ -102,6 +103,7 @@ TabPage TP_ENV_ENV }; ListBox LB_DATABASE { + HelpID = "sw:ListBox:TP_ENV_ENV:LB_DATABASE"; Border = TRUE ; Pos = MAP_APPFONT ( 162 , 17 ) ; Size = MAP_APPFONT ( 82 , 50 ) ; @@ -116,6 +118,7 @@ TabPage TP_ENV_ENV }; ListBox LB_TABLE { + HelpID = "sw:ListBox:TP_ENV_ENV:LB_TABLE"; Border = TRUE ; Pos = MAP_APPFONT ( 162 , 44 ) ; Size = MAP_APPFONT ( 82 , 50 ) ; @@ -124,6 +127,7 @@ TabPage TP_ENV_ENV }; ImageButton BTN_INSERT { + HelpID = "sw:ImageButton:TP_ENV_ENV:BTN_INSERT"; Pos = MAP_APPFONT ( 137 , 71 ) ; Size = MAP_APPFONT ( 18 , 12 ) ; SYMBOL = IMAGEBUTTON_ARROW_LEFT ; @@ -137,6 +141,7 @@ TabPage TP_ENV_ENV }; ListBox LB_DBFIELD { + HelpID = "sw:ListBox:TP_ENV_ENV:LB_DBFIELD"; Border = TRUE ; Pos = MAP_APPFONT ( 162 , 71 ) ; Size = MAP_APPFONT ( 82 , 50 ) ; @@ -145,6 +150,7 @@ TabPage TP_ENV_ENV }; CheckBox BOX_SEND { + HelpID = "sw:CheckBox:TP_ENV_ENV:BOX_SEND"; Pos = MAP_APPFONT ( 6 , 105 ) ; Size = MAP_APPFONT ( 124 , 8 ) ; Text [ en-US ] = "~Sender" ; @@ -152,6 +158,7 @@ TabPage TP_ENV_ENV }; MultiLineEdit EDT_SEND { + HelpID = "sw:MultiLineEdit:TP_ENV_ENV:EDT_SEND"; Border = TRUE ; Pos = MAP_APPFONT ( 6 , 116) ; Size = MAP_APPFONT ( 124 , 63 ) ; diff --git a/sw/source/ui/envelp/envlop1.cxx b/sw/source/ui/envelp/envlop1.cxx index 32a4dc262f..cda3fded49 100644 --- a/sw/source/ui/envelp/envlop1.cxx +++ b/sw/source/ui/envelp/envlop1.cxx @@ -89,12 +89,12 @@ void SwEnvPreview::Paint(const Rectangle &) const SwEnvItem& rItem = ((SwEnvDlg*) GetParent()->GetParent()->GetParent())->aEnvItem; - USHORT nPageW = (USHORT) Max(rItem.lWidth, rItem.lHeight), - nPageH = (USHORT) Min(rItem.lWidth, rItem.lHeight); + sal_uInt16 nPageW = (sal_uInt16) Max(rItem.lWidth, rItem.lHeight), + nPageH = (sal_uInt16) Min(rItem.lWidth, rItem.lHeight); - float fx = static_cast< float >(GetOutputSizePixel().Width () / nPageW), - fy = static_cast< float >(GetOutputSizePixel().Height() / nPageH), - f = static_cast< float >(0.8 * ( fx < fy ? fx : fy )); + float fx = (float)GetOutputSizePixel().Width () / (float)nPageW, + fy = (float)GetOutputSizePixel().Height() / (float)nPageH, + f = 0.8f * ( fx < fy ? fx : fy ); Color aBack = rSettings.GetWindowColor( ); Color aFront = SwViewOption::GetFontColor(); @@ -106,8 +106,8 @@ void SwEnvPreview::Paint(const Rectangle &) SetLineColor( aFront ); // Envelope - long nW = (USHORT) (f * nPageW), - nH = (USHORT) (f * nPageH), + long nW = (sal_uInt16) (f * nPageW), + nH = (sal_uInt16) (f * nPageH), nX = (GetOutputSizePixel().Width () - nW) / 2, nY = (GetOutputSizePixel().Height() - nH) / 2; SetFillColor( aBack ); @@ -116,37 +116,37 @@ void SwEnvPreview::Paint(const Rectangle &) // Sender if (rItem.bSend) { - long nSendX = nX + (USHORT) (f * rItem.lSendFromLeft), - nSendY = nY + (USHORT) (f * rItem.lSendFromTop ), - nSendW = (USHORT) (f * (rItem.lAddrFromLeft - rItem.lSendFromLeft)), - nSendH = (USHORT) (f * (rItem.lAddrFromTop - rItem.lSendFromTop - 566)); + long nSendX = nX + (sal_uInt16) (f * rItem.lSendFromLeft), + nSendY = nY + (sal_uInt16) (f * rItem.lSendFromTop ), + nSendW = (sal_uInt16) (f * (rItem.lAddrFromLeft - rItem.lSendFromLeft)), + nSendH = (sal_uInt16) (f * (rItem.lAddrFromTop - rItem.lSendFromTop - 566)); SetFillColor( aMedium ); DrawRect(Rectangle(Point(nSendX, nSendY), Size(nSendW, nSendH))); } // Addressee - long nAddrX = nX + (USHORT) (f * rItem.lAddrFromLeft), - nAddrY = nY + (USHORT) (f * rItem.lAddrFromTop ), - nAddrW = (USHORT) (f * (nPageW - rItem.lAddrFromLeft - 566)), - nAddrH = (USHORT) (f * (nPageH - rItem.lAddrFromTop - 566)); + long nAddrX = nX + (sal_uInt16) (f * rItem.lAddrFromLeft), + nAddrY = nY + (sal_uInt16) (f * rItem.lAddrFromTop ), + nAddrW = (sal_uInt16) (f * (nPageW - rItem.lAddrFromLeft - 566)), + nAddrH = (sal_uInt16) (f * (nPageH - rItem.lAddrFromTop - 566)); SetFillColor( aMedium ); DrawRect(Rectangle(Point(nAddrX, nAddrY), Size(nAddrW, nAddrH))); // Stamp - long nStmpW = (USHORT) (f * 1417 /* 2,5 cm */), - nStmpH = (USHORT) (f * 1701 /* 3,0 cm */), - nStmpX = nX + nW - (USHORT) (f * 566) - nStmpW, - nStmpY = nY + (USHORT) (f * 566); + long nStmpW = (sal_uInt16) (f * 1417 /* 2,5 cm */), + nStmpH = (sal_uInt16) (f * 1701 /* 3,0 cm */), + nStmpX = nX + nW - (sal_uInt16) (f * 566) - nStmpW, + nStmpY = nY + (sal_uInt16) (f * 566); SetFillColor( aBack ); DrawRect(Rectangle(Point(nStmpX, nStmpY), Size(nStmpW, nStmpH))); } SwEnvDlg::SwEnvDlg(Window* pParent, const SfxItemSet& rSet, - SwWrtShell* pWrtSh, Printer* pPrt, BOOL bInsert) : + SwWrtShell* pWrtSh, Printer* pPrt, sal_Bool bInsert) : - SfxTabDialog(pParent, SW_RES(DLG_ENV), &rSet, FALSE, &aEmptyStr), + SfxTabDialog(pParent, SW_RES(DLG_ENV), &rSet, sal_False, &aEmptyStr), sInsert(SW_RES(ST_INSERT)), sChange(SW_RES(ST_CHANGE)), aEnvItem((const SwEnvItem&) rSet.Get(FN_ENVELOP)), @@ -177,7 +177,7 @@ SwEnvDlg::~SwEnvDlg() delete pSenderSet; } -void SwEnvDlg::PageCreated(USHORT nId, SfxTabPage &rPage) +void SwEnvDlg::PageCreated(sal_uInt16 nId, SfxTabPage &rPage) { if (nId == TP_ENV_PRT) { @@ -248,7 +248,7 @@ SwEnvPage::~SwEnvPage() IMPL_LINK( SwEnvPage, DatabaseHdl, ListBox *, pListBox ) { - SwWait aWait( *pSh->GetView().GetDocShell(), TRUE ); + SwWait aWait( *pSh->GetView().GetDocShell(), sal_True ); if (pListBox == &aDatabaseLB) { @@ -283,7 +283,7 @@ IMPL_LINK( SwEnvPage, FieldHdl, Button *, EMPTYARG ) IMPL_LINK( SwEnvPage, SenderHdl, Button *, EMPTYARG ) { - const BOOL bEnable = aSenderBox.IsChecked(); + const sal_Bool bEnable = aSenderBox.IsChecked(); GetParent()->aEnvItem.bSend = bEnable; aSenderEdit.Enable(bEnable); if ( bEnable ) @@ -348,11 +348,11 @@ void SwEnvPage::FillItem(SwEnvItem& rItem) rItem.aSendText = aSenderEdit.GetText(); } -BOOL SwEnvPage::FillItemSet(SfxItemSet& rSet) +sal_Bool SwEnvPage::FillItemSet(SfxItemSet& rSet) { FillItem(GetParent()->aEnvItem); rSet.Put(GetParent()->aEnvItem); - return TRUE; + return sal_True; } void SwEnvPage::Reset(const SfxItemSet& rSet) diff --git a/sw/source/ui/envelp/envprt.cxx b/sw/source/ui/envelp/envprt.cxx index 2b7e67ded3..1534294ee9 100644 --- a/sw/source/ui/envelp/envprt.cxx +++ b/sw/source/ui/envelp/envprt.cxx @@ -66,7 +66,7 @@ SwEnvPrtPage::SwEnvPrtPage(Window* pParent, const SfxItemSet& rSet) : SetExchangeSupport(); // Metrics - FieldUnit eUnit = ::GetDfltMetric(FALSE); + FieldUnit eUnit = ::GetDfltMetric(sal_False); SetMetric(aRightField, eUnit); SetMetric(aDownField , eUnit); @@ -136,15 +136,15 @@ IMPL_LINK( SwEnvPrtPage, AlignHdl, ToolBox *, EMPTYARG ) { if (aAlignBox.GetCurItemId()) { - for (USHORT i = ITM_HOR_LEFT; i <= ITM_VER_RGHT; i++) - aAlignBox.CheckItem(i, FALSE); - aAlignBox.CheckItem(aAlignBox.GetCurItemId(), TRUE); + for (sal_uInt16 i = ITM_HOR_LEFT; i <= ITM_VER_RGHT; i++) + aAlignBox.CheckItem(i, sal_False); + aAlignBox.CheckItem(aAlignBox.GetCurItemId(), sal_True); } else { // GetCurItemId() == 0 is possible! const SwEnvItem& rItem = (const SwEnvItem&) GetItemSet().Get(FN_ENVELOP); - aAlignBox.CheckItem((USHORT) rItem.eAlign + ITM_HOR_LEFT, TRUE); + aAlignBox.CheckItem((sal_uInt16) rItem.eAlign + ITM_HOR_LEFT, sal_True); } return 0; } @@ -169,8 +169,8 @@ int SwEnvPrtPage::DeactivatePage(SfxItemSet* _pSet) void SwEnvPrtPage::FillItem(SwEnvItem& rItem) { - USHORT nID = 0; - for (USHORT i = ITM_HOR_LEFT; i <= ITM_VER_RGHT && !nID; i++) + sal_uInt16 nID = 0; + for (sal_uInt16 i = ITM_HOR_LEFT; i <= ITM_VER_RGHT && !nID; i++) if (aAlignBox.IsItemChecked(i)) nID = i; @@ -180,18 +180,18 @@ void SwEnvPrtPage::FillItem(SwEnvItem& rItem) rItem.lShiftDown = static_cast< sal_Int32 >(GetFldVal(aDownField )); } -BOOL SwEnvPrtPage::FillItemSet(SfxItemSet& rSet) +sal_Bool SwEnvPrtPage::FillItemSet(SfxItemSet& rSet) { FillItem(GetParent()->aEnvItem); rSet.Put(GetParent()->aEnvItem); - return TRUE; + return sal_True; } void SwEnvPrtPage::Reset(const SfxItemSet& rSet) { // Read item const SwEnvItem& rItem = (const SwEnvItem&) rSet.Get(FN_ENVELOP); - aAlignBox.CheckItem((USHORT) rItem.eAlign + ITM_HOR_LEFT); + aAlignBox.CheckItem((sal_uInt16) rItem.eAlign + ITM_HOR_LEFT); if (rItem.bPrintFromAbove) aTopButton .Check(); diff --git a/sw/source/ui/envelp/envprt.hxx b/sw/source/ui/envelp/envprt.hxx index 2d2de05286..b48182827b 100644 --- a/sw/source/ui/envelp/envprt.hxx +++ b/sw/source/ui/envelp/envprt.hxx @@ -82,7 +82,7 @@ public: virtual void ActivatePage(const SfxItemSet& rSet); virtual int DeactivatePage(SfxItemSet* pSet = 0); void FillItem(SwEnvItem& rItem); - virtual BOOL FillItemSet(SfxItemSet& rSet); + virtual sal_Bool FillItemSet(SfxItemSet& rSet); virtual void Reset(const SfxItemSet& rSet); inline void SetPrt(Printer* pPrinter) { pPrt = pPrinter; } diff --git a/sw/source/ui/envelp/envprt.src b/sw/source/ui/envelp/envprt.src index a0c7dcc4ac..c8425ef5ae 100644 --- a/sw/source/ui/envelp/envprt.src +++ b/sw/source/ui/envelp/envprt.src @@ -48,37 +48,38 @@ TabPage TP_ENV_PRT ToolBoxItem { Identifier = ITM_HOR_LEFT ; - HelpID = ITM_HOR_LEFT ; + HelpID = HID_ITM_HOR_LEFT ; }; ToolBoxItem { Identifier = ITM_HOR_CNTR ; - HelpID = ITM_HOR_CNTR ; + HelpID = HID_ITM_HOR_CNTR ; }; ToolBoxItem { Identifier = ITM_HOR_RGHT ; - HelpID = ITM_HOR_RGHT ; + HelpID = HID_ITM_HOR_RGHT ; }; ToolBoxItem { Identifier = ITM_VER_LEFT ; - HelpID = ITM_VER_LEFT ; + HelpID = HID_ITM_VER_LEFT ; }; ToolBoxItem { Identifier = ITM_VER_CNTR ; - HelpID = ITM_VER_CNTR ; + HelpID = HID_ITM_VER_CNTR ; }; ToolBoxItem { Identifier = ITM_VER_RGHT ; - HelpID = ITM_VER_RGHT ; + HelpID = HID_ITM_VER_RGHT ; }; }; }; RadioButton BTN_TOP { + HelpID = "sw:RadioButton:TP_ENV_PRT:BTN_TOP"; Pos = MAP_APPFONT ( 18 , 42 ) ; Size = MAP_APPFONT ( 179 , 10 ) ; Text [ en-US ] = "~Print from top" ; @@ -88,6 +89,7 @@ TabPage TP_ENV_PRT }; RadioButton BTN_BOTTOM { + HelpID = "sw:RadioButton:TP_ENV_PRT:BTN_BOTTOM"; Pos = MAP_APPFONT ( 18 , 56 ) ; Size = MAP_APPFONT ( 179 , 10 ) ; Text [ en-US ] = "Print from ~bottom" ; @@ -102,6 +104,7 @@ TabPage TP_ENV_PRT }; MetricField FLD_RIGHT { + HelpID = "sw:MetricField:TP_ENV_PRT:FLD_RIGHT"; Border = TRUE ; Pos = MAP_APPFONT ( 86 , 72 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -126,6 +129,7 @@ TabPage TP_ENV_PRT }; MetricField FLD_DOWN { + HelpID = "sw:MetricField:TP_ENV_PRT:FLD_DOWN"; Border = TRUE ; Pos = MAP_APPFONT ( 86 , 88 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -156,6 +160,7 @@ TabPage TP_ENV_PRT }; PushButton BTN_PRTSETUP { + HelpID = "sw:PushButton:TP_ENV_PRT:BTN_PRTSETUP"; Pos = MAP_APPFONT ( 198 , 114 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; TabStop = TRUE ; diff --git a/sw/source/ui/envelp/label.src b/sw/source/ui/envelp/label.src index 2d3d9c319b..944362d40e 100644 --- a/sw/source/ui/envelp/label.src +++ b/sw/source/ui/envelp/label.src @@ -109,6 +109,7 @@ TabPage TP_LAB_LAB }; CheckBox BOX_ADDR { + HelpID = "sw:CheckBox:TP_LAB_LAB:BOX_ADDR"; Pos = MAP_APPFONT ( 67 , 14 ) ; Size = MAP_APPFONT ( 50 , 10 ) ; TabStop = TRUE ; @@ -116,6 +117,7 @@ TabPage TP_LAB_LAB }; MultiLineEdit EDT_WRITING { + HelpID = "sw:MultiLineEdit:TP_LAB_LAB:EDT_WRITING"; Border = TRUE ; Pos = MAP_APPFONT ( 12 , 27 ) ; Size = MAP_APPFONT ( 105 , 89 ) ; @@ -133,6 +135,7 @@ TabPage TP_LAB_LAB }; ListBox LB_DATABASE { + HelpID = "sw:ListBox:TP_LAB_LAB:LB_DATABASE"; Border = TRUE ; Pos = MAP_APPFONT ( 149 , 27 ) ; Size = MAP_APPFONT ( 99 , 70 ) ; @@ -147,6 +150,7 @@ TabPage TP_LAB_LAB }; ListBox LB_TABLE { + HelpID = "sw:ListBox:TP_LAB_LAB:LB_TABLE"; Border = TRUE ; Pos = MAP_APPFONT ( 149 , 56 ) ; Size = MAP_APPFONT ( 99 , 70 ) ; @@ -155,6 +159,7 @@ TabPage TP_LAB_LAB }; ImageButton BTN_INSERT { + HelpID = "sw:ImageButton:TP_LAB_LAB:BTN_INSERT"; Pos = MAP_APPFONT ( 124 , 92 ) ; Size = MAP_APPFONT ( 18 , 12 ) ; SYMBOL = IMAGEBUTTON_ARROW_LEFT ; @@ -168,6 +173,7 @@ TabPage TP_LAB_LAB }; ListBox LB_DBFIELD { + HelpID = "sw:ListBox:TP_LAB_LAB:LB_DBFIELD"; Border = TRUE ; Pos = MAP_APPFONT ( 149 , 92 ) ; Size = MAP_APPFONT ( 99 , 70 ) ; @@ -183,6 +189,7 @@ TabPage TP_LAB_LAB }; RadioButton BTN_CONT { + HelpID = "sw:RadioButton:TP_LAB_LAB:BTN_CONT"; Pos = MAP_APPFONT ( 12 , 137 ) ; Size = MAP_APPFONT ( 65 , 10 ) ; TabStop = TRUE ; @@ -191,6 +198,7 @@ TabPage TP_LAB_LAB }; RadioButton BTN_SHEET { + HelpID = "sw:RadioButton:TP_LAB_LAB:BTN_SHEET"; Pos = MAP_APPFONT ( 12 , 153 ) ; Size = MAP_APPFONT ( 65 , 10 ) ; Text [ en-US ] = "~Sheet" ; @@ -204,6 +212,7 @@ TabPage TP_LAB_LAB }; ListBox BOX_MAKE { + HelpID = "sw:ListBox:TP_LAB_LAB:BOX_MAKE"; Border = TRUE ; Pos = MAP_APPFONT ( 124 , 136 ) ; Size = MAP_APPFONT ( 124 , 90 ) ; @@ -219,6 +228,7 @@ TabPage TP_LAB_LAB }; ListBox BOX_TYPE { + HelpID = "sw:ListBox:TP_LAB_LAB:BOX_TYPE"; Border = TRUE ; Pos = MAP_APPFONT ( 124 , 152 ) ; Size = MAP_APPFONT ( 124 , 90 ) ; @@ -254,6 +264,7 @@ FloatingWindow DLG_SYNC_BTN Hide = TRUE ; PushButton BTN_SYNC { + HelpID = "sw:PushButton:DLG_SYNC_BTN:BTN_SYNC"; Pos = MAP_APPFONT ( 1 , 1 ) ; Size = MAP_APPFONT ( WIDTH - 1 , HEIGHT - 1 ) ; Text [ en-US ] = "Synchronize Labels" ; @@ -290,6 +301,7 @@ TabPage TP_VISITING_CARDS }; ListBox LB_AUTO_TEXT_GROUP { + HelpID = "sw:ListBox:TP_VISITING_CARDS:LB_AUTO_TEXT_GROUP"; Pos = MAP_APPFONT ( 12 , 164) ; Size = MAP_APPFONT ( 109 , 50 ) ; Border = TRUE ; @@ -331,18 +343,21 @@ TabPage TP_PRIVATE_DATA }; Edit ED_FIRSTNAME { + HelpID = "sw:Edit:TP_PRIVATE_DATA:ED_FIRSTNAME"; Pos = MAP_APPFONT ( 105 , 14 ) ; Size = MAP_APPFONT ( 55 , 12 ) ; Border = TRUE ; }; Edit ED_NAME { + HelpID = "sw:Edit:TP_PRIVATE_DATA:ED_NAME"; Pos = MAP_APPFONT ( 163 , 14 ) ; Size = MAP_APPFONT ( 55 , 12 ) ; Border = TRUE ; }; Edit ED_SHORTCUT { + HelpID = "sw:Edit:TP_PRIVATE_DATA:ED_SHORTCUT"; Pos = MAP_APPFONT ( 221 , 14 ) ; Size = MAP_APPFONT ( 27 , 12 ) ; Border = TRUE ; @@ -355,18 +370,21 @@ TabPage TP_PRIVATE_DATA }; Edit ED_FIRSTNAME_2 { + HelpID = "sw:Edit:TP_PRIVATE_DATA:ED_FIRSTNAME_2"; Pos = MAP_APPFONT ( 105 , 30 ) ; Size = MAP_APPFONT ( 55 , 12 ) ; Border = TRUE ; }; Edit ED_NAME_2 { + HelpID = "sw:Edit:TP_PRIVATE_DATA:ED_NAME_2"; Pos = MAP_APPFONT ( 163 , 30 ) ; Size = MAP_APPFONT ( 55 , 12 ) ; Border = TRUE ; }; Edit ED_SHORTCUT_2 { + HelpID = "sw:Edit:TP_PRIVATE_DATA:ED_SHORTCUT_2"; Pos = MAP_APPFONT ( 221 , 30 ) ; Size = MAP_APPFONT ( 27 , 12 ) ; Border = TRUE ; @@ -379,6 +397,7 @@ TabPage TP_PRIVATE_DATA }; Edit ED_STREET { + HelpID = "sw:Edit:TP_PRIVATE_DATA:ED_STREET"; Pos = MAP_APPFONT ( 105 , 46 ) ; Size = MAP_APPFONT ( 143 , 12 ) ; Border = TRUE ; @@ -391,12 +410,14 @@ TabPage TP_PRIVATE_DATA }; Edit ED_ZIP { + HelpID = "sw:Edit:TP_PRIVATE_DATA:ED_ZIP"; Pos = MAP_APPFONT ( 105 , 62 ) ; Size = MAP_APPFONT ( 50 , 12 ) ; Border = TRUE ; }; Edit ED_CITY { + HelpID = "sw:Edit:TP_PRIVATE_DATA:ED_CITY"; Pos = MAP_APPFONT ( 158 , 62 ) ; Size = MAP_APPFONT ( 90 , 12 ) ; Border = TRUE ; @@ -409,12 +430,14 @@ TabPage TP_PRIVATE_DATA }; Edit ED_COUNTRY { + HelpID = "sw:Edit:TP_PRIVATE_DATA:ED_COUNTRY"; Pos = MAP_APPFONT ( 105 , 78 ) ; Size = MAP_APPFONT ( 71 , 12 ) ; Border = TRUE ; }; Edit ED_STATE { + HelpID = "sw:Edit:TP_PRIVATE_DATA:ED_STATE"; Pos = MAP_APPFONT ( 179 , 78 ) ; Size = MAP_APPFONT ( 69 , 12 ) ; Border = TRUE ; @@ -427,12 +450,14 @@ TabPage TP_PRIVATE_DATA }; Edit ED_TITLE { + HelpID = "sw:Edit:TP_PRIVATE_DATA:ED_TITLE"; Pos = MAP_APPFONT ( 105 , 94 ) ; Size = MAP_APPFONT ( 71 , 12 ) ; Border = TRUE ; }; Edit ED_PROFESSION { + HelpID = "sw:Edit:TP_PRIVATE_DATA:ED_PROFESSION"; Pos = MAP_APPFONT ( 179 , 94 ) ; Size = MAP_APPFONT ( 69 , 12 ) ; Border = TRUE ; @@ -445,12 +470,14 @@ TabPage TP_PRIVATE_DATA }; Edit ED_PHONE { + HelpID = "sw:Edit:TP_PRIVATE_DATA:ED_PHONE"; Pos = MAP_APPFONT ( 105 , 110 ) ; Size = MAP_APPFONT ( 71 , 12 ) ; Border = TRUE ; }; Edit ED_MOBILE { + HelpID = "sw:Edit:TP_PRIVATE_DATA:ED_MOBILE"; Pos = MAP_APPFONT ( 179 , 110 ) ; Size = MAP_APPFONT ( 69 , 12 ) ; Border = TRUE ; @@ -463,6 +490,7 @@ TabPage TP_PRIVATE_DATA }; Edit ED_FAX { + HelpID = "sw:Edit:TP_PRIVATE_DATA:ED_FAX"; Pos = MAP_APPFONT ( 105 , 126 ) ; Size = MAP_APPFONT ( 143 , 12 ) ; Border = TRUE ; @@ -475,12 +503,14 @@ TabPage TP_PRIVATE_DATA }; Edit ED_WWW { + HelpID = "sw:Edit:TP_PRIVATE_DATA:ED_WWW"; Pos = MAP_APPFONT ( 105 , 142) ; Size = MAP_APPFONT ( 71 , 12 ) ; Border = TRUE ; }; Edit ED_MAIL { + HelpID = "sw:Edit:TP_PRIVATE_DATA:ED_MAIL"; Pos = MAP_APPFONT ( 179 , 142) ; Size = MAP_APPFONT ( 69 , 12 ) ; Border = TRUE ; @@ -505,6 +535,7 @@ TabPage TP_BUSINESS_DATA }; Edit ED_COMP { + HelpID = "sw:Edit:TP_BUSINESS_DATA:ED_COMP"; Pos = MAP_APPFONT ( 105 , 14) ; Size = MAP_APPFONT ( 143 , 12 ) ; Border = TRUE ; @@ -517,6 +548,7 @@ TabPage TP_BUSINESS_DATA }; Edit ED_COMP_EXT { + HelpID = "sw:Edit:TP_BUSINESS_DATA:ED_COMP_EXT"; Pos = MAP_APPFONT ( 105 , 30) ; Size = MAP_APPFONT ( 143 , 12 ) ; Border = TRUE ; @@ -529,6 +561,7 @@ TabPage TP_BUSINESS_DATA }; Edit ED_SLOGAN { + HelpID = "sw:Edit:TP_BUSINESS_DATA:ED_SLOGAN"; Pos = MAP_APPFONT ( 105 , 46) ; Size = MAP_APPFONT ( 143 , 12 ) ; Border = TRUE ; @@ -541,6 +574,7 @@ TabPage TP_BUSINESS_DATA }; Edit ED_STREET { + HelpID = "sw:Edit:TP_BUSINESS_DATA:ED_STREET"; Pos = MAP_APPFONT ( 105 , 62) ; Size = MAP_APPFONT ( 143 , 12 ) ; Border = TRUE ; @@ -553,12 +587,14 @@ TabPage TP_BUSINESS_DATA }; Edit ED_ZIP { + HelpID = "sw:Edit:TP_BUSINESS_DATA:ED_ZIP"; Pos = MAP_APPFONT ( 105 , 78) ; Size = MAP_APPFONT ( 50 , 12 ) ; Border = TRUE ; }; Edit ED_CITY { + HelpID = "sw:Edit:TP_BUSINESS_DATA:ED_CITY"; Pos = MAP_APPFONT ( 158 , 78) ; Size = MAP_APPFONT ( 90 , 12 ) ; Border = TRUE ; @@ -571,12 +607,14 @@ TabPage TP_BUSINESS_DATA }; Edit ED_COUNTRY { + HelpID = "sw:Edit:TP_BUSINESS_DATA:ED_COUNTRY"; Pos = MAP_APPFONT ( 105 , 94) ; Size = MAP_APPFONT ( 71 , 12 ) ; Border = TRUE ; }; Edit ED_STATE { + HelpID = "sw:Edit:TP_BUSINESS_DATA:ED_STATE"; Pos = MAP_APPFONT ( 179 , 94) ; Size = MAP_APPFONT ( 69 , 12 ) ; Border = TRUE ; @@ -589,6 +627,7 @@ TabPage TP_BUSINESS_DATA }; Edit ED_POSITION { + HelpID = "sw:Edit:TP_BUSINESS_DATA:ED_POSITION"; Pos = MAP_APPFONT ( 105 , 110) ; Size = MAP_APPFONT ( 143 , 12 ) ; Border = TRUE ; @@ -601,12 +640,14 @@ TabPage TP_BUSINESS_DATA }; Edit ED_PHONE { + HelpID = "sw:Edit:TP_BUSINESS_DATA:ED_PHONE"; Pos = MAP_APPFONT ( 105 , 126) ; Size = MAP_APPFONT ( 71 , 12 ) ; Border = TRUE ; }; Edit ED_MOBILE { + HelpID = "sw:Edit:TP_BUSINESS_DATA:ED_MOBILE"; Pos = MAP_APPFONT ( 179 , 126) ; Size = MAP_APPFONT ( 69 , 12 ) ; Border = TRUE ; @@ -619,6 +660,7 @@ TabPage TP_BUSINESS_DATA }; Edit ED_FAX { + HelpID = "sw:Edit:TP_BUSINESS_DATA:ED_FAX"; Pos = MAP_APPFONT ( 105 , 142) ; Size = MAP_APPFONT ( 143 , 12 ) ; Border = TRUE ; @@ -631,12 +673,14 @@ TabPage TP_BUSINESS_DATA }; Edit ED_WWW { + HelpID = "sw:Edit:TP_BUSINESS_DATA:ED_WWW"; Pos = MAP_APPFONT ( 105 , 158) ; Size = MAP_APPFONT ( 71 , 12 ) ; Border = TRUE ; }; Edit ED_MAIL { + HelpID = "sw:Edit:TP_BUSINESS_DATA:ED_MAIL"; Pos = MAP_APPFONT ( 179 , 158) ; Size = MAP_APPFONT ( 69 , 12 ) ; Border = TRUE ; diff --git a/sw/source/ui/envelp/label1.cxx b/sw/source/ui/envelp/label1.cxx index c035303299..ad5ea2ac44 100644 --- a/sw/source/ui/envelp/label1.cxx +++ b/sw/source/ui/envelp/label1.cxx @@ -246,7 +246,8 @@ SwLabPage::SwLabPage(Window* pParent, const SfxItemSet& rSet) : SfxTabPage(pParent, SW_RES(TP_LAB_LAB), rSet), pNewDBMgr(NULL), aItem ((const SwLabItem&) rSet.Get(FN_LABEL)), - + + aWritingFL (this, SW_RES(FL_WRITING)), aWritingText (this, SW_RES(TXT_WRITING)), aAddrBox (this, SW_RES(BOX_ADDR )), aWritingEdit (this, SW_RES(EDT_WRITING)), @@ -257,7 +258,7 @@ SwLabPage::SwLabPage(Window* pParent, const SfxItemSet& rSet) : aInsertBT (this, SW_RES(BTN_INSERT )), aDBFieldFT (this, SW_RES(FT_DBFIELD )), aDBFieldLB (this, SW_RES(LB_DBFIELD )), - aWritingFL (this, SW_RES(FL_WRITING)), + aFormatFL (this, SW_RES(FL_FORMAT )), aContButton (this, SW_RES(BTN_CONT )), aSheetButton (this, SW_RES(BTN_SHEET )), aMakeText (this, SW_RES(TXT_MAKE )), @@ -265,9 +266,8 @@ SwLabPage::SwLabPage(Window* pParent, const SfxItemSet& rSet) : aTypeText (this, SW_RES(TXT_TYPE )), aTypeBox (this, SW_RES(BOX_TYPE )), aHiddenSortTypeBox(this, WB_SORT|WB_HIDE), - aFormatInfo (this, SW_RES(INF_FORMAT )), - aFormatFL (this, SW_RES(FL_FORMAT )) -{ + aFormatInfo (this, SW_RES(INF_FORMAT )) + { WaitObject aWait( pParent ); FreeResource(); @@ -427,17 +427,17 @@ IMPL_LINK( SwLabPage, MakeHdl, ListBox *, EMPTYARG ) for ( sal_uInt16 i = 0; i < nCount; ++i ) { const String aType ( GetParent()->Recs()[i]->aType ); - BOOL bInsert = FALSE; + sal_Bool bInsert = sal_False; if ( GetParent()->Recs()[i]->aType == sCustom ) { - bInsert = TRUE; + bInsert = sal_True; aTypeBox.InsertEntry(aType ); } else if ( GetParent()->Recs()[i]->bCont == bCont ) { if ( aHiddenSortTypeBox.GetEntryPos(aType) == LISTBOX_ENTRY_NOTFOUND ) { - bInsert = TRUE; + bInsert = sal_True; aHiddenSortTypeBox.InsertEntry( aType ); } } @@ -471,7 +471,7 @@ IMPL_LINK_INLINE_END( SwLabPage, TypeHdl, ListBox *, EMPTYARG ) void SwLabPage::DisplayFormat() { MetricField aField(this, WinBits(0)); - FieldUnit aMetric = ::GetDfltMetric(FALSE); + FieldUnit aMetric = ::GetDfltMetric(sal_False); SetMetric(aField, aMetric); aField.SetDecimalDigits(2); aField.SetMin (0); @@ -636,16 +636,16 @@ void SwVisitingCardPage::SetUserData( sal_uInt32 nCnt, SwVisitingCardPage::SwVisitingCardPage(Window* pParent, const SfxItemSet& rSet) : SfxTabPage(pParent, SW_RES(TP_VISITING_CARDS), rSet), + aContentFL(this, SW_RES( FL_CONTENT )), aAutoTextLB(this, SW_RES( LB_AUTO_TEXT )), aAutoTextGroupFT(this, SW_RES( FT_AUTO_TEXT_GROUP )), aAutoTextGroupLB(this, SW_RES( LB_AUTO_TEXT_GROUP )), - aContentFL(this, SW_RES( FL_CONTENT )), aExampleWIN(this, SW_RES( WIN_EXAMPLE )), sVisCardGroup(SW_RES(ST_VISCARD_GROUP)), pExampleFrame(0) { FreeResource(); - aAutoTextLB.SetWindowBits( WB_HSCROLL ); + aAutoTextLB.SetStyle( aAutoTextLB.GetStyle() | WB_HSCROLL ); aAutoTextLB.SetSpaceBetweenEntries(0); aAutoTextLB.SetSelectionMode( SINGLE_SELECTION ); aAutoTextLB.SetHelpId(HID_BUSINESS_CARD_CONTENT); diff --git a/sw/source/ui/envelp/labelcfg.cxx b/sw/source/ui/envelp/labelcfg.cxx index f3afb6a397..0727275944 100644 --- a/sw/source/ui/envelp/labelcfg.cxx +++ b/sw/source/ui/envelp/labelcfg.cxx @@ -91,8 +91,8 @@ SwLabRec* lcl_CreateSwLabRec(Sequence<Any>& rValues, const OUString& rManufactur //except for the continuous flag ('C'/'S') pValues[nProp] >>= sTmp; String sMeasure(sTmp); - USHORT nTokenCount = sMeasure.GetTokenCount(';'); - for(USHORT i = 0; i < nTokenCount; i++) + sal_uInt16 nTokenCount = sMeasure.GetTokenCount(';'); + for(sal_uInt16 i = 0; i < nTokenCount; i++) { String sToken(sMeasure.GetToken(i, ';' )); int nVal = sToken.ToInt32(); diff --git a/sw/source/ui/envelp/labelexp.cxx b/sw/source/ui/envelp/labelexp.cxx index 6667c3f36d..43e510c26b 100644 --- a/sw/source/ui/envelp/labelexp.cxx +++ b/sw/source/ui/envelp/labelexp.cxx @@ -179,7 +179,7 @@ IMPL_LINK( SwVisitingCardPage, AutoTextSelectHdl, void*, pBox ) aBlockNames.getConstArray() ); } if(pExampleFrame->IsInitialized()) - pExampleFrame->ClearDocument( TRUE ); + pExampleFrame->ClearDocument( sal_True ); } return 0; } diff --git a/sw/source/ui/envelp/labfmt.cxx b/sw/source/ui/envelp/labfmt.cxx index fb3ae4dae6..a670927baf 100644 --- a/sw/source/ui/envelp/labfmt.cxx +++ b/sw/source/ui/envelp/labfmt.cxx @@ -54,7 +54,7 @@ using namespace ::com::sun::star::beans; using ::rtl::OUString; -#define ROUND(x) ((USHORT) ((x) + .5)) +#define ROUND(x) ((sal_uInt16) ((x) + .5)) SwLabPreview::SwLabPreview( const SwLabFmtPage* pParent, const ResId& rResID ) : @@ -78,7 +78,7 @@ SwLabPreview::SwLabPreview( const SwLabFmtPage* pParent, const ResId& rResID ) : SetBackground(Wallpaper(rWinColor)); Font aFont = GetFont(); - aFont.SetTransparent(TRUE); + aFont.SetTransparent(sal_True); aFont.SetWeight (WEIGHT_NORMAL); SetFont(aFont); @@ -125,7 +125,7 @@ void SwLabPreview::Paint(const Rectangle &) SetLineColor(rWinColor); SetFillColor(aGrayColor); Font aPaintFont(GetFont()); - aPaintFont.SetTransparent(FALSE); + aPaintFont.SetTransparent(sal_False); SetFont(aPaintFont); // size of region to be displayed @@ -173,8 +173,8 @@ void SwLabPreview::Paint(const Rectangle &) // Labels SetClipRegion (Rectangle(Point(lX0, lY0), Size(lOutlineW, lOutlineH))); SetFillColor(rWinColor); - for (USHORT nRow = 0; nRow < Min((USHORT) 2, (USHORT) aItem.nRows); nRow++) - for (USHORT nCol = 0; nCol < Min((USHORT) 2, (USHORT) aItem.nCols); nCol++) + for (sal_uInt16 nRow = 0; nRow < Min((sal_uInt16) 2, (sal_uInt16) aItem.nRows); nRow++) + for (sal_uInt16 nCol = 0; nCol < Min((sal_uInt16) 2, (sal_uInt16) aItem.nCols); nCol++) DrawRect(Rectangle( Point(ROUND(lX0 + f * (aItem.lLeft + nCol * aItem.lHDist)), ROUND(lY0 + f * (aItem.lUpper + nRow * aItem.lVDist))), @@ -186,15 +186,15 @@ void SwLabPreview::Paint(const Rectangle &) if (aItem.lLeft) { long lX = (lX0 + lX1) / 2; - DrawArrow(Point(lX0, lY0 - 5), Point(lX1, lY0 - 5), FALSE); - DrawArrow(Point(lX, lY0 - 10), Point(lX, lY0 - 5), TRUE); + DrawArrow(Point(lX0, lY0 - 5), Point(lX1, lY0 - 5), sal_False); + DrawArrow(Point(lX, lY0 - 10), Point(lX, lY0 - 5), sal_True); DrawText(Point(lX1 - lLeftWidth, lY0 - 10 - lXHeight), aLeftStr); } // annotation: upper border if (aItem.lUpper) { - DrawArrow(Point(lX0 - 5, lY0), Point(lX0 - 5, lY1), FALSE); + DrawArrow(Point(lX0 - 5, lY0), Point(lX0 - 5, lY1), sal_False); DrawText(Point(lX0 - 10 - lUpperWidth, ROUND(lY0 + f * aItem.lUpper / 2 - lXHeight / 2)), aUpperStr); } @@ -214,36 +214,36 @@ void SwLabPreview::Paint(const Rectangle &) if (aItem.nCols > 1) { long lX = (lX1 + lX3) / 2; - DrawArrow(Point(lX1, lY0 - 5), Point(lX3, lY0 - 5), FALSE); - DrawArrow(Point(lX, lY0 - 10), Point(lX, lY0 - 5), TRUE); + DrawArrow(Point(lX1, lY0 - 5), Point(lX3, lY0 - 5), sal_False); + DrawArrow(Point(lX, lY0 - 10), Point(lX, lY0 - 5), sal_True); DrawText(Point(lX - lHDistWidth / 2, lY0 - 10 - lXHeight), aHDistStr); } // annotation: vertical gap if (aItem.nRows > 1) { - DrawArrow(Point(lX0 - 5, lY1), Point(lX0 - 5, lY3), FALSE); + DrawArrow(Point(lX0 - 5, lY1), Point(lX0 - 5, lY3), sal_False); DrawText(Point(lX0 - 10 - lVDistWidth, ROUND(lY1 + f * aItem.lVDist / 2 - lXHeight / 2)), aVDistStr); } // annotation: columns { long lY = lY0 + lOutlineH + 4; - DrawArrow(Point(lX0, lY), Point(lX0 + lOutlineW - 1, lY), TRUE); + DrawArrow(Point(lX0, lY), Point(lX0 + lOutlineW - 1, lY), sal_True); DrawText(Point((lX0 + lX0 + lOutlineW - 1) / 2 - lColsWidth / 2, lY + 5), aColsStr); } // annotation: lines { long lX = lX0 + lOutlineW + 4; - DrawArrow(Point(lX, lY0), Point(lX, lY0 + lOutlineH - 1), TRUE); + DrawArrow(Point(lX, lY0), Point(lX, lY0 + lOutlineH - 1), sal_True); DrawText(Point(lX + 5, (lY0 + lY0 + lOutlineH - 1 - lXHeight / 2) / 2), aRowsStr); } } // Arror or interval character -------------------------------------------- -void SwLabPreview::DrawArrow(const Point &rP1, const Point &rP2, BOOL bArrow) +void SwLabPreview::DrawArrow(const Point &rP1, const Point &rP2, sal_Bool bArrow) { DrawLine(rP1, rP2); @@ -324,14 +324,14 @@ SwLabFmtPage::SwLabFmtPage(Window* pParent, const SfxItemSet& rSet) : aRowsText (this, SW_RES(TXT_ROWS )), aRowsField (this, SW_RES(FLD_ROWS )), aSavePB (this, SW_RES(PB_SAVE )), - bModified(FALSE), + bModified(sal_False), aItem ((const SwLabItem&) rSet.Get(FN_LABEL)) { FreeResource(); SetExchangeSupport(); // Metrics - FieldUnit aMetric = ::GetDfltMetric(FALSE); + FieldUnit aMetric = ::GetDfltMetric(sal_False); SetMetric(aHDistField , aMetric); SetMetric(aVDistField , aMetric); SetMetric(aWidthField , aMetric); @@ -373,7 +373,7 @@ SwLabFmtPage::~SwLabFmtPage() // Modify-handler of MetricFields. start preview timer IMPL_LINK_INLINE_START( SwLabFmtPage, ModifyHdl, Edit *, EMPTYARG ) { - bModified = TRUE; + bModified = sal_True; aPreviewTimer.Start(); return 0; } @@ -477,7 +477,7 @@ int SwLabFmtPage::DeactivatePage(SfxItemSet* _pSet) if (_pSet) FillItemSet(*_pSet); - return TRUE; + return sal_True; } void SwLabFmtPage::FillItem(SwLabItem& rItem) @@ -493,17 +493,17 @@ void SwLabFmtPage::FillItem(SwLabItem& rItem) rItem.lHeight = rRec.lHeight = static_cast< long >(GETFLDVAL(aHeightField)); rItem.lLeft = rRec.lLeft = static_cast< long >(GETFLDVAL(aLeftField )); rItem.lUpper = rRec.lUpper = static_cast< long >(GETFLDVAL(aUpperField )); - rItem.nCols = rRec.nCols = (USHORT) aColsField.GetValue(); - rItem.nRows = rRec.nRows = (USHORT) aRowsField.GetValue(); + rItem.nCols = rRec.nCols = (sal_uInt16) aColsField.GetValue(); + rItem.nRows = rRec.nRows = (sal_uInt16) aRowsField.GetValue(); } } -BOOL SwLabFmtPage::FillItemSet(SfxItemSet& rSet) +sal_Bool SwLabFmtPage::FillItemSet(SfxItemSet& rSet) { FillItem(aItem); rSet.Put(aItem); - return TRUE; + return sal_True; } void SwLabFmtPage::Reset(const SfxItemSet& ) @@ -544,18 +544,18 @@ IMPL_LINK( SwLabFmtPage, SaveHdl, PushButton *, EMPTYARG ) aRec.lHeight = static_cast< long >(GETFLDVAL(aHeightField)); aRec.lLeft = static_cast< long >(GETFLDVAL(aLeftField )); aRec.lUpper = static_cast< long >(GETFLDVAL(aUpperField )); - aRec.nCols = (USHORT) aColsField.GetValue(); - aRec.nRows = (USHORT) aRowsField.GetValue(); + aRec.nCols = (sal_uInt16) aColsField.GetValue(); + aRec.nRows = (sal_uInt16) aRowsField.GetValue(); aRec.bCont = aItem.bCont; SwSaveLabelDlg* pSaveDlg = new SwSaveLabelDlg(this, aRec); pSaveDlg->SetLabel(aItem.aLstMake, aItem.aLstType); pSaveDlg->Execute(); if(pSaveDlg->GetLabel(aItem)) { - bModified = FALSE; + bModified = sal_False; const Sequence<OUString>& rMan = GetParent()->GetLabelsConfig().GetManufacturers(); SvStringsDtor& rMakes = GetParent()->Makes(); - if(rMakes.Count() < (USHORT)rMan.getLength()) + if(rMakes.Count() < (sal_uInt16)rMan.getLength()) { rMakes.DeleteAndDestroy(0, rMakes.Count()); const OUString* pMan = rMan.getConstArray(); diff --git a/sw/source/ui/envelp/labfmt.hxx b/sw/source/ui/envelp/labfmt.hxx index 803e258415..f986acf4ba 100644 --- a/sw/source/ui/envelp/labfmt.hxx +++ b/sw/source/ui/envelp/labfmt.hxx @@ -67,7 +67,7 @@ class SwLabPreview : public Window void Paint(const Rectangle&); - void DrawArrow(const Point& rP1, const Point& rP2, BOOL bArrow); + void DrawArrow(const Point& rP1, const Point& rP2, sal_Bool bArrow); using Window::GetParent; SwLabFmtPage* GetParent() {return (SwLabFmtPage*) Window::GetParent();} @@ -108,7 +108,7 @@ class SwLabFmtPage : public SfxTabPage PushButton aSavePB; Timer aPreviewTimer; - BOOL bModified; + sal_Bool bModified; SwLabItem aItem; @@ -133,7 +133,7 @@ public: virtual void ActivatePage(const SfxItemSet& rSet); virtual int DeactivatePage(SfxItemSet* pSet = 0); void FillItem(SwLabItem& rItem); - virtual BOOL FillItemSet(SfxItemSet& rSet); + virtual sal_Bool FillItemSet(SfxItemSet& rSet); virtual void Reset(const SfxItemSet& rSet); SwLabDlg* GetParent() {return (SwLabDlg*) SfxTabPage::GetParent()->GetParent();} diff --git a/sw/source/ui/envelp/labfmt.src b/sw/source/ui/envelp/labfmt.src index 49b5e55154..903a88823c 100644 --- a/sw/source/ui/envelp/labfmt.src +++ b/sw/source/ui/envelp/labfmt.src @@ -60,6 +60,7 @@ TabPage TP_LAB_FMT }; MetricField FLD_HDIST { + HelpID = "sw:MetricField:TP_LAB_FMT:FLD_HDIST"; Border = TRUE ; Pos = MAP_APPFONT ( 60 , 17 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -80,6 +81,7 @@ TabPage TP_LAB_FMT }; MetricField FLD_VDIST { + HelpID = "sw:MetricField:TP_LAB_FMT:FLD_VDIST"; Border = TRUE ; Pos = MAP_APPFONT ( 60 , 33 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -100,6 +102,7 @@ TabPage TP_LAB_FMT }; MetricField FLD_WIDTH { + HelpID = "sw:MetricField:TP_LAB_FMT:FLD_WIDTH"; Border = TRUE ; Pos = MAP_APPFONT ( 60 , 49 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -120,6 +123,7 @@ TabPage TP_LAB_FMT }; MetricField FLD_HEIGHT { + HelpID = "sw:MetricField:TP_LAB_FMT:FLD_HEIGHT"; Border = TRUE ; Pos = MAP_APPFONT ( 60 , 65 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -140,6 +144,7 @@ TabPage TP_LAB_FMT }; MetricField FLD_LEFT { + HelpID = "sw:MetricField:TP_LAB_FMT:FLD_LEFT"; Border = TRUE ; Pos = MAP_APPFONT ( 60 , 81 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -162,6 +167,7 @@ TabPage TP_LAB_FMT }; MetricField FLD_UPPER { + HelpID = "sw:MetricField:TP_LAB_FMT:FLD_UPPER"; Border = TRUE ; Pos = MAP_APPFONT ( 60 , 97 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -184,6 +190,7 @@ TabPage TP_LAB_FMT }; NumericField FLD_COLUMNS { + HelpID = "sw:NumericField:TP_LAB_FMT:FLD_COLUMNS"; Border = TRUE ; Pos = MAP_APPFONT ( 60 , 113 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -203,6 +210,7 @@ TabPage TP_LAB_FMT }; NumericField FLD_ROWS { + HelpID = "sw:NumericField:TP_LAB_FMT:FLD_ROWS"; Border = TRUE ; Pos = MAP_APPFONT ( 60 , 129 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -215,6 +223,7 @@ TabPage TP_LAB_FMT }; PushButton PB_SAVE { + HelpID = "sw:PushButton:TP_LAB_FMT:PB_SAVE"; Pos = MAP_APPFONT ( 50 , 148 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "~Save..."; @@ -269,6 +278,7 @@ ModalDialog DLG_SAVE_LABEL }; ComboBox CB_MAKE { + HelpID = "sw:ComboBox:DLG_SAVE_LABEL:CB_MAKE"; Pos = MAP_APPFONT ( 65 , 15 ) ; Size = MAP_APPFONT ( 100 , 50 ) ; Border = TRUE; @@ -283,6 +293,7 @@ ModalDialog DLG_SAVE_LABEL }; Edit ED_TYPE { + HelpID = "sw:Edit:DLG_SAVE_LABEL:ED_TYPE"; Pos = MAP_APPFONT ( 65 , 30 ) ; Size = MAP_APPFONT ( 100 , 12 ) ; Border = TRUE; diff --git a/sw/source/ui/envelp/labimg.cxx b/sw/source/ui/envelp/labimg.cxx index e74023a44a..dc5af4924f 100644 --- a/sw/source/ui/envelp/labimg.cxx +++ b/sw/source/ui/envelp/labimg.cxx @@ -57,8 +57,8 @@ SwLabItem::SwLabItem() : nCol (1), nRow (1) { - bAddr = bCont = bSynchron = FALSE; - bPage = TRUE; + bAddr = bCont = bSynchron = sal_False; + bPage = sal_True; lHDist = lVDist = lWidth = @@ -387,7 +387,7 @@ SwLabCfgItem::SwLabCfgItem(sal_Bool bLabel) : aItem.aCompFax = aItem.aPrivFax = rUserOpt.GetFax(); aItem.aCompMail = aItem.aPrivMail = rUserOpt.GetEmail(); aItem.aCompState = aItem.aPrivState = rUserOpt.GetState(); - aItem.bSynchron = TRUE; + aItem.bSynchron = sal_True; SetModified(); } } diff --git a/sw/source/ui/envelp/labprt.cxx b/sw/source/ui/envelp/labprt.cxx index 55b07253cb..a3797761cd 100644 --- a/sw/source/ui/envelp/labprt.cxx +++ b/sw/source/ui/envelp/labprt.cxx @@ -51,6 +51,7 @@ SwLabPrtPage::SwLabPrtPage(Window* pParent, const SfxItemSet& rSet) : SfxTabPage(pParent, SW_RES(TP_LAB_PRT), rSet), pPrinter( 0 ), + aFLDontKnow (this, SW_RES(FL_DONTKNOW)), aPageButton (this, SW_RES(BTN_PAGE )), aSingleButton (this, SW_RES(BTN_SINGLE )), aColText (this, SW_RES(TXT_COL )), @@ -58,10 +59,9 @@ SwLabPrtPage::SwLabPrtPage(Window* pParent, const SfxItemSet& rSet) : aRowText (this, SW_RES(TXT_ROW )), aRowField (this, SW_RES(FLD_ROW )), aSynchronCB (this, SW_RES(CB_SYNCHRON)), - aFLDontKnow (this, SW_RES(FL_DONTKNOW)), + aFLPrinter (this, SW_RES(FL_PRINTER )), aPrinterInfo (this, SW_RES(INF_PRINTER)), - aPrtSetup (this, SW_RES(BTN_PRTSETUP)), - aFLPrinter (this, SW_RES(FL_PRINTER )) + aPrtSetup (this, SW_RES(BTN_PRTSETUP)) { FreeResource(); @@ -107,7 +107,7 @@ IMPL_LINK( SwLabPrtPage, CountHdl, Button *, pButton ) aPrinterInfo.SetText(pPrinter->GetName()); return 0; } - const BOOL bEnable = pButton == &aSingleButton; + const sal_Bool bEnable = pButton == &aSingleButton; aColText .Enable(bEnable); aColField.Enable(bEnable); aRowText .Enable(bEnable); @@ -138,25 +138,25 @@ int SwLabPrtPage::DeactivatePage(SfxItemSet* _pSet) if ( _pSet ) FillItemSet(*_pSet); - return TRUE; + return sal_True; } void SwLabPrtPage::FillItem(SwLabItem& rItem) { rItem.bPage = aPageButton.IsChecked(); - rItem.nCol = (USHORT) aColField.GetValue(); - rItem.nRow = (USHORT) aRowField.GetValue(); + rItem.nCol = (sal_uInt16) aColField.GetValue(); + rItem.nRow = (sal_uInt16) aRowField.GetValue(); rItem.bSynchron = aSynchronCB.IsChecked() && aSynchronCB.IsEnabled(); } -BOOL SwLabPrtPage::FillItemSet(SfxItemSet& rSet) +sal_Bool SwLabPrtPage::FillItemSet(SfxItemSet& rSet) { SwLabItem aItem; GetParent()->GetLabItem(aItem); FillItem(aItem); rSet.Put(aItem); - return TRUE; + return sal_True; } void SwLabPrtPage::Reset(const SfxItemSet& ) diff --git a/sw/source/ui/envelp/labprt.hxx b/sw/source/ui/envelp/labprt.hxx index 7e8b2466e3..4ccc5911cb 100644 --- a/sw/source/ui/envelp/labprt.hxx +++ b/sw/source/ui/envelp/labprt.hxx @@ -44,6 +44,7 @@ class SwLabPrtPage : public SfxTabPage { Printer* pPrinter; // for the shaft setting - unfortunately + FixedLine aFLDontKnow; RadioButton aPageButton; RadioButton aSingleButton; FixedText aColText; @@ -51,11 +52,10 @@ class SwLabPrtPage : public SfxTabPage FixedText aRowText; NumericField aRowField; CheckBox aSynchronCB; - FixedLine aFLDontKnow; + FixedLine aFLPrinter; FixedInfo aPrinterInfo; PushButton aPrtSetup; - FixedLine aFLPrinter; SwLabPrtPage(Window* pParent, const SfxItemSet& rSet); ~SwLabPrtPage(); @@ -75,7 +75,7 @@ public: virtual void ActivatePage(const SfxItemSet& rSet); virtual int DeactivatePage(SfxItemSet* pSet = 0); void FillItem(SwLabItem& rItem); - virtual BOOL FillItemSet(SfxItemSet& rSet); + virtual sal_Bool FillItemSet(SfxItemSet& rSet); virtual void Reset(const SfxItemSet& rSet); inline Printer* GetPrt() { return (pPrinter); } }; diff --git a/sw/source/ui/envelp/labprt.src b/sw/source/ui/envelp/labprt.src index 7d663f9ccb..c160feae1d 100644 --- a/sw/source/ui/envelp/labprt.src +++ b/sw/source/ui/envelp/labprt.src @@ -36,6 +36,7 @@ TabPage TP_LAB_PRT Hide = TRUE ; RadioButton BTN_PAGE { + HelpID = "sw:RadioButton:TP_LAB_PRT:BTN_PAGE"; Pos = MAP_APPFONT ( 12 , 14 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; TabStop = TRUE ; @@ -44,6 +45,7 @@ TabPage TP_LAB_PRT }; RadioButton BTN_SINGLE { + HelpID = "sw:RadioButton:TP_LAB_PRT:BTN_SINGLE"; Pos = MAP_APPFONT ( 12 , 28 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; Text [ en-US ] = "~Single label" ; @@ -57,6 +59,7 @@ TabPage TP_LAB_PRT }; NumericField FLD_COL { + HelpID = "sw:NumericField:TP_LAB_PRT:FLD_COL"; Border = TRUE ; Pos = MAP_APPFONT ( 160 , 27 ) ; Size = MAP_APPFONT ( 24 , 12 ) ; @@ -76,6 +79,7 @@ TabPage TP_LAB_PRT }; NumericField FLD_ROW { + HelpID = "sw:NumericField:TP_LAB_PRT:FLD_ROW"; Border = TRUE ; Pos = MAP_APPFONT ( 224 , 27 ) ; Size = MAP_APPFONT ( 24 , 12 ) ; @@ -88,6 +92,7 @@ TabPage TP_LAB_PRT }; CheckBox CB_SYNCHRON { + HelpID = "sw:CheckBox:TP_LAB_PRT:CB_SYNCHRON"; Pos = MAP_APPFONT ( 12 , 43 ) ; Size = MAP_APPFONT ( 120 , 10 ) ; TabStop = TRUE ; @@ -108,6 +113,7 @@ TabPage TP_LAB_PRT }; PushButton BTN_PRTSETUP { + HelpID = "sw:PushButton:TP_LAB_PRT:BTN_PRTSETUP"; Pos = MAP_APPFONT ( 198 , 70 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; TabStop = TRUE ; diff --git a/sw/source/ui/envelp/mailmrge.cxx b/sw/source/ui/envelp/mailmrge.cxx index 289a1b5874..ab880af40b 100644 --- a/sw/source/ui/envelp/mailmrge.cxx +++ b/sw/source/ui/envelp/mailmrge.cxx @@ -215,16 +215,16 @@ SwMailMergeDlg::SwMailMergeDlg(Window* pParent, SwWrtShell& rShell, FreeResource(); aSingleJobsCB.Show(sal_False); // not supported in since cws printerpullpages anymore //task #97066# mailing of form letters is currently not supported - aMailingRB.Show(FALSE); - aSubjectFT.Show(FALSE); - aSubjectED.Show(FALSE); - aFormatFT.Show(FALSE); - aFormatSwCB.Show(FALSE); - aFormatHtmlCB.Show(FALSE); - aFormatRtfCB.Show(FALSE); - aAttachFT.Show(FALSE); - aAttachED.Show(FALSE); - aAttachPB.Show(FALSE); + aMailingRB.Show(sal_False); + aSubjectFT.Show(sal_False); + aSubjectED.Show(sal_False); + aFormatFT.Show(sal_False); + aFormatSwCB.Show(sal_False); + aFormatHtmlCB.Show(sal_False); + aFormatRtfCB.Show(sal_False); + aAttachFT.Show(sal_False); + aAttachED.Show(sal_False); + aAttachPB.Show(sal_False); Point aMailPos = aMailingRB.GetPosPixel(); Point aFilePos = aFileRB.GetPosPixel(); @@ -236,7 +236,7 @@ SwMailMergeDlg::SwMailMergeDlg(Window* pParent, SwWrtShell& rShell, m_aSelection = *pSelection; //move all controls long nDiff = aRecordFL.GetPosPixel().Y() - pBeamerWin->GetPosPixel().Y(); - pBeamerWin->Show(FALSE); + pBeamerWin->Show(sal_False); ::Size aSize = GetSizePixel(); aSize.Height() -= nDiff; SetSizePixel(aSize); @@ -339,7 +339,7 @@ SwMailMergeDlg::SwMailMergeDlg(Window* pParent, SwWrtShell& rShell, aFormatHtmlCB.Check((nMailingMode & TXTFORMAT_HTML) != 0); aFormatRtfCB.Check((nMailingMode & TXTFORMAT_RTF) != 0); - aAllRB.Check(TRUE); + aAllRB.Check(sal_True); // Install handlers Link aLk = LINK(this, SwMailMergeDlg, ButtonHdl); @@ -360,7 +360,7 @@ SwMailMergeDlg::SwMailMergeDlg(Window* pParent, SwWrtShell& rShell, aLk = LINK(this, SwMailMergeDlg, FilenameHdl); aGenerateFromDataBaseCB.SetClickHdl( aLk ); - BOOL bColumn = pModOpt->IsNameFromColumn(); + sal_Bool bColumn = pModOpt->IsNameFromColumn(); if(bColumn) aGenerateFromDataBaseCB.Check(); @@ -382,7 +382,7 @@ SwMailMergeDlg::SwMailMergeDlg(Window* pParent, SwWrtShell& rShell, pNewDBMgr->GetColumnNames(&aAddressFldLB, _xConnection, rTableName); else pNewDBMgr->GetColumnNames(&aAddressFldLB, rDBName, rTableName); - for(USHORT nEntry = 0; nEntry < aAddressFldLB.GetEntryCount(); nEntry++) + for(sal_uInt16 nEntry = 0; nEntry < aAddressFldLB.GetEntryCount(); nEntry++) aColumnLB.InsertEntry(aAddressFldLB.GetEntry(nEntry)); aAddressFldLB.SelectEntry(C2S("EMAIL")); @@ -411,14 +411,14 @@ SwMailMergeDlg::SwMailMergeDlg(Window* pParent, SwWrtShell& rShell, if (aColumnLB.GetSelectEntryCount() == 0) aColumnLB.SelectEntryPos(0); - const BOOL bEnable = m_aSelection.getLength() != 0; + const sal_Bool bEnable = m_aSelection.getLength() != 0; aMarkedRB.Enable(bEnable); if (bEnable) aMarkedRB.Check(); else { aAllRB.Check(); - aMarkedRB.Enable(FALSE); + aMarkedRB.Enable(sal_False); } SetMinOutputSizePixel(m_aDialogSize); try @@ -435,7 +435,7 @@ SwMailMergeDlg::SwMailMergeDlg(Window* pParent, SwWrtShell& rShell, const ::rtl::OUString sName(RTL_CONSTASCII_USTRINGPARAM("Name")); const ::rtl::OUString sFlags(RTL_CONSTASCII_USTRINGPARAM("Flags")); const ::rtl::OUString sUIName(RTL_CONSTASCII_USTRINGPARAM("UIName")); - USHORT nODT = USHRT_MAX; + sal_uInt16 nODT = USHRT_MAX; while(xList->hasMoreElements()) { comphelper::SequenceAsHashMap aFilter(xList->nextElement()); @@ -456,7 +456,7 @@ SwMailMergeDlg::SwMailMergeDlg(Window* pParent, SwWrtShell& rShell, } if( sUIName2.getLength() ) { - USHORT nFilter = aFilterLB.InsertEntry( sUIName2 ); + sal_uInt16 nFilter = aFilterLB.InsertEntry( sUIName2 ); if( 0 == sFilter.compareToAscii("writer8") ) nODT = nFilter; aFilterLB.SetEntryData( nFilter, new ::rtl::OUString( sFilter ) ); @@ -479,7 +479,7 @@ SwMailMergeDlg::~SwMailMergeDlg() else delete pBeamerWin; - for( USHORT nFilter = 0; nFilter < aFilterLB.GetEntryCount(); ++nFilter ) + for( sal_uInt16 nFilter = 0; nFilter < aFilterLB.GetEntryCount(); ++nFilter ) { ::rtl::OUString* pData = reinterpret_cast< ::rtl::OUString* >( aFilterLB.GetEntryData(nFilter) ); delete pData; @@ -651,7 +651,7 @@ IMPL_LINK( SwMailMergeDlg, SaveTypeHdl, RadioButton*, pBtn ) IMPL_LINK( SwMailMergeDlg, FilenameHdl, CheckBox*, pBox ) { - BOOL bEnable = pBox->IsChecked(); + sal_Bool bEnable = pBox->IsChecked(); aColumnFT.Enable( bEnable ); aColumnLB.Enable(bEnable); aPathFT.Enable( bEnable ); @@ -687,7 +687,7 @@ bool SwMailMergeDlg::ExecQryShell() } else { - nMergeType = static_cast< USHORT >( aSaveSingleDocRB.IsChecked() ? + nMergeType = static_cast< sal_uInt16 >( aSaveSingleDocRB.IsChecked() ? DBMGR_MERGE_SINGLE_FILE : DBMGR_MERGE_MAILFILES ); SfxMedium* pMedium = rSh.GetView().GetDocShell()->GetMedium(); INetURLObject aAbs; @@ -738,7 +738,7 @@ bool SwMailMergeDlg::ExecQryShell() m_aSelection.realloc(nEnd - nStart + 1); Any* pSelection = m_aSelection.getArray(); - for (sal_Int32 i = nStart; i != nEnd; ++i, ++pSelection) + for (sal_Int32 i = nStart; i <= nEnd; ++i, ++pSelection) *pSelection <<= i; } else if (aAllRB.IsChecked() ) @@ -763,17 +763,14 @@ bool SwMailMergeDlg::ExecQryShell() } } } - SwPrintData aPrtData = *SW_MOD()->GetPrtOptions(FALSE); IDocumentDeviceAccess* pIDDA = rSh.getIDocumentDeviceAccess(); - SwPrintData* pShellPrintData = pIDDA->getPrintData(); - if(pShellPrintData) - aPrtData = *pShellPrintData; + SwPrintData aPrtData( pIDDA->getPrintData() ); aPrtData.SetPrintSingleJobs(aSingleJobsCB.IsChecked()); pIDDA->setPrintData(aPrtData); pModOpt->SetSinglePrintJob(aSingleJobsCB.IsChecked()); - BYTE nMailingMode = 0; + sal_uInt8 nMailingMode = 0; if (aFormatSwCB.IsChecked()) nMailingMode |= TXTFORMAT_OFFICE; diff --git a/sw/source/ui/envelp/mailmrge.src b/sw/source/ui/envelp/mailmrge.src index e80dd33d79..a97ac9a737 100644 --- a/sw/source/ui/envelp/mailmrge.src +++ b/sw/source/ui/envelp/mailmrge.src @@ -40,7 +40,7 @@ ModalDialog DLG_MAILMERGE _MAIL_MERGE_STRING_ Moveable = TRUE ; Sizeable = TRUE; - HelpID = FN_QRY_MERGE ; + HelpID = CMD_FN_QRY_MERGE ; Window WIN_BEAMER { Pos = MAP_APPFONT ( 6 , 3 ) ; @@ -48,6 +48,7 @@ ModalDialog DLG_MAILMERGE }; RadioButton RB_ALL { + HelpID = "sw:RadioButton:DLG_MAILMERGE:RB_ALL"; Pos = MAP_APPFONT ( 12 , 97 ) ; Size = MAP_APPFONT ( 100 , 10 ) ; Text [ en-US ] = "~All" ; @@ -55,6 +56,7 @@ ModalDialog DLG_MAILMERGE }; RadioButton RB_MARKED { + HelpID = "sw:RadioButton:DLG_MAILMERGE:RB_MARKED"; Pos = MAP_APPFONT ( 12 , 110 ) ; Size = MAP_APPFONT ( 100 , 10 ) ; Text [ en-US ] = "~Selected records" ; @@ -62,6 +64,7 @@ ModalDialog DLG_MAILMERGE }; RadioButton RB_FROM { + HelpID = "sw:RadioButton:DLG_MAILMERGE:RB_FROM"; Pos = MAP_APPFONT ( 12 , 123 ) ; Size = MAP_APPFONT ( 33 , 10 ) ; Text [ en-US ] = "~From:" ; @@ -69,6 +72,7 @@ ModalDialog DLG_MAILMERGE }; NumericField NF_FROM { + HelpID = "sw:NumericField:DLG_MAILMERGE:NF_FROM"; Border = TRUE ; Pos = MAP_APPFONT ( 48 , 122 ) ; Size = MAP_APPFONT ( 24 , 12 ) ; @@ -86,6 +90,7 @@ ModalDialog DLG_MAILMERGE }; NumericField NF_TO { + HelpID = "sw:NumericField:DLG_MAILMERGE:NF_TO"; Border = TRUE ; Pos = MAP_APPFONT ( 105 , 122 ) ; Size = MAP_APPFONT ( 24 , 12 ) ; @@ -102,6 +107,7 @@ ModalDialog DLG_MAILMERGE }; RadioButton RB_PRINTER { + HelpID = "sw:RadioButton:DLG_MAILMERGE:RB_PRINTER"; Pos = MAP_APPFONT ( 144 , 97 ) ; Size = MAP_APPFONT ( 53 , 10 ) ; Check = TRUE ; @@ -110,6 +116,7 @@ ModalDialog DLG_MAILMERGE }; RadioButton RB_MAILING { + HelpID = "sw:RadioButton:DLG_MAILMERGE:RB_MAILING"; Pos = MAP_APPFONT ( 200 , 97 ) ; Size = MAP_APPFONT ( 53 , 10 ) ; TabStop = TRUE ; @@ -117,6 +124,7 @@ ModalDialog DLG_MAILMERGE }; RadioButton RB_FILE { + HelpID = "sw:RadioButton:DLG_MAILMERGE:RB_FILE"; Pos = MAP_APPFONT ( 256 , 97 ) ; Size = MAP_APPFONT ( 56 , 10 ) ; TabStop = TRUE ; @@ -124,6 +132,7 @@ ModalDialog DLG_MAILMERGE }; CheckBox CB_SINGLE_JOBS { + HelpID = "sw:CheckBox:DLG_MAILMERGE:CB_SINGLE_JOBS"; Pos = MAP_APPFONT ( 150 , 112 ) ; Size = MAP_APPFONT ( 142 , 10 ) ; TabStop = TRUE ; @@ -137,6 +146,7 @@ ModalDialog DLG_MAILMERGE }; RadioButton RB_SAVE_SINGLE_DOC { + HelpID = "sw:RadioButton:DLG_MAILMERGE:RB_SAVE_SINGLE_DOC"; Pos = MAP_APPFONT ( 150, 139 ) ; Size = MAP_APPFONT ( 150 , 10 ) ; TabStop = TRUE ; @@ -144,6 +154,7 @@ ModalDialog DLG_MAILMERGE }; RadioButton RB_SAVE_INDIVIDUAL { + HelpID = "sw:RadioButton:DLG_MAILMERGE:RB_SAVE_INDIVIDUAL"; Pos = MAP_APPFONT ( 150, 152 ) ; Size = MAP_APPFONT ( 150 , 10 ) ; TabStop = TRUE ; @@ -151,6 +162,7 @@ ModalDialog DLG_MAILMERGE }; CheckBox RB_GENERATE_FROM_DATABASE { + HelpID = "sw:CheckBox:DLG_MAILMERGE:RB_GENERATE_FROM_DATABASE"; Pos = MAP_APPFONT ( 156, 168 ) ; Size = MAP_APPFONT ( 144 , 10 ) ; TabStop = TRUE ; @@ -164,6 +176,7 @@ ModalDialog DLG_MAILMERGE }; ListBox LB_COLUMN { + HelpID = "sw:ListBox:DLG_MAILMERGE:LB_COLUMN"; Border = TRUE ; Pos = MAP_APPFONT ( 205 , 182 ) ; Size = MAP_APPFONT ( 103 , 84 ) ; @@ -178,6 +191,7 @@ ModalDialog DLG_MAILMERGE }; Edit ED_PATH { + HelpID = "sw:Edit:DLG_MAILMERGE:ED_PATH"; Pos = MAP_APPFONT ( 205 , 198 ) ; Size = MAP_APPFONT ( 86 , 12 ) ; Border = TRUE ; @@ -185,6 +199,7 @@ ModalDialog DLG_MAILMERGE }; PushButton PB_PATH { + HelpID = "sw:PushButton:DLG_MAILMERGE:PB_PATH"; Pos = MAP_APPFONT ( 294 , 198 ) ; Size = MAP_APPFONT ( 14 , 12 ) ; // Soll Groesse des Edits haben (12)! @@ -199,6 +214,7 @@ ModalDialog DLG_MAILMERGE }; ListBox LB_FILTER { + HelpID = "sw:ListBox:DLG_MAILMERGE:LB_FILTER"; Border = TRUE ; Pos = MAP_APPFONT ( 205 , 214 ) ; Size = MAP_APPFONT ( 103 , 84 ) ; @@ -208,6 +224,7 @@ ModalDialog DLG_MAILMERGE }; ListBox LB_ADDRESSFLD { + HelpID = "sw:ListBox:DLG_MAILMERGE:LB_ADDRESSFLD"; Border = TRUE ; Pos = MAP_APPFONT ( 220 , 110 ) ; Size = MAP_APPFONT ( 74 , 84 ) ; @@ -225,6 +242,7 @@ ModalDialog DLG_MAILMERGE }; Edit ED_SUBJECT { + HelpID = "sw:Edit:DLG_MAILMERGE:ED_SUBJECT"; Border = TRUE ; Pos = MAP_APPFONT ( 220 , 127 ) ; Size = MAP_APPFONT ( 88 , 12 ) ; @@ -240,6 +258,7 @@ ModalDialog DLG_MAILMERGE }; Edit ED_ATTACH { + HelpID = "sw:Edit:DLG_MAILMERGE:ED_ATTACH"; Border = TRUE ; Pos = MAP_APPFONT ( 220 , 140 ) ; Size = MAP_APPFONT ( 72 , 12 ) ; @@ -249,6 +268,7 @@ ModalDialog DLG_MAILMERGE }; PushButton PB_ATTACH { + HelpID = "sw:PushButton:DLG_MAILMERGE:PB_ATTACH"; Pos = MAP_APPFONT ( 294 , 140 ) ; Size = MAP_APPFONT ( 14 , 12 ) ; // Soll Groesse des Edits haben (12)! @@ -265,6 +285,7 @@ ModalDialog DLG_MAILMERGE }; CheckBox CB_FORMAT_HTML { + HelpID = "sw:CheckBox:DLG_MAILMERGE:CB_FORMAT_HTML"; Pos = MAP_APPFONT ( 220 , 156 ) ; Size = MAP_APPFONT ( 90 , 10 ) ; Disable = TRUE ; @@ -273,6 +294,7 @@ ModalDialog DLG_MAILMERGE }; CheckBox CB_FORMAT_RTF { + HelpID = "sw:CheckBox:DLG_MAILMERGE:CB_FORMAT_RTF"; Pos = MAP_APPFONT ( 220 , 169 ) ; Size = MAP_APPFONT ( 90 , 10 ) ; Disable = TRUE ; @@ -281,6 +303,7 @@ ModalDialog DLG_MAILMERGE }; CheckBox CB_FORMAT_SW { + HelpID = "sw:CheckBox:DLG_MAILMERGE:CB_FORMAT_SW"; Pos = MAP_APPFONT ( 220, 182 ) ; Size = MAP_APPFONT ( 90 , 10 ) ; Disable = TRUE ; @@ -338,6 +361,7 @@ ModalDialog DLG_MERGE_CREATE }; RadioButton RB_THISDOC { + HelpID = "sw:RadioButton:DLG_MERGE_CREATE:RB_THISDOC"; Pos = MAP_APPFONT ( 12 , 14 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; Check = TRUE; @@ -346,6 +370,7 @@ ModalDialog DLG_MERGE_CREATE }; RadioButton RB_TEMPLATE { + HelpID = "sw:RadioButton:DLG_MERGE_CREATE:RB_TEMPLATE"; Pos = MAP_APPFONT ( 12 , 27 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; TabStop = TRUE ; @@ -385,6 +410,7 @@ ModalDialog DLG_MERGE_FIELD_CONNECTIONS }; RadioButton RB_USEEXISTING { + HelpID = "sw:RadioButton:DLG_MERGE_FIELD_CONNECTIONS:RB_USEEXISTING"; Pos = MAP_APPFONT ( 12 , 14 ) ; Size = MAP_APPFONT ( 130 , 10 ) ; Check = TRUE; @@ -393,6 +419,7 @@ ModalDialog DLG_MERGE_FIELD_CONNECTIONS }; RadioButton RB_CREATENEW { + HelpID = "sw:RadioButton:DLG_MERGE_FIELD_CONNECTIONS:RB_CREATENEW"; Pos = MAP_APPFONT ( 12 , 27 ) ; Size = MAP_APPFONT ( 130 , 10 ) ; TabStop = TRUE ; diff --git a/sw/source/ui/envelp/makefile.mk b/sw/source/ui/envelp/makefile.mk deleted file mode 100644 index cb38ffd847..0000000000 --- a/sw/source/ui/envelp/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=envelp -LIBTARGET=no -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -SRS1NAME=$(TARGET) -SRC1FILES =\ - envelp.src \ - envfmt.src \ - envlop.src \ - envprt.src \ - label.src \ - labfmt.src \ - labprt.src \ - mailmrge.src - -SLOFILES = \ - $(EXCEPTIONSFILES) \ - $(SLO)$/labimg.obj - -EXCEPTIONSFILES= \ - $(SLO)$/envfmt.obj \ - $(SLO)$/envimg.obj \ - $(SLO)$/envlop1.obj \ - $(SLO)$/envprt.obj \ - $(SLO)$/label1.obj \ - $(SLO)$/labelcfg.obj \ - $(SLO)$/labelexp.obj \ - $(SLO)$/labfmt.obj \ - $(SLO)$/labprt.obj \ - $(SLO)$/mailmrge.obj \ - $(SLO)$/syncbtn.obj - -LIB1TARGET = $(SLB)$/$(TARGET).lib - -LIB1OBJFILES = \ - $(SLO)$/envimg.obj \ - $(SLO)$/labelcfg.obj \ - $(SLO)$/labimg.obj \ - $(SLO)$/syncbtn.obj -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/ui/envelp/swuilabimp.hxx b/sw/source/ui/envelp/swuilabimp.hxx index 999fe4c722..7aa74be107 100644 --- a/sw/source/ui/envelp/swuilabimp.hxx +++ b/sw/source/ui/envelp/swuilabimp.hxx @@ -35,6 +35,7 @@ class SwLabPage : public SfxTabPage String sActDBName; SwLabItem aItem; + FixedLine aWritingFL; FixedText aWritingText; CheckBox aAddrBox; MultiLineEdit aWritingEdit; @@ -46,8 +47,8 @@ class SwLabPage : public SfxTabPage FixedText aDBFieldFT; ListBox aDBFieldLB; // PushButton aDatabaseButton; - FixedLine aWritingFL; + FixedLine aFormatFL; RadioButton aContButton; RadioButton aSheetButton; FixedText aMakeText; @@ -56,7 +57,6 @@ class SwLabPage : public SfxTabPage ListBox aTypeBox; ListBox aHiddenSortTypeBox; FixedInfo aFormatInfo; - FixedLine aFormatFL; sal_Bool m_bLabel; @@ -100,12 +100,11 @@ public: class SwOneExampleFrame; class SwVisitingCardPage : public SfxTabPage { + FixedLine aContentFL; SvTreeListBox aAutoTextLB; FixedText aAutoTextGroupFT; ListBox aAutoTextGroupLB; - FixedLine aContentFL; - Window aExampleWIN; String sVisCardGroup; diff --git a/sw/source/ui/envelp/syncbtn.cxx b/sw/source/ui/envelp/syncbtn.cxx index a2ec62d810..937df47b3a 100644 --- a/sw/source/ui/envelp/syncbtn.cxx +++ b/sw/source/ui/envelp/syncbtn.cxx @@ -48,7 +48,7 @@ SFX_IMPL_FLOATINGWINDOW( SwSyncChildWin, FN_SYNC_LABELS ) SwSyncChildWin::SwSyncChildWin( Window* _pParent, - USHORT nId, + sal_uInt16 nId, SfxBindings* pBindings, SfxChildWinInfo* pInfo ) : SfxChildWindow( _pParent, nId ) diff --git a/sw/source/ui/fldui/DropDownFieldDialog.cxx b/sw/source/ui/fldui/DropDownFieldDialog.cxx index 3a98567317..7af3b57dc2 100644 --- a/sw/source/ui/fldui/DropDownFieldDialog.cxx +++ b/sw/source/ui/fldui/DropDownFieldDialog.cxx @@ -33,7 +33,6 @@ #undef SW_DLLIMPLEMENTATION #endif - #include <wrtsh.hxx> #include <fldbas.hxx> #include <fldmgr.hxx> @@ -50,7 +49,7 @@ using namespace ::com::sun::star; Beschreibung: Feldeinfuegen bearbeiten --------------------------------------------------------------------*/ sw::DropDownFieldDialog::DropDownFieldDialog( Window *pParent, SwWrtShell &rS, - SwField* pField, BOOL bNextButton ) : + SwField* pField, sal_Bool bNextButton ) : SvxStandardDialog(pParent, SW_RES(DLG_FLD_DROPDOWN)), aItemsFL( this, SW_RES( FL_ITEMS )), @@ -94,7 +93,7 @@ sw::DropDownFieldDialog::DropDownFieldDialog( Window *pParent, SwWrtShell &rS, aListItemsLB.SelectEntry(pDropField->GetSelectedItem()); } - BOOL bEnable = !rSh.IsCrsrReadonly(); + sal_Bool bEnable = !rSh.IsCrsrReadonly(); aOKPB.Enable( bEnable ); aListItemsLB.GrabFocus(); @@ -114,13 +113,12 @@ void sw::DropDownFieldDialog::Apply() { rSh.StartAllAction(); - SwDropDownField * pCopy = (SwDropDownField *) pDropField->Copy(); + ::std::auto_ptr<SwDropDownField> const pCopy( + static_cast<SwDropDownField *>( pDropField->CopyField() ) ); pCopy->SetPar1(sSelect); rSh.SwEditShell::UpdateFlds(*pCopy); - delete pCopy; - rSh.SetUndoNoResetModified(); rSh.EndAllAction(); } diff --git a/sw/source/ui/fldui/DropDownFieldDialog.src b/sw/source/ui/fldui/DropDownFieldDialog.src index 25f6c4ac15..2d5c98cfe5 100644 --- a/sw/source/ui/fldui/DropDownFieldDialog.src +++ b/sw/source/ui/fldui/DropDownFieldDialog.src @@ -45,6 +45,7 @@ ModalDialog DLG_FLD_DROPDOWN }; ListBox LB_LISTITEMS { + HelpID = "sw:ListBox:DLG_FLD_DROPDOWN:LB_LISTITEMS"; Border = TRUE ; Pos = MAP_APPFONT ( 12 , 14 ) ; Size = MAP_APPFONT ( 115 , 99 ) ; @@ -67,6 +68,7 @@ ModalDialog DLG_FLD_DROPDOWN }; PushButton PB_NEXT { + HelpID = "sw:PushButton:DLG_FLD_DROPDOWN:PB_NEXT"; Pos = MAP_APPFONT ( 139 , 40 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; TabStop = TRUE ; @@ -81,6 +83,7 @@ ModalDialog DLG_FLD_DROPDOWN }; PushButton PB_EDIT { + HelpID = "sw:PushButton:DLG_FLD_DROPDOWN:PB_EDIT"; Pos = MAP_APPFONT ( 139 , 99 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; TabStop = TRUE ; diff --git a/sw/source/ui/fldui/changedb.cxx b/sw/source/ui/fldui/changedb.cxx index a6d2bf3638..143e16a6a1 100644 --- a/sw/source/ui/fldui/changedb.cxx +++ b/sw/source/ui/fldui/changedb.cxx @@ -99,7 +99,7 @@ SwChangeDBDlg::SwChangeDBDlg(SwView& rVw) : aAddDBPB.SetClickHdl(LINK(this, SwChangeDBDlg, AddDBHdl)); aUsedDBTLB.SetSelectionMode(MULTIPLE_SELECTION); - aUsedDBTLB.SetWindowBits(WB_HASLINES|WB_CLIPCHILDREN|WB_SORT|WB_HASBUTTONS|WB_HASBUTTONSATROOT|WB_HSCROLL); + aUsedDBTLB.SetStyle(aUsedDBTLB.GetStyle()|WB_HASLINES|WB_CLIPCHILDREN|WB_SORT|WB_HASBUTTONS|WB_HASBUTTONSATROOT|WB_HSCROLL); aUsedDBTLB.SetSpaceBetweenEntries(0); aUsedDBTLB.SetNodeBitmaps( aImageList.GetImage(IMG_COLLAPSE), aImageList.GetImage(IMG_EXPAND)); @@ -144,12 +144,12 @@ void SwChangeDBDlg::FillDBPopup() SvStringsDtor aDBNameList(5, 1); pSh->GetAllUsedDB( aDBNameList, &aAllDBNames ); - USHORT nCount = aDBNameList.Count(); + sal_uInt16 nCount = aDBNameList.Count(); aUsedDBTLB.Clear(); SvLBoxEntry *pFirst = 0; SvLBoxEntry *pLast = 0; - for (USHORT k = 0; k < nCount; k++) + for (sal_uInt16 k = 0; k < nCount; k++) { sDBName = *aDBNameList.GetObject(k); sDBName = sDBName.GetToken(0); @@ -174,8 +174,8 @@ SvLBoxEntry* SwChangeDBDlg::Insert(const String& rDBName) SvLBoxEntry* pParent; SvLBoxEntry* pChild; - USHORT nParent = 0; - USHORT nChild = 0; + sal_uInt16 nParent = 0; + sal_uInt16 nChild = 0; Image aTableImg = aImageList.GetImage(IMG_DBTABLE); Image aDBImg = aImageList.GetImage(IMG_DB); @@ -220,7 +220,7 @@ void SwChangeDBDlg::Apply() void SwChangeDBDlg::UpdateFlds() { - SvStringsDtor aDBNames( (BYTE)aUsedDBTLB.GetSelectionCount(), 1 ); + SvStringsDtor aDBNames( (sal_uInt8)aUsedDBTLB.GetSelectionCount(), 1 ); SvLBoxEntry* pEntry = aUsedDBTLB.FirstSelected(); while( pEntry ) @@ -232,7 +232,7 @@ void SwChangeDBDlg::UpdateFlds() *pTmp += DB_DELIM; *pTmp += aUsedDBTLB.GetEntryText( pEntry ); *pTmp += DB_DELIM; - int nCommandType = (int)(ULONG)pEntry->GetUserData(); + int nCommandType = (int)(sal_uLong)pEntry->GetUserData(); *pTmp += String::CreateFromInt32(nCommandType); aDBNames.Insert(pTmp, aDBNames.Count() ); } @@ -268,14 +268,14 @@ IMPL_LINK( SwChangeDBDlg, ButtonHdl, Button *, EMPTYARG ) IMPL_LINK( SwChangeDBDlg, TreeSelectHdl, SvTreeListBox *, EMPTYARG ) { - BOOL bEnable = FALSE; + sal_Bool bEnable = sal_False; SvLBoxEntry* pEntry = aAvailDBTLB.GetCurEntry(); if (pEntry) { if (aAvailDBTLB.GetParent(pEntry)) - bEnable = TRUE; + bEnable = sal_True; aOKBT.Enable( bEnable ); } return 0; @@ -291,7 +291,7 @@ void SwChangeDBDlg::ShowDBName(const SwDBData& rDBData) sTmp += '.'; sTmp += (String)rDBData.sCommand; - for (USHORT i = 0; i < sTmp.Len(); i++) + for (sal_uInt16 i = 0; i < sTmp.Len(); i++) { sName += sTmp.GetChar(i); if (sTmp.GetChar(i) == '~') diff --git a/sw/source/ui/fldui/changedb.src b/sw/source/ui/fldui/changedb.src index a461a1d7ac..8c4e21d5b3 100644 --- a/sw/source/ui/fldui/changedb.src +++ b/sw/source/ui/fldui/changedb.src @@ -31,6 +31,7 @@ ModalDialog DLG_CHANGE_DB { + HelpID = "sw:ModalDialog:DLG_CHANGE_DB"; OutputSize = TRUE ; SVLook = TRUE ; Size = MAP_APPFONT ( 286 , 175 ) ; @@ -74,6 +75,7 @@ ModalDialog DLG_CHANGE_DB }; PushButton PB_ADDDB { + HelpID = "sw:PushButton:DLG_CHANGE_DB:PB_ADDDB"; Pos = MAP_APPFONT ( 118 , 90 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "Browse..." ; diff --git a/sw/source/ui/fldui/flddb.cxx b/sw/source/ui/fldui/flddb.cxx index ae04256517..f88e2999a6 100644 --- a/sw/source/ui/fldui/flddb.cxx +++ b/sw/source/ui/fldui/flddb.cxx @@ -55,7 +55,7 @@ SwFldDBPage::SwFldDBPage(Window* pParent, const SfxItemSet& rCoreSet ) : aTypeFT (this, SW_RES(FT_DBTYPE)), aTypeLB (this, SW_RES(LB_DBTYPE)), aSelectionFT(this, SW_RES(FT_DBSELECTION)), - aDatabaseTLB(this, SW_RES(TLB_DBLIST), 0, aEmptyStr, FALSE), + aDatabaseTLB(this, SW_RES(TLB_DBLIST), 0, aEmptyStr, sal_False), aAddDBFT(this, SW_RES(FT_ADDDB)), aAddDBPB(this, SW_RES(PB_ADDDB)), aConditionFT(this, SW_RES(FT_DBCONDITION)), @@ -92,13 +92,13 @@ void SwFldDBPage::Reset(const SfxItemSet&) { Init(); // Allgemeine initialisierung - aTypeLB.SetUpdateMode(FALSE); - USHORT nOldPos = aTypeLB.GetSelectEntryPos(); + aTypeLB.SetUpdateMode(sal_False); + sal_uInt16 nOldPos = aTypeLB.GetSelectEntryPos(); sOldDBName = aDatabaseTLB.GetDBName(sOldTableName, sOldColumnName); aTypeLB.Clear(); - USHORT nPos, nTypeId, i; + sal_uInt16 nPos, nTypeId, i; if (!IsFldEdit()) { @@ -125,11 +125,11 @@ void SwFldDBPage::Reset(const SfxItemSet&) aFormatLB.Clear(); - USHORT nSize = GetFldMgr().GetFormatCount(TYP_DBSETNUMBERFLD, FALSE, IsFldDlgHtmlMode()); + sal_uInt16 nSize = GetFldMgr().GetFormatCount(TYP_DBSETNUMBERFLD, sal_False, IsFldDlgHtmlMode()); for( i = 0; i < nSize; ++i ) { - USHORT nEntryPos = aFormatLB.InsertEntry(GetFldMgr().GetFormatStr(TYP_DBSETNUMBERFLD, i)); - USHORT nFmtId = GetFldMgr().GetFormatId( TYP_DBSETNUMBERFLD, i ); + sal_uInt16 nEntryPos = aFormatLB.InsertEntry(GetFldMgr().GetFormatStr(TYP_DBSETNUMBERFLD, i)); + sal_uInt16 nFmtId = GetFldMgr().GetFormatId( TYP_DBSETNUMBERFLD, i ); aFormatLB.SetEntryData( nEntryPos, reinterpret_cast<void*>(nFmtId) ); if( SVX_NUM_ARABIC == nFmtId ) aFormatLB.SelectEntryPos( nEntryPos ); @@ -163,11 +163,11 @@ void SwFldDBPage::Reset(const SfxItemSet&) if(sUserData.GetToken(0, ';').EqualsIgnoreCaseAscii(USER_DATA_VERSION_1)) { String sVal = sUserData.GetToken(1, ';'); - USHORT nVal = (USHORT)sVal.ToInt32(); + sal_uInt16 nVal = (sal_uInt16)sVal.ToInt32(); if(nVal != USHRT_MAX) { for(i = 0; i < aTypeLB.GetEntryCount(); i++) - if(nVal == (USHORT)(ULONG)aTypeLB.GetEntryData(i)) + if(nVal == (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(i)) { aTypeLB.SelectEntryPos(i); break; @@ -177,7 +177,7 @@ void SwFldDBPage::Reset(const SfxItemSet&) } TypeHdl(0); - aTypeLB.SetUpdateMode(TRUE); + aTypeLB.SetUpdateMode(sal_True); aTypeLB.SetSelectHdl(LINK(this, SwFldDBPage, TypeHdl)); aTypeLB.SetDoubleClickHdl(LINK(this, SwFldDBPage, InsertHdl)); @@ -191,7 +191,7 @@ void SwFldDBPage::Reset(const SfxItemSet&) } } -BOOL SwFldDBPage::FillItemSet(SfxItemSet& ) +sal_Bool SwFldDBPage::FillItemSet(SfxItemSet& ) { String sTableName, sColumnName; SwDBData aData; @@ -208,11 +208,11 @@ BOOL SwFldDBPage::FillItemSet(SfxItemSet& ) if(aData.sDataSource.getLength()) // Ohne Datenbank kein neuer Feldbefehl { - USHORT nTypeId = (USHORT)(ULONG)aTypeLB.GetEntryData(GetTypeSel()); + sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel()); String aVal(aValueED.GetText()); String aName(aConditionED.GetText()); - ULONG nFormat = 0; - USHORT nSubType = 0; + sal_uLong nFormat = 0; + sal_uInt16 nSubType = 0; String sDBName = aData.sDataSource; sDBName += DB_DELIM; @@ -237,7 +237,7 @@ BOOL SwFldDBPage::FillItemSet(SfxItemSet& ) break; case TYP_DBSETNUMBERFLD: - nFormat = (USHORT)(ULONG)aFormatLB.GetEntryData( + nFormat = (sal_uInt16)(sal_uLong)aFormatLB.GetEntryData( aFormatLB.GetSelectEntryPos() ); break; } @@ -245,7 +245,7 @@ BOOL SwFldDBPage::FillItemSet(SfxItemSet& ) String sTempDBName, sTempTableName, sTempColumnName; sTempDBName = aDatabaseTLB.GetDBName(sTempTableName, sTempColumnName); - BOOL bDBListBoxChanged = sOldDBName != sTempDBName || + sal_Bool bDBListBoxChanged = sOldDBName != sTempDBName || sOldTableName != sTempTableName || sOldColumnName != sTempColumnName; if (!IsFldEdit() || aConditionED.GetSavedValue() != aConditionED.GetText() || @@ -257,7 +257,7 @@ BOOL SwFldDBPage::FillItemSet(SfxItemSet& ) } } - return FALSE; + return sal_False; } SfxTabPage* SwFldDBPage::Create( Window* pParent, @@ -266,7 +266,7 @@ SfxTabPage* SwFldDBPage::Create( Window* pParent, return ( new SwFldDBPage( pParent, rAttrSet ) ); } -USHORT SwFldDBPage::GetGroup() +sal_uInt16 SwFldDBPage::GetGroup() { return GRP_DB; } @@ -274,7 +274,7 @@ USHORT SwFldDBPage::GetGroup() IMPL_LINK( SwFldDBPage, TypeHdl, ListBox *, pBox ) { // Alte ListBoxPos sichern - const USHORT nOld = GetTypeSel(); + const sal_uInt16 nOld = GetTypeSel(); // Aktuelle ListBoxPos SetTypeSel(aTypeLB.GetSelectEntryPos()); @@ -290,8 +290,8 @@ IMPL_LINK( SwFldDBPage, TypeHdl, ListBox *, pBox ) SwWrtShell *pSh = GetWrtShell(); if(!pSh) pSh = ::GetActiveWrtShell(); - BOOL bCond = FALSE, bSetNo = FALSE, bFormat = FALSE, bDBFormat = FALSE; - USHORT nTypeId = (USHORT)(ULONG)aTypeLB.GetEntryData(GetTypeSel()); + sal_Bool bCond = sal_False, bSetNo = sal_False, bFormat = sal_False, bDBFormat = sal_False; + sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel()); aDatabaseTLB.ShowColumns(nTypeId == TYP_DBFLD); @@ -314,8 +314,8 @@ IMPL_LINK( SwFldDBPage, TypeHdl, ListBox *, pBox ) switch (nTypeId) { case TYP_DBFLD: - bFormat = TRUE; - bDBFormat = TRUE; + bFormat = sal_True; + bDBFormat = sal_True; aNumFormatLB.Show(); aFormatLB.Hide(); @@ -335,10 +335,10 @@ IMPL_LINK( SwFldDBPage, TypeHdl, ListBox *, pBox ) break; case TYP_DBNUMSETFLD: - bSetNo = TRUE; + bSetNo = sal_True; // kein break! case TYP_DBNEXTSETFLD: - bCond = TRUE; + bCond = sal_True; if (IsFldEdit()) { aConditionED.SetText(GetCurField()->GetPar1()); @@ -350,14 +350,14 @@ IMPL_LINK( SwFldDBPage, TypeHdl, ListBox *, pBox ) break; case TYP_DBSETNUMBERFLD: - bFormat = TRUE; + bFormat = sal_True; aNewFormatRB.Check(); aNumFormatLB.Hide(); aFormatLB.Show(); if( IsFldEdit() ) { - for( USHORT nI = aFormatLB.GetEntryCount(); nI; ) - if( GetCurField()->GetFormat() == (USHORT)(ULONG) + for( sal_uInt16 nI = aFormatLB.GetEntryCount(); nI; ) + if( GetCurField()->GetFormat() == (sal_uInt16)(sal_uLong) aFormatLB.GetEntryData( --nI )) { aFormatLB.SelectEntryPos( nI ); @@ -385,7 +385,7 @@ IMPL_LINK( SwFldDBPage, TypeHdl, ListBox *, pBox ) aValueED.SetText(aEmptyStr); if (bCond) aConditionED.SetText( String::CreateFromAscii( - RTL_CONSTASCII_STRINGPARAM( "TRUE" ))); + RTL_CONSTASCII_STRINGPARAM( "sal_True" ))); else aConditionED.SetText(aEmptyStr); } @@ -406,8 +406,8 @@ IMPL_LINK( SwFldDBPage, NumSelectHdl, NumFormatListBox *, pLB ) void SwFldDBPage::CheckInsert() { - BOOL bInsert = TRUE; - USHORT nTypeId = (USHORT)(ULONG)aTypeLB.GetEntryData(GetTypeSel()); + sal_Bool bInsert = sal_True; + sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel()); SvLBoxEntry* pEntry = aDatabaseTLB.GetCurEntry(); @@ -421,11 +421,11 @@ void SwFldDBPage::CheckInsert() bInsert &= pEntry != 0; } else - bInsert = FALSE; + bInsert = sal_False; if (nTypeId == TYP_DBNUMSETFLD) { - BOOL bHasValue = aValueED.GetText().Len() != 0; + sal_Bool bHasValue = aValueED.GetText().Len() != 0; bInsert &= bHasValue; } @@ -439,7 +439,7 @@ IMPL_LINK( SwFldDBPage, TreeSelectHdl, SvTreeListBox *, pBox ) SvLBoxEntry* pEntry = pColEntry = pBox->GetCurEntry(); if (pEntry) { - USHORT nTypeId = (USHORT)(ULONG)aTypeLB.GetEntryData(GetTypeSel()); + sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel()); pEntry = aDatabaseTLB.GetParent(pEntry); @@ -450,13 +450,13 @@ IMPL_LINK( SwFldDBPage, TreeSelectHdl, SvTreeListBox *, pBox ) if (nTypeId == TYP_DBFLD) { - BOOL bNumFormat = FALSE; + sal_Bool bNumFormat = sal_False; if (pEntry != 0) { String sTableName; String sColumnName; - BOOL bIsTable; + sal_Bool bIsTable; String sDBName = aDatabaseTLB.GetDBName(sTableName, sColumnName, &bIsTable); bNumFormat = GetFldMgr().IsDBNumeric(sDBName, sTableName, @@ -499,19 +499,19 @@ void SwFldDBPage::FillUserData() String sData( String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( USER_DATA_VERSION ))); sData += ';'; - USHORT nTypeSel = aTypeLB.GetSelectEntryPos(); + sal_uInt16 nTypeSel = aTypeLB.GetSelectEntryPos(); if( LISTBOX_ENTRY_NOTFOUND == nTypeSel ) nTypeSel = USHRT_MAX; else - nTypeSel = (USHORT)(ULONG)aTypeLB.GetEntryData( nTypeSel ); + nTypeSel = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData( nTypeSel ); sData += String::CreateFromInt32( nTypeSel ); SetUserData(sData); } void SwFldDBPage::ActivateMailMergeAddress() { - ULONG nData = TYP_DBFLD; + sal_uLong nData = TYP_DBFLD; aTypeLB.SelectEntryPos(aTypeLB.GetEntryPos( (const void*) nData )); aTypeLB.GetSelectHdl().Call(&aTypeLB); const SwDBData& rData = SW_MOD()->GetDBConfig()->GetAddressSource(); diff --git a/sw/source/ui/fldui/flddb.hxx b/sw/source/ui/fldui/flddb.hxx index 7f890f71d6..89716b0e93 100644 --- a/sw/source/ui/fldui/flddb.hxx +++ b/sw/source/ui/fldui/flddb.hxx @@ -63,8 +63,8 @@ class SwFldDBPage : public SwFldPage String sOldDBName; String sOldTableName; String sOldColumnName; - ULONG nOldFormat; - USHORT nOldSubType; + sal_uLong nOldFormat; + sal_uInt16 nOldSubType; Link aOldNumSelectHdl; DECL_LINK( TypeHdl, ListBox* ); @@ -78,7 +78,7 @@ class SwFldDBPage : public SwFldPage using SwFldPage::SetWrtShell; protected: - virtual USHORT GetGroup(); + virtual sal_uInt16 GetGroup(); public: SwFldDBPage(Window* pParent, const SfxItemSet& rSet); @@ -87,7 +87,7 @@ public: static SfxTabPage* Create(Window* pParent, const SfxItemSet& rAttrSet); - virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual sal_Bool FillItemSet( SfxItemSet& rSet ); virtual void Reset( const SfxItemSet& rSet ); virtual void FillUserData(); diff --git a/sw/source/ui/fldui/flddb.src b/sw/source/ui/fldui/flddb.src index e7bc8b99f9..d88d8790ba 100644 --- a/sw/source/ui/fldui/flddb.src +++ b/sw/source/ui/fldui/flddb.src @@ -43,6 +43,7 @@ TabPage TP_FLD_DB }; ListBox LB_DBTYPE { + HelpID = "sw:ListBox:TP_FLD_DB:LB_DBTYPE"; Border = TRUE ; Pos = MAP_APPFONT ( 6 , 14 ) ; Size = MAP_APPFONT ( 76 , 104 ) ; @@ -67,6 +68,7 @@ TabPage TP_FLD_DB }; Edit ED_DBCONDITION { + HelpID = "sw:Edit:TP_FLD_DB:ED_DBCONDITION"; Border = TRUE ; Pos = MAP_APPFONT ( 6 , 137 ) ; Size = MAP_APPFONT ( 76 , 12 ) ; @@ -82,6 +84,7 @@ TabPage TP_FLD_DB }; Edit ED_DBSETNUMBER { + HelpID = "sw:Edit:TP_FLD_DB:ED_DBSETNUMBER"; Border = TRUE ; Pos = MAP_APPFONT ( 6 , 167 ) ; Size = MAP_APPFONT ( 76 , 12 ) ; @@ -110,6 +113,7 @@ TabPage TP_FLD_DB }; PushButton PB_ADDDB { + HelpID = "sw:PushButton:TP_FLD_DB:PB_ADDDB"; Pos = MAP_APPFONT ( 198 , 121) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "Browse..." ; @@ -117,6 +121,7 @@ TabPage TP_FLD_DB RadioButton RB_DBOWNFORMAT { + HelpID = "sw:RadioButton:TP_FLD_DB:RB_DBOWNFORMAT"; Pos = MAP_APPFONT ( 94 , 153 ) ; Size = MAP_APPFONT ( 150 , 10 ) ; Check = TRUE ; @@ -124,12 +129,14 @@ TabPage TP_FLD_DB }; RadioButton RB_DBFORMAT { + HelpID = "sw:RadioButton:TP_FLD_DB:RB_DBFORMAT"; Pos = MAP_APPFONT ( 94 , 166 ) ; Size = MAP_APPFONT ( 100 , 10 ) ; Text [ en-US ] = "User-defined" ; }; ListBox LB_DBNUMFORMAT { + HelpID = "sw:ListBox:TP_FLD_DB:LB_DBNUMFORMAT"; Border = TRUE ; Pos = MAP_APPFONT ( 195 , 164 ) ; Size = MAP_APPFONT ( 53 , 60 ) ; @@ -139,6 +146,7 @@ TabPage TP_FLD_DB }; ListBox LB_DBFORMAT { + HelpID = "sw:ListBox:TP_FLD_DB:LB_DBFORMAT"; Border = TRUE ; Pos = MAP_APPFONT ( 195 , 163 ) ; Size = MAP_APPFONT ( 53 , 60 ) ; diff --git a/sw/source/ui/fldui/flddinf.cxx b/sw/source/ui/fldui/flddinf.cxx index eb5bc6edf9..722bf9cf39 100644 --- a/sw/source/ui/fldui/flddinf.cxx +++ b/sw/source/ui/fldui/flddinf.cxx @@ -81,16 +81,16 @@ SwFldDokInfPage::SwFldDokInfPage(Window* pWindow, const SfxItemSet& rCoreSet ) : aTypeTLB.SetHelpId(HID_FIELD_DINF_TYPE); aTypeTLB.SetSelectionMode(SINGLE_SELECTION); - aTypeTLB.SetWindowBits(WB_HASLINES|WB_CLIPCHILDREN|WB_SORT|WB_HASBUTTONS|WB_HASBUTTONSATROOT|WB_HSCROLL); + aTypeTLB.SetStyle(aTypeTLB.GetStyle()|WB_HASLINES|WB_CLIPCHILDREN|WB_SORT|WB_HASBUTTONS|WB_HASBUTTONSATROOT|WB_HSCROLL); // Font nicht setzen, damit der Font des Controls uebernommen wird! // Sonst bei falschem Font Bug an OV. aTypeTLB.SetSpaceBetweenEntries(0); aTypeTLB.SetNodeDefaultImages(); //enable 'active' language selection - aFormatLB.SetShowLanguageControl(TRUE); + aFormatLB.SetShowLanguageControl(sal_True); - SFX_ITEMSET_ARG( &rCoreSet, pItem, SfxUnoAnyItem, SID_DOCINFO, FALSE ); + SFX_ITEMSET_ARG( &rCoreSet, pItem, SfxUnoAnyItem, SID_DOCINFO, sal_False ); if ( pItem ) pItem->GetValue() >>= xCustomPropertySet; } @@ -104,17 +104,17 @@ void SwFldDokInfPage::Reset(const SfxItemSet& ) Init(); // Allgemeine initialisierung // TypeListBox initialisieren - aTypeTLB.SetUpdateMode(FALSE); + aTypeTLB.SetUpdateMode(sal_False); aTypeTLB.Clear(); pSelEntry = 0; // SubTypes in der TypeLB anzeigen - USHORT nTypeId = TYP_DOCINFOFLD; + sal_uInt16 nTypeId = TYP_DOCINFOFLD; SvLBoxEntry* pEntry = 0; SvLBoxEntry* pInfo = 0; - USHORT nSubType = USHRT_MAX; + sal_uInt16 nSubType = USHRT_MAX; if (IsFldEdit()) { const SwField* pCurField = GetCurField(); @@ -133,17 +133,17 @@ void SwFldDokInfPage::Reset(const SfxItemSet& ) } } - USHORT nSelEntryData = USHRT_MAX; + sal_uInt16 nSelEntryData = USHRT_MAX; String sUserData = GetUserData(); if(sUserData.GetToken(0, ';').EqualsIgnoreCaseAscii(USER_DATA_VERSION_1)) { String sVal = sUserData.GetToken(1, ';'); - nSelEntryData = static_cast< USHORT >(sVal.ToInt32()); + nSelEntryData = static_cast< sal_uInt16 >(sVal.ToInt32()); } SvStringsDtor aLst; GetFldMgr().GetSubTypes(nTypeId, aLst); - for (USHORT i = 0; i < aLst.Count(); ++i) + for (sal_uInt16 i = 0; i < aLst.Count(); ++i) { if (!IsFldEdit() || nSubType == i) { @@ -190,19 +190,19 @@ void SwFldDokInfPage::Reset(const SfxItemSet& ) if (pSelEntry != 0) { aTypeTLB.Select(pSelEntry); - nSubType = (USHORT)(ULONG)pSelEntry->GetUserData(); + nSubType = (sal_uInt16)(sal_uLong)pSelEntry->GetUserData(); } else if ( aTypeTLB.GetEntry(0) ) { pSelEntry = aTypeTLB.GetEntry(0); - nSubType = (USHORT)(ULONG)pSelEntry->GetUserData(); + nSubType = (sal_uInt16)(sal_uLong)pSelEntry->GetUserData(); } FillSelectionLB(nSubType); if ( pSelEntry ) TypeHdl(); - aTypeTLB.SetUpdateMode(TRUE); + aTypeTLB.SetUpdateMode(sal_True); aTypeTLB.SetSelectHdl(LINK(this, SwFldDokInfPage, TypeHdl)); aTypeTLB.SetDoubleClickHdl(LINK(this, SwFldDokInfPage, InsertHdl)); aSelectionLB.SetSelectHdl(LINK(this, SwFldDokInfPage, SubTypeHdl)); @@ -233,7 +233,7 @@ IMPL_LINK( SwFldDokInfPage, TypeHdl, ListBox *, EMPTYARG ) else if (pOldEntry != pSelEntry) - FillSelectionLB((USHORT)(ULONG)pSelEntry->GetUserData()); + FillSelectionLB((sal_uInt16)(sal_uLong)pSelEntry->GetUserData()); SubTypeHdl(); @@ -242,10 +242,10 @@ IMPL_LINK( SwFldDokInfPage, TypeHdl, ListBox *, EMPTYARG ) IMPL_LINK( SwFldDokInfPage, SubTypeHdl, ListBox *, EMPTYARG ) { - USHORT nSubType = (USHORT)(ULONG)pSelEntry->GetUserData(); - USHORT nPos = aSelectionLB.GetSelectEntryPos(); - USHORT nExtSubType; - USHORT nNewType = 0; + sal_uInt16 nSubType = (sal_uInt16)(sal_uLong)pSelEntry->GetUserData(); + sal_uInt16 nPos = aSelectionLB.GetSelectEntryPos(); + sal_uInt16 nExtSubType; + sal_uInt16 nNewType = 0; if (nSubType != DI_EDIT) { @@ -254,8 +254,8 @@ IMPL_LINK( SwFldDokInfPage, SubTypeHdl, ListBox *, EMPTYARG ) if (!aSelectionLB.GetEntryCount()) { aFormatLB.Clear(); - aFormatLB.Enable(FALSE); - aFormatFT.Enable(FALSE); + aFormatLB.Enable(sal_False); + aFormatFT.Enable(sal_False); if( nSubType == DI_CUSTOM ) { //find out which type the custom field has - for a start set to DATE format @@ -287,14 +287,14 @@ IMPL_LINK( SwFldDokInfPage, SubTypeHdl, ListBox *, EMPTYARG ) nPos = 0; } - nExtSubType = (USHORT)(ULONG)aSelectionLB.GetEntryData(nPos); + nExtSubType = (sal_uInt16)(sal_uLong)aSelectionLB.GetEntryData(nPos); } else nExtSubType = DI_SUB_TIME; - USHORT nOldType = 0; - BOOL bEnable = FALSE; - BOOL bOneArea = FALSE; + sal_uInt16 nOldType = 0; + sal_Bool bEnable = sal_False; + sal_Bool bOneArea = sal_False; if (aFormatLB.IsEnabled()) nOldType = aFormatLB.GetFormatType(); @@ -306,12 +306,12 @@ IMPL_LINK( SwFldDokInfPage, SubTypeHdl, ListBox *, EMPTYARG ) case DI_SUB_DATE: nNewType = NUMBERFORMAT_DATE; - bOneArea = TRUE; + bOneArea = sal_True; break; case DI_SUB_TIME: nNewType = NUMBERFORMAT_TIME; - bOneArea = TRUE; + bOneArea = sal_True; break; } if (!nNewType) @@ -325,19 +325,19 @@ IMPL_LINK( SwFldDokInfPage, SubTypeHdl, ListBox *, EMPTYARG ) aFormatLB.SetFormatType(nNewType); aFormatLB.SetOneArea(bOneArea); } - bEnable = TRUE; + bEnable = sal_True; } - ULONG nFormat = IsFldEdit() ? ((SwDocInfoField*)GetCurField())->GetFormat() : 0; + sal_uLong nFormat = IsFldEdit() ? ((SwDocInfoField*)GetCurField())->GetFormat() : 0; - USHORT nOldSubType = IsFldEdit() ? (((SwDocInfoField*)GetCurField())->GetSubType() & 0xff00) : 0; + sal_uInt16 nOldSubType = IsFldEdit() ? (((SwDocInfoField*)GetCurField())->GetSubType() & 0xff00) : 0; if (IsFldEdit()) { nPos = aSelectionLB.GetSelectEntryPos(); if (nPos != LISTBOX_ENTRY_NOTFOUND ) { - nSubType = (USHORT)(ULONG)aSelectionLB.GetEntryData(nPos); + nSubType = (sal_uInt16)(sal_uLong)aSelectionLB.GetEntryData(nPos); nOldSubType &= ~DI_SUB_FIXED; if (nOldSubType == nSubType) @@ -375,10 +375,10 @@ IMPL_LINK( SwFldDokInfPage, SubTypeHdl, ListBox *, EMPTYARG ) return 0; } -USHORT SwFldDokInfPage::FillSelectionLB(USHORT nSubType) +sal_uInt16 SwFldDokInfPage::FillSelectionLB(sal_uInt16 nSubType) { // Format-Listbox fuellen - USHORT nTypeId = TYP_DOCINFOFLD; + sal_uInt16 nTypeId = TYP_DOCINFOFLD; EnableInsert(nSubType != USHRT_MAX); @@ -387,9 +387,9 @@ USHORT SwFldDokInfPage::FillSelectionLB(USHORT nSubType) aSelectionLB.Clear(); - USHORT nSize = 0; - USHORT nSelPos = USHRT_MAX; - USHORT nExtSubType = IsFldEdit() ? (((SwDocInfoField*)GetCurField())->GetSubType() & 0xff00) : 0; + sal_uInt16 nSize = 0; + sal_uInt16 nSelPos = USHRT_MAX; + sal_uInt16 nExtSubType = IsFldEdit() ? (((SwDocInfoField*)GetCurField())->GetSubType() & 0xff00) : 0; if (IsFldEdit()) { @@ -403,24 +403,24 @@ USHORT SwFldDokInfPage::FillSelectionLB(USHORT nSubType) } else { - nSize = GetFldMgr().GetFormatCount(nTypeId, FALSE, IsFldDlgHtmlMode()); - for (USHORT i = 0; i < nSize; i++) + nSize = GetFldMgr().GetFormatCount(nTypeId, sal_False, IsFldDlgHtmlMode()); + for (sal_uInt16 i = 0; i < nSize; i++) { - USHORT nPos = aSelectionLB.InsertEntry(GetFldMgr().GetFormatStr(nTypeId, i)); + sal_uInt16 nPos = aSelectionLB.InsertEntry(GetFldMgr().GetFormatStr(nTypeId, i)); aSelectionLB.SetEntryData(nPos, reinterpret_cast<void*>(GetFldMgr().GetFormatId(nTypeId, i))); if (IsFldEdit() && i == nExtSubType) nSelPos = nPos; } } - BOOL bEnable = nSize != 0; + sal_Bool bEnable = nSize != 0; if (nSize) { if (!aSelectionLB.GetSelectEntryCount()) aSelectionLB.SelectEntryPos(nSelPos == USHRT_MAX ? 0 : nSelPos); - bEnable = TRUE; + bEnable = sal_True; } aSelectionFT.Enable(bEnable); @@ -429,24 +429,24 @@ USHORT SwFldDokInfPage::FillSelectionLB(USHORT nSubType) return nSize; } -BOOL SwFldDokInfPage::FillItemSet(SfxItemSet& ) +sal_Bool SwFldDokInfPage::FillItemSet(SfxItemSet& ) { - if (!pSelEntry || (USHORT)(ULONG)pSelEntry->GetUserData() == USHRT_MAX) - return FALSE; + if (!pSelEntry || (sal_uInt16)(sal_uLong)pSelEntry->GetUserData() == USHRT_MAX) + return sal_False; - USHORT nTypeId = TYP_DOCINFOFLD; - USHORT nSubType = (USHORT)(ULONG)pSelEntry->GetUserData(); + sal_uInt16 nTypeId = TYP_DOCINFOFLD; + sal_uInt16 nSubType = (sal_uInt16)(sal_uLong)pSelEntry->GetUserData(); - ULONG nFormat = 0; + sal_uLong nFormat = 0; - USHORT nPos = aSelectionLB.GetSelectEntryPos(); + sal_uInt16 nPos = aSelectionLB.GetSelectEntryPos(); ::rtl::OUString aName; if (DI_CUSTOM == nSubType) aName = aTypeTLB.GetEntryText(pSelEntry); if (nPos != LISTBOX_ENTRY_NOTFOUND) - nSubType |= (USHORT)(ULONG)aSelectionLB.GetEntryData(nPos); + nSubType |= (sal_uInt16)(sal_uLong)aSelectionLB.GetEntryData(nPos); if (aFixedCB.IsChecked()) nSubType |= DI_SUB_FIXED; @@ -463,7 +463,7 @@ BOOL SwFldDokInfPage::FillItemSet(SfxItemSet& ) ' ', aFormatLB.IsAutomaticLanguage()); } - return FALSE; + return sal_False; } SfxTabPage* SwFldDokInfPage::Create( Window* pParent, @@ -472,7 +472,7 @@ SfxTabPage* SwFldDokInfPage::Create( Window* pParent, return ( new SwFldDokInfPage( pParent, rAttrSet ) ); } -USHORT SwFldDokInfPage::GetGroup() +sal_uInt16 SwFldDokInfPage::GetGroup() { return GRP_REG; } @@ -483,7 +483,7 @@ void SwFldDokInfPage::FillUserData() RTL_CONSTASCII_STRINGPARAM( USER_DATA_VERSION ))); sData += ';'; SvLBoxEntry* pEntry = aTypeTLB.FirstSelected(); - USHORT nTypeSel = pEntry ? sal::static_int_cast< USHORT >(reinterpret_cast< sal_uIntPtr >(pEntry->GetUserData())) : USHRT_MAX; + sal_uInt16 nTypeSel = pEntry ? sal::static_int_cast< sal_uInt16 >(reinterpret_cast< sal_uIntPtr >(pEntry->GetUserData())) : USHRT_MAX; sData += String::CreateFromInt32( nTypeSel ); SetUserData(sData); } diff --git a/sw/source/ui/fldui/flddinf.hxx b/sw/source/ui/fldui/flddinf.hxx index d10ebc0844..79687adeaa 100644 --- a/sw/source/ui/fldui/flddinf.hxx +++ b/sw/source/ui/fldui/flddinf.hxx @@ -57,17 +57,17 @@ class SwFldDokInfPage : public SwFldPage String aInfoStr; - USHORT nOldSel; - ULONG nOldFormat; + sal_uInt16 nOldSel; + sal_uLong nOldFormat; ::rtl::OUString m_sOldCustomFieldName; DECL_LINK( TypeHdl, ListBox* pLB = 0 ); DECL_LINK( SubTypeHdl, ListBox* pLB = 0 ); - USHORT FillSelectionLB(USHORT nSubTypeId); + sal_uInt16 FillSelectionLB(sal_uInt16 nSubTypeId); protected: - virtual USHORT GetGroup(); + virtual sal_uInt16 GetGroup(); public: SwFldDokInfPage(Window* pWindow, const SfxItemSet& rSet); @@ -76,7 +76,7 @@ public: static SfxTabPage* Create(Window* pParent, const SfxItemSet& rAttrSet); - virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual sal_Bool FillItemSet( SfxItemSet& rSet ); virtual void Reset( const SfxItemSet& rSet ); virtual void FillUserData(); diff --git a/sw/source/ui/fldui/flddinf.src b/sw/source/ui/fldui/flddinf.src index 9f65b88fa3..8f68883456 100644 --- a/sw/source/ui/fldui/flddinf.src +++ b/sw/source/ui/fldui/flddinf.src @@ -57,6 +57,7 @@ TabPage TP_FLD_DOKINF }; ListBox LB_DOKINFSELECTION { + HelpID = "sw:ListBox:TP_FLD_DOKINF:LB_DOKINFSELECTION"; Border = TRUE ; Pos = MAP_APPFONT ( 88 , 16 ) ; Size = MAP_APPFONT ( 76 , 163 ) ; @@ -78,6 +79,7 @@ TabPage TP_FLD_DOKINF }; ListBox LB_DOKINFFORMAT { + HelpID = "sw:ListBox:TP_FLD_DOKINF:LB_DOKINFFORMAT"; Border = TRUE ; Pos = MAP_APPFONT ( 170 , 16 ) ; Size = MAP_APPFONT ( 84 , 148 ) ; @@ -86,6 +88,7 @@ TabPage TP_FLD_DOKINF }; CheckBox CB_DOKINFFIXEDCONTENT { + HelpID = "sw:CheckBox:TP_FLD_DOKINF:CB_DOKINFFIXEDCONTENT"; Pos = MAP_APPFONT ( 170 , 170 ) ; Size = MAP_APPFONT ( 72 , 10 ) ; TabStop = TRUE ; diff --git a/sw/source/ui/fldui/flddok.cxx b/sw/source/ui/fldui/flddok.cxx index 6e80ae7184..4b1261ad45 100644 --- a/sw/source/ui/fldui/flddok.cxx +++ b/sw/source/ui/fldui/flddok.cxx @@ -83,7 +83,7 @@ SwFldDokPage::SwFldDokPage(Window* pWindow, const SfxItemSet& rCoreSet ) : aDateOffsetED.SetMin(LONG_MIN); aDateOffsetED.SetMax(LONG_MAX); //enable 'active' language selection - aNumFormatLB.SetShowLanguageControl(TRUE); + aNumFormatLB.SetShowLanguageControl(sal_True); } SwFldDokPage::~SwFldDokPage() @@ -98,11 +98,11 @@ void SwFldDokPage::Reset(const SfxItemSet& ) // TypeListBox initialisieren const SwFldGroupRgn& rRg = GetFldMgr().GetGroupRange(IsFldDlgHtmlMode(), GetGroup()); - aTypeLB.SetUpdateMode(FALSE); + aTypeLB.SetUpdateMode(sal_False); aTypeLB.Clear(); - USHORT nPos, nTypeId; - BOOL bPage = FALSE; + sal_uInt16 nPos, nTypeId; + sal_Bool bPage = sal_False; if (!IsFldEdit()) { @@ -120,7 +120,7 @@ void SwFldDokPage::Reset(const SfxItemSet& ) { nPos = aTypeLB.InsertEntry(SW_RESSTR(FMT_REF_PAGE)); aTypeLB.SetEntryData(nPos, (void*)USHRT_MAX); - bPage = TRUE; + bPage = sal_True; } break; @@ -156,7 +156,7 @@ void SwFldDokPage::Reset(const SfxItemSet& ) // alte Pos selektieren RestorePos(&aTypeLB); - aTypeLB.SetUpdateMode(TRUE); + aTypeLB.SetUpdateMode(sal_True); aTypeLB.SetDoubleClickHdl(LINK(this, SwFldDokPage, InsertHdl)); aTypeLB.SetSelectHdl(LINK(this, SwFldDokPage, TypeHdl)); aFormatLB.SetSelectHdl(LINK(this, SwFldDokPage, FormatHdl)); @@ -167,11 +167,11 @@ void SwFldDokPage::Reset(const SfxItemSet& ) if( sUserData.GetToken(0, ';').EqualsIgnoreCaseAscii(USER_DATA_VERSION_1 )) { String sVal = sUserData.GetToken(1, ';'); - USHORT nVal = static_cast< USHORT >(sVal.ToInt32()); + sal_uInt16 nVal = static_cast< sal_uInt16 >(sVal.ToInt32()); if(nVal != USHRT_MAX) { - for(USHORT i = 0; i < aTypeLB.GetEntryCount(); i++) - if(nVal == (USHORT)(ULONG)aTypeLB.GetEntryData(i)) + for(sal_uInt16 i = 0; i < aTypeLB.GetEntryCount(); i++) + if(nVal == (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(i)) { aTypeLB.SelectEntryPos(i); break; @@ -195,7 +195,7 @@ void SwFldDokPage::Reset(const SfxItemSet& ) IMPL_LINK( SwFldDokPage, TypeHdl, ListBox *, EMPTYARG ) { // Alte ListBoxPos sichern - const USHORT nOld = GetTypeSel(); + const sal_uInt16 nOld = GetTypeSel(); // Aktuelle ListBoxPos SetTypeSel(aTypeLB.GetSelectEntryPos()); @@ -206,11 +206,11 @@ IMPL_LINK( SwFldDokPage, TypeHdl, ListBox *, EMPTYARG ) aTypeLB.SelectEntryPos(0); } - USHORT nCount; + sal_uInt16 nCount; if (nOld != GetTypeSel()) { - USHORT nTypeId = (USHORT)(ULONG)aTypeLB.GetEntryData(GetTypeSel()); + sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel()); // Auswahl-Listbox fuellen aSelectionLB.Clear(); @@ -223,11 +223,11 @@ IMPL_LINK( SwFldDokPage, TypeHdl, ListBox *, EMPTYARG ) if (nTypeId != TYP_AUTHORFLD) nCount = aLst.Count(); else - nCount = GetFldMgr().GetFormatCount(nTypeId, FALSE, IsFldDlgHtmlMode()); + nCount = GetFldMgr().GetFormatCount(nTypeId, sal_False, IsFldDlgHtmlMode()); - USHORT nPos; + sal_uInt16 nPos; - for (USHORT i = 0; i < nCount; ++i) + for (sal_uInt16 i = 0; i < nCount; ++i) { if (!IsFldEdit()) { @@ -240,7 +240,7 @@ IMPL_LINK( SwFldDokPage, TypeHdl, ListBox *, EMPTYARG ) } else { - BOOL bInsert = FALSE; + sal_Bool bInsert = sal_False; switch (nTypeId) { @@ -273,7 +273,7 @@ IMPL_LINK( SwFldDokPage, TypeHdl, ListBox *, EMPTYARG ) default: if (*aLst[i] == GetCurField()->GetPar1()) - bInsert = TRUE; + bInsert = sal_True; break; } if (bInsert) @@ -291,12 +291,12 @@ IMPL_LINK( SwFldDokPage, TypeHdl, ListBox *, EMPTYARG ) AddSubType(TYP_PAGENUMBERFLD); AddSubType(TYP_PREVPAGEFLD); AddSubType(TYP_NEXTPAGEFLD); - nTypeId = (USHORT)(ULONG)aSelectionLB.GetEntryData(0); + nTypeId = (sal_uInt16)(sal_uLong)aSelectionLB.GetEntryData(0); nCount = 3; aSelectionLB.SetSelectHdl(LINK(this, SwFldDokPage, SubTypeHdl)); } - BOOL bEnable = nCount != 0; + sal_Bool bEnable = nCount != 0; if (bEnable && !aSelectionLB.GetSelectEntryCount()) aSelectionLB.SelectEntryPos(0); @@ -305,18 +305,18 @@ IMPL_LINK( SwFldDokPage, TypeHdl, ListBox *, EMPTYARG ) aSelectionFT.Enable( bEnable ); // Format-Listbox fuellen - USHORT nSize = FillFormatLB(nTypeId); + sal_uInt16 nSize = FillFormatLB(nTypeId); - BOOL bValue = FALSE, bLevel = FALSE, bNumFmt = FALSE, bOffset = FALSE; - BOOL bFormat = nSize != 0; - BOOL bOneArea = FALSE; - BOOL bFixed = FALSE; - USHORT nFmtType = 0; + sal_Bool bValue = sal_False, bLevel = sal_False, bNumFmt = sal_False, bOffset = sal_False; + sal_Bool bFormat = nSize != 0; + sal_Bool bOneArea = sal_False; + sal_Bool bFixed = sal_False; + sal_uInt16 nFmtType = 0; switch (nTypeId) { case TYP_DATEFLD: - bFormat = bNumFmt = bOneArea = bOffset = TRUE; + bFormat = bNumFmt = bOneArea = bOffset = sal_True; nFmtType = NUMBERFORMAT_DATE; aValueFT.SetText(sDateOffset); @@ -328,7 +328,7 @@ IMPL_LINK( SwFldDokPage, TypeHdl, ListBox *, EMPTYARG ) break; case TYP_TIMEFLD: - bFormat = bNumFmt = bOneArea = bOffset = TRUE; + bFormat = bNumFmt = bOneArea = bOffset = sal_True; nFmtType = NUMBERFORMAT_TIME; aValueFT.SetText(sTimeOffset); @@ -343,13 +343,13 @@ IMPL_LINK( SwFldDokPage, TypeHdl, ListBox *, EMPTYARG ) case TYP_NEXTPAGEFLD: if (IsFldEdit()) { - USHORT nTmp = (USHORT)(ULONG)aFormatLB.GetEntryData( + sal_uInt16 nTmp = (sal_uInt16)(sal_uLong)aFormatLB.GetEntryData( aFormatLB.GetSelectEntryPos() ); String sOldTxt(aValueFT.GetText()); if(SVX_NUM_CHAR_SPECIAL != nTmp) { - INT32 nOff = GetCurField()->GetPar2().ToInt32(); + sal_Int32 nOff = GetCurField()->GetPar2().ToInt32(); if( TYP_NEXTPAGEFLD == nTypeId && 1 != nOff ) aValueED.SetText( String::CreateFromInt32(nOff - 1) ); @@ -362,27 +362,27 @@ IMPL_LINK( SwFldDokPage, TypeHdl, ListBox *, EMPTYARG ) else aValueED.SetText(((SwPageNumberField*)GetCurField())->GetUserString()); } - bValue = TRUE; + bValue = sal_True; break; case TYP_CHAPTERFLD: aValueFT.SetText(SW_RESSTR(STR_LEVEL)); if (IsFldEdit()) aLevelED.SetText(String::CreateFromInt32(((SwChapterField*)GetCurField())->GetLevel() + 1)); - bLevel = TRUE; + bLevel = sal_True; break; case TYP_PAGENUMBERFLD: aValueFT.SetText( SW_RESSTR( STR_OFFSET )); if (IsFldEdit()) aValueED.SetText(GetCurField()->GetPar2()); - bValue = TRUE; + bValue = sal_True; break; case TYP_EXTUSERFLD: case TYP_AUTHORFLD: case TYP_FILENAMEFLD: - bFixed = TRUE; + bFixed = sal_True; break; default: @@ -435,7 +435,7 @@ IMPL_LINK( SwFldDokPage, TypeHdl, ListBox *, EMPTYARG ) aFixedCB.Enable(bFixed); if (IsFldEdit()) - aFixedCB.Check( static_cast< BOOL >(((GetCurField()->GetFormat() & AF_FIXED) != 0) & bFixed)); + aFixedCB.Check( static_cast< sal_Bool >(((GetCurField()->GetFormat() & AF_FIXED) != 0) & bFixed)); if (aNumFormatLB.GetSelectEntryPos() == LISTBOX_ENTRY_NOTFOUND) aNumFormatLB.SelectEntryPos(0); @@ -446,22 +446,22 @@ IMPL_LINK( SwFldDokPage, TypeHdl, ListBox *, EMPTYARG ) return 0; } -void SwFldDokPage::AddSubType(USHORT nTypeId) +void SwFldDokPage::AddSubType(sal_uInt16 nTypeId) { - USHORT nPos = aSelectionLB.InsertEntry(SwFieldType::GetTypeStr(nTypeId)); + sal_uInt16 nPos = aSelectionLB.InsertEntry(SwFieldType::GetTypeStr(nTypeId)); aSelectionLB.SetEntryData(nPos, reinterpret_cast<void*>(nTypeId)); } IMPL_LINK( SwFldDokPage, SubTypeHdl, ListBox *, EMPTYARG ) { - USHORT nPos = aSelectionLB.GetSelectEntryPos(); + sal_uInt16 nPos = aSelectionLB.GetSelectEntryPos(); if(nPos == LISTBOX_ENTRY_NOTFOUND) nPos = 0; - USHORT nTypeId = (USHORT)(ULONG)aSelectionLB.GetEntryData(nPos); + sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aSelectionLB.GetEntryData(nPos); FillFormatLB(nTypeId); - USHORT nTextRes = 0; + sal_uInt16 nTextRes = 0; switch (nTypeId) { case TYP_CHAPTERFLD: @@ -470,7 +470,7 @@ IMPL_LINK( SwFldDokPage, SubTypeHdl, ListBox *, EMPTYARG ) case TYP_PREVPAGEFLD: case TYP_NEXTPAGEFLD: - nTextRes = SVX_NUM_CHAR_SPECIAL == (USHORT)(ULONG)aFormatLB.GetEntryData( + nTextRes = SVX_NUM_CHAR_SPECIAL == (sal_uInt16)(sal_uLong)aFormatLB.GetEntryData( aFormatLB.GetSelectEntryPos() ) ? STR_VALUE : STR_OFFSET; break; @@ -486,7 +486,7 @@ IMPL_LINK( SwFldDokPage, SubTypeHdl, ListBox *, EMPTYARG ) return 0; } -USHORT SwFldDokPage::FillFormatLB(USHORT nTypeId) +sal_uInt16 SwFldDokPage::FillFormatLB(sal_uInt16 nTypeId) { // Format-Listbox fuellen aFormatLB.Clear(); @@ -494,12 +494,12 @@ USHORT SwFldDokPage::FillFormatLB(USHORT nTypeId) if (nTypeId == TYP_AUTHORFLD) return aFormatLB.GetEntryCount(); - USHORT nSize = GetFldMgr().GetFormatCount(nTypeId, FALSE, IsFldDlgHtmlMode()); + sal_uInt16 nSize = GetFldMgr().GetFormatCount(nTypeId, sal_False, IsFldDlgHtmlMode()); - for( USHORT i = 0; i < nSize; ++i ) + for( sal_uInt16 i = 0; i < nSize; ++i ) { - USHORT nPos = aFormatLB.InsertEntry(GetFldMgr().GetFormatStr(nTypeId, i)); - USHORT nFmtId = GetFldMgr().GetFormatId( nTypeId, i ); + sal_uInt16 nPos = aFormatLB.InsertEntry(GetFldMgr().GetFormatStr(nTypeId, i)); + sal_uInt16 nFmtId = GetFldMgr().GetFormatId( nTypeId, i ); aFormatLB.SetEntryData( nPos, reinterpret_cast<void*>( nFmtId )); if (IsFldEdit() && nFmtId == (GetCurField()->GetFormat() & ~AF_FIXED)) aFormatLB.SelectEntryPos( nPos ); @@ -523,21 +523,21 @@ USHORT SwFldDokPage::FillFormatLB(USHORT nTypeId) IMPL_LINK( SwFldDokPage, FormatHdl, ListBox *, EMPTYARG ) { - USHORT nTypeId = (USHORT)(ULONG)aTypeLB.GetEntryData(GetTypeSel()); + sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel()); if (nTypeId == USHRT_MAX) { - USHORT nPos = aSelectionLB.GetSelectEntryPos(); + sal_uInt16 nPos = aSelectionLB.GetSelectEntryPos(); if(nPos == LISTBOX_ENTRY_NOTFOUND) nPos = 0; - nTypeId = (USHORT)(ULONG)aSelectionLB.GetEntryData(nPos); + nTypeId = (sal_uInt16)(sal_uLong)aSelectionLB.GetEntryData(nPos); } if (nTypeId == TYP_NEXTPAGEFLD || nTypeId == TYP_PREVPAGEFLD) { // Prev/Next - PageNumFelder Sonderbehandlung: - USHORT nTmp = (USHORT)(ULONG)aFormatLB.GetEntryData( + sal_uInt16 nTmp = (sal_uInt16)(sal_uLong)aFormatLB.GetEntryData( aFormatLB.GetSelectEntryPos() ); String sOldTxt( aValueFT.GetText() ); String sNewTxt( SW_RES( SVX_NUM_CHAR_SPECIAL == nTmp ? STR_VALUE @@ -553,34 +553,34 @@ IMPL_LINK( SwFldDokPage, FormatHdl, ListBox *, EMPTYARG ) return 0; } -BOOL SwFldDokPage::FillItemSet(SfxItemSet& ) +sal_Bool SwFldDokPage::FillItemSet(SfxItemSet& ) { - USHORT nTypeId = (USHORT)(ULONG)aTypeLB.GetEntryData(GetTypeSel()); + sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel()); if (nTypeId == USHRT_MAX) { - USHORT nPos = aSelectionLB.GetSelectEntryPos(); + sal_uInt16 nPos = aSelectionLB.GetSelectEntryPos(); if(nPos == LISTBOX_ENTRY_NOTFOUND) nPos = 0; - nTypeId = (USHORT)(ULONG)aSelectionLB.GetEntryData(nPos); + nTypeId = (sal_uInt16)(sal_uLong)aSelectionLB.GetEntryData(nPos); } String aVal(aValueED.GetText()); - ULONG nFormat = 0; - USHORT nSubType = 0; + sal_uLong nFormat = 0; + sal_uInt16 nSubType = 0; if (aFormatLB.IsEnabled()) { - USHORT nPos = aFormatLB.GetSelectEntryPos(); + sal_uInt16 nPos = aFormatLB.GetSelectEntryPos(); if(nPos != LISTBOX_ENTRY_NOTFOUND) - nFormat = (USHORT)(ULONG)aFormatLB.GetEntryData(nPos); + nFormat = (sal_uInt16)(sal_uLong)aFormatLB.GetEntryData(nPos); } if (aSelectionLB.IsEnabled()) { - USHORT nPos = aSelectionLB.GetSelectEntryPos(); + sal_uInt16 nPos = aSelectionLB.GetSelectEntryPos(); if(nPos != LISTBOX_ENTRY_NOTFOUND) - nSubType = (USHORT)(ULONG)aSelectionLB.GetEntryData(nPos); + nSubType = (sal_uInt16)(sal_uLong)aSelectionLB.GetEntryData(nPos); } switch (nTypeId) @@ -617,7 +617,7 @@ BOOL SwFldDokPage::FillItemSet(SfxItemSet& ) if( SVX_NUM_CHAR_SPECIAL != nFormat && (TYP_PREVPAGEFLD == nTypeId || TYP_NEXTPAGEFLD == nTypeId)) { - INT32 nVal = aValueED.GetText().ToInt32(); + sal_Int32 nVal = aValueED.GetText().ToInt32(); aVal = String::CreateFromInt32(nVal); } break; @@ -642,7 +642,7 @@ BOOL SwFldDokPage::FillItemSet(SfxItemSet& ) InsertFld( nTypeId, nSubType, aEmptyStr, aVal, nFormat, ' ', aNumFormatLB.IsAutomaticLanguage() ); } - return FALSE; + return sal_False; } SfxTabPage* SwFldDokPage::Create( Window* pParent, @@ -651,7 +651,7 @@ SfxTabPage* SwFldDokPage::Create( Window* pParent, return ( new SwFldDokPage( pParent, rAttrSet ) ); } -USHORT SwFldDokPage::GetGroup() +sal_uInt16 SwFldDokPage::GetGroup() { return GRP_DOC; } @@ -661,11 +661,11 @@ void SwFldDokPage::FillUserData() String sData( String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( USER_DATA_VERSION ))); sData += ';'; - USHORT nTypeSel = aTypeLB.GetSelectEntryPos(); + sal_uInt16 nTypeSel = aTypeLB.GetSelectEntryPos(); if( LISTBOX_ENTRY_NOTFOUND == nTypeSel ) nTypeSel = USHRT_MAX; else - nTypeSel = sal::static_int_cast< USHORT >(reinterpret_cast< sal_uIntPtr >(aTypeLB.GetEntryData( nTypeSel ))); + nTypeSel = sal::static_int_cast< sal_uInt16 >(reinterpret_cast< sal_uIntPtr >(aTypeLB.GetEntryData( nTypeSel ))); sData += String::CreateFromInt32( nTypeSel ); SetUserData(sData); } diff --git a/sw/source/ui/fldui/flddok.hxx b/sw/source/ui/fldui/flddok.hxx index 9c87780c66..51c24c49bd 100644 --- a/sw/source/ui/fldui/flddok.hxx +++ b/sw/source/ui/fldui/flddok.hxx @@ -59,18 +59,18 @@ class SwFldDokPage : public SwFldPage Bitmap aRootOpened; Bitmap aRootClosed; - USHORT nOldSel; - ULONG nOldFormat; + sal_uInt16 nOldSel; + sal_uLong nOldFormat; DECL_LINK( TypeHdl, ListBox* pLB = 0 ); DECL_LINK( FormatHdl, ListBox* pLB = 0 ); DECL_LINK( SubTypeHdl, ListBox* pLB = 0 ); - void AddSubType(USHORT nTypeId); - USHORT FillFormatLB(USHORT nTypeId); + void AddSubType(sal_uInt16 nTypeId); + sal_uInt16 FillFormatLB(sal_uInt16 nTypeId); protected: - virtual USHORT GetGroup(); + virtual sal_uInt16 GetGroup(); public: SwFldDokPage(Window* pWindow, const SfxItemSet& rSet); @@ -79,7 +79,7 @@ public: static SfxTabPage* Create(Window* pParent, const SfxItemSet& rAttrSet); - virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual sal_Bool FillItemSet( SfxItemSet& rSet ); virtual void Reset( const SfxItemSet& rSet ); virtual void FillUserData(); diff --git a/sw/source/ui/fldui/flddok.src b/sw/source/ui/fldui/flddok.src index 6a60f8b53f..4723a55425 100644 --- a/sw/source/ui/fldui/flddok.src +++ b/sw/source/ui/fldui/flddok.src @@ -43,6 +43,7 @@ TabPage TP_FLD_DOK }; ListBox LB_DOKTYPE { + HelpID = "sw:ListBox:TP_FLD_DOK:LB_DOKTYPE"; Border = TRUE ; Pos = MAP_APPFONT ( 6 , 14 ) ; Size = MAP_APPFONT ( 76 , 165 ) ; @@ -59,6 +60,7 @@ TabPage TP_FLD_DOK }; ListBox LB_DOKSELECTION { + HelpID = "sw:ListBox:TP_FLD_DOK:LB_DOKSELECTION"; Border = TRUE ; Pos = MAP_APPFONT ( 88 , 15 ) ; Size = MAP_APPFONT ( 76 , 165 ) ; @@ -73,6 +75,7 @@ TabPage TP_FLD_DOK }; ListBox LB_DOKFORMAT { + HelpID = "sw:ListBox:TP_FLD_DOK:LB_DOKFORMAT"; Border = TRUE ; Pos = MAP_APPFONT ( 170 , 14 ) ; Size = MAP_APPFONT ( 84 , 151 ) ; @@ -83,6 +86,7 @@ TabPage TP_FLD_DOK }; ListBox LB_DOKNUMFORMAT { + HelpID = "sw:ListBox:TP_FLD_DOK:LB_DOKNUMFORMAT"; Border = TRUE ; Pos = MAP_APPFONT ( 170 , 14 ) ; Size = MAP_APPFONT ( 84 , 151 ) ; @@ -100,6 +104,7 @@ TabPage TP_FLD_DOK }; Edit ED_DOKVALUE { + HelpID = "sw:Edit:TP_FLD_DOK:ED_DOKVALUE"; Border = TRUE ; Pos = MAP_APPFONT ( 170 , 167 ) ; Size = MAP_APPFONT ( 84 , 12 ) ; @@ -109,6 +114,7 @@ TabPage TP_FLD_DOK }; NumericField ED_DOKLEVEL { + HelpID = "sw:NumericField:TP_FLD_DOK:ED_DOKLEVEL"; Border = TRUE ; Pos = MAP_APPFONT ( 170 , 167 ) ; Size = MAP_APPFONT ( 84 , 12 ) ; @@ -125,6 +131,7 @@ TabPage TP_FLD_DOK }; NumericField ED_DOKDATEOFF { + HelpID = "sw:NumericField:TP_FLD_DOK:ED_DOKDATEOFF"; Border = TRUE ; Pos = MAP_APPFONT ( 170 , 167 ) ; Size = MAP_APPFONT ( 84 , 12 ) ; @@ -138,6 +145,7 @@ TabPage TP_FLD_DOK }; CheckBox CB_DOKFIXEDCONTENT { + HelpID = "sw:CheckBox:TP_FLD_DOK:CB_DOKFIXEDCONTENT"; Pos = MAP_APPFONT ( 170 , 170 ) ; Size = MAP_APPFONT ( 72 , 10 ) ; TabStop = TRUE ; diff --git a/sw/source/ui/fldui/fldedt.cxx b/sw/source/ui/fldui/fldedt.cxx index 2b96b72c86..a348226d54 100644 --- a/sw/source/ui/fldui/fldedt.cxx +++ b/sw/source/ui/fldui/fldedt.cxx @@ -84,11 +84,11 @@ SwFldEditDlg::SwFldEditDlg(SwView& rVw) : /* #108536# Only create selection if there is none already. Normalize PaM instead of swapping. */ if ( ! pSh->HasSelection() ) - pSh->Right(CRSR_SKIP_CHARS, TRUE, 1, FALSE ); + pSh->Right(CRSR_SKIP_CHARS, sal_True, 1, sal_False ); pSh->NormalizePam(); - USHORT nGroup = aMgr.GetGroup(FALSE, pCurFld->GetTypeId(), pCurFld->GetSubType()); + sal_uInt16 nGroup = aMgr.GetGroup(sal_False, pCurFld->GetTypeId(), pCurFld->GetSubType()); CreatePage(nGroup); @@ -98,7 +98,7 @@ SwFldEditDlg::SwFldEditDlg(SwView& rVw) : // Fontgroessen im Wald stehen, und da PB im SingleTabDlg feste Pixelgroessen // fuer seine Buttons und die Dialogbreite verwendet. aPrevBT.SetPosPixel(Point(GetOKButton()->GetPosPixel().X(), aPrevBT.GetPosPixel().Y())); - USHORT nWidth = static_cast< USHORT >(GetOKButton()->GetOutputSize().Width() / 2 - 3); + sal_uInt16 nWidth = static_cast< sal_uInt16 >(GetOKButton()->GetOutputSize().Width() / 2 - 3); Size aNewSize(LogicToPixel(Size(nWidth, GetOKButton()->GetOutputSize().Height()))); aPrevBT.SetSizePixel(aNewSize); @@ -140,7 +140,7 @@ void SwFldEditDlg::Init() pSh->StartAction(); pSh->CreateCrsr(); - BOOL bMove = rMgr.GoNext(); + sal_Bool bMove = rMgr.GoNext(); if( bMove ) rMgr.GoPrev(); aNextBT.Enable(bMove); @@ -160,25 +160,25 @@ void SwFldEditDlg::Init() !pSh->HasReadonlySel() ); } -SfxTabPage* SwFldEditDlg::CreatePage(USHORT nGroup) +SfxTabPage* SwFldEditDlg::CreatePage(sal_uInt16 nGroup) { // TabPage erzeugen SfxTabPage* pTabPage = 0; - USHORT nHelpId = 0; + const char* pHelpId = 0; switch (nGroup) { case GRP_DOC: pTabPage = SwFldDokPage::Create(this, *(SfxItemSet*)0); - nHelpId = HID_EDIT_FLD_DOK; + pHelpId = HID_EDIT_FLD_DOK; break; case GRP_FKT: pTabPage = SwFldFuncPage::Create(this, *(SfxItemSet*)0); - nHelpId = HID_EDIT_FLD_FUNC; + pHelpId = HID_EDIT_FLD_FUNC; break; case GRP_REF: pTabPage = SwFldRefPage::Create(this, *(SfxItemSet*)0); - nHelpId = HID_EDIT_FLD_REF; + pHelpId = HID_EDIT_FLD_REF; break; case GRP_REG: { @@ -194,21 +194,22 @@ SfxTabPage* SwFldEditDlg::CreatePage(USHORT nGroup) uno::UNO_QUERY_THROW); pSet->Put( SfxUnoAnyItem( SID_DOCINFO, uno::makeAny(xUDProps) ) ); pTabPage = SwFldDokInfPage::Create(this, *pSet); - nHelpId = HID_EDIT_FLD_DOKINF; + pHelpId = HID_EDIT_FLD_DOKINF; break; } case GRP_DB: pTabPage = SwFldDBPage::Create(this, *(SfxItemSet*)0); static_cast<SwFldDBPage*>(pTabPage)->SetWrtShell(*pSh); - nHelpId = HID_EDIT_FLD_DB; + pHelpId = HID_EDIT_FLD_DB; break; case GRP_VAR: pTabPage = SwFldVarPage::Create(this, *(SfxItemSet*)0); - nHelpId = HID_EDIT_FLD_VAR; + pHelpId = HID_EDIT_FLD_VAR; break; } - pTabPage->SetHelpId(nHelpId); + + pTabPage->SetHelpId(pHelpId); static_cast<SwFldPage*>(pTabPage)->SetWrtShell(pSh); SetTabPage(pTabPage); @@ -227,10 +228,10 @@ SwFldEditDlg::~SwFldEditDlg() pSh->EnterStdMode(); } -void SwFldEditDlg::EnableInsert(BOOL bEnable) +void SwFldEditDlg::EnableInsert(sal_Bool bEnable) { if( bEnable && pSh->IsReadOnlyAvailable() && pSh->HasReadonlySel() ) - bEnable = FALSE; + bEnable = sal_False; GetOKButton()->Enable( bEnable ); } @@ -269,7 +270,7 @@ short SwFldEditDlg::Execute() --------------------------------------------------------------------*/ IMPL_LINK( SwFldEditDlg, NextPrevHdl, Button *, pButton ) { - BOOL bNext = pButton == &aNextBT; + sal_Bool bNext = pButton == &aNextBT; pSh->EnterStdMode(); @@ -292,11 +293,11 @@ IMPL_LINK( SwFldEditDlg, NextPrevHdl, Button *, pButton ) /* #108536# Only create selection if there is none already. Normalize PaM instead of swapping. */ if ( ! pSh->HasSelection() ) - pSh->Right(CRSR_SKIP_CHARS, TRUE, 1, FALSE ); + pSh->Right(CRSR_SKIP_CHARS, sal_True, 1, sal_False ); pSh->NormalizePam(); - USHORT nGroup = rMgr.GetGroup(FALSE, pCurFld->GetTypeId(), pCurFld->GetSubType()); + sal_uInt16 nGroup = rMgr.GetGroup(sal_False, pCurFld->GetTypeId(), pCurFld->GetSubType()); if (nGroup != pTabPage->GetGroup()) pTabPage = (SwFldPage*)CreatePage(nGroup); @@ -318,7 +319,7 @@ IMPL_LINK( SwFldEditDlg, AddressHdl, PushButton *, EMPTYARG ) SID_FIELD_GRABFOCUS, SID_FIELD_GRABFOCUS, 0L ); - USHORT nEditPos = UNKNOWN_EDIT; + sal_uInt16 nEditPos = UNKNOWN_EDIT; switch(pCurFld->GetSubType()) { diff --git a/sw/source/ui/fldui/fldfunc.cxx b/sw/source/ui/fldui/fldfunc.cxx index 1eef3d0b66..6b830c3317 100644 --- a/sw/source/ui/fldui/fldfunc.cxx +++ b/sw/source/ui/fldui/fldfunc.cxx @@ -95,8 +95,8 @@ SwFldFuncPage::SwFldFuncPage(Window* pParent, const SfxItemSet& rCoreSet ) : sOldValueFT = aValueFT.GetText(); sOldNameFT = aNameFT.GetText(); - aCond1ED.ShowBrackets(FALSE); - aCond2ED.ShowBrackets(FALSE); + aCond1ED.ShowBrackets(sal_False); + aCond2ED.ShowBrackets(sal_False); } @@ -109,10 +109,10 @@ void SwFldFuncPage::Reset(const SfxItemSet& ) SavePos(&aTypeLB); Init(); // Allgemeine initialisierung - aTypeLB.SetUpdateMode(FALSE); + aTypeLB.SetUpdateMode(sal_False); aTypeLB.Clear(); - USHORT nPos, nTypeId; + sal_uInt16 nPos, nTypeId; if (!IsFldEdit()) { @@ -165,11 +165,11 @@ void SwFldFuncPage::Reset(const SfxItemSet& ) if(sUserData.GetToken(0, ';').EqualsIgnoreCaseAscii(USER_DATA_VERSION_1)) { String sVal = sUserData.GetToken(1, ';'); - USHORT nVal = static_cast< USHORT >(sVal.ToInt32()); + sal_uInt16 nVal = static_cast< sal_uInt16 >(sVal.ToInt32()); if(nVal != USHRT_MAX) { - for(USHORT i = 0; i < aTypeLB.GetEntryCount(); i++) - if(nVal == (USHORT)(ULONG)aTypeLB.GetEntryData(i)) + for(sal_uInt16 i = 0; i < aTypeLB.GetEntryCount(); i++) + if(nVal == (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(i)) { aTypeLB.SelectEntryPos(i); break; @@ -179,7 +179,7 @@ void SwFldFuncPage::Reset(const SfxItemSet& ) } TypeHdl(0); - aTypeLB.SetUpdateMode(TRUE); + aTypeLB.SetUpdateMode(sal_True); if (IsFldEdit()) { @@ -194,7 +194,7 @@ void SwFldFuncPage::Reset(const SfxItemSet& ) IMPL_LINK( SwFldFuncPage, TypeHdl, ListBox *, EMPTYARG ) { // Alte ListBoxPos sichern - const USHORT nOld = GetTypeSel(); + const sal_uInt16 nOld = GetTypeSel(); // Aktuelle ListBoxPos SetTypeSel(aTypeLB.GetSelectEntryPos()); @@ -207,7 +207,7 @@ IMPL_LINK( SwFldFuncPage, TypeHdl, ListBox *, EMPTYARG ) if (nOld != GetTypeSel()) { - USHORT nTypeId = (USHORT)(ULONG)aTypeLB.GetEntryData(GetTypeSel()); + sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel()); // Auswahl-Listbox fuellen UpdateSubType(); @@ -215,30 +215,30 @@ IMPL_LINK( SwFldFuncPage, TypeHdl, ListBox *, EMPTYARG ) // Format-Listbox fuellen aFormatLB.Clear(); - USHORT nSize = GetFldMgr().GetFormatCount(nTypeId, FALSE, IsFldDlgHtmlMode()); + sal_uInt16 nSize = GetFldMgr().GetFormatCount(nTypeId, sal_False, IsFldDlgHtmlMode()); - for (USHORT i = 0; i < nSize; i++) + for (sal_uInt16 i = 0; i < nSize; i++) { - USHORT nPos = aFormatLB.InsertEntry(GetFldMgr().GetFormatStr(nTypeId, i)); + sal_uInt16 nPos = aFormatLB.InsertEntry(GetFldMgr().GetFormatStr(nTypeId, i)); aFormatLB.SetEntryData( nPos, reinterpret_cast<void*>(GetFldMgr().GetFormatId( nTypeId, i )) ); } if (nSize) { if (IsFldEdit() && nTypeId == TYP_JUMPEDITFLD) - aFormatLB.SelectEntry(SW_RESSTR(FMT_MARK_BEGIN + (USHORT)GetCurField()->GetFormat())); + aFormatLB.SelectEntry(SW_RESSTR(FMT_MARK_BEGIN + (sal_uInt16)GetCurField()->GetFormat())); if (!aFormatLB.GetSelectEntryCount()) aFormatLB.SelectEntryPos(0); } - BOOL bValue = FALSE, bName = FALSE, bMacro = FALSE, bInsert = TRUE; - BOOL bShowSelection = FALSE; - BOOL bFormat = nSize != 0; + sal_Bool bValue = sal_False, bName = sal_False, bMacro = sal_False, bInsert = sal_True; + sal_Bool bShowSelection = sal_False; + sal_Bool bFormat = nSize != 0; // fuer Conditional Text zwei Controls - BOOL bDropDown = TYP_DROPDOWN == nTypeId; - BOOL bCondTxtFld = TYP_CONDTXTFLD == nTypeId; + sal_Bool bDropDown = TYP_DROPDOWN == nTypeId; + sal_Bool bCondTxtFld = TYP_CONDTXTFLD == nTypeId; aCond1FT.Show(!bDropDown && bCondTxtFld); aCond1ED.Show(!bDropDown && bCondTxtFld); @@ -261,7 +261,7 @@ IMPL_LINK( SwFldFuncPage, TypeHdl, ListBox *, EMPTYARG ) aListNameFT.Show(bDropDown); aListNameED.Show(bDropDown); - aNameED.SetDropEnable(FALSE); + aNameED.SetDropEnable(sal_False); if (IsFldEdit()) { @@ -300,67 +300,81 @@ IMPL_LINK( SwFldFuncPage, TypeHdl, ListBox *, EMPTYARG ) switch (nTypeId) { case TYP_MACROFLD: - bMacro = TRUE; + bMacro = sal_True; if (GetFldMgr().GetMacroPath().Len()) - bValue = TRUE; + bValue = sal_True; else - bInsert = FALSE; + bInsert = sal_False; aNameFT.SetText(SW_RESSTR(STR_MACNAME)); aValueFT.SetText(SW_RESSTR(STR_PROMPT)); aNameED.SetText(GetFldMgr().GetMacroName()); + aNameED.SetAccessibleName(aNameFT.GetText()); + aValueED.SetAccessibleName(aValueFT.GetText()); break; case TYP_HIDDENPARAFLD: aNameFT.SetText(SW_RESSTR(STR_COND)); - aNameED.SetDropEnable(TRUE); - bName = TRUE; + aNameED.SetDropEnable(sal_True); + bName = sal_True; + aNameED.SetAccessibleName(aNameFT.GetText()); + aValueED.SetAccessibleName(aValueFT.GetText()); break; case TYP_HIDDENTXTFLD: { aNameFT.SetText(SW_RESSTR(STR_COND)); - aNameED.SetDropEnable(TRUE); + aNameED.SetDropEnable(sal_True); aValueFT.SetText(SW_RESSTR(STR_INSTEXT)); SwWrtShell* pSh = GetActiveWrtShell(); if (!IsFldEdit() && pSh ) aValueED.SetText(pSh->GetSelTxt()); - bName = bValue = TRUE; + bName = bValue = sal_True; + aNameED.SetAccessibleName(aNameFT.GetText()); + aValueED.SetAccessibleName(aValueFT.GetText()); } break; case TYP_CONDTXTFLD: aNameFT.SetText(SW_RESSTR(STR_COND)); - aNameED.SetDropEnable(TRUE); + aNameED.SetDropEnable(sal_True); if (IsFldEdit()) { aCond1ED.SetText(GetCurField()->GetPar2().GetToken(0, '|')); aCond2ED.SetText(GetCurField()->GetPar2().GetToken(1, '|')); } - bName = bValue = TRUE; + bName = bValue = sal_True; + aNameED.SetAccessibleName(aNameFT.GetText()); + aValueED.SetAccessibleName(aValueFT.GetText()); break; case TYP_JUMPEDITFLD: aNameFT.SetText(SW_RESSTR(STR_JUMPEDITFLD)); aValueFT.SetText(SW_RESSTR(STR_PROMPT)); - bName = bValue = TRUE; + bName = bValue = sal_True; + aNameED.SetAccessibleName(aNameFT.GetText()); + aValueED.SetAccessibleName(aValueFT.GetText()); break; case TYP_INPUTFLD: aValueFT.SetText(SW_RESSTR(STR_PROMPT)); - bValue = TRUE; + bValue = sal_True; + aNameED.SetAccessibleName(aNameFT.GetText()); + aValueED.SetAccessibleName(aValueFT.GetText()); break; case TYP_COMBINED_CHARS: { aNameFT.SetText(SW_RESSTR(STR_COMBCHRS_FT)); - aNameED.SetDropEnable(TRUE); - bName = TRUE; + aNameED.SetDropEnable(sal_True); + bName = sal_True; - const USHORT nLen = aNameED.GetText().Len(); + const sal_uInt16 nLen = aNameED.GetText().Len(); if( !nLen || nLen > MAX_COMBINED_CHARACTERS ) - bInsert = FALSE; + bInsert = sal_False; + aNameED.SetAccessibleName(aNameFT.GetText()); + aValueED.SetAccessibleName(aValueFT.GetText()); } break; case TYP_DROPDOWN : @@ -400,7 +414,7 @@ IMPL_LINK( SwFldFuncPage, TypeHdl, ListBox *, EMPTYARG ) IMPL_LINK( SwFldFuncPage, SelectHdl, ListBox *, EMPTYARG ) { - USHORT nTypeId = (USHORT)(ULONG)aTypeLB.GetEntryData(GetTypeSel()); + sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel()); if( TYP_MACROFLD == nTypeId ) aNameED.SetText( aSelectionLB.GetSelectEntry() ); @@ -418,7 +432,7 @@ IMPL_LINK( SwFldFuncPage, InsertMacroHdl, ListBox *, EMPTYARG ) IMPL_LINK( SwFldFuncPage, ListModifyHdl, Control*, pControl) { - aListItemsLB.SetUpdateMode(FALSE); + aListItemsLB.SetUpdateMode(sal_False); if(pControl == &aListAddPB || (pControl == &aListItemED && aListAddPB.IsEnabled())) { @@ -428,7 +442,7 @@ IMPL_LINK( SwFldFuncPage, ListModifyHdl, Control*, pControl) } else if(aListItemsLB.GetSelectEntryCount()) { - USHORT nSelPos = aListItemsLB.GetSelectEntryPos(); + sal_uInt16 nSelPos = aListItemsLB.GetSelectEntryPos(); if(pControl == &aListRemovePB) { aListItemsLB.RemoveEntry(nSelPos); @@ -458,7 +472,7 @@ IMPL_LINK( SwFldFuncPage, ListModifyHdl, Control*, pControl) } } bDropDownLBChanged = true; - aListItemsLB.SetUpdateMode(TRUE); + aListItemsLB.SetUpdateMode(sal_True); ListEnableHdl(0); return 0; } @@ -468,7 +482,7 @@ IMPL_LINK( SwFldFuncPage, ListEnableHdl, void*, EMPTYARG) //enable "Add" button when text is in the Edit that's not already member of the box aListAddPB.Enable(aListItemED.GetText().Len() && LISTBOX_ENTRY_NOTFOUND == aListItemsLB.GetEntryPos(aListItemED.GetText())); - BOOL bEnableButtons = aListItemsLB.GetSelectEntryCount() > 0; + sal_Bool bEnableButtons = aListItemsLB.GetSelectEntryCount() > 0; aListRemovePB.Enable(bEnableButtons); aListUpPB.Enable(bEnableButtons && (aListItemsLB.GetSelectEntryPos() > 0)); aListDownPB.Enable(bEnableButtons && @@ -482,23 +496,23 @@ IMPL_LINK( SwFldFuncPage, ListEnableHdl, void*, EMPTYARG) --------------------------------------------------------------------*/ void SwFldFuncPage::UpdateSubType() { - USHORT nTypeId = (USHORT)(ULONG)aTypeLB.GetEntryData(GetTypeSel()); + sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel()); // Auswahl-Listbox fuellen - aSelectionLB.SetUpdateMode(FALSE); + aSelectionLB.SetUpdateMode(sal_False); aSelectionLB.Clear(); SvStringsDtor aLst; GetFldMgr().GetSubTypes(nTypeId, aLst); - USHORT nCount = aLst.Count(); + sal_uInt16 nCount = aLst.Count(); - for (USHORT i = 0; i < nCount; ++i) + for (sal_uInt16 i = 0; i < nCount; ++i) { - USHORT nPos = aSelectionLB.InsertEntry(*aLst[i]); + sal_uInt16 nPos = aSelectionLB.InsertEntry(*aLst[i]); aSelectionLB.SetEntryData(nPos, reinterpret_cast<void*>(i)); } - BOOL bEnable = nCount != 0; + sal_Bool bEnable = nCount != 0; aSelectionLB.Enable( bEnable ); aSelectionFT.Enable( bEnable ); @@ -510,7 +524,7 @@ void SwFldFuncPage::UpdateSubType() if (nTypeId == TYP_MACROFLD) { - BOOL bHasMacro = GetFldMgr().GetMacroPath().Len() != 0; + sal_Bool bHasMacro = GetFldMgr().GetMacroPath().Len() != 0; if (bHasMacro) { @@ -521,7 +535,7 @@ void SwFldFuncPage::UpdateSubType() EnableInsert(bHasMacro); } - aSelectionLB.SetUpdateMode(TRUE); + aSelectionLB.SetUpdateMode(sal_True); } /*-------------------------------------------------------------------- @@ -543,18 +557,18 @@ IMPL_LINK( SwFldFuncPage, MacroHdl, Button *, pBtn ) return 0; } -BOOL SwFldFuncPage::FillItemSet(SfxItemSet& ) +sal_Bool SwFldFuncPage::FillItemSet(SfxItemSet& ) { - USHORT nTypeId = (USHORT)(ULONG)aTypeLB.GetEntryData(GetTypeSel()); + sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel()); - USHORT nSubType = 0; + sal_uInt16 nSubType = 0; - ULONG nFormat = aFormatLB.GetSelectEntryPos(); + sal_uLong nFormat = aFormatLB.GetSelectEntryPos(); if(nFormat == LISTBOX_ENTRY_NOTFOUND) nFormat = 0; else - nFormat = (ULONG)aFormatLB.GetEntryData((USHORT)nFormat); + nFormat = (sal_uLong)aFormatLB.GetEntryData((sal_uInt16)nFormat); String aVal(aValueED.GetText()); String aName(aNameED.GetText()); @@ -582,7 +596,7 @@ BOOL SwFldFuncPage::FillItemSet(SfxItemSet& ) case TYP_DROPDOWN : { aName = aListNameED.GetText(); - for(USHORT i = 0; i < aListItemsLB.GetEntryCount(); i++) + for(sal_uInt16 i = 0; i < aListItemsLB.GetEntryCount(); i++) { if(i) aVal += DB_DELIM; @@ -608,7 +622,7 @@ BOOL SwFldFuncPage::FillItemSet(SfxItemSet& ) ModifyHdl(); // Insert ggf enablen/disablen - return FALSE; + return sal_False; } String SwFldFuncPage::TurnMacroString(const String &rMacro) @@ -617,9 +631,9 @@ String SwFldFuncPage::TurnMacroString(const String &rMacro) { // Inhalt von aName umdrehen String sTmp, sBuf; - USHORT nPos = 0; + sal_uInt16 nPos = 0; - for (USHORT i = 0; i < 4 && nPos != STRING_NOTFOUND; i++) + for (sal_uInt16 i = 0; i < 4 && nPos != STRING_NOTFOUND; i++) { if (i == 3) sTmp = rMacro.Copy(nPos); @@ -642,7 +656,7 @@ SfxTabPage* SwFldFuncPage::Create( Window* pParent, return ( new SwFldFuncPage( pParent, rAttrSet ) ); } -USHORT SwFldFuncPage::GetGroup() +sal_uInt16 SwFldFuncPage::GetGroup() { return GRP_FKT; } @@ -652,11 +666,11 @@ void SwFldFuncPage::FillUserData() String sData( String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( USER_DATA_VERSION ))); sData += ';'; - USHORT nTypeSel = aTypeLB.GetSelectEntryPos(); + sal_uInt16 nTypeSel = aTypeLB.GetSelectEntryPos(); if( LISTBOX_ENTRY_NOTFOUND == nTypeSel ) nTypeSel = USHRT_MAX; else - nTypeSel = sal::static_int_cast< USHORT >(reinterpret_cast< sal_uIntPtr >(aTypeLB.GetEntryData( nTypeSel ))); + nTypeSel = sal::static_int_cast< sal_uInt16 >(reinterpret_cast< sal_uIntPtr >(aTypeLB.GetEntryData( nTypeSel ))); sData += String::CreateFromInt32( nTypeSel ); SetUserData(sData); } @@ -664,14 +678,14 @@ void SwFldFuncPage::FillUserData() IMPL_LINK( SwFldFuncPage, ModifyHdl, Edit *, EMPTYARG ) { String aName(aNameED.GetText()); - const USHORT nLen = aName.Len(); + const sal_uInt16 nLen = aName.Len(); - BOOL bEnable = TRUE; - USHORT nTypeId = (USHORT)(ULONG)aTypeLB.GetEntryData(GetTypeSel()); + sal_Bool bEnable = sal_True; + sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel()); if( TYP_COMBINED_CHARS == nTypeId && (!nLen || nLen > MAX_COMBINED_CHARACTERS )) - bEnable = FALSE; + bEnable = sal_False; EnableInsert( bEnable ); diff --git a/sw/source/ui/fldui/fldfunc.hxx b/sw/source/ui/fldui/fldfunc.hxx index 3ad41fb093..1f21f55f9f 100644 --- a/sw/source/ui/fldui/fldfunc.hxx +++ b/sw/source/ui/fldui/fldfunc.hxx @@ -72,7 +72,7 @@ class SwFldFuncPage : public SwFldPage String sOldValueFT; String sOldNameFT; - ULONG nOldFormat; + sal_uLong nOldFormat; bool bDropDownLBChanged; DECL_LINK( TypeHdl, ListBox* pLB = 0 ); @@ -89,7 +89,7 @@ class SwFldFuncPage : public SwFldPage String TurnMacroString(const String &rMacro); protected: - virtual USHORT GetGroup(); + virtual sal_uInt16 GetGroup(); public: SwFldFuncPage(Window* pParent, const SfxItemSet& rSet); @@ -98,7 +98,7 @@ public: static SfxTabPage* Create(Window* pParent, const SfxItemSet& rAttrSet); - virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual sal_Bool FillItemSet( SfxItemSet& rSet ); virtual void Reset( const SfxItemSet& rSet ); virtual void FillUserData(); diff --git a/sw/source/ui/fldui/fldfunc.src b/sw/source/ui/fldui/fldfunc.src index ca67c448fb..aa5e42b078 100644 --- a/sw/source/ui/fldui/fldfunc.src +++ b/sw/source/ui/fldui/fldfunc.src @@ -43,6 +43,7 @@ TabPage TP_FLD_FUNC }; ListBox LB_FUNCTYPE { + HelpID = "sw:ListBox:TP_FLD_FUNC:LB_FUNCTYPE"; Border = TRUE ; Pos = MAP_APPFONT ( 6 , 14 ) ; Size = MAP_APPFONT ( 76 , 165 ) ; @@ -60,6 +61,7 @@ TabPage TP_FLD_FUNC }; ListBox LB_FUNCSELECTION { + HelpID = "sw:ListBox:TP_FLD_FUNC:LB_FUNCSELECTION"; Border = TRUE ; Pos = MAP_APPFONT ( 88 , 14 ) ; Size = MAP_APPFONT ( 76 , 165 ) ; @@ -77,6 +79,7 @@ TabPage TP_FLD_FUNC }; ListBox LB_FUNCFORMAT { + HelpID = "sw:ListBox:TP_FLD_FUNC:LB_FUNCFORMAT"; Border = TRUE ; Pos = MAP_APPFONT ( 88 , 14 ) ; Size = MAP_APPFONT ( 76 , 165 ) ; @@ -91,6 +94,7 @@ TabPage TP_FLD_FUNC }; Edit ED_FUNCNAME { + HelpID = "sw:Edit:TP_FLD_FUNC:ED_FUNCNAME"; Border = TRUE ; Pos = MAP_APPFONT ( 170 , 14 ) ; Size = MAP_APPFONT ( 84 , 12 ) ; @@ -106,6 +110,7 @@ TabPage TP_FLD_FUNC }; Edit ED_FUNCVALUE { + HelpID = "sw:Edit:TP_FLD_FUNC:ED_FUNCVALUE"; Border = TRUE ; Pos = MAP_APPFONT ( 170 , 41 ) ; Size = MAP_APPFONT ( 84 , 12 ) ; @@ -122,6 +127,7 @@ TabPage TP_FLD_FUNC }; Edit ED_FUNCCOND1 { + HelpID = "sw:Edit:TP_FLD_FUNC:ED_FUNCCOND1"; Border = TRUE ; Pos = MAP_APPFONT ( 170 , 41 ) ; Size = MAP_APPFONT ( 84 , 12 ) ; @@ -139,6 +145,7 @@ TabPage TP_FLD_FUNC }; Edit ED_FUNCCOND2 { + HelpID = "sw:Edit:TP_FLD_FUNC:ED_FUNCCOND2"; Border = TRUE ; Pos = MAP_APPFONT ( 170 , 68 ) ; Size = MAP_APPFONT ( 84 , 12 ) ; @@ -148,6 +155,7 @@ TabPage TP_FLD_FUNC }; PushButton BT_FUNCMACRO { + HelpID = "sw:PushButton:TP_FLD_FUNC:BT_FUNCMACRO"; Pos = MAP_APPFONT ( 204 , 165 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "~Macro..." ; @@ -163,6 +171,7 @@ TabPage TP_FLD_FUNC }; Edit ED_LISTITEM { + HelpID = "sw:Edit:TP_FLD_FUNC:ED_LISTITEM"; Border = TRUE ; Pos = MAP_APPFONT ( 170 , 14 ) ; Size = MAP_APPFONT ( 84 , 12 ) ; @@ -172,6 +181,7 @@ TabPage TP_FLD_FUNC }; PushButton PB_LISTADD { + HelpID = "sw:PushButton:TP_FLD_FUNC:PB_LISTADD"; Pos = MAP_APPFONT ( 170 , 29 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Hide = TRUE; @@ -186,6 +196,7 @@ TabPage TP_FLD_FUNC }; ListBox LB_LISTITEMS { + HelpID = "sw:ListBox:TP_FLD_FUNC:LB_LISTITEMS"; Border = TRUE ; Pos = MAP_APPFONT ( 170 , 57 ) ; Size = MAP_APPFONT ( 83 , 44 ) ; @@ -195,6 +206,7 @@ TabPage TP_FLD_FUNC }; PushButton PB_LISTREMOVE { + HelpID = "sw:PushButton:TP_FLD_FUNC:PB_LISTREMOVE"; Pos = MAP_APPFONT ( 203 , 104 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Hide = TRUE; @@ -202,6 +214,7 @@ TabPage TP_FLD_FUNC }; PushButton PB_LISTUP { + HelpID = "sw:PushButton:TP_FLD_FUNC:PB_LISTUP"; Pos = MAP_APPFONT ( 203 , 121 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Hide = TRUE; @@ -209,6 +222,7 @@ TabPage TP_FLD_FUNC }; PushButton PB_LISTDOWN { + HelpID = "sw:PushButton:TP_FLD_FUNC:PB_LISTDOWN"; Pos = MAP_APPFONT ( 203 , 138 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Hide = TRUE; @@ -223,6 +237,7 @@ TabPage TP_FLD_FUNC }; Edit ED_LISTNAME { + HelpID = "sw:Edit:TP_FLD_FUNC:ED_LISTNAME"; Border = TRUE ; Pos = MAP_APPFONT ( 170 , 167 ) ; Size = MAP_APPFONT ( 84 , 12 ) ; diff --git a/sw/source/ui/fldui/fldmgr.cxx b/sw/source/ui/fldui/fldmgr.cxx index e7ecd4939d..c4bd74b334 100644 --- a/sw/source/ui/fldui/fldmgr.cxx +++ b/sw/source/ui/fldui/fldmgr.cxx @@ -144,7 +144,7 @@ enum /*-------------------------------------------------------------------- Beschreibung: Formate in der richtigen Reihenfolge --------------------------------------------------------------------*/ -static const USHORT aSetFmt[] = +static const sal_uInt16 aSetFmt[] = { // die Reihenfolge muss zu Beginn mit den ResourceIds fuer FMT_SETVAR_??? // uebereinstimmen @@ -152,14 +152,14 @@ static const USHORT aSetFmt[] = 0 }; -static const USHORT aGetFmt[] = +static const sal_uInt16 aGetFmt[] = { // die Reihenfolge muss zu Beginn mit den ResourceIds fuer FMT_GETVAR_??? // uebereinstimmen 0 }; -static const USHORT aUsrFmt[] = +static const sal_uInt16 aUsrFmt[] = { // die Reihenfolge muss zu Beginn mit den ResourceIds fuer FMT_SETVAR_??? // uebereinstimmen @@ -167,29 +167,29 @@ static const USHORT aUsrFmt[] = nsSwExtendedSubType::SUB_CMD }; -static const USHORT aDBFmt[] = +static const sal_uInt16 aDBFmt[] = { // die Reihenfolge muss zu Beginn mit den ResourceIds fuer FMT_DBFLD_??? // uebereinstimmen nsSwExtendedSubType::SUB_OWN_FMT }; -static const USHORT VF_COUNT = sizeof(aGetFmt) / sizeof(USHORT); -static const USHORT VF_USR_COUNT = sizeof(aUsrFmt) / sizeof(USHORT); -static const USHORT VF_DB_COUNT = sizeof(aDBFmt) / sizeof(USHORT); +static const sal_uInt16 VF_COUNT = sizeof(aGetFmt) / sizeof(sal_uInt16); +static const sal_uInt16 VF_USR_COUNT = sizeof(aUsrFmt) / sizeof(sal_uInt16); +static const sal_uInt16 VF_DB_COUNT = sizeof(aDBFmt) / sizeof(sal_uInt16); /*-------------------------------------------------------------------- Beschreibung: Feldtypen und Subtypes --------------------------------------------------------------------*/ struct SwFldPack { - USHORT nTypeId; + sal_uInt16 nTypeId; - USHORT nSubTypeStart; - USHORT nSubTypeEnd; + sal_uInt16 nSubTypeStart; + sal_uInt16 nSubTypeEnd; - ULONG nFmtBegin; - ULONG nFmtEnd; + sal_uLong nFmtBegin; + sal_uLong nFmtEnd; }; /*-------------------------------------------------------------------- @@ -261,7 +261,7 @@ static SwWrtShell* lcl_GetShell() return 0; } -inline USHORT GetPackCount() { return sizeof(aSwFlds) / sizeof(SwFldPack); } +inline sal_uInt16 GetPackCount() { return sizeof(aSwFlds) / sizeof(SwFldPack); } /*-------------------------------------------------------------------- Beschreibung: FieldManager regelt das Einfuegen und Updaten @@ -272,7 +272,7 @@ SwFldMgr::SwFldMgr(SwWrtShell* pSh ) : pModule(0), pMacroItem(0), pWrtShell(pSh), - bEvalExp(TRUE) + bEvalExp(sal_True) { // aktuelles Feld ermitteln falls vorhanden GetCurFld(); @@ -287,14 +287,14 @@ SwFldMgr::~SwFldMgr() Beschreibung: RefMark ueber Namen organisieren --------------------------------------------------------------------*/ -BOOL SwFldMgr::CanInsertRefMark( const String& rStr ) +sal_Bool SwFldMgr::CanInsertRefMark( const String& rStr ) { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; SwWrtShell *pSh = pWrtShell ? pWrtShell : lcl_GetShell(); OSL_ENSURE(pSh, "no SwWrtShell found"); if(pSh) { - USHORT nCnt = pSh->GetCrsrCnt(); + sal_uInt16 nCnt = pSh->GetCrsrCnt(); // der letzte Crsr muss keine aufgespannte Selektion if( 1 < nCnt && !pSh->SwCrsrShell::HasSelection() ) @@ -309,7 +309,7 @@ BOOL SwFldMgr::CanInsertRefMark( const String& rStr ) Beschreibung: Zugriff ueber ResIds --------------------------------------------------------------------*/ -void SwFldMgr::RemoveFldType(USHORT nResId, const String& rName ) +void SwFldMgr::RemoveFldType(sal_uInt16 nResId, const String& rName ) { SwWrtShell * pSh = pWrtShell ? pWrtShell : lcl_GetShell(); OSL_ENSURE(pSh, "no SwWrtShell found"); @@ -317,7 +317,7 @@ void SwFldMgr::RemoveFldType(USHORT nResId, const String& rName ) pSh->RemoveFldType(nResId, rName); } -USHORT SwFldMgr::GetFldTypeCount(USHORT nResId) const +sal_uInt16 SwFldMgr::GetFldTypeCount(sal_uInt16 nResId) const { SwWrtShell * pSh = pWrtShell ? pWrtShell : lcl_GetShell(); OSL_ENSURE(pSh, "no SwWrtShell found"); @@ -325,7 +325,7 @@ USHORT SwFldMgr::GetFldTypeCount(USHORT nResId) const } -SwFieldType* SwFldMgr::GetFldType(USHORT nResId, USHORT nId) const +SwFieldType* SwFldMgr::GetFldType(sal_uInt16 nResId, sal_uInt16 nId) const { SwWrtShell * pSh = pWrtShell ? pWrtShell : lcl_GetShell(); OSL_ENSURE(pSh, "no SwWrtShell found"); @@ -333,7 +333,7 @@ SwFieldType* SwFldMgr::GetFldType(USHORT nResId, USHORT nId) const } -SwFieldType* SwFldMgr::GetFldType(USHORT nResId, const String& rName) const +SwFieldType* SwFldMgr::GetFldType(sal_uInt16 nResId, const String& rName) const { SwWrtShell * pSh = pWrtShell ? pWrtShell : lcl_GetShell(); OSL_ENSURE(pSh, "no SwWrtShell found"); @@ -365,7 +365,7 @@ SwField* SwFldMgr::GetCurFld() // Aktuelle Werte aufbereiten Parameter 1 und Parameter 2 // als auch das Format ermitteln // - const USHORT nTypeId = pCurFld->GetTypeId(); + const sal_uInt16 nTypeId = pCurFld->GetTypeId(); nCurFmt = pCurFld->GetFormat(); aCurPar1 = pCurFld->GetPar1(); @@ -389,7 +389,7 @@ SwField* SwFldMgr::GetCurFld() --------------------------------------------------------------------*/ -const SwFldGroupRgn& SwFldMgr::GetGroupRange(BOOL bHtmlMode, USHORT nGrpId) const +const SwFldGroupRgn& SwFldMgr::GetGroupRange(sal_Bool bHtmlMode, sal_uInt16 nGrpId) const { static SwFldGroupRgn const aRanges[] = { @@ -411,16 +411,16 @@ static SwFldGroupRgn const aWebRanges[] = }; if (bHtmlMode) - return aWebRanges[(USHORT)nGrpId]; + return aWebRanges[(sal_uInt16)nGrpId]; else - return aRanges[(USHORT)nGrpId]; + return aRanges[(sal_uInt16)nGrpId]; } /*-------------------------------------------------------------------- Beschreibung: GroupId bestimmen --------------------------------------------------------------------*/ -USHORT SwFldMgr::GetGroup(BOOL bHtmlMode, USHORT nTypeId, USHORT nSubType) const +sal_uInt16 SwFldMgr::GetGroup(sal_Bool bHtmlMode, sal_uInt16 nTypeId, sal_uInt16 nSubType) const { if (nTypeId == TYP_SETINPFLD) nTypeId = TYP_SETFLD; @@ -434,10 +434,10 @@ USHORT SwFldMgr::GetGroup(BOOL bHtmlMode, USHORT nTypeId, USHORT nSubType) const if (nTypeId == TYP_FIXTIMEFLD) nTypeId = TYP_TIMEFLD; - for (USHORT i = GRP_DOC; i <= GRP_VAR; i++) + for (sal_uInt16 i = GRP_DOC; i <= GRP_VAR; i++) { const SwFldGroupRgn& rRange = GetGroupRange(bHtmlMode, i); - for (USHORT nPos = rRange.nStart; nPos < rRange.nEnd; nPos++) + for (sal_uInt16 nPos = rRange.nStart; nPos < rRange.nEnd; nPos++) { if (aSwFlds[nPos].nTypeId == nTypeId) return i; @@ -452,18 +452,18 @@ USHORT SwFldMgr::GetGroup(BOOL bHtmlMode, USHORT nTypeId, USHORT nSubType) const --------------------------------------------------------------------*/ -USHORT SwFldMgr::GetTypeId(USHORT nPos) +sal_uInt16 SwFldMgr::GetTypeId(sal_uInt16 nPos) { OSL_ENSURE(nPos < ::GetPackCount(), "forbidden Pos"); return aSwFlds[ nPos ].nTypeId; } -const String& SwFldMgr::GetTypeStr(USHORT nPos) +const String& SwFldMgr::GetTypeStr(sal_uInt16 nPos) { OSL_ENSURE(nPos < ::GetPackCount(), "forbidden TypeId"); - USHORT nFldWh = aSwFlds[ nPos ].nTypeId; + sal_uInt16 nFldWh = aSwFlds[ nPos ].nTypeId; // Sonderbehandlung fuer Datum/Zeit Felder (ohne var/fix) if( TYP_DATEFLD == nFldWh ) @@ -485,7 +485,7 @@ const String& SwFldMgr::GetTypeStr(USHORT nPos) --------------------------------------------------------------------*/ -USHORT SwFldMgr::GetPos(USHORT nTypeId) +sal_uInt16 SwFldMgr::GetPos(sal_uInt16 nTypeId) { switch( nTypeId ) { @@ -495,7 +495,7 @@ USHORT SwFldMgr::GetPos(USHORT nTypeId) case TYP_USRINPFLD: nTypeId = TYP_USERFLD; break; } - for(USHORT i = 0; i < GetPackCount(); i++) + for(sal_uInt16 i = 0; i < GetPackCount(); i++) if(aSwFlds[i].nTypeId == nTypeId) return i; @@ -506,14 +506,14 @@ USHORT SwFldMgr::GetPos(USHORT nTypeId) Beschreibung: Subtypen eines Feldes lokalisieren --------------------------------------------------------------------*/ -BOOL SwFldMgr::GetSubTypes(USHORT nTypeId, SvStringsDtor& rToFill) +sal_Bool SwFldMgr::GetSubTypes(sal_uInt16 nTypeId, SvStringsDtor& rToFill) { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; SwWrtShell *pSh = pWrtShell ? pWrtShell : lcl_GetShell(); OSL_ENSURE(pSh, "no SwWrtShell found"); if(pSh) { - const USHORT nPos = GetPos(nTypeId); + const sal_uInt16 nPos = GetPos(nTypeId); switch(nTypeId) { @@ -541,11 +541,11 @@ BOOL SwFldMgr::GetSubTypes(USHORT nTypeId, SvStringsDtor& rToFill) case TYP_USERFLD: { - const USHORT nCount = pSh->GetFldTypeCount(); - for(USHORT i = 0; i < nCount; ++i) + const sal_uInt16 nCount = pSh->GetFldTypeCount(); + for(sal_uInt16 i = 0; i < nCount; ++i) { SwFieldType* pFldType = pSh->GetFldType( i ); - const USHORT nWhich = pFldType->Which(); + const sal_uInt16 nWhich = pFldType->Which(); if((nTypeId == TYP_DDEFLD && pFldType->Which() == RES_DDEFLD) || @@ -563,7 +563,7 @@ BOOL SwFldMgr::GetSubTypes(USHORT nTypeId, SvStringsDtor& rToFill) ((nTypeId == TYP_INPUTFLD || nTypeId == TYP_FORMELFLD) && (nWhich == RES_USERFLD || (nWhich == RES_SETEXPFLD && - !(((SwSetExpFieldType*)pFldType)->GetType() & nsSwGetSetExpType::GSE_SEQ)) )) ) + !(((SwSetExpFieldType*)pFldType)->GetType() & nsSwGetSetExpType::GSE_SEQ))) ) ) { String* pNew = new String(pFldType->GetName()); rToFill.Insert(pNew, rToFill.Count()); @@ -582,13 +582,13 @@ BOOL SwFldMgr::GetSubTypes(USHORT nTypeId, SvStringsDtor& rToFill) // statische SubTypes if(nPos != USHRT_MAX) { - USHORT nCount; + sal_uInt16 nCount; if (nTypeId == TYP_DOCINFOFLD) nCount = DI_SUBTYPE_END - DI_SUBTYPE_BEGIN; else nCount = aSwFlds[nPos].nSubTypeEnd - aSwFlds[nPos].nSubTypeStart; - for(USHORT i = 0; i < nCount; ++i) + for(sal_uInt16 i = 0; i < nCount; ++i) { String* pNew; if (nTypeId == TYP_DOCINFOFLD) @@ -606,7 +606,7 @@ BOOL SwFldMgr::GetSubTypes(USHORT nTypeId, SvStringsDtor& rToFill) } } } - bRet = TRUE; + bRet = sal_True; } return bRet; } @@ -617,18 +617,18 @@ BOOL SwFldMgr::GetSubTypes(USHORT nTypeId, SvStringsDtor& rToFill) --------------------------------------------------------------------*/ -USHORT SwFldMgr::GetFormatCount(USHORT nTypeId, BOOL bIsText, BOOL bHtmlMode) const +sal_uInt16 SwFldMgr::GetFormatCount(sal_uInt16 nTypeId, sal_Bool bIsText, sal_Bool bHtmlMode) const { OSL_ENSURE(nTypeId < TYP_END, "forbidden TypeId"); { - const USHORT nPos = GetPos(nTypeId); + const sal_uInt16 nPos = GetPos(nTypeId); if(nPos == USHRT_MAX || (bHtmlMode && nTypeId == TYP_SETFLD)) return 0; - ULONG nStart = aSwFlds[nPos].nFmtBegin; - ULONG nEnd = aSwFlds[nPos].nFmtEnd; + sal_uLong nStart = aSwFlds[nPos].nFmtBegin; + sal_uLong nEnd = aSwFlds[nPos].nFmtEnd; if (bIsText && nEnd - nStart >= 2) return 2; @@ -644,7 +644,7 @@ USHORT SwFldMgr::GetFormatCount(USHORT nTypeId, BOOL bIsText, BOOL bHtmlMode) co case FMT_DBFLD_BEGIN: return VF_DB_COUNT; case FMT_NUM_BEGIN: { - USHORT nCount = (USHORT)(nEnd - nStart); + sal_uInt16 nCount = (sal_uInt16)(nEnd - nStart); GetNumberingInfo(); if(xNumberingInfo.is()) { @@ -665,7 +665,7 @@ USHORT SwFldMgr::GetFormatCount(USHORT nTypeId, BOOL bIsText, BOOL bHtmlMode) co } } - return (USHORT)(nEnd - nStart); + return (sal_uInt16)(nEnd - nStart); } } @@ -674,17 +674,17 @@ USHORT SwFldMgr::GetFormatCount(USHORT nTypeId, BOOL bIsText, BOOL bHtmlMode) co --------------------------------------------------------------------*/ -String SwFldMgr::GetFormatStr(USHORT nTypeId, ULONG nFormatId) const +String SwFldMgr::GetFormatStr(sal_uInt16 nTypeId, sal_uLong nFormatId) const { String aRet; OSL_ENSURE(nTypeId < TYP_END, "forbidden TypeId"); - const USHORT nPos = GetPos(nTypeId); + const sal_uInt16 nPos = GetPos(nTypeId); if(nPos == USHRT_MAX) return aRet; - ULONG nStart; + sal_uLong nStart; nStart = aSwFlds[nPos].nFmtBegin; @@ -692,7 +692,7 @@ String SwFldMgr::GetFormatStr(USHORT nTypeId, ULONG nFormatId) const nFormatId &= ~FF_FIXED; // Fixed-Flag ausmaskieren if((nStart + nFormatId) < aSwFlds[nPos].nFmtEnd) - aRet = SW_RESSTR((USHORT)(nStart + nFormatId)); + aRet = SW_RESSTR((sal_uInt16)(nStart + nFormatId)); else if( FMT_NUM_BEGIN == nStart) { if(xNumberingInfo.is()) @@ -724,9 +724,9 @@ String SwFldMgr::GetFormatStr(USHORT nTypeId, ULONG nFormatId) const Beschreibung: FormatId aus Pseudo-ID ermitteln --------------------------------------------------------------------*/ -USHORT SwFldMgr::GetFormatId(USHORT nTypeId, ULONG nFormatId) const +sal_uInt16 SwFldMgr::GetFormatId(sal_uInt16 nTypeId, sal_uLong nFormatId) const { - USHORT nId = (USHORT)nFormatId; + sal_uInt16 nId = (sal_uInt16)nFormatId; switch( nTypeId ) { @@ -747,9 +747,9 @@ USHORT SwFldMgr::GetFormatId(USHORT nTypeId, ULONG nFormatId) const case TYP_SEQFLD: case TYP_GETREFPAGEFLD: { - USHORT nPos = GetPos( nTypeId ); - ULONG nBegin = aSwFlds[ nPos ].nFmtBegin; - ULONG nEnd = aSwFlds[nPos].nFmtEnd; + sal_uInt16 nPos = GetPos( nTypeId ); + sal_uLong nBegin = aSwFlds[ nPos ].nFmtBegin; + sal_uLong nEnd = aSwFlds[nPos].nFmtEnd; if((nBegin + nFormatId) < nEnd) { switch( nBegin + nFormatId ) @@ -805,15 +805,15 @@ USHORT SwFldMgr::GetFormatId(USHORT nTypeId, ULONG nFormatId) const --------------------------------------------------------------------*/ -BOOL SwFldMgr::GoNextPrev( BOOL bNext, SwFieldType* pTyp ) +sal_Bool SwFldMgr::GoNextPrev( sal_Bool bNext, SwFieldType* pTyp ) { SwWrtShell* pSh = pWrtShell ? pWrtShell : ::lcl_GetShell(); if(!pSh) - return FALSE; + return sal_False; if( !pTyp && pCurFld ) { - const USHORT nTypeId = pCurFld->GetTypeId(); + const sal_uInt16 nTypeId = pCurFld->GetTypeId(); if( TYP_SETINPFLD == nTypeId || TYP_USRINPFLD == nTypeId ) pTyp = pSh->GetFldType( 0, RES_INPUTFLD ); else @@ -826,7 +826,7 @@ BOOL SwFldMgr::GoNextPrev( BOOL bNext, SwFieldType* pTyp ) return pSh->MoveFldType( 0, bNext, USHRT_MAX, RES_DBFLD ); } - return pTyp && pSh ? pSh->MoveFldType( pTyp, bNext ) : FALSE; + return pTyp && pSh ? pSh->MoveFldType( pTyp, bNext ) : sal_False; } /*-------------------------------------------------------------------- @@ -847,7 +847,7 @@ void SwFldMgr::InsertFldType(SwFieldType& rType) --------------------------------------------------------------------*/ -USHORT SwFldMgr::GetCurTypeId() const +sal_uInt16 SwFldMgr::GetCurTypeId() const { return pCurFld ? pCurFld->GetTypeId() : USHRT_MAX; } @@ -857,21 +857,21 @@ USHORT SwFldMgr::GetCurTypeId() const --------------------------------------------------------------------*/ -BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData ) +sal_Bool SwFldMgr::InsertFld( const SwInsertFld_Data& rData ) { SwField* pFld = 0; - BOOL bExp = FALSE; - BOOL bTbl = FALSE; - BOOL bPageVar = FALSE; - ULONG nFormatId = rData.nFormatId; - USHORT nSubType = rData.nSubType; + sal_Bool bExp = sal_False; + sal_Bool bTbl = sal_False; + sal_Bool bPageVar = sal_False; + sal_uLong nFormatId = rData.nFormatId; + sal_uInt16 nSubType = rData.nSubType; sal_Unicode cSeparator = rData.cSeparator; SwWrtShell* pCurShell = rData.pSh; if(!pCurShell) pCurShell = pWrtShell ? pWrtShell : ::lcl_GetShell(); OSL_ENSURE(pCurShell, "no SwWrtShell found"); if(!pCurShell) - return FALSE; + return sal_False; switch(rData.nTypeId) { // ACHTUNG dieses Feld wird ueber einen gesonderten Dialog eingefuegt @@ -885,7 +885,7 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData ) { SwScriptFieldType* pType = (SwScriptFieldType*)pCurShell->GetFldType(0, RES_SCRIPTFLD); - pFld = new SwScriptField(pType, rData.sPar1, rData.sPar2, (BOOL)nFormatId); + pFld = new SwScriptField(pType, rData.sPar1, rData.sPar2, (sal_Bool)nFormatId); break; } case TYP_COMBINED_CHARS: @@ -911,7 +911,7 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData ) case TYP_DATEFLD: case TYP_TIMEFLD: { - USHORT nSub = static_cast< USHORT >(rData.nTypeId == TYP_DATEFLD ? DATEFLD : TIMEFLD); + sal_uInt16 nSub = static_cast< sal_uInt16 >(rData.nTypeId == TYP_DATEFLD ? DATEFLD : TIMEFLD); nSub |= nSubType == DATE_VAR ? 0 : FIXEDFLD; SwDateTimeFieldType* pTyp = @@ -936,14 +936,14 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData ) } case TYP_CHAPTERFLD: { - USHORT nByte = (USHORT)rData.sPar2.ToInt32(); + sal_uInt16 nByte = (sal_uInt16)rData.sPar2.ToInt32(); SwChapterFieldType* pTyp = (SwChapterFieldType*)pCurShell->GetFldType(0, RES_CHAPTERFLD); pFld = new SwChapterField(pTyp, nFormatId); - nByte = Max(USHORT(1), nByte); - nByte = Min(nByte, USHORT(MAXLEVEL)); + nByte = Max(sal_uInt16(1), nByte); + nByte = Min(nByte, sal_uInt16(MAXLEVEL)); nByte -= 1; - ((SwChapterField*)pFld)->SetLevel((BYTE)nByte); + ((SwChapterField*)pFld)->SetLevel((sal_uInt8)nByte); break; } case TYP_NEXTPAGEFLD: @@ -997,8 +997,8 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData ) { SwHiddenTxtFieldType* pTyp = (SwHiddenTxtFieldType*)pCurShell->GetFldType(0, RES_HIDDENTXTFLD); - pFld = new SwHiddenTxtField(pTyp, TRUE, rData.sPar1, rData.sPar2, FALSE, rData.nTypeId); - bExp = TRUE; + pFld = new SwHiddenTxtField(pTyp, sal_True, rData.sPar1, rData.sPar2, sal_False, rData.nTypeId); + bExp = sal_True; break; } case TYP_HIDDENPARAFLD: @@ -1006,7 +1006,7 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData ) SwHiddenParaFieldType* pTyp = (SwHiddenParaFieldType*)pCurShell->GetFldType(0, RES_HIDDENPARAFLD); pFld = new SwHiddenParaField(pTyp, rData.sPar1); - bExp = TRUE; + bExp = sal_True; break; } case TYP_SETREFFLD: @@ -1014,17 +1014,17 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData ) if( rData.sPar1.Len() > 0 && CanInsertRefMark( rData.sPar1 ) ) { pCurShell->SetAttr( SwFmtRefMark( rData.sPar1 ) ); - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } case TYP_GETREFFLD: { SwGetRefFieldType* pTyp = (SwGetRefFieldType*)pCurShell->GetFldType(0, RES_GETREFFLD); - USHORT nSeqNo = (USHORT)rData.sPar2.ToInt32(); + sal_uInt16 nSeqNo = (sal_uInt16)rData.sPar2.ToInt32(); pFld = new SwGetRefField(pTyp, rData.sPar1, nSubType, nSeqNo, nFormatId); - bExp = TRUE; + bExp = sal_True; break; } case TYP_DDEFLD: @@ -1032,11 +1032,11 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData ) //JP 28.08.95: DDE-Topics/-Items koennen Blanks in ihren // Namen haben! Wird hier noch nicht beachtet. String sCmd( rData.sPar2 ); - USHORT nTmpPos = sCmd.SearchAndReplace( ' ', sfx2::cTokenSeperator ); + sal_uInt16 nTmpPos = sCmd.SearchAndReplace( ' ', sfx2::cTokenSeperator ); sCmd.SearchAndReplace( ' ', sfx2::cTokenSeperator, nTmpPos ); SwDDEFieldType* pTyp = (SwDDEFieldType*)pCurShell->InsertFldType( - SwDDEFieldType( rData.sPar1, sCmd, (USHORT)nFormatId )); + SwDDEFieldType( rData.sPar1, sCmd, (sal_uInt16)nFormatId )); pFld = new SwDDEField( pTyp ); break; } @@ -1124,7 +1124,7 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData ) } pFld->ChangeFormat( nFormatId ); - bExp = TRUE; + bExp = sal_True; break; } case TYP_DBSETNUMBERFLD: @@ -1132,7 +1132,7 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData ) case TYP_DBNEXTSETFLD: case TYP_DBNAMEFLD: { - USHORT nPos, nTablePos, nCmdTypePos, nExpPos; + sal_uInt16 nPos, nTablePos, nCmdTypePos, nExpPos; String sPar1; SwDBData aDBData; @@ -1173,7 +1173,7 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData ) SwDBNextSetFieldType* pTyp = (SwDBNextSetFieldType*)pCurShell->GetFldType( 0, RES_DBNEXTSETFLD); pFld = new SwDBNextSetField(pTyp, sPar1, rData.sPar2, aDBData); - bExp = TRUE; + bExp = sal_True; break; } case TYP_DBNUMSETFLD: @@ -1181,7 +1181,7 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData ) SwDBNumSetFieldType* pTyp = (SwDBNumSetFieldType*)pCurShell->GetFldType( 0, RES_DBNUMSETFLD); pFld = new SwDBNumSetField( pTyp, sPar1, rData.sPar2, aDBData); - bExp = TRUE; + bExp = sal_True; break; } case TYP_DBSETNUMBERFLD: @@ -1189,7 +1189,7 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData ) SwDBSetNumberFieldType* pTyp = (SwDBSetNumberFieldType*) pCurShell->GetFldType(0, RES_DBSETNUMBERFLD); pFld = new SwDBSetNumberField( pTyp, aDBData, nFormatId); - bExp = TRUE; + bExp = sal_True; break; } } @@ -1211,7 +1211,7 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData ) pFld = new SwUserField(pTyp, 0, nFormatId); if (pFld->GetSubType() != nSubType) pFld->SetSubType(nSubType); - bTbl = TRUE; + bTbl = sal_True; break; } case TYP_INPUTFLD: @@ -1228,16 +1228,16 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData ) new SwSetExpField(pTyp, aEmptyStr, nFormatId); // Typ vom SwSetExpFieldType nicht veraendern: - USHORT nOldSubType = pExpFld->GetSubType(); + sal_uInt16 nOldSubType = pExpFld->GetSubType(); pExpFld->SetSubType(nOldSubType | (nSubType & 0xff00)); pExpFld->SetPromptText(rData.sPar2); - pExpFld->SetInputFlag(TRUE) ; - bExp = TRUE; + pExpFld->SetInputFlag(sal_True) ; + bExp = sal_True; pFld = pExpFld; } else - return FALSE; + return sal_False; } else { @@ -1251,13 +1251,13 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData ) // Dialog starten // - pCurShell->StartInputFldDlg(pFld, FALSE, rData.pParent); + pCurShell->StartInputFldDlg(pFld, sal_False, rData.pParent); break; } case TYP_SETFLD: { if (!rData.sPar2.Len()) // Leere Variablen sind nicht erlaubt - return FALSE; + return sal_False; SwSetExpFieldType* pTyp = (SwSetExpFieldType*)pCurShell->InsertFldType( SwSetExpFieldType(pCurShell->GetDoc(), rData.sPar1) ); @@ -1265,7 +1265,7 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData ) SwSetExpField* pExpFld = new SwSetExpField( pTyp, rData.sPar2, nFormatId); pExpFld->SetSubType(nSubType); pExpFld->SetPar2(rData.sPar2); - bExp = TRUE; + bExp = sal_True; pFld = pExpFld; break; } @@ -1274,7 +1274,7 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData ) SwSetExpFieldType* pTyp = (SwSetExpFieldType*)pCurShell->InsertFldType( SwSetExpFieldType(pCurShell->GetDoc(), rData.sPar1, nsSwGetSetExpType::GSE_SEQ)); - BYTE nLevel = static_cast< BYTE >(nSubType & 0xff); + sal_uInt8 nLevel = static_cast< sal_uInt8 >(nSubType & 0xff); pTyp->SetOutlineLvl(nLevel); if (nLevel != 0x7f && cSeparator == 0) @@ -1282,7 +1282,7 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData ) pTyp->SetDelimiter(cSeparator); SwSetExpField* pExpFld = new SwSetExpField(pTyp, rData.sPar2, nFormatId); - bExp = TRUE; + bExp = sal_True; pFld = pExpFld; nSubType = nsSwGetSetExpType::GSE_SEQ; break; @@ -1299,15 +1299,15 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData ) 0, RES_GETEXPFLD); pFld = new SwGetExpField(pTyp, rData.sPar1, pSetTyp->GetType(), nFormatId); pFld->SetSubType(nSubType | pSetTyp->GetType()); - bExp = TRUE; + bExp = sal_True; } else - return FALSE; + return sal_False; break; } case TYP_FORMELFLD: { - if(pCurShell->GetFrmType(0,FALSE) & FRMTYPE_TABLE) + if(pCurShell->GetFrmType(0,sal_False) & FRMTYPE_TABLE) { pCurShell->StartAllAction(); @@ -1334,7 +1334,7 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData ) pCurShell->UpdateTable(); pCurShell->EndAllAction(); - return TRUE; + return sal_True; } else @@ -1343,7 +1343,7 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData ) pCurShell->GetFldType(0, RES_GETEXPFLD); pFld = new SwGetExpField(pTyp, rData.sPar2, nsSwGetSetExpType::GSE_FORMULA, nFormatId); pFld->SetSubType(nSubType); - bExp = TRUE; + bExp = sal_True; } break; } @@ -1351,13 +1351,13 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData ) pFld = new SwRefPageSetField( (SwRefPageSetFieldType*) pCurShell->GetFldType( 0, RES_REFPAGESETFLD ), (short)rData.sPar2.ToInt32(), 0 != nSubType ); - bPageVar = TRUE; + bPageVar = sal_True; break; case TYP_GETREFPAGEFLD: pFld = new SwRefPageGetField( (SwRefPageGetFieldType*) pCurShell->GetFldType( 0, RES_REFPAGEGETFLD ), nFormatId ); - bPageVar = TRUE; + bPageVar = sal_True; break; case TYP_DROPDOWN : { @@ -1373,7 +1373,7 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData ) break; default: { OSL_ENSURE(!this, "wrong field type"); - return FALSE; + return sal_False; } } OSL_ENSURE(pFld, "field not available"); @@ -1381,7 +1381,7 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData ) //the auto language flag has to be set prior to the language! pFld->SetAutomaticLanguage(rData.bIsAutomaticLanguage); - USHORT nLang = GetCurrLanguage(); + sal_uInt16 nLang = GetCurrLanguage(); pFld->SetLanguage(nLang); // Einfuegen @@ -1390,13 +1390,13 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData ) pCurShell->Insert(*pFld); if(bExp && bEvalExp) - pCurShell->UpdateExpFlds(TRUE); + pCurShell->UpdateExpFlds(sal_True); if(bTbl) { - pCurShell->Left(CRSR_SKIP_CHARS, FALSE, 1, FALSE ); + pCurShell->Left(CRSR_SKIP_CHARS, sal_False, 1, sal_False ); pCurShell->UpdateFlds(*pFld); - pCurShell->Right(CRSR_SKIP_CHARS, FALSE, 1, FALSE ); + pCurShell->Right(CRSR_SKIP_CHARS, sal_False, 1, sal_False ); } else if( bPageVar ) ((SwRefPageGetFieldType*)pCurShell->GetFldType( 0, RES_REFPAGEGETFLD ))->UpdateFlds(); @@ -1407,7 +1407,7 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData ) delete pFld; pCurShell->EndAllAction(); - return TRUE; + return sal_True; } /*-------------------------------------------------------------------- @@ -1415,7 +1415,7 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData ) --------------------------------------------------------------------*/ -void SwFldMgr::UpdateCurFld(ULONG nFormat, +void SwFldMgr::UpdateCurFld(sal_uLong nFormat, const String& rPar1, const String& rPar2, SwField * _pTmpFld) // #111840# @@ -1436,7 +1436,7 @@ void SwFldMgr::UpdateCurFld(ULONG nFormat, } SwFieldType* pType = pTmpFld->GetTyp(); - const USHORT nTypeId = pTmpFld->GetTypeId(); + const sal_uInt16 nTypeId = pTmpFld->GetTypeId(); SwWrtShell* pSh = pWrtShell ? pWrtShell : ::lcl_GetShell(); OSL_ENSURE(pSh, "no SwWrtShell found"); @@ -1444,8 +1444,8 @@ void SwFldMgr::UpdateCurFld(ULONG nFormat, return; pSh->StartAllAction(); - BOOL bSetPar2 = TRUE; - BOOL bSetPar1 = TRUE; + sal_Bool bSetPar2 = sal_True; + sal_Bool bSetPar1 = sal_True; String sPar1( rPar1 ); String sPar2( rPar2 ); @@ -1456,24 +1456,24 @@ void SwFldMgr::UpdateCurFld(ULONG nFormat, { //JP 28.08.95: DDE-Topics/-Items koennen Blanks in ihren // Namen haben! Wird hier noch nicht beachtet. - USHORT nTmpPos = sPar2.SearchAndReplace( ' ', sfx2::cTokenSeperator ); + sal_uInt16 nTmpPos = sPar2.SearchAndReplace( ' ', sfx2::cTokenSeperator ); sPar2.SearchAndReplace( ' ', sfx2::cTokenSeperator, nTmpPos ); break; } case TYP_CHAPTERFLD: { - USHORT nByte = (USHORT)rPar2.ToInt32(); - nByte = Max(USHORT(1), nByte); - nByte = Min(nByte, USHORT(MAXLEVEL)); + sal_uInt16 nByte = (sal_uInt16)rPar2.ToInt32(); + nByte = Max(sal_uInt16(1), nByte); + nByte = Min(nByte, sal_uInt16(MAXLEVEL)); nByte -= 1; - ((SwChapterField*)pTmpFld)->SetLevel((BYTE)nByte); - bSetPar2 = FALSE; + ((SwChapterField*)pTmpFld)->SetLevel((sal_uInt8)nByte); + bSetPar2 = sal_False; break; } case TYP_SCRIPTFLD: - ((SwScriptField*)pTmpFld)->SetCodeURL((BOOL)nFormat); + ((SwScriptField*)pTmpFld)->SetCodeURL((sal_Bool)nFormat); break; case TYP_NEXTPAGEFLD: @@ -1517,11 +1517,11 @@ void SwFldMgr::UpdateCurFld(ULONG nFormat, case TYP_GETREFFLD: { - bSetPar2 = FALSE; - ((SwGetRefField*)pTmpFld)->SetSubType( (USHORT)rPar2.ToInt32() ); - USHORT nPos = rPar2.Search( '|' ); + bSetPar2 = sal_False; + ((SwGetRefField*)pTmpFld)->SetSubType( (sal_uInt16)rPar2.ToInt32() ); + sal_uInt16 nPos = rPar2.Search( '|' ); if( STRING_NOTFOUND != nPos ) - ((SwGetRefField*)pTmpFld)->SetSeqNo( (USHORT)rPar2.Copy( nPos + 1 ).ToInt32()); + ((SwGetRefField*)pTmpFld)->SetSeqNo( (sal_uInt16)rPar2.Copy( nPos + 1 ).ToInt32()); } break; case TYP_DROPDOWN: @@ -1533,7 +1533,7 @@ void SwFldMgr::UpdateCurFld(ULONG nFormat, pArray[nToken] = sPar2.GetToken(nToken, DB_DELIM); ((SwDropDownField*)pTmpFld)->SetItems(aEntries); ((SwDropDownField*)pTmpFld)->SetName(sPar1); - bSetPar1 = bSetPar2 = FALSE; + bSetPar1 = bSetPar2 = sal_False; } break; case TYP_AUTHORITY : @@ -1542,7 +1542,7 @@ void SwFldMgr::UpdateCurFld(ULONG nFormat, SwAuthorityField* pAuthorityField = static_cast<SwAuthorityField*>(pTmpFld); SwAuthorityFieldType* pAuthorityType = static_cast<SwAuthorityFieldType*>(pType); SwAuthEntry aTempEntry; - for( USHORT i = 0; i < AUTH_FIELD_END; ++i ) + for( sal_uInt16 i = 0; i < AUTH_FIELD_END; ++i ) aTempEntry.SetAuthorField( (ToxAuthorityField)i, rPar1.GetToken( i, TOX_STYLE_DELIMITER )); if( pAuthorityType->ChangeEntryContent( &aTempEntry ) ) @@ -1553,8 +1553,8 @@ void SwFldMgr::UpdateCurFld(ULONG nFormat, if( aTempEntry.GetAuthorField( AUTH_FIELD_IDENTIFIER ) == pAuthorityField->GetFieldText( AUTH_FIELD_IDENTIFIER ) ) - bSetPar1 = FALSE; //otherwise it's a new or changed entry, the field needs to be updated - bSetPar2 = FALSE; + bSetPar1 = sal_False; //otherwise it's a new or changed entry, the field needs to be updated + bSetPar2 = sal_False; } break; } @@ -1599,11 +1599,11 @@ void SwFldMgr::EvalExpFlds(SwWrtShell* pSh) if(pSh) { pSh->StartAllAction(); - pSh->UpdateExpFlds(TRUE); + pSh->UpdateExpFlds(sal_True); pSh->EndAllAction(); } } -USHORT SwFldMgr::GetCurrLanguage() const +sal_uInt16 SwFldMgr::GetCurrLanguage() const { SwWrtShell* pSh = pWrtShell ? pWrtShell : ::lcl_GetShell(); if( pSh ) @@ -1613,9 +1613,9 @@ USHORT SwFldMgr::GetCurrLanguage() const void SwFieldType::_GetFldName() { - static const USHORT coFldCnt = STR_TYPE_END - STR_TYPE_BEGIN; + static const sal_uInt16 coFldCnt = STR_TYPE_END - STR_TYPE_BEGIN; - static USHORT const coFldNms[ coFldCnt ] = { + static sal_uInt16 coFldNms[ coFldCnt ] = { FLD_DATE_STD, FLD_TIME_STD, STR_FILENAMEFLD, @@ -1662,8 +1662,8 @@ void SwFieldType::_GetFldName() }; // Infos fuer Felder einfuegen - SwFieldType::pFldNames = new SvStringsDtor( (BYTE)coFldCnt, 2 ); - for( USHORT nIdx = 0; nIdx < coFldCnt; ++nIdx ) + SwFieldType::pFldNames = new SvStringsDtor( (sal_uInt8)coFldCnt, 2 ); + for( sal_uInt16 nIdx = 0; nIdx < coFldCnt; ++nIdx ) { String* pTmp = new SW_RESSTR( coFldNms[ nIdx ] ); pTmp->Assign( MnemonicGenerator::EraseAllMnemonicChars( *pTmp ) ); @@ -1671,9 +1671,9 @@ void SwFieldType::_GetFldName() } } -BOOL SwFldMgr::ChooseMacro(const String&) +sal_Bool SwFldMgr::ChooseMacro(const String&) { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; // choose script dialog ::rtl::OUString aScriptURL = SfxApplication::ChooseScript(); @@ -1682,7 +1682,7 @@ BOOL SwFldMgr::ChooseMacro(const String&) if ( aScriptURL.getLength() != 0 ) { SetMacroPath( aScriptURL ); - bRet = TRUE; + bRet = sal_True; } return bRet; @@ -1716,7 +1716,7 @@ void SwFldMgr::SetMacroPath(const String& rPath) } } -ULONG SwFldMgr::GetDefaultFormat(USHORT nTypeId, BOOL bIsText, SvNumberFormatter* pFormatter, double* pVal) +sal_uLong SwFldMgr::GetDefaultFormat(sal_uInt16 nTypeId, sal_Bool bIsText, SvNumberFormatter* pFormatter, double* pVal) { double fValue; short nDefFormat; @@ -1733,8 +1733,8 @@ ULONG SwFldMgr::GetDefaultFormat(USHORT nTypeId, BOOL bIsText, SvNumberFormatter Time aTime; - ULONG nNumFmtTime = (ULONG)aTime.GetSec() + (ULONG)aTime.GetMin() * 60L + - (ULONG)aTime.GetHour() * 3600L; + sal_uLong nNumFmtTime = (sal_uLong)aTime.GetSec() + (sal_uLong)aTime.GetMin() * 60L + + (sal_uLong)aTime.GetHour() * 3600L; fValue += (double)nNumFmtTime / 86400.0; diff --git a/sw/source/ui/fldui/fldpage.cxx b/sw/source/ui/fldui/fldpage.cxx index ac77c610de..85be6af5f6 100644 --- a/sw/source/ui/fldui/fldpage.cxx +++ b/sw/source/ui/fldui/fldpage.cxx @@ -62,14 +62,14 @@ SwFldPage::SwFldPage( Window *pParent, const ResId &rId, :SfxTabPage (pParent, rId, rAttrSet), m_pCurFld (0), m_pWrtShell (0), - m_nPageId ( static_cast< USHORT >(rId.GetId()) ), + m_nPageId ( static_cast< sal_uInt16 >(rId.GetId()) ), m_nTypeSel (LISTBOX_ENTRY_NOTFOUND), m_nSelectionSel (LISTBOX_ENTRY_NOTFOUND), - m_bFldEdit (FALSE), - m_bInsert (TRUE), - m_bFldDlgHtmlMode (FALSE), - m_bRefresh (FALSE), - m_bFirstHTMLInit (TRUE) + m_bFldEdit (sal_False), + m_bInsert (sal_True), + m_bFldDlgHtmlMode (sal_False), + m_bRefresh (sal_False), + m_bFirstHTMLInit (sal_True) { } @@ -85,7 +85,7 @@ SwFldPage::~SwFldPage() void SwFldPage::Init() { SwDocShell* pDocSh = (SwDocShell*)SfxObjectShell::Current(); - BOOL bNewMode = 0 != (::GetHtmlMode(pDocSh) & HTMLMODE_ON); + sal_Bool bNewMode = 0 != (::GetHtmlMode(pDocSh) & HTMLMODE_ON); m_bFldEdit = 0 == GetTabDialog(); @@ -100,7 +100,7 @@ void SwFldPage::Init() // Bereichslistbox initialisieren if( m_bFldDlgHtmlMode && m_bFirstHTMLInit ) { - m_bFirstHTMLInit = FALSE; + m_bFirstHTMLInit = sal_False; SwWrtShell *pSh = m_pWrtShell; if(! pSh) pSh = ::GetActiveWrtShell(); @@ -129,27 +129,27 @@ void SwFldPage::ActivatePage() Beschreibung: Kompletter Reset; neues Feld editieren --------------------------------------------------------------------*/ -void SwFldPage::EditNewField( BOOL bOnlyActivate ) +void SwFldPage::EditNewField( sal_Bool bOnlyActivate ) { if( !bOnlyActivate ) { m_nTypeSel = LISTBOX_ENTRY_NOTFOUND; } m_nSelectionSel = LISTBOX_ENTRY_NOTFOUND; - m_bRefresh = TRUE; + m_bRefresh = sal_True; Reset(*(SfxItemSet*)0); - m_bRefresh = FALSE; + m_bRefresh = sal_False; } /*-------------------------------------------------------------------- Beschreibung: Feld einfuegen --------------------------------------------------------------------*/ -BOOL SwFldPage::InsertFld(USHORT nTypeId, USHORT nSubType, const String& rPar1, - const String& rPar2, ULONG nFormatId, - sal_Unicode cSeparator, BOOL bIsAutomaticLanguage) +sal_Bool SwFldPage::InsertFld(sal_uInt16 nTypeId, sal_uInt16 nSubType, const String& rPar1, + const String& rPar2, sal_uLong nFormatId, + sal_Unicode cSeparator, sal_Bool bIsAutomaticLanguage) { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; SwView* pView = GetActiveView(); SwWrtShell *pSh = m_pWrtShell ? m_pWrtShell : pView->GetWrtShellPtr(); @@ -164,7 +164,7 @@ BOOL SwFldPage::InsertFld(USHORT nTypeId, USHORT nSubType, const String& rPar1, pView->GetViewFrame()->GetBindings().GetRecorder(); if ( xRecorder.is() ) { - BOOL bRecordDB = TYP_DBFLD == nTypeId || + sal_Bool bRecordDB = TYP_DBFLD == nTypeId || TYP_DBSETNUMBERFLD == nTypeId || TYP_DBNUMSETFLD == nTypeId || TYP_DBNEXTSETFLD == nTypeId || @@ -207,7 +207,7 @@ BOOL SwFldPage::InsertFld(USHORT nTypeId, USHORT nSubType, const String& rPar1, { case TYP_DATEFLD: case TYP_TIMEFLD: - nSubType = static_cast< USHORT >(((nTypeId == TYP_DATEFLD) ? DATEFLD : TIMEFLD) | + nSubType = static_cast< sal_uInt16 >(((nTypeId == TYP_DATEFLD) ? DATEFLD : TIMEFLD) | ((nSubType == DATE_VAR) ? 0 : FIXEDFLD)); break; @@ -258,7 +258,7 @@ BOOL SwFldPage::InsertFld(USHORT nTypeId, USHORT nSubType, const String& rPar1, case TYP_SEQFLD: { SwSetExpFieldType* pTyp = (SwSetExpFieldType*)pTmpFld->GetTyp(); - pTyp->SetOutlineLvl( static_cast< BYTE >(nSubType & 0xff)); + pTyp->SetOutlineLvl( static_cast< sal_uInt8 >(nSubType & 0xff)); pTyp->SetDelimiter(cSeparator); nSubType = nsSwGetSetExpType::GSE_SEQ; @@ -327,7 +327,7 @@ void SwFldPage::SavePos( const ListBox* pLst1, const ListBox* pLst2, void SwFldPage::RestorePos(ListBox* pLst1, ListBox* pLst2, ListBox* pLst3) { - USHORT nPos = 0; + sal_uInt16 nPos = 0; ListBox* aLBArr [ coLBCount ] = { pLst1, pLst2, pLst3 }; ListBox** ppLB = aLBArr; for( int i = 0; i < coLBCount; ++i, ++ppLB ) @@ -365,7 +365,7 @@ IMPL_LINK( SwFldPage, InsertHdl, Button *, pBtn ) Beschreibung: "Einfuegen"-Button Enablen/Disablen --------------------------------------------------------------------*/ -void SwFldPage::EnableInsert(BOOL bEnable) +void SwFldPage::EnableInsert(sal_Bool bEnable) { SwFldDlg *pDlg = (SwFldDlg*)GetTabDialog(); diff --git a/sw/source/ui/fldui/fldpage.hxx b/sw/source/ui/fldui/fldpage.hxx index afcf9ce7bd..8d682564de 100644 --- a/sw/source/ui/fldui/fldpage.hxx +++ b/sw/source/ui/fldui/fldpage.hxx @@ -41,23 +41,23 @@ class SwFldPage : public SfxTabPage SwFldMgr m_aMgr; SwField *m_pCurFld; SwWrtShell* m_pWrtShell; - USHORT m_nPageId; - USHORT m_nTypeSel; - USHORT m_nSelectionSel; - BOOL m_bFldEdit; - BOOL m_bInsert; - BOOL m_bFldDlgHtmlMode; - BOOL m_bRefresh; - BOOL m_bFirstHTMLInit; + sal_uInt16 m_nPageId; + sal_uInt16 m_nTypeSel; + sal_uInt16 m_nSelectionSel; + sal_Bool m_bFldEdit; + sal_Bool m_bInsert; + sal_Bool m_bFldDlgHtmlMode; + sal_Bool m_bRefresh; + sal_Bool m_bFirstHTMLInit; protected: - USHORT GetTypeSel() const { return m_nTypeSel;} - void SetTypeSel(USHORT nSet) { m_nTypeSel = nSet;} - USHORT GetSelectionSel() const { return m_nSelectionSel;} - void SetSelectionSel(USHORT nSet){ m_nSelectionSel = nSet;} - BOOL IsFldDlgHtmlMode() const { return m_bFldDlgHtmlMode;} - BOOL IsRefresh() const { return m_bRefresh;} + sal_uInt16 GetTypeSel() const { return m_nTypeSel;} + void SetTypeSel(sal_uInt16 nSet) { m_nTypeSel = nSet;} + sal_uInt16 GetSelectionSel() const { return m_nSelectionSel;} + void SetSelectionSel(sal_uInt16 nSet){ m_nSelectionSel = nSet;} + sal_Bool IsFldDlgHtmlMode() const { return m_bFldDlgHtmlMode;} + sal_Bool IsRefresh() const { return m_bRefresh;} SwField* GetCurField() { return m_pCurFld;} SwWrtShell* GetWrtShell() { return m_pWrtShell;} @@ -70,17 +70,17 @@ protected: const ListBox* pLst3 = 0); void RestorePos( ListBox* pLst1, ListBox* pLst2 = 0, ListBox* pLst3 = 0 ); - void EnableInsert(BOOL bEnable = TRUE); - inline BOOL IsFldEdit() const { return m_bFldEdit; } + void EnableInsert(sal_Bool bEnable = sal_True); + inline sal_Bool IsFldEdit() const { return m_bFldEdit; } // Feld einfuegen - BOOL InsertFld( USHORT nTypeId, - USHORT nSubType, + sal_Bool InsertFld( sal_uInt16 nTypeId, + sal_uInt16 nSubType, const String& rPar1, const String& rPar2, - ULONG nFormatId, + sal_uLong nFormatId, sal_Unicode cDelim = ' ', - BOOL bIsAutomaticLanguage = TRUE); + sal_Bool bIsAutomaticLanguage = sal_True); using SfxTabPage::ActivatePage; @@ -95,8 +95,8 @@ public: inline SwFldMgr& GetFldMgr() { return m_aMgr; } void SetWrtShell( SwWrtShell* m_pWrtShell ); - void EditNewField( BOOL bOnlyActivate = FALSE ); - virtual USHORT GetGroup() = 0; + void EditNewField( sal_Bool bOnlyActivate = sal_False ); + virtual sal_uInt16 GetGroup() = 0; }; diff --git a/sw/source/ui/fldui/fldref.cxx b/sw/source/ui/fldui/fldref.cxx index 0c93a679b3..3f48b3e20e 100644 --- a/sw/source/ui/fldui/fldref.cxx +++ b/sw/source/ui/fldui/fldref.cxx @@ -65,7 +65,7 @@ SV_IMPL_PTRARR( _SwSeqFldList, _SeqFldLstElem* ) #define REFFLDFLAG_NUMITEM 0x7200 // <-- -USHORT nFldDlgFmtSel = 0; +sal_uInt16 nFldDlgFmtSel = 0; #define USER_DATA_VERSION_1 "1" #define USER_DATA_VERSION USER_DATA_VERSION_1 @@ -112,7 +112,7 @@ SwFldRefPage::SwFldRefPage(Window* pParent, const SfxItemSet& rCoreSet ) : // --> OD 2007-11-21 #i83479# aSelectionToolTipLB.SetSelectHdl( LINK(this, SwFldRefPage, SubTypeHdl) ); aSelectionToolTipLB.SetDoubleClickHdl( LINK(this, SwFldRefPage, InsertHdl) ); - aSelectionToolTipLB.SetWindowBits( aSelectionToolTipLB.GetWindowBits() | WB_HSCROLL ); + aSelectionToolTipLB.SetStyle( aSelectionToolTipLB.GetStyle() | WB_HSCROLL ); aSelectionToolTipLB.SetSpaceBetweenEntries(1); aSelectionToolTipLB.SetHighlightRange(); // <-- @@ -132,7 +132,7 @@ void SwFldRefPage::SaveSelectedTxtNode() SvLBoxEntry* pEntry = aSelectionToolTipLB.GetCurEntry(); if ( pEntry ) { - const USHORT nTypeId = (USHORT)(ULONG)aTypeLB.GetEntryData(GetTypeSel()); + const sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel()); SwWrtShell *pSh = GetWrtShell(); if ( !pSh ) { @@ -140,7 +140,7 @@ void SwFldRefPage::SaveSelectedTxtNode() } if ( nTypeId == REFFLDFLAG_HEADING ) { - mnSavedSelectedPos = static_cast<sal_uInt16>(reinterpret_cast<ULONG>(pEntry->GetUserData())); + mnSavedSelectedPos = static_cast<sal_uInt16>(reinterpret_cast<sal_uLong>(pEntry->GetUserData())); if ( mnSavedSelectedPos < maOutlineNodes.size() ) { mpSavedSelectedTxtNode = maOutlineNodes[mnSavedSelectedPos]; @@ -148,7 +148,7 @@ void SwFldRefPage::SaveSelectedTxtNode() } else if ( nTypeId == REFFLDFLAG_NUMITEM ) { - mnSavedSelectedPos = static_cast<sal_uInt16>(reinterpret_cast<ULONG>(pEntry->GetUserData())); + mnSavedSelectedPos = static_cast<sal_uInt16>(reinterpret_cast<sal_uLong>(pEntry->GetUserData())); if ( mnSavedSelectedPos < maNumItems.size() ) { mpSavedSelectedTxtNode = maNumItems[mnSavedSelectedPos]->GetTxtNode(); @@ -184,18 +184,18 @@ void SwFldRefPage::Reset(const SfxItemSet& ) Init(); // Allgemeine initialisierung // TypeListBox initialisieren - aTypeLB.SetUpdateMode(FALSE); + aTypeLB.SetUpdateMode(sal_False); aTypeLB.Clear(); // Typ-Listbox fuellen - USHORT nPos; + sal_uInt16 nPos; // Referenz setzen / einfuegen const SwFldGroupRgn& rRg = GetFldMgr().GetGroupRange(IsFldDlgHtmlMode(), GetGroup()); for (short i = rRg.nStart; i < rRg.nEnd; ++i) { - const USHORT nTypeId = GetFldMgr().GetTypeId(i); + const sal_uInt16 nTypeId = GetFldMgr().GetTypeId(i); if (!IsFldEdit() || nTypeId != TYP_SETREFFLD) { @@ -217,9 +217,9 @@ void SwFldRefPage::Reset(const SfxItemSet& ) if(!pSh) pSh = ::GetActiveWrtShell(); - USHORT nFldTypeCnt = pSh->GetFldTypeCount(RES_SETEXPFLD); + sal_uInt16 nFldTypeCnt = pSh->GetFldTypeCount(RES_SETEXPFLD); - for (USHORT n = 0; n < nFldTypeCnt; ++n) + for (sal_uInt16 n = 0; n < nFldTypeCnt; ++n) { SwSetExpFieldType* pType = (SwSetExpFieldType*)pSh->GetFldType(n, RES_SETEXPFLD); @@ -252,7 +252,7 @@ void SwFldRefPage::Reset(const SfxItemSet& ) if (!IsFldEdit()) RestorePos(&aTypeLB); - aTypeLB.SetUpdateMode(TRUE); + aTypeLB.SetUpdateMode(sal_True); nFldDlgFmtSel = 0; @@ -263,11 +263,11 @@ void SwFldRefPage::Reset(const SfxItemSet& ) EqualsIgnoreCaseAscii(USER_DATA_VERSION_1)) { String sVal = sUserData.GetToken(1, ';'); - USHORT nVal = static_cast< USHORT >(sVal.ToInt32()); + sal_uInt16 nVal = static_cast< sal_uInt16 >(sVal.ToInt32()); if(nVal != USHRT_MAX) { - for(USHORT i = 0; i < aTypeLB.GetEntryCount(); i++) - if(nVal == (USHORT)(ULONG)aTypeLB.GetEntryData(i)) + for(sal_uInt16 i = 0; i < aTypeLB.GetEntryCount(); i++) + if(nVal == (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(i)) { aTypeLB.SelectEntryPos(i); break; @@ -290,7 +290,7 @@ void SwFldRefPage::Reset(const SfxItemSet& ) IMPL_LINK( SwFldRefPage, TypeHdl, ListBox *, EMPTYARG ) { // Alte ListBoxPos sichern - const USHORT nOld = GetTypeSel(); + const sal_uInt16 nOld = GetTypeSel(); // Aktuelle ListBoxPos SetTypeSel(aTypeLB.GetSelectEntryPos()); @@ -301,7 +301,7 @@ IMPL_LINK( SwFldRefPage, TypeHdl, ListBox *, EMPTYARG ) { // Positionen selektieren String sName; - USHORT nFlag = 0; + sal_uInt16 nFlag = 0; switch( GetCurField()->GetSubType() ) { @@ -353,7 +353,7 @@ IMPL_LINK( SwFldRefPage, TypeHdl, ListBox *, EMPTYARG ) if (aTypeLB.GetEntryPos(sName) == LISTBOX_ENTRY_NOTFOUND) // Referenz zu gel?schter Marke { - USHORT nPos = aTypeLB.InsertEntry(sName); + sal_uInt16 nPos = aTypeLB.InsertEntry(sName); aTypeLB.SetEntryData(nPos, reinterpret_cast<void*>(nFlag)); } @@ -369,12 +369,12 @@ IMPL_LINK( SwFldRefPage, TypeHdl, ListBox *, EMPTYARG ) if (nOld != GetTypeSel()) { - USHORT nTypeId = (USHORT)(ULONG)aTypeLB.GetEntryData(GetTypeSel()); + sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel()); // Auswahl-Listbox fuellen UpdateSubType(); - BOOL bName = FALSE; nFldDlgFmtSel = 0; + sal_Bool bName = sal_False; nFldDlgFmtSel = 0; if ( ( !IsFldEdit() || aSelectionLB.GetEntryCount() ) && nOld != LISTBOX_ENTRY_NOTFOUND ) @@ -386,23 +386,23 @@ IMPL_LINK( SwFldRefPage, TypeHdl, ListBox *, EMPTYARG ) switch (nTypeId) { case TYP_GETREFFLD: - if (REFFLDFLAG & (USHORT)(ULONG)aTypeLB.GetEntryData(nOld)) + if (REFFLDFLAG & (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(nOld)) // dann bleibt die alte bestehen nFldDlgFmtSel = aFormatLB.GetSelectEntryPos(); - bName = TRUE; + bName = sal_True; break; case TYP_SETREFFLD: - bName = TRUE; + bName = sal_True; break; case REFFLDFLAG_BOOKMARK: - bName = TRUE; + bName = sal_True; // kein break!!! default: if( REFFLDFLAG & nTypeId ) { - USHORT nOldId = (USHORT)(ULONG)aTypeLB.GetEntryData(nOld); + sal_uInt16 nOldId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(nOld); if( nOldId & REFFLDFLAG || nOldId == TYP_GETREFFLD ) // dann bleibt die alte bestehen nFldDlgFmtSel = aFormatLB.GetSelectEntryPos(); @@ -414,8 +414,8 @@ IMPL_LINK( SwFldRefPage, TypeHdl, ListBox *, EMPTYARG ) aNameFT.Enable(bName); // Format-Listbox fuellen - USHORT nSize = FillFormatLB(nTypeId); - BOOL bFormat = nSize != 0; + sal_uInt16 nSize = FillFormatLB(nTypeId); + sal_Bool bFormat = nSize != 0; aFormatLB.Enable(bFormat); aFormatFT.Enable(bFormat); @@ -428,7 +428,7 @@ IMPL_LINK( SwFldRefPage, TypeHdl, ListBox *, EMPTYARG ) IMPL_LINK( SwFldRefPage, SubTypeHdl, ListBox *, EMPTYARG ) { - USHORT nTypeId = (USHORT)(ULONG)aTypeLB.GetEntryData(GetTypeSel()); + sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel()); switch(nTypeId) { @@ -484,13 +484,13 @@ void SwFldRefPage::UpdateSubType() if(!pSh) pSh = ::GetActiveWrtShell(); SwGetRefField* pRefFld = (SwGetRefField*)GetCurField(); - const USHORT nTypeId = (USHORT)(ULONG)aTypeLB.GetEntryData(GetTypeSel()); + const sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel()); String sOldSel; // --> OD 2007-11-22 #i83479# if ( aSelectionLB.IsVisible() ) { - const USHORT nSelectionSel = aSelectionLB.GetSelectEntryPos(); + const sal_uInt16 nSelectionSel = aSelectionLB.GetSelectEntryPos(); if (nSelectionSel != LISTBOX_ENTRY_NOTFOUND) { sOldSel = aSelectionLB.GetEntry(nSelectionSel); @@ -500,10 +500,10 @@ void SwFldRefPage::UpdateSubType() if (IsFldEdit() && !sOldSel.Len()) sOldSel = String::CreateFromInt32( pRefFld->GetSeqNo() + 1 ); - aSelectionLB.SetUpdateMode(FALSE); + aSelectionLB.SetUpdateMode(sal_False); aSelectionLB.Clear(); // --> OD 2007-11-21 #i83479# - aSelectionToolTipLB.SetUpdateMode(FALSE); + aSelectionToolTipLB.SetUpdateMode(sal_False); aSelectionToolTipLB.Clear(); bool bShowSelectionToolTipLB( false ); // <-- @@ -530,9 +530,9 @@ void SwFldRefPage::UpdateSubType() { aSelectionLB.SetStyle(aSelectionLB.GetStyle() & ~WB_SORT); SwSeqFldList aArr; - USHORT nCnt = pSh->GetSeqFtnList( aArr ); + sal_uInt16 nCnt = pSh->GetSeqFtnList( aArr ); - for( USHORT n = 0; n < nCnt; ++n ) + for( sal_uInt16 n = 0; n < nCnt; ++n ) { aSelectionLB.InsertEntry( aArr[ n ]->sDlgEntry ); if (IsFldEdit() && pRefFld->GetSeqNo() == aArr[ n ]->nSeqNo) @@ -543,9 +543,9 @@ void SwFldRefPage::UpdateSubType() { aSelectionLB.SetStyle(aSelectionLB.GetStyle() & ~WB_SORT); SwSeqFldList aArr; - USHORT nCnt = pSh->GetSeqFtnList( aArr, true ); + sal_uInt16 nCnt = pSh->GetSeqFtnList( aArr, true ); - for( USHORT n = 0; n < nCnt; ++n ) + for( sal_uInt16 n = 0; n < nCnt; ++n ) { aSelectionLB.InsertEntry( aArr[ n ]->sDlgEntry ); if (IsFldEdit() && pRefFld->GetSeqNo() == aArr[ n ]->nSeqNo) @@ -628,8 +628,8 @@ void SwFldRefPage::UpdateSubType() if(IsFldEdit()) sOldSel.Erase(); - USHORT nCnt = pType->GetSeqFldList( aArr ); - for( USHORT n = 0; n < nCnt; ++n ) + sal_uInt16 nCnt = pType->GetSeqFldList( aArr ); + for( sal_uInt16 n = 0; n < nCnt; ++n ) { aSelectionLB.InsertEntry( aArr[ n ]->sDlgEntry ); if (IsFldEdit() && !sOldSel.Len() && @@ -646,7 +646,7 @@ void SwFldRefPage::UpdateSubType() { SvStringsDtor aLst; GetFldMgr().GetSubTypes(nTypeId, aLst); - for (USHORT i = 0; i < aLst.Count(); ++i) + for (sal_uInt16 i = 0; i < aLst.Count(); ++i) aSelectionLB.InsertEntry(*aLst[i]); if (IsFldEdit()) @@ -658,9 +658,9 @@ void SwFldRefPage::UpdateSubType() aSelectionLB.Show( !bShowSelectionToolTipLB ); if ( bShowSelectionToolTipLB ) { - aSelectionToolTipLB.SetUpdateMode(TRUE); + aSelectionToolTipLB.SetUpdateMode(sal_True); - BOOL bEnable = aSelectionToolTipLB.GetEntryCount() != 0; + sal_Bool bEnable = aSelectionToolTipLB.GetEntryCount() != 0; aSelectionToolTipLB.Enable( bEnable ); aSelectionFT.Enable( bEnable ); @@ -676,10 +676,10 @@ void SwFldRefPage::UpdateSubType() } else { - aSelectionLB.SetUpdateMode(TRUE); + aSelectionLB.SetUpdateMode(sal_True); // Enable oder Disable - BOOL bEnable = aSelectionLB.GetEntryCount() != 0; + sal_Bool bEnable = aSelectionLB.GetEntryCount() != 0; aSelectionLB.Enable( bEnable ); aSelectionFT.Enable( bEnable ); @@ -696,11 +696,11 @@ void SwFldRefPage::UpdateSubType() // <-- } -USHORT SwFldRefPage::FillFormatLB(USHORT nTypeId) +sal_uInt16 SwFldRefPage::FillFormatLB(sal_uInt16 nTypeId) { String sOldSel; - USHORT nFormatSel = aFormatLB.GetSelectEntryPos(); + sal_uInt16 nFormatSel = aFormatLB.GetSelectEntryPos(); if (nFormatSel != LISTBOX_ENTRY_NOTFOUND) sOldSel = aFormatLB.GetEntry(nFormatSel); @@ -708,7 +708,7 @@ USHORT SwFldRefPage::FillFormatLB(USHORT nTypeId) aFormatLB.Clear(); // Referenz hat weniger als die Beschriftung - USHORT nSize( 0 ); + sal_uInt16 nSize( 0 ); bool bAddCrossRefFormats( false ); switch (nTypeId) { @@ -735,7 +735,7 @@ USHORT SwFldRefPage::FillFormatLB(USHORT nTypeId) } else { - nSize = GetFldMgr().GetFormatCount( nTypeId, FALSE, IsFldDlgHtmlMode() ); + nSize = GetFldMgr().GetFormatCount( nTypeId, sal_False, IsFldDlgHtmlMode() ); } break; } @@ -743,16 +743,16 @@ USHORT SwFldRefPage::FillFormatLB(USHORT nTypeId) if (REFFLDFLAG & nTypeId) nTypeId = TYP_GETREFFLD; - for (USHORT i = 0; i < nSize; i++) + for (sal_uInt16 i = 0; i < nSize; i++) { - USHORT nPos = aFormatLB.InsertEntry(GetFldMgr().GetFormatStr( nTypeId, i )); + sal_uInt16 nPos = aFormatLB.InsertEntry(GetFldMgr().GetFormatStr( nTypeId, i )); aFormatLB.SetEntryData( nPos, reinterpret_cast<void*>(GetFldMgr().GetFormatId( nTypeId, i ))); } // --> OD 2007-11-16 #i83479# if ( bAddCrossRefFormats ) { - USHORT nFormat = FMT_REF_NUMBER - FMT_REF_BEGIN; - USHORT nPos = aFormatLB.InsertEntry(GetFldMgr().GetFormatStr( nTypeId, nFormat )); + sal_uInt16 nFormat = FMT_REF_NUMBER - FMT_REF_BEGIN; + sal_uInt16 nPos = aFormatLB.InsertEntry(GetFldMgr().GetFormatStr( nTypeId, nFormat )); aFormatLB.SetEntryData( nPos, reinterpret_cast<void*>(GetFldMgr().GetFormatId( nTypeId, nFormat ))); nFormat = FMT_REF_NUMBER_NO_CONTEXT - FMT_REF_BEGIN; nPos = aFormatLB.InsertEntry(GetFldMgr().GetFormatStr( nTypeId, nFormat )); @@ -770,7 +770,7 @@ USHORT SwFldRefPage::FillFormatLB(USHORT nTypeId) if (!IsFldEdit()) aFormatLB.SelectEntry(sOldSel); else - aFormatLB.SelectEntry(SW_RESSTR(FMT_REF_BEGIN + (USHORT)GetCurField()->GetFormat())); + aFormatLB.SelectEntry(SW_RESSTR(FMT_REF_BEGIN + (sal_uInt16)GetCurField()->GetFormat())); if (!aFormatLB.GetSelectEntryCount()) { @@ -790,15 +790,15 @@ USHORT SwFldRefPage::FillFormatLB(USHORT nTypeId) IMPL_LINK( SwFldRefPage, ModifyHdl, Edit *, EMPTYARG ) { String aName(aNameED.GetText()); - const USHORT nLen = aName.Len(); + const sal_uInt16 nLen = aName.Len(); - BOOL bEnable = TRUE; - USHORT nTypeId = (USHORT)(ULONG)aTypeLB.GetEntryData(GetTypeSel()); + sal_Bool bEnable = sal_True; + sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel()); if ((nTypeId == TYP_SETREFFLD && !GetFldMgr().CanInsertRefMark(aName)) || (nLen == 0 && (nTypeId == TYP_GETREFFLD || nTypeId == TYP_SETREFFLD || nTypeId == REFFLDFLAG_BOOKMARK))) - bEnable = FALSE; + bEnable = sal_False; EnableInsert(bEnable); @@ -807,20 +807,20 @@ IMPL_LINK( SwFldRefPage, ModifyHdl, Edit *, EMPTYARG ) return 0; } -BOOL SwFldRefPage::FillItemSet(SfxItemSet& ) +sal_Bool SwFldRefPage::FillItemSet(SfxItemSet& ) { - BOOL bModified = FALSE; - USHORT nTypeId = (USHORT)(ULONG)aTypeLB.GetEntryData(GetTypeSel()); + sal_Bool bModified = sal_False; + sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel()); - USHORT nSubType = 0; - ULONG nFormat; + sal_uInt16 nSubType = 0; + sal_uLong nFormat; nFormat = aFormatLB.GetSelectEntryPos(); if(nFormat == LISTBOX_ENTRY_NOTFOUND) nFormat = 0; else - nFormat = (ULONG)aFormatLB.GetEntryData((USHORT)nFormat); + nFormat = (sal_uLong)aFormatLB.GetEntryData((sal_uInt16)nFormat); String aVal(aValueED.GetText()); String aName(aNameED.GetText()); @@ -865,7 +865,7 @@ BOOL SwFldRefPage::FillItemSet(SfxItemSet& ) SwSeqFldList aArr; _SeqFldLstElem aElem( aSelectionLB.GetSelectEntry(), 0 ); - USHORT nPos; + sal_uInt16 nPos; nTypeId = TYP_GETREFFLD; nSubType = REF_FOOTNOTE; @@ -876,7 +876,7 @@ BOOL SwFldRefPage::FillItemSet(SfxItemSet& ) aVal = String::CreateFromInt32( aArr[nPos]->nSeqNo ); if (IsFldEdit() && aArr[nPos]->nSeqNo == pRefFld->GetSeqNo()) - bModified = TRUE; // Kann bei Feldern passieren, deren Referenz geloescht wurde + bModified = sal_True; // Kann bei Feldern passieren, deren Referenz geloescht wurde } else if (IsFldEdit()) aVal = String::CreateFromInt32( pRefFld->GetSeqNo() ); @@ -886,7 +886,7 @@ BOOL SwFldRefPage::FillItemSet(SfxItemSet& ) SwSeqFldList aArr; _SeqFldLstElem aElem( aSelectionLB.GetSelectEntry(), 0 ); - USHORT nPos; + sal_uInt16 nPos; nTypeId = TYP_GETREFFLD; nSubType = REF_ENDNOTE; @@ -897,7 +897,7 @@ BOOL SwFldRefPage::FillItemSet(SfxItemSet& ) aVal = String::CreateFromInt32( aArr[nPos]->nSeqNo ); if (IsFldEdit() && aArr[nPos]->nSeqNo == pRefFld->GetSeqNo()) - bModified = TRUE; // Kann bei Feldern passieren, deren Referenz geloescht wurde + bModified = sal_True; // Kann bei Feldern passieren, deren Referenz geloescht wurde } else if (IsFldEdit()) aVal = String::CreateFromInt32( pRefFld->GetSeqNo() ); @@ -910,7 +910,7 @@ BOOL SwFldRefPage::FillItemSet(SfxItemSet& ) "<SwFldRefPage::FillItemSet(..)> - no entry selected in selection tool tip listbox!" ); if ( pEntry ) { - const sal_uInt16 nOutlIdx( static_cast<sal_uInt16>(reinterpret_cast<ULONG>(pEntry->GetUserData())) ); + const sal_uInt16 nOutlIdx( static_cast<sal_uInt16>(reinterpret_cast<sal_uLong>(pEntry->GetUserData())) ); pSh->getIDocumentOutlineNodesAccess()->getOutlineNodes( maOutlineNodes ); if ( nOutlIdx < maOutlineNodes.size() ) { @@ -930,7 +930,7 @@ BOOL SwFldRefPage::FillItemSet(SfxItemSet& ) "<SwFldRefPage::FillItemSet(..)> - no entry selected in selection tool tip listbox!" ); if ( pEntry ) { - const sal_uInt16 nNumItemIdx( static_cast<sal_uInt16>(reinterpret_cast<ULONG>(pEntry->GetUserData())) ); + const sal_uInt16 nNumItemIdx( static_cast<sal_uInt16>(reinterpret_cast<sal_uLong>(pEntry->GetUserData())) ); pSh->getIDocumentListItemsAccess()->getNumItems( maNumItems ); if ( nNumItemIdx < maNumItems.size() ) { @@ -954,7 +954,7 @@ BOOL SwFldRefPage::FillItemSet(SfxItemSet& ) SwSeqFldList aArr; _SeqFldLstElem aElem( aSelectionLB.GetSelectEntry(), 0 ); - USHORT nPos; + sal_uInt16 nPos; nTypeId = TYP_GETREFFLD; nSubType = REF_SEQUENCEFLD; @@ -965,7 +965,7 @@ BOOL SwFldRefPage::FillItemSet(SfxItemSet& ) aVal = String::CreateFromInt32( aArr[nPos]->nSeqNo ); if (IsFldEdit() && aArr[nPos]->nSeqNo == pRefFld->GetSeqNo()) - bModified = TRUE; // Kann bei Feldern passieren, deren Referenz geloescht wurde + bModified = sal_True; // Kann bei Feldern passieren, deren Referenz geloescht wurde } else if (IsFldEdit()) aVal = String::CreateFromInt32( pRefFld->GetSeqNo() ); @@ -991,7 +991,7 @@ BOOL SwFldRefPage::FillItemSet(SfxItemSet& ) ModifyHdl(); // Insert ggf enablen/disablen - return FALSE; + return sal_False; } SfxTabPage* SwFldRefPage::Create( Window* pParent, @@ -1000,7 +1000,7 @@ SfxTabPage* SwFldRefPage::Create( Window* pParent, return ( new SwFldRefPage( pParent, rAttrSet ) ); } -USHORT SwFldRefPage::GetGroup() +sal_uInt16 SwFldRefPage::GetGroup() { return GRP_REF; } @@ -1010,11 +1010,11 @@ void SwFldRefPage::FillUserData() String sData( String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( USER_DATA_VERSION ))); sData += ';'; - USHORT nTypeSel = aTypeLB.GetSelectEntryPos(); + sal_uInt16 nTypeSel = aTypeLB.GetSelectEntryPos(); if( LISTBOX_ENTRY_NOTFOUND == nTypeSel ) nTypeSel = USHRT_MAX; else - nTypeSel = sal::static_int_cast< USHORT >(reinterpret_cast< sal_uIntPtr >(aTypeLB.GetEntryData( nTypeSel ))); + nTypeSel = sal::static_int_cast< sal_uInt16 >(reinterpret_cast< sal_uIntPtr >(aTypeLB.GetEntryData( nTypeSel ))); sData += String::CreateFromInt32( nTypeSel ); SetUserData(sData); } diff --git a/sw/source/ui/fldui/fldref.hxx b/sw/source/ui/fldui/fldref.hxx index 7550ca110b..cbb67fd9de 100644 --- a/sw/source/ui/fldui/fldref.hxx +++ b/sw/source/ui/fldui/fldref.hxx @@ -80,7 +80,7 @@ class SwFldRefPage : public SwFldPage DECL_LINK( ModifyHdl, Edit *pEd = 0 ); void UpdateSubType(); - USHORT FillFormatLB(USHORT nTypeId); + sal_uInt16 FillFormatLB(sal_uInt16 nTypeId); // --> OD 2007-12-05 #i83479# void SaveSelectedTxtNode(); @@ -89,7 +89,7 @@ class SwFldRefPage : public SwFldPage // <-- protected: - virtual USHORT GetGroup(); + virtual sal_uInt16 GetGroup(); public: SwFldRefPage(Window* pParent, const SfxItemSet& rSet); @@ -98,7 +98,7 @@ public: static SfxTabPage* Create(Window* pParent, const SfxItemSet& rAttrSet); - virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual sal_Bool FillItemSet( SfxItemSet& rSet ); virtual void Reset( const SfxItemSet& rSet ); virtual void FillUserData(); diff --git a/sw/source/ui/fldui/fldref.src b/sw/source/ui/fldui/fldref.src index 8abf02e980..c3aa0f737e 100644 --- a/sw/source/ui/fldui/fldref.src +++ b/sw/source/ui/fldui/fldref.src @@ -43,6 +43,7 @@ TabPage TP_FLD_REF }; ListBox LB_REFTYPE { + HelpID = "sw:ListBox:TP_FLD_REF:LB_REFTYPE"; Border = TRUE ; Pos = MAP_APPFONT ( 6 , 14 ) ; Size = MAP_APPFONT ( 76 , 165 ) ; @@ -58,6 +59,7 @@ TabPage TP_FLD_REF }; ListBox LB_REFSELECTION { + HelpID = "sw:ListBox:TP_FLD_REF:LB_REFSELECTION"; Border = TRUE ; Pos = MAP_APPFONT ( 88 , 14 ) ; Size = MAP_APPFONT ( 166 , 73 ) ; @@ -82,6 +84,7 @@ TabPage TP_FLD_REF }; ListBox LB_REFFORMAT { + HelpID = "sw:ListBox:TP_FLD_REF:LB_REFFORMAT"; Border = TRUE ; Pos = MAP_APPFONT ( 88 , 104 ) ; Size = MAP_APPFONT ( 76 , 75 ) ; @@ -98,6 +101,7 @@ TabPage TP_FLD_REF }; Edit ED_REFNAME { + HelpID = "sw:Edit:TP_FLD_REF:ED_REFNAME"; Border = TRUE ; Pos = MAP_APPFONT ( 170 , 104 ) ; Size = MAP_APPFONT ( 84 , 12 ) ; @@ -114,6 +118,7 @@ TabPage TP_FLD_REF }; Edit ED_REFVALUE { + HelpID = "sw:Edit:TP_FLD_REF:ED_REFVALUE"; Border = TRUE ; Pos = MAP_APPFONT ( 170 , 136 ) ; Size = MAP_APPFONT ( 84 , 12 ) ; diff --git a/sw/source/ui/fldui/fldtdlg.cxx b/sw/source/ui/fldui/fldtdlg.cxx index db2e9b674a..f7d95cebf6 100644 --- a/sw/source/ui/fldui/fldtdlg.cxx +++ b/sw/source/ui/fldui/fldtdlg.cxx @@ -75,7 +75,7 @@ SwFldDlg::SwFldDlg(SfxBindings* pB, SwChildWinWrapper* pCW, Window *pParent) : SfxTabDialog( pParent, SW_RES( DLG_FLD_INSERT )), m_pChildWin(pCW), m_pBindings(pB), - m_bDataBaseMode(FALSE) + m_bDataBaseMode(sal_False) { SetStyle(GetStyle()|WB_STDMODELESS); m_bHtmlMode = (::GetHtmlMode((SwDocShell*)SfxObjectShell::Current()) & HTMLMODE_ON) != 0; @@ -133,12 +133,12 @@ SwFldDlg::~SwFldDlg() { } -BOOL SwFldDlg::Close() +sal_Bool SwFldDlg::Close() { m_pBindings->GetDispatcher()-> Execute(m_bDataBaseMode ? FN_INSERT_FIELD_DATA_ONLY : FN_INSERT_FIELD, SFX_CALLMODE_ASYNCHRON|SFX_CALLMODE_RECORD); - return TRUE; + return sal_True; } void SwFldDlg::Initialize(SfxChildWinInfo *pInfo) @@ -187,7 +187,7 @@ void SwFldDlg::Initialize(SfxChildWinInfo *pInfo) SetPosPixel( aPos ); } -SfxItemSet* SwFldDlg::CreateInputItemSet( USHORT nID ) +SfxItemSet* SwFldDlg::CreateInputItemSet( sal_uInt16 nID ) { if ( nID == TP_FLD_DOKINF ) { @@ -232,7 +232,7 @@ IMPL_LINK( SwFldDlg, OKHdl, Button *, EMPTYARG ) void SwFldDlg::ReInitDlg() { SwDocShell* pDocSh = (SwDocShell*)SfxObjectShell::Current(); - BOOL bNewMode = (::GetHtmlMode(pDocSh) & HTMLMODE_ON) != 0; + sal_Bool bNewMode = (::GetHtmlMode(pDocSh) & HTMLMODE_ON) != 0; if (bNewMode != m_bHtmlMode) { @@ -266,7 +266,7 @@ void SwFldDlg::ReInitDlg() Beschreibung: Nach Dok-Wechsel TabPage neu initialisieren --------------------------------------------------------------------*/ -void SwFldDlg::ReInitTabPage( USHORT nPageId, BOOL bOnlyActivate ) +void SwFldDlg::ReInitTabPage( sal_uInt16 nPageId, sal_Bool bOnlyActivate ) { SwFldPage* pPage = (SwFldPage* )GetTabPage(nPageId); @@ -283,22 +283,22 @@ void SwFldDlg::Activate() SwView* pView = ::GetActiveView(); if( pView ) { - BOOL bHtmlMode = (::GetHtmlMode((SwDocShell*)SfxObjectShell::Current()) & HTMLMODE_ON) != 0; + sal_Bool bHtmlMode = (::GetHtmlMode((SwDocShell*)SfxObjectShell::Current()) & HTMLMODE_ON) != 0; const SwWrtShell& rSh = pView->GetWrtShell(); GetOKButton().Enable( !rSh.IsReadOnlyAvailable() || !rSh.HasReadonlySel() ); - ReInitTabPage( TP_FLD_VAR, TRUE ); + ReInitTabPage( TP_FLD_VAR, sal_True ); if( !bHtmlMode ) { - ReInitTabPage( TP_FLD_REF, TRUE ); - ReInitTabPage( TP_FLD_FUNC, TRUE ); + ReInitTabPage( TP_FLD_REF, sal_True ); + ReInitTabPage( TP_FLD_FUNC, sal_True ); } } } -void SwFldDlg::EnableInsert(BOOL bEnable) +void SwFldDlg::EnableInsert(sal_Bool bEnable) { if( bEnable ) { @@ -307,7 +307,7 @@ void SwFldDlg::EnableInsert(BOOL bEnable) if( !pView || (pView->GetWrtShell().IsReadOnlyAvailable() && pView->GetWrtShell().HasReadonlySel()) ) - bEnable = FALSE; + bEnable = sal_False; } GetOKButton().Enable(bEnable); } @@ -319,7 +319,7 @@ void SwFldDlg::InsertHdl() void SwFldDlg::ActivateDatabasePage() { - m_bDataBaseMode = TRUE; + m_bDataBaseMode = sal_True; ShowPage( TP_FLD_DB ); SfxTabPage* pDBPage = GetTabPage( TP_FLD_DB ); if( pDBPage ) @@ -334,7 +334,7 @@ void SwFldDlg::ActivateDatabasePage() RemoveTabPage(TP_FLD_FUNC); } -void SwFldDlg::PageCreated(USHORT nId, SfxTabPage& rPage) +void SwFldDlg::PageCreated(sal_uInt16 nId, SfxTabPage& rPage) { if( TP_FLD_DB == nId) { diff --git a/sw/source/ui/fldui/fldvar.cxx b/sw/source/ui/fldui/fldvar.cxx index f685f0f008..ac957ec218 100644 --- a/sw/source/ui/fldui/fldvar.cxx +++ b/sw/source/ui/fldui/fldvar.cxx @@ -74,7 +74,7 @@ SwFldVarPage::SwFldVarPage(Window* pParent, const SfxItemSet& rCoreSet ) : aSeparatorFT (this, SW_RES(FT_VARSEPARATOR)), aSeparatorED (this, SW_RES(ED_VARSEPARATOR)), aNewDelTBX (this, SW_RES(TBX_VARNEWDEL)), - bInit (TRUE) + bInit (sal_True) { FreeResource(); @@ -89,12 +89,12 @@ SwFldVarPage::SwFldVarPage(Window* pParent, const SfxItemSet& rCoreSet ) : sOldValueFT = aValueFT.GetText(); sOldNameFT = aNameFT.GetText(); - for (USHORT i = 1; i <= MAXLEVEL; i++) + for (sal_uInt16 i = 1; i <= MAXLEVEL; i++) aChapterLevelLB.InsertEntry(String::CreateFromInt32(i)); aChapterLevelLB.SelectEntryPos(0); //enable 'active' language selection - aNumFormatLB.SetShowLanguageControl(TRUE); + aNumFormatLB.SetShowLanguageControl(sal_True); } SwFldVarPage::~SwFldVarPage() @@ -107,10 +107,10 @@ void SwFldVarPage::Reset(const SfxItemSet& ) Init(); // Allgemeine initialisierung - aTypeLB.SetUpdateMode(FALSE); + aTypeLB.SetUpdateMode(sal_False); aTypeLB.Clear(); - USHORT nPos, nTypeId; + sal_uInt16 nPos, nTypeId; if (!IsFldEdit()) { @@ -165,11 +165,11 @@ void SwFldVarPage::Reset(const SfxItemSet& ) if(!IsRefresh() && sUserData.GetToken(0, ';').EqualsIgnoreCaseAscii(USER_DATA_VERSION_1)) { String sVal = sUserData.GetToken(1, ';'); - USHORT nVal = (USHORT)sVal.ToInt32(); + sal_uInt16 nVal = (sal_uInt16)sVal.ToInt32(); if( USHRT_MAX != nVal ) { - for(USHORT i = 0; i < aTypeLB.GetEntryCount(); i++) - if(nVal == (USHORT)(ULONG)aTypeLB.GetEntryData(i)) + for(sal_uInt16 i = 0; i < aTypeLB.GetEntryCount(); i++) + if(nVal == (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(i)) { aTypeLB.SelectEntryPos(i); break; @@ -179,7 +179,7 @@ void SwFldVarPage::Reset(const SfxItemSet& ) } TypeHdl(0); - aTypeLB.SetUpdateMode(TRUE); + aTypeLB.SetUpdateMode(sal_True); if (IsFldEdit()) { @@ -197,7 +197,7 @@ void SwFldVarPage::Reset(const SfxItemSet& ) IMPL_LINK( SwFldVarPage, TypeHdl, ListBox *, EMPTYARG ) { // Alte ListBoxPos sichern - const USHORT nOld = GetTypeSel(); + const sal_uInt16 nOld = GetTypeSel(); // Aktuelle ListBoxPos SetTypeSel(aTypeLB.GetSelectEntryPos()); @@ -210,29 +210,29 @@ IMPL_LINK( SwFldVarPage, TypeHdl, ListBox *, EMPTYARG ) if (nOld != GetTypeSel() || nOld == LISTBOX_ENTRY_NOTFOUND) { - bInit = TRUE; + bInit = sal_True; if (nOld != LISTBOX_ENTRY_NOTFOUND) { aNameED.SetText(aEmptyStr); aValueED.SetText(aEmptyStr); } - aValueED.SetDropEnable(FALSE); + aValueED.SetDropEnable(sal_False); UpdateSubType(); // Auswahl-Listboxen initialisieren } - bInit = FALSE; + bInit = sal_False; return 0; } IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox ) { - USHORT nTypeId = (USHORT)(ULONG)aTypeLB.GetEntryData(GetTypeSel()); - USHORT nSelPos = aSelectionLB.GetSelectEntryPos(); + sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel()); + sal_uInt16 nSelPos = aSelectionLB.GetSelectEntryPos(); if (nSelPos != LISTBOX_ENTRY_NOTFOUND) - nSelPos = (USHORT)(ULONG)aSelectionLB.GetEntryData(nSelPos); + nSelPos = (sal_uInt16)(sal_uLong)aSelectionLB.GetEntryData(nSelPos); if (IsFldEdit() && (!pBox || bInit)) { @@ -247,15 +247,15 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox ) if (aValueFT.GetText() != sOldValueFT) aValueFT.SetText(sOldValueFT); - aNumFormatLB.SetUpdateMode(FALSE); - aFormatLB.SetUpdateMode(FALSE); + aNumFormatLB.SetUpdateMode(sal_False); + aFormatLB.SetUpdateMode(sal_False); FillFormatLB(nTypeId); - USHORT nSize = aFormatLB.GetEntryCount(); + sal_uInt16 nSize = aFormatLB.GetEntryCount(); - BOOL bValue = FALSE, bName = FALSE, bNumFmt = FALSE, - bInvisible = FALSE, bSeparator = FALSE, bChapterLevel = FALSE; - BOOL bFormat = nSize != 0; + sal_Bool bValue = sal_False, bName = sal_False, bNumFmt = sal_False, + bInvisible = sal_False, bSeparator = sal_False, bChapterLevel = sal_False; + sal_Bool bFormat = nSize != 0; switch (nTypeId) { @@ -293,23 +293,23 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox ) aValueED.SetText(aEmptyStr); } } - bValue = bName = bNumFmt = bInvisible = TRUE; + bValue = bName = bNumFmt = bInvisible = sal_True; - aValueED.SetDropEnable(TRUE); + aValueED.SetDropEnable(sal_True); break; } case TYP_SETFLD: - bValue = TRUE; + bValue = sal_True; - bNumFmt = bInvisible = TRUE; + bNumFmt = bInvisible = sal_True; if (!IsFldDlgHtmlMode()) - bName = TRUE; + bName = sal_True; else { aNumFormatLB.Clear(); - USHORT nPos = aNumFormatLB.InsertEntry(SW_RESSTR(FMT_SETVAR_TEXT), 0); + sal_uInt16 nPos = aNumFormatLB.InsertEntry(SW_RESSTR(FMT_SETVAR_TEXT), 0); aNumFormatLB.SetEntryData(nPos, (void *)ULONG_MAX); aNumFormatLB.SelectEntryPos(0); } @@ -346,15 +346,15 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox ) // (statt test2 = test + 1) aValueED.SetText(((SwSetExpField*)GetCurField())->GetFormula()); } - aValueED.SetDropEnable(TRUE); + aValueED.SetDropEnable(sal_True); break; case TYP_FORMELFLD: { - bValue = TRUE; - bNumFmt = TRUE; + bValue = sal_True; + bNumFmt = sal_True; aValueFT.SetText(SW_RESSTR(STR_FORMULA)); - aValueED.SetDropEnable(TRUE); + aValueED.SetDropEnable(sal_True); } break; @@ -384,14 +384,14 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox ) if(pSetTyp) { if (pSetTyp->GetType() & nsSwGetSetExpType::GSE_STRING) // Textuell? - bFormat = TRUE; + bFormat = sal_True; else // Numerisch - bNumFmt = TRUE; + bNumFmt = sal_True; } } } else - bFormat = FALSE; + bFormat = sal_False; EnableInsert(bFormat|bNumFmt); } @@ -402,7 +402,7 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox ) if (nSelPos != LISTBOX_ENTRY_NOTFOUND) { - bValue = bNumFmt = TRUE; + bValue = bNumFmt = sal_True; String sName; @@ -410,8 +410,8 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox ) aNameED.SetText( sName ); // User- oder SetField ? - USHORT nInpType = 0; - nInpType = static_cast< USHORT >(GetFldMgr().GetFldType(RES_USERFLD, sName) ? 0 : TYP_SETINPFLD); + sal_uInt16 nInpType = 0; + nInpType = static_cast< sal_uInt16 >(GetFldMgr().GetFldType(RES_USERFLD, sName) ? 0 : TYP_SETINPFLD); if (nInpType) // SETEXPFLD { @@ -425,7 +425,7 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox ) { aNumFormatLB.Clear(); - USHORT nPos = aNumFormatLB.InsertEntry(SW_RESSTR(FMT_USERVAR_TEXT), 0); + sal_uInt16 nPos = aNumFormatLB.InsertEntry(SW_RESSTR(FMT_USERVAR_TEXT), 0); aNumFormatLB.SetEntryData(nPos, (void *)ULONG_MAX); aNumFormatLB.SelectEntryPos(0); } @@ -434,7 +434,7 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox ) aValueED.SetText(((SwSetExpField*)GetCurField())->GetPromptText()); } else // USERFLD - bFormat = bNumFmt = FALSE; + bFormat = bNumFmt = sal_False; } break; @@ -455,7 +455,7 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox ) //JP 28.08.95: DDE-Topics/-Items koennen Blanks in ihren // Namen haben! Wird hier noch nicht beachtet String sCmd( pType->GetCmd() ); - USHORT nTmpPos = sCmd.SearchAndReplace( sfx2::cTokenSeperator, ' ' ); + sal_uInt16 nTmpPos = sCmd.SearchAndReplace( sfx2::cTokenSeperator, ' ' ); sCmd.SearchAndReplace( sfx2::cTokenSeperator, ' ', nTmpPos ); aValueED.SetText( sCmd ); @@ -463,12 +463,12 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox ) } } } - bName = bValue = TRUE; + bName = bValue = sal_True; break; case TYP_SEQFLD: { - bName = bValue = bSeparator = bChapterLevel = TRUE; + bName = bValue = bSeparator = bChapterLevel = sal_True; SwFieldType* pFldTyp; if( IsFldEdit() ) @@ -492,7 +492,7 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox ) if( pFldTyp ) { - BYTE nLevel = ((SwSetExpFieldType*)pFldTyp)->GetOutlineLvl(); + sal_uInt8 nLevel = ((SwSetExpFieldType*)pFldTyp)->GetOutlineLvl(); if( 0x7f == nLevel ) aChapterLevelLB.SelectEntryPos( 0 ); else @@ -506,7 +506,7 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox ) case TYP_SETREFPAGEFLD: { - bValue = FALSE; + bValue = sal_False; aValueFT.SetText( SW_RESSTR( STR_OFFSET )); if (IsFldEdit() || pBox) // Nur bei Interaktion mit Maus @@ -514,7 +514,7 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox ) if (nSelPos != 0 && nSelPos != LISTBOX_ENTRY_NOTFOUND) { - bValue = TRUE; // SubType OFF - kennt keinen Offset + bValue = sal_True; // SubType OFF - kennt keinen Offset if (IsFldEdit()) aValueED.SetText(String::CreateFromInt32(((SwRefPageSetField*)GetCurField())->GetOffset())); } @@ -531,7 +531,7 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox ) aFormatLB.Show(!bNumFmt); if (IsFldEdit()) - bName = FALSE; + bName = sal_False; aFormatLB.Enable(bFormat); aFormatFT.Enable(bFormat|bNumFmt); @@ -559,12 +559,12 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox ) ModifyHdl(); // Anwenden/Einfuegen/Loeschen Status update - aNumFormatLB.SetUpdateMode(TRUE); - aFormatLB.SetUpdateMode(TRUE); + aNumFormatLB.SetUpdateMode(sal_True); + aFormatLB.SetUpdateMode(sal_True); if(aSelectionLB.IsCallAddSelection()) { - nTypeId = (USHORT)(ULONG)aTypeLB.GetEntryData(GetTypeSel()); + nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel()); switch (nTypeId) { @@ -573,7 +573,7 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox ) nSelPos = aSelectionLB.GetSelectEntryPos(); if (nSelPos != LISTBOX_ENTRY_NOTFOUND) - nSelPos = (USHORT)(ULONG)aSelectionLB.GetEntryData(nSelPos); + nSelPos = (sal_uInt16)(sal_uLong)aSelectionLB.GetEntryData(nSelPos); if (nSelPos != LISTBOX_ENTRY_NOTFOUND && pBox && !bInit) { @@ -594,22 +594,22 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox ) void SwFldVarPage::UpdateSubType() { String sOldSel; - USHORT nTypeId = (USHORT)(ULONG)aTypeLB.GetEntryData(GetTypeSel()); + sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel()); SetSelectionSel(aSelectionLB.GetSelectEntryPos()); if(GetSelectionSel() != LISTBOX_ENTRY_NOTFOUND) sOldSel = aSelectionLB.GetEntry(GetSelectionSel()); // Auswahl-Listbox fuellen - aSelectionLB.SetUpdateMode(FALSE); + aSelectionLB.SetUpdateMode(sal_False); aSelectionLB.Clear(); SvStringsDtor aList; GetFldMgr().GetSubTypes(nTypeId, aList); - USHORT nCount = aList.Count(); - USHORT nPos; + sal_uInt16 nCount = aList.Count(); + sal_uInt16 nPos; - for (USHORT i = 0; i < nCount; ++i) + for (sal_uInt16 i = 0; i < nCount; ++i) { if (nTypeId != TYP_INPUTFLD || i) { @@ -620,29 +620,29 @@ void SwFldVarPage::UpdateSubType() } else { - BOOL bInsert = FALSE; + sal_Bool bInsert = sal_False; switch (nTypeId) { case TYP_INPUTFLD: if (*aList[i] == GetCurField()->GetPar1()) - bInsert = TRUE; + bInsert = sal_True; break; case TYP_FORMELFLD: - bInsert = TRUE; + bInsert = sal_True; break; case TYP_GETFLD: if (*aList[i] == ((SwFormulaField*)GetCurField())->GetFormula()) - bInsert = TRUE; + bInsert = sal_True; break; case TYP_SETFLD: case TYP_USERFLD: if (*aList[i] == GetCurField()->GetTyp()->GetName()) { - bInsert = TRUE; + bInsert = sal_True; if (GetCurField()->GetSubType() & nsSwExtendedSubType::SUB_INVISIBLE) aInvisibleCB.Check(); } @@ -660,7 +660,7 @@ void SwFldVarPage::UpdateSubType() default: if (*aList[i] == GetCurField()->GetPar1()) - bInsert = TRUE; + bInsert = sal_True; break; } if (bInsert) @@ -674,7 +674,7 @@ void SwFldVarPage::UpdateSubType() } } - BOOL bEnable = aSelectionLB.GetEntryCount() != 0; + sal_Bool bEnable = aSelectionLB.GetEntryCount() != 0; ListBox *pLB = 0; if (bEnable) @@ -691,19 +691,19 @@ void SwFldVarPage::UpdateSubType() aSelectionFT.Enable( bEnable ); SubTypeHdl(pLB); - aSelectionLB.SetUpdateMode(TRUE); + aSelectionLB.SetUpdateMode(sal_True); } -USHORT SwFldVarPage::FillFormatLB(USHORT nTypeId) +sal_uInt16 SwFldVarPage::FillFormatLB(sal_uInt16 nTypeId) { String sOldSel, sOldNumSel; - ULONG nOldNumFormat = 0; + sal_uLong nOldNumFormat = 0; - USHORT nFormatSel = aFormatLB.GetSelectEntryPos(); + sal_uInt16 nFormatSel = aFormatLB.GetSelectEntryPos(); if (nFormatSel != LISTBOX_ENTRY_NOTFOUND) sOldSel = aFormatLB.GetEntry(nFormatSel); - USHORT nNumFormatSel = aNumFormatLB.GetSelectEntryPos(); + sal_uInt16 nNumFormatSel = aNumFormatLB.GetSelectEntryPos(); if (nNumFormatSel != LISTBOX_ENTRY_NOTFOUND) { sOldNumSel = aNumFormatLB.GetEntry(nNumFormatSel); @@ -713,7 +713,7 @@ USHORT SwFldVarPage::FillFormatLB(USHORT nTypeId) // Format-Listbox fuellen aFormatLB.Clear(); aNumFormatLB.Clear(); - BOOL bSpecialFmt = FALSE; + sal_Bool bSpecialFmt = sal_False; if( TYP_GETREFPAGEFLD != nTypeId ) { @@ -745,7 +745,7 @@ USHORT SwFldVarPage::FillFormatLB(USHORT nTypeId) { if (!IsFldEdit() || bSpecialFmt) { - USHORT nPos = aNumFormatLB.InsertEntry(SW_RESSTR(FMT_MARK_TEXT), 0); + sal_uInt16 nPos = aNumFormatLB.InsertEntry(SW_RESSTR(FMT_MARK_TEXT), 0); aNumFormatLB.SetEntryData(nPos, (void *)ULONG_MAX); nPos = aNumFormatLB.InsertEntry(SW_RESSTR(FMT_USERVAR_CMD), 1); aNumFormatLB.SetEntryData(nPos, (void *)ULONG_MAX); @@ -757,7 +757,7 @@ USHORT SwFldVarPage::FillFormatLB(USHORT nTypeId) { if (!IsFldEdit() || bSpecialFmt) { - USHORT nPos = aNumFormatLB.InsertEntry(SW_RESSTR(FMT_SETVAR_TEXT), 0); + sal_uInt16 nPos = aNumFormatLB.InsertEntry(SW_RESSTR(FMT_SETVAR_TEXT), 0); aNumFormatLB.SetEntryData(nPos, (void *)ULONG_MAX); } } @@ -765,14 +765,14 @@ USHORT SwFldVarPage::FillFormatLB(USHORT nTypeId) case TYP_FORMELFLD: { - USHORT nPos = aNumFormatLB.InsertEntry(SW_RESSTR(FMT_GETVAR_NAME), 0); + sal_uInt16 nPos = aNumFormatLB.InsertEntry(SW_RESSTR(FMT_GETVAR_NAME), 0); aNumFormatLB.SetEntryData(nPos, (void *)ULONG_MAX); } break; case TYP_GETFLD: { - USHORT nPos = aNumFormatLB.InsertEntry(SW_RESSTR(FMT_GETVAR_NAME), 0); + sal_uInt16 nPos = aNumFormatLB.InsertEntry(SW_RESSTR(FMT_GETVAR_NAME), 0); aNumFormatLB.SetEntryData(nPos, (void *)ULONG_MAX); } break; @@ -793,12 +793,12 @@ USHORT SwFldVarPage::FillFormatLB(USHORT nTypeId) aNumFormatLB.SelectEntry(sOldSel); } - USHORT nSize = GetFldMgr().GetFormatCount(nTypeId, FALSE, IsFldDlgHtmlMode()); + sal_uInt16 nSize = GetFldMgr().GetFormatCount(nTypeId, sal_False, IsFldDlgHtmlMode()); - for (USHORT i = 0; i < nSize; i++) + for (sal_uInt16 i = 0; i < nSize; i++) { - USHORT nPos = aFormatLB.InsertEntry(GetFldMgr().GetFormatStr(nTypeId, i)); - USHORT nFldId = GetFldMgr().GetFormatId( nTypeId, i ); + sal_uInt16 nPos = aFormatLB.InsertEntry(GetFldMgr().GetFormatStr(nTypeId, i)); + sal_uInt16 nFldId = GetFldMgr().GetFormatId( nTypeId, i ); aFormatLB.SetEntryData( nPos, reinterpret_cast<void*>(nFldId) ); if (IsFldEdit() && nFldId == GetCurField()->GetFormat()) aFormatLB.SelectEntryPos( nPos ); @@ -829,9 +829,9 @@ USHORT SwFldVarPage::FillFormatLB(USHORT nTypeId) IMPL_LINK( SwFldVarPage, ModifyHdl, Edit *, EMPTYARG ) { String sValue(aValueED.GetText()); - BOOL bHasValue = sValue.Len() != 0; - USHORT nTypeId = (USHORT)(ULONG)aTypeLB.GetEntryData(GetTypeSel()); - BOOL bInsert = FALSE, bApply = FALSE, bDelete = FALSE; + sal_Bool bHasValue = sValue.Len() != 0; + sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel()); + sal_Bool bInsert = sal_False, bApply = sal_False, bDelete = sal_False; String sName( aNameED.GetText() ); xub_StrLen nLen = sName.Len(); @@ -861,7 +861,7 @@ IMPL_LINK( SwFldVarPage, ModifyHdl, Edit *, EMPTYARG ) if( nLen ) { // Gibts schon einen entsprechenden Type - bInsert = bApply = TRUE; + bInsert = bApply = sal_True; SwFieldType* pType = GetFldMgr().GetFldType(RES_DDEFLD, sName); @@ -890,13 +890,13 @@ IMPL_LINK( SwFldVarPage, ModifyHdl, Edit *, EMPTYARG ) { // Benutzerfelder duerfen auch ohne Inhalt eingefuegt werden! // Bug #56845 - bInsert = bApply = TRUE; + bInsert = bApply = sal_True; } } break; default: - bInsert = TRUE; + bInsert = sal_True; if (nTypeId == TYP_SETFLD || nTypeId == TYP_SEQFLD) { @@ -912,7 +912,7 @@ IMPL_LINK( SwFldVarPage, ModifyHdl, Edit *, EMPTYARG ) if(pSh) { const SwFldTypes* p = pSh->GetDoc()->GetFldTypes(); - USHORT i; + sal_uInt16 i; for (i = 0; i < INIT_FLDTYPES; i++) { @@ -922,26 +922,26 @@ IMPL_LINK( SwFldVarPage, ModifyHdl, Edit *, EMPTYARG ) } if (i >= INIT_FLDTYPES && !pSh->IsUsed(*pFldType)) - bDelete = TRUE; + bDelete = sal_True; if (nTypeId == TYP_SEQFLD && !(pFldType->GetType() & nsSwGetSetExpType::GSE_SEQ)) - bInsert = FALSE; + bInsert = sal_False; if (nTypeId == TYP_SETFLD && (pFldType->GetType() & nsSwGetSetExpType::GSE_SEQ)) - bInsert = FALSE; + bInsert = sal_False; } } if (GetFldMgr().GetFldType(RES_USERFLD, sName)) - bInsert = FALSE; + bInsert = sal_False; } if( !nLen && ( nTypeId == TYP_SETFLD || (!IsFldEdit() && nTypeId == TYP_GETFLD ) ) ) - bInsert = FALSE; + bInsert = sal_False; if( (nTypeId == TYP_SETFLD || nTypeId == TYP_FORMELFLD) && !bHasValue ) - bInsert = FALSE; + bInsert = sal_False; break; } @@ -954,7 +954,7 @@ IMPL_LINK( SwFldVarPage, ModifyHdl, Edit *, EMPTYARG ) IMPL_LINK( SwFldVarPage, TBClickHdl, ToolBox *, pBox ) { - USHORT nTypeId = (USHORT)(ULONG)aTypeLB.GetEntryData(GetTypeSel()); + sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel()); switch (pBox->GetCurItemId()) { @@ -964,7 +964,7 @@ IMPL_LINK( SwFldVarPage, TBClickHdl, ToolBox *, pBox ) GetFldMgr().RemoveFldType(RES_USERFLD, aSelectionLB.GetSelectEntry()); else { - USHORT nWhich; + sal_uInt16 nWhich; switch(nTypeId) { @@ -995,8 +995,8 @@ IMPL_LINK( SwFldVarPage, TBClickHdl, ToolBox *, pBox ) { String sName(aNameED.GetText()), sValue(aValueED.GetText()); SwFieldType* pType = 0; - USHORT nId = 0; - USHORT nNumFormatPos = aNumFormatLB.GetSelectEntryPos(); + sal_uInt16 nId = 0; + sal_uInt16 nNumFormatPos = aNumFormatLB.GetSelectEntryPos(); switch (nTypeId) { @@ -1006,9 +1006,9 @@ IMPL_LINK( SwFldVarPage, TBClickHdl, ToolBox *, pBox ) } pType = GetFldMgr().GetFldType(nId, sName); - ULONG nFormat = aFormatLB.GetSelectEntryPos(); + sal_uLong nFormat = aFormatLB.GetSelectEntryPos(); if (nFormat != LISTBOX_ENTRY_NOTFOUND) - nFormat = (ULONG)aFormatLB.GetEntryData((USHORT)nFormat); + nFormat = (sal_uLong)aFormatLB.GetEntryData((sal_uInt16)nFormat); if (pType) // Aendern { @@ -1023,7 +1023,7 @@ IMPL_LINK( SwFldVarPage, TBClickHdl, ToolBox *, pBox ) { if (nNumFormatPos != LISTBOX_ENTRY_NOTFOUND) { - ULONG nFmt = nNumFormatPos == 0 ? 0 : aNumFormatLB.GetFormat(); + sal_uLong nFmt = nNumFormatPos == 0 ? 0 : aNumFormatLB.GetFormat(); if (nFmt) { // Sprache auf Office-Sprache umstellen, da String im Office // Format vom Kalkulator erwartet wird und so in den Dlg @@ -1041,10 +1041,10 @@ IMPL_LINK( SwFldVarPage, TBClickHdl, ToolBox *, pBox ) { //JP 28.08.95: DDE-Topics/-Items koennen Blanks in ihren // Namen haben! Wird hier noch nicht beachtet. - USHORT nTmpPos = sValue.SearchAndReplace( ' ', sfx2::cTokenSeperator ); + sal_uInt16 nTmpPos = sValue.SearchAndReplace( ' ', sfx2::cTokenSeperator ); sValue.SearchAndReplace( ' ', sfx2::cTokenSeperator, nTmpPos ); ((SwDDEFieldType*)pType)->SetCmd(sValue); - ((SwDDEFieldType*)pType)->SetType((USHORT)nFormat); + ((SwDDEFieldType*)pType)->SetType((sal_uInt16)nFormat); } } pType->UpdateFlds(); @@ -1079,10 +1079,10 @@ IMPL_LINK( SwFldVarPage, TBClickHdl, ToolBox *, pBox ) { //JP 28.08.95: DDE-Topics/-Items koennen Blanks in ihren // Namen haben! Wird hier noch nicht beachtet. - USHORT nTmpPos = sValue.SearchAndReplace( ' ', sfx2::cTokenSeperator ); + sal_uInt16 nTmpPos = sValue.SearchAndReplace( ' ', sfx2::cTokenSeperator ); sValue.SearchAndReplace( ' ', sfx2::cTokenSeperator, nTmpPos ); - SwDDEFieldType aType(sName, sValue, (USHORT)nFormat); + SwDDEFieldType aType(sName, sValue, (sal_uInt16)nFormat); aSelectionLB.InsertEntry(sName); aSelectionLB.SelectEntry(sName); GetFldMgr().InsertFldType(aType); // DDE-Feld Neu @@ -1097,12 +1097,12 @@ IMPL_LINK( SwFldVarPage, TBClickHdl, ToolBox *, pBox ) break; } - return TRUE; + return sal_True; } IMPL_LINK( SwFldVarPage, ChapterHdl, ListBox *, EMPTYARG ) { - BOOL bEnable = aChapterLevelLB.GetSelectEntryPos() != 0; + sal_Bool bEnable = aChapterLevelLB.GetSelectEntryPos() != 0; aSeparatorED.Enable(bEnable); aSeparatorFT.Enable(bEnable); @@ -1113,27 +1113,27 @@ IMPL_LINK( SwFldVarPage, ChapterHdl, ListBox *, EMPTYARG ) IMPL_LINK( SwFldVarPage, SeparatorHdl, Edit *, EMPTYARG ) { - BOOL bEnable = aSeparatorED.GetText().Len() != 0 || + sal_Bool bEnable = aSeparatorED.GetText().Len() != 0 || aChapterLevelLB.GetSelectEntryPos() == 0; EnableInsert(bEnable); return 0; } -BOOL SwFldVarPage::FillItemSet(SfxItemSet& ) +sal_Bool SwFldVarPage::FillItemSet(SfxItemSet& ) { - USHORT nTypeId = (USHORT)(ULONG)aTypeLB.GetEntryData(GetTypeSel()); + sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel()); String aVal(aValueED.GetText()); String aName(aNameED.GetText()); - USHORT nSubType = aSelectionLB.GetSelectEntryPos(); + sal_uInt16 nSubType = aSelectionLB.GetSelectEntryPos(); if(nSubType == LISTBOX_ENTRY_NOTFOUND) nSubType = 0; else - nSubType = (USHORT)(ULONG)aSelectionLB.GetEntryData(nSubType); + nSubType = (sal_uInt16)(sal_uLong)aSelectionLB.GetEntryData(nSubType); - ULONG nFormat; + sal_uLong nFormat; if (!aNumFormatLB.IsVisible()) { @@ -1142,7 +1142,7 @@ BOOL SwFldVarPage::FillItemSet(SfxItemSet& ) if(nFormat == LISTBOX_ENTRY_NOTFOUND) nFormat = 0; else - nFormat = (ULONG)aFormatLB.GetEntryData((USHORT)nFormat); + nFormat = (sal_uLong)aFormatLB.GetEntryData((sal_uInt16)nFormat); } else { @@ -1193,7 +1193,7 @@ BOOL SwFldVarPage::FillItemSet(SfxItemSet& ) case TYP_INPUTFLD: { SwFieldType* pType = GetFldMgr().GetFldType(RES_USERFLD, aName); - nSubType = static_cast< USHORT >((nSubType & 0xff00) | ((pType) ? INP_USR : INP_VAR)); + nSubType = static_cast< sal_uInt16 >((nSubType & 0xff00) | ((pType) ? INP_USR : INP_VAR)); break; } @@ -1246,7 +1246,7 @@ BOOL SwFldVarPage::FillItemSet(SfxItemSet& ) UpdateSubType(); - return FALSE; + return sal_False; } SfxTabPage* SwFldVarPage::Create( Window* pParent, @@ -1255,7 +1255,7 @@ SfxTabPage* SwFldVarPage::Create( Window* pParent, return ( new SwFldVarPage( pParent, rAttrSet ) ); } -USHORT SwFldVarPage::GetGroup() +sal_uInt16 SwFldVarPage::GetGroup() { return GRP_VAR; } @@ -1263,7 +1263,7 @@ USHORT SwFldVarPage::GetGroup() SelectionListBox::SelectionListBox( SwFldVarPage* pDialog, const ResId& rResId ) : ListBox (pDialog, rResId), pDlg (pDialog), - bCallAddSelection(FALSE) + bCallAddSelection(sal_False) { } @@ -1274,16 +1274,16 @@ long SelectionListBox::PreNotify( NotifyEvent& rNEvt ) { const KeyEvent* pKEvt = rNEvt.GetKeyEvent(); const KeyCode aKeyCode = pKEvt->GetKeyCode(); - const USHORT nModifier = aKeyCode.GetModifier(); + const sal_uInt16 nModifier = aKeyCode.GetModifier(); if( aKeyCode.GetCode() == KEY_SPACE && !nModifier) - bCallAddSelection = TRUE; + bCallAddSelection = sal_True; } if ( rNEvt.GetType() == EVENT_MOUSEBUTTONDOWN ) { const MouseEvent* pMEvt = rNEvt.GetMouseEvent(); if (pMEvt && (pMEvt->IsMod1() || pMEvt->IsMod2())) // Alt oder Ctrl - bCallAddSelection = TRUE; + bCallAddSelection = sal_True; } return nHandled; @@ -1293,11 +1293,11 @@ void SwFldVarPage::FillUserData() { String sData(String::CreateFromAscii(USER_DATA_VERSION)); sData += ';'; - USHORT nTypeSel = aTypeLB.GetSelectEntryPos(); + sal_uInt16 nTypeSel = aTypeLB.GetSelectEntryPos(); if( LISTBOX_ENTRY_NOTFOUND == nTypeSel ) nTypeSel = USHRT_MAX; else - nTypeSel = (USHORT)(ULONG)aTypeLB.GetEntryData( nTypeSel ); + nTypeSel = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData( nTypeSel ); sData += String::CreateFromInt32( nTypeSel ); SetUserData(sData); } diff --git a/sw/source/ui/fldui/fldvar.hxx b/sw/source/ui/fldui/fldvar.hxx index e08187cf8b..c1cab2ea8e 100644 --- a/sw/source/ui/fldui/fldvar.hxx +++ b/sw/source/ui/fldui/fldvar.hxx @@ -45,7 +45,7 @@ class SwFldVarPage; class SelectionListBox : public ListBox { SwFldVarPage* pDlg; - BOOL bCallAddSelection; + sal_Bool bCallAddSelection; virtual long PreNotify( NotifyEvent& rNEvt ); @@ -53,8 +53,8 @@ public: SelectionListBox( SwFldVarPage* pDialog, const ResId& rResId ); // Selektieren per Ctrl oder Alt erkennen und mit SelectHdl auswerten - BOOL IsCallAddSelection() const {return bCallAddSelection;} - void ResetCallAddSelection() {bCallAddSelection = FALSE;} + sal_Bool IsCallAddSelection() const {return bCallAddSelection;} + void ResetCallAddSelection() {bCallAddSelection = sal_False;} }; class SwFldVarPage : public SwFldPage @@ -83,8 +83,8 @@ class SwFldVarPage : public SwFldPage String sOldValueFT; String sOldNameFT; - ULONG nOldFormat; - BOOL bInit; + sal_uLong nOldFormat; + sal_Bool bInit; DECL_LINK( TypeHdl, ListBox* pLB = 0 ); DECL_LINK( SubTypeHdl, ListBox* pLB = 0 ); @@ -94,10 +94,10 @@ class SwFldVarPage : public SwFldPage DECL_LINK( SeparatorHdl, Edit *pED = 0 ); void UpdateSubType(); - USHORT FillFormatLB(USHORT nTypeId); + sal_uInt16 FillFormatLB(sal_uInt16 nTypeId); protected: - virtual USHORT GetGroup(); + virtual sal_uInt16 GetGroup(); public: SwFldVarPage(Window* pParent, const SfxItemSet& rSet); @@ -106,7 +106,7 @@ public: static SfxTabPage* Create(Window* pParent, const SfxItemSet& rAttrSet); - virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual sal_Bool FillItemSet( SfxItemSet& rSet ); virtual void Reset( const SfxItemSet& rSet ); virtual void FillUserData(); diff --git a/sw/source/ui/fldui/fldvar.src b/sw/source/ui/fldui/fldvar.src index eda28b7fb4..4c42c971d2 100644 --- a/sw/source/ui/fldui/fldvar.src +++ b/sw/source/ui/fldui/fldvar.src @@ -44,6 +44,7 @@ TabPage TP_FLD_VAR }; ListBox LB_VARTYPE { + HelpID = "sw:ListBox:TP_FLD_VAR:LB_VARTYPE"; Border = TRUE ; Pos = MAP_APPFONT ( 6 , 14 ) ; Size = MAP_APPFONT ( 76 , 135 ) ; @@ -60,6 +61,7 @@ TabPage TP_FLD_VAR }; ListBox LB_VARSELECTION { + HelpID = "sw:ListBox:TP_FLD_VAR:LB_VARSELECTION"; Border = TRUE ; Pos = MAP_APPFONT ( 88 , 14 ) ; Size = MAP_APPFONT ( 76 , 135 ) ; @@ -75,6 +77,7 @@ TabPage TP_FLD_VAR }; ListBox LB_VARFORMAT { + HelpID = "sw:ListBox:TP_FLD_VAR:LB_VARFORMAT"; Border = TRUE ; Pos = MAP_APPFONT ( 170 , 14 ) ; Size = MAP_APPFONT ( 84 , 123 ) ; @@ -83,6 +86,7 @@ TabPage TP_FLD_VAR }; ListBox LB_VARNUMFORMAT { + HelpID = "sw:ListBox:TP_FLD_VAR:LB_VARNUMFORMAT"; Border = TRUE ; Pos = MAP_APPFONT ( 170 , 14 ) ; Size = MAP_APPFONT ( 84 , 123 ) ; @@ -91,6 +95,7 @@ TabPage TP_FLD_VAR }; CheckBox CB_VARINVISIBLE { + HelpID = "sw:CheckBox:TP_FLD_VAR:CB_VARINVISIBLE"; Pos = MAP_APPFONT ( 170 , 141 ) ; Size = MAP_APPFONT ( 84 , 10 ) ; Text [ en-US ] = "Invisi~ble" ; @@ -112,6 +117,7 @@ TabPage TP_FLD_VAR }; ListBox LB_VARCHAPTERLEVEL { + HelpID = "sw:ListBox:TP_FLD_VAR:LB_VARCHAPTERLEVEL"; Border = TRUE ; Hide = TRUE ; Pos = MAP_APPFONT ( 208 , 123 ) ; @@ -132,6 +138,7 @@ TabPage TP_FLD_VAR }; Edit ED_VARSEPARATOR { + HelpID = "sw:Edit:TP_FLD_VAR:ED_VARSEPARATOR"; Pos = MAP_APPFONT ( 208 , 138 ) ; Size = MAP_APPFONT ( 46 , 12 ) ; Border = TRUE ; @@ -148,6 +155,7 @@ TabPage TP_FLD_VAR }; Edit ED_VARNAME { + HelpID = "sw:Edit:TP_FLD_VAR:ED_VARNAME"; Border = TRUE ; Pos = MAP_APPFONT ( 6 , 166 ) ; Size = MAP_APPFONT ( 76 , 12 ) ; @@ -163,6 +171,7 @@ TabPage TP_FLD_VAR }; Edit ED_VARVALUE { + HelpID = "sw:Edit:TP_FLD_VAR:ED_VARVALUE"; Border = TRUE ; Pos = MAP_APPFONT ( 88 , 166 ) ; Size = MAP_APPFONT ( 76 , 12 ) ; diff --git a/sw/source/ui/fldui/fldwrap.cxx b/sw/source/ui/fldui/fldwrap.cxx index abe6b8686e..e81b7605d3 100644 --- a/sw/source/ui/fldui/fldwrap.cxx +++ b/sw/source/ui/fldui/fldwrap.cxx @@ -52,7 +52,7 @@ SFX_IMPL_CHILDWINDOW(SwFldDlgWrapper, FN_INSERT_FIELD) -SwChildWinWrapper::SwChildWinWrapper(Window *pParentWindow, USHORT nId) : +SwChildWinWrapper::SwChildWinWrapper(Window *pParentWindow, sal_uInt16 nId) : SfxChildWindow(pParentWindow, nId), m_pDocSh(0) { @@ -71,14 +71,14 @@ IMPL_LINK( SwChildWinWrapper, UpdateHdl, void*, EMPTYARG ) /*-------------------------------------------------------------------- Beschreibung: Nach Dok-Wechsel Dialog neu initialisieren --------------------------------------------------------------------*/ -BOOL SwChildWinWrapper::ReInitDlg(SwDocShell *) +sal_Bool SwChildWinWrapper::ReInitDlg(SwDocShell *) { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; if (m_pDocSh != GetOldDocShell()) { m_aUpdateTimer.Stop(); - bRet = TRUE; // Sofortiges Update + bRet = sal_True; // Sofortiges Update } else m_aUpdateTimer.Start(); @@ -93,7 +93,7 @@ SfxChildWinInfo SwFldDlgWrapper::GetInfo() const return aInfo; } -SwFldDlgWrapper::SwFldDlgWrapper( Window* _pParent, USHORT nId, +SwFldDlgWrapper::SwFldDlgWrapper( Window* _pParent, sal_uInt16 nId, SfxBindings* pB, SfxChildWinInfo* ) : SwChildWinWrapper( _pParent, nId ) @@ -112,11 +112,11 @@ SwFldDlgWrapper::SwFldDlgWrapper( Window* _pParent, USHORT nId, /*-------------------------------------------------------------------- Beschreibung: Nach Dok-Wechsel Dialog neu initialisieren --------------------------------------------------------------------*/ -BOOL SwFldDlgWrapper::ReInitDlg(SwDocShell *pDocSh) +sal_Bool SwFldDlgWrapper::ReInitDlg(SwDocShell *pDocSh) { - BOOL bRet; + sal_Bool bRet; - if ((bRet = SwChildWinWrapper::ReInitDlg(pDocSh)) == TRUE) // Sofort aktualisieren, Dok-Wechsel + if ((bRet = SwChildWinWrapper::ReInitDlg(pDocSh)) == sal_True) // Sofort aktualisieren, Dok-Wechsel { pDlgInterface->ReInitDlg(); } @@ -124,7 +124,7 @@ BOOL SwFldDlgWrapper::ReInitDlg(SwDocShell *pDocSh) return bRet; } -void SwFldDlgWrapper::ShowPage(USHORT nPage) +void SwFldDlgWrapper::ShowPage(sal_uInt16 nPage) { pDlgInterface->ShowPage(nPage ? nPage : TP_FLD_REF); } @@ -136,11 +136,11 @@ SfxChildWinInfo SwFldDataOnlyDlgWrapper::GetInfo() const SfxChildWinInfo aInfo = SfxChildWindow::GetInfo(); // prevent instatiation of dialog other than by calling // the mail merge dialog - aInfo.bVisible = FALSE; + aInfo.bVisible = sal_False; return aInfo; } -SwFldDataOnlyDlgWrapper::SwFldDataOnlyDlgWrapper( Window* _pParent, USHORT nId, +SwFldDataOnlyDlgWrapper::SwFldDataOnlyDlgWrapper( Window* _pParent, sal_uInt16 nId, SfxBindings* pB, SfxChildWinInfo* pInfo ) : SwChildWinWrapper( _pParent, nId ) @@ -162,10 +162,10 @@ SwFldDataOnlyDlgWrapper::SwFldDataOnlyDlgWrapper( Window* _pParent, USHORT nId, /* -----------------04.02.2003 14:17----------------- * re-init after doc activation * --------------------------------------------------*/ -BOOL SwFldDataOnlyDlgWrapper::ReInitDlg(SwDocShell *pDocSh) +sal_Bool SwFldDataOnlyDlgWrapper::ReInitDlg(SwDocShell *pDocSh) { - BOOL bRet; - if ((bRet = SwChildWinWrapper::ReInitDlg(pDocSh)) == TRUE) // Sofort aktualisieren, Dok-Wechsel + sal_Bool bRet; + if ((bRet = SwChildWinWrapper::ReInitDlg(pDocSh)) == sal_True) // Sofort aktualisieren, Dok-Wechsel { pDlgInterface->ReInitDlg(); } diff --git a/sw/source/ui/fldui/inpdlg.cxx b/sw/source/ui/fldui/inpdlg.cxx index d6fecac8a7..b020f559fe 100644 --- a/sw/source/ui/fldui/inpdlg.cxx +++ b/sw/source/ui/fldui/inpdlg.cxx @@ -33,10 +33,6 @@ #undef SW_DLLIMPLEMENTATION #endif - - -#define _INPDLG_CXX - #include <vcl/msgbox.hxx> #include <unotools/charclass.hxx> #include <editeng/unolingu.hxx> @@ -56,7 +52,7 @@ --------------------------------------------------------------------*/ SwFldInputDlg::SwFldInputDlg( Window *pParent, SwWrtShell &rS, - SwField* pField, BOOL bNextButton ) : + SwField* pField, sal_Bool bNextButton ) : SvxStandardDialog(pParent, SW_RES(DLG_FLD_INPUT)), @@ -99,7 +95,7 @@ SwFldInputDlg::SwFldInputDlg( Window *pParent, SwWrtShell &rS, // pInpFld = (SwInputField*)pField; aLabelED.SetText( pInpFld->GetPar2() ); - USHORT nSubType = pInpFld->GetSubType(); + sal_uInt16 nSubType = pInpFld->GetSubType(); switch(nSubType & 0xff) { @@ -123,7 +119,9 @@ SwFldInputDlg::SwFldInputDlg( Window *pParent, SwWrtShell &rS, //values are formatted - formulas are not CharClass aCC( SvxCreateLocale( pSetFld->GetLanguage() )); if( aCC.isNumeric( sFormula )) - aStr = pSetFld->Expand(); + { + aStr = pSetFld->ExpandField(true); + } else aStr = sFormula; aLabelED.SetText( pSetFld->GetPromptText() ); @@ -131,7 +129,7 @@ SwFldInputDlg::SwFldInputDlg( Window *pParent, SwWrtShell &rS, // JP 31.3.00: Inputfields in readonly regions must be allowed to // input any content. - 74639 - BOOL bEnable = !rSh.IsCrsrReadonly(); + sal_Bool bEnable = !rSh.IsCrsrReadonly(); aOKBT.Enable( bEnable ); aEditED.SetReadOnly( !bEnable ); @@ -162,7 +160,7 @@ void SwFldInputDlg::Apply() aTmp.EraseAllChars( '\r' ); rSh.StartAllAction(); - BOOL bModified = FALSE; + sal_Bool bModified = sal_False; if(pInpFld) { if(pUsrType) @@ -171,21 +169,21 @@ void SwFldInputDlg::Apply() { pUsrType->SetContent(aTmp); pUsrType->UpdateFlds(); - bModified = TRUE; + bModified = sal_True; } } else if( aTmp != pInpFld->GetPar1() ) { pInpFld->SetPar1(aTmp); rSh.SwEditShell::UpdateFlds(*pInpFld); - bModified = TRUE; + bModified = sal_True; } } else if( aTmp != pSetFld->GetPar2() ) { pSetFld->SetPar2(aTmp); rSh.SwEditShell::UpdateFlds(*pSetFld); - bModified = TRUE; + bModified = sal_True; } if( bModified ) diff --git a/sw/source/ui/fldui/inpdlg.src b/sw/source/ui/fldui/inpdlg.src index f615b68f48..8cd70d8247 100644 --- a/sw/source/ui/fldui/inpdlg.src +++ b/sw/source/ui/fldui/inpdlg.src @@ -46,6 +46,7 @@ ModalDialog DLG_FLD_INPUT };*/ Edit ED_LABEL { + HelpID = "sw:Edit:DLG_FLD_INPUT:ED_LABEL"; Border = TRUE ; Pos = MAP_APPFONT ( 12 , 14 ) ; Size = MAP_APPFONT ( 115 , 12 ) ; @@ -56,6 +57,7 @@ ModalDialog DLG_FLD_INPUT }; MultiLineEdit ED_EDIT { + HelpID = "sw:MultiLineEdit:DLG_FLD_INPUT:ED_EDIT"; Border = TRUE ; Pos = MAP_APPFONT ( 12 , 32 ) ; Size = MAP_APPFONT ( 115 , 72 ) ; @@ -83,6 +85,7 @@ ModalDialog DLG_FLD_INPUT }; PushButton PB_NEXT { + HelpID = "sw:PushButton:DLG_FLD_INPUT:PB_NEXT"; Pos = MAP_APPFONT ( 139 , 40 ) ; Size = MAP_APPFONT ( 50 , 15 ) ; TabStop = TRUE ; diff --git a/sw/source/ui/fldui/javaedit.cxx b/sw/source/ui/fldui/javaedit.cxx index a87dad9664..525051ff29 100644 --- a/sw/source/ui/fldui/javaedit.cxx +++ b/sw/source/ui/fldui/javaedit.cxx @@ -82,8 +82,8 @@ SwJavaEditDialog::SwJavaEditDialog(Window* pParent, SwWrtShell* pWrtSh) : aNextBtn ( this, SW_RES( BTN_NEXT ) ), aHelpBtn ( this, SW_RES( BTN_POST_HELP ) ), - bNew(TRUE), - bIsUrl(FALSE), + bNew(sal_True), + bIsUrl(sal_False), pSh(pWrtSh), pFileDlg(NULL), @@ -165,8 +165,8 @@ void SwJavaEditDialog::Apply() void SwJavaEditDialog::CheckTravel() { - BOOL bTravel = FALSE; - BOOL bNext(FALSE), bPrev(FALSE); + sal_Bool bTravel = sal_False; + sal_Bool bNext(sal_False), bPrev(sal_False); if(!bNew) { @@ -248,14 +248,14 @@ void SwJavaEditDialog::SetFld() aType = String::CreateFromAscii("JavaScript"); } -BOOL SwJavaEditDialog::IsUpdate() +sal_Bool SwJavaEditDialog::IsUpdate() { return pFld && ( bIsUrl != pFld->GetFormat() || pFld->GetPar2() != aType || pFld->GetPar1() != aText ); } IMPL_LINK( SwJavaEditDialog, RadioButtonHdl, RadioButton *, EMPTYARG ) { - BOOL bEnable = aUrlRB.IsChecked(); + sal_Bool bEnable = aUrlRB.IsChecked(); aUrlPB.Enable(bEnable); aUrlED.Enable(bEnable); aEditED.Enable(!bEnable); @@ -268,7 +268,7 @@ IMPL_LINK( SwJavaEditDialog, RadioButtonHdl, RadioButton *, EMPTYARG ) aEditED.SetReadOnly( !bEnable); aTypeED.SetReadOnly( !bEnable); if( aUrlPB.IsEnabled() && !bEnable ) - aUrlPB.Enable( FALSE ); + aUrlPB.Enable( sal_False ); } return 0; } diff --git a/sw/source/ui/fldui/javaedit.src b/sw/source/ui/fldui/javaedit.src index 9ea7ab73a3..bf1407e48e 100644 --- a/sw/source/ui/fldui/javaedit.src +++ b/sw/source/ui/fldui/javaedit.src @@ -33,6 +33,7 @@ // RID_SVXDLG_POSTIT ----------------------------------------------------- ModalDialog DLG_JAVAEDIT { + HelpID = "sw:ModalDialog:DLG_JAVAEDIT"; OutputSize = TRUE ; SvLook = TRUE ; Size = MAP_APPFONT ( 248 , 157 ) ; @@ -45,6 +46,7 @@ ModalDialog DLG_JAVAEDIT }; Edit ED_TYPE { + HelpID = "sw:Edit:DLG_JAVAEDIT:ED_TYPE"; Border = TRUE ; Text = "JavaScript" ; // Nicht uebersetzen!!! @@ -54,6 +56,7 @@ ModalDialog DLG_JAVAEDIT }; RadioButton RB_URL { + HelpID = "sw:RadioButton:DLG_JAVAEDIT:RB_URL"; Pos = MAP_APPFONT ( 12 , 28 ) ; Size = MAP_APPFONT ( 55 , 10 ) ; TabStop = TRUE ; @@ -61,6 +64,7 @@ ModalDialog DLG_JAVAEDIT }; Edit ED_URL { + HelpID = "sw:Edit:DLG_JAVAEDIT:ED_URL"; Border = TRUE ; Pos = MAP_APPFONT ( 70 , 27 ) ; Size = MAP_APPFONT ( 87 , 12 ) ; @@ -68,6 +72,7 @@ ModalDialog DLG_JAVAEDIT }; PushButton PB_URL { + HelpID = "sw:PushButton:DLG_JAVAEDIT:PB_URL"; Pos = MAP_APPFONT ( 163 , 26 ) ; Size = MAP_APPFONT ( 14 , 14 ) ; Text = "~..." ; @@ -75,6 +80,7 @@ ModalDialog DLG_JAVAEDIT }; RadioButton RB_EDIT { + HelpID = "sw:RadioButton:DLG_JAVAEDIT:RB_EDIT"; Pos = MAP_APPFONT ( 12 , 40 ) ; Size = MAP_APPFONT ( 140 , 10 ) ; Text [ en-US ] = "~Text" ; @@ -83,6 +89,7 @@ ModalDialog DLG_JAVAEDIT }; MultiLineEdit ED_EDIT { + HelpID = "sw:MultiLineEdit:DLG_JAVAEDIT:ED_EDIT"; Border = TRUE ; Pos = MAP_APPFONT ( 23 , 54 ) ; Size = MAP_APPFONT ( 155 , 91 ) ; @@ -116,12 +123,14 @@ ModalDialog DLG_JAVAEDIT }; ImageButton BTN_PREV { + HelpID = "sw:ImageButton:DLG_JAVAEDIT:BTN_PREV"; Pos = MAP_APPFONT ( 191 , 60 ) ; Size = MAP_APPFONT ( 24 , 14 ) ; Symbol = IMAGEBUTTON_ARROW_LEFT ; }; ImageButton BTN_NEXT { + HelpID = "sw:ImageButton:DLG_JAVAEDIT:BTN_NEXT"; Pos = MAP_APPFONT ( 217 , 60 ) ; Size = MAP_APPFONT ( 24 , 14 ) ; Symbol = IMAGEBUTTON_ARROW_RIGHT ; diff --git a/sw/source/ui/fldui/makefile.mk b/sw/source/ui/fldui/makefile.mk deleted file mode 100644 index 212c3da6ba..0000000000 --- a/sw/source/ui/fldui/makefile.mk +++ /dev/null @@ -1,90 +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=..$/..$/.. -LIBTARGET=no -PRJNAME=sw -TARGET=fldui - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -SRS1NAME=$(TARGET) -SRC1FILES = \ - changedb.src \ - DropDownFieldDialog.src\ - flddb.src \ - flddinf.src \ - flddok.src \ - fldfunc.src \ - fldref.src \ - fldtdlg.src \ - fldui.src \ - fldvar.src \ - javaedit.src \ - inpdlg.src - -SLOFILES = \ - $(EXCEPTIONSFILES) - -EXCEPTIONSFILES = \ - $(SLO)$/DropDownFieldDialog.obj \ - $(SLO)$/FldRefTreeListBox.obj \ - $(SLO)$/changedb.obj \ - $(SLO)$/flddb.obj \ - $(SLO)$/flddinf.obj \ - $(SLO)$/flddok.obj \ - $(SLO)$/fldedt.obj \ - $(SLO)$/fldfunc.obj \ - $(SLO)$/fldmgr.obj \ - $(SLO)$/fldpage.obj \ - $(SLO)$/fldref.obj \ - $(SLO)$/fldtdlg.obj \ - $(SLO)$/fldvar.obj \ - $(SLO)$/fldwrap.obj \ - $(SLO)$/inpdlg.obj \ - $(SLO)$/javaedit.obj \ - $(SLO)$/xfldui.obj - -LIB1TARGET = $(SLB)$/$(TARGET).lib - -LIB1OBJFILES = \ - $(SLO)$/fldmgr.obj \ - $(SLO)$/fldwrap.obj \ - $(SLO)$/xfldui.obj - -# $(SLO)$/DropDownFieldDialog.obj \ - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/ui/fldui/xfldui.cxx b/sw/source/ui/fldui/xfldui.cxx index 5395a11018..e1f4dbe6a6 100644 --- a/sw/source/ui/fldui/xfldui.cxx +++ b/sw/source/ui/fldui/xfldui.cxx @@ -64,13 +64,13 @@ using namespace ::com::sun::star::beans; /*-------------------------------------------------------------------- Beschreibung: Ist das Datenbankfeld numerisch? - Anm: Im Fehlerfall wird TRUE returnt. + Anm: Im Fehlerfall wird sal_True returnt. --------------------------------------------------------------------*/ -BOOL SwFldMgr::IsDBNumeric( const String& rDBName, const String& rTblQryName, - BOOL bIsTable, const String& rFldName) +sal_Bool SwFldMgr::IsDBNumeric( const String& rDBName, const String& rTblQryName, + sal_Bool bIsTable, const String& rFldName) { - BOOL bNumeric = TRUE; + sal_Bool bNumeric = sal_True; SwNewDBMgr* pDBMgr = pWrtShell ? pWrtShell->GetNewDBMgr() : ::GetActiveView()->GetWrtShell().GetNewDBMgr(); @@ -171,7 +171,7 @@ BOOL SwFldMgr::IsDBNumeric( const String& rDBName, const String& rTblQryName, case DataType::VARCHAR: case DataType::LONGVARCHAR: default: - bNumeric = FALSE; + bNumeric = sal_False; } } } diff --git a/sw/source/ui/fmtui/fmtui.src b/sw/source/ui/fmtui/fmtui.src deleted file mode 100644 index aa74897731..0000000000 --- a/sw/source/ui/fmtui/fmtui.src +++ /dev/null @@ -1,87 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#include "fmtui.hrc" -#include "globals.hrc" - -String STR_FMT_STD -{ - Text [ en-US ] = "(none)" ; -}; -String STR_TEMPLATE_WILDCARD -{ - TEXT = "*.vor" ; -}; - //String STR_NONAME //!! VB - //{ - // TEXT = "Unbenannt "; - // TEXT [English] = "Noname "; - // TEXT [norwegian] = "Noname "; - // TEXT [italian] = "Senza nome"; - // TEXT [portuguese_brazilian] = "Semnome "; - // TEXT [portuguese] = "Semnome "; - // TEXT [finnish] = "Nimetön "; - // TEXT [danish] = "Intet navn"; - // TEXT [french] = "Sansnom "; - // TEXT [swedish] = "Namnlös"; - // TEXT [dutch] = "Naamloos"; - // TEXT [spanish] = "Sin nombre "; - // TEXT [english_us] = "Noname "; - //}; -String STR_OVERWRITE -{ - Text [ en-US ] = "\nAre you sure you want to delete this template?" ; -}; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/sw/source/ui/fmtui/makefile.mk b/sw/source/ui/fmtui/makefile.mk deleted file mode 100644 index 9474cfa135..0000000000 --- a/sw/source/ui/fmtui/makefile.mk +++ /dev/null @@ -1,54 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=fmtui -LIBTARGET=NO -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -SRS1NAME=$(TARGET) -SRC1FILES = \ - tmpdlg.src - -SLOFILES = \ - $(EXCEPTIONSFILES) - -EXCEPTIONSFILES = \ - $(SLO)$/tmpdlg.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/ui/fmtui/tmpdlg.cxx b/sw/source/ui/fmtui/tmpdlg.cxx index b05fed6e16..223def1d61 100644 --- a/sw/source/ui/fmtui/tmpdlg.cxx +++ b/sw/source/ui/fmtui/tmpdlg.cxx @@ -42,7 +42,7 @@ #endif #include <vcl/msgbox.hxx> #include <sfx2/viewfrm.hxx> -#include <svx/hdft2.hxx> +#include <svx/hdft.hxx> #include <editeng/flstitem.hxx> #include <svx/htmlmode.hxx> #include <svtools/htmlcfg.hxx> @@ -95,14 +95,14 @@ extern SW_DLLPUBLIC SwWrtShell* GetActiveWrtShell(); SwTemplateDlg::SwTemplateDlg(Window* pParent, SfxStyleSheetBase& rBase, - USHORT nRegion, - BOOL bColumn, + sal_uInt16 nRegion, + sal_Bool bColumn, SwWrtShell* pActShell, - BOOL bNew ) : + sal_Bool bNew ) : SfxStyleDialog( pParent, SW_RES(DLG_TEMPLATE_BASE + nRegion), rBase, - FALSE, + sal_False, 0 ), nType( nRegion ), pWrtShell(pActShell), @@ -272,7 +272,7 @@ SwTemplateDlg::SwTemplateDlg(Window* pParent, AddTabPage(TP_PAGE_STD, String(SW_RES(STR_PAGE_STD)), pFact->GetTabPageCreatorFunc( RID_SVXPAGE_PAGE ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_PAGE ), - FALSE, + sal_False, 1 ); // nach der Verwalten-Page if(!pActShell || 0 == ::GetHtmlMode(pWrtShell->GetView().GetDocShell())) { @@ -327,10 +327,10 @@ short SwTemplateDlg::Ok() { const SfxPoolItem *pOutItem, *pExItem; if( SFX_ITEM_SET == pExampleSet->GetItemState( - SID_ATTR_NUMBERING_RULE, FALSE, &pExItem ) && + SID_ATTR_NUMBERING_RULE, sal_False, &pExItem ) && ( !GetOutputItemSet() || SFX_ITEM_SET != GetOutputItemSet()->GetItemState( - SID_ATTR_NUMBERING_RULE, FALSE, &pOutItem ) || + SID_ATTR_NUMBERING_RULE, sal_False, &pOutItem ) || *pExItem != *pOutItem )) { if( GetOutputItemSet() ) @@ -354,7 +354,7 @@ const SfxItemSet* SwTemplateDlg::GetRefreshedSet() return pInSet; } -void SwTemplateDlg::PageCreated( USHORT nId, SfxTabPage &rPage ) +void SwTemplateDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) { //Namen der Vorlagen und Metric setzen String sNumCharFmt, sBulletCharFmt; @@ -372,7 +372,7 @@ void SwTemplateDlg::PageCreated( USHORT nId, SfxTabPage &rPage ) GetDocShell()->GetItem( SID_ATTR_CHAR_FONTLIST ) ) ); aSet.Put (SvxFontListItem( aFontListItem.GetFontList(), SID_ATTR_CHAR_FONTLIST)); - UINT32 nFlags = 0; + sal_uInt32 nFlags = 0; if(rPage.GetItemSet().GetParent() && 0 == (nHtmlMode & HTMLMODE_ON )) nFlags = SVX_RELATIVE_MODE; if( SFX_STYLE_FAMILY_CHAR == nType ) @@ -384,7 +384,7 @@ void SwTemplateDlg::PageCreated( USHORT nId, SfxTabPage &rPage ) case TP_CHAR_EXT: { - UINT32 nFlags = SVX_ENABLE_FLASH; + sal_uInt32 nFlags = SVX_ENABLE_FLASH; if( SFX_STYLE_FAMILY_CHAR == nType ) nFlags = nFlags|SVX_PREVIEW_CHARACTER; aSet.Put (SfxUInt32Item(SID_FLAG_TYPE, nFlags)); @@ -439,35 +439,35 @@ void SwTemplateDlg::PageCreated( USHORT nId, SfxTabPage &rPage ) aNames.Insert(new String(pBase->GetName())); pBase = pPool->Next(); } - for(USHORT i = 0; i < aNames.Count(); i++) + for(sal_uInt16 i = 0; i < aNames.Count(); i++) rBox.InsertEntry(*aNames.GetObject(i)); } break; case TP_PARA_ALIGN: { - aSet.Put(SfxBoolItem(SID_SVXPARAALIGNTABPAGE_ENABLEJUSTIFYEXT,TRUE)); + aSet.Put(SfxBoolItem(SID_SVXPARAALIGNTABPAGE_ENABLEJUSTIFYEXT,sal_True)); rPage.PageCreated(aSet); } break; case TP_FRM_STD: - ((SwFrmPage&)rPage).SetNewFrame( TRUE ); - ((SwFrmPage&)rPage).SetFormatUsed( TRUE ); + ((SwFrmPage&)rPage).SetNewFrame( sal_True ); + ((SwFrmPage&)rPage).SetFormatUsed( sal_True ); break; case TP_FRM_ADD: - ((SwFrmAddPage&)rPage).SetFormatUsed(TRUE); - ((SwFrmAddPage&)rPage).SetNewFrame(TRUE); + ((SwFrmAddPage&)rPage).SetFormatUsed(sal_True); + ((SwFrmAddPage&)rPage).SetNewFrame(sal_True); break; case TP_FRM_WRAP: - ((SwWrapTabPage&)rPage).SetFormatUsed( TRUE, FALSE ); + ((SwWrapTabPage&)rPage).SetFormatUsed( sal_True, sal_False ); break; case TP_COLUMN: if( nType == SFX_STYLE_FAMILY_FRAME ) - ((SwColumnPage&)rPage).SetFrmMode(TRUE); - ((SwColumnPage&)rPage).SetFormatUsed( TRUE ); + ((SwColumnPage&)rPage).SetFrmMode(sal_True); + ((SwColumnPage&)rPage).SetFormatUsed( sal_True ); break; case TP_BACKGROUND: @@ -494,7 +494,7 @@ void SwTemplateDlg::PageCreated( USHORT nId, SfxTabPage &rPage ) List aList; String* pNew = new String; SwStyleNameMapper::FillUIName( RES_POOLCOLL_TEXT, *pNew ); - aList.Insert( pNew, (ULONG)0 ); + aList.Insert( pNew, (sal_uLong)0 ); if( pWrtShell ) { SfxStyleSheetBasePool* pStyleSheetPool = pWrtShell-> @@ -510,7 +510,7 @@ void SwTemplateDlg::PageCreated( USHORT nId, SfxTabPage &rPage ) } aSet.Put (SfxStringListItem(SID_COLLECT_LIST, &aList)); rPage.PageCreated(aSet); - for( USHORT i = (USHORT)aList.Count(); i; --i ) + for( sal_uInt16 i = (sal_uInt16)aList.Count(); i; --i ) delete (String*)aList.Remove(i); } break; @@ -544,16 +544,16 @@ void SwTemplateDlg::PageCreated( USHORT nId, SfxTabPage &rPage ) SwDocShell* pDocShell = ::GetActiveWrtShell()->GetView().GetDocShell(); ::FillCharStyleListBox(rCharFmtLB, pDocShell); List aList; - for(USHORT j = 0; j < rCharFmtLB.GetEntryCount(); j++) + for(sal_uInt16 j = 0; j < rCharFmtLB.GetEntryCount(); j++) { aList.Insert( new XubString(rCharFmtLB.GetEntry(j)), LIST_APPEND ); } aSet.Put( SfxStringListItem( SID_CHAR_FMT_LIST_BOX,&aList ) ) ; FieldUnit eMetric = ::GetDfltMetric(0 != PTR_CAST(SwWebDocShell, pDocShell)); - aSet.Put ( SfxAllEnumItem(SID_METRIC_ITEM, static_cast< USHORT >(eMetric))); + aSet.Put ( SfxAllEnumItem(SID_METRIC_ITEM, static_cast< sal_uInt16 >(eMetric))); rPage.PageCreated(aSet); - for( USHORT i = (USHORT)aList.Count(); i; --i ) + for( sal_uInt16 i = (sal_uInt16)aList.Count(); i; --i ) delete (XubString*)aList.Remove(i); aList.Clear(); } @@ -563,7 +563,7 @@ void SwTemplateDlg::PageCreated( USHORT nId, SfxTabPage &rPage ) SwDocShell* pDocShell = ::GetActiveWrtShell()->GetView().GetDocShell(); FieldUnit eMetric = ::GetDfltMetric(0 != PTR_CAST(SwWebDocShell, pDocShell)); - aSet.Put ( SfxAllEnumItem(SID_METRIC_ITEM, static_cast< USHORT >(eMetric))); + aSet.Put ( SfxAllEnumItem(SID_METRIC_ITEM, static_cast< sal_uInt16 >(eMetric))); rPage.PageCreated(aSet); } break; diff --git a/sw/source/ui/frmdlg/colex.cxx b/sw/source/ui/frmdlg/colex.cxx index f9636aad11..25b95d2b57 100644 --- a/sw/source/ui/frmdlg/colex.cxx +++ b/sw/source/ui/frmdlg/colex.cxx @@ -58,9 +58,9 @@ void SwPageExample::UpdateExample( const SfxItemSet& rSet ) { const SvxPageItem* pPage = 0; SfxItemPool* pPool = rSet.GetPool(); - USHORT nWhich = pPool->GetWhich( SID_ATTR_PAGE ); + sal_uInt16 nWhich = pPool->GetWhich( SID_ATTR_PAGE ); - if ( rSet.GetItemState( nWhich, FALSE ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( nWhich, sal_False ) == SFX_ITEM_SET ) { // Ausrichtung pPage = (const SvxPageItem*)&rSet.Get( nWhich ); @@ -71,14 +71,14 @@ void SwPageExample::UpdateExample( const SfxItemSet& rSet ) nWhich = pPool->GetWhich( SID_ATTR_PAGE_SIZE ); - if ( rSet.GetItemState( nWhich, FALSE ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( nWhich, sal_False ) == SFX_ITEM_SET ) { // Orientation und Size aus dem PageItem const SvxSizeItem& rSize = (const SvxSizeItem&)rSet.Get( nWhich ); SetSize( rSize.GetSize() ); } nWhich = RES_LR_SPACE; - if ( rSet.GetItemState( nWhich, FALSE ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( nWhich, sal_False ) == SFX_ITEM_SET ) { // linken und rechten Rand einstellen const SvxLRSpaceItem& rLRSpace = (const SvxLRSpaceItem&)rSet.Get( nWhich ); @@ -94,7 +94,7 @@ void SwPageExample::UpdateExample( const SfxItemSet& rSet ) nWhich = RES_UL_SPACE; - if ( rSet.GetItemState( nWhich, FALSE ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( nWhich, sal_False ) == SFX_ITEM_SET ) { // oberen und unteren Rand einstellen const SvxULSpaceItem& rULSpace = (const SvxULSpaceItem&)rSet.Get( nWhich ); @@ -112,7 +112,7 @@ void SwPageExample::UpdateExample( const SfxItemSet& rSet ) // Kopfzeilen-Attribute auswerten const SfxPoolItem* pItem; if( SFX_ITEM_SET == rSet.GetItemState( pPool->GetWhich( SID_ATTR_PAGE_HEADERSET), - FALSE, &pItem ) ) + sal_False, &pItem ) ) { const SfxItemSet& rHeaderSet = ((SvxSetItem*)pItem)->GetItemSet(); const SfxBoolItem& rHeaderOn = @@ -132,7 +132,7 @@ void SwPageExample::UpdateExample( const SfxItemSet& rSet ) SetHdDist( rUL.GetLower() ); SetHdLeft( rLR.GetLeft() ); SetHdRight( rLR.GetRight() ); - SetHeader( TRUE ); + SetHeader( sal_True ); if ( rHeaderSet.GetItemState( RES_BACKGROUND ) == SFX_ITEM_SET ) { const SvxBrushItem& rItem = @@ -147,11 +147,11 @@ void SwPageExample::UpdateExample( const SfxItemSet& rSet ) } } else - SetHeader( FALSE ); + SetHeader( sal_False ); } if( SFX_ITEM_SET == rSet.GetItemState( pPool->GetWhich( SID_ATTR_PAGE_FOOTERSET), - FALSE, &pItem ) ) + sal_False, &pItem ) ) { const SfxItemSet& rFooterSet = ((SvxSetItem*)pItem)->GetItemSet(); const SfxBoolItem& rFooterOn = @@ -171,7 +171,7 @@ void SwPageExample::UpdateExample( const SfxItemSet& rSet ) SetFtDist( rUL.GetUpper() ); SetFtLeft( rLR.GetLeft() ); SetFtRight( rLR.GetRight() ); - SetFooter( TRUE ); + SetFooter( sal_True ); if( rFooterSet.GetItemState( RES_BACKGROUND ) == SFX_ITEM_SET ) { const SvxBrushItem& rItem = @@ -186,10 +186,10 @@ void SwPageExample::UpdateExample( const SfxItemSet& rSet ) } } else - SetFooter( FALSE ); + SetFooter( sal_False ); } if( SFX_ITEM_SET == rSet.GetItemState( RES_BACKGROUND, - FALSE, &pItem ) ) + sal_False, &pItem ) ) { SetColor( ( (const SvxBrushItem*)pItem )->GetColor() ); const Graphic* pGrf = ( (const SvxBrushItem*)pItem )->GetGraphic(); @@ -207,11 +207,11 @@ void SwPageExample::UpdateExample( const SfxItemSet& rSet ) } void SwColExample::DrawPage( const Point& rOrg, - const BOOL bSecond, - const BOOL bEnabled ) + const sal_Bool bSecond, + const sal_Bool bEnabled ) { SwPageExample::DrawPage( rOrg, bSecond, bEnabled ); - USHORT nColumnCount; + sal_uInt16 nColumnCount; if( pColMgr && 0 != (nColumnCount = pColMgr->GetCount())) { long nL = GetLeft(); @@ -244,18 +244,18 @@ void SwColExample::DrawPage( const Point& rOrg, SetFillColor( GetColor() ); // #97495# make sure that the automatic column widht's are always equal - BOOL bAutoWidth = pColMgr->IsAutoWidth(); + sal_Bool bAutoWidth = pColMgr->IsAutoWidth(); sal_Int32 nAutoColWidth = 0; if(bAutoWidth) { sal_Int32 nColumnWidthSum = 0; - USHORT i; + sal_uInt16 i; for(i = 0; i < nColumnCount; ++i) nColumnWidthSum += pColMgr->GetColWidth( i ); nAutoColWidth = nColumnWidthSum / nColumnCount; } - USHORT i; + sal_uInt16 i; for( i = 0; i < nColumnCount; i++) { if(!bAutoWidth) @@ -318,7 +318,7 @@ SwColumnOnlyExample::SwColumnOnlyExample( Window* pParent, const ResId& rResId) SetBorderStyle( WINDOW_BORDER_MONO ); m_aFrmSize = SvxPaperInfo::GetPaperSize(PAPER_A4);// DIN A4 - ::FitToActualSize(m_aCols, (USHORT)m_aFrmSize.Width()); + ::FitToActualSize(m_aCols, (sal_uInt16)m_aFrmSize.Width()); long nHeight = m_aFrmSize.Height(); Fraction aScale( m_aWinSize.Height(), nHeight ); @@ -364,12 +364,12 @@ void SwColumnOnlyExample::Paint( const Rectangle& /*rRect*/ ) long nLength = aLogSize.Height() - 2 * aTL.Y(); Point aUp( aTL ); Point aDown( aTL.X(), nLength ); - BOOL bLines = FALSE; + sal_Bool bLines = sal_False; if(m_aCols.GetLineAdj() != COLADJ_NONE) { - bLines = TRUE; + bLines = sal_True; - USHORT nPercent = m_aCols.GetLineHeight(); + sal_uInt16 nPercent = m_aCols.GetLineHeight(); if( nPercent != 100 ) { nLength -= nLength * nPercent / 100; @@ -387,14 +387,14 @@ void SwColumnOnlyExample::Paint( const Rectangle& /*rRect*/ ) } const SwColumns& rCols = m_aCols.GetColumns(); - USHORT nColCount = rCols.Count(); + sal_uInt16 nColCount = rCols.Count(); if( nColCount ) { DrawRect(aRect); SetFillColor( rFieldColor ); Rectangle aFrmRect(aTL, m_aFrmSize); long nSum = aTL.X(); - for(USHORT i = 0; i < nColCount; i++) + for(sal_uInt16 i = 0; i < nColCount; i++) { SwColumn* pCol = rCols[i]; aFrmRect.Left() = nSum + pCol->GetLeft();//nSum + pCol->GetLeft() + aTL.X(); @@ -405,7 +405,7 @@ void SwColumnOnlyExample::Paint( const Rectangle& /*rRect*/ ) if(bLines ) { nSum = aTL.X(); - for(USHORT i = 0; i < nColCount - 1; i++) + for(sal_uInt16 i = 0; i < nColCount - 1; i++) { nSum += rCols[i]->GetWishWidth(); aUp.X() = nSum; @@ -419,32 +419,32 @@ void SwColumnOnlyExample::Paint( const Rectangle& /*rRect*/ ) void SwColumnOnlyExample::SetColumns(const SwFmtCol& rCol) { m_aCols = rCol; - USHORT nWishSum = m_aCols.GetWishWidth(); + sal_uInt16 nWishSum = m_aCols.GetWishWidth(); long nFrmWidth = m_aFrmSize.Width(); SwColumns& rCols = m_aCols.GetColumns(); - USHORT nColCount = rCols.Count(); + sal_uInt16 nColCount = rCols.Count(); - for(USHORT i = 0; i < nColCount; i++) + for(sal_uInt16 i = 0; i < nColCount; i++) { SwColumn* pCol = rCols[i]; long nWish = pCol->GetWishWidth(); nWish *= nFrmWidth; nWish /= nWishSum; - pCol->SetWishWidth((USHORT)nWish); + pCol->SetWishWidth((sal_uInt16)nWish); long nLeft = pCol->GetLeft(); nLeft *= nFrmWidth; nLeft /= nWishSum; - pCol->SetLeft((USHORT)nLeft); + pCol->SetLeft((sal_uInt16)nLeft); long nRight = pCol->GetRight(); nRight *= nFrmWidth; nRight /= nWishSum; - pCol->SetRight((USHORT)nRight); + pCol->SetRight((sal_uInt16)nRight); } // #97495# make sure that the automatic column width's are always equal if(nColCount && m_aCols.IsOrtho()) { sal_Int32 nColumnWidthSum = 0; - USHORT i; + sal_uInt16 i; for(i = 0; i < nColCount; ++i) { SwColumn* pCol = rCols[i]; @@ -455,7 +455,7 @@ void SwColumnOnlyExample::SetColumns(const SwFmtCol& rCol) for(i = 0; i < nColCount; ++i) { SwColumn* pCol = rCols[i]; - pCol->SetWishWidth( static_cast< USHORT >(nColumnWidthSum + pCol->GetRight() + pCol->GetLeft())); + pCol->SetWishWidth( static_cast< sal_uInt16 >(nColumnWidthSum + pCol->GetRight() + pCol->GetLeft())); } } } @@ -468,8 +468,8 @@ SwPageGridExample::~SwPageGridExample() #define MAX_ROWS 10 #define MAX_LINES 15 void SwPageGridExample::DrawPage( const Point& rOrg, - const BOOL bSecond, - const BOOL bEnabled ) + const sal_Bool bSecond, + const sal_Bool bEnabled ) { SwPageExample::DrawPage(rOrg, bSecond, bEnabled); if(pGridItem && pGridItem->GetGridType()) @@ -572,9 +572,9 @@ void SwPageGridExample::UpdateExample( const SfxItemSet& rSet ) { DELETEZ(pGridItem); //get the grid information - if(SFX_ITEM_AVAILABLE <= rSet.GetItemState(RES_TEXTGRID, TRUE)) + if(SFX_ITEM_AVAILABLE <= rSet.GetItemState(RES_TEXTGRID, sal_True)) pGridItem = (SwTextGridItem*)((const SwTextGridItem&)rSet.Get(RES_TEXTGRID)).Clone(); - if( SFX_ITEM_AVAILABLE <= rSet.GetItemState( RES_FRAMEDIR, TRUE )) + if( SFX_ITEM_AVAILABLE <= rSet.GetItemState( RES_FRAMEDIR, sal_True )) { const SvxFrameDirectionItem& rDirItem = (const SvxFrameDirectionItem&)rSet.Get(RES_FRAMEDIR); diff --git a/sw/source/ui/frmdlg/colmgr.cxx b/sw/source/ui/frmdlg/colmgr.cxx index 6ea6307e94..503a7f6840 100644 --- a/sw/source/ui/frmdlg/colmgr.cxx +++ b/sw/source/ui/frmdlg/colmgr.cxx @@ -43,12 +43,12 @@ /*------------------------------------------------------------------------ Beschreibung: Spaltenbreite auf aktuelle Breite einstellen ------------------------------------------------------------------------*/ -void FitToActualSize(SwFmtCol& rCol, USHORT nWidth) +void FitToActualSize(SwFmtCol& rCol, sal_uInt16 nWidth) { - const USHORT nCount = rCol.GetColumns().Count(); - for(USHORT i = 0; i < nCount; ++i) + const sal_uInt16 nCount = rCol.GetColumns().Count(); + for(sal_uInt16 i = 0; i < nCount; ++i) { - const USHORT nTmp = rCol.CalcColWidth(i, nWidth); + const sal_uInt16 nTmp = rCol.CalcColWidth(i, nWidth); rCol.GetColumns()[i]->SetWishWidth(nTmp); } rCol.SetWishWidth(nWidth); @@ -58,16 +58,16 @@ void FitToActualSize(SwFmtCol& rCol, USHORT nWidth) /*------------------------------------------------------------------------ Beschreibung: Setzen Spaltenanzahl und Gutterwidth ------------------------------------------------------------------------*/ -void SwColMgr::SetCount(USHORT nCount, USHORT nGutterWidth) +void SwColMgr::SetCount(sal_uInt16 nCount, sal_uInt16 nGutterWidth) { aFmtCol.Init(nCount, nGutterWidth, nWidth); aFmtCol.SetWishWidth(nWidth); aFmtCol.SetGutterWidth(nGutterWidth, nWidth); } -USHORT SwColMgr::GetGutterWidth( USHORT nPos ) const +sal_uInt16 SwColMgr::GetGutterWidth( sal_uInt16 nPos ) const { - USHORT nRet; + sal_uInt16 nRet; if(nPos == USHRT_MAX ) nRet = GetCount() > 1 ? aFmtCol.GetGutterWidth() : DEF_GUTTER_WIDTH; else @@ -79,7 +79,7 @@ USHORT SwColMgr::GetGutterWidth( USHORT nPos ) const return nRet; } -void SwColMgr::SetGutterWidth(USHORT nGutterWidth, USHORT nPos ) +void SwColMgr::SetGutterWidth(sal_uInt16 nGutterWidth, sal_uInt16 nPos ) { if(nPos == USHRT_MAX) aFmtCol.SetGutterWidth(nGutterWidth, nWidth); @@ -87,7 +87,7 @@ void SwColMgr::SetGutterWidth(USHORT nGutterWidth, USHORT nPos ) { OSL_ENSURE(nPos < GetCount() - 1, "Spalte ueberindiziert" ); SwColumns& rCols = aFmtCol.GetColumns(); - USHORT nGutterWidth2 = nGutterWidth / 2; + sal_uInt16 nGutterWidth2 = nGutterWidth / 2; rCols.GetObject(nPos)->SetRight(nGutterWidth2); rCols.GetObject(nPos + 1)->SetLeft(nGutterWidth2); } @@ -104,19 +104,19 @@ short SwColMgr::GetLineHeightPercent() const void SwColMgr::SetLineHeightPercent(short nPercent) { OSL_ENSURE(nPercent <= 100, "line height may only be 100 \%"); - aFmtCol.SetLineHeight((BYTE)nPercent); + aFmtCol.SetLineHeight((sal_uInt8)nPercent); } /*------------------------------------------------------------------------ Beschreibung: Spaltenbreite ------------------------------------------------------------------------*/ -USHORT SwColMgr::GetColWidth(USHORT nIdx) const +sal_uInt16 SwColMgr::GetColWidth(sal_uInt16 nIdx) const { OSL_ENSURE(nIdx < GetCount(), "Spaltenarray ueberindiziert."); return aFmtCol.CalcPrtColWidth(nIdx, nWidth); } -void SwColMgr::SetColWidth(USHORT nIdx, USHORT nWd) +void SwColMgr::SetColWidth(sal_uInt16 nIdx, sal_uInt16 nWd) { OSL_ENSURE(nIdx < GetCount(), "Spaltenarray ueberindiziert."); aFmtCol.GetColumns()[nIdx]->SetWishWidth(nWd); @@ -126,7 +126,7 @@ void SwColMgr::SetColWidth(USHORT nIdx, USHORT nWd) /*-------------------------------------------------------------------- Beschreibung: Groesse neu setzen --------------------------------------------------------------------*/ -void SwColMgr::SetActualWidth(USHORT nW) +void SwColMgr::SetActualWidth(sal_uInt16 nW) { nWidth = nW; ::FitToActualSize(aFmtCol, nW); @@ -135,18 +135,18 @@ void SwColMgr::SetActualWidth(USHORT nW) /*-------------------------------------------------------------------- Beschreibung: ctor --------------------------------------------------------------------*/ -SwColMgr::SwColMgr(const SfxItemSet& rSet, USHORT nActWidth) : +SwColMgr::SwColMgr(const SfxItemSet& rSet, sal_uInt16 nActWidth) : aFmtCol((const SwFmtCol&)rSet.Get(RES_COL)), nWidth(nActWidth) { if(nWidth == USHRT_MAX) { - nWidth = (USHORT)((const SwFmtFrmSize&)rSet.Get(RES_FRM_SIZE)).GetWidth(); + nWidth = (sal_uInt16)((const SwFmtFrmSize&)rSet.Get(RES_FRM_SIZE)).GetWidth(); if (nWidth < MINLAY) nWidth = USHRT_MAX; const SvxLRSpaceItem &rLR = (const SvxLRSpaceItem&)rSet.Get(RES_LR_SPACE); - nWidth = nWidth - (USHORT)rLR.GetLeft(); - nWidth = nWidth - (USHORT)rLR.GetRight(); + nWidth = nWidth - (sal_uInt16)rLR.GetLeft(); + nWidth = nWidth - (sal_uInt16)rLR.GetRight(); } ::FitToActualSize(aFmtCol, nWidth); } diff --git a/sw/source/ui/frmdlg/column.cxx b/sw/source/ui/frmdlg/column.cxx index 2a25039711..861a9ab31b 100644 --- a/sw/source/ui/frmdlg/column.cxx +++ b/sw/source/ui/frmdlg/column.cxx @@ -70,6 +70,8 @@ #include <docary.hxx> #include <pagedesc.hxx> +#include "access.hrc" + #define FRAME_FORMAT_WIDTH 1000 // sw/inc/fmtclds.hxx @@ -78,7 +80,7 @@ SV_IMPL_PTRARR( SwColumns, SwColumnPtr ) /*-------------------------------------------------------------------- Beschreibung: Statische Daten --------------------------------------------------------------------*/ -static const USHORT nLines[] = { +static const sal_uInt16 nLines[] = { DEF_LINE_WIDTH_0, DEF_LINE_WIDTH_1, DEF_LINE_WIDTH_2, @@ -86,13 +88,13 @@ static const USHORT nLines[] = { DEF_LINE_WIDTH_4 }; -static const USHORT nLineCount = SAL_N_ELEMENTS(nLines); -static const USHORT nVisCols = 3; +static const sal_uInt16 nLineCount = SAL_N_ELEMENTS(nLines); +static const sal_uInt16 nVisCols = 3; -inline BOOL IsMarkInSameSection( SwWrtShell& rWrtSh, const SwSection* pSect ) +inline sal_Bool IsMarkInSameSection( SwWrtShell& rWrtSh, const SwSection* pSect ) { rWrtSh.SwapPam(); - BOOL bRet = pSect == rWrtSh.GetCurrSection(); + sal_Bool bRet = pSect == rWrtSh.GetCurrSection(); rWrtSh.SwapPam(); return bRet; } @@ -111,10 +113,10 @@ SwColumnDlg::SwColumnDlg(Window* pParent, SwWrtShell& rSh) : pFrameSet(0), nOldSelection(0), nSelectionWidth(0), - bPageChanged(FALSE), - bSectionChanged(FALSE), - bSelSectionChanged(FALSE), - bFrameChanged(FALSE) + bPageChanged(sal_False), + bSectionChanged(sal_False), + bSelSectionChanged(sal_False), + bFrameChanged(sal_False) { FreeResource(); @@ -124,13 +126,13 @@ SwColumnDlg::SwColumnDlg(Window* pParent, SwWrtShell& rSh) : nSelectionWidth = aRect.Width(); SfxItemSet* pColPgSet = 0; - static USHORT const aSectIds[] = { RES_COL, RES_COL, + static sal_uInt16 const aSectIds[] = { RES_COL, RES_COL, RES_FRM_SIZE, RES_FRM_SIZE, RES_COLUMNBALANCE, RES_FRAMEDIR, 0 }; const SwSection* pCurrSection = rWrtShell.GetCurrSection(); - USHORT nFullSectCnt = rWrtShell.GetFullSelectedSectionCount(); + sal_uInt16 nFullSectCnt = rWrtShell.GetFullSelectedSectionCount(); if( pCurrSection && ( !rWrtShell.HasSelection() || 0 != nFullSectCnt )) { nSelectionWidth = rSh.GetSectionWidth(*pCurrSection->GetFmt()); @@ -172,7 +174,7 @@ SwColumnDlg::SwColumnDlg(Window* pParent, SwWrtShell& rSh) : aApplyToLB.RemoveEntry(aApplyToLB.GetEntryPos( (void*) LISTBOX_FRAME )); - USHORT nPagePos = aApplyToLB.GetEntryPos( (void*) LISTBOX_PAGE ); + sal_uInt16 nPagePos = aApplyToLB.GetEntryPos( (void*) LISTBOX_PAGE ); const SwPageDesc* pPageDesc = rWrtShell.GetSelectedPageDescs(); if( pPageDesc ) { @@ -245,19 +247,19 @@ IMPL_LINK(SwColumnDlg, ObjectHdl, ListBox*, pBox) break; case LISTBOX_SECTION : pSet = pSectionSet; - bSectionChanged = TRUE; + bSectionChanged = sal_True; break; case LISTBOX_SECTIONS : pSet = pSectionSet; - bSelSectionChanged = TRUE; + bSelSectionChanged = sal_True; break; case LISTBOX_PAGE : pSet = pPageSet; - bPageChanged = TRUE; + bPageChanged = sal_True; break; case LISTBOX_FRAME: pSet = pFrameSet; - bFrameChanged = TRUE; + bFrameChanged = sal_True; break; } if(pBox) @@ -288,10 +290,10 @@ IMPL_LINK(SwColumnDlg, ObjectHdl, ListBox*, pBox) break; } - BOOL bIsSection = pSet == pSectionSet || pSet == pSelectionSet; + sal_Bool bIsSection = pSet == pSectionSet || pSet == pSelectionSet; pTabPage->ShowBalance(bIsSection); pTabPage->SetInSection(bIsSection); - pTabPage->SetFrmMode(TRUE); + pTabPage->SetFrmMode(sal_True); pTabPage->SetPageWidth(nWidth); if( pSet ) pTabPage->Reset(*pSet); @@ -309,19 +311,19 @@ IMPL_LINK(SwColumnDlg, OkHdl, OKButton*, EMPTYARG) break; case LISTBOX_SECTION : pSet = pSectionSet; - bSectionChanged = TRUE; + bSectionChanged = sal_True; break; case LISTBOX_SECTIONS : pSet = pSectionSet; - bSelSectionChanged = TRUE; + bSelSectionChanged = sal_True; break; case LISTBOX_PAGE : pSet = pPageSet; - bPageChanged = TRUE; + bPageChanged = sal_True; break; case LISTBOX_FRAME: pSet = pFrameSet; - bFrameChanged = TRUE; + bFrameChanged = sal_True; break; } pTabPage->FillItemSet(*pSet); @@ -340,7 +342,7 @@ IMPL_LINK(SwColumnDlg, OkHdl, OKButton*, EMPTYARG) { const SwSection* pCurrSection = rWrtShell.GetCurrSection(); const SwSectionFmt* pFmt = pCurrSection->GetFmt(); - USHORT nNewPos = rWrtShell.GetSectionFmtPos( *pFmt ); + sal_uInt16 nNewPos = rWrtShell.GetSectionFmtPos( *pFmt ); SwSectionData aData(*pCurrSection); rWrtShell.UpdateSection( nNewPos, aData, pSectionSet ); } @@ -353,7 +355,7 @@ IMPL_LINK(SwColumnDlg, OkHdl, OKButton*, EMPTYARG) if(pPageSet && SFX_ITEM_SET == pPageSet->GetItemState(RES_COL) && bPageChanged) { // aktuellen PageDescriptor ermitteln und damit den Set fuellen - const USHORT nCurIdx = rWrtShell.GetCurPageDesc(); + const sal_uInt16 nCurIdx = rWrtShell.GetCurPageDesc(); SwPageDesc aPageDesc(rWrtShell.GetPageDesc(nCurIdx)); SwFrmFmt &rFmt = aPageDesc.GetMaster(); rFmt.SetFmtAttr(pPageSet->Get(RES_COL)); @@ -382,25 +384,25 @@ IMPL_LINK(SwColumnDlg, OkHdl, OKButton*, EMPTYARG) #if OSL_DEBUG_LEVEL < 2 inline #endif -USHORT GetMaxWidth( SwColMgr* pColMgr, USHORT nCols ) +sal_uInt16 GetMaxWidth( SwColMgr* pColMgr, sal_uInt16 nCols ) { - USHORT nMax = pColMgr->GetActualSize(); + sal_uInt16 nMax = pColMgr->GetActualSize(); if( --nCols ) nMax -= pColMgr->GetGutterWidth() * nCols; return nMax; } -static USHORT aPageRg[] = { +static sal_uInt16 aPageRg[] = { RES_COL, RES_COL, 0 }; DBG_NAME(columnhdl) -USHORT lcl_LineWidthToPos(ULONG nWidth) +sal_uInt16 lcl_LineWidthToPos(sal_uLong nWidth) { - const USHORT nUShortWidth = (USHORT)nWidth; - for(USHORT i = 0; i < nLineCount; ++i) + const sal_uInt16 nUShortWidth = (sal_uInt16)nWidth; + for(sal_uInt16 i = 0; i < nLineCount; ++i) if(nUShortWidth == nLines[i]) return i; return 0; @@ -410,10 +412,10 @@ void SwColumnPage::ResetColWidth() { if( nCols ) { - USHORT nWidth = GetMaxWidth( pColMgr, nCols ); + sal_uInt16 nWidth = GetMaxWidth( pColMgr, nCols ); nWidth = nWidth / nCols; - for(USHORT i = 0; i < nCols; ++i) + for(sal_uInt16 i = 0; i < nCols; ++i) nColWidth[i] = (long) nWidth; } @@ -426,12 +428,13 @@ SwColumnPage::SwColumnPage(Window *pParent, const SfxItemSet &rSet) : SfxTabPage(pParent, SW_RES(TP_COLUMN), rSet), + aFLGroup(this, SW_RES(FL_COLUMNS )), aClNrLbl(this, SW_RES(FT_NUMBER )), aCLNrEdt(this, SW_RES(ED_NUMBER )), aDefaultVS(this, SW_RES(VS_DEFAULTS)), aBalanceColsCB(this, SW_RES(CB_BALANCECOLS)), - aFLGroup(this, SW_RES(FL_COLUMNS )), + aFLLayout(this, SW_RES(FL_LAYOUT)), aBtnUp(this, SW_RES(BTN_DOWN)), aColumnFT(this, SW_RES(FT_COLUMN)), aWidthFT(this, SW_RES(FT_WIDTH)), @@ -447,15 +450,13 @@ SwColumnPage::SwColumnPage(Window *pParent, const SfxItemSet &rSet) aBtnDown(this, SW_RES(BTN_UP)), aAutoWidthBox(this, SW_RES(CB_AUTO_WIDTH)), - aFLLayout(this, SW_RES(FL_LAYOUT)), - + aFLLineType(this, SW_RES(FL_LINETYPE)), aLineTypeLbl(this, SW_RES(FT_STYLE)), aLineTypeDLB(this, SW_RES(LB_STYLE)), aLineHeightLbl(this, SW_RES(FT_HEIGHT)), aLineHeightEdit(this, SW_RES(ED_HEIGHT)), aLinePosLbl(this, SW_RES(FT_POSITION)), aLinePosDLB(this, SW_RES(LB_POSITION)), - aFLLineType(this, SW_RES(FL_LINETYPE)), aVertFL(this, SW_RES(FL_VERT)), aPropertiesFL( this, SW_RES( FL_PROPERTIES )), @@ -470,16 +471,25 @@ SwColumnPage::SwColumnPage(Window *pParent, const SfxItemSet &rSet) nFirstVis(0), nMinWidth(MINLAY), pModifiedField(0), - bFormat(FALSE), - bFrm(FALSE), - bHtmlMode(FALSE), - bLockUpdate(FALSE) + bFormat(sal_False), + bFrm(sal_False), + bHtmlMode(sal_False), + bLockUpdate(sal_False) { - USHORT i; + sal_uInt16 i; FreeResource(); SetExchangeSupport(); + aBtnDown.SetAccessibleRelationMemberOf(&aFLLayout); + aEd1.SetAccessibleRelationLabeledBy(&aWidthFT); + aEd2.SetAccessibleRelationLabeledBy(&aWidthFT); + aEd3.SetAccessibleRelationLabeledBy(&aWidthFT); + aDistEd1.SetAccessibleRelationLabeledBy(&aDistFT); + aDistEd2.SetAccessibleRelationLabeledBy(&aDistFT); + aBtnUp.SetAccessibleRelationLabeledBy(&aColumnFT); + aBtnDown.SetAccessibleRelationLabeledBy(&aColumnFT); + aDefaultVS.SetHelpId(HID_COLUMN_VALUESET); aDefaultVS.SetColCount( 5 ); aDefaultVS.SetStyle( aDefaultVS.GetStyle() @@ -552,11 +562,11 @@ void SwColumnPage::SetPageWidth(long nPageWidth) void SwColumnPage::Reset(const SfxItemSet &rSet) { - USHORT nHtmlMode = ::GetHtmlMode((const SwDocShell*)SfxObjectShell::Current()); + sal_uInt16 nHtmlMode = ::GetHtmlMode((const SwDocShell*)SfxObjectShell::Current()); if(nHtmlMode & HTMLMODE_ON) { - bHtmlMode = TRUE; - aAutoWidthBox.Enable(FALSE); + bHtmlMode = sal_True; + aAutoWidthBox.Enable(sal_False); } FieldUnit aMetric = ::GetDfltMetric(bHtmlMode); SetMetric(aEd1, aMetric); @@ -568,8 +578,8 @@ void SwColumnPage::Reset(const SfxItemSet &rSet) delete pColMgr; pColMgr = new SwColMgr(rSet); nCols = pColMgr->GetCount() ; - aCLNrEdt.SetMax(Max((USHORT)aCLNrEdt.GetMax(), (USHORT)nCols)); - aCLNrEdt.SetLast(Max(nCols,(USHORT)aCLNrEdt.GetMax())); + aCLNrEdt.SetMax(Max((sal_uInt16)aCLNrEdt.GetMax(), (sal_uInt16)nCols)); + aCLNrEdt.SetLast(Max(nCols,(sal_uInt16)aCLNrEdt.GetMax())); if(bFrm) { @@ -579,16 +589,16 @@ void SwColumnPage::Reset(const SfxItemSet &rSet) { const SwFmtFrmSize& rSize = (const SwFmtFrmSize&)rSet.Get(RES_FRM_SIZE); const SvxBoxItem& rBox = (const SvxBoxItem&) rSet.Get(RES_BOX); - pColMgr->SetActualWidth((USHORT)rSize.GetSize().Width() - rBox.GetDistance()); + pColMgr->SetActualWidth((sal_uInt16)rSize.GetSize().Width() - rBox.GetDistance()); } } if(aBalanceColsCB.IsVisible()) { const SfxPoolItem* pItem; - if( SFX_ITEM_SET == rSet.GetItemState( RES_COLUMNBALANCE, FALSE, &pItem )) + if( SFX_ITEM_SET == rSet.GetItemState( RES_COLUMNBALANCE, sal_False, &pItem )) aBalanceColsCB.Check(!((const SwFmtNoBalancedColumns*)pItem)->GetValue()); else - aBalanceColsCB.Check( TRUE ); + aBalanceColsCB.Check( sal_True ); } //text direction @@ -596,7 +606,7 @@ void SwColumnPage::Reset(const SfxItemSet &rSet) { const SvxFrameDirectionItem& rItem = (const SvxFrameDirectionItem&)rSet.Get(RES_FRAMEDIR); sal_uIntPtr nVal = rItem.GetValue(); - USHORT nPos = aTextDirectionLB.GetEntryPos( (void*)nVal ); + sal_uInt16 nPos = aTextDirectionLB.GetEntryPos( (void*) nVal ); aTextDirectionLB.SelectEntryPos( nPos ); aTextDirectionLB.SaveValue(); } @@ -616,7 +626,7 @@ SfxTabPage* SwColumnPage::Create(Window *pParent, const SfxItemSet &rSet) /*-------------------------------------------------------------------- Beschreibung: Attribute in den Set stopfen bei OK --------------------------------------------------------------------*/ -BOOL SwColumnPage::FillItemSet(SfxItemSet &rSet) +sal_Bool SwColumnPage::FillItemSet(SfxItemSet &rSet) { if(aCLNrEdt.HasChildPathFocus()) aCLNrEdt.GetDownHdl().Call(&aCLNrEdt); @@ -634,7 +644,7 @@ BOOL SwColumnPage::FillItemSet(SfxItemSet &rSet) { rSet.Put(SwFmtNoBalancedColumns(!aBalanceColsCB.IsChecked() )); } - USHORT nPos; + sal_uInt16 nPos; if( aTextDirectionLB.IsVisible() && ( nPos = aTextDirectionLB.GetSelectEntryPos() ) != aTextDirectionLB.GetSavedValue() ) @@ -642,7 +652,7 @@ BOOL SwColumnPage::FillItemSet(SfxItemSet &rSet) sal_uInt32 nDirection = (sal_uInt32)(sal_IntPtr)aTextDirectionLB.GetEntryData( nPos ); rSet.Put( SvxFrameDirectionItem( (SvxFrameDirection)nDirection, RES_FRAMEDIR)); } - return TRUE; + return sal_True; } /*-------------------------------------------------------------------- @@ -656,15 +666,15 @@ IMPL_LINK( SwColumnPage, UpdateColMgr, void *, /*pField*/ ) // Ermitteln, ob die schmalste Spalte zu schmal ist // fuer den eingestellten Spaltenabstand long nMin = nColWidth[0]; - USHORT i; + sal_uInt16 i; for( i = 1; i < nCols; ++i) nMin = Min(nMin, nColWidth[i]); - BOOL bAutoWidth = aAutoWidthBox.IsChecked(); + sal_Bool bAutoWidth = aAutoWidthBox.IsChecked(); if(!bAutoWidth) { - pColMgr->SetAutoWidth(FALSE); + pColMgr->SetAutoWidth(sal_False); // falls der Benutzer nicht die Gesamtbreite vergeben hat, // den fehlenden Betrag auf die letzte Spalte addieren. long nSum = 0; @@ -680,19 +690,19 @@ IMPL_LINK( SwColumnPage, UpdateColMgr, void *, /*pField*/ ) if( nSum < nMaxW ) nColWidth[nCols - 1] += nMaxW - nSum; - pColMgr->SetColWidth( 0, static_cast< USHORT >(nColWidth[0] + (USHORT)nColDist[0]/2) ); + pColMgr->SetColWidth( 0, static_cast< sal_uInt16 >(nColWidth[0] + (sal_uInt16)nColDist[0]/2) ); for( i = 1; i < nCols-1; ++i ) { long nActDist = (nColDist[i] + nColDist[i - 1]) / 2; - pColMgr->SetColWidth( i, (USHORT)nColWidth[i] + (USHORT)nActDist ); + pColMgr->SetColWidth( i, (sal_uInt16)nColWidth[i] + (sal_uInt16)nActDist ); } - pColMgr->SetColWidth( nCols-1, static_cast< USHORT >(nColWidth[nCols-1] + nColDist[nCols -2]/2) ); + pColMgr->SetColWidth( nCols-1, static_cast< sal_uInt16 >(nColWidth[nCols-1] + nColDist[nCols -2]/2) ); } // keins ist ausgeschaltet - const USHORT nPos = aLineTypeDLB.GetSelectEntryPos(); - BOOL bEnable = 0 != nPos; + const sal_uInt16 nPos = aLineTypeDLB.GetSelectEntryPos(); + sal_Bool bEnable = 0 != nPos; aLineHeightEdit.Enable( bEnable ); aLineHeightLbl.Enable( bEnable ); if( !bEnable ) @@ -742,12 +752,12 @@ void SwColumnPage::Init() { aCLNrEdt.SetValue(nCols); - BOOL bAutoWidth = pColMgr->IsAutoWidth() || bHtmlMode; + sal_Bool bAutoWidth = pColMgr->IsAutoWidth() || bHtmlMode; aAutoWidthBox.Check( bAutoWidth ); sal_Int32 nColumnWidthSum = 0; // Setzen der Breiten - USHORT i; + sal_uInt16 i; for(i = 0; i < nCols; ++i) { nColWidth[i] = pColMgr->GetColWidth(i); @@ -778,7 +788,7 @@ void SwColumnPage::Init() aLineTypeDLB.SelectEntryPos( lcl_LineWidthToPos(( pColMgr->GetLineWidth() )) + 1); aLineHeightEdit.SetValue( pColMgr->GetLineHeightPercent() ); } - aLinePosDLB.SelectEntryPos( static_cast< USHORT >(eAdj - 1) ); + aLinePosDLB.SelectEntryPos( static_cast< sal_uInt16 >(eAdj - 1) ); } else { @@ -808,13 +818,13 @@ void SwColumnPage::Init() ------------------------------------------------------------------------*/ void SwColumnPage::UpdateCols() { - BOOL bEnableBtns= FALSE; - BOOL bEnable12 = FALSE; - BOOL bEnable3 = FALSE; - const BOOL bEdit = !aAutoWidthBox.IsChecked(); + sal_Bool bEnableBtns= sal_False; + sal_Bool bEnable12 = sal_False; + sal_Bool bEnable3 = sal_False; + const sal_Bool bEdit = !aAutoWidthBox.IsChecked(); if ( nCols > nVisCols ) { - bEnableBtns = TRUE && !bHtmlMode; + bEnableBtns = sal_True && !bHtmlMode; bEnable12 = bEnable3 = bEdit; } else if( bEdit ) @@ -822,8 +832,8 @@ void SwColumnPage::UpdateCols() // hier gibt es absichtlich kaum noch breaks switch(nCols) { - case 3: bEnable3 = TRUE; - case 2: bEnable12= TRUE; break; + case 3: bEnable3 = sal_True; + case 2: bEnable12= sal_True; break; default: /* do nothing */; } } @@ -838,11 +848,11 @@ void SwColumnPage::UpdateCols() aBtnUp.Enable( bEnableBtns ); aBtnDown.Enable( bEnableBtns ); - const BOOL bEnable = nCols > 1; + const sal_Bool bEnable = nCols > 1; if( !bEnable ) { - aLinePosDLB.Enable( FALSE ); - aLinePosLbl.Enable( FALSE ); + aLinePosDLB.Enable( sal_False ); + aLinePosLbl.Enable( sal_False ); } aLineHeightEdit.Enable( bEnable ); aLineHeightLbl.Enable( bEnable ); @@ -851,21 +861,46 @@ void SwColumnPage::UpdateCols() aAutoWidthBox.Enable( bEnable && !bHtmlMode ); } -void SwColumnPage::SetLabels( USHORT nVis ) +void SwColumnPage::SetLabels( sal_uInt16 nVis ) { String sLbl( '~' ); String sLbl2( String::CreateFromInt32( nVis + 1 )); + String tmp1(sLbl2); sLbl2.Insert(sLbl, sLbl2.Len() - 1); aLbl1.SetText(sLbl2); sLbl2 = String::CreateFromInt32( nVis + 2 ); + String tmp2(sLbl2); sLbl2.Insert(sLbl, sLbl2.Len() - 1); aLbl2.SetText(sLbl2); sLbl2 = String::CreateFromInt32( nVis + 3 ); + String tmp3(sLbl2); sLbl2.Insert(sLbl, sLbl2.Len() - 1); aLbl3.SetText(sLbl2); + String sColumnWidth = SW_RESSTR( STR_ACCESS_COLUMN_WIDTH ) ; + sColumnWidth.SearchAndReplaceAscii("%1", tmp1); + aEd1.SetAccessibleName(sColumnWidth); + + sColumnWidth = SW_RESSTR( STR_ACCESS_COLUMN_WIDTH ) ; + sColumnWidth.SearchAndReplaceAscii("%1", tmp2); + aEd2.SetAccessibleName(sColumnWidth); + + sColumnWidth = SW_RESSTR( STR_ACCESS_COLUMN_WIDTH ) ; + sColumnWidth.SearchAndReplaceAscii("%1", tmp3); + aEd3.SetAccessibleName(sColumnWidth); + + String sDist = SW_RESSTR( STR_ACCESS_PAGESETUP_SPACING ) ; + String sDist1 = sDist; + sDist1.SearchAndReplaceAscii("%1", tmp1); + sDist1.SearchAndReplaceAscii("%2", tmp2); + aDistEd1.SetAccessibleName(sDist1); + + String sDist2 = sDist; + sDist2.SearchAndReplaceAscii("%1", tmp2); + sDist2.SearchAndReplaceAscii("%2", tmp3); + aDistEd2.SetAccessibleName(sDist2); } /*------------------------------------------------------------------------ @@ -877,7 +912,7 @@ void SwColumnPage::SetLabels( USHORT nVis ) ------------------------------------------------------------------------*/ IMPL_LINK( SwColumnPage, ColModify, NumericField *, pNF ) { - nCols = (USHORT)aCLNrEdt.GetValue(); + nCols = (sal_uInt16)aCLNrEdt.GetValue(); //#107890# the handler is also called from LoseFocus() //then no change has been made and thus no action should be taken // #i17816# changing the displayed types within the ValueSet @@ -888,8 +923,8 @@ IMPL_LINK( SwColumnPage, ColModify, NumericField *, pNF ) if(pNF) aDefaultVS.SetNoSelection(); long nDist = static_cast< long >(aDistEd1.DenormalizePercent(aDistEd1.GetValue(FUNIT_TWIP))); - pColMgr->SetCount(nCols, (USHORT)nDist); - for(USHORT i = 0; i < nCols; i++) + pColMgr->SetCount(nCols, (sal_uInt16)nDist); + for(sal_uInt16 i = 0; i < nCols; i++) nColDist[i] = nDist; nFirstVis = 0; SetLabels( nFirstVis ); @@ -917,7 +952,7 @@ IMPL_LINK( SwColumnPage, GapModify, PercentField *, pFld ) return 0; if(aAutoWidthBox.IsChecked()) { - USHORT nMaxGap = pColMgr->GetActualSize() - nCols * MINLAY; + sal_uInt16 nMaxGap = pColMgr->GetActualSize() - nCols * MINLAY; OSL_ENSURE(nCols, "Abstand kann nicht ohne Spalten eingestellt werden"); nMaxGap /= nCols - 1; if(nActValue > nMaxGap) @@ -925,8 +960,8 @@ IMPL_LINK( SwColumnPage, GapModify, PercentField *, pFld ) nActValue = nMaxGap; aDistEd1.SetPrcntValue(aDistEd1.NormalizePercent(nMaxGap), FUNIT_TWIP); } - pColMgr->SetGutterWidth((USHORT)nActValue); - for(USHORT i = 0; i < nCols; i++) + pColMgr->SetGutterWidth((sal_uInt16)nActValue); + for(sal_uInt16 i = 0; i < nCols; i++) nColDist[i] = nActValue; ResetColWidth(); @@ -935,7 +970,7 @@ IMPL_LINK( SwColumnPage, GapModify, PercentField *, pFld ) else { - USHORT nOffset = 0; + sal_uInt16 nOffset = 0; if(pFld == &aDistEd2) { nOffset = 1; @@ -971,9 +1006,9 @@ IMPL_LINK( SwColumnPage, GapModify, PercentField *, pFld ) nColWidth[nFirstVis + nOffset + 1] = nRight; nColDist[nFirstVis + nOffset] += nDiff; - pColMgr->SetColWidth( nFirstVis + nOffset, USHORT(nLeft) ); - pColMgr->SetColWidth( nFirstVis + nOffset + 1, USHORT(nRight) ); - pColMgr->SetGutterWidth( USHORT(nColDist[nFirstVis + nOffset]), nFirstVis + nOffset ); + pColMgr->SetColWidth( nFirstVis + nOffset, sal_uInt16(nLeft) ); + pColMgr->SetColWidth( nFirstVis + nOffset + 1, sal_uInt16(nRight) ); + pColMgr->SetGutterWidth( sal_uInt16(nColDist[nFirstVis + nOffset]), nFirstVis + nOffset ); } } @@ -996,15 +1031,15 @@ IMPL_LINK( SwColumnPage, EdModify, PercentField *, pField ) IMPL_LINK( SwColumnPage, AutoWidthHdl, CheckBox *, pBox ) { long nDist = static_cast< long >(aDistEd1.DenormalizePercent(aDistEd1.GetValue(FUNIT_TWIP))); - pColMgr->SetCount(nCols, (USHORT)nDist); - for(USHORT i = 0; i < nCols; i++) + pColMgr->SetCount(nCols, (sal_uInt16)nDist); + for(sal_uInt16 i = 0; i < nCols; i++) nColDist[i] = nDist; if(pBox->IsChecked()) { - pColMgr->SetGutterWidth(USHORT(nDist)); + pColMgr->SetGutterWidth(sal_uInt16(nDist)); ResetColWidth(); } - pColMgr->SetAutoWidth(pBox->IsChecked(), USHORT(nDist)); + pColMgr->SetAutoWidth(pBox->IsChecked(), sal_uInt16(nDist)); UpdateCols(); Update(); return 0; @@ -1049,13 +1084,13 @@ IMPL_LINK( SwColumnPage, Timeout, Timer *, EMPTYARG ) if(pModifiedField) { // Finden der veraenderten Spalte - USHORT nChanged = nFirstVis; + sal_uInt16 nChanged = nFirstVis; if(pModifiedField == &aEd2) ++nChanged; else if(pModifiedField == &aEd3) nChanged += 2; - long nNewWidth = (USHORT) + long nNewWidth = (sal_uInt16) pModifiedField->DenormalizePercent(pModifiedField->GetValue(FUNIT_TWIP)); long nDiff = nNewWidth - nColWidth[nChanged]; @@ -1134,7 +1169,7 @@ void SwColumnPage::ActivatePage(const SfxItemSet& rSet) const SvxLRSpaceItem& rLRSpace = (const SvxLRSpaceItem&)rSet.Get( RES_LR_SPACE ); const SvxBoxItem& rBox = (const SvxBoxItem&) rSet.Get(RES_BOX); - USHORT nActWidth = static_cast< USHORT >(rSize.GetSize().Width() + sal_uInt16 nActWidth = static_cast< sal_uInt16 >(rSize.GetSize().Width() - rLRSpace.GetLeft() - rLRSpace.GetRight() - rBox.GetDistance()); if( pColMgr->GetActualSize() != nActWidth) @@ -1159,7 +1194,7 @@ void SwColumnPage::ActivatePage(const SfxItemSet& rSet) const SvxBoxItem& rBox = (const SvxBoxItem&) rSet.Get(RES_BOX); long nDistance = rBox.GetDistance(); - const USHORT nTotalWish = bFormat ? FRAME_FORMAT_WIDTH : USHORT(rSize.GetWidth() - 2 * nDistance); + const sal_uInt16 nTotalWish = bFormat ? FRAME_FORMAT_WIDTH : sal_uInt16(rSize.GetWidth() - 2 * nDistance); // Maximalwerte der Spaltenbreiten setzen SetPageWidth(nTotalWish); @@ -1169,7 +1204,7 @@ void SwColumnPage::ActivatePage(const SfxItemSet& rSet) pColMgr->SetActualWidth(nTotalWish); Init(); } - BOOL bPercent; + sal_Bool bPercent; // im Rahmenformat nur relative Angaben if ( bFormat || (rSize.GetWidthPercent() && rSize.GetWidthPercent() != 0xff) ) { @@ -1181,10 +1216,10 @@ void SwColumnPage::ActivatePage(const SfxItemSet& rSet) aDistEd2.SetRefValue(nTotalWish); // Auf %-Darstellung umschalten - bPercent = TRUE; + bPercent = sal_True; } else - bPercent = FALSE; + bPercent = sal_False; aEd1.ShowPercent(bPercent); aEd2.ShowPercent(bPercent); @@ -1202,17 +1237,17 @@ int SwColumnPage::DeactivatePage(SfxItemSet *_pSet) if(_pSet) FillItemSet(*_pSet); - return TRUE; + return sal_True; } -USHORT* SwColumnPage::GetRanges() +sal_uInt16* SwColumnPage::GetRanges() { return aPageRg; } IMPL_LINK( SwColumnPage, SetDefaultsHdl, ValueSet *, pVS ) { - USHORT nItem = pVS->GetSelectItemId(); + sal_uInt16 nItem = pVS->GetSelectItemId(); if( nItem < 4 ) { aCLNrEdt.SetValue( nItem ); @@ -1222,13 +1257,13 @@ IMPL_LINK( SwColumnPage, SetDefaultsHdl, ValueSet *, pVS ) } else { - bLockUpdate = TRUE; + bLockUpdate = sal_True; aCLNrEdt.SetValue( 2 ); - aAutoWidthBox.Check(FALSE); + aAutoWidthBox.Check(sal_False); aDistEd1.SetPrcntValue(0); ColModify(0); // jetzt noch das Breitenverhaeltnisse auf 2 : 1 bzw. 1 : 2 stellen - USHORT nSmall = pColMgr->GetActualSize() / 3; + sal_uInt16 nSmall = pColMgr->GetActualSize() / 3; if(nItem == 4) { aEd2.SetPrcntValue(aEd2.NormalizePercent(long(nSmall)), FUNIT_TWIP); @@ -1239,19 +1274,19 @@ IMPL_LINK( SwColumnPage, SetDefaultsHdl, ValueSet *, pVS ) aEd1.SetPrcntValue(aEd1.NormalizePercent(long(nSmall)), FUNIT_TWIP); pModifiedField = &aEd1; } - bLockUpdate = FALSE; + bLockUpdate = sal_False; Timeout(0); } return 0; } -void SwColumnPage::SetFrmMode(BOOL bMod) +void SwColumnPage::SetFrmMode(sal_Bool bMod) { bFrm = bMod; } -void SwColumnPage::SetInSection(BOOL bSet) +void SwColumnPage::SetInSection(sal_Bool bSet) { if(!SW_MOD()->GetCTLOptions().IsCTLFontEnabled()) return; @@ -1283,7 +1318,7 @@ void ColumnValueSet::UserDraw( const UserDrawEvent& rUDEvt ) const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); Rectangle aRect = rUDEvt.GetRect(); - USHORT nItemId = rUDEvt.GetItemId(); + sal_uInt16 nItemId = rUDEvt.GetItemId(); long nRectWidth = aRect.GetWidth(); long nRectHeight = aRect.GetHeight(); @@ -1295,7 +1330,7 @@ void ColumnValueSet::UserDraw( const UserDrawEvent& rUDEvt ) long nStep = Abs(Abs(nRectHeight * 95 /100) / 11); long nTop = (nRectHeight - 11 * nStep ) / 2; - USHORT nCols = 0; + sal_uInt16 nCols = 0; long nStarts[3]; long nEnds[3]; nStarts[0] = nRectWidth * 10 / 100; @@ -1328,11 +1363,11 @@ void ColumnValueSet::UserDraw( const UserDrawEvent& rUDEvt ) nEnds[1] = nRectWidth * 9 / 10; break; } - for(USHORT j = 0; j < nCols; j++ ) + for(sal_uInt16 j = 0; j < nCols; j++ ) { Point aStart(aBLPos.X() + nStarts[j], 0); Point aEnd(aBLPos.X() + nEnds[j], 0); - for( USHORT i = 0; i < 12; i ++) + for( sal_uInt16 i = 0; i < 12; i ++) { aStart.Y() = aEnd.Y() = aBLPos.Y() + nTop + i * nStep; pDev->DrawLine(aStart, aEnd); diff --git a/sw/source/ui/frmdlg/column.hrc b/sw/source/ui/frmdlg/column.hrc index 172674a6b3..781bd100dc 100644 --- a/sw/source/ui/frmdlg/column.hrc +++ b/sw/source/ui/frmdlg/column.hrc @@ -79,7 +79,6 @@ #define FT_TEXTDIRECTION 60 #define LB_TEXTDIRECTION 61 #define FL_VERT 62 - #define LISTBOX_SELECTION 0 #define LISTBOX_SECTION 1 #define LISTBOX_SECTIONS 2 diff --git a/sw/source/ui/frmdlg/column.src b/sw/source/ui/frmdlg/column.src index 449fbbf121..8734383294 100644 --- a/sw/source/ui/frmdlg/column.src +++ b/sw/source/ui/frmdlg/column.src @@ -30,6 +30,8 @@ #include "frmui.hrc" #include "cmdid.h" #include "helpid.h" +#include "access.hrc" + // #define TP_COLUMN 256 TabPage TP_COLUMN { @@ -46,6 +48,7 @@ TabPage TP_COLUMN }; NumericField ED_NUMBER { + HelpID = "sw:NumericField:TP_COLUMN:ED_NUMBER"; Border = TRUE ; Pos = MAP_APPFONT ( 12 , 30 ) ; Size = MAP_APPFONT ( 24 , 12 ) ; @@ -68,6 +71,7 @@ TabPage TP_COLUMN }; CheckBox CB_BALANCECOLS { + HelpID = "sw:CheckBox:TP_COLUMN:CB_BALANCECOLS"; Pos = MAP_APPFONT ( 7 , 46 ) ; Size = MAP_APPFONT ( 163 , 10 ) ; Hide = TRUE; @@ -93,6 +97,7 @@ TabPage TP_COLUMN }; ImageButton BTN_DOWN { + HelpID = "sw:ImageButton:TP_COLUMN:BTN_DOWN"; Disable = TRUE ; Pos = MAP_APPFONT ( 62 , 69 ) ; Size = MAP_APPFONT ( 10 , 10 ) ; @@ -122,6 +127,7 @@ TabPage TP_COLUMN }; ImageButton BTN_UP { + HelpID = "sw:ImageButton:TP_COLUMN:BTN_UP"; Disable = TRUE ; Pos = MAP_APPFONT ( 238 , 69 ) ; Size = MAP_APPFONT ( 10 , 10 ) ; @@ -137,6 +143,7 @@ TabPage TP_COLUMN }; MetricField ED_1 { + HelpID = "sw:MetricField:TP_COLUMN:ED_1"; Disable = TRUE ; Border = TRUE ; Pos = MAP_APPFONT ( 87 , 83 ) ; @@ -155,6 +162,7 @@ TabPage TP_COLUMN }; MetricField ED_2 { + HelpID = "sw:MetricField:TP_COLUMN:ED_2"; Disable = TRUE ; Border = TRUE ; Pos = MAP_APPFONT ( 137 , 83 ) ; @@ -173,6 +181,7 @@ TabPage TP_COLUMN }; MetricField ED_3 { + HelpID = "sw:MetricField:TP_COLUMN:ED_3"; Disable = TRUE ; Border = TRUE ; Pos = MAP_APPFONT ( 187 , 83 ) ; @@ -198,6 +207,7 @@ TabPage TP_COLUMN }; MetricField ED_DIST1 { + HelpID = "sw:MetricField:TP_COLUMN:ED_DIST1"; Disable = TRUE ; Border = TRUE ; Pos = MAP_APPFONT ( 112 , 99 ) ; @@ -216,6 +226,7 @@ TabPage TP_COLUMN }; MetricField ED_DIST2 { + HelpID = "sw:MetricField:TP_COLUMN:ED_DIST2"; Disable = TRUE ; Border = TRUE ; Pos = MAP_APPFONT ( 162 , 99 ) ; @@ -234,6 +245,7 @@ TabPage TP_COLUMN }; CheckBox CB_AUTO_WIDTH { + HelpID = "sw:CheckBox:TP_COLUMN:CB_AUTO_WIDTH"; Pos = MAP_APPFONT ( 87 , 115 ) ; Size = MAP_APPFONT ( 100 , 10 ) ; Text [ en-US ] = "Auto~Width" ; @@ -255,6 +267,7 @@ TabPage TP_COLUMN }; ListBox LB_STYLE { + HelpID = "sw:ListBox:TP_COLUMN:LB_STYLE"; Pos = MAP_APPFONT ( 50 , 138 ) ; Size = MAP_APPFONT ( 60 , 66 ) ; TabStop = TRUE ; @@ -273,6 +286,7 @@ TabPage TP_COLUMN }; MetricField ED_HEIGHT { + HelpID = "sw:MetricField:TP_COLUMN:ED_HEIGHT"; Border = TRUE ; Pos = MAP_APPFONT ( 50 , 154 ) ; Size = MAP_APPFONT ( 60 , 12 ) ; @@ -297,6 +311,7 @@ TabPage TP_COLUMN }; ListBox LB_POSITION { + HelpID = "sw:ListBox:TP_COLUMN:LB_POSITION"; Pos = MAP_APPFONT ( 50 , 170 ) ; Size = MAP_APPFONT ( 60 , 40 ) ; TabStop = TRUE ; @@ -337,6 +352,7 @@ TabPage TP_COLUMN }; ListBox LB_TEXTDIRECTION { + HelpID = "sw:ListBox:TP_COLUMN:LB_TEXTDIRECTION"; Border = TRUE ; Pos = MAP_APPFONT ( 127 , 149 ) ; Size = MAP_APPFONT ( 127 , 50 ) ; @@ -385,6 +401,7 @@ ModalDialog DLG_COLUMN }; ListBox LB_APPLY_TO { + HelpID = "sw:ListBox:DLG_COLUMN:LB_APPLY_TO"; Pos = MAP_APPFONT ( 260 , 74 ) ; Size = MAP_APPFONT ( 50 , 66 ) ; TabStop = TRUE ; @@ -401,4 +418,14 @@ ModalDialog DLG_COLUMN Text [ en-US ] = "Columns"; }; +//IAccessibility2 Impplementaton 2009----- +String STR_ACCESS_PAGESETUP_SPACING +{ + Text [ en-US ] = "Spacing between %1 and %2"; +}; +String STR_ACCESS_COLUMN_WIDTH +{ + Text [ en-US ] = "Column %1 Width"; +}; +//-----IAccessibility2 Impplementaton 2009 diff --git a/sw/source/ui/frmdlg/cption.cxx b/sw/source/ui/frmdlg/cption.cxx index 29d7239fb3..5450908cea 100644 --- a/sw/source/ui/frmdlg/cption.cxx +++ b/sw/source/ui/frmdlg/cption.cxx @@ -138,7 +138,7 @@ SwCaptionDialog::SwCaptionDialog( Window *pParent, SwView &rV ) : aPrevWin (this, SW_RES(WIN_SAMPLE )), rView( rV ), pMgr( new SwFldMgr(rView.GetWrtShellPtr()) ), - bCopyAttributes( FALSE ), + bCopyAttributes( sal_False ), bOrderNumberingFirst( SW_MOD()->GetModuleConfig()->IsCaptionOrderNumberingFirst() ) { //#i61007# order of captions @@ -183,7 +183,7 @@ SwCaptionDialog::SwCaptionDialog( Window *pParent, SwView &rV ) : { nPoolId = RES_POOLCOLL_LABEL_ABB; pString = ::GetOldGrfCat(); - bCopyAttributes = TRUE; + bCopyAttributes = sal_True; sObjectName = rSh.GetFlyName(); //if not OLE if(!xNameAccess.is()) @@ -518,7 +518,7 @@ SwSequenceOptionDialog::SwSequenceOptionDialog( Window *pParent, SwView &rV, aLbLevel.SelectEntryPos( nLvl < MAXLEVEL ? nLvl + 1 : 0 ); aEdDelim.SetText( sDelim ); - ::FillCharStyleListBox( aLbCharStyle, rView.GetDocShell(), TRUE, TRUE ); + ::FillCharStyleListBox( aLbCharStyle, rView.GetDocShell(), sal_True, sal_True ); aLbCharStyle.SelectEntryPos( 0 ); } @@ -578,7 +578,7 @@ long SwCaptionDialog::CategoryBox::PreNotify( NotifyEvent& rNEvt ) { const KeyEvent* pEvent = rNEvt.GetKeyEvent(); const KeyCode& rKeyCode = pEvent->GetKeyCode(); - USHORT nTmpCode = rKeyCode.GetFullCode() & ~KEY_ALLMODTYPE; + sal_uInt16 nTmpCode = rKeyCode.GetFullCode() & ~KEY_ALLMODTYPE; if(nTmpCode != KEY_BACKSPACE && nTmpCode != KEY_RETURN && nTmpCode != KEY_TAB && nTmpCode != KEY_ESCAPE) diff --git a/sw/source/ui/frmdlg/cption.src b/sw/source/ui/frmdlg/cption.src index 9440c7859f..0a3876c421 100644 --- a/sw/source/ui/frmdlg/cption.src +++ b/sw/source/ui/frmdlg/cption.src @@ -61,6 +61,7 @@ ModalDialog DLG_CAPTION }; PushButton BTN_AUTOCAPTION { + HelpID = "sw:PushButton:DLG_CAPTION:BTN_AUTOCAPTION"; Pos = MAP_APPFONT ( 194 , 63 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; TabStop = TRUE ; @@ -68,6 +69,7 @@ ModalDialog DLG_CAPTION }; PushButton BTN_OPTION { + HelpID = "sw:PushButton:DLG_CAPTION:BTN_OPTION"; Pos = MAP_APPFONT ( 194 , 80 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; TabStop = TRUE ; @@ -83,6 +85,7 @@ ModalDialog DLG_CAPTION }; Edit EDT_TEXT { + HelpID = "sw:Edit:DLG_CAPTION:EDT_TEXT"; Pos = MAP_APPFONT ( 6 , 17 ) ; Size = MAP_APPFONT ( 182 , 12 ) ; Border = TRUE ; @@ -104,6 +107,7 @@ ModalDialog DLG_CAPTION }; ComboBox BOX_CATEGORY { + HelpID = "sw:ComboBox:DLG_CAPTION:BOX_CATEGORY"; Pos = MAP_APPFONT ( 82 , 46 ) ; Size = MAP_APPFONT ( 106 , 61 ) ; DropDown = TRUE ; @@ -119,6 +123,7 @@ ModalDialog DLG_CAPTION }; ListBox BOX_FORMAT { + HelpID = "sw:ListBox:DLG_CAPTION:BOX_FORMAT"; Border = TRUE ; Pos = MAP_APPFONT ( 82 , 63 ) ; Size = MAP_APPFONT ( 106 , 83 ) ; @@ -135,6 +140,7 @@ ModalDialog DLG_CAPTION }; Edit ED_NUM_SEP { + HelpID = "sw:Edit:DLG_CAPTION:ED_NUM_SEP"; Pos = MAP_APPFONT ( 82 , 63 ) ; Size = MAP_APPFONT ( 106 , 12 ) ; Border = TRUE ; @@ -152,6 +158,7 @@ ModalDialog DLG_CAPTION }; Edit EDT_SEP { + HelpID = "sw:Edit:DLG_CAPTION:EDT_SEP"; Pos = MAP_APPFONT ( 82 , 80 ) ; Size = MAP_APPFONT ( 106 , 12 ) ; Border = TRUE ; @@ -168,6 +175,7 @@ ModalDialog DLG_CAPTION }; ListBox BOX_POS { + HelpID = "sw:ListBox:DLG_CAPTION:BOX_POS"; Pos = MAP_APPFONT ( 82 , 97 ) ; Size = MAP_APPFONT ( 106 , 61 ) ; DropDown = TRUE ; @@ -244,6 +252,7 @@ ModalDialog DLG_SEQUENCE_OPTION }; ListBox LB_LEVEL { + HelpID = "sw:ListBox:DLG_SEQUENCE_OPTION:LB_LEVEL"; Border = TRUE ; Pos = MAP_APPFONT ( 65 , 18 ) ; Size = MAP_APPFONT ( 72 , 60 ) ; @@ -262,6 +271,7 @@ ModalDialog DLG_SEQUENCE_OPTION }; Edit ED_SEPARATOR { + HelpID = "sw:Edit:DLG_SEQUENCE_OPTION:ED_SEPARATOR"; Pos = MAP_APPFONT ( 65 , 34 ) ; Size = MAP_APPFONT ( 72 , 12 ) ; Border = TRUE ; @@ -282,6 +292,7 @@ ModalDialog DLG_SEQUENCE_OPTION }; ListBox LB_CHARSTYLE { + HelpID = "sw:ListBox:DLG_SEQUENCE_OPTION:LB_CHARSTYLE"; Border = TRUE ; Pos = MAP_APPFONT ( 65 , 68 ) ; Size = MAP_APPFONT ( 72 , 60 ) ; @@ -294,6 +305,7 @@ ModalDialog DLG_SEQUENCE_OPTION }; CheckBox CB_APPLYBAS { + HelpID = "sw:CheckBox:DLG_SEQUENCE_OPTION:CB_APPLYBAS"; Pos = MAP_APPFONT ( 12 , 84 ) ; Size = MAP_APPFONT ( 136 , 10 ) ; TabStop = TRUE ; @@ -313,6 +325,7 @@ ModalDialog DLG_SEQUENCE_OPTION }; ListBox LB_ORDER { + HelpID = "sw:ListBox:DLG_SEQUENCE_OPTION:LB_ORDER"; Border = TRUE ; Pos = MAP_APPFONT ( 65 , 114 ) ; Size = MAP_APPFONT ( 72 , 60 ) ; diff --git a/sw/source/ui/frmdlg/frmdlg.cxx b/sw/source/ui/frmdlg/frmdlg.cxx index 23d827a7aa..230dcf9baf 100644 --- a/sw/source/ui/frmdlg/frmdlg.cxx +++ b/sw/source/ui/frmdlg/frmdlg.cxx @@ -60,10 +60,10 @@ SwFrmDlg::SwFrmDlg( SfxViewFrame* pViewFrame, Window* pParent, const SfxItemSet& rCoreSet, - BOOL bNewFrm, - USHORT nResType, - BOOL bFormat, - UINT16 nDefPage, + sal_Bool bNewFrm, + sal_uInt16 nResType, + sal_Bool bFormat, + sal_uInt16 nDefPage, const String* pStr) : SfxTabDialog(pViewFrame, pParent, SW_RES(nResType), &rCoreSet, pStr != 0), @@ -74,8 +74,8 @@ SwFrmDlg::SwFrmDlg( SfxViewFrame* pViewFrame, m_pWrtShell(((SwView*)pViewFrame->GetViewShell())->GetWrtShellPtr()) { FreeResource(); - USHORT nHtmlMode = ::GetHtmlMode(m_pWrtShell->GetView().GetDocShell()); - m_bHTMLMode = static_cast< BOOL >(nHtmlMode & HTMLMODE_ON); + sal_uInt16 nHtmlMode = ::GetHtmlMode(m_pWrtShell->GetView().GetDocShell()); + m_bHTMLMode = static_cast< sal_Bool >(nHtmlMode & HTMLMODE_ON); // BspFont fuer beide Bsp-TabPages // @@ -86,7 +86,8 @@ SwFrmDlg::SwFrmDlg( SfxViewFrame* pViewFrame, aTmp += *pStr; aTmp += ')'; } - AddTabPage(TP_FRM_STD, SwFrmPage::Create, 0); + + AddTabPage(TP_FRM_STD, SwFrmPage::Create, 0); AddTabPage(TP_FRM_ADD, SwFrmAddPage::Create, 0); AddTabPage(TP_FRM_WRAP, SwWrapTabPage::Create, 0); AddTabPage(TP_FRM_URL, SwFrmURLPage::Create, 0); @@ -138,7 +139,7 @@ SwFrmDlg::~SwFrmDlg() { } -void SwFrmDlg::PageCreated( USHORT nId, SfxTabPage &rPage ) +void SwFrmDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) { SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool())); switch ( nId ) @@ -158,13 +159,13 @@ void SwFrmDlg::PageCreated( USHORT nId, SfxTabPage &rPage ) case TP_FRM_WRAP: ((SwWrapTabPage&)rPage).SetNewFrame(m_bNew); - ((SwWrapTabPage&)rPage).SetFormatUsed(m_bFormat, FALSE); + ((SwWrapTabPage&)rPage).SetFormatUsed(m_bFormat, sal_False); ((SwWrapTabPage&)rPage).SetShell(m_pWrtShell); break; case TP_COLUMN: { - ((SwColumnPage&)rPage).SetFrmMode(TRUE); + ((SwColumnPage&)rPage).SetFrmMode(sal_True); ((SwColumnPage&)rPage).SetFormatUsed(m_bFormat); const SwFmtFrmSize& rSize = (const SwFmtFrmSize&) diff --git a/sw/source/ui/frmdlg/frmmgr.cxx b/sw/source/ui/frmdlg/frmmgr.cxx index 661153d9f6..d2c3a41a1c 100644 --- a/sw/source/ui/frmdlg/frmmgr.cxx +++ b/sw/source/ui/frmdlg/frmmgr.cxx @@ -56,7 +56,7 @@ using namespace ::com::sun::star; -static USHORT aFrmMgrRange[] = { +static sal_uInt16 aFrmMgrRange[] = { RES_FRMATR_BEGIN, RES_FRMATR_END-1, SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER, FN_SET_FRM_NAME, FN_SET_FRM_NAME, @@ -65,17 +65,18 @@ static USHORT aFrmMgrRange[] = { /*-------------------------------------------------------------------- Beschreibung: Rahmen-Attribute ueber Shell ermitteln --------------------------------------------------------------------*/ -SwFlyFrmAttrMgr::SwFlyFrmAttrMgr( BOOL bNew, SwWrtShell* pSh, BYTE nType ) : +SwFlyFrmAttrMgr::SwFlyFrmAttrMgr( sal_Bool bNew, SwWrtShell* pSh, sal_uInt8 nType ) : aSet( (SwAttrPool&)pSh->GetAttrPool(), aFrmMgrRange ), pOwnSh( pSh ), - bAbsPos( FALSE ), + bAbsPos( sal_False ), bNewFrm( bNew ), - bIsInVertical( FALSE ) + bIsInVertical( sal_False ), + bIsInVerticalL2R( sal_False ) { if ( bNewFrm ) { // Defaults einstellen: - USHORT nId = 0; + sal_uInt16 nId = 0; switch ( nType ) { case FRMMGR_TYPE_TEXT: nId = RES_POOLFRM_FRAME; break; @@ -90,23 +91,24 @@ SwFlyFrmAttrMgr::SwFlyFrmAttrMgr( BOOL bNew, SwWrtShell* pSh, BYTE nType ) : else if ( nType == FRMMGR_TYPE_NONE ) { pOwnSh->GetFlyFrmAttr( aSet ); - BOOL bRightToLeft; - bIsInVertical = pOwnSh->IsFrmVertical(TRUE, bRightToLeft); + sal_Bool bRightToLeft; + bIsInVertical = pOwnSh->IsFrmVertical(sal_True, bRightToLeft, bIsInVerticalL2R); } ::PrepareBoxInfo( aSet, *pOwnSh ); } -SwFlyFrmAttrMgr::SwFlyFrmAttrMgr( BOOL bNew, SwWrtShell* pSh, const SfxItemSet &rSet ) : +SwFlyFrmAttrMgr::SwFlyFrmAttrMgr( sal_Bool bNew, SwWrtShell* pSh, const SfxItemSet &rSet ) : aSet( rSet ), pOwnSh( pSh ), - bAbsPos( FALSE ), + bAbsPos( sal_False ), bNewFrm( bNew ), - bIsInVertical(FALSE) + bIsInVertical(sal_False), + bIsInVerticalL2R(sal_False) { if(!bNew) { - BOOL bRightToLeft; - bIsInVertical = pSh->IsFrmVertical(TRUE, bRightToLeft); + sal_Bool bRightToLeft; + bIsInVertical = pSh->IsFrmVertical(sal_True, bRightToLeft, bIsInVerticalL2R); } } @@ -124,7 +126,7 @@ void SwFlyFrmAttrMgr::_UpdateFlyFrm() { const SfxPoolItem* pItem = 0; - if (aSet.GetItemState(FN_SET_FRM_NAME, FALSE, &pItem) == SFX_ITEM_SET) + if (aSet.GetItemState(FN_SET_FRM_NAME, sal_False, &pItem) == SFX_ITEM_SET) pOwnSh->SetFlyName(((SfxStringItem *)pItem)->GetValue()); pOwnSh->SetModified(); @@ -132,7 +134,7 @@ void SwFlyFrmAttrMgr::_UpdateFlyFrm() if ( bAbsPos ) { pOwnSh->SetFlyPos( aAbsPos ); - bAbsPos = FALSE; + bAbsPos = sal_False; } } @@ -148,11 +150,11 @@ void SwFlyFrmAttrMgr::UpdateFlyFrm() { //JP 6.8.2001: set never an invalid anchor into the core. const SfxPoolItem *pGItem, *pItem; - if( SFX_ITEM_SET == aSet.GetItemState( RES_ANCHOR, FALSE, &pItem )) + if( SFX_ITEM_SET == aSet.GetItemState( RES_ANCHOR, sal_False, &pItem )) { SfxItemSet aGetSet( *aSet.GetPool(), RES_ANCHOR, RES_ANCHOR ); if( pOwnSh->GetFlyFrmAttr( aGetSet ) && 1 == aGetSet.Count() && - SFX_ITEM_SET == aGetSet.GetItemState( RES_ANCHOR, FALSE, &pGItem ) + SFX_ITEM_SET == aGetSet.GetItemState( RES_ANCHOR, sal_False, &pGItem ) && ((SwFmtAnchor*)pGItem)->GetAnchorId() == ((SwFmtAnchor*)pItem)->GetAnchorId() ) aSet.ClearItem( RES_ANCHOR ); @@ -172,11 +174,11 @@ void SwFlyFrmAttrMgr::UpdateFlyFrm() /*-------------------------------------------------------------------- Beschreibung: Rahmen einfuegen --------------------------------------------------------------------*/ -BOOL SwFlyFrmAttrMgr::InsertFlyFrm() +sal_Bool SwFlyFrmAttrMgr::InsertFlyFrm() { pOwnSh->StartAllAction(); - BOOL bRet = 0 != pOwnSh->NewFlyFrm( aSet ); + sal_Bool bRet = 0 != pOwnSh->NewFlyFrm( aSet ); // richtigen Mode an der Shell einschalten, Rahmen wurde aut. selektiert. if ( bRet ) @@ -198,7 +200,7 @@ BOOL SwFlyFrmAttrMgr::InsertFlyFrm() void SwFlyFrmAttrMgr::InsertFlyFrm(RndStdIds eAnchorType, const Point &rPos, const Size &rSize, - BOOL bAbs ) + sal_Bool bAbs ) { OSL_ENSURE( eAnchorType == FLY_AT_PAGE || eAnchorType == FLY_AT_PARA || @@ -221,7 +223,7 @@ void SwFlyFrmAttrMgr::InsertFlyFrm(RndStdIds eAnchorType, --------------------------------------------------------------------*/ void SwFlyFrmAttrMgr::SetAnchor( RndStdIds eId ) { - USHORT nPhyPageNum, nVirtPageNum; + sal_uInt16 nPhyPageNum, nVirtPageNum; pOwnSh->GetPageNum( nPhyPageNum, nVirtPageNum ); aSet.Put( SwFmtAnchor( eId, nPhyPageNum ) ); @@ -250,7 +252,7 @@ void SwFlyFrmAttrMgr::SetCol( const SwFmtCol &rCol ) --------------------------------------------------------------------*/ void SwFlyFrmAttrMgr::SetAbsPos( const Point& rPoint ) { - bAbsPos = TRUE; + bAbsPos = sal_True; aAbsPos = rPoint; SwFmtVertOrient aVertOrient( GetVertOrient() ); @@ -266,7 +268,7 @@ void SwFlyFrmAttrMgr::SetAbsPos( const Point& rPoint ) --------------------------------------------------------------------*/ void SwFlyFrmAttrMgr::ValidateMetrics( SvxSwFrameValidation& rVal, const SwPosition* pToCharCntntPos, - BOOL bOnlyPercentRefValue ) + sal_Bool bOnlyPercentRefValue ) { if (!bOnlyPercentRefValue) { @@ -289,7 +291,9 @@ void SwFlyFrmAttrMgr::ValidateMetrics( SvxSwFrameValidation& rVal, if (bOnlyPercentRefValue) return; - if(bIsInVertical) + // --> OD 2009-09-01 #mongolianlayout# + if ( bIsInVertical || bIsInVerticalL2R ) + // <-- { Point aPos(aBoundRect.Pos()); long nTmp = aPos.X(); @@ -486,7 +490,9 @@ void SwFlyFrmAttrMgr::ValidateMetrics( SvxSwFrameValidation& rVal, rVal.nMaxVPos = -aBoundRect.Height(); } } - if(bIsInVertical) + // --> OD 2009-09-01 #mongolianlayout# + if ( bIsInVertical || bIsInVerticalL2R ) + // <-- { //restore width/height exchange long nTmp = rVal.nWidth; @@ -534,7 +540,7 @@ SwTwips SwFlyFrmAttrMgr::CalcRightSpace() /*-------------------------------------------------------------------- Beschreibung: Attribut aus dem Set loeschen --------------------------------------------------------------------*/ -void SwFlyFrmAttrMgr::DelAttr( USHORT nId ) +void SwFlyFrmAttrMgr::DelAttr( sal_uInt16 nId ) { aSet.ClearItem( nId ); } @@ -545,9 +551,9 @@ void SwFlyFrmAttrMgr::SetLRSpace( long nLeft, long nRight ) SvxLRSpaceItem aTmp( (SvxLRSpaceItem&)aSet.Get( RES_LR_SPACE ) ); if( LONG_MAX != nLeft ) - aTmp.SetLeft( USHORT(nLeft) ); + aTmp.SetLeft( sal_uInt16(nLeft) ); if( LONG_MAX != nRight ) - aTmp.SetRight( USHORT(nRight) ); + aTmp.SetRight( sal_uInt16(nRight) ); aSet.Put( aTmp ); } @@ -557,9 +563,9 @@ void SwFlyFrmAttrMgr::SetULSpace( long nTop, long nBottom ) SvxULSpaceItem aTmp( (SvxULSpaceItem&)aSet.Get( RES_UL_SPACE ) ); if( LONG_MAX != nTop ) - aTmp.SetUpper( USHORT(nTop) ); + aTmp.SetUpper( sal_uInt16(nTop) ); if( LONG_MAX != nBottom ) - aTmp.SetLower( USHORT(nBottom) ); + aTmp.SetLower( sal_uInt16(nBottom) ); aSet.Put( aTmp ); } diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx index 7b6eafd3fe..eab008feed 100644 --- a/sw/source/ui/frmdlg/frmpage.cxx +++ b/sw/source/ui/frmdlg/frmpage.cxx @@ -92,16 +92,16 @@ struct FrmMap { SvxSwFramePosString::StringId eStrId; SvxSwFramePosString::StringId eMirrorStrId; - USHORT nAlign; - ULONG nLBRelations; + sal_uInt16 nAlign; + sal_uLong nLBRelations; }; struct RelationMap { SvxSwFramePosString::StringId eStrId; SvxSwFramePosString::StringId eMirrorStrId; - ULONG nLBRelation; - USHORT nRelation; + sal_uLong nLBRelation; + sal_uInt16 nRelation; }; struct StringIdPair_Impl @@ -385,14 +385,14 @@ static FrmMap aVAsCharHtmlMap[] = {SwFPos::CENTER_VERT, SwFPos::CENTER_VERT, text::VertOrientation::LINE_CENTER, LB_REL_ROW} }; -static USHORT aPageRg[] = { +static sal_uInt16 aPageRg[] = { RES_FRM_SIZE, RES_FRM_SIZE, RES_VERT_ORIENT, RES_ANCHOR, RES_COL, RES_COL, RES_FOLLOW_TEXT_FLOW, RES_FOLLOW_TEXT_FLOW, 0 }; -static USHORT aAddPgRg[] = { +static sal_uInt16 aAddPgRg[] = { RES_PROTECT, RES_PROTECT, RES_PRINT, RES_PRINT, FN_SET_FRM_NAME, FN_SET_FRM_NAME, @@ -455,7 +455,7 @@ void lcl_InsertVectors(ListBox& rBox, const ::std::vector< String >& rNext, const ::std::vector< String >& rRemain) { ::std::vector< String >::const_iterator aIt; - USHORT nEntry = 0; + sal_uInt16 nEntry = 0; for(aIt = rPrev.begin(); aIt != rPrev.end(); aIt++) nEntry = rBox.InsertEntry(*aIt); for(aIt = rThis.begin(); aIt != rThis.end(); aIt++) @@ -464,7 +464,7 @@ void lcl_InsertVectors(ListBox& rBox, nEntry = rBox.InsertEntry(*aIt); rBox.SetSeparatorPos(nEntry); //now insert all strings sorted - USHORT nStartPos = rBox.GetEntryCount(); + sal_uInt16 nStartPos = rBox.GetEntryCount(); for(aIt = rPrev.begin(); aIt != rPrev.end(); aIt++) ::InsertStringSorted(*aIt, rBox, nStartPos ); @@ -476,17 +476,32 @@ void lcl_InsertVectors(ListBox& rBox, ::InsertStringSorted(*aIt, rBox, nStartPos ); } -SvxSwFramePosString::StringId lcl_ChangeResIdToVerticalOrRTL(SvxSwFramePosString::StringId eStringId, BOOL bVertical, BOOL bRTL) +// --> OD 2009-08-31 #mongolianlayout# +// add input parameter +SvxSwFramePosString::StringId lcl_ChangeResIdToVerticalOrRTL(SvxSwFramePosString::StringId eStringId, sal_Bool bVertical, sal_Bool bVerticalL2R, sal_Bool bRTL) { //special handling of STR_FROMLEFT - if(SwFPos::FROMLEFT == eStringId) + if ( SwFPos::FROMLEFT == eStringId ) + { + eStringId = bVertical + ? ( bRTL + ? SwFPos::FROMBOTTOM + : SwFPos::FROMTOP ) + : ( bRTL + ? SwFPos::FROMRIGHT + : SwFPos::FROMLEFT ); + return eStringId; + } + // --> OD 2009-08-31 #mongolianlayout# + // special handling of STR_FROMTOP in case of mongolianlayout (vertical left-to-right) + if ( SwFPos::FROMTOP == eStringId && + bVertical && bVerticalL2R ) { - eStringId = bVertical ? - bRTL ? SwFPos::FROMBOTTOM : SwFPos::FROMTOP : - bRTL ? SwFPos::FROMRIGHT : SwFPos::FROMLEFT; + eStringId = SwFPos::FROMLEFT; return eStringId; } - if(bVertical) + // <-- + if ( bVertical ) { //exchange horizontal strings with vertical strings and vice versa static const StringIdPair_Impl aHoriIds[] = @@ -511,7 +526,20 @@ SvxSwFramePosString::StringId lcl_ChangeResIdToVerticalOrRTL(SvxSwFramePosString {SwFPos::REL_FRM_TOP, SwFPos::REL_FRM_LEFT }, {SwFPos::REL_FRM_BOTTOM, SwFPos::REL_FRM_RIGHT } }; - USHORT nIndex; + // --> OD 2009-08-31 #monglianlayout# + static const StringIdPair_Impl aVertL2RIds[] = + { + {SwFPos::TOP, SwFPos::LEFT }, + {SwFPos::BOTTOM, SwFPos::RIGHT }, + {SwFPos::CENTER_VERT, SwFPos::CENTER_HORI }, + {SwFPos::FROMTOP, SwFPos::FROMLEFT }, + {SwFPos::REL_PG_TOP, SwFPos::REL_PG_LEFT }, + {SwFPos::REL_PG_BOTTOM, SwFPos::REL_PG_RIGHT } , + {SwFPos::REL_FRM_TOP, SwFPos::REL_FRM_LEFT }, + {SwFPos::REL_FRM_BOTTOM, SwFPos::REL_FRM_RIGHT } + }; + // <-- + sal_uInt16 nIndex; for(nIndex = 0; nIndex < sizeof(aHoriIds) / sizeof(StringIdPair_Impl); ++nIndex) { if(aHoriIds[nIndex].eHori == eStringId) @@ -523,11 +551,24 @@ SvxSwFramePosString::StringId lcl_ChangeResIdToVerticalOrRTL(SvxSwFramePosString nIndex = 0; for(nIndex = 0; nIndex < sizeof(aVertIds) / sizeof(StringIdPair_Impl); ++nIndex) { - if(aVertIds[nIndex].eHori == eStringId) + // --> OD 2009-08-31 #mongolianlayout# + if ( !bVerticalL2R ) { - eStringId = aVertIds[nIndex].eVert; - break; + if(aVertIds[nIndex].eHori == eStringId) + { + eStringId = aVertIds[nIndex].eVert; + break; + } } + else + { + if(aVertL2RIds[nIndex].eHori == eStringId) + { + eStringId = aVertL2RIds[nIndex].eVert; + break; + } + } + // <-- } } return eStringId; @@ -535,9 +576,9 @@ SvxSwFramePosString::StringId lcl_ChangeResIdToVerticalOrRTL(SvxSwFramePosString // helper method in order to determine all possible // listbox relations in a relation map for a given relation -ULONG lcl_GetLBRelationsForRelations( const USHORT _nRel ) +sal_uLong lcl_GetLBRelationsForRelations( const sal_uInt16 _nRel ) { - ULONG nLBRelations = 0L; + sal_uLong nLBRelations = 0L; sal_uInt16 nRelMapSize = sizeof(aRelationMap) / sizeof(RelationMap); for ( sal_uInt16 nRelMapPos = 0; nRelMapPos < nRelMapSize; ++nRelMapPos ) @@ -553,11 +594,11 @@ ULONG lcl_GetLBRelationsForRelations( const USHORT _nRel ) // helper method on order to determine all possible // listbox relations in a relation map for a given string ID -ULONG lcl_GetLBRelationsForStrID( const FrmMap* _pMap, +sal_uLong lcl_GetLBRelationsForStrID( const FrmMap* _pMap, const SvxSwFramePosString::StringId _eStrId, const bool _bUseMirrorStr ) { - ULONG nLBRelations = 0L; + sal_uLong nLBRelations = 0L; size_t nRelMapSize = lcl_GetFrmMapCount( _pMap ); for ( size_t nRelMapPos = 0; nRelMapPos < nRelMapSize; ++nRelMapPos ) @@ -577,7 +618,7 @@ ULONG lcl_GetLBRelationsForStrID( const FrmMap* _pMap, --------------------------------------------------------------------*/ namespace { - void HandleAutoCB( BOOL _bChecked, FixedText& _rFT_man, FixedText& _rFT_auto ) + void HandleAutoCB( sal_Bool _bChecked, FixedText& _rFT_man, FixedText& _rFT_auto ) { _rFT_man.Show( !_bChecked ); _rFT_auto.Show( _bChecked ); @@ -587,6 +628,7 @@ namespace SwFrmPage::SwFrmPage ( Window *pParent, const SfxItemSet &rSet ) : SfxTabPage (pParent, SW_RES(TP_FRM_STD), rSet), + aSizeFL (this, SW_RES(FL_SIZE)), aWidthFT (this, SW_RES(FT_WIDTH)), aWidthAutoFT (this, SW_RES(FT_WIDTH_AUTO)), aWidthED (this, SW_RES(ED_WIDTH)), @@ -599,16 +641,16 @@ SwFrmPage::SwFrmPage ( Window *pParent, const SfxItemSet &rSet ) : aAutoHeightCB (this, SW_RES(CB_AUTOHEIGHT)), aFixedRatioCB (this, SW_RES(CB_FIXEDRATIO)), aRealSizeBT (this, SW_RES(BT_REALSIZE)), - aSizeFL (this, SW_RES(FL_SIZE)), - aTypeFL (this, SW_RES(FL_TYPE)), aTypeSepFL (this, SW_RES(FL_TYPE_SEP)), + aTypeFL (this, SW_RES(FL_TYPE)), aAnchorAtPageRB (this, SW_RES(RB_ANCHOR_PAGE)), aAnchorAtParaRB (this, SW_RES(RB_ANCHOR_PARA)), aAnchorAtCharRB (this, SW_RES(RB_ANCHOR_AT_CHAR)), aAnchorAsCharRB (this, SW_RES(RB_ANCHOR_AS_CHAR)), aAnchorAtFrameRB(this, SW_RES(RB_ANCHOR_FRAME)), + aPositionFL (this, SW_RES(FL_POSITION)), aHorizontalFT (this, SW_RES(FT_HORIZONTAL)), aHorizontalDLB (this, SW_RES(DLB_HORIZONTAL)), aAtHorzPosFT (this, SW_RES(FT_AT_HORZ_POS)), @@ -623,20 +665,21 @@ SwFrmPage::SwFrmPage ( Window *pParent, const SfxItemSet &rSet ) : aVertRelationFT (this, SW_RES(FT_VERT_RELATION)), aVertRelationLB (this, SW_RES(LB_VERT_RELATION)), aFollowTextFlowCB(this, SW_RES(CB_FOLLOWTEXTFLOW)), - aPositionFL (this, SW_RES(FL_POSITION)), aExampleWN (this, SW_RES(WN_BSP)), - bAtHorzPosModified( FALSE ), - bAtVertPosModified( FALSE ), - - bFormat(FALSE), - bNew(TRUE), - bNoModifyHdl(TRUE), - bVerticalChanged(FALSE), - bIsVerticalFrame(FALSE), - bIsInRightToLeft(FALSE), - bHtmlMode(FALSE), + bAtHorzPosModified( sal_False ), + bAtVertPosModified( sal_False ), + bFormat(sal_False), + bNew(sal_True), + bNoModifyHdl(sal_True), + // --> OD 2009-08-31 #mongolianlayout# - no used +// bVerticalChanged(sal_False), + // <-- + bIsVerticalFrame(sal_False), + bIsVerticalL2R(sal_False), + bIsInRightToLeft(sal_False), + bHtmlMode(sal_False), nHtmlMode(0), nDlgType(0), nUpperBorder(0), @@ -649,11 +692,16 @@ SwFrmPage::SwFrmPage ( Window *pParent, const SfxItemSet &rSet ) : nOldV(text::VertOrientation::TOP), nOldVRel(text::RelOrientation::PRINT_AREA), pVMap( 0 ), - pHMap( 0 ) + pHMap( 0 ), + m_bAllowVertPositioning( true ), + m_bIsMathOLE( false ), + m_bIsMathBaselineAlignment( true ) { FreeResource(); SetExchangeSupport(); + aRealSizeBT.SetAccessibleRelationMemberOf(&aSizeFL); + Link aLk = LINK(this, SwFrmPage, RangeModifyHdl); aWidthED. SetLoseFocusHdl( aLk ); aHeightED. SetLoseFocusHdl( aLk ); @@ -744,7 +792,7 @@ void SwFrmPage::Reset( const SfxItemSet &rSet ) ((SwFrmDlg*)GetParent()->GetParent())->GetWrtShell(); nHtmlMode = ::GetHtmlMode(pSh->GetView().GetDocShell()); - bHtmlMode = nHtmlMode & HTMLMODE_ON ? TRUE : FALSE; + bHtmlMode = nHtmlMode & HTMLMODE_ON ? sal_True : sal_False; FieldUnit aMetric = ::GetDfltMetric(bHtmlMode); SetMetric( aWidthED, aMetric ); @@ -752,38 +800,48 @@ void SwFrmPage::Reset( const SfxItemSet &rSet ) SetMetric( aAtHorzPosED, aMetric ); SetMetric( aAtVertPosED, aMetric ); + const SfxPoolItem* pItem = NULL; const SwFmtAnchor& rAnchor = (const SwFmtAnchor&)rSet.Get(RES_ANCHOR); + if (SFX_ITEM_SET == rSet.GetItemState(FN_OLE_IS_MATH, sal_False, &pItem)) + m_bIsMathOLE = ((const SfxBoolItem*)pItem)->GetValue(); + if (SFX_ITEM_SET == rSet.GetItemState(FN_MATH_BASELINE_ALIGNMENT, sal_False, &pItem)) + m_bIsMathBaselineAlignment = ((const SfxBoolItem*)pItem)->GetValue(); + EnableVerticalPositioning( !(m_bIsMathOLE && m_bIsMathBaselineAlignment + && FLY_AS_CHAR == rAnchor.GetAnchorId()) ); + if (bFormat) { // Bei Formaten keine Ankerbearbeitung - aAnchorAtPageRB.Enable( FALSE ); - aAnchorAtParaRB.Enable( FALSE ); - aAnchorAtCharRB.Enable( FALSE ); - aAnchorAsCharRB.Enable( FALSE ); - aAnchorAtFrameRB.Enable( FALSE ); - aTypeFL.Enable( FALSE ); - aFixedRatioCB.Enable(FALSE); + aAnchorAtPageRB.Enable( sal_False ); + aAnchorAtParaRB.Enable( sal_False ); + aAnchorAtCharRB.Enable( sal_False ); + aAnchorAsCharRB.Enable( sal_False ); + aAnchorAtFrameRB.Enable( sal_False ); + aTypeFL.Enable( sal_False ); + aFixedRatioCB.Enable(sal_False); } else { if (rAnchor.GetAnchorId() != FLY_AT_FLY && !pSh->IsFlyInFly()) aAnchorAtFrameRB.Hide(); - if(!bVerticalChanged && pSh->IsFrmVertical(TRUE, bIsInRightToLeft)) + // --> OD 2009-08-31 #mongolianlayout# +// if ( !bVerticalChanged && pSh->IsFrmVertical(sal_True, bIsInRightToLeft) ) + if ( pSh->IsFrmVertical( sal_True, bIsInRightToLeft, bIsVerticalL2R ) ) + // <-- { String sHLabel = aHorizontalFT.GetText(); aHorizontalFT.SetText(aVerticalFT.GetText()); aVerticalFT.SetText(sHLabel); - bIsVerticalFrame = TRUE; + bIsVerticalFrame = sal_True; } } if ( nDlgType == DLG_FRM_GRF || nDlgType == DLG_FRM_OLE ) { OSL_ENSURE(pSh , "shell not found"); - const SfxPoolItem* pItem; //OS: nur fuer die Variante Einfuegen/Grafik/Eigenschaften - if(SFX_ITEM_SET == rSet.GetItemState(FN_PARAM_GRF_REALSIZE, FALSE, &pItem)) + if(SFX_ITEM_SET == rSet.GetItemState(FN_PARAM_GRF_REALSIZE, sal_False, &pItem)) aGrfSize = ((const SvxSizeItem*)pItem)->GetSize(); else pSh->GetGrfSize( aGrfSize ); @@ -795,7 +853,7 @@ void SwFrmPage::Reset( const SfxItemSet &rSet ) } if ( nDlgType == DLG_FRM_GRF ) - aFixedRatioCB.Check( FALSE ); + aFixedRatioCB.Check( sal_False ); else { if ( bNew ) @@ -858,9 +916,9 @@ void SwFrmPage::Reset( const SfxItemSet &rSet ) if(nDlgType == DLG_FRM_STD && 0 == (nHtmlMode & HTMLMODE_FULL_ABS_POS)) { - aHeightFT .Enable( FALSE ); - aHeightED .Enable( FALSE ); - aRelHeightCB.Enable( FALSE ); + aHeightFT .Enable( sal_False ); + aHeightED .Enable( sal_False ); + aRelHeightCB.Enable( sal_False ); } if( 0 == (nHtmlMode & HTMLMODE_SOME_ABS_POS)) { @@ -868,15 +926,15 @@ void SwFrmPage::Reset( const SfxItemSet &rSet ) { aAnchorAtParaRB.Check(); } - aAnchorAtPageRB.Enable(FALSE); + aAnchorAtPageRB.Enable(sal_False); } - aAutoHeightCB.Enable(FALSE); - aAutoWidthCB.Enable(FALSE); - aMirrorPagesCB.Show(FALSE); + aAutoHeightCB.Enable(sal_False); + aAutoWidthCB.Enable(sal_False); + aMirrorPagesCB.Show(sal_False); if(nDlgType == DLG_FRM_STD) - aFixedRatioCB.Enable(FALSE); + aFixedRatioCB.Enable(sal_False); // i#18732 hide checkbox in HTML mode - aFollowTextFlowCB.Show(FALSE); + aFollowTextFlowCB.Show(sal_False); } else { @@ -891,12 +949,12 @@ void SwFrmPage::Reset( const SfxItemSet &rSet ) aAnchorAtFrameRB.IsChecked() ); } - Init( rSet, TRUE ); + Init( rSet, sal_True ); aAtVertPosED.SaveValue(); aAtHorzPosED.SaveValue(); aFollowTextFlowCB.SaveValue(); - bNoModifyHdl = FALSE; + bNoModifyHdl = sal_False; //lock PercentFields aWidthED.LockAutoCalculation(sal_True); aHeightED.LockAutoCalculation(sal_True); @@ -915,9 +973,9 @@ void SwFrmPage::Reset( const SfxItemSet &rSet ) /*-------------------------------------------------------------------- Beschreibung: Attribute in den Set stopfen bei OK --------------------------------------------------------------------*/ -BOOL SwFrmPage::FillItemSet(SfxItemSet &rSet) +sal_Bool SwFrmPage::FillItemSet(SfxItemSet &rSet) { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; SwWrtShell* pSh = bFormat ? ::GetActiveWrtShell() : ((SwFrmDlg*)GetParent()->GetParent())->GetWrtShell(); OSL_ENSURE( pSh , "shell not found"); @@ -941,7 +999,7 @@ BOOL SwFrmPage::FillItemSet(SfxItemSet &rSet) SwFmtHoriOrient aHoriOrient( (const SwFmtHoriOrient&) rOldSet.Get(RES_HORI_ORIENT) ); - USHORT nMapPos = GetMapPos(pHMap, aHorizontalDLB); + sal_uInt16 nMapPos = GetMapPos(pHMap, aHorizontalDLB); short nAlign = GetAlignment(pHMap, nMapPos, aHorizontalDLB, aHoriRelationLB); short nRel = GetRelation(pHMap, aHoriRelationLB); @@ -952,7 +1010,7 @@ BOOL SwFrmPage::FillItemSet(SfxItemSet &rSet) aHoriOrient.SetRelationOrient( eRel ); aHoriOrient.SetPosToggle(aMirrorPagesCB.IsChecked()); - BOOL bMod = aAtHorzPosED.GetText() != aAtHorzPosED.GetSavedValue(); + sal_Bool bMod = aAtHorzPosED.GetText() != aAtHorzPosED.GetSavedValue(); bMod |= aMirrorPagesCB.GetState() != aMirrorPagesCB.GetSavedValue(); if ( eHOri == text::HoriOrientation::NONE && @@ -963,10 +1021,10 @@ BOOL SwFrmPage::FillItemSet(SfxItemSet &rSet) } pOldItem = GetOldItem(rSet, FN_HORI_ORIENT); - BOOL bSame = FALSE; + sal_Bool bSame = sal_False; if ((bNew == bFormat) && pOldItem) { - bSame = static_cast< BOOL >(aHoriOrient == (SwFmtHoriOrient&)*pOldItem); + bSame = static_cast< sal_Bool >(aHoriOrient == (SwFmtHoriOrient&)*pOldItem); } if ((bNew && !bFormat) || ((bAtHorzPosModified || bMod) && !bSame)) { @@ -980,7 +1038,7 @@ BOOL SwFrmPage::FillItemSet(SfxItemSet &rSet) SwFmtVertOrient aVertOrient( (const SwFmtVertOrient&) rOldSet.Get(RES_VERT_ORIENT) ); - USHORT nMapPos = GetMapPos(pVMap, aVerticalDLB); + sal_uInt16 nMapPos = GetMapPos(pVMap, aVerticalDLB); short nAlign = GetAlignment(pVMap, nMapPos, aVerticalDLB, aVertRelationLB); short nRel = GetRelation(pVMap, aVertRelationLB); @@ -990,7 +1048,7 @@ BOOL SwFrmPage::FillItemSet(SfxItemSet &rSet) aVertOrient.SetVertOrient ( eVOri); aVertOrient.SetRelationOrient( eRel ); - BOOL bMod = aAtVertPosED.GetText() != aAtVertPosED.GetSavedValue(); + sal_Bool bMod = aAtVertPosED.GetText() != aAtVertPosED.GetSavedValue(); if ( eVOri == text::VertOrientation::NONE && ( bNew || (bAtVertPosModified || bMod) || nOldV != eVOri) ) @@ -1005,10 +1063,10 @@ BOOL SwFrmPage::FillItemSet(SfxItemSet &rSet) aVertOrient.SetPos( nY ); } pOldItem = GetOldItem(rSet, FN_VERT_ORIENT); - BOOL bSame = FALSE; + sal_Bool bSame = sal_False; if((bNew == bFormat) && pOldItem) { - bSame = static_cast< BOOL >( bFormat ? + bSame = static_cast< sal_Bool >( bFormat ? aVertOrient.GetVertOrient() == ((SwFmtVertOrient*)pOldItem)->GetVertOrient() && aVertOrient.GetRelationOrient() == ((SwFmtVertOrient*)pOldItem)->GetRelationOrient() && aVertOrient.GetPos() == ((SwFmtVertOrient*)pOldItem)->GetPos() @@ -1029,11 +1087,11 @@ BOOL SwFrmPage::FillItemSet(SfxItemSet &rSet) const SwFmtFrmSize& rOldSize = (const SwFmtFrmSize& )rOldSet.Get(RES_FRM_SIZE); SwFmtFrmSize aSz( rOldSize ); - BOOL bValueModified = (aWidthED.IsValueModified() || aHeightED.IsValueModified()); - BOOL bCheckChanged = (aRelWidthCB.GetSavedValue() != aRelWidthCB.IsChecked() + sal_Bool bValueModified = (aWidthED.IsValueModified() || aHeightED.IsValueModified()); + sal_Bool bCheckChanged = (aRelWidthCB.GetSavedValue() != aRelWidthCB.IsChecked() || aRelHeightCB.GetSavedValue() != aRelHeightCB.IsChecked()); - BOOL bLegalValue = !(!rOldSize.GetWidth () && !rOldSize.GetHeight() && + sal_Bool bLegalValue = !(!rOldSize.GetWidth () && !rOldSize.GetHeight() && aWidthED .GetValue() == aWidthED .GetMin() && aHeightED.GetValue() == aHeightED.GetMin()); @@ -1046,12 +1104,12 @@ BOOL SwFrmPage::FillItemSet(SfxItemSet &rSet) if (aRelWidthCB.IsChecked()) { - aSz.SetWidthPercent((BYTE)Min( static_cast< sal_Int64 >(MAX_PERCENT_WIDTH), aWidthED.Convert(aWidthED.NormalizePercent(nNewWidth), FUNIT_TWIP, FUNIT_CUSTOM))); + aSz.SetWidthPercent((sal_uInt8)Min( static_cast< sal_Int64 >(MAX_PERCENT_WIDTH), aWidthED.Convert(aWidthED.NormalizePercent(nNewWidth), FUNIT_TWIP, FUNIT_CUSTOM))); } else aSz.SetWidthPercent(0); if (aRelHeightCB.IsChecked()) - aSz.SetHeightPercent((BYTE)Min(static_cast< sal_Int64 >(MAX_PERCENT_HEIGHT), aHeightED.Convert(aHeightED.NormalizePercent(nNewHeight), FUNIT_TWIP, FUNIT_CUSTOM))); + aSz.SetHeightPercent((sal_uInt8)Min(static_cast< sal_Int64 >(MAX_PERCENT_HEIGHT), aHeightED.Convert(aHeightED.NormalizePercent(nNewHeight), FUNIT_TWIP, FUNIT_CUSTOM))); else aSz.SetHeightPercent(0); @@ -1104,14 +1162,14 @@ BOOL SwFrmPage::FillItemSet(SfxItemSet &rSet) Beschreibung: Horizontale und vertikale Pos initialisieren --------------------------------------------------------------------*/ void SwFrmPage::InitPos(RndStdIds eId, - USHORT nH, - USHORT nHRel, - USHORT nV, - USHORT nVRel, + sal_uInt16 nH, + sal_uInt16 nHRel, + sal_uInt16 nV, + sal_uInt16 nVRel, long nX, long nY) { - USHORT nPos = aVerticalDLB.GetSelectEntryPos(); + sal_uInt16 nPos = aVerticalDLB.GetSelectEntryPos(); if ( nPos != LISTBOX_ENTRY_NOTFOUND && pVMap ) { nOldV = pVMap[nPos].nAlign; @@ -1131,7 +1189,7 @@ void SwFrmPage::InitPos(RndStdIds eId, nOldHRel = ((RelationMap *)aHoriRelationLB.GetEntryData(nPos))->nRelation; } - BOOL bEnable = TRUE; + sal_Bool bEnable = sal_True; if ( eId == FLY_AT_PAGE ) { pVMap = bHtmlMode ? aVPageHtmlMap : aVPageMap; @@ -1174,7 +1232,7 @@ void SwFrmPage::InitPos(RndStdIds eId, { pVMap = bHtmlMode ? aVAsCharHtmlMap : aVAsCharMap; pHMap = 0; - bEnable = FALSE; + bEnable = sal_False; } aHorizontalDLB.Enable( bEnable ); aHorizontalFT.Enable( bEnable ); @@ -1186,7 +1244,7 @@ void SwFrmPage::InitPos(RndStdIds eId, nH = nOldH; nHRel = nOldHRel; } - USHORT nMapPos = FillPosLB(pHMap, nH, nHRel, aHorizontalDLB); + sal_uInt16 nMapPos = FillPosLB(pHMap, nH, nHRel, aHorizontalDLB); FillRelLB(pHMap, nMapPos, nH, nHRel, aHoriRelationLB, aHoriRelationFT); // Vertikal @@ -1232,14 +1290,14 @@ void SwFrmPage::InitPos(RndStdIds eId, if ( nY != LONG_MAX ) aAtVertPosED.SetValue( aAtVertPosED.Normalize(nY), FUNIT_TWIP ); } - aAtVertPosFT.Enable( bEnable ); - aAtVertPosED.Enable( bEnable ); + aAtVertPosFT.Enable( bEnable && m_bAllowVertPositioning ); + aAtVertPosED.Enable( bEnable && m_bAllowVertPositioning ); UpdateExample(); } -USHORT SwFrmPage::FillPosLB(const FrmMap* _pMap, - const USHORT _nAlign, - const USHORT _nRel, +sal_uInt16 SwFrmPage::FillPosLB(const FrmMap* _pMap, + const sal_uInt16 _nAlign, + const sal_uInt16 _nRel, ListBox& _rLB ) { String sSelEntry, sOldEntry; @@ -1249,7 +1307,7 @@ USHORT SwFrmPage::FillPosLB(const FrmMap* _pMap, // i#22341 determine all possible listbox relations for // given relation for map <aVCharMap> - const ULONG nLBRelations = (_pMap != aVCharMap) + const sal_uLong nLBRelations = (_pMap != aVCharMap) ? 0L : ::lcl_GetLBRelationsForRelations( _nRel ); @@ -1260,7 +1318,12 @@ USHORT SwFrmPage::FillPosLB(const FrmMap* _pMap, // Warum nicht von links/von innen bzw. von oben? { SvxSwFramePosString::StringId eStrId = aMirrorPagesCB.IsChecked() ? _pMap[i].eMirrorStrId : _pMap[i].eStrId; - eStrId = lcl_ChangeResIdToVerticalOrRTL(eStrId, bIsVerticalFrame, bIsInRightToLeft); + // --> OD 2009-08-31 #mongolianlayout# + eStrId = lcl_ChangeResIdToVerticalOrRTL( eStrId, + bIsVerticalFrame, + bIsVerticalL2R, + bIsInRightToLeft); + // <-- String sEntry(aFramePosString.GetString(eStrId)); if (_rLB.GetEntryPos(sEntry) == LISTBOX_ENTRY_NOTFOUND) { @@ -1289,15 +1352,15 @@ USHORT SwFrmPage::FillPosLB(const FrmMap* _pMap, return GetMapPos(_pMap, _rLB); } -ULONG SwFrmPage::FillRelLB( const FrmMap* _pMap, - const USHORT _nLBSelPos, - const USHORT _nAlign, - USHORT _nRel, +sal_uLong SwFrmPage::FillRelLB( const FrmMap* _pMap, + const sal_uInt16 _nLBSelPos, + const sal_uInt16 _nAlign, + sal_uInt16 _nRel, ListBox& _rLB, FixedText& _rFT ) { String sSelEntry; - ULONG nLBRelations = 0; + sal_uLong nLBRelations = 0; size_t nMapCount = ::lcl_GetFrmMapCount(_pMap); _rLB.Clear(); @@ -1307,7 +1370,7 @@ ULONG SwFrmPage::FillRelLB( const FrmMap* _pMap, if (_pMap == aVAsCharHtmlMap || _pMap == aVAsCharMap) { String sOldEntry(_rLB.GetSelectEntry()); - USHORT nRelCount = sizeof(aAsCharRelationMap) / sizeof(RelationMap); + sal_uInt16 nRelCount = sizeof(aAsCharRelationMap) / sizeof(RelationMap); SvxSwFramePosString::StringId eStrId = _pMap[_nLBSelPos].eStrId; for (size_t nMapPos = 0; nMapPos < nMapCount; nMapPos++) @@ -1315,15 +1378,21 @@ ULONG SwFrmPage::FillRelLB( const FrmMap* _pMap, if (_pMap[nMapPos].eStrId == eStrId) { nLBRelations = _pMap[nMapPos].nLBRelations; - for (USHORT nRelPos = 0; nRelPos < nRelCount; nRelPos++) + for (sal_uInt16 nRelPos = 0; nRelPos < nRelCount; nRelPos++) { if (nLBRelations & aAsCharRelationMap[nRelPos].nLBRelation) { SvxSwFramePosString::StringId sStrId1 = aAsCharRelationMap[nRelPos].eStrId; - sStrId1 = lcl_ChangeResIdToVerticalOrRTL(sStrId1, bIsVerticalFrame, bIsInRightToLeft); + // --> OD 2009-08-31 #mongolianlayout# + sStrId1 = + lcl_ChangeResIdToVerticalOrRTL( sStrId1, + bIsVerticalFrame, + bIsVerticalL2R, + bIsInRightToLeft); + // <-- String sEntry = aFramePosString.GetString(sStrId1); - USHORT nPos = _rLB.InsertEntry(sEntry); + sal_uInt16 nPos = _rLB.InsertEntry(sEntry); _rLB.SetEntryData(nPos, &aAsCharRelationMap[nRelPos]); if (_pMap[nMapPos].nAlign == _nAlign) sSelEntry = sEntry; @@ -1340,7 +1409,7 @@ ULONG SwFrmPage::FillRelLB( const FrmMap* _pMap, if (!_rLB.GetSelectEntryCount()) { - for (USHORT i = 0; i < _rLB.GetEntryCount(); i++) + for (sal_uInt16 i = 0; i < _rLB.GetEntryCount(); i++) { RelationMap *pEntry = (RelationMap *)_rLB.GetEntryData(i); if (pEntry->nLBRelation == LB_REL_CHAR) // Default @@ -1354,7 +1423,7 @@ ULONG SwFrmPage::FillRelLB( const FrmMap* _pMap, } else { - USHORT nRelCount = sizeof(aRelationMap) / sizeof(RelationMap); + sal_uInt16 nRelCount = sizeof(aRelationMap) / sizeof(RelationMap); // special handling for map <aVCharMap>, // because its ambigous in its <eStrId>/<eMirrorStrId>. @@ -1371,19 +1440,25 @@ ULONG SwFrmPage::FillRelLB( const FrmMap* _pMap, nLBRelations = _pMap[_nLBSelPos].nLBRelations; } - for (ULONG nBit = 1; nBit < 0x80000000; nBit <<= 1) + for (sal_uLong nBit = 1; nBit < 0x80000000; nBit <<= 1) { if (nLBRelations & nBit) { - for (USHORT nRelPos = 0; nRelPos < nRelCount; nRelPos++) + for (sal_uInt16 nRelPos = 0; nRelPos < nRelCount; nRelPos++) { if (aRelationMap[nRelPos].nLBRelation == nBit) { SvxSwFramePosString::StringId eStrId1 = aMirrorPagesCB.IsChecked() ? aRelationMap[nRelPos].eMirrorStrId : aRelationMap[nRelPos].eStrId; - eStrId1 = lcl_ChangeResIdToVerticalOrRTL(eStrId1, bIsVerticalFrame, bIsInRightToLeft); + // --> OD 2009-08-31 #mongolianlayout# + eStrId1 = + lcl_ChangeResIdToVerticalOrRTL( eStrId1, + bIsVerticalFrame, + bIsVerticalL2R, + bIsInRightToLeft); + // <-- String sEntry = aFramePosString.GetString(eStrId1); - USHORT nPos = _rLB.InsertEntry(sEntry); + sal_uInt16 nPos = _rLB.InsertEntry(sEntry); _rLB.SetEntryData(nPos, &aRelationMap[nRelPos]); if (!sSelEntry.Len() && aRelationMap[nRelPos].nRelation == _nRel) sSelEntry = sEntry; @@ -1416,7 +1491,7 @@ ULONG SwFrmPage::FillRelLB( const FrmMap* _pMap, break; } - for (USHORT i = 0; i < _rLB.GetEntryCount(); i++) + for (sal_uInt16 i = 0; i < _rLB.GetEntryCount(); i++) { RelationMap *pEntry = (RelationMap *)_rLB.GetEntryData(i); if (pEntry->nRelation == _nRel) @@ -1432,8 +1507,10 @@ ULONG SwFrmPage::FillRelLB( const FrmMap* _pMap, } } - _rLB.Enable(_rLB.GetEntryCount() != 0); - _rFT.Enable(_rLB.GetEntryCount() != 0); + const bool bEnable = _rLB.GetEntryCount() != 0 + && (&_rLB != &aVertRelationLB || m_bAllowVertPositioning); + _rLB.Enable( bEnable ); + _rFT.Enable( bEnable ); RelHdl(&_rLB); @@ -1443,7 +1520,7 @@ ULONG SwFrmPage::FillRelLB( const FrmMap* _pMap, short SwFrmPage::GetRelation(FrmMap * /*pMap*/, ListBox &rRelationLB) { short nRel = 0; - USHORT nPos = rRelationLB.GetSelectEntryPos(); + sal_uInt16 nPos = rRelationLB.GetSelectEntryPos(); if (nPos != LISTBOX_ENTRY_NOTFOUND) { @@ -1454,7 +1531,7 @@ short SwFrmPage::GetRelation(FrmMap * /*pMap*/, ListBox &rRelationLB) return nRel; } -short SwFrmPage::GetAlignment(FrmMap *pMap, USHORT nMapPos, +short SwFrmPage::GetAlignment(FrmMap *pMap, sal_uInt16 nMapPos, ListBox &/*rAlignLB*/, ListBox &rRelationLB) { short nAlign = 0; @@ -1466,7 +1543,7 @@ short SwFrmPage::GetAlignment(FrmMap *pMap, USHORT nMapPos, { if (rRelationLB.GetSelectEntryPos() != LISTBOX_ENTRY_NOTFOUND) { - ULONG nRel = ((RelationMap *)rRelationLB.GetEntryData(rRelationLB.GetSelectEntryPos()))->nLBRelation; + sal_uLong nRel = ((RelationMap *)rRelationLB.GetEntryData(rRelationLB.GetSelectEntryPos()))->nLBRelation; size_t nMapCount = ::lcl_GetFrmMapCount(pMap); SvxSwFramePosString::StringId eStrId = pMap[nMapPos].eStrId; @@ -1474,7 +1551,7 @@ short SwFrmPage::GetAlignment(FrmMap *pMap, USHORT nMapPos, { if (pMap[i].eStrId == eStrId) { - ULONG nLBRelations = pMap[i].nLBRelations; + sal_uLong nLBRelations = pMap[i].nLBRelations; if (nLBRelations & nRel) { nAlign = pMap[i].nAlign; @@ -1490,10 +1567,10 @@ short SwFrmPage::GetAlignment(FrmMap *pMap, USHORT nMapPos, return nAlign; } -USHORT SwFrmPage::GetMapPos( const FrmMap *pMap, ListBox &rAlignLB ) +sal_uInt16 SwFrmPage::GetMapPos( const FrmMap *pMap, ListBox &rAlignLB ) { - USHORT nMapPos = 0; - USHORT nLBSelPos = rAlignLB.GetSelectEntryPos(); + sal_uInt16 nMapPos = 0; + sal_uInt16 nLBSelPos = rAlignLB.GetSelectEntryPos(); if (nLBSelPos != LISTBOX_ENTRY_NOTFOUND) { @@ -1511,7 +1588,7 @@ USHORT SwFrmPage::GetMapPos( const FrmMap *pMap, ListBox &rAlignLB ) if (sEntry == sSelEntry) { - nMapPos = static_cast< USHORT >(i); + nMapPos = static_cast< sal_uInt16 >(i); break; } } @@ -1550,9 +1627,9 @@ RndStdIds SwFrmPage::GetAnchor() --------------------------------------------------------------------*/ void SwFrmPage::ActivatePage(const SfxItemSet& rSet) { - bNoModifyHdl = TRUE; + bNoModifyHdl = sal_True; Init(rSet); - bNoModifyHdl = FALSE; + bNoModifyHdl = sal_False; //lock PercentFields aWidthED.LockAutoCalculation(sal_True); aHeightED.LockAutoCalculation(sal_True); @@ -1578,7 +1655,7 @@ int SwFrmPage::DeactivatePage(SfxItemSet * _pSet) _pSet->Put( aAnc ); } - return TRUE; + return sal_True; } /*-------------------------------------------------------------------- @@ -1632,7 +1709,7 @@ IMPL_LINK( SwFrmPage, RangeModifyHdl, Edit *, EMPTYARG ) SwFlyFrmAttrMgr aMgr( bNew, pSh, (const SwAttrSet&)GetItemSet() ); SvxSwFrameValidation aVal; - aVal.nAnchorType = static_cast< USHORT >(GetAnchor()); + aVal.nAnchorType = static_cast< sal_uInt16 >(GetAnchor()); aVal.bAutoHeight = aAutoHeightCB.IsChecked(); aVal.bAutoWidth = aAutoWidthCB.IsChecked(); aVal.bMirror = aMirrorPagesCB.IsChecked(); @@ -1641,7 +1718,7 @@ IMPL_LINK( SwFrmPage, RangeModifyHdl, Edit *, EMPTYARG ) if ( pHMap ) { // Ausrichtung Horizontal - USHORT nMapPos = GetMapPos(pHMap, aHorizontalDLB); + sal_uInt16 nMapPos = GetMapPos(pHMap, aHorizontalDLB); short nAlign = GetAlignment(pHMap, nMapPos, aHorizontalDLB, aHoriRelationLB); short nRel = GetRelation(pHMap, aHoriRelationLB); @@ -1654,7 +1731,7 @@ IMPL_LINK( SwFrmPage, RangeModifyHdl, Edit *, EMPTYARG ) if ( pVMap ) { // Ausrichtung Vertikal - USHORT nMapPos = GetMapPos(pVMap, aVerticalDLB); + sal_uInt16 nMapPos = GetMapPos(pVMap, aVerticalDLB); short nAlign = GetAlignment(pVMap, nMapPos, aVerticalDLB, aVertRelationLB); short nRel = GetRelation(pVMap, aVertRelationLB); @@ -1672,7 +1749,7 @@ IMPL_LINK( SwFrmPage, RangeModifyHdl, Edit *, EMPTYARG ) aVal.nHPos = nAtHorzPosVal; aVal.nVPos = nAtVertPosVal; - aMgr.ValidateMetrics(aVal, mpToCharCntntPos, TRUE); // Einmal, um Referenzwerte fuer prozentuale Werte zu erhalten + aMgr.ValidateMetrics(aVal, mpToCharCntntPos, sal_True); // Einmal, um Referenzwerte fuer prozentuale Werte zu erhalten // Referenzwerte fuer fuer Prozentwerte setzen (100%) ... aWidthED.SetRefValue(aVal.aPercentSize.Width()); @@ -1693,7 +1770,7 @@ IMPL_LINK( SwFrmPage, RangeModifyHdl, Edit *, EMPTYARG ) const SwFmtCol& rCol = (const SwFmtCol&)GetTabDialog()->GetExampleSet()->Get(RES_COL); if ( rCol.GetColumns().Count() > 1 ) { - for ( USHORT i = 0; i < rCol.GetColumns().Count(); ++i ) + for ( sal_uInt16 i = 0; i < rCol.GetColumns().Count(); ++i ) { aVal.nMinWidth += rCol.GetColumns()[i]->GetLeft() + rCol.GetColumns()[i]->GetRight() + @@ -1770,28 +1847,32 @@ IMPL_LINK( SwFrmPage, AnchorTypeHdl, RadioButton *, EMPTYARG ) PosHdl(&aHorizontalDLB); PosHdl(&aVerticalDLB); } + + EnableVerticalPositioning( !(m_bIsMathOLE && m_bIsMathBaselineAlignment + && FLY_AS_CHAR == eId) ); + return 0; } IMPL_LINK( SwFrmPage, PosHdl, ListBox *, pLB ) { - BOOL bHori = pLB == &aHorizontalDLB; + sal_Bool bHori = pLB == &aHorizontalDLB; ListBox *pRelLB = bHori ? &aHoriRelationLB : &aVertRelationLB; FixedText *pRelFT = bHori ? &aHoriRelationFT : &aVertRelationFT; FrmMap *pMap = bHori ? pHMap : pVMap; - USHORT nMapPos = GetMapPos(pMap, *pLB); + sal_uInt16 nMapPos = GetMapPos(pMap, *pLB); short nAlign = GetAlignment(pMap, nMapPos, *pLB, *pRelLB); if (bHori) { - BOOL bEnable = text::HoriOrientation::NONE == nAlign; + sal_Bool bEnable = text::HoriOrientation::NONE == nAlign; aAtHorzPosED.Enable( bEnable ); aAtHorzPosFT.Enable( bEnable ); } else { - BOOL bEnable = text::VertOrientation::NONE == nAlign; + sal_Bool bEnable = text::VertOrientation::NONE == nAlign && m_bAllowVertPositioning; aAtVertPosED.Enable( bEnable ); aAtVertPosFT.Enable( bEnable ); } @@ -1799,7 +1880,7 @@ IMPL_LINK( SwFrmPage, PosHdl, ListBox *, pLB ) if (pLB) // Nur wenn Handler durch Aenderung des Controllers gerufen wurde RangeModifyHdl( 0 ); - USHORT nRel = 0; + sal_uInt16 nRel = 0; if (pLB->GetSelectEntryCount()) { @@ -1814,15 +1895,15 @@ IMPL_LINK( SwFrmPage, PosHdl, ListBox *, pLB ) UpdateExample(); if (bHori) - bAtHorzPosModified = TRUE; + bAtHorzPosModified = sal_True; else - bAtVertPosModified = TRUE; + bAtVertPosModified = sal_True; // Sonderbehandlung fuer HTML-Mode mit horz-vert-Abhaengigkeiten if(bHtmlMode && nHtmlMode&HTMLMODE_SOME_ABS_POS && (FLY_AT_CHAR == GetAnchor())) { - BOOL bSet = FALSE; + sal_Bool bSet = sal_False; if(bHori) { // rechts ist nur unterhalb erlaubt - von links nur oben @@ -1834,17 +1915,17 @@ IMPL_LINK( SwFrmPage, PosHdl, ListBox *, pLB ) aVerticalDLB.SelectEntryPos(1); else aVerticalDLB.SelectEntryPos(0); - bSet = TRUE; + bSet = sal_True; } else if(text::HoriOrientation::LEFT == nAlign && 1 == aVerticalDLB.GetSelectEntryPos()) { aVerticalDLB.SelectEntryPos(0); - bSet = TRUE; + bSet = sal_True; } else if(text::HoriOrientation::NONE == nAlign && 1 == aVerticalDLB.GetSelectEntryPos()) { aVerticalDLB.SelectEntryPos(0); - bSet = TRUE; + bSet = sal_True; } if(bSet) PosHdl(&aVerticalDLB); @@ -1856,7 +1937,7 @@ IMPL_LINK( SwFrmPage, PosHdl, ListBox *, pLB ) if(1 == aHorizontalDLB.GetSelectEntryPos()) { aHorizontalDLB.SelectEntryPos(0); - bSet = TRUE; + bSet = sal_True; } aHoriRelationLB.SelectEntryPos(1); } @@ -1865,7 +1946,7 @@ IMPL_LINK( SwFrmPage, PosHdl, ListBox *, pLB ) if(2 == aHorizontalDLB.GetSelectEntryPos()) { aHorizontalDLB.SelectEntryPos(0); - bSet = TRUE; + bSet = sal_True; } aHoriRelationLB.SelectEntryPos(0) ; } @@ -1882,20 +1963,20 @@ IMPL_LINK( SwFrmPage, PosHdl, ListBox *, pLB ) --------------------------------------------------------------------*/ IMPL_LINK( SwFrmPage, RelHdl, ListBox *, pLB ) { - BOOL bHori = pLB == &aHoriRelationLB; + sal_Bool bHori = pLB == &aHoriRelationLB; UpdateExample(); if (bHori) - bAtHorzPosModified = TRUE; + bAtHorzPosModified = sal_True; else - bAtVertPosModified = TRUE; + bAtVertPosModified = sal_True; if (bHtmlMode && (FLY_AT_CHAR == GetAnchor())) { if(bHori) { - USHORT nRel = GetRelation(pHMap, aHoriRelationLB); + sal_uInt16 nRel = GetRelation(pHMap, aHoriRelationLB); if(text::RelOrientation::PRINT_AREA == nRel && 0 == aVerticalDLB.GetSelectEntryPos()) { aVerticalDLB.SelectEntryPos(1); @@ -1960,10 +2041,10 @@ IMPL_LINK( SwFrmPage, ModifyHdl, Edit *, pEdit ) void SwFrmPage::UpdateExample() { - USHORT nPos = aHorizontalDLB.GetSelectEntryPos(); + sal_uInt16 nPos = aHorizontalDLB.GetSelectEntryPos(); if ( pHMap && nPos != LISTBOX_ENTRY_NOTFOUND ) { - USHORT nMapPos = GetMapPos(pHMap, aHorizontalDLB); + sal_uInt16 nMapPos = GetMapPos(pHMap, aHorizontalDLB); short nAlign = GetAlignment(pHMap, nMapPos, aHorizontalDLB, aHoriRelationLB); short nRel = GetRelation(pHMap, aHoriRelationLB); @@ -1974,7 +2055,7 @@ void SwFrmPage::UpdateExample() nPos = aVerticalDLB.GetSelectEntryPos(); if ( pVMap && nPos != LISTBOX_ENTRY_NOTFOUND ) { - USHORT nMapPos = GetMapPos(pVMap, aVerticalDLB); + sal_uInt16 nMapPos = GetMapPos(pVMap, aVerticalDLB); short nAlign = GetAlignment(pVMap, nMapPos, aVerticalDLB, aVertRelationLB); short nRel = GetRelation(pVMap, aVertRelationLB); @@ -1987,18 +2068,18 @@ void SwFrmPage::UpdateExample() long nYPos = static_cast< long >(aAtVertPosED.Denormalize(aAtVertPosED.GetValue(FUNIT_TWIP))); aExampleWN.SetRelPos(Point(nXPos, nYPos)); - aExampleWN.SetAnchor( static_cast< USHORT >(GetAnchor()) ); + aExampleWN.SetAnchor( static_cast< sal_uInt16 >(GetAnchor()) ); aExampleWN.Invalidate(); } -void SwFrmPage::Init(const SfxItemSet& rSet, BOOL bReset) +void SwFrmPage::Init(const SfxItemSet& rSet, sal_Bool bReset) { if(!bFormat) { SwWrtShell* pSh = ((SwFrmDlg*)GetParent()->GetParent())->GetWrtShell(); // Size - const BOOL bSizeFixed = pSh->IsSelObjProtected( FLYPROTECT_FIXED ); + const sal_Bool bSizeFixed = pSh->IsSelObjProtected( FLYPROTECT_FIXED ); aWidthED .Enable( !bSizeFixed ); aHeightED.Enable( !bSizeFixed ); @@ -2010,9 +2091,9 @@ void SwFrmPage::Init(const SfxItemSet& rSet, BOOL bReset) const SvGlobalName& rFactNm( pSh->GetOLEObject()->getClassID() ); struct _GlobalNameId { - UINT32 n1; - USHORT n2, n3; - BYTE b8, b9, b10, b11, b12, b13, b14, b15; + sal_uInt32 n1; + sal_uInt16 n2, n3; + sal_uInt8 b8, b9, b10, b11, b12, b13, b14, b15; } aGlbNmIds[4] = { { SO3_SM_CLASSID_60 }, { SO3_SM_CLASSID_50 }, { SO3_SM_CLASSID_40 }, { SO3_SM_CLASSID_30 } }; @@ -2075,7 +2156,7 @@ void SwFrmPage::Init(const SfxItemSet& rSet, BOOL bReset) if (!IsInGraficMode()) { SwFrmSize eSize = rSize.GetHeightSizeType(); - BOOL bCheck = eSize != ATT_FIX_SIZE; + sal_Bool bCheck = eSize != ATT_FIX_SIZE; aAutoHeightCB.Check( bCheck ); HandleAutoCB( bCheck, aHeightFT, aHeightAutoFT ); if( eSize == ATT_VAR_SIZE ) @@ -2093,7 +2174,7 @@ void SwFrmPage::Init(const SfxItemSet& rSet, BOOL bReset) SwWrtShell* pSh = ((SwFrmDlg*)GetParent()->GetParent())->GetWrtShell(); const SwFrmFmt* pFmt = pSh->GetFlyFrmFmt(); if( pFmt && pFmt->GetChain().GetNext() ) - aAutoHeightCB.Enable( FALSE ); + aAutoHeightCB.Enable( sal_False ); } } else @@ -2112,7 +2193,7 @@ void SwFrmPage::Init(const SfxItemSet& rSet, BOOL bReset) // Spalten SwFmtCol aCol( (const SwFmtCol&)rSet.Get(RES_COL) ); - ::FitToActualSize( aCol, (USHORT)rSize.GetWidth() ); + ::FitToActualSize( aCol, (sal_uInt16)rSize.GetWidth() ); RndStdIds eAnchorId = (RndStdIds)GetAnchor(); @@ -2154,7 +2235,7 @@ void SwFrmPage::Init(const SfxItemSet& rSet, BOOL bReset) // Transparent fuers Bsp // Umlauf fuers Bsp const SwFmtSurround& rSurround = (const SwFmtSurround&)rSet.Get(RES_SURROUND); - aExampleWN.SetWrap ( static_cast< USHORT >(rSurround.GetSurround()) ); + aExampleWN.SetWrap ( static_cast< sal_uInt16 >(rSurround.GetSurround()) ); if ( rSurround.GetSurround() == SURROUND_THROUGHT ) { @@ -2166,18 +2247,18 @@ void SwFrmPage::Init(const SfxItemSet& rSet, BOOL bReset) RangeModifyHdl(&aWidthED); // Referenzwerte setzen (fuer 100%) if (rSize.GetWidthPercent() == 0xff || rSize.GetHeightPercent() == 0xff) - aFixedRatioCB.Check(TRUE); + aFixedRatioCB.Check(sal_True); if (rSize.GetWidthPercent() && rSize.GetWidthPercent() != 0xff && !aRelWidthCB.IsChecked()) { - aRelWidthCB.Check(TRUE); + aRelWidthCB.Check(sal_True); RelSizeClickHdl(&aRelWidthCB); aWidthED.SetPrcntValue(rSize.GetWidthPercent(), FUNIT_CUSTOM); } if (rSize.GetHeightPercent() && rSize.GetHeightPercent() != 0xff && !aRelHeightCB.IsChecked()) { - aRelHeightCB.Check(TRUE); + aRelHeightCB.Check(sal_True); RelSizeClickHdl(&aRelHeightCB); aHeightED.SetPrcntValue(rSize.GetHeightPercent(), FUNIT_CUSTOM); } @@ -2185,12 +2266,12 @@ void SwFrmPage::Init(const SfxItemSet& rSet, BOOL bReset) aRelHeightCB.SaveValue(); } -USHORT* SwFrmPage::GetRanges() +sal_uInt16* SwFrmPage::GetRanges() { return aPageRg; } -void SwFrmPage::SetFormatUsed(BOOL bFmt) +void SwFrmPage::SetFormatUsed(sal_Bool bFmt) { bFormat = bFmt; if(bFormat) @@ -2205,6 +2286,19 @@ void SwFrmPage::SetFormatUsed(BOOL bFmt) } } + +void SwFrmPage::EnableVerticalPositioning( bool bEnable ) +{ + m_bAllowVertPositioning = bEnable; + aVerticalFT.Enable( bEnable ); + aVerticalDLB.Enable( bEnable ); + aAtVertPosFT.Enable( bEnable ); + aAtVertPosED.Enable( bEnable ); + aVertRelationFT.Enable( bEnable ); + aVertRelationLB.Enable( bEnable ); +} + + SwGrfExtPage::SwGrfExtPage(Window *pParent, const SfxItemSet &rSet) : SfxTabPage( pParent, SW_RES(TP_GRF_EXT), rSet ), aMirrorFL (this, SW_RES( FL_MIRROR )), @@ -2222,6 +2316,8 @@ SwGrfExtPage::SwGrfExtPage(Window *pParent, const SfxItemSet &rSet) : { FreeResource(); + aBrowseBT.SetAccessibleRelationMemberOf(&aConnectFL); + SetExchangeSupport(); aMirrorHorzBox.SetClickHdl( LINK(this, SwGrfExtPage, MirrorHdl)); aMirrorVertBox.SetClickHdl( LINK(this, SwGrfExtPage, MirrorHdl)); @@ -2241,14 +2337,14 @@ SfxTabPage* SwGrfExtPage::Create( Window *pParent, const SfxItemSet &rSet ) void SwGrfExtPage::Reset(const SfxItemSet &rSet) { const SfxPoolItem* pItem; - USHORT nHtmlMode = ::GetHtmlMode((const SwDocShell*)SfxObjectShell::Current()); - bHtmlMode = nHtmlMode & HTMLMODE_ON ? TRUE : FALSE; + sal_uInt16 nHtmlMode = ::GetHtmlMode((const SwDocShell*)SfxObjectShell::Current()); + bHtmlMode = nHtmlMode & HTMLMODE_ON ? sal_True : sal_False; - if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_GRF_CONNECT, TRUE, &pItem) + if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_GRF_CONNECT, sal_True, &pItem) && ((const SfxBoolItem *)pItem)->GetValue() ) { aBrowseBT.Enable(); - aConnectED.SetReadOnly(FALSE); + aConnectED.SetReadOnly(sal_False); } ActivatePage(rSet); @@ -2257,34 +2353,34 @@ void SwGrfExtPage::Reset(const SfxItemSet &rSet) void SwGrfExtPage::ActivatePage(const SfxItemSet& rSet) { const SvxProtectItem& rProt = (const SvxProtectItem& )rSet.Get(RES_PROTECT); - BOOL bProtCntnt = rProt.IsCntntProtected(); + sal_Bool bProtCntnt = rProt.IsCntntProtected(); const SfxPoolItem* pItem = 0; - BOOL bEnable = FALSE; - BOOL bEnableMirrorRB = FALSE; + sal_Bool bEnable = sal_False; + sal_Bool bEnableMirrorRB = sal_False; - SfxItemState eState = rSet.GetItemState(RES_GRFATR_MIRRORGRF, TRUE, &pItem); + SfxItemState eState = rSet.GetItemState(RES_GRFATR_MIRRORGRF, sal_True, &pItem); if( SFX_ITEM_UNKNOWN != eState && !bProtCntnt && !bHtmlMode ) { if( SFX_ITEM_SET != eState ) pItem = &rSet.Get( RES_GRFATR_MIRRORGRF ); - bEnable = TRUE; + bEnable = sal_True; MirrorGraph eMirror = static_cast< MirrorGraph >(((const SwMirrorGrf* )pItem)->GetValue()); switch( eMirror ) { case RES_MIRROR_GRAPH_DONT: break; - case RES_MIRROR_GRAPH_VERT: aMirrorHorzBox.Check(TRUE); break; - case RES_MIRROR_GRAPH_HOR: aMirrorVertBox.Check(TRUE); break; - case RES_MIRROR_GRAPH_BOTH: aMirrorHorzBox.Check(TRUE); - aMirrorVertBox.Check(TRUE); + case RES_MIRROR_GRAPH_VERT: aMirrorHorzBox.Check(sal_True); break; + case RES_MIRROR_GRAPH_HOR: aMirrorVertBox.Check(sal_True); break; + case RES_MIRROR_GRAPH_BOTH: aMirrorHorzBox.Check(sal_True); + aMirrorVertBox.Check(sal_True); break; default: ; } - USHORT nPos = ((const SwMirrorGrf* )pItem)->IsGrfToggle() ? 1 : 0; + sal_uInt16 nPos = ((const SwMirrorGrf* )pItem)->IsGrfToggle() ? 1 : 0; nPos += (eMirror == RES_MIRROR_GRAPH_VERT || eMirror == RES_MIRROR_GRAPH_BOTH) ? 2 : 0; @@ -2294,7 +2390,7 @@ void SwGrfExtPage::ActivatePage(const SfxItemSet& rSet) { case 1: // Auf linken bzw geraden Seiten spiegeln aLeftPagesRB.Check(); - aMirrorHorzBox.Check(TRUE); + aMirrorHorzBox.Check(sal_True); break; case 2: // Auf allen Seiten spiegeln aAllPagesRB.Check(); @@ -2308,7 +2404,7 @@ void SwGrfExtPage::ActivatePage(const SfxItemSet& rSet) } } - if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_GRAF_GRAPHIC, FALSE, &pItem ) ) + if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_GRAF_GRAPHIC, sal_False, &pItem ) ) { const SvxBrushItem& rBrush = *(SvxBrushItem*)pItem; if( rBrush.GetGraphicLink() ) @@ -2339,22 +2435,22 @@ void SwGrfExtPage::ActivatePage(const SfxItemSet& rSet) aBmpWin.Invalidate(); } -BOOL SwGrfExtPage::FillItemSet( SfxItemSet &rSet ) +sal_Bool SwGrfExtPage::FillItemSet( SfxItemSet &rSet ) { - BOOL bModified = FALSE; + sal_Bool bModified = sal_False; if ( aMirrorHorzBox.GetSavedValue() != aMirrorHorzBox.IsChecked() || aMirrorVertBox.GetSavedValue() != aMirrorVertBox.IsChecked() || aAllPagesRB .GetSavedValue() != aAllPagesRB .IsChecked() || aLeftPagesRB.GetSavedValue() != aLeftPagesRB.IsChecked() || aRightPagesRB.GetSavedValue() != aRightPagesRB.IsChecked()) { - bModified = TRUE; + bModified = sal_True; - BOOL bHori = FALSE; + sal_Bool bHori = sal_False; if (aMirrorHorzBox.IsChecked() && !aLeftPagesRB.IsChecked()) - bHori = TRUE; + bHori = sal_True; MirrorGraph eMirror; eMirror = aMirrorVertBox.IsChecked() && bHori ? @@ -2362,7 +2458,7 @@ BOOL SwGrfExtPage::FillItemSet( SfxItemSet &rSet ) RES_MIRROR_GRAPH_VERT : aMirrorVertBox.IsChecked() ? RES_MIRROR_GRAPH_HOR : RES_MIRROR_GRAPH_DONT; - BOOL bMirror = !aAllPagesRB.IsChecked(); + sal_Bool bMirror = !aAllPagesRB.IsChecked(); SwMirrorGrf aMirror( eMirror ); aMirror.SetGrfToggle(bMirror ); rSet.Put( aMirror ); @@ -2370,7 +2466,7 @@ BOOL SwGrfExtPage::FillItemSet( SfxItemSet &rSet ) if( aGrfName != aNewGrfName || aConnectED.IsModified() ) { - bModified = TRUE; + bModified = sal_True; aGrfName = aConnectED.GetText(); rSet.Put( SvxBrushItem( aGrfName, aFilterName, GPOS_LT, SID_ATTR_GRAF_GRAPHIC )); @@ -2382,7 +2478,7 @@ int SwGrfExtPage::DeactivatePage(SfxItemSet *_pSet) { if( _pSet ) FillItemSet( *_pSet ); - return TRUE; + return sal_True; } IMPL_LINK( SwGrfExtPage, BrowseHdl, Button *, EMPTYARG ) @@ -2411,19 +2507,19 @@ IMPL_LINK( SwGrfExtPage, BrowseHdl, Button *, EMPTYARG ) //Spiegeln zuruecksetzen, da u. U. eine Bitmap //gegen eine andere Art von Grafik ausgetauscht worden ist, //die nicht gespiegelt werden kann. - aMirrorVertBox.Check(FALSE); - aMirrorHorzBox.Check(FALSE); - aAllPagesRB .Enable(FALSE); - aLeftPagesRB.Enable(FALSE); - aRightPagesRB.Enable(FALSE); - aBmpWin.MirrorHorz(FALSE); - aBmpWin.MirrorVert(FALSE); + aMirrorVertBox.Check(sal_False); + aMirrorHorzBox.Check(sal_False); + aAllPagesRB .Enable(sal_False); + aLeftPagesRB.Enable(sal_False); + aRightPagesRB.Enable(sal_False); + aBmpWin.MirrorHorz(sal_False); + aBmpWin.MirrorVert(sal_False); Graphic aGraphic; GraphicFilter::LoadGraphic( pGrfDlg->GetPath(), aEmptyStr, aGraphic ); aBmpWin.SetGraphic(aGraphic); - BOOL bEnable = GRAPHIC_BITMAP == aGraphic.GetType() || + sal_Bool bEnable = GRAPHIC_BITMAP == aGraphic.GetType() || GRAPHIC_GDIMETAFILE == aGraphic.GetType(); aMirrorVertBox.Enable(bEnable); aMirrorHorzBox.Enable(bEnable); @@ -2436,7 +2532,7 @@ IMPL_LINK( SwGrfExtPage, BrowseHdl, Button *, EMPTYARG ) IMPL_LINK( SwGrfExtPage, MirrorHdl, CheckBox *, EMPTYARG ) { - BOOL bEnable = aMirrorHorzBox.IsChecked(); + sal_Bool bEnable = aMirrorHorzBox.IsChecked(); aBmpWin.MirrorHorz( aMirrorVertBox.IsChecked() ); aBmpWin.MirrorVert( bEnable ); @@ -2454,15 +2550,15 @@ IMPL_LINK( SwGrfExtPage, MirrorHdl, CheckBox *, EMPTYARG ) /*-------------------------------------------------------------------- Beschreibung: BeispielWindow --------------------------------------------------------------------*/ -BmpWindow::BmpWindow( Window* pPar, USHORT nId, +BmpWindow::BmpWindow( Window* pPar, sal_uInt16 nId, const Graphic& rGraphic, const BitmapEx& rBmp ) : Window(pPar, SW_RES(nId)), aGraphic(rGraphic), aBmp(rBmp), - bHorz(FALSE), - bVert(FALSE), - bGraphic(FALSE), - bLeftAlign(FALSE) + bHorz(sal_False), + bVert(sal_False), + bGraphic(sal_False), + bLeftAlign(sal_False) { SetBackground(); } @@ -2550,7 +2646,7 @@ SwFrmURLPage::~SwFrmURLPage() void SwFrmURLPage::Reset( const SfxItemSet &rSet ) { const SfxPoolItem* pItem; - if ( SFX_ITEM_SET == rSet.GetItemState( SID_DOCFRAME, TRUE, &pItem)) + if ( SFX_ITEM_SET == rSet.GetItemState( SID_DOCFRAME, sal_True, &pItem)) { TargetList* pList = new TargetList; ((const SfxFrameItem*)pItem)->GetFrame()->GetTargetList(*pList); @@ -2569,7 +2665,7 @@ void SwFrmURLPage::Reset( const SfxItemSet &rSet ) delete pList; } - if ( SFX_ITEM_SET == rSet.GetItemState( RES_URL, TRUE, &pItem ) ) + if ( SFX_ITEM_SET == rSet.GetItemState( RES_URL, sal_True, &pItem ) ) { const SwFmtURL* pFmtURL = (const SwFmtURL*)pItem; aURLED.SetText( INetURLObject::decode( pFmtURL->GetURL(), @@ -2586,15 +2682,15 @@ void SwFrmURLPage::Reset( const SfxItemSet &rSet ) aFrameCB.SaveValue(); } else - aClientCB.Enable( FALSE ); + aClientCB.Enable( sal_False ); aServerCB.SaveValue(); aClientCB.SaveValue(); } -BOOL SwFrmURLPage::FillItemSet(SfxItemSet &rSet) +sal_Bool SwFrmURLPage::FillItemSet(SfxItemSet &rSet) { - BOOL bModified = FALSE; + sal_Bool bModified = sal_False; const SwFmtURL* pOldURL = (SwFmtURL*)GetOldItem(rSet, RES_URL); SwFmtURL* pFmtURL; if(pOldURL) @@ -2611,20 +2707,20 @@ BOOL SwFrmURLPage::FillItemSet(SfxItemSet &rSet) { pFmtURL->SetURL( sText, aServerCB.IsChecked() ); pFmtURL->SetName( aNameED.GetText() ); - bModified = TRUE; + bModified = sal_True; } } if(!aClientCB.IsChecked() && pFmtURL->GetMap() != 0) { pFmtURL->SetMap(0); - bModified = TRUE; + bModified = sal_True; } if(pFmtURL->GetTargetFrameName() != aFrameCB.GetText()) { pFmtURL->SetTargetFrameName(aFrameCB.GetText()); - bModified = TRUE; + bModified = sal_True; } rSet.Put(*pFmtURL); delete pFmtURL; @@ -2668,7 +2764,8 @@ void lcl_Move(Window& rWin, sal_Int32 nDiff) SwFrmAddPage::SwFrmAddPage(Window *pParent, const SfxItemSet &rSet ) : SfxTabPage(pParent, SW_RES(TP_FRM_ADD), rSet), - + + aNamesFL (this, SW_RES(FL_NAME)), aNameFT (this, SW_RES(FT_NAME)), aNameED (this, SW_RES(ED_NAME)), aAltNameFT (this, SW_RES(FT_ALT_NAME)), @@ -2677,20 +2774,18 @@ SwFrmAddPage::SwFrmAddPage(Window *pParent, const SfxItemSet &rSet ) : aPrevLB (this, SW_RES(LB_PREV)), aNextFT (this, SW_RES(FT_NEXT)), aNextLB (this, SW_RES(LB_NEXT)), - aNamesFL (this, SW_RES(FL_NAME)), + aProtectFL (this, SW_RES(FL_PROTECT)), aProtectContentCB (this, SW_RES(CB_PROTECT_CONTENT)), aProtectFrameCB (this, SW_RES(CB_PROTECT_FRAME)), aProtectSizeCB (this, SW_RES(CB_PROTECT_SIZE)), - aProtectFL (this, SW_RES(FL_PROTECT)), + aExtFL (this, SW_RES(FL_EXT)), aEditInReadonlyCB (this, SW_RES(CB_EDIT_IN_READONLY)), aPrintFrameCB (this, SW_RES(CB_PRINT_FRAME)), aTextFlowFT (this, SW_RES(FT_TEXTFLOW)), aTextFlowLB (this, SW_RES(LB_TEXTFLOW)), - aExtFL (this, SW_RES(FL_EXT)), - pWrtSh(0), nDlgType(0), @@ -2714,8 +2809,8 @@ SfxTabPage* SwFrmAddPage::Create(Window *pParent, const SfxItemSet &rSet) void SwFrmAddPage::Reset(const SfxItemSet &rSet ) { const SfxPoolItem* pItem; - USHORT nHtmlMode = ::GetHtmlMode((const SwDocShell*)SfxObjectShell::Current()); - bHtmlMode = nHtmlMode & HTMLMODE_ON ? TRUE : FALSE; + sal_uInt16 nHtmlMode = ::GetHtmlMode((const SwDocShell*)SfxObjectShell::Current()); + bHtmlMode = nHtmlMode & HTMLMODE_ON ? sal_True : sal_False; if(bHtmlMode) { aProtectContentCB .Hide(); @@ -2732,7 +2827,7 @@ void SwFrmAddPage::Reset(const SfxItemSet &rSet ) aPrintFrameCB.SetPosPixel(aEditInReadonlyCB.GetPosPixel()); } - if(SFX_ITEM_SET == rSet.GetItemState(FN_SET_FRM_ALT_NAME, FALSE, &pItem)) + if(SFX_ITEM_SET == rSet.GetItemState(FN_SET_FRM_ALT_NAME, sal_False, &pItem)) { aAltNameED.SetText(((const SfxStringItem*)pItem)->GetValue()); aAltNameED.SaveValue(); @@ -2743,7 +2838,7 @@ void SwFrmAddPage::Reset(const SfxItemSet &rSet ) // Grafik einfuegen - Eigenschaften // bNew ist nicht gesetzt, deswegen ueber Selektion erkennen String aTmpName1; - if(SFX_ITEM_SET == rSet.GetItemState(FN_SET_FRM_NAME, FALSE, &pItem)) + if(SFX_ITEM_SET == rSet.GetItemState(FN_SET_FRM_NAME, sal_False, &pItem)) { aTmpName1 = ((const SfxStringItem*)pItem)->GetValue(); } @@ -2769,11 +2864,11 @@ void SwFrmAddPage::Reset(const SfxItemSet &rSet ) } else { - aNameED.Enable( FALSE ); - aAltNameED.Enable(FALSE); - aNameFT.Enable( FALSE ); - aAltNameFT.Enable(FALSE); - aNamesFL.Enable(FALSE); + aNameED.Enable( sal_False ); + aAltNameED.Enable(sal_False); + aNameFT.Enable( sal_False ); + aAltNameFT.Enable(sal_False); + aNamesFL.Enable(sal_False); } if(nDlgType == DLG_FRM_STD && aAltNameFT.IsVisible()) { @@ -2833,7 +2928,7 @@ void SwFrmAddPage::Reset(const SfxItemSet &rSet ) ::std::vector< String > aThisPageFrames; ::std::vector< String > aNextPageFrames; ::std::vector< String > aRemainFrames; - pWrtSh->GetConnectableFrmFmts(*pFmt, sNextChain, FALSE, + pWrtSh->GetConnectableFrmFmts(*pFmt, sNextChain, sal_False, aPrevPageFrames, aThisPageFrames, aNextPageFrames, aRemainFrames ); lcl_InsertVectors(aPrevLB, aPrevPageFrames, aThisPageFrames, aNextPageFrames, aRemainFrames); if(sPrevChain.Len()) @@ -2849,7 +2944,7 @@ void SwFrmAddPage::Reset(const SfxItemSet &rSet ) aThisPageFrames.erase(aThisPageFrames.begin(), aThisPageFrames.end()); aRemainFrames.erase(aRemainFrames.begin(), aRemainFrames.end()); - pWrtSh->GetConnectableFrmFmts(*pFmt, sPrevChain, TRUE, + pWrtSh->GetConnectableFrmFmts(*pFmt, sPrevChain, sal_True, aPrevPageFrames, aThisPageFrames, aNextPageFrames, aRemainFrames ); lcl_InsertVectors(aNextLB, aPrevPageFrames, aThisPageFrames, aNextPageFrames, aRemainFrames); if(sNextChain.Len()) @@ -2883,7 +2978,7 @@ void SwFrmAddPage::Reset(const SfxItemSet &rSet ) if( (!bHtmlMode || (0 != (nHtmlMode&HTMLMODE_SOME_STYLES))) && DLG_FRM_GRF != nDlgType && DLG_FRM_OLE != nDlgType && SFX_ITEM_UNKNOWN != ( eState = rSet.GetItemState( - RES_FRAMEDIR, TRUE )) ) + RES_FRAMEDIR, sal_True )) ) { aTextFlowFT.Show(); aTextFlowLB.Show(); @@ -2891,7 +2986,7 @@ void SwFrmAddPage::Reset(const SfxItemSet &rSet ) //vertical text flow is not possible in HTML if(bHtmlMode) { - ULONG nData = FRMDIR_VERT_TOP_RIGHT; + sal_uLong nData = FRMDIR_VERT_TOP_RIGHT; aTextFlowLB.RemoveEntry(aTextFlowLB.GetEntryPos((void*)nData)); } sal_uInt16 nPos, nVal = ((SvxFrameDirectionItem&)rSet.Get(RES_FRAMEDIR)).GetValue(); @@ -2908,9 +3003,9 @@ void SwFrmAddPage::Reset(const SfxItemSet &rSet ) } } -BOOL SwFrmAddPage::FillItemSet(SfxItemSet &rSet) +sal_Bool SwFrmAddPage::FillItemSet(SfxItemSet &rSet) { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; if (aNameED.GetText() != aNameED.GetSavedValue()) bRet |= 0 != rSet.Put(SfxStringItem(FN_SET_FRM_NAME, aNameED.GetText())); if (aAltNameED.GetText() != aAltNameED.GetSavedValue()) @@ -2925,7 +3020,7 @@ BOOL SwFrmAddPage::FillItemSet(SfxItemSet &rSet) aProt != *pOldItem ) bRet |= 0 != rSet.Put( aProt); - BOOL bChecked; + sal_Bool bChecked; if ( (bChecked = aEditInReadonlyCB.IsChecked()) != aEditInReadonlyCB.GetSavedValue() ) bRet |= 0 != rSet.Put( SwFmtEditInReadonly( RES_EDIT_IN_READONLY, bChecked)); @@ -2970,34 +3065,34 @@ BOOL SwFrmAddPage::FillItemSet(SfxItemSet &rSet) return bRet; } -USHORT* SwFrmAddPage::GetRanges() +sal_uInt16* SwFrmAddPage::GetRanges() { return aAddPgRg; } IMPL_LINK(SwFrmAddPage, EditModifyHdl, Edit*, EMPTYARG) { - BOOL bEnable = 0 != aNameED.GetText().Len(); + sal_Bool bEnable = 0 != aNameED.GetText().Len(); aAltNameED.Enable(bEnable); aAltNameFT.Enable(bEnable); return 0; } -void SwFrmAddPage::SetFormatUsed(BOOL bFmt) +void SwFrmAddPage::SetFormatUsed(sal_Bool bFmt) { bFormat = bFmt; if(bFormat) { - aNameFT.Show(FALSE); - aNameED.Show(FALSE); - aAltNameFT.Show(FALSE); - aAltNameED.Show(FALSE); - aPrevFT.Show(FALSE); - aPrevLB.Show(FALSE); - aNextFT.Show(FALSE); - aNextLB.Show(FALSE); - aNamesFL.Show(FALSE); + aNameFT.Show(sal_False); + aNameED.Show(sal_False); + aAltNameFT.Show(sal_False); + aAltNameED.Show(sal_False); + aPrevFT.Show(sal_False); + aPrevLB.Show(sal_False); + aNextFT.Show(sal_False); + aNextLB.Show(sal_False); + aNamesFL.Show(sal_False); sal_Int32 nDiff = aExtFL.GetPosPixel().Y() - aNamesFL.GetPosPixel().Y(); Window* aWindows[] = @@ -3029,9 +3124,9 @@ IMPL_LINK(SwFrmAddPage, ChainModifyHdl, ListBox*, pBox) SwFrmFmt* pFmt = pWrtSh->GetFlyFrmFmt(); if (pFmt) { - BOOL bNextBox = &aNextLB == pBox; + sal_Bool bNextBox = &aNextLB == pBox; ListBox& rChangeLB = bNextBox ? aPrevLB : aNextLB; - for(USHORT nEntry = rChangeLB.GetEntryCount(); nEntry > 1; nEntry--) + for(sal_uInt16 nEntry = rChangeLB.GetEntryCount(); nEntry > 1; nEntry--) rChangeLB.RemoveEntry(nEntry - 1); //determine chainable frames ::std::vector< String > aPrevPageFrames; diff --git a/sw/source/ui/frmdlg/frmpage.src b/sw/source/ui/frmdlg/frmpage.src index 505938c114..faadabe67c 100644 --- a/sw/source/ui/frmdlg/frmpage.src +++ b/sw/source/ui/frmdlg/frmpage.src @@ -243,6 +243,7 @@ TabPage TP_FRM_STD }; MetricField ED_WIDTH { + HelpID = "sw:MetricField:TP_FRM_STD:ED_WIDTH"; Border = TRUE ; Pos = MAP_APPFONT ( SWFRMPG_COL_3 , SWFRMPG_ROW_1 ) ; Size = MAP_APPFONT ( (SWFRMPG_COL_4-SWFRMPG_COL_3) , RSC_CD_TEXTBOX_HEIGHT ) ; @@ -261,6 +262,7 @@ TabPage TP_FRM_STD }; CheckBox CB_REL_WIDTH { + HelpID = "sw:CheckBox:TP_FRM_STD:CB_REL_WIDTH"; Pos = MAP_APPFONT ( SWFRMPG_COL_2 , SWFRMPG_ROW_3 ) ; Size = MAP_APPFONT ( (SWFRMPG_COL_4-SWFRMPG_COL_2) , RSC_CD_CHECKBOX_HEIGHT ) ; TabStop = TRUE ; @@ -268,6 +270,7 @@ TabPage TP_FRM_STD }; CheckBox CB_AUTOWIDTH { + HelpID = "sw:CheckBox:TP_FRM_STD:CB_AUTOWIDTH"; Pos = MAP_APPFONT ( SWFRMPG_COL_2 , SWFRMPG_ROW_4 ) ; Size = MAP_APPFONT ( (SWFRMPG_COL_4-SWFRMPG_COL_2) , RSC_CD_CHECKBOX_HEIGHT ) ; TabStop = TRUE ; @@ -289,6 +292,7 @@ TabPage TP_FRM_STD }; MetricField ED_HEIGHT { + HelpID = "sw:MetricField:TP_FRM_STD:ED_HEIGHT"; Border = TRUE ; Pos = MAP_APPFONT ( SWFRMPG_COL_3 , SWFRMPG_ROW_5 ) ; Size = MAP_APPFONT ( (SWFRMPG_COL_4-SWFRMPG_COL_3) , RSC_CD_TEXTBOX_HEIGHT ) ; @@ -306,6 +310,7 @@ TabPage TP_FRM_STD }; CheckBox CB_REL_HEIGHT { + HelpID = "sw:CheckBox:TP_FRM_STD:CB_REL_HEIGHT"; Pos = MAP_APPFONT ( SWFRMPG_COL_2 , SWFRMPG_ROW_7 ) ; Size = MAP_APPFONT ( (SWFRMPG_COL_4-SWFRMPG_COL_2) , RSC_CD_CHECKBOX_HEIGHT ) ; TabStop = TRUE ; @@ -313,6 +318,7 @@ TabPage TP_FRM_STD }; CheckBox CB_AUTOHEIGHT { + HelpID = "sw:CheckBox:TP_FRM_STD:CB_AUTOHEIGHT"; Pos = MAP_APPFONT ( SWFRMPG_COL_2 , SWFRMPG_ROW_8 ) ; Size = MAP_APPFONT ( (SWFRMPG_COL_4-SWFRMPG_COL_2) , RSC_CD_CHECKBOX_HEIGHT ) ; TabStop = TRUE ; @@ -320,6 +326,7 @@ TabPage TP_FRM_STD }; CheckBox CB_FIXEDRATIO { + HelpID = "sw:CheckBox:TP_FRM_STD:CB_FIXEDRATIO"; Pos = MAP_APPFONT ( SWFRMPG_COL_1 , SWFRMPG_ROW_9 ) ; Size = MAP_APPFONT ( (SWFRMPG_COL_4-SWFRMPG_COL_1) , RSC_CD_CHECKBOX_HEIGHT ) ; TabStop = TRUE ; @@ -327,6 +334,7 @@ TabPage TP_FRM_STD }; PushButton BT_REALSIZE { + HelpID = "sw:PushButton:TP_FRM_STD:BT_REALSIZE"; Pos = MAP_APPFONT ( 35 , 86 ) ; Size = MAP_APPFONT ( 70 , 14 ) ; TabStop = TRUE ; @@ -347,30 +355,35 @@ TabPage TP_FRM_STD }; RadioButton RB_ANCHOR_PAGE { + HelpID = "sw:RadioButton:TP_FRM_STD:RB_ANCHOR_PAGE"; Pos = MAP_APPFONT ( 122 , 14 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; Text [ en-US ] = "To ~page"; }; RadioButton RB_ANCHOR_PARA { + HelpID = "sw:RadioButton:TP_FRM_STD:RB_ANCHOR_PARA"; Pos = MAP_APPFONT ( 122 , 28 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; Text [ en-US ] = "To paragrap~h"; }; RadioButton RB_ANCHOR_AT_CHAR { + HelpID = "sw:RadioButton:TP_FRM_STD:RB_ANCHOR_AT_CHAR"; Pos = MAP_APPFONT ( 122 , 42 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; Text [ en-US ] = "To cha~racter"; }; RadioButton RB_ANCHOR_AS_CHAR { + HelpID = "sw:RadioButton:TP_FRM_STD:RB_ANCHOR_AS_CHAR"; Pos = MAP_APPFONT ( 122 , 56 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; Text [ en-US ] = "~As character" ; }; RadioButton RB_ANCHOR_FRAME { + HelpID = "sw:RadioButton:TP_FRM_STD:RB_ANCHOR_FRAME"; Pos = MAP_APPFONT ( 122 , 70 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; Text [ en-US ] = "To ~frame"; @@ -395,6 +408,7 @@ TabPage TP_FRM_STD }; ListBox DLB_HORIZONTAL { + HelpID = "sw:ListBox:TP_FRM_STD:DLB_HORIZONTAL"; Pos = MAP_APPFONT ( 49 , SWFRMPG_ROW_11 ) ; Size = MAP_APPFONT ( 50 , 60 ) ; TabStop = TRUE ; @@ -409,6 +423,7 @@ TabPage TP_FRM_STD }; MetricField ED_AT_HORZ_POS { + HelpID = "sw:MetricField:TP_FRM_STD:ED_AT_HORZ_POS"; Border = TRUE ; Pos = MAP_APPFONT ( 123 , SWFRMPG_ROW_11 ) ; Size = MAP_APPFONT ( 35 , RSC_CD_TEXTBOX_HEIGHT ) ; @@ -433,6 +448,7 @@ TabPage TP_FRM_STD }; ListBox LB_HORI_RELATION { + HelpID = "sw:ListBox:TP_FRM_STD:LB_HORI_RELATION"; Pos = MAP_APPFONT ( 183 , SWFRMPG_ROW_11 ) ; Size = MAP_APPFONT ( 65 , 60 ) ; TabStop = TRUE ; @@ -440,6 +456,7 @@ TabPage TP_FRM_STD }; CheckBox CB_MIRROR { + HelpID = "sw:CheckBox:TP_FRM_STD:CB_MIRROR"; Pos = MAP_APPFONT ( SWFRMPG_COL_2 , SWFRMPG_ROW_13 ) ; Size = MAP_APPFONT ( (260-SWFRMPG_COL_2-1) , RSC_CD_CHECKBOX_HEIGHT ) ; TabStop = TRUE ; @@ -454,6 +471,7 @@ TabPage TP_FRM_STD }; ListBox DLB_VERTICAL { + HelpID = "sw:ListBox:TP_FRM_STD:DLB_VERTICAL"; Pos = MAP_APPFONT ( 49 , SWFRMPG_ROW_14 ) ; Size = MAP_APPFONT ( 50 , 60 ) ; TabStop = TRUE ; @@ -468,6 +486,7 @@ TabPage TP_FRM_STD }; MetricField ED_AT_VERT_POS { + HelpID = "sw:MetricField:TP_FRM_STD:ED_AT_VERT_POS"; Border = TRUE ; Pos = MAP_APPFONT ( 123 , SWFRMPG_ROW_14 ) ; Size = MAP_APPFONT ( 35 , RSC_CD_TEXTBOX_HEIGHT ) ; @@ -492,6 +511,7 @@ TabPage TP_FRM_STD }; ListBox LB_VERT_RELATION { + HelpID = "sw:ListBox:TP_FRM_STD:LB_VERT_RELATION"; Pos = MAP_APPFONT ( 183 , SWFRMPG_ROW_14 ) ; Size = MAP_APPFONT ( 65 , 60 ) ; TabStop = TRUE ; @@ -499,6 +519,7 @@ TabPage TP_FRM_STD }; CheckBox CB_FOLLOWTEXTFLOW { + HelpID = "sw:CheckBox:TP_FRM_STD:CB_FOLLOWTEXTFLOW"; Pos = MAP_APPFONT ( SWFRMPG_COL_2 , SWFRMPG_ROW_16 ) ; Size = MAP_APPFONT ( (260-SWFRMPG_COL_2-1) , RSC_CD_CHECKBOX_HEIGHT ) ; TabStop = TRUE ; @@ -536,6 +557,7 @@ TabPage TP_GRF_EXT }; Edit ED_CONNECT { + HelpID = "sw:Edit:TP_GRF_EXT:ED_CONNECT"; Pos = MAP_APPFONT ( 13 , 109 ) ; Size = MAP_APPFONT ( 200 , 12 ) ; Text [ en-US ] = "[None]" ; @@ -545,6 +567,7 @@ TabPage TP_GRF_EXT }; PushButton PB_BROWSE { + HelpID = "sw:PushButton:TP_GRF_EXT:PB_BROWSE"; Disable = TRUE ; Pos = MAP_APPFONT ( 230 , 109 ) ; Size = MAP_APPFONT ( 12 , 12 ) ; @@ -554,6 +577,7 @@ TabPage TP_GRF_EXT }; CheckBox CB_VERT { + HelpID = "sw:CheckBox:TP_GRF_EXT:CB_VERT"; Pos = MAP_APPFONT ( 12 , 14 ) ; Size = MAP_APPFONT ( 48 , 10 ) ; TabStop = TRUE ; @@ -562,6 +586,7 @@ TabPage TP_GRF_EXT }; CheckBox CB_HOR { + HelpID = "sw:CheckBox:TP_GRF_EXT:CB_HOR"; Pos = MAP_APPFONT ( 12 , 28 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; TabStop = TRUE ; @@ -569,6 +594,7 @@ TabPage TP_GRF_EXT }; RadioButton RB_MIRROR_ALL_PAGES { + HelpID = "sw:RadioButton:TP_GRF_EXT:RB_MIRROR_ALL_PAGES"; Pos = MAP_APPFONT ( 18 , 42 ) ; Size = MAP_APPFONT ( 100 , 10 ) ; TabStop = TRUE ; @@ -576,6 +602,7 @@ TabPage TP_GRF_EXT }; RadioButton RB_MIRROR_LEFT_PAGES { + HelpID = "sw:RadioButton:TP_GRF_EXT:RB_MIRROR_LEFT_PAGES"; Pos = MAP_APPFONT ( 18 , 56 ) ; Size = MAP_APPFONT ( 100 , 10 ) ; TabStop = TRUE ; @@ -583,6 +610,7 @@ TabPage TP_GRF_EXT }; RadioButton RB_MIRROR_RIGHT_PAGES { + HelpID = "sw:RadioButton:TP_GRF_EXT:RB_MIRROR_RIGHT_PAGES"; Pos = MAP_APPFONT ( 18 , 70 ) ; Size = MAP_APPFONT ( 100 , 10 ) ; TabStop = TRUE ; @@ -620,6 +648,7 @@ TabPage TP_FRM_URL }; Edit ED_URL { + HelpID = "sw:Edit:TP_FRM_URL:ED_URL"; Pos = MAP_APPFONT ( 45 , 14 ) ; Size = MAP_APPFONT ( 149 , 12 ) ; Left = TRUE ; @@ -634,6 +663,7 @@ TabPage TP_FRM_URL }; Edit ED_NAME { + HelpID = "sw:Edit:TP_FRM_URL:ED_NAME"; Pos = MAP_APPFONT ( 45 , 30 ) ; Size = MAP_APPFONT ( 149 , 12 ) ; Left = TRUE ; @@ -648,6 +678,7 @@ TabPage TP_FRM_URL }; ComboBox CB_FRAME { + HelpID = "sw:ComboBox:TP_FRM_URL:CB_FRAME"; Pos = MAP_APPFONT ( 45 , 46 ) ; Size = MAP_APPFONT ( 89 , 50 ) ; Left = TRUE ; @@ -656,6 +687,7 @@ TabPage TP_FRM_URL }; PushButton PB_SEARCH { + HelpID = "sw:PushButton:TP_FRM_URL:PB_SEARCH"; Pos = MAP_APPFONT ( 198 , 13 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; TabStop = TRUE ; @@ -669,12 +701,14 @@ TabPage TP_FRM_URL }; CheckBox CB_SERVER { + HelpID = "sw:CheckBox:TP_FRM_URL:CB_SERVER"; Pos = MAP_APPFONT ( 12 , 75 ) ; Size = MAP_APPFONT ( 236 , 10 ) ; Text [ en-US ] = "~Server-side image map"; }; CheckBox CB_CLIENT { + HelpID = "sw:CheckBox:TP_FRM_URL:CB_CLIENT"; Pos = MAP_APPFONT ( 12 , 89 ) ; Size = MAP_APPFONT ( 236 , 10 ) ; Text [ en-US ] = "~Client-side image map"; @@ -701,6 +735,7 @@ TabPage TP_FRM_ADD }; Edit ED_NAME { + HelpID = "sw:Edit:TP_FRM_ADD:ED_NAME"; Border = TRUE ; Pos = MAP_APPFONT ( 91 , 14 ) ; Size = MAP_APPFONT ( 157 , 12 ) ; @@ -714,6 +749,7 @@ TabPage TP_FRM_ADD }; Edit ED_ALT_NAME { + HelpID = "sw:Edit:TP_FRM_ADD:ED_ALT_NAME"; Border = TRUE ; Pos = MAP_APPFONT ( 91 , 30 ) ; Size = MAP_APPFONT ( 157 , 12 ) ; @@ -727,6 +763,7 @@ TabPage TP_FRM_ADD }; ListBox LB_PREV { + HelpID = "sw:ListBox:TP_FRM_ADD:LB_PREV"; Border = TRUE ; Pos = MAP_APPFONT ( 91 , 46 ) ; Size = MAP_APPFONT ( 157 , 50 ) ; @@ -745,6 +782,7 @@ TabPage TP_FRM_ADD }; ListBox LB_NEXT { + HelpID = "sw:ListBox:TP_FRM_ADD:LB_NEXT"; Border = TRUE ; Pos = MAP_APPFONT ( 91 , 62 ) ; Size = MAP_APPFONT ( 157 , 50 ) ; @@ -763,6 +801,7 @@ TabPage TP_FRM_ADD }; CheckBox CB_PROTECT_CONTENT { + HelpID = "sw:CheckBox:TP_FRM_ADD:CB_PROTECT_CONTENT"; Pos = MAP_APPFONT ( 12 , 91 ) ; Size = MAP_APPFONT ( 80 , 10 ) ; TabStop = TRUE ; @@ -770,6 +809,7 @@ TabPage TP_FRM_ADD }; CheckBox CB_PROTECT_FRAME { + HelpID = "sw:CheckBox:TP_FRM_ADD:CB_PROTECT_FRAME"; Pos = MAP_APPFONT ( 12 , 105 ) ; Size = MAP_APPFONT ( 80 , 10 ) ; TabStop = TRUE ; @@ -777,6 +817,7 @@ TabPage TP_FRM_ADD }; CheckBox CB_PROTECT_SIZE { + HelpID = "sw:CheckBox:TP_FRM_ADD:CB_PROTECT_SIZE"; Pos = MAP_APPFONT ( 12 , 119 ) ; Size = MAP_APPFONT ( 80 , 10 ) ; TabStop = TRUE ; @@ -790,6 +831,7 @@ TabPage TP_FRM_ADD }; CheckBox CB_EDIT_IN_READONLY { + HelpID = "sw:CheckBox:TP_FRM_ADD:CB_EDIT_IN_READONLY"; Pos = MAP_APPFONT ( 12 , 146 ) ; Size = MAP_APPFONT ( 236 , 10 ) ; TabStop = TRUE ; @@ -797,6 +839,7 @@ TabPage TP_FRM_ADD }; CheckBox CB_PRINT_FRAME { + HelpID = "sw:CheckBox:TP_FRM_ADD:CB_PRINT_FRAME"; Pos = MAP_APPFONT ( 12 , 160 ) ; Size = MAP_APPFONT ( 236 , 10 ) ; TabStop = TRUE ; @@ -819,6 +862,7 @@ TabPage TP_FRM_ADD }; ListBox LB_TEXTFLOW { + HelpID = "sw:ListBox:TP_FRM_ADD:LB_TEXTFLOW"; Border = TRUE ; Pos = MAP_APPFONT ( 81 , 172 ) ; Size = MAP_APPFONT ( 167 , 50 ) ; diff --git a/sw/source/ui/frmdlg/makefile.mk b/sw/source/ui/frmdlg/makefile.mk deleted file mode 100644 index 3caff5544e..0000000000 --- a/sw/source/ui/frmdlg/makefile.mk +++ /dev/null @@ -1,78 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=frmdlg -LIBTARGET=no - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -SRS1NAME=$(TARGET) -SRC1FILES = \ - column.src \ - cption.src \ - frmpage.src \ - frmui.src \ - wrap.src - -SLOFILES = \ - $(EXCEPTIONSFILES) \ - $(SLO)$/colmgr.obj - -EXCEPTIONSFILES = \ - $(SLO)$/colex.obj \ - $(SLO)$/column.obj \ - $(SLO)$/cption.obj \ - $(SLO)$/frmdlg.obj \ - $(SLO)$/frmmgr.obj \ - $(SLO)$/frmpage.obj \ - $(SLO)$/pattern.obj \ - $(SLO)$/uiborder.obj \ - $(SLO)$/wrap.obj - -LIB1TARGET = $(SLB)$/$(TARGET).lib - -LIB1OBJFILES = \ - $(SLO)$/colmgr.obj \ - $(SLO)$/colex.obj \ - $(SLO)$/frmmgr.obj - - - - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/ui/frmdlg/uiborder.cxx b/sw/source/ui/frmdlg/uiborder.cxx index 9ef529790d..9a60449868 100644 --- a/sw/source/ui/frmdlg/uiborder.cxx +++ b/sw/source/ui/frmdlg/uiborder.cxx @@ -48,7 +48,7 @@ -SwBorderDlg::SwBorderDlg(Window* pParent, SfxItemSet& rSet, USHORT nType) : +SwBorderDlg::SwBorderDlg(Window* pParent, SfxItemSet& rSet, sal_uInt16 nType) : SfxSingleTabDialog(pParent, rSet, 0) diff --git a/sw/source/ui/frmdlg/wrap.cxx b/sw/source/ui/frmdlg/wrap.cxx index 5a38fad66c..8980b27e18 100644 --- a/sw/source/ui/frmdlg/wrap.cxx +++ b/sw/source/ui/frmdlg/wrap.cxx @@ -61,21 +61,21 @@ using namespace ::com::sun::star; -static USHORT aWrapPageRg[] = { +static sal_uInt16 aWrapPageRg[] = { RES_LR_SPACE, RES_UL_SPACE, RES_PROTECT, RES_SURROUND, RES_PRINT, RES_PRINT, 0 }; -SwWrapDlg::SwWrapDlg(Window* pParent, SfxItemSet& rSet, SwWrtShell* pSh, BOOL bDrawMode) : +SwWrapDlg::SwWrapDlg(Window* pParent, SfxItemSet& rSet, SwWrtShell* pSh, sal_Bool bDrawMode) : SfxSingleTabDialog(pParent, rSet, 0), pWrtShell(pSh) { // TabPage erzeugen SwWrapTabPage* pNewPage = (SwWrapTabPage*) SwWrapTabPage::Create(this, rSet); - pNewPage->SetFormatUsed(FALSE, bDrawMode); + pNewPage->SetFormatUsed(sal_False, bDrawMode); pNewPage->SetShell(pWrtShell); SetTabPage(pNewPage); @@ -122,10 +122,10 @@ SwWrapTabPage::SwWrapTabPage(Window *pParent, const SfxItemSet &rSet) : pWrtSh(0), - bFormat(FALSE), - bNew(TRUE), - bHtmlMode(FALSE), - bContourImage(FALSE) + bFormat(sal_False), + bNew(sal_True), + bHtmlMode(sal_False), + bContourImage(sal_False) { FreeResource(); @@ -190,14 +190,14 @@ void SwWrapTabPage::Reset(const SfxItemSet &rSet) } else { - BOOL bShowCB = bFormat; + sal_Bool bShowCB = bFormat; if( !bFormat ) { int nSelType = pWrtSh->GetSelectionType(); if( ( nSelType & nsSelectionType::SEL_GRF ) || ( nSelType & nsSelectionType::SEL_OLE && GRAPHIC_NONE != pWrtSh->GetIMapGraphic().GetType() )) - bShowCB = TRUE; + bShowCB = sal_True; } if( bShowCB ) { @@ -207,7 +207,7 @@ void SwWrapTabPage::Reset(const SfxItemSet &rSet) } nHtmlMode = ::GetHtmlMode((const SwDocShell*)SfxObjectShell::Current()); - bHtmlMode = nHtmlMode & HTMLMODE_ON ? TRUE : FALSE; + bHtmlMode = nHtmlMode & HTMLMODE_ON ? sal_True : sal_False; FieldUnit aMetric = ::GetDfltMetric(bHtmlMode); SetMetric( aLeftMarginED , aMetric ); @@ -228,10 +228,10 @@ void SwWrapTabPage::Reset(const SfxItemSet &rSet) } else { - aWrapAnchorOnlyCB.Enable( FALSE ); + aWrapAnchorOnlyCB.Enable( sal_False ); } - BOOL bContour = rSurround.IsContour(); + sal_Bool bContour = rSurround.IsContour(); aWrapOutlineCB.Check( bContour ); aWrapOutsideCB.Check( rSurround.IsOutside() ); aWrapThroughRB.Enable(!aWrapOutlineCB.IsChecked()); @@ -308,9 +308,9 @@ void SwWrapTabPage::Reset(const SfxItemSet &rSet) /*-------------------------------------------------------------------- Beschreibung: Attribute in den Set stopfen bei OK --------------------------------------------------------------------*/ -BOOL SwWrapTabPage::FillItemSet(SfxItemSet &rSet) +sal_Bool SwWrapTabPage::FillItemSet(SfxItemSet &rSet) { - BOOL bModified = FALSE; + sal_Bool bModified = sal_False; const SfxPoolItem* pOldItem; const SwFmtSurround& rOldSur = (const SwFmtSurround&)GetItemSet().Get(RES_SURROUND); @@ -322,7 +322,7 @@ BOOL SwWrapTabPage::FillItemSet(SfxItemSet &rSet) { const SvxOpaqueItem& rOpaque = (const SvxOpaqueItem&)GetItemSet().Get(RES_OPAQUE); aOp = rOpaque; - aOp.SetValue(TRUE); + aOp.SetValue(sal_True); } if (aNoWrapRB.IsChecked()) @@ -337,13 +337,13 @@ BOOL SwWrapTabPage::FillItemSet(SfxItemSet &rSet) { aSur.SetSurround(SURROUND_THROUGHT); if (aWrapTransparentCB.IsChecked() && !bDrawMode) - aOp.SetValue(FALSE); + aOp.SetValue(sal_False); } else if (aIdealWrapRB.IsChecked()) aSur.SetSurround(SURROUND_IDEAL); aSur.SetAnchorOnly( aWrapAnchorOnlyCB.IsChecked() ); - BOOL bContour = aWrapOutlineCB.IsChecked() && aWrapOutlineCB.IsEnabled(); + sal_Bool bContour = aWrapOutlineCB.IsChecked() && aWrapOutlineCB.IsEnabled(); aSur.SetContour( bContour ); if ( bContour ) @@ -353,7 +353,7 @@ BOOL SwWrapTabPage::FillItemSet(SfxItemSet &rSet) aSur != *pOldItem ) { rSet.Put(aSur); - bModified = TRUE; + bModified = sal_True; } if (!bDrawMode) @@ -362,16 +362,16 @@ BOOL SwWrapTabPage::FillItemSet(SfxItemSet &rSet) aOp != *pOldItem ) { rSet.Put(aOp); - bModified = TRUE; + bModified = sal_True; } } - BOOL bTopMod = aTopMarginED.IsValueModified(); - BOOL bBottomMod = aBottomMarginED.IsValueModified(); + sal_Bool bTopMod = aTopMarginED.IsValueModified(); + sal_Bool bBottomMod = aBottomMarginED.IsValueModified(); SvxULSpaceItem aUL( RES_UL_SPACE ); - aUL.SetUpper((USHORT)aTopMarginED.Denormalize(aTopMarginED.GetValue(FUNIT_TWIP))); - aUL.SetLower((USHORT)aBottomMarginED.Denormalize(aBottomMarginED.GetValue(FUNIT_TWIP))); + aUL.SetUpper((sal_uInt16)aTopMarginED.Denormalize(aTopMarginED.GetValue(FUNIT_TWIP))); + aUL.SetLower((sal_uInt16)aBottomMarginED.Denormalize(aBottomMarginED.GetValue(FUNIT_TWIP))); if ( bTopMod || bBottomMod ) { @@ -379,16 +379,16 @@ BOOL SwWrapTabPage::FillItemSet(SfxItemSet &rSet) aUL != *pOldItem ) { rSet.Put( aUL, RES_UL_SPACE ); - bModified = TRUE; + bModified = sal_True; } } - BOOL bLeftMod = aLeftMarginED.IsValueModified(); - BOOL bRightMod = aRightMarginED.IsValueModified(); + sal_Bool bLeftMod = aLeftMarginED.IsValueModified(); + sal_Bool bRightMod = aRightMarginED.IsValueModified(); SvxLRSpaceItem aLR( RES_LR_SPACE ); - aLR.SetLeft((USHORT)aLeftMarginED.Denormalize(aLeftMarginED.GetValue(FUNIT_TWIP))); - aLR.SetRight((USHORT)aRightMarginED.Denormalize(aRightMarginED.GetValue(FUNIT_TWIP))); + aLR.SetLeft((sal_uInt16)aLeftMarginED.Denormalize(aLeftMarginED.GetValue(FUNIT_TWIP))); + aLR.SetRight((sal_uInt16)aRightMarginED.Denormalize(aRightMarginED.GetValue(FUNIT_TWIP))); if ( bLeftMod || bRightMod ) { @@ -396,13 +396,13 @@ BOOL SwWrapTabPage::FillItemSet(SfxItemSet &rSet) aLR != *pOldItem ) { rSet.Put(aLR, RES_LR_SPACE); - bModified = TRUE; + bModified = sal_True; } } if ( bDrawMode ) { - BOOL bChecked = aWrapTransparentCB.IsChecked() & aWrapTransparentCB.IsEnabled(); + sal_Bool bChecked = aWrapTransparentCB.IsChecked() & aWrapTransparentCB.IsEnabled(); if (aWrapTransparentCB.GetSavedValue() != bChecked) bModified |= 0 != rSet.Put(SfxInt16Item(FN_DRAW_WRAP_DLG, bChecked ? 0 : 1)); } @@ -418,7 +418,7 @@ void SwWrapTabPage::ActivatePage(const SfxItemSet& rSet) // Anchor const SwFmtAnchor &rAnch = (const SwFmtAnchor&)rSet.Get(RES_ANCHOR); nAnchorId = rAnch.GetAnchorId(); - BOOL bEnable = (nAnchorId != FLY_AS_CHAR); + sal_Bool bEnable = (nAnchorId != FLY_AS_CHAR); if (!bDrawMode) { @@ -433,10 +433,10 @@ void SwWrapTabPage::ActivatePage(const SfxItemSet& rSet) // Rand const SvxULSpaceItem& rUL = (const SvxULSpaceItem&)rSet.Get(RES_UL_SPACE); const SvxLRSpaceItem& rLR = (const SvxLRSpaceItem&)rSet.Get(RES_LR_SPACE); - nOldLeftMargin = static_cast< USHORT >(rLR.GetLeft()); - nOldRightMargin = static_cast< USHORT >(rLR.GetRight()); - nOldUpperMargin = static_cast< USHORT >(rUL.GetUpper()); - nOldLowerMargin = static_cast< USHORT >(rUL.GetLower()); + nOldLeftMargin = static_cast< sal_uInt16 >(rLR.GetLeft()); + nOldRightMargin = static_cast< sal_uInt16 >(rLR.GetRight()); + nOldUpperMargin = static_cast< sal_uInt16 >(rUL.GetUpper()); + nOldLowerMargin = static_cast< sal_uInt16 >(rUL.GetLower()); // Position const SwFmtHoriOrient& rHori = (const SwFmtHoriOrient&)rSet.Get(RES_HORI_ORIENT); @@ -527,7 +527,7 @@ void SwWrapTabPage::ActivatePage(const SfxItemSet& rSet) aWrapTransparentCB.Enable( bEnable && !bHtmlMode && nSur == SURROUND_THROUGHT ); if(bHtmlMode) { - BOOL bSomeAbsPos = 0 != (nHtmlMode & HTMLMODE_SOME_ABS_POS); + sal_Bool bSomeAbsPos = 0 != (nHtmlMode & HTMLMODE_SOME_ABS_POS); const SwFmtHoriOrient& rHori = (const SwFmtHoriOrient&)rSet.Get(RES_HORI_ORIENT); sal_Int16 eHOrient = rHori.GetHoriOrient(); sal_Int16 eHRelOrient = rHori.GetRelationOrient(); @@ -537,12 +537,12 @@ void SwWrapTabPage::ActivatePage(const SfxItemSet& rSet) (eHOrient == text::HoriOrientation::RIGHT || eHOrient == text::HoriOrientation::LEFT); aWrapAnchorOnlyCB.Enable( bAllHtmlModes && nSur != SURROUND_NONE ); aWrapOutsideCB.Hide(); - aIdealWrapRB.Enable( FALSE ); + aIdealWrapRB.Enable( sal_False ); - aWrapTransparentCB.Enable( FALSE ); + aWrapTransparentCB.Enable( sal_False ); aNoWrapRB.Enable( FLY_AT_PARA == nAnchorId ); - aWrapParallelRB.Enable( FALSE ); + aWrapParallelRB.Enable( sal_False ); aWrapLeftRB .Enable ( (FLY_AT_PARA == nAnchorId) || ( (FLY_AT_CHAR == nAnchorId) @@ -564,7 +564,7 @@ void SwWrapTabPage::ActivatePage(const SfxItemSet& rSet) if(aNoWrapRB.IsChecked() && !aNoWrapRB.IsEnabled()) { if(aWrapThroughRB.IsEnabled()) - aWrapThroughRB.Check(TRUE); + aWrapThroughRB.Check(sal_True); else if(aWrapLeftRB.IsEnabled()) aWrapLeftRB.Check(); else if(aWrapRightRB.IsEnabled()) @@ -612,7 +612,7 @@ int SwWrapTabPage::DeactivatePage(SfxItemSet* _pSet) if(_pSet) FillItemSet(*_pSet); - return TRUE; + return sal_True; } /*-------------------------------------------------------------------- @@ -662,7 +662,7 @@ IMPL_LINK( SwWrapTabPage, RangeModifyHdl, MetricField *, pEdit ) IMPL_LINK( SwWrapTabPage, WrapTypeHdl, ImageRadioButton *, pBtn ) { - BOOL bWrapThrough = (pBtn == &aWrapThroughRB); + sal_Bool bWrapThrough = (pBtn == &aWrapThroughRB); aWrapTransparentCB.Enable( bWrapThrough && !bHtmlMode ); bWrapThrough |= ( nAnchorId == FLY_AS_CHAR ); aWrapOutlineCB.Enable( !bWrapThrough && pBtn != &aNoWrapRB); @@ -677,7 +677,7 @@ IMPL_LINK( SwWrapTabPage, WrapTypeHdl, ImageRadioButton *, pBtn ) IMPL_LINK( SwWrapTabPage, ContourHdl, CheckBox *, EMPTYARG ) { - BOOL bEnable = !(aWrapOutlineCB.IsChecked() && aWrapOutlineCB.IsEnabled()); + sal_Bool bEnable = !(aWrapOutlineCB.IsChecked() && aWrapOutlineCB.IsEnabled()); aWrapOutsideCB.Enable(!bEnable); @@ -691,7 +691,7 @@ IMPL_LINK( SwWrapTabPage, ContourHdl, CheckBox *, EMPTYARG ) return 0; } -USHORT* SwWrapTabPage::GetRanges() +sal_uInt16* SwWrapTabPage::GetRanges() { return aWrapPageRg; } @@ -710,7 +710,7 @@ void SwWrapTabPage::ApplyImageList() ImageList& rImgLst = aWrapIL; aWrapThroughRB.SetModeRadioImage(rImgLst.GetImage(IMG_THROUGH)); - BOOL bWrapOutline = !aWrapOutlineCB.IsChecked(); + sal_Bool bWrapOutline = !aWrapOutlineCB.IsChecked(); if(bWrapOutline) { aNoWrapRB.SetModeRadioImage( rImgLst.GetImage( IMG_NONE )); diff --git a/sw/source/ui/frmdlg/wrap.src b/sw/source/ui/frmdlg/wrap.src index 1b2db4f640..3c8bc04d88 100644 --- a/sw/source/ui/frmdlg/wrap.src +++ b/sw/source/ui/frmdlg/wrap.src @@ -44,6 +44,7 @@ TabPage TP_FRM_WRAP }; ImageRadioButton RB_NO_WRAP { + HelpID = "sw:ImageRadioButton:TP_FRM_WRAP:RB_NO_WRAP"; Pos = MAP_APPFONT ( 6 , 14 ) ; Size = MAP_APPFONT ( 40 , 37 ) ; WordBreak = TRUE; @@ -52,6 +53,7 @@ TabPage TP_FRM_WRAP }; ImageRadioButton RB_WRAP_LEFT { + HelpID = "sw:ImageRadioButton:TP_FRM_WRAP:RB_WRAP_LEFT"; Pos = MAP_APPFONT ( 65 , 14 ) ; Size = MAP_APPFONT ( 40 , 37 ) ; WordBreak = TRUE; @@ -60,6 +62,7 @@ TabPage TP_FRM_WRAP }; ImageRadioButton RB_WRAP_RIGHT { + HelpID = "sw:ImageRadioButton:TP_FRM_WRAP:RB_WRAP_RIGHT"; Pos = MAP_APPFONT ( 121 , 14 ) ; Size = MAP_APPFONT ( 40 , 37 ) ; WordBreak = TRUE; @@ -68,6 +71,7 @@ TabPage TP_FRM_WRAP }; ImageRadioButton RB_WRAP_PARALLEL { + HelpID = "sw:ImageRadioButton:TP_FRM_WRAP:RB_WRAP_PARALLEL"; Pos = MAP_APPFONT ( 177 , 14 ) ; Size = MAP_APPFONT ( 40 , 37 ) ; WordBreak = TRUE; @@ -76,6 +80,7 @@ TabPage TP_FRM_WRAP }; ImageRadioButton RB_WRAP_THROUGH { + HelpID = "sw:ImageRadioButton:TP_FRM_WRAP:RB_WRAP_THROUGH"; Pos = MAP_APPFONT ( 6 , 57 ) ; Size = MAP_APPFONT ( 40 , 37 ) ; WordBreak = TRUE; @@ -84,6 +89,7 @@ TabPage TP_FRM_WRAP }; ImageRadioButton RB_WRAP_IDEAL { + HelpID = "sw:ImageRadioButton:TP_FRM_WRAP:RB_WRAP_IDEAL"; Pos = MAP_APPFONT ( 65 , 57 ) ; Size = MAP_APPFONT ( 40 , 37 ) ; WordBreak = TRUE; @@ -93,18 +99,21 @@ TabPage TP_FRM_WRAP CheckBox CB_ANCHOR_ONLY { + HelpID = "sw:CheckBox:TP_FRM_WRAP:CB_ANCHOR_ONLY"; Pos = MAP_APPFONT ( 139 , 111 ) ; Size = MAP_APPFONT ( 109 , 10 ) ; Text [ en-US ] = "~First paragraph" ; }; CheckBox CB_TRANSPARENT { + HelpID = "sw:CheckBox:TP_FRM_WRAP:CB_TRANSPARENT"; Pos = MAP_APPFONT ( 139 , 125 ) ; Size = MAP_APPFONT ( 109 , 10 ) ; Text [ en-US ] = "In bac~kground" ; }; CheckBox CB_OUTLINE { + HelpID = "sw:CheckBox:TP_FRM_WRAP:CB_OUTLINE"; Pos = MAP_APPFONT ( 139 , 139 ) ; Size = MAP_APPFONT ( 109 , 10 ) ; Hide = TRUE ; @@ -112,6 +121,7 @@ TabPage TP_FRM_WRAP }; CheckBox CB_ONLYOUTSIDE { + HelpID = "sw:CheckBox:TP_FRM_WRAP:CB_ONLYOUTSIDE"; Pos = MAP_APPFONT ( 139 , 153 ) ; Size = MAP_APPFONT ( 109 , 10 ) ; Hide = TRUE ; @@ -138,6 +148,7 @@ TabPage TP_FRM_WRAP }; MetricField ED_LEFT_MARGIN { + HelpID = "sw:MetricField:TP_FRM_WRAP:ED_LEFT_MARGIN"; Border = TRUE ; Pos = MAP_APPFONT ( 81 , 111 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -160,6 +171,7 @@ TabPage TP_FRM_WRAP }; MetricField ED_RIGHT_MARGIN { + HelpID = "sw:MetricField:TP_FRM_WRAP:ED_RIGHT_MARGIN"; Border = TRUE ; Pos = MAP_APPFONT ( 81 , 127 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -182,6 +194,7 @@ TabPage TP_FRM_WRAP }; MetricField ED_TOP_MARGIN { + HelpID = "sw:MetricField:TP_FRM_WRAP:ED_TOP_MARGIN"; Border = TRUE ; Pos = MAP_APPFONT ( 81 , 143 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -204,6 +217,7 @@ TabPage TP_FRM_WRAP }; MetricField ED_BOTTOM_MARGIN { + HelpID = "sw:MetricField:TP_FRM_WRAP:ED_BOTTOM_MARGIN"; Border = TRUE ; Pos = MAP_APPFONT ( 81 , 159 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; diff --git a/sw/source/ui/globdoc/makefile.mk b/sw/source/ui/globdoc/makefile.mk deleted file mode 100644 index f3563b819d..0000000000 --- a/sw/source/ui/globdoc/makefile.mk +++ /dev/null @@ -1,54 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=globdoc - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -SRS1NAME=$(TARGET) -SRC1FILES = \ - globdoc.src - -SLOFILES = \ - $(EXCEPTIONSFILES) - -EXCEPTIONSFILES = \ - $(SLO)$/globdoc.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/ui/inc/DropDownFieldDialog.hxx b/sw/source/ui/inc/DropDownFieldDialog.hxx index 51d58c6983..490339f4e9 100644 --- a/sw/source/ui/inc/DropDownFieldDialog.hxx +++ b/sw/source/ui/inc/DropDownFieldDialog.hxx @@ -61,7 +61,7 @@ class DropDownFieldDialog : public SvxStandardDialog virtual void Apply(); public: DropDownFieldDialog( Window *pParent, SwWrtShell &rSh, - SwField* pField, BOOL bNextButton = FALSE ); + SwField* pField, sal_Bool bNextButton = sal_False ); ~DropDownFieldDialog(); }; } //namespace sw diff --git a/sw/source/ui/inc/SwSpellDialogChildWindow.hxx b/sw/source/ui/inc/SwSpellDialogChildWindow.hxx index 1ba734f688..cdca54a93c 100644 --- a/sw/source/ui/inc/SwSpellDialogChildWindow.hxx +++ b/sw/source/ui/inc/SwSpellDialogChildWindow.hxx @@ -60,7 +60,7 @@ protected: public: SwSpellDialogChildWindow ( Window*pParent, - USHORT nId, + sal_uInt16 nId, SfxBindings* pBindings, SfxChildWinInfo* pInfo); ~SwSpellDialogChildWindow(); diff --git a/sw/source/ui/inc/abstract.hxx b/sw/source/ui/inc/abstract.hxx index 3046dcde6b..10fb9aa14c 100644 --- a/sw/source/ui/inc/abstract.hxx +++ b/sw/source/ui/inc/abstract.hxx @@ -54,8 +54,8 @@ public: SwInsertAbstractDlg( Window* pParent ); ~SwInsertAbstractDlg(); - BYTE GetLevel() const; - BYTE GetPara() const; + sal_uInt8 GetLevel() const; + sal_uInt8 GetPara() const; }; #endif diff --git a/sw/source/ui/inc/annotsh.hxx b/sw/source/ui/inc/annotsh.hxx index 8a1a0676db..9ad2a595e0 100644 --- a/sw/source/ui/inc/annotsh.hxx +++ b/sw/source/ui/inc/annotsh.hxx @@ -68,11 +68,12 @@ public: void InsertSymbol(SfxRequest& rReq); - void ExecSearch(SfxRequest&, BOOL bNoMessage = FALSE); + void ExecSearch(SfxRequest&, sal_Bool bNoMessage = sal_False); void StateSearch(SfxItemSet &); - virtual SfxUndoManager* GetUndoManager(); + virtual ::svl::IUndoManager* + GetUndoManager(); }; #endif diff --git a/sw/source/ui/inc/ascfldlg.hxx b/sw/source/ui/inc/ascfldlg.hxx index 23c929f0e6..fe3793a110 100644 --- a/sw/source/ui/inc/ascfldlg.hxx +++ b/sw/source/ui/inc/ascfldlg.hxx @@ -54,7 +54,7 @@ class SwAsciiFilterDlg : public SfxModalDialog CancelButton aCancelPB; HelpButton aHelpPB; String sSystemCharSet; - BOOL bSaveLineStatus; + sal_Bool bSaveLineStatus; DECL_LINK( CharSetSelHdl, SvxTextEncodingBox* ); DECL_LINK( LineEndHdl, RadioButton* ); diff --git a/sw/source/ui/inc/basesh.hxx b/sw/source/ui/inc/basesh.hxx index f3c2284c65..76d32e6af6 100644 --- a/sw/source/ui/inc/basesh.hxx +++ b/sw/source/ui/inc/basesh.hxx @@ -70,7 +70,7 @@ protected: inline SwView& GetView() { return rView; } inline void SetGetStateSet( SfxItemSet* p ) { pGetStateSet = p; } - inline BOOL AddGrfUpdateSlot( USHORT nSlot ){ return aGrfUpdateSlots.Insert( nSlot ); } + inline sal_Bool AddGrfUpdateSlot( sal_uInt16 nSlot ){ return aGrfUpdateSlots.Insert( nSlot ); } DECL_STATIC_LINK( SwBaseShell, InsertDBTextHdl, DBTextStruct_Impl* ); @@ -109,7 +109,7 @@ public: void GetBckColState(SfxItemSet &rSet); void ExecBckCol(SfxRequest& rReq); - void SetWrapMode( USHORT nSlot ); + void SetWrapMode( sal_uInt16 nSlot ); void StateDisableItems(SfxItemSet &); diff --git a/sw/source/ui/inc/bmpwin.hxx b/sw/source/ui/inc/bmpwin.hxx index 8c76b2df19..baefb78de3 100644 --- a/sw/source/ui/inc/bmpwin.hxx +++ b/sw/source/ui/inc/bmpwin.hxx @@ -42,22 +42,22 @@ private: Graphic aGraphic; BitmapEx aBmp; - BOOL bHorz : 1; - BOOL bVert : 1; - BOOL bGraphic : 1; - BOOL bLeftAlign : 1; + sal_Bool bHorz : 1; + sal_Bool bVert : 1; + sal_Bool bGraphic : 1; + sal_Bool bLeftAlign : 1; void Paint(const Rectangle& rRect); public: - BmpWindow(Window* pPar, USHORT nId, + BmpWindow(Window* pPar, sal_uInt16 nId, const Graphic& rGraphic, const BitmapEx& rBmp); BmpWindow(Window* pParent, const ResId rResId) : Window(pParent, rResId), - bHorz(FALSE), bVert(FALSE),bGraphic(FALSE), bLeftAlign(TRUE) {} + bHorz(sal_False), bVert(sal_False),bGraphic(sal_False), bLeftAlign(sal_True) {} ~BmpWindow(); - void MirrorVert(BOOL bMirror) { bVert = bMirror; Invalidate(); } - void MirrorHorz(BOOL bMirror) { bHorz = bMirror; Invalidate(); } + void MirrorVert(sal_Bool bMirror) { bVert = bMirror; Invalidate(); } + void MirrorHorz(sal_Bool bMirror) { bHorz = bMirror; Invalidate(); } void SetGraphic(const Graphic& rGrf); }; diff --git a/sw/source/ui/inc/bookctrl.hxx b/sw/source/ui/inc/bookctrl.hxx index d51fb6d009..d1e21b3dc3 100644 --- a/sw/source/ui/inc/bookctrl.hxx +++ b/sw/source/ui/inc/bookctrl.hxx @@ -40,13 +40,13 @@ class SwBookmarkControl : public SfxStatusBarControl virtual void Command( const CommandEvent& rCEvt ); public: - virtual void StateChanged( USHORT nSID, SfxItemState eState, + virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ); virtual void Paint( const UserDrawEvent& rEvt ); SFX_DECL_STATUSBAR_CONTROL(); - SwBookmarkControl( USHORT nSlotId, USHORT nId, StatusBar& rStb ); + SwBookmarkControl( sal_uInt16 nSlotId, sal_uInt16 nId, StatusBar& rStb ); ~SwBookmarkControl(); private: diff --git a/sw/source/ui/inc/bookmark.hxx b/sw/source/ui/inc/bookmark.hxx index 666fd43d23..b2dcc87d1b 100644 --- a/sw/source/ui/inc/bookmark.hxx +++ b/sw/source/ui/inc/bookmark.hxx @@ -40,24 +40,24 @@ class SfxRequest; class BookmarkCombo : public SwComboBox { - USHORT GetFirstSelEntryPos() const; - USHORT GetNextSelEntryPos(USHORT nPos) const; - USHORT GetSelEntryPos(USHORT nPos) const; + sal_uInt16 GetFirstSelEntryPos() const; + sal_uInt16 GetNextSelEntryPos(sal_uInt16 nPos) const; + sal_uInt16 GetSelEntryPos(sal_uInt16 nPos) const; virtual long PreNotify(NotifyEvent& rNEvt); public: BookmarkCombo( Window* pWin, const ResId& rResId ); - USHORT GetSelectEntryCount() const; - USHORT GetSelectEntryPos( USHORT nSelIndex = 0 ) const; + sal_uInt16 GetSelectEntryCount() const; + sal_uInt16 GetSelectEntryPos( sal_uInt16 nSelIndex = 0 ) const; static const String aForbiddenChars; }; class SwInsertBookmarkDlg: public SvxStandardDialog { - BookmarkCombo aBookmarkBox; FixedLine aBookmarkFl; + BookmarkCombo aBookmarkBox; OKButton aOkBtn; CancelButton aCancelBtn; PushButton aDeleteBtn; diff --git a/sw/source/ui/inc/break.hxx b/sw/source/ui/inc/break.hxx index 1b488c0398..71d191d144 100644 --- a/sw/source/ui/inc/break.hxx +++ b/sw/source/ui/inc/break.hxx @@ -43,6 +43,7 @@ class SwWrtShell; class SwBreakDlg: public SvxStandardDialog { SwWrtShell &rSh; + FixedLine aBreakFL; RadioButton aLineBtn; RadioButton aColumnBtn; RadioButton aPageBtn; @@ -50,17 +51,16 @@ class SwBreakDlg: public SvxStandardDialog ListBox aPageCollBox; CheckBox aPageNumBox; NumericField aPageNumEdit; - FixedLine aBreakFL; OKButton aOkBtn; CancelButton aCancelBtn; HelpButton aHelpBtn; String aTemplate; - USHORT nKind; - USHORT nPgNum; + sal_uInt16 nKind; + sal_uInt16 nPgNum; - BOOL bHtmlMode; + sal_Bool bHtmlMode; DECL_LINK( ClickHdl, void * ); DECL_LINK( PageNumHdl, CheckBox * ); @@ -77,8 +77,8 @@ public: ~SwBreakDlg(); String GetTemplateName() { return aTemplate; } - USHORT GetKind() { return nKind; } - USHORT GetPageNumber() { return nPgNum; } + sal_uInt16 GetKind() { return nKind; } + sal_uInt16 GetPageNumber() { return nPgNum; } }; #endif diff --git a/sw/source/ui/inc/caption.hxx b/sw/source/ui/inc/caption.hxx index c60fa6178d..16e0a2c772 100644 --- a/sw/source/ui/inc/caption.hxx +++ b/sw/source/ui/inc/caption.hxx @@ -36,29 +36,29 @@ class SW_DLLPUBLIC InsCaptionOpt { private: - BOOL bUseCaption; + sal_Bool bUseCaption; SwCapObjType eObjType; SvGlobalName aOleId; String sCategory; - USHORT nNumType; + sal_uInt16 nNumType; ::rtl::OUString sNumberSeparator; String sCaption; - USHORT nPos; - USHORT nLevel; + sal_uInt16 nPos; + sal_uInt16 nLevel; // sal_Unicode cSeparator; String sSeparator; String sCharacterStyle; - BOOL bIgnoreSeqOpts; // wird nicht gespeichert - BOOL bCopyAttributes; // -""- + sal_Bool bIgnoreSeqOpts; // wird nicht gespeichert + sal_Bool bCopyAttributes; // -""- public: InsCaptionOpt(const SwCapObjType eType = FRAME_CAP, const SvGlobalName* pOleId = 0); InsCaptionOpt(const InsCaptionOpt&); ~InsCaptionOpt(); - inline BOOL& UseCaption() { return bUseCaption; } - inline BOOL UseCaption() const { return bUseCaption; } + inline sal_Bool& UseCaption() { return bUseCaption; } + inline sal_Bool UseCaption() const { return bUseCaption; } inline SwCapObjType GetObjType() const { return eObjType; } inline void SetObjType(const SwCapObjType eType) { eObjType = eType; } @@ -69,8 +69,8 @@ public: inline const String& GetCategory() const { return sCategory; } inline void SetCategory(const String& rCat) { sCategory = rCat; } - inline USHORT GetNumType() const { return nNumType; } - inline void SetNumType(const USHORT nNT) { nNumType = nNT; } + inline sal_uInt16 GetNumType() const { return nNumType; } + inline void SetNumType(const sal_uInt16 nNT) { nNumType = nNT; } const ::rtl::OUString& GetNumSeparator() const { return sNumberSeparator; } void SetNumSeparator(const ::rtl::OUString& rSet) {sNumberSeparator = rSet;} @@ -78,11 +78,11 @@ public: inline const String& GetCaption() const { return sCaption; } inline void SetCaption(const String& rCap) { sCaption = rCap; } - inline USHORT GetPos() const { return nPos; } - inline void SetPos(const USHORT nP) { nPos = nP; } + inline sal_uInt16 GetPos() const { return nPos; } + inline void SetPos(const sal_uInt16 nP) { nPos = nP; } - inline USHORT GetLevel() const { return nLevel; } - inline void SetLevel(const USHORT nLvl) { nLevel = nLvl; } + inline sal_uInt16 GetLevel() const { return nLevel; } + inline void SetLevel(const sal_uInt16 nLvl) { nLevel = nLvl; } // inline sal_Unicode GetSeparator() const { return cSeparator; } // inline void SetSeparator(const sal_Unicode cSep){ cSeparator = cSep; } @@ -93,15 +93,15 @@ public: void SetCharacterStyle(const String& rStyle) { sCharacterStyle = rStyle; } - inline BOOL& IgnoreSeqOpts() { return bIgnoreSeqOpts; } - inline BOOL IgnoreSeqOpts() const { return bIgnoreSeqOpts; } + inline sal_Bool& IgnoreSeqOpts() { return bIgnoreSeqOpts; } + inline sal_Bool IgnoreSeqOpts() const { return bIgnoreSeqOpts; } - inline BOOL& CopyAttributes() { return bCopyAttributes; } - inline BOOL CopyAttributes() const { return bCopyAttributes; } + inline sal_Bool& CopyAttributes() { return bCopyAttributes; } + inline sal_Bool CopyAttributes() const { return bCopyAttributes; } - BOOL operator==( const InsCaptionOpt& rOpt ) const; + sal_Bool operator==( const InsCaptionOpt& rOpt ) const; InsCaptionOpt& operator= ( const InsCaptionOpt& rOpt ); - inline BOOL operator< ( const InsCaptionOpt & rObj ) const + inline sal_Bool operator< ( const InsCaptionOpt & rObj ) const { return aOleId < rObj.aOleId; } // friend SvStream& operator>>( SvStream& rIStream, InsCaptionOpt& rCapOpt ); // friend SvStream& operator<<( SvStream& rOStream, const InsCaptionOpt& rCapOpt ); diff --git a/sw/source/ui/inc/cfgdesc.hxx b/sw/source/ui/inc/cfgdesc.hxx index 6ffab5c21c..e93d5135fd 100644 --- a/sw/source/ui/inc/cfgdesc.hxx +++ b/sw/source/ui/inc/cfgdesc.hxx @@ -35,25 +35,25 @@ class SwCfgDesc protected: String aFuncText; String aLibName; - USHORT nEvent; + sal_uInt16 nEvent; - SwCfgDesc(const String &rFuncName, USHORT nId); + SwCfgDesc(const String &rFuncName, sal_uInt16 nId); SwCfgDesc(const String &rLib,const String &rMacro); ~SwCfgDesc(); public: - void SetEvent(USHORT nE); // inline + void SetEvent(sal_uInt16 nE); // inline void SetFuncText(const String &rStr); // inline void SetMacro(const String &rLib, const String &rMac); - BOOL IsMacro() const; - USHORT GetEvent() const; // inline + sal_Bool IsMacro() const; + sal_uInt16 GetEvent() const; // inline String GetFuncText() const; // inline String GetMacro() const; // inline String GetLib() const; // inline }; // INLINE METHODE -------------------------------------------------------- -inline void SwCfgDesc::SetEvent(USHORT nE) { +inline void SwCfgDesc::SetEvent(sal_uInt16 nE) { nEvent = nE; } @@ -61,7 +61,7 @@ inline void SwCfgDesc::SetFuncText(const String &rStr) { aFuncText = rStr; } -inline USHORT SwCfgDesc::GetEvent() const { return nEvent; } +inline sal_uInt16 SwCfgDesc::GetEvent() const { return nEvent; } inline String SwCfgDesc::GetFuncText() const { return aFuncText; } inline String SwCfgDesc::GetMacro() const { return aFuncText; } inline String SwCfgDesc::GetLib() const { return aLibName; } diff --git a/sw/source/ui/inc/cfgitems.hxx b/sw/source/ui/inc/cfgitems.hxx index 5ce83a95fc..25aa2962da 100644 --- a/sw/source/ui/inc/cfgitems.hxx +++ b/sw/source/ui/inc/cfgitems.hxx @@ -60,26 +60,26 @@ class SW_DLLPUBLIC SwDocDisplayItem : public SfxPoolItem friend class SwShdwCrsrOptionsTabPage; friend class SwModule; - BOOL bParagraphEnd :1; - BOOL bTab :1; - BOOL bSpace :1; - BOOL bNonbreakingSpace :1; - BOOL bSoftHyphen :1; - BOOL bCharHiddenText :1; - BOOL bFldHiddenText :1; - BOOL bManualBreak :1; - BOOL bShowHiddenPara :1; + sal_Bool bParagraphEnd :1; + sal_Bool bTab :1; + sal_Bool bSpace :1; + sal_Bool bNonbreakingSpace :1; + sal_Bool bSoftHyphen :1; + sal_Bool bCharHiddenText :1; + sal_Bool bFldHiddenText :1; + sal_Bool bManualBreak :1; + sal_Bool bShowHiddenPara :1; Color aIndexBackgrndCol; public: TYPEINFO(); - SwDocDisplayItem( USHORT nWhich = FN_PARAM_DOCDISP ); + SwDocDisplayItem( sal_uInt16 nWhich = FN_PARAM_DOCDISP ); SwDocDisplayItem( const SwDocDisplayItem& rSwDocDisplayItem ); SwDocDisplayItem( const SwViewOption& rVOpt, - USHORT nWhich ); + sal_uInt16 nWhich ); virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; @@ -94,31 +94,31 @@ Item fuer Einstellungsdialog, Elementeseite class SW_DLLPUBLIC SwElemItem : public SfxPoolItem { //view - BOOL bHorzScrollbar :1; - BOOL bVertScrollbar :1; - BOOL bAnyRuler : 1; - BOOL bHorzRuler :1; - BOOL bVertRuler :1; - BOOL bVertRulerRight:1; - BOOL bSmoothScroll :1; + sal_Bool bHorzScrollbar :1; + sal_Bool bVertScrollbar :1; + sal_Bool bAnyRuler : 1; + sal_Bool bHorzRuler :1; + sal_Bool bVertRuler :1; + sal_Bool bVertRulerRight:1; + sal_Bool bSmoothScroll :1; //visual aids - BOOL bCrosshair :1; - BOOL bHandles :1; - BOOL bBigHandles :1; + sal_Bool bCrosshair :1; + sal_Bool bHandles :1; + sal_Bool bBigHandles :1; //display - BOOL bTable :1; - BOOL bGraphic :1; - BOOL bDrawing :1; - BOOL bFieldName :1; - BOOL bNotes :1; + sal_Bool bTable :1; + sal_Bool bGraphic :1; + sal_Bool bDrawing :1; + sal_Bool bFieldName :1; + sal_Bool bNotes :1; friend class SwContentOptPage; public: TYPEINFO(); - SwElemItem( USHORT nWhich = FN_PARAM_ELEM ); + SwElemItem( sal_uInt16 nWhich = FN_PARAM_ELEM ); SwElemItem(const SwElemItem& rElemItem); - SwElemItem(const SwViewOption& rVOpt, USHORT nWhich); + SwElemItem(const SwViewOption& rVOpt, sal_uInt16 nWhich); virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; @@ -140,8 +140,8 @@ class SW_DLLPUBLIC SwAddPrinterItem : public SfxPoolItem, public SwPrintData public: TYPEINFO(); - SwAddPrinterItem( USHORT nWhich = FN_PARAM_ADDPRINTER ); - SwAddPrinterItem( USHORT nWhich, const SwPrintData& rPrtData ); + SwAddPrinterItem( sal_uInt16 nWhich = FN_PARAM_ADDPRINTER ); + SwAddPrinterItem( sal_uInt16 nWhich, const SwPrintData& rPrtData ); SwAddPrinterItem( const SwAddPrinterItem& rAddPrinterItem); virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; @@ -152,27 +152,27 @@ public: void SetFax( const String& rFax) { sFaxName = rFax; } - BOOL IsPrintProspect() const { return bPrintProspect; } - BOOL IsPrintProspectRTL() const { return bPrintProspectRTL; } - void SetPrintProspect(BOOL bFlag ){ bPrintProspect = bFlag; } - void SetPrintProspectRTL(BOOL bFlag ){ bPrintProspectRTL = bFlag; } - BOOL IsPrintGraphic () const { return bPrintGraphic; } - BOOL IsPrintTable () const { return bPrintTable; } - BOOL IsPrintDraw () const { return bPrintDraw; } - BOOL IsPrintControl () const { return bPrintControl; } - BOOL IsPrintLeftPage () const { return bPrintLeftPages; } - BOOL IsPrintRightPage() const { return bPrintRightPages; } - BOOL IsPrintReverse () const { return bPrintReverse; } - BOOL IsPaperFromSetup() const { return bPaperFromSetup; } - BOOL IsPrintEmptyPages() const { return bPrintEmptyPages; } - BOOL IsPrintPageBackground() const { return bPrintPageBackground; } - BOOL IsPrintBlackFont() const { return bPrintBlackFont; } + sal_Bool IsPrintProspect() const { return bPrintProspect; } + sal_Bool IsPrintProspectRTL() const { return bPrintProspectRTL; } + void SetPrintProspect(sal_Bool bFlag ){ bPrintProspect = bFlag; } + void SetPrintProspectRTL(sal_Bool bFlag ){ bPrintProspectRTL = bFlag; } + sal_Bool IsPrintGraphic () const { return bPrintGraphic; } + sal_Bool IsPrintTable () const { return bPrintTable; } + sal_Bool IsPrintDraw () const { return bPrintDraw; } + sal_Bool IsPrintControl () const { return bPrintControl; } + sal_Bool IsPrintLeftPage () const { return bPrintLeftPages; } + sal_Bool IsPrintRightPage() const { return bPrintRightPages; } + sal_Bool IsPrintReverse () const { return bPrintReverse; } + sal_Bool IsPaperFromSetup() const { return bPaperFromSetup; } + sal_Bool IsPrintEmptyPages() const { return bPrintEmptyPages; } + sal_Bool IsPrintPageBackground() const { return bPrintPageBackground; } + sal_Bool IsPrintBlackFont() const { return bPrintBlackFont; } //#i81434# - printing of hidden text sal_Bool IsPrintHiddenText() const { return bPrintHiddenText; } sal_Bool IsPrintTextPlaceholder() const { return bPrintTextPlaceholder; } - BOOL IsPrintSingleJobs() const { return bPrintSingleJobs; } - ULONG GetPrintPostIts () const { return nPrintPostIts; } + sal_Bool IsPrintSingleJobs() const { return bPrintSingleJobs; } + sal_uLong GetPrintPostIts () const { return nPrintPostIts; } }; @@ -181,13 +181,13 @@ Item fuer Einstellungsdialog, ShadowCursorSeite --------------------------------------------------------- */ class SW_DLLPUBLIC SwShadowCursorItem : public SfxPoolItem { - BYTE eMode; - BOOL bOn; + sal_uInt8 eMode; + sal_Bool bOn; public: TYPEINFO(); - SwShadowCursorItem( USHORT nWhich = FN_PARAM_SHADOWCURSOR ); + SwShadowCursorItem( sal_uInt16 nWhich = FN_PARAM_SHADOWCURSOR ); SwShadowCursorItem( const SwShadowCursorItem& rElemItem ); - SwShadowCursorItem( const SwViewOption& rVOpt, USHORT nWhich ); + SwShadowCursorItem( const SwViewOption& rVOpt, sal_uInt16 nWhich ); virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; @@ -196,11 +196,11 @@ public: void FillViewOptions( SwViewOption& rVOpt) const; - BYTE GetMode() const { return eMode; } - BOOL IsOn() const { return bOn; } + sal_uInt8 GetMode() const { return eMode; } + sal_Bool IsOn() const { return bOn; } - void SetMode( BYTE eM ) { eMode = eM; } - void SetOn( BOOL bFlag ) { bOn = bFlag; } + void SetMode( sal_uInt8 eM ) { eMode = eM; } + void SetOn( sal_Bool bFlag ) { bOn = bFlag; } }; #if OSL_DEBUG_LEVEL > 1 @@ -215,19 +215,19 @@ class SW_DLLPUBLIC SwTestItem : public SfxPoolItem friend class SwTestTabPage; friend class SwDocEditDialog; - BOOL bTest1:1; - BOOL bTest2:1; - BOOL bTest3:1; - BOOL bTest4:1; - BOOL bTest5:1; - BOOL bTest6:1; - BOOL bTest7:1; - BOOL bTest8:1; - BOOL bTest9:1; - BOOL bTest10:1; + sal_Bool bTest1:1; + sal_Bool bTest2:1; + sal_Bool bTest3:1; + sal_Bool bTest4:1; + sal_Bool bTest5:1; + sal_Bool bTest6:1; + sal_Bool bTest7:1; + sal_Bool bTest8:1; + sal_Bool bTest9:1; + sal_Bool bTest10:1; public: - SwTestItem( USHORT _nWhich): + SwTestItem( sal_uInt16 _nWhich): SfxPoolItem(_nWhich){}; SwTestItem( const SwTestItem& pTestItem); diff --git a/sw/source/ui/inc/chldwrap.hxx b/sw/source/ui/inc/chldwrap.hxx index f034948def..a7ff87fc54 100644 --- a/sw/source/ui/inc/chldwrap.hxx +++ b/sw/source/ui/inc/chldwrap.hxx @@ -42,10 +42,10 @@ class SwChildWinWrapper : public SfxChildWindow // Implementation in fldtdlg.cxx protected: - SwChildWinWrapper(Window *pParentWindow, USHORT nId); + SwChildWinWrapper(Window *pParentWindow, sal_uInt16 nId); public: - virtual BOOL ReInitDlg(SwDocShell *pDocSh); + virtual sal_Bool ReInitDlg(SwDocShell *pDocSh); inline SwDocShell* GetOldDocShell() { return m_pDocSh; } inline void SetOldDocShell(SwDocShell *pDcSh) { m_pDocSh = pDcSh; } diff --git a/sw/source/ui/inc/chrdlg.hxx b/sw/source/ui/inc/chrdlg.hxx index 5b73196070..55b853047b 100644 --- a/sw/source/ui/inc/chrdlg.hxx +++ b/sw/source/ui/inc/chrdlg.hxx @@ -51,15 +51,15 @@ class SvxMacroItem; class SwCharDlg: public SfxTabDialog { SwView& rView; - BOOL bIsDrwTxtMode; + sal_Bool bIsDrwTxtMode; public: SwCharDlg(Window* pParent, SwView& pVw, const SfxItemSet& rCoreSet, - const String* pFmtStr = 0, BOOL bIsDrwTxtDlg = FALSE); + const String* pFmtStr = 0, sal_Bool bIsDrwTxtDlg = sal_False); ~SwCharDlg(); - virtual void PageCreated( USHORT nId, SfxTabPage &rPage ); + virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage ); }; /*-----------------14.08.96 11.03------------------- @@ -87,7 +87,7 @@ class SwCharURLPage : public SfxTabPage ListBox aNotVisitedLB; SvxMacroItem* pINetItem; - BOOL bModified; + sal_Bool bModified; DECL_LINK( InsertFileHdl, PushButton * ); DECL_LINK( EventHdl, PushButton * ); @@ -100,7 +100,7 @@ public: static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet); - virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual sal_Bool FillItemSet( SfxItemSet& rSet ); virtual void Reset( const SfxItemSet& rSet ); }; diff --git a/sw/source/ui/inc/cnttab.hxx b/sw/source/ui/inc/cnttab.hxx index 671fdd4856..4343efd2f3 100644 --- a/sw/source/ui/inc/cnttab.hxx +++ b/sw/source/ui/inc/cnttab.hxx @@ -55,17 +55,17 @@ struct CurTOXType { TOXTypes eType; - USHORT nIndex; //for TOX_USER only + sal_uInt16 nIndex; //for TOX_USER only - BOOL operator==(const CurTOXType aCmp) + sal_Bool operator==(const CurTOXType aCmp) { return eType == aCmp.eType && nIndex == aCmp.nIndex; } - USHORT GetFlatIndex() const; + sal_uInt16 GetFlatIndex() const; CurTOXType () : eType (TOX_INDEX), nIndex (0) {}; - CurTOXType (TOXTypes t, USHORT i) : eType (t), nIndex (i) {}; + CurTOXType (TOXTypes t, sal_uInt16 i) : eType (t), nIndex (i) {}; }; class SwOLENames : public Resource diff --git a/sw/source/ui/inc/colex.hxx b/sw/source/ui/inc/colex.hxx index ce4aac9a2f..2e95573372 100644 --- a/sw/source/ui/inc/colex.hxx +++ b/sw/source/ui/inc/colex.hxx @@ -55,8 +55,8 @@ class SW_DLLPUBLIC SwPageGridExample : public SwPageExample sal_Bool m_bVertical; protected: virtual void DrawPage( const Point& rPoint, - const BOOL bSecond, - const BOOL bEnabled ); + const sal_Bool bSecond, + const sal_Bool bEnabled ); public: SwPageGridExample(Window* pPar, const ResId& rResId ) : SwPageExample(pPar, rResId ), @@ -74,8 +74,8 @@ class SW_DLLPUBLIC SwColExample : public SwPageExample protected: virtual void DrawPage( const Point& rPoint, - const BOOL bSecond, - const BOOL bEnabled ); + const sal_Bool bSecond, + const sal_Bool bEnabled ); public: SwColExample(Window* pPar, const ResId& rResId ) : diff --git a/sw/source/ui/inc/colmgr.hxx b/sw/source/ui/inc/colmgr.hxx index 6c96475a20..2488d270e2 100644 --- a/sw/source/ui/inc/colmgr.hxx +++ b/sw/source/ui/inc/colmgr.hxx @@ -31,33 +31,33 @@ #include "swdllapi.h" #include <fmtclds.hxx> -SW_DLLPUBLIC void FitToActualSize(SwFmtCol& rCol, USHORT nWidth); +SW_DLLPUBLIC void FitToActualSize(SwFmtCol& rCol, sal_uInt16 nWidth); class SW_DLLPUBLIC SwColMgr { public: // lActWidth wird aus den Edits des Seitendialogs // direkt uebergeben - SwColMgr(const SfxItemSet &rSet, USHORT nActWidth = USHRT_MAX); + SwColMgr(const SfxItemSet &rSet, sal_uInt16 nActWidth = USHRT_MAX); ~SwColMgr(); - inline USHORT GetCount() const; - void SetCount(USHORT nCount, USHORT nGutterWidth); - USHORT GetGutterWidth(USHORT nPos = USHRT_MAX) const; - void SetGutterWidth(USHORT nWidth, USHORT nPos = USHRT_MAX); + inline sal_uInt16 GetCount() const; + void SetCount(sal_uInt16 nCount, sal_uInt16 nGutterWidth); + sal_uInt16 GetGutterWidth(sal_uInt16 nPos = USHRT_MAX) const; + void SetGutterWidth(sal_uInt16 nWidth, sal_uInt16 nPos = USHRT_MAX); - USHORT GetColWidth(USHORT nIdx) const; - void SetColWidth(USHORT nIdx, USHORT nWidth); + sal_uInt16 GetColWidth(sal_uInt16 nIdx) const; + void SetColWidth(sal_uInt16 nIdx, sal_uInt16 nWidth); - inline BOOL IsAutoWidth() const; - void SetAutoWidth(BOOL bOn = TRUE, USHORT lGutterWidth = 0); + inline sal_Bool IsAutoWidth() const; + void SetAutoWidth(sal_Bool bOn = sal_True, sal_uInt16 lGutterWidth = 0); - inline BOOL HasLine() const; + inline sal_Bool HasLine() const; inline void SetNoLine(); - inline void SetLineWidthAndColor(ULONG nWidth, const Color& rCol); - inline ULONG GetLineWidth() const; + inline void SetLineWidthAndColor(sal_uLong nWidth, const Color& rCol); + inline sal_uLong GetLineWidth() const; inline const Color& GetLineColor() const; inline SwColLineAdj GetAdjust() const; @@ -71,29 +71,28 @@ public: const SwFmtCol& GetColumns() const { return aFmtCol; } - void SetActualWidth(USHORT nW); - USHORT GetActualSize() const { return nWidth; } + void SetActualWidth(sal_uInt16 nW); + sal_uInt16 GetActualSize() const { return nWidth; } private: SwFmtCol aFmtCol; - USHORT nWidth; + sal_uInt16 nWidth; }; // INLINE METHODE -------------------------------------------------------- -inline USHORT SwColMgr::GetCount() const +inline sal_uInt16 SwColMgr::GetCount() const { return aFmtCol.GetNumCols(); } -inline void SwColMgr::SetLineWidthAndColor(ULONG nLWidth, const Color& rCol) +inline void SwColMgr::SetLineWidthAndColor(sal_uLong nLWidth, const Color& rCol) { aFmtCol.SetLineWidth(nLWidth); aFmtCol.SetLineColor(rCol); } - -inline ULONG SwColMgr::GetLineWidth() const +inline sal_uLong SwColMgr::GetLineWidth() const { return aFmtCol.GetLineWidth(); } @@ -112,13 +111,11 @@ inline void SwColMgr::SetAdjust(SwColLineAdj eAdj) { aFmtCol.SetLineAdj(eAdj); } - -inline BOOL SwColMgr::IsAutoWidth() const +inline sal_Bool SwColMgr::IsAutoWidth() const { return aFmtCol.IsOrtho(); } - -inline void SwColMgr::SetAutoWidth(BOOL bOn, USHORT nGutterWidth) +inline void SwColMgr::SetAutoWidth(sal_Bool bOn, sal_uInt16 nGutterWidth) { aFmtCol.SetOrtho(bOn, nGutterWidth, nWidth); } @@ -127,8 +124,7 @@ inline void SwColMgr::NoCols() { aFmtCol.GetColumns().DeleteAndDestroy(0, aFmtCol.GetColumns().Count()); } - -inline BOOL SwColMgr::HasLine() const +inline sal_Bool SwColMgr::HasLine() const { return GetAdjust() != COLADJ_NONE; } diff --git a/sw/source/ui/inc/column.hxx b/sw/source/ui/inc/column.hxx index 7f5cb000b1..436fad884e 100644 --- a/sw/source/ui/inc/column.hxx +++ b/sw/source/ui/inc/column.hxx @@ -37,7 +37,7 @@ #include <vcl/lstbox.hxx> #include <vcl/button.hxx> #include <vcl/timer.hxx> -#include <vcl/imagebtn.hxx> +#include <vcl/button.hxx> #include <svtools/ctrlbox.hxx> #include <svtools/valueset.hxx> #include <sfx2/basedlgs.hxx> @@ -71,10 +71,10 @@ class SwColumnDlg : public SfxModalDialog long nSelectionWidth; long nPageWidth; - BOOL bPageChanged : 1; - BOOL bSectionChanged : 1; - BOOL bSelSectionChanged : 1; - BOOL bFrameChanged : 1; + sal_Bool bPageChanged : 1; + sal_Bool bSectionChanged : 1; + sal_Bool bSelSectionChanged : 1; + sal_Bool bFrameChanged : 1; DECL_LINK(ObjectHdl, ListBox*); @@ -103,13 +103,14 @@ class ColumnValueSet : public ValueSet --------------------------------------------------------------------*/ class SwColumnPage : public SfxTabPage { + FixedLine aFLGroup; FixedText aClNrLbl; NumericField aCLNrEdt; ColumnValueSet aDefaultVS; ImageList aPreColsIL; CheckBox aBalanceColsCB; - FixedLine aFLGroup; + FixedLine aFLLayout; ImageButton aBtnUp; FixedText aColumnFT; FixedText aWidthFT; @@ -125,15 +126,14 @@ class SwColumnPage : public SfxTabPage ImageButton aBtnDown; CheckBox aAutoWidthBox; - FixedLine aFLLayout; + FixedLine aFLLineType; FixedText aLineTypeLbl; LineListBox aLineTypeDLB; FixedText aLineHeightLbl; MetricField aLineHeightEdit; FixedText aLinePosLbl; ListBox aLinePosDLB; - FixedLine aFLLineType; FixedLine aVertFL; FixedLine aPropertiesFL; @@ -146,16 +146,16 @@ class SwColumnPage : public SfxTabPage SwColMgr* pColMgr; - USHORT nFirstVis; - USHORT nCols; + sal_uInt16 nFirstVis; + sal_uInt16 nCols; long nColWidth[nMaxCols]; long nColDist[nMaxCols]; - USHORT nMinWidth; + sal_uInt16 nMinWidth; PercentField *pModifiedField; - BOOL bFormat; - BOOL bFrm; - BOOL bHtmlMode; - BOOL bLockUpdate; + sal_Bool bFormat; + sal_Bool bFrm; + sal_Bool bHtmlMode; + sal_Bool bLockUpdate; // Handler DECL_LINK( ColModify, NumericField * ); @@ -174,7 +174,7 @@ class SwColumnPage : public SfxTabPage void UpdateCols(); void Init(); void ResetColWidth(); - void SetLabels( USHORT nVis ); + void SetLabels( sal_uInt16 nVis ); using SfxTabPage::ActivatePage; using SfxTabPage::DeactivatePage; @@ -188,18 +188,18 @@ public: virtual ~SwColumnPage(); static SfxTabPage *Create(Window *pParent, const SfxItemSet &rSet); - static USHORT* GetRanges(); + static sal_uInt16* GetRanges(); - virtual BOOL FillItemSet(SfxItemSet &rSet); + virtual sal_Bool FillItemSet(SfxItemSet &rSet); virtual void Reset(const SfxItemSet &rSet); - void SetFrmMode(BOOL bMod); + void SetFrmMode(sal_Bool bMod); void SetPageWidth(long nPageWidth); - void SetFormatUsed(BOOL bFmt) { bFormat = bFmt; } + void SetFormatUsed(sal_Bool bFmt) { bFormat = bFmt; } - void ShowBalance(BOOL bShow) {aBalanceColsCB.Show(bShow);} - void SetInSection(BOOL bSet); + void ShowBalance(sal_Bool bShow) {aBalanceColsCB.Show(bShow);} + void SetInSection(sal_Bool bSet); void ActivateColumnControl() {aCLNrEdt.GrabFocus();} }; diff --git a/sw/source/ui/inc/conarc.hxx b/sw/source/ui/inc/conarc.hxx index e1e6666e25..56204a2a41 100644 --- a/sw/source/ui/inc/conarc.hxx +++ b/sw/source/ui/inc/conarc.hxx @@ -39,16 +39,16 @@ class ConstArc : public SwDrawBase { Point aStartPnt; - UINT16 nAnzButUp; + sal_uInt16 nAnzButUp; public: ConstArc(SwWrtShell* pSh, SwEditWin* pWin, SwView* pView); // Mouse- & Key-Events - virtual BOOL MouseButtonUp(const MouseEvent& rMEvt); - virtual BOOL MouseButtonDown(const MouseEvent& rMEvt); + virtual sal_Bool MouseButtonUp(const MouseEvent& rMEvt); + virtual sal_Bool MouseButtonDown(const MouseEvent& rMEvt); - virtual void Activate(const USHORT nSlotId); // Funktion aktivieren + virtual void Activate(const sal_uInt16 nSlotId); // Funktion aktivieren virtual void Deactivate(); }; diff --git a/sw/source/ui/inc/concustomshape.hxx b/sw/source/ui/inc/concustomshape.hxx index 36abb80ca3..e2dd43bb46 100644 --- a/sw/source/ui/inc/concustomshape.hxx +++ b/sw/source/ui/inc/concustomshape.hxx @@ -53,10 +53,10 @@ class ConstCustomShape : public SwDrawBase ConstCustomShape( SwWrtShell* pSh, SwEditWin* pWin, SwView* pView, SfxRequest& rReq ); // Mouse- & Key-Events - virtual BOOL MouseButtonUp(const MouseEvent& rMEvt); - virtual BOOL MouseButtonDown(const MouseEvent& rMEvt); + virtual sal_Bool MouseButtonUp(const MouseEvent& rMEvt); + virtual sal_Bool MouseButtonDown(const MouseEvent& rMEvt); - virtual void Activate(const USHORT nSlotId); // Function aktivieren + virtual void Activate(const sal_uInt16 nSlotId); // Function aktivieren rtl::OUString GetShapeType() const; static rtl::OUString GetShapeTypeFromRequest( SfxRequest& rReq ); diff --git a/sw/source/ui/inc/condedit.hxx b/sw/source/ui/inc/condedit.hxx index f44514eca3..aa4014f025 100644 --- a/sw/source/ui/inc/condedit.hxx +++ b/sw/source/ui/inc/condedit.hxx @@ -34,7 +34,7 @@ class SW_DLLPUBLIC ConditionEdit : public Edit, public DropTargetHelper { - BOOL bBrackets, bEnableDrop; + sal_Bool bBrackets, bEnableDrop; SW_DLLPRIVATE virtual sal_Int8 AcceptDrop( const AcceptDropEvent& rEvt ); SW_DLLPRIVATE virtual sal_Int8 ExecuteDrop( const ExecuteDropEvent& rEvt ); @@ -42,10 +42,10 @@ class SW_DLLPUBLIC ConditionEdit : public Edit, public DropTargetHelper public: ConditionEdit( Window* pParent, const ResId& rResId ); - inline void ShowBrackets(BOOL bShow) { bBrackets = bShow; } + inline void ShowBrackets(sal_Bool bShow) { bBrackets = bShow; } - inline void SetDropEnable( BOOL bFlag ) { bEnableDrop = bFlag; } - inline BOOL IsDropEnable() const { return bEnableDrop; } + inline void SetDropEnable( sal_Bool bFlag ) { bEnableDrop = bFlag; } + inline sal_Bool IsDropEnable() const { return bEnableDrop; } }; #endif diff --git a/sw/source/ui/inc/conform.hxx b/sw/source/ui/inc/conform.hxx index be9094af8b..28914d60eb 100644 --- a/sw/source/ui/inc/conform.hxx +++ b/sw/source/ui/inc/conform.hxx @@ -36,9 +36,9 @@ public: ConstFormControl(SwWrtShell* pSh, SwEditWin* pWin, SwView* pView); // Mouse- & Key-Events - virtual BOOL MouseButtonDown(const MouseEvent& rMEvt); + virtual sal_Bool MouseButtonDown(const MouseEvent& rMEvt); - virtual void Activate(const USHORT nSlotId); // Function aktivieren + virtual void Activate(const sal_uInt16 nSlotId); // Function aktivieren virtual void CreateDefaultObject(); }; diff --git a/sw/source/ui/inc/conpoly.hxx b/sw/source/ui/inc/conpoly.hxx index 124b51564c..bcfb77e31f 100644 --- a/sw/source/ui/inc/conpoly.hxx +++ b/sw/source/ui/inc/conpoly.hxx @@ -44,11 +44,11 @@ public: ConstPolygon(SwWrtShell* pSh, SwEditWin* pWin, SwView* pView); // Mouse- & Key-Events - virtual BOOL MouseMove(const MouseEvent& rMEvt); - virtual BOOL MouseButtonUp(const MouseEvent& rMEvt); - virtual BOOL MouseButtonDown(const MouseEvent& rMEvt); + virtual sal_Bool MouseMove(const MouseEvent& rMEvt); + virtual sal_Bool MouseButtonUp(const MouseEvent& rMEvt); + virtual sal_Bool MouseButtonDown(const MouseEvent& rMEvt); - virtual void Activate(const USHORT nSlotId); // Function aktivieren + virtual void Activate(const sal_uInt16 nSlotId); // Function aktivieren }; diff --git a/sw/source/ui/inc/conrect.hxx b/sw/source/ui/inc/conrect.hxx index 2694f7c3df..a5ef397315 100644 --- a/sw/source/ui/inc/conrect.hxx +++ b/sw/source/ui/inc/conrect.hxx @@ -39,8 +39,8 @@ class ConstRectangle : public SwDrawBase { - BOOL bMarquee; - BOOL bCapVertical; + sal_Bool bMarquee; + sal_Bool bCapVertical; // #93382# sal_Bool mbVertical; @@ -49,10 +49,10 @@ class ConstRectangle : public SwDrawBase ConstRectangle(SwWrtShell* pSh, SwEditWin* pWin, SwView* pView); // Mouse- & Key-Events - virtual BOOL MouseButtonUp(const MouseEvent& rMEvt); - virtual BOOL MouseButtonDown(const MouseEvent& rMEvt); + virtual sal_Bool MouseButtonUp(const MouseEvent& rMEvt); + virtual sal_Bool MouseButtonDown(const MouseEvent& rMEvt); - virtual void Activate(const USHORT nSlotId); // Function aktivieren + virtual void Activate(const sal_uInt16 nSlotId); // Function aktivieren }; diff --git a/sw/source/ui/inc/content.hxx b/sw/source/ui/inc/content.hxx index 3230f8ecb7..5c75666565 100644 --- a/sw/source/ui/inc/content.hxx +++ b/sw/source/ui/inc/content.hxx @@ -46,7 +46,7 @@ class SwRedline; class SwPopup : public PopupMenu { - USHORT nCurId; + sal_uInt16 nCurId; virtual void Select(){nCurId = GetCurItemId();} public: @@ -54,7 +54,7 @@ public: PopupMenu(), nCurId(USHRT_MAX){} - USHORT GetCurId() const { return nCurId; } + sal_uInt16 GetCurId() const { return nCurId; } }; @@ -62,38 +62,38 @@ public: class SwOutlineContent : public SwContent { - USHORT nOutlinePos; - BYTE nOutlineLevel; - BOOL bIsMoveable; + sal_uInt16 nOutlinePos; + sal_uInt8 nOutlineLevel; + sal_Bool bIsMoveable; public: SwOutlineContent( const SwContentType* pCnt, const String& rName, - USHORT nArrPos, - BYTE nLevel, - BOOL bMove, + sal_uInt16 nArrPos, + sal_uInt8 nLevel, + sal_Bool bMove, long nYPos) : SwContent(pCnt, rName, nYPos), nOutlinePos(nArrPos), nOutlineLevel(nLevel), bIsMoveable(bMove) {} - USHORT GetPos(){return nOutlinePos;} - BYTE GetOutlineLevel(){return nOutlineLevel;} - BOOL IsMoveable(){return bIsMoveable;}; + sal_uInt16 GetPos(){return nOutlinePos;} + sal_uInt8 GetOutlineLevel(){return nOutlineLevel;} + sal_Bool IsMoveable(){return bIsMoveable;}; }; //---------------------------------------------------------------------------- class SwRegionContent : public SwContent { - BYTE nRegionLevel; + sal_uInt8 nRegionLevel; public: SwRegionContent( const SwContentType* pCnt, const String& rName, - BYTE nLevel, + sal_uInt8 nLevel, long nYPos) : SwContent(pCnt, rName, nYPos), nRegionLevel(nLevel){} - BYTE GetRegionLevel() const {return nRegionLevel;} + sal_uInt8 GetRegionLevel() const {return nRegionLevel;} }; //---------------------------------------------------------------------------- @@ -111,7 +111,7 @@ public: : SwContent( pCnt, rName, nYPos ), sURL( rURL ), pINetAttr( pAttr ) {} - virtual BOOL IsProtect() const; + virtual sal_Bool IsProtect() const; const String& GetURL() { return sURL; } const SwTxtINetFmt* GetINetAttr() { return pINetAttr; } }; @@ -138,7 +138,7 @@ public: const SwFmtFld* GetPostIt() { return pFld; } SwRedline* GetRedline() { return pRedline; } - virtual BOOL IsProtect() const; + virtual sal_Bool IsProtect() const; bool IsPostIt() {return mbPostIt; } }; @@ -184,31 +184,31 @@ class SwContentType : public SwTypeNumber String sContentTypeName; // Name der Inhaltsform String sSingleContentTypeName; // Name der Inhaltsform, Singular String sTypeToken; // Anhaengsel fuer URL - USHORT nMemberCount; // Inhaltsanzahl - USHORT nContentType; // Id der Inhaltsform - BYTE nOutlineLevel; - BOOL bMemberFilled : 1; // wurden die Inhalte bereits eingefuegt? - BOOL bIsInternalDrag:1; // koennen die Inhalte verschoben werden? - BOOL bDataValid : 1; // - BOOL bEdit: 1; // kann diese Type bearbeitet werden ? - BOOL bDelete: 1; // kann diese Type geloescht werden ? + sal_uInt16 nMemberCount; // Inhaltsanzahl + sal_uInt16 nContentType; // Id der Inhaltsform + sal_uInt8 nOutlineLevel; + sal_Bool bMemberFilled : 1; // wurden die Inhalte bereits eingefuegt? + sal_Bool bIsInternalDrag:1; // koennen die Inhalte verschoben werden? + sal_Bool bDataValid : 1; // + sal_Bool bEdit: 1; // kann diese Type bearbeitet werden ? + sal_Bool bDelete: 1; // kann diese Type geloescht werden ? protected: void RemoveNewline(String&); public: - SwContentType(SwWrtShell* pParent, USHORT nType, BYTE nLevel ); + SwContentType(SwWrtShell* pParent, sal_uInt16 nType, sal_uInt8 nLevel ); ~SwContentType(); - void Init(BOOL* pbInvalidateWindow = 0); - void FillMemberList(BOOL* pbLevelChanged = NULL); - USHORT GetMemberCount() const + void Init(sal_Bool* pbInvalidateWindow = 0); + void FillMemberList(sal_Bool* pbLevelChanged = NULL); + sal_uInt16 GetMemberCount() const {return nMemberCount;}; - USHORT GetType() const {return nContentType;} - const SwContent* GetMember(USHORT nIndex); + sal_uInt16 GetType() const {return nContentType;} + const SwContent* GetMember(sal_uInt16 nIndex); const String& GetName() {return sContentTypeName;} const String& GetSingleName() const {return sSingleContentTypeName;} const String& GetTypeToken() const{return sTypeToken;} - void SetOutlineLevel(BYTE nNew) + void SetOutlineLevel(sal_uInt8 nNew) { nOutlineLevel = nNew; Invalidate(); @@ -216,8 +216,8 @@ public: void Invalidate(); // nur nMemberCount wird neu gelesen - BOOL IsEditable() const {return bEdit;} - BOOL IsDeletable() const {return bDelete;} + sal_Bool IsEditable() const {return bEdit;} + sal_Bool IsDeletable() const {return bDelete;} }; #endif diff --git a/sw/source/ui/inc/conttree.hxx b/sw/source/ui/inc/conttree.hxx index 89dd2e180a..f6e8468d4a 100644 --- a/sw/source/ui/inc/conttree.hxx +++ b/sw/source/ui/inc/conttree.hxx @@ -80,24 +80,24 @@ class SwContentTree : public SvTreeListBox std::map< void*, sal_Bool > mOutLineNodeMap; sal_Int32 nActiveBlock; - USHORT nHiddenBlock; - USHORT nRootType; - USHORT nLastSelType; - BYTE nOutlineLevel; - - BOOL bIsActive :1; - BOOL bIsConstant :1; - BOOL bIsHidden :1; - BOOL bDocChgdInDragging :1; - BOOL bIsInternalDrag :1; - BOOL bIsRoot :1; - BOOL bIsIdleClear :1; - BOOL bIsLastReadOnly :1; - BOOL bIsOutlineMoveable :1; - BOOL bViewHasChanged :1; - BOOL bIsImageListInitialized : 1; - - static BOOL bIsInDrag; + sal_uInt16 nHiddenBlock; + sal_uInt16 nRootType; + sal_uInt16 nLastSelType; + sal_uInt8 nOutlineLevel; + + sal_Bool bIsActive :1; + sal_Bool bIsConstant :1; + sal_Bool bIsHidden :1; + sal_Bool bDocChgdInDragging :1; + sal_Bool bIsInternalDrag :1; + sal_Bool bIsRoot :1; + sal_Bool bIsIdleClear :1; + sal_Bool bIsLastReadOnly :1; + sal_Bool bIsOutlineMoveable :1; + sal_Bool bViewHasChanged :1; + sal_Bool bIsImageListInitialized : 1; + + static sal_Bool bIsInDrag; void FindActiveTypeAndRemoveUserData(); @@ -123,41 +123,41 @@ protected: sal_Bool FillTransferData( TransferDataContainer& rTransfer, sal_Int8& rDragMode ); - BOOL HasContentChanged(); + sal_Bool HasContentChanged(); virtual DragDropMode NotifyStartDrag( TransferDataContainer& rData, SvLBoxEntry* ); - virtual BOOL NotifyAcceptDrop( SvLBoxEntry* ); + virtual sal_Bool NotifyAcceptDrop( SvLBoxEntry* ); - virtual BOOL NotifyMoving( SvLBoxEntry* pTarget, + virtual sal_Bool NotifyMoving( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry, SvLBoxEntry*& rpNewParent, - ULONG& rNewChildPos + sal_uLong& rNewChildPos ); - virtual BOOL NotifyCopying( SvLBoxEntry* pTarget, + virtual sal_Bool NotifyCopying( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry, SvLBoxEntry*& rpNewParent, - ULONG& rNewChildPos + sal_uLong& rNewChildPos ); virtual void MouseButtonDown( const MouseEvent& rMEvt ); - void EditEntry( SvLBoxEntry* pEntry, BYTE nMode ); + void EditEntry( SvLBoxEntry* pEntry, sal_uInt8 nMode ); void GotoContent(SwContent* pCnt); - static void SetInDrag(BOOL bSet) {bIsInDrag = bSet;} + static void SetInDrag(sal_Bool bSet) {bIsInDrag = bSet;} virtual PopupMenu* CreateContextMenu( void ); - virtual void ExcecuteContextMenuAction( USHORT nSelectedPopupEntry ); + virtual void ExcecuteContextMenuAction( sal_uInt16 nSelectedPopupEntry ); public: SwContentTree(Window* pParent, const ResId& rResId); ~SwContentTree(); - BOOL ToggleToRoot(); - BOOL IsRoot() const {return bIsRoot;} - USHORT GetRootType() const {return nRootType;} - void SetRootType(USHORT nType); - void Display( BOOL bActiveView ); + sal_Bool ToggleToRoot(); + sal_Bool IsRoot() const {return bIsRoot;} + sal_uInt16 GetRootType() const {return nRootType;} + void SetRootType(sal_uInt16 nType); + void Display( sal_Bool bActiveView ); void Clear(); void SetHiddenShell(SwWrtShell* pSh); void ShowHiddenShell(); @@ -170,26 +170,26 @@ public: pActiveShell : pHiddenShell;} - static BOOL IsInDrag() {return bIsInDrag;} - BOOL IsInternalDrag() const {return bIsInternalDrag != 0;} + static sal_Bool IsInDrag() {return bIsInDrag;} + sal_Bool IsInternalDrag() const {return bIsInternalDrag != 0;} sal_Int32 GetActiveBlock() const {return nActiveBlock;} - BYTE GetOutlineLevel()const {return nOutlineLevel;} - void SetOutlineLevel(BYTE nSet); + sal_uInt8 GetOutlineLevel()const {return nOutlineLevel;} + void SetOutlineLevel(sal_uInt8 nSet); - BOOL Expand( SvLBoxEntry* pParent ); + sal_Bool Expand( SvLBoxEntry* pParent ); - BOOL Collapse( SvLBoxEntry* pParent ); + sal_Bool Collapse( SvLBoxEntry* pParent ); - void ExecCommand(USHORT nCmd, BOOL bModifier); + void ExecCommand(sal_uInt16 nCmd, sal_Bool bModifier); void ShowTree(); void HideTree(); - BOOL IsConstantView() {return bIsConstant;} - BOOL IsActiveView() {return bIsActive;} - BOOL IsHiddenView() {return bIsHidden;} + sal_Bool IsConstantView() {return bIsConstant;} + sal_Bool IsActiveView() {return bIsActive;} + sal_Bool IsHiddenView() {return bIsHidden;} const SwWrtShell* GetActiveWrtShell() {return pActiveShell;} SwWrtShell* GetHiddenWrtShell() {return pHiddenShell;} @@ -202,7 +202,7 @@ public: virtual void GetFocus(); virtual void KeyInput(const KeyEvent& rKEvt); - virtual BOOL Select( SvLBoxEntry* pEntry, BOOL bSelect=TRUE ); + virtual sal_Bool Select( SvLBoxEntry* pEntry, sal_Bool bSelect=sal_True ); }; @@ -214,12 +214,12 @@ class SwLBoxString : public SvLBoxString { public: - SwLBoxString( SvLBoxEntry* pEntry, USHORT nFlags, + SwLBoxString( SvLBoxEntry* pEntry, sal_uInt16 nFlags, const String& rStr ) : SvLBoxString(pEntry,nFlags,rStr) { } - virtual void Paint( const Point& rPos, SvLBox& rDev, USHORT nFlags, + virtual void Paint( const Point& rPos, SvLBox& rDev, sal_uInt16 nFlags, SvLBoxEntry* pEntry); }; @@ -243,9 +243,9 @@ private: SwGlblDocContent* pDocContent; sfx2::DocumentInserter* pDocInserter; - BOOL bIsInternalDrag :1; - BOOL bLastEntryEmphasis :1; // Drag'n Drop - BOOL bIsImageListInitialized : 1; + sal_Bool bIsInternalDrag :1; + sal_Bool bLastEntryEmphasis :1; // Drag'n Drop + sal_Bool bIsImageListInitialized : 1; static const SfxObjectShell* pShowShell; @@ -269,22 +269,22 @@ protected: virtual void RequestHelp( const HelpEvent& rHEvt ); virtual long GetTabPos( SvLBoxEntry*, SvLBoxTab* ); - virtual BOOL NotifyMoving( SvLBoxEntry* pTarget, + virtual sal_Bool NotifyMoving( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry, SvLBoxEntry*& rpNewParent, - ULONG& rNewChildPos + sal_uLong& rNewChildPos ); - virtual BOOL NotifyCopying( SvLBoxEntry* pTarget, + virtual sal_Bool NotifyCopying( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry, SvLBoxEntry*& rpNewParent, - ULONG& rNewChildPos + sal_uLong& rNewChildPos ); virtual void StartDrag( sal_Int8 nAction, const Point& rPosPixel ); virtual void DragFinished( sal_Int8 ); virtual DragDropMode NotifyStartDrag( TransferDataContainer& rData, SvLBoxEntry* ); - virtual BOOL NotifyAcceptDrop( SvLBoxEntry* ); + virtual sal_Bool NotifyAcceptDrop( SvLBoxEntry* ); virtual void MouseButtonDown( const MouseEvent& rMEvt ); virtual void KeyInput(const KeyEvent& rKEvt); @@ -299,26 +299,26 @@ protected: DECL_LINK( Timeout, Timer* ); DECL_LINK( DoubleClickHdl, SwGlobalTree * ); - BOOL IsInternalDrag() const {return bIsInternalDrag != 0;} + sal_Bool IsInternalDrag() const {return bIsInternalDrag != 0;} SwNavigationPI* GetParentWindow() { return (SwNavigationPI*)Window::GetParent(); } void OpenDoc(const SwGlblDocContent*); void GotoContent(const SwGlblDocContent*); - USHORT GetEnableFlags() const; + sal_uInt16 GetEnableFlags() const; static const SfxObjectShell* GetShowShell() {return pShowShell;} static void SetShowShell(const SfxObjectShell*pSet) {pShowShell = pSet;} DECL_STATIC_LINK(SwGlobalTree, ShowFrameHdl, SwGlobalTree*); virtual PopupMenu* CreateContextMenu( void ); - virtual void ExcecuteContextMenuAction( USHORT nSelectedPopupEntry ); + virtual void ExcecuteContextMenuAction( sal_uInt16 nSelectedPopupEntry ); public: SwGlobalTree(Window* pParent, const ResId& rResId); virtual ~SwGlobalTree(); - void TbxMenuHdl(USHORT nTbxId, ToolBox* pBox); + void TbxMenuHdl(sal_uInt16 nTbxId, ToolBox* pBox); void InsertRegion( const SwGlblDocContent* pCont, const String* pFileName = 0 ); void EditContent(const SwGlblDocContent* pCont ); @@ -326,11 +326,11 @@ public: void ShowTree(); void HideTree(); - void ExecCommand(USHORT nCmd); + void ExecCommand(sal_uInt16 nCmd); - void Display(BOOL bOnlyUpdateUserData = FALSE); + void Display(sal_Bool bOnlyUpdateUserData = sal_False); - BOOL Update(BOOL bHard); + sal_Bool Update(sal_Bool bHard); }; #endif diff --git a/sw/source/ui/inc/dbinsdlg.hxx b/sw/source/ui/inc/dbinsdlg.hxx index a060c278cb..e299bff0ab 100644 --- a/sw/source/ui/inc/dbinsdlg.hxx +++ b/sw/source/ui/inc/dbinsdlg.hxx @@ -66,18 +66,18 @@ struct SwInsDBColumn sal_Int32 nDBNumFmt; sal_uInt32 nUsrNumFmt; LanguageType eUsrNumFmtLng; - USHORT nCol; - BOOL bHasFmt : 1; - BOOL bIsDBFmt : 1; + sal_uInt16 nCol; + sal_Bool bHasFmt : 1; + sal_Bool bIsDBFmt : 1; - SwInsDBColumn( const String& rStr, USHORT nColumn ) + SwInsDBColumn( const String& rStr, sal_uInt16 nColumn ) : sColumn( rStr ), nDBNumFmt( 0 ), nUsrNumFmt( 0 ), eUsrNumFmtLng( LANGUAGE_SYSTEM ), nCol( nColumn ), - bHasFmt(FALSE), - bIsDBFmt(TRUE) + bHasFmt(sal_False), + bIsDBFmt(sal_True) {} int operator==( const SwInsDBColumn& rCmp ) const @@ -143,7 +143,7 @@ class SwInsertDBColAutoPilot : public SfxModalDialog, public utl::ConfigItem SfxItemSet* pTblSet; SwTableRep* pRep; - USHORT nGBFmtLen; + sal_uInt16 nGBFmtLen; DECL_LINK( PageHdl, Button* ); DECL_LINK( AutoFmtHdl, PushButton* ); @@ -154,7 +154,7 @@ class SwInsertDBColAutoPilot : public SfxModalDialog, public utl::ConfigItem DECL_LINK( DblClickHdl, ListBox* ); DECL_LINK( HeaderHdl, Button* ); - BOOL SplitTextToColArr( const String& rTxt, _DB_Columns& rColArr, BOOL bInsField ); + sal_Bool SplitTextToColArr( const String& rTxt, _DB_Columns& rColArr, sal_Bool bInsField ); using SfxModalDialog::Notify; virtual void Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& aPropertyNames ); virtual void Commit(); diff --git a/sw/source/ui/inc/dbtree.hxx b/sw/source/ui/inc/dbtree.hxx index 8ab0c2c423..d5d73c3962 100644 --- a/sw/source/ui/inc/dbtree.hxx +++ b/sw/source/ui/inc/dbtree.hxx @@ -49,8 +49,8 @@ class SW_DLLPUBLIC SwDBTreeList : public SvTreeListBox Image aQueryBMP; String sDefDBName; - BOOL bInitialized; - BOOL bShowColumns; + sal_Bool bInitialized; + sal_Bool bShowColumns; SwDBTreeList_Impl* pImpl; @@ -68,15 +68,15 @@ public: SwDBTreeList( Window* pParent, const ResId& rResId, SwWrtShell* pSh, const String& rDefDBName = aEmptyStr, - const BOOL bShowCol = FALSE ); + const sal_Bool bShowCol = sal_False ); virtual ~SwDBTreeList(); - String GetDBName( String& rTableName, String& rColumnName, BOOL* pbIsTable = 0); + String GetDBName( String& rTableName, String& rColumnName, sal_Bool* pbIsTable = 0); void Select( const String& rDBName, const String& rTableName, const String& rColumnName ); - void ShowColumns(BOOL bShowCol); + void ShowColumns(sal_Bool bShowCol); void SetWrtShell(SwWrtShell& rSh); void AddDataSource(const String& rSource); diff --git a/sw/source/ui/inc/docfnote.hxx b/sw/source/ui/inc/docfnote.hxx index b8bffcc346..526ad17571 100644 --- a/sw/source/ui/inc/docfnote.hxx +++ b/sw/source/ui/inc/docfnote.hxx @@ -37,7 +37,7 @@ class SwFootNoteOptionDlg :public SfxTabDialog SwWrtShell &rSh; Link aOldOkHdl; - virtual void PageCreated( USHORT nId, SfxTabPage &rPage ); + virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage ); #ifdef _SOLAR__PRIVATE DECL_LINK( OkHdl, Button * ); diff --git a/sw/source/ui/inc/docstdlg.hxx b/sw/source/ui/inc/docstdlg.hxx index 388e12e753..ac5af01c14 100644 --- a/sw/source/ui/inc/docstdlg.hxx +++ b/sw/source/ui/inc/docstdlg.hxx @@ -47,28 +47,27 @@ public: static SfxTabPage *Create(Window *pParent, const SfxItemSet &rSet); protected: - virtual BOOL FillItemSet( SfxItemSet &rSet); + virtual sal_Bool FillItemSet( SfxItemSet &rSet); virtual void Reset (const SfxItemSet &rSet); DECL_LINK( UpdateHdl, PushButton*); private: - FixedText aTableLbl; - FixedText aGrfLbl; - FixedText aOLELbl; FixedText aPageLbl; - FixedText aParaLbl; - FixedText aWordLbl; - FixedText aCharLbl; - FixedText aLineLbl; - + FixedInfo aPageNo; + FixedText aTableLbl; FixedInfo aTableNo; + FixedText aGrfLbl; FixedInfo aGrfNo; + FixedText aOLELbl; FixedInfo aOLENo; - FixedInfo aPageNo; + FixedText aParaLbl; FixedInfo aParaNo; + FixedText aWordLbl; FixedInfo aWordNo; + FixedText aCharLbl; FixedInfo aCharNo; + FixedText aLineLbl; FixedInfo aLineNo; PushButton aUpdatePB; diff --git a/sw/source/ui/inc/drawbase.hxx b/sw/source/ui/inc/drawbase.hxx index 14df0b150e..47f7a2d11d 100644 --- a/sw/source/ui/inc/drawbase.hxx +++ b/sw/source/ui/inc/drawbase.hxx @@ -52,9 +52,9 @@ protected: SwEditWin* m_pWin; Point m_aStartPos; // Position von BeginCreate Point m_aMDPos; // Position von MouseButtonDown - USHORT m_nSlotId; - BOOL m_bCreateObj :1; - BOOL m_bInsForm :1; + sal_uInt16 m_nSlotId; + sal_Bool m_bCreateObj :1; + sal_Bool m_bInsForm :1; Point GetDefaultCenterPos(); public: @@ -63,20 +63,20 @@ public: void SetDrawPointer(); void EnterSelectMode(const MouseEvent& rMEvt); - inline BOOL IsInsertForm() const { return m_bInsForm; } - inline BOOL IsCreateObj() const { return m_bCreateObj; } + inline sal_Bool IsInsertForm() const { return m_bInsForm; } + inline sal_Bool IsCreateObj() const { return m_bCreateObj; } - // Mouse- & Key-Events; Returnwert=TRUE: Event wurde bearbeitet - virtual BOOL KeyInput(const KeyEvent& rKEvt); - virtual BOOL MouseMove(const MouseEvent& rMEvt); - virtual BOOL MouseButtonUp(const MouseEvent& rMEvt); - virtual BOOL MouseButtonDown(const MouseEvent& rMEvt); + // Mouse- & Key-Events; Returnwert=sal_True: Event wurde bearbeitet + virtual sal_Bool KeyInput(const KeyEvent& rKEvt); + virtual sal_Bool MouseMove(const MouseEvent& rMEvt); + virtual sal_Bool MouseButtonUp(const MouseEvent& rMEvt); + virtual sal_Bool MouseButtonDown(const MouseEvent& rMEvt); void BreakCreate(); - void SetSlotId(USHORT nSlot) {m_nSlotId = nSlot;} - USHORT GetSlotId() { return m_nSlotId;} + void SetSlotId(sal_uInt16 nSlot) {m_nSlotId = nSlot;} + sal_uInt16 GetSlotId() { return m_nSlotId;} - virtual void Activate(const USHORT nSlotId); // Function aktivieren + virtual void Activate(const sal_uInt16 nSlotId); // Function aktivieren virtual void Deactivate(); // Function deaktivieren virtual void CreateDefaultObject(); diff --git a/sw/source/ui/inc/drpcps.hxx b/sw/source/ui/inc/drpcps.hxx index ccf15d8da0..908fdeb7df 100644 --- a/sw/source/ui/inc/drpcps.hxx +++ b/sw/source/ui/inc/drpcps.hxx @@ -63,6 +63,7 @@ class SwDropCapsPage : public SfxTabPage { friend class SwDropCapsPict; + FixedLine aSettingsFL; CheckBox aDropCapsBox; CheckBox aWholeWordCB; FixedText aSwitchText; @@ -71,19 +72,18 @@ friend class SwDropCapsPict; NumericField aLinesField; FixedText aDistanceText; MetricField aDistanceField; - FixedLine aSettingsFL; + FixedLine aContentFL; FixedText aTextText; Edit aTextEdit; FixedText aTemplateText; ListBox aTemplateBox; - FixedLine aContentFL; SwDropCapsPict *pPict; - BOOL bModified; - BOOL bFormat; - BOOL bHtmlMode; + sal_Bool bModified; + sal_Bool bFormat; + sal_Bool bHtmlMode; SwWrtShell &rSh; @@ -104,12 +104,12 @@ friend class SwDropCapsPict; public: static SfxTabPage *Create(Window *pParent, const SfxItemSet &rSet); - static USHORT* GetRanges(); + static sal_uInt16* GetRanges(); - virtual BOOL FillItemSet( SfxItemSet &rSet); + virtual sal_Bool FillItemSet( SfxItemSet &rSet); virtual void Reset (const SfxItemSet &rSet); - void SetFormat(BOOL bSet){bFormat = bSet;} + void SetFormat(sal_Bool bSet){bFormat = bSet;} }; #endif diff --git a/sw/source/ui/inc/drwbassh.hxx b/sw/source/ui/inc/drwbassh.hxx index 60b9ecc902..3e9cae0570 100644 --- a/sw/source/ui/inc/drwbassh.hxx +++ b/sw/source/ui/inc/drwbassh.hxx @@ -39,9 +39,9 @@ class SwDrawBaseShell: public SwBaseShell { SwDrawBase* pDrawActual; - UINT16 eDrawMode; - BOOL bRotate : 1; - BOOL bSelMove: 1; + sal_uInt16 eDrawMode; + sal_Bool bRotate : 1; + sal_Bool bSelMove: 1; DECL_LINK( CheckGroupShapeNameHdl, AbstractSvxNameDialog* ); DECL_LINK(ValidatePosition, SvxSwFrameValidation* ); @@ -55,7 +55,7 @@ public: void Execute(SfxRequest &); void GetState(SfxItemSet &); void DisableState(SfxItemSet &rSet) { Disable(rSet);} - BOOL Disable(SfxItemSet& rSet, USHORT nWhich = 0); + sal_Bool Disable(SfxItemSet& rSet, sal_uInt16 nWhich = 0); void StateStatusline(SfxItemSet &rSet); diff --git a/sw/source/ui/inc/drwtxtsh.hxx b/sw/source/ui/inc/drwtxtsh.hxx index 115bae7fa7..834014452e 100644 --- a/sw/source/ui/inc/drwtxtsh.hxx +++ b/sw/source/ui/inc/drwtxtsh.hxx @@ -42,12 +42,12 @@ class SwDrawTextShell: public SfxShell SdrView *pSdrView; - BOOL bRotate : 1; - BOOL bSelMove: 1; + sal_Bool bRotate : 1; + sal_Bool bSelMove: 1; void SetAttrToMarked(const SfxItemSet& rAttr); void InsertSymbol(SfxRequest& rReq); - BOOL IsTextEdit(); + sal_Bool IsTextEdit(); public: SFX_DECL_INTERFACE(SW_DRWTXTSHELL) TYPEINFO(); @@ -58,7 +58,8 @@ public: SwDrawTextShell(SwView &rView); virtual ~SwDrawTextShell(); - virtual SfxUndoManager* GetUndoManager(); + virtual ::svl::IUndoManager* + GetUndoManager(); void StateDisableItems(SfxItemSet &); diff --git a/sw/source/ui/inc/dselect.hxx b/sw/source/ui/inc/dselect.hxx index 40d559a2af..165ae46f92 100644 --- a/sw/source/ui/inc/dselect.hxx +++ b/sw/source/ui/inc/dselect.hxx @@ -42,9 +42,9 @@ class DrawSelection : public SwDrawBase DrawSelection(SwWrtShell* pSh, SwEditWin* pWin, SwView* pView); // Mouse- & Key-Events - virtual BOOL KeyInput(const KeyEvent& rKEvt); + virtual sal_Bool KeyInput(const KeyEvent& rKEvt); - virtual void Activate(const USHORT nSlotId); // Function aktivieren + virtual void Activate(const sal_uInt16 nSlotId); // Function aktivieren }; diff --git a/sw/source/ui/inc/edtwin.hxx b/sw/source/ui/inc/edtwin.hxx index b139e723d6..87031f5bd3 100644 --- a/sw/source/ui/inc/edtwin.hxx +++ b/sw/source/ui/inc/edtwin.hxx @@ -61,23 +61,23 @@ class SwEditWin: public Window, public DropTargetHelper, public DragSourceHelper { friend void ScrollMDI(ViewShell* pVwSh, const SwRect&, - USHORT nRangeX, USHORT nRangeY); -friend BOOL IsScrollMDI(ViewShell* pVwSh, const SwRect&); + sal_uInt16 nRangeX, sal_uInt16 nRangeY); +friend sal_Bool IsScrollMDI(ViewShell* pVwSh, const SwRect&); friend void SizeNotify(ViewShell* pVwSh, const Size &); friend void PageNumNotify( ViewShell* pVwSh, - USHORT nPhyNum, - USHORT nVirtNum, + sal_uInt16 nPhyNum, + sal_uInt16 nVirtNum, const String& rPg ); static QuickHelpData* pQuickHlpData; - static BOOL bReplaceQuote; + static sal_Bool bReplaceQuote; static long nDDStartPosX, nDDStartPosY; static Color aTextColor; //Textfarbe, fuer die Giesskanne - static BOOL bTransparentBackColor; // Hintergrund transparent + static sal_Bool bTransparentBackColor; // Hintergrund transparent static Color aTextBackColor; //Texthintergrundfarbe, fuer die Giesskanne /* @@ -114,14 +114,14 @@ friend void PageNumNotify( ViewShell* pVwSh, int aActHitType; // aktueller Mauspointer - ULONG m_nDropFormat; //Format aus dem letzten QueryDrop - USHORT m_nDropAction; //Action aus dem letzten QueryDrop - USHORT m_nDropDestination; //Ziel aus dem letzten QueryDrop + sal_uLong m_nDropFormat; //Format aus dem letzten QueryDrop + sal_uInt16 m_nDropAction; //Action aus dem letzten QueryDrop + sal_uInt16 m_nDropDestination; //Ziel aus dem letzten QueryDrop - UINT16 eBezierMode; - UINT16 nInsFrmColCount; //Spaltenzahl fuer interaktiven Rahmen + sal_uInt16 eBezierMode; + sal_uInt16 nInsFrmColCount; //Spaltenzahl fuer interaktiven Rahmen SdrObjKind eDrawMode; - BOOL bLinkRemoved : 1, + sal_Bool bLinkRemoved : 1, bMBPressed : 1, bInsDraw : 1, bInsFrm : 1, @@ -143,8 +143,8 @@ friend void PageNumNotify( ViewShell* pVwSh, bObjectSelect : 1; - USHORT nKS_NUMDOWN_Count; // #i23725# - USHORT nKS_NUMINDENTINC_Count; + sal_uInt16 nKS_NUMDOWN_Count; // #i23725# + sal_uInt16 nKS_NUMINDENTINC_Count; void LeaveArea(const Point &); void JustifyAreaTimer(); @@ -152,19 +152,19 @@ friend void PageNumNotify( ViewShell* pVwSh, void RstMBDownFlags(); - void ChangeFly( BYTE nDir, BOOL bWeb = FALSE ); - void ChangeDrawing( BYTE nDir ); + void ChangeFly( sal_uInt8 nDir, sal_Bool bWeb = sal_False ); + void ChangeDrawing( sal_uInt8 nDir ); - BOOL EnterDrawMode(const MouseEvent& rMEvt, const Point& aDocPos); - BOOL RulerColumnDrag( const MouseEvent& rMEvt, BOOL bVerticalMode); + sal_Bool EnterDrawMode(const MouseEvent& rMEvt, const Point& aDocPos); + sal_Bool RulerColumnDrag( const MouseEvent& rMEvt, sal_Bool bVerticalMode); //Hilfsfunktionen fuer D&D void DropCleanup(); void CleanupDropUserMarker(); - USHORT GetDropDestination( const Point& rPixPnt, + sal_uInt16 GetDropDestination( const Point& rPixPnt, SdrObject ** ppObj = 0 ); //select the object/cursor at the mouse position of the context menu request - BOOL SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos ); + sal_Bool SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos ); /* * Handler fuer das Weiterscrollen, wenn der Mauspointer innerhalb eines @@ -218,45 +218,45 @@ protected: SvxAutoCorrect* pACorr, sal_Bool bFromIME = sal_False ); public: - void UpdatePointer(const Point &, USHORT nButtons = 0); + void UpdatePointer(const Point &, sal_uInt16 nButtons = 0); - BOOL IsDrawSelMode(); - BOOL IsDrawAction() { return (bInsDraw); } - void SetDrawAction(BOOL bFlag) { bInsDraw = bFlag; } + sal_Bool IsDrawSelMode(); + sal_Bool IsDrawAction() { return (bInsDraw); } + void SetDrawAction(sal_Bool bFlag) { bInsDraw = bFlag; } - void SetObjectSelect( BOOL bVal ) { bObjectSelect = bVal; } - BOOL IsObjectSelect() const { return bObjectSelect; } + void SetObjectSelect( sal_Bool bVal ) { bObjectSelect = bVal; } + sal_Bool IsObjectSelect() const { return bObjectSelect; } - inline SdrObjKind GetSdrDrawMode(/*BOOL bBuf = FALSE*/) const { return eDrawMode; } - inline void SetSdrDrawMode( SdrObjKind eSdrObjectKind ) { eDrawMode = eSdrObjectKind; SetObjectSelect( FALSE ); } - void StdDrawMode( SdrObjKind eSdrObjectKind, BOOL bObjSelect ); + inline SdrObjKind GetSdrDrawMode(/*sal_Bool bBuf = sal_False*/) const { return eDrawMode; } + inline void SetSdrDrawMode( SdrObjKind eSdrObjectKind ) { eDrawMode = eSdrObjectKind; SetObjectSelect( sal_False ); } + void StdDrawMode( SdrObjKind eSdrObjectKind, sal_Bool bObjSelect ); - BOOL IsFrmAction() { return (bInsFrm); } - inline UINT16 GetBezierMode() { return eBezierMode; } - void SetBezierMode(UINT16 eBezMode) { eBezierMode = eBezMode; } + sal_Bool IsFrmAction() { return (bInsFrm); } + inline sal_uInt16 GetBezierMode() { return eBezierMode; } + void SetBezierMode(sal_uInt16 eBezMode) { eBezierMode = eBezMode; } void EnterDrawTextMode(const Point& aDocPos); // DrawTextEditMode einschalten - void InsFrm(USHORT nCols); + void InsFrm(sal_uInt16 nCols); void StopInsFrm(); - UINT16 GetFrmColCount() const {return nInsFrmColCount;} //Spaltenzahl fuer interaktiven Rahmen + sal_uInt16 GetFrmColCount() const {return nInsFrmColCount;} //Spaltenzahl fuer interaktiven Rahmen - void SetChainMode( BOOL bOn ); - BOOL IsChainMode() const { return bChainMode; } + void SetChainMode( sal_Bool bOn ); + sal_Bool IsChainMode() const { return bChainMode; } void FlushInBuffer(); - BOOL IsInputSequenceCheckingRequired( const String &rText, const SwPaM& rCrsr ) const; + sal_Bool IsInputSequenceCheckingRequired( const String &rText, const SwPaM& rCrsr ) const; - static void SetReplaceQuote(BOOL bOn = TRUE) { bReplaceQuote = bOn; } - static BOOL IsReplaceQuote() { return bReplaceQuote; } + static void SetReplaceQuote(sal_Bool bOn = sal_True) { bReplaceQuote = bOn; } + static sal_Bool IsReplaceQuote() { return bReplaceQuote; } void SetApplyTemplate(const SwApplyTemplate &); SwApplyTemplate* GetApplyTemplate() const { return pApplyTempl; } void StartExecuteDrag(); void DragFinished(); - USHORT GetDropAction() const { return m_nDropAction; } - ULONG GetDropFormat() const { return m_nDropFormat; } + sal_uInt16 GetDropAction() const { return m_nDropAction; } + sal_uLong GetDropFormat() const { return m_nDropFormat; } Color GetTextColor() { return aTextColor; } @@ -266,11 +266,11 @@ public: { return aTextBackColor; } void SetTextBackColor(const Color& rCol ) { aTextBackColor = rCol; } - void SetTextBackColorTransparent(BOOL bSet) + void SetTextBackColorTransparent(sal_Bool bSet) { bTransparentBackColor = bSet; } - BOOL IsTextBackColorTransparent() + sal_Bool IsTextBackColorTransparent() { return bTransparentBackColor; } - void LockKeyInput(BOOL bSet){bLockInput = bSet;} + void LockKeyInput(sal_Bool bSet){bLockInput = bSet;} const SwView &GetView() const { return rView; } SwView &GetView() { return rView; } @@ -290,7 +290,7 @@ public: void StopQuickHelp(); // --> OD 2005-02-18 #i42921# - add parameter <bVerticalMode> - BOOL RulerMarginDrag( const MouseEvent& rMEvt, + sal_Bool RulerMarginDrag( const MouseEvent& rMEvt, const bool bVerticalMode ); // <-- diff --git a/sw/source/ui/inc/envimg.hxx b/sw/source/ui/inc/envimg.hxx index 03f6277c00..4b0ddc85a7 100644 --- a/sw/source/ui/inc/envimg.hxx +++ b/sw/source/ui/inc/envimg.hxx @@ -75,8 +75,8 @@ public: virtual int operator ==(const SfxPoolItem& rItem) const; virtual SfxPoolItem* Clone(SfxItemPool* = 0) const; - virtual bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; + virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); }; // class SwEnvCfgItem ------------------------------------------------------- diff --git a/sw/source/ui/inc/envlop.hxx b/sw/source/ui/inc/envlop.hxx index 62b3df48e9..3036a07006 100644 --- a/sw/source/ui/inc/envlop.hxx +++ b/sw/source/ui/inc/envlop.hxx @@ -37,7 +37,7 @@ #include <vcl/lstbox.hxx> -#include <vcl/imagebtn.hxx> +#include <vcl/button.hxx> #include "envimg.hxx" @@ -79,11 +79,11 @@ friend class SwEnvPreview; SfxItemSet *pAddresseeSet; SfxItemSet *pSenderSet; - virtual void PageCreated( USHORT nId, SfxTabPage &rPage ); + virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage ); virtual short Ok(); public: - SwEnvDlg(Window* pParent, const SfxItemSet& rSet, SwWrtShell* pWrtSh, Printer* pPrt, BOOL bInsert); + SwEnvDlg(Window* pParent, const SfxItemSet& rSet, SwWrtShell* pWrtSh, Printer* pPrt, sal_Bool bInsert); ~SwEnvDlg(); }; @@ -128,7 +128,7 @@ public: virtual void ActivatePage(const SfxItemSet& rSet); virtual int DeactivatePage(SfxItemSet* pSet = 0); void FillItem(SwEnvItem& rItem); - virtual BOOL FillItemSet(SfxItemSet& rSet); + virtual sal_Bool FillItemSet(SfxItemSet& rSet); virtual void Reset(const SfxItemSet& rSet); }; diff --git a/sw/source/ui/inc/fldedt.hxx b/sw/source/ui/inc/fldedt.hxx index 7a32185a70..9caf4b6dff 100644 --- a/sw/source/ui/inc/fldedt.hxx +++ b/sw/source/ui/inc/fldedt.hxx @@ -28,7 +28,7 @@ #ifndef _FLDEDT_HXX #define _FLDEDT_HXX #include <sfx2/basedlgs.hxx> -#include <vcl/imagebtn.hxx> +#include <vcl/button.hxx> class SwView; class SwWrtShell; @@ -44,7 +44,7 @@ class SwFldEditDlg : public SfxSingleTabDialog DECL_LINK( NextPrevHdl, Button *pBt = 0 ); void Init(); - SfxTabPage* CreatePage(USHORT nGroup); + SfxTabPage* CreatePage(sal_uInt16 nGroup); public: @@ -55,7 +55,7 @@ public: virtual short Execute(); - void EnableInsert(BOOL bEnable); + void EnableInsert(sal_Bool bEnable); void InsertHdl(); }; diff --git a/sw/source/ui/inc/fldmgr.hxx b/sw/source/ui/inc/fldmgr.hxx index 85afff1957..6689bfd33c 100644 --- a/sw/source/ui/inc/fldmgr.hxx +++ b/sw/source/ui/inc/fldmgr.hxx @@ -69,8 +69,8 @@ enum SwFldGroups struct SwFldGroupRgn { - USHORT nStart; - USHORT nEnd; + sal_uInt16 nStart; + sal_uInt16 nEnd; }; /*-------------------------------------------------------------------- @@ -79,21 +79,21 @@ struct SwFldGroupRgn --------------------------------------------------------------------*/ struct SwInsertFld_Data { - USHORT nTypeId; - USHORT nSubType; + sal_uInt16 nTypeId; + sal_uInt16 nSubType; const String sPar1; const String sPar2; - ULONG nFormatId; + sal_uLong nFormatId; SwWrtShell* pSh; sal_Unicode cSeparator; - BOOL bIsAutomaticLanguage; + sal_Bool bIsAutomaticLanguage; ::com::sun::star::uno::Any aDBDataSource; ::com::sun::star::uno::Any aDBConnection; ::com::sun::star::uno::Any aDBColumn; Window* pParent; // parent dialog used for SwWrtShell::StartInputFldDlg() - SwInsertFld_Data(USHORT nType, USHORT nSub, const String& rPar1, const String& rPar2, - ULONG nFmtId, SwWrtShell* pShell = NULL, sal_Unicode cSep = ' ', BOOL bIsAutoLanguage = TRUE) : + SwInsertFld_Data(sal_uInt16 nType, sal_uInt16 nSub, const String& rPar1, const String& rPar2, + sal_uLong nFmtId, SwWrtShell* pShell = NULL, sal_Unicode cSep = ' ', sal_Bool bIsAutoLanguage = sal_True) : nTypeId(nType), nSubType(nSub), sPar1(rPar1), @@ -107,7 +107,7 @@ struct SwInsertFld_Data SwInsertFld_Data() : pSh(0), cSeparator(' '), - bIsAutomaticLanguage(TRUE){} + bIsAutomaticLanguage(sal_True){} }; @@ -125,10 +125,10 @@ private: String sMacroPath; String sMacroName; - ULONG nCurFmt; - BOOL bEvalExp; + sal_uLong nCurFmt; + sal_Bool bEvalExp; - SW_DLLPRIVATE USHORT GetCurrLanguage() const; + SW_DLLPRIVATE sal_uInt16 GetCurrLanguage() const; com::sun::star::uno::Reference<com::sun::star::container::XNameAccess> xDBContext; com::sun::star::uno::Reference<com::sun::star::text::XNumberingTypeInfo> xNumberingInfo; @@ -142,83 +142,83 @@ public: { pWrtShell = pShell; } // Feld einfuegen ueber TypeId (TYP_ ...) - BOOL InsertFld( const SwInsertFld_Data& rData ); + sal_Bool InsertFld( const SwInsertFld_Data& rData ); // Direkt das aktuelle Feld aendern - void UpdateCurFld(ULONG nFormat, + void UpdateCurFld(sal_uLong nFormat, const String& rPar1, const String& rPar2, SwField * _pField = 0); // #111840# inline const String& GetCurFldPar1() const; inline const String& GetCurFldPar2() const; - inline ULONG GetCurFldFmt() const; + inline sal_uLong GetCurFldFmt() const; // Ein Feld ermitteln SwField* GetCurFld(); void InsertFldType(SwFieldType& rType); - BOOL ChooseMacro(const String &rSelMacro = aEmptyStr); + sal_Bool ChooseMacro(const String &rSelMacro = aEmptyStr); void SetMacroPath(const String& rPath); inline const String& GetMacroPath() const { return (sMacroPath); } inline const String& GetMacroName() const { return (sMacroName); } inline void SetMacroModule(SbModule* pMod) { pModule = pMod; } // Vorheriger Naechster gleichen Typ - BOOL GoNextPrev( BOOL bNext = TRUE, SwFieldType* pTyp = 0 ); - BOOL GoNext( SwFieldType* pTyp = 0 ) { return GoNextPrev( TRUE, pTyp ); } - BOOL GoPrev( SwFieldType* pTyp = 0 ) { return GoNextPrev( FALSE, pTyp ); } + sal_Bool GoNextPrev( sal_Bool bNext = sal_True, SwFieldType* pTyp = 0 ); + sal_Bool GoNext( SwFieldType* pTyp = 0 ) { return GoNextPrev( sal_True, pTyp ); } + sal_Bool GoPrev( SwFieldType* pTyp = 0 ) { return GoNextPrev( sal_False, pTyp ); } // Erfragen von Werten aus Datenbankfeldern (BASIC ) // String GetDataBaseFieldValue(const String &rDBName, const String &rFieldName, SwWrtShell* pSh); - BOOL IsDBNumeric(const String& rDBName, const String& rTblQryName, - BOOL bIsTable, const String& rFldName); + sal_Bool IsDBNumeric(const String& rDBName, const String& rTblQryName, + sal_Bool bIsTable, const String& rFldName); // RefMark mit Namen organisieren - BOOL CanInsertRefMark( const String& rStr ); + sal_Bool CanInsertRefMark( const String& rStr ); // Zugriff ueber ResId auf Feldtypen - USHORT GetFldTypeCount(USHORT nResId = USHRT_MAX) const; - SwFieldType* GetFldType(USHORT nResId, USHORT nId = 0) const; - SwFieldType* GetFldType(USHORT nResId, const String& rName) const; + sal_uInt16 GetFldTypeCount(sal_uInt16 nResId = USHRT_MAX) const; + SwFieldType* GetFldType(sal_uInt16 nResId, sal_uInt16 nId = 0) const; + SwFieldType* GetFldType(sal_uInt16 nResId, const String& rName) const; - void RemoveFldType(USHORT nResId, const String& rName); + void RemoveFldType(sal_uInt16 nResId, const String& rName); // Zugriff ueber TypeId aus dem Dialog // Ids fuer einen Bereich von Feldern - const SwFldGroupRgn& GetGroupRange(BOOL bHtmlMode, USHORT nGrpId) const; - USHORT GetGroup(BOOL bHtmlMode, USHORT nTypeId, USHORT nSubType = 0) const; + const SwFldGroupRgn& GetGroupRange(sal_Bool bHtmlMode, sal_uInt16 nGrpId) const; + sal_uInt16 GetGroup(sal_Bool bHtmlMode, sal_uInt16 nTypeId, sal_uInt16 nSubType = 0) const; // TypeId des aktuellen Feldes - USHORT GetCurTypeId() const; + sal_uInt16 GetCurTypeId() const; // TypeId fuer einen konkrete Pos in der Liste - static USHORT GetTypeId(USHORT nPos); + static sal_uInt16 GetTypeId(sal_uInt16 nPos); // Name des Typen in der Liste der Felder - static const String& GetTypeStr(USHORT nPos); + static const String& GetTypeStr(sal_uInt16 nPos); // Pos in der Liste der Felder - static USHORT GetPos(USHORT nTypeId); + static sal_uInt16 GetPos(sal_uInt16 nTypeId); // Untertypen zu einem Typ - BOOL GetSubTypes(USHORT nId, SvStringsDtor& rToFill); + sal_Bool GetSubTypes(sal_uInt16 nId, SvStringsDtor& rToFill); // Formate zu einem Typ - USHORT GetFormatCount(USHORT nTypeId, BOOL bIsText, BOOL bHtmlMode = FALSE) const; - String GetFormatStr(USHORT nTypeId, ULONG nFormatId) const; - USHORT GetFormatId(USHORT nTypeId, ULONG nFormatId) const; - ULONG GetDefaultFormat(USHORT nTypeId, BOOL bIsText, SvNumberFormatter* pFormatter, double* pVal = 0L); + sal_uInt16 GetFormatCount(sal_uInt16 nTypeId, sal_Bool bIsText, sal_Bool bHtmlMode = sal_False) const; + String GetFormatStr(sal_uInt16 nTypeId, sal_uLong nFormatId) const; + sal_uInt16 GetFormatId(sal_uInt16 nTypeId, sal_uLong nFormatId) const; + sal_uLong GetDefaultFormat(sal_uInt16 nTypeId, sal_Bool bIsText, SvNumberFormatter* pFormatter, double* pVal = 0L); // Evaluierung der ExpressionFelder ausschalten fuer das Einfuegen // vieler Expressionfelder (siehe Etiketten) // - inline void SetEvalExpFlds(BOOL bEval); + inline void SetEvalExpFlds(sal_Bool bEval); void EvalExpFlds(SwWrtShell* pSh = NULL); }; -inline void SwFldMgr::SetEvalExpFlds(BOOL bEval) +inline void SwFldMgr::SetEvalExpFlds(sal_Bool bEval) { bEvalExp = bEval; } inline const String& SwFldMgr::GetCurFldPar1() const @@ -227,7 +227,7 @@ inline const String& SwFldMgr::GetCurFldPar1() const inline const String& SwFldMgr::GetCurFldPar2() const { return aCurPar2; } -inline ULONG SwFldMgr::GetCurFldFmt() const +inline sal_uLong SwFldMgr::GetCurFldFmt() const { return nCurFmt; } #endif diff --git a/sw/source/ui/inc/fldtdlg.hxx b/sw/source/ui/inc/fldtdlg.hxx index 61ee679d3c..2d2349a4f9 100644 --- a/sw/source/ui/inc/fldtdlg.hxx +++ b/sw/source/ui/inc/fldtdlg.hxx @@ -38,16 +38,16 @@ class SwFldDlg: public SfxTabDialog { SwChildWinWrapper* m_pChildWin; SfxBindings* m_pBindings; - BOOL m_bHtmlMode; - BOOL m_bDataBaseMode; + sal_Bool m_bHtmlMode; + sal_Bool m_bDataBaseMode; - virtual BOOL Close(); - virtual SfxItemSet* CreateInputItemSet( USHORT nId ); + virtual sal_Bool Close(); + virtual SfxItemSet* CreateInputItemSet( sal_uInt16 nId ); virtual void Activate(); - virtual void PageCreated(USHORT nId, SfxTabPage& rPage); + virtual void PageCreated(sal_uInt16 nId, SfxTabPage& rPage); - void ReInitTabPage( USHORT nPageId, - BOOL bOnlyActivate = FALSE ); + void ReInitTabPage( sal_uInt16 nPageId, + sal_Bool bOnlyActivate = sal_False ); public: SwFldDlg(SfxBindings* pB, SwChildWinWrapper* pCW, Window *pParent); @@ -57,7 +57,7 @@ public: void Initialize(SfxChildWinInfo *pInfo); void ReInitDlg(); - void EnableInsert(BOOL bEnable); + void EnableInsert(sal_Bool bEnable); void InsertHdl(); void ActivateDatabasePage(); }; diff --git a/sw/source/ui/inc/fldwrap.hxx b/sw/source/ui/inc/fldwrap.hxx index 88ecbbea0a..4bf4117e21 100644 --- a/sw/source/ui/inc/fldwrap.hxx +++ b/sw/source/ui/inc/fldwrap.hxx @@ -35,13 +35,13 @@ class SwFldDlgWrapper : public SwChildWinWrapper { public: AbstractSwFldDlg * pDlgInterface; - SwFldDlgWrapper( Window* pParent, USHORT nId, + SwFldDlgWrapper( Window* pParent, sal_uInt16 nId, SfxBindings* pBindings, SfxChildWinInfo* pInfo ); SFX_DECL_CHILDWINDOW(SwFldDlgWrapper); - virtual BOOL ReInitDlg(SwDocShell *pDocSh); - void ShowPage(USHORT nPage = 0); + virtual sal_Bool ReInitDlg(SwDocShell *pDocSh); + void ShowPage(sal_uInt16 nPage = 0); }; /* -----------------04.02.2003 14:14----------------- @@ -52,12 +52,12 @@ class SwFldDataOnlyDlgWrapper : public SwChildWinWrapper { public: AbstractSwFldDlg * pDlgInterface; - SwFldDataOnlyDlgWrapper( Window* pParent, USHORT nId, + SwFldDataOnlyDlgWrapper( Window* pParent, sal_uInt16 nId, SfxBindings* pBindings, SfxChildWinInfo* pInfo ); SFX_DECL_CHILDWINDOW(SwFldDataOnlyDlgWrapper); - virtual BOOL ReInitDlg(SwDocShell *pDocSh); + virtual sal_Bool ReInitDlg(SwDocShell *pDocSh); }; #endif diff --git a/sw/source/ui/inc/fontcfg.hxx b/sw/source/ui/inc/fontcfg.hxx index 7ffbe2eb92..ce7dbb1505 100644 --- a/sw/source/ui/inc/fontcfg.hxx +++ b/sw/source/ui/inc/fontcfg.hxx @@ -70,7 +70,7 @@ class SW_DLLPUBLIC SwStdFontConfig : public utl::ConfigItem SW_DLLPRIVATE com::sun::star::uno::Sequence<rtl::OUString> GetPropertyNames(); - void ChangeString(USHORT nFontType, const String& rSet) + void ChangeString(sal_uInt16 nFontType, const String& rSet) { if(sDefaultFonts[nFontType] != rSet) { @@ -79,7 +79,7 @@ class SW_DLLPUBLIC SwStdFontConfig : public utl::ConfigItem } } - void ChangeInt( USHORT nFontType, sal_Int32 nHeight ); + void ChangeInt( sal_uInt16 nFontType, sal_Int32 nHeight ); public: SwStdFontConfig(); @@ -94,8 +94,8 @@ public: const String& GetFontCaption(sal_uInt8 nFontGroup) const {return sDefaultFonts[FONT_CAPTION + FONT_PER_GROUP * nFontGroup];} const String& GetFontIndex (sal_uInt8 nFontGroup) const {return sDefaultFonts[FONT_INDEX + FONT_PER_GROUP * nFontGroup];} - const String& GetFontFor(USHORT nFontType) const {return sDefaultFonts[nFontType];} - BOOL IsFontDefault(USHORT nFontType) const; + const String& GetFontFor(sal_uInt16 nFontType) const {return sDefaultFonts[nFontType];} + sal_Bool IsFontDefault(sal_uInt16 nFontType) const; void SetFontStandard(const String& rSet, sal_uInt8 nFontGroup) {ChangeString(FONT_STANDARD + FONT_PER_GROUP * nFontGroup, rSet);} @@ -114,8 +114,8 @@ public: sal_Int32 GetFontHeight( sal_uInt8 nFont, sal_uInt8 nScriptType, LanguageType eLang ); - static String GetDefaultFor(USHORT nFontType, LanguageType eLang); - static sal_Int32 GetDefaultHeightFor(USHORT nFontType, LanguageType eLang); + static String GetDefaultFor(sal_uInt16 nFontType, LanguageType eLang); + static sal_Int32 GetDefaultHeightFor(sal_uInt16 nFontType, LanguageType eLang); }; #endif diff --git a/sw/source/ui/inc/formedt.hxx b/sw/source/ui/inc/formedt.hxx index 835b67d4b5..2d07f60d88 100644 --- a/sw/source/ui/inc/formedt.hxx +++ b/sw/source/ui/inc/formedt.hxx @@ -81,14 +81,14 @@ class SwIdxFormDlg : public SvxStandardDialog SwWrtShell &rSh; SwForm *pForm; - USHORT nAktLevel; - BOOL bLastLinkIsEnd; + sal_uInt16 nAktLevel; + sal_Bool bLastLinkIsEnd; public: SwIdxFormDlg( Window* pParent, SwWrtShell &rShell, const SwForm& rForm ); ~SwIdxFormDlg(); - static BOOL IsNoNum(SwWrtShell& rSh, const String& rName); + static sal_Bool IsNoNum(SwWrtShell& rSh, const String& rName); const SwForm& GetTOXForm(); }; diff --git a/sw/source/ui/inc/frmdlg.hxx b/sw/source/ui/inc/frmdlg.hxx index a94d961719..75f3f477b9 100644 --- a/sw/source/ui/inc/frmdlg.hxx +++ b/sw/source/ui/inc/frmdlg.hxx @@ -38,23 +38,24 @@ class SwWrtShell; --------------------------------------------------------------------*/ class SwFrmDlg : public SfxTabDialog { - BOOL m_bFormat; - BOOL m_bNew; - BOOL m_bHTMLMode; + sal_Bool m_bFormat; + sal_Bool m_bNew; + sal_Bool m_bHTMLMode; + bool m_bEnableVertPos; const SfxItemSet& m_rSet; - USHORT m_nDlgType; + sal_uInt16 m_nDlgType; SwWrtShell* m_pWrtShell; - virtual void PageCreated( USHORT nId, SfxTabPage &rPage ); + virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage ); public: SwFrmDlg( SfxViewFrame *pFrame, Window *pParent, const SfxItemSet& rCoreSet, - BOOL bNewFrm = TRUE, - USHORT nResType = DLG_FRM_STD, - BOOL bFmt = FALSE, - UINT16 nDefPage = 0, + sal_Bool bNewFrm = sal_True, + sal_uInt16 nResType = DLG_FRM_STD, + sal_Bool bFmt = sal_False, + sal_uInt16 nDefPage = 0, const String* pFmtStr = 0); ~SwFrmDlg(); diff --git a/sw/source/ui/inc/frmmgr.hxx b/sw/source/ui/inc/frmmgr.hxx index e13b820802..15a1f71a47 100644 --- a/sw/source/ui/inc/frmmgr.hxx +++ b/sw/source/ui/inc/frmmgr.hxx @@ -63,9 +63,12 @@ class SW_DLLPUBLIC SwFlyFrmAttrMgr Point aAbsPos; SwWrtShell *pOwnSh; - BOOL bAbsPos, + sal_Bool bAbsPos, bNewFrm; - BOOL bIsInVertical; + sal_Bool bIsInVertical; + // --> OD 2009-09-01 #mongolianlayout# + sal_Bool bIsInVerticalL2R; + // <-- // interne Verrechnung fuer Umrandung SW_DLLPRIVATE SwTwips CalcTopSpace(); @@ -76,10 +79,10 @@ class SW_DLLPUBLIC SwFlyFrmAttrMgr SW_DLLPRIVATE void _UpdateFlyFrm(); //Nacharbeit nach Einfuegen oder Update public: - SwFlyFrmAttrMgr( BOOL bNew, SwWrtShell* pSh, BYTE nType ); + SwFlyFrmAttrMgr( sal_Bool bNew, SwWrtShell* pSh, sal_uInt8 nType ); //CopyCtor fuer die Dialoge, zum Pruefen der Metrics - SwFlyFrmAttrMgr( BOOL bNew, SwWrtShell *pSh, const SfxItemSet &rSet ); + SwFlyFrmAttrMgr( sal_Bool bNew, SwWrtShell *pSh, const SfxItemSet &rSet ); inline SwWrtShell* GetShell() { return pOwnSh; } @@ -100,7 +103,7 @@ public: void SetSize(const Size& rLSize); inline const Size& GetSize() const; - inline USHORT GetHeightPercent() const; + inline sal_uInt16 GetHeightPercent() const; void SetHeightSizeType(SwFrmSize eType); @@ -117,18 +120,18 @@ public: void UpdateFlyFrm(); // neuen Rahmen erzeugen - BOOL InsertFlyFrm(); + sal_Bool InsertFlyFrm(); void InsertFlyFrm(RndStdIds eAnchorType, const Point &rPos, const Size &rSize, - BOOL bAbsPos = FALSE); + sal_Bool bAbsPos = sal_False); // Metriken pruefen und aendern void ValidateMetrics(SvxSwFrameValidation& rVal, const SwPosition* pToCharCntntPos, - BOOL bOnlyPercentRefValue = FALSE); + sal_Bool bOnlyPercentRefValue = sal_False); - void DelAttr(USHORT nId); + void DelAttr(sal_uInt16 nId); // Set rausreichen inline const SfxItemSet &GetAttrSet() const { return aSet; } @@ -186,7 +189,7 @@ inline RndStdIds SwFlyFrmAttrMgr::GetAnchor() const return ((SwFmtAnchor&)aSet.Get(RES_ANCHOR)).GetAnchorId(); } -inline USHORT SwFlyFrmAttrMgr::GetHeightPercent() const +inline sal_uInt16 SwFlyFrmAttrMgr::GetHeightPercent() const { return GetFrmSize().GetHeightPercent(); } diff --git a/sw/source/ui/inc/frmpage.hxx b/sw/source/ui/inc/frmpage.hxx index dea90b5cbb..2cc63a3c60 100644 --- a/sw/source/ui/inc/frmpage.hxx +++ b/sw/source/ui/inc/frmpage.hxx @@ -53,6 +53,7 @@ struct SwPosition; class SwFrmPage: public SfxTabPage { // Size + FixedLine aSizeFL; FixedText aWidthFT; FixedText aWidthAutoFT; PercentField aWidthED; @@ -65,11 +66,10 @@ class SwFrmPage: public SfxTabPage CheckBox aAutoHeightCB; CheckBox aFixedRatioCB; PushButton aRealSizeBT; - FixedLine aSizeFL; // Anker - FixedLine aTypeFL; FixedLine aTypeSepFL; + FixedLine aTypeFL; RadioButton aAnchorAtPageRB; RadioButton aAnchorAtParaRB; RadioButton aAnchorAtCharRB; @@ -77,6 +77,7 @@ class SwFrmPage: public SfxTabPage RadioButton aAnchorAtFrameRB; // Position + FixedLine aPositionFL; FixedText aHorizontalFT; ListBox aHorizontalDLB; FixedText aAtHorzPosFT; @@ -92,7 +93,6 @@ class SwFrmPage: public SfxTabPage ListBox aVertRelationLB; // OD 02.10.2003 #i18732# - check box for new option 'FollowTextFlow' CheckBox aFollowTextFlowCB; - FixedLine aPositionFL; // Example SvxSwFrameExample aExampleWN; @@ -100,18 +100,21 @@ class SwFrmPage: public SfxTabPage //'string provider' SvxSwFramePosString aFramePosString; - BOOL bAtHorzPosModified; - BOOL bAtVertPosModified; - - BOOL bFormat; - BOOL bNew; - BOOL bNoModifyHdl; - BOOL bVerticalChanged; //check done whether frame is in vertical environment - BOOL bIsVerticalFrame; //current frame is in vertical environment - strings are exchanged - BOOL bIsInRightToLeft; // current frame is in right-to-left environment - strings are exchanged - BOOL bHtmlMode; - USHORT nHtmlMode; - USHORT nDlgType; + sal_Bool bAtHorzPosModified; + sal_Bool bAtVertPosModified; + + sal_Bool bFormat; + sal_Bool bNew; + sal_Bool bNoModifyHdl; + sal_Bool bVerticalChanged; //check done whether frame is in vertical environment + sal_Bool bIsVerticalFrame; //current frame is in vertical environment - strings are exchanged + // --> OD 2009-08-31 #mongolianlayou# + sal_Bool bIsVerticalL2R; + // <-- + sal_Bool bIsInRightToLeft; // current frame is in right-to-left environment - strings are exchanged + sal_Bool bHtmlMode; + sal_uInt16 nHtmlMode; + sal_uInt16 nDlgType; Size aGrfSize; Size aWrap; SwTwips nUpperBorder; @@ -131,6 +134,10 @@ class SwFrmPage: public SfxTabPage FrmMap* pVMap; FrmMap* pHMap; + bool m_bAllowVertPositioning; + bool m_bIsMathOLE; + bool m_bIsMathBaselineAlignment; + virtual void ActivatePage(const SfxItemSet& rSet); virtual int DeactivatePage(SfxItemSet *pSet); @@ -139,8 +146,8 @@ class SwFrmPage: public SfxTabPage DECL_LINK( AnchorTypeHdl, RadioButton * ); DECL_LINK( PosHdl, ListBox * ); DECL_LINK( RelHdl, ListBox * ); - void InitPos(RndStdIds eId, USHORT nH, USHORT nHRel, - USHORT nV, USHORT nVRel, + void InitPos(RndStdIds eId, sal_uInt16 nH, sal_uInt16 nHRel, + sal_uInt16 nV, sal_uInt16 nVRel, long nX, long nY); DECL_LINK( RealSizeHdl, Button * ); @@ -154,23 +161,23 @@ class SwFrmPage: public SfxTabPage void UpdateExample(); DECL_LINK( ModifyHdl, Edit * ); - void Init(const SfxItemSet& rSet, BOOL bReset = FALSE); + void Init(const SfxItemSet& rSet, sal_Bool bReset = sal_False); // OD 12.11.2003 #i22341# - adjustment to handle maps, that are ambigous // in the alignment. - USHORT FillPosLB( const FrmMap* _pMap, - const USHORT _nAlign, - const USHORT _nRel, + sal_uInt16 FillPosLB( const FrmMap* _pMap, + const sal_uInt16 _nAlign, + const sal_uInt16 _nRel, ListBox& _rLB ); // OD 14.11.2003 #i22341# - adjustment to handle maps, that are ambigous // in their string entries. - ULONG FillRelLB( const FrmMap* _pMap, - const USHORT _nLBSelPos, - const USHORT _nAlign, - USHORT _nRel, + sal_uLong FillRelLB( const FrmMap* _pMap, + const sal_uInt16 _nLBSelPos, + const sal_uInt16 _nAlign, + sal_uInt16 _nRel, ListBox& _rLB, FixedText& _rFT ); - USHORT GetMapPos( const FrmMap *pMap, ListBox &rAlignLB ); - short GetAlignment(FrmMap *pMap, USHORT nMapPos, ListBox &rAlignLB, ListBox &rRelationLB); + sal_uInt16 GetMapPos( const FrmMap *pMap, ListBox &rAlignLB ); + short GetAlignment(FrmMap *pMap, sal_uInt16 nMapPos, ListBox &rAlignLB, ListBox &rRelationLB); short GetRelation(FrmMap *pMap, ListBox &rRelationLB); RndStdIds GetAnchor(); @@ -185,15 +192,16 @@ class SwFrmPage: public SfxTabPage public: static SfxTabPage *Create(Window *pParent, const SfxItemSet &rSet); - static USHORT* GetRanges(); + static sal_uInt16* GetRanges(); - virtual BOOL FillItemSet(SfxItemSet &rSet); + virtual sal_Bool FillItemSet(SfxItemSet &rSet); virtual void Reset(const SfxItemSet &rSet); - void SetNewFrame(BOOL bNewFrame) { bNew = bNewFrame; } - void SetFormatUsed(BOOL bFmt); - void SetFrmType(USHORT nType) { nDlgType = nType; } - inline BOOL IsInGraficMode( void ) { return nDlgType == DLG_FRM_GRF || nDlgType == DLG_FRM_OLE; } + void SetNewFrame(sal_Bool bNewFrame) { bNew = bNewFrame; } + void SetFormatUsed(sal_Bool bFmt); + void SetFrmType(sal_uInt16 nType) { nDlgType = nType; } + inline sal_Bool IsInGraficMode( void ) { return nDlgType == DLG_FRM_GRF || nDlgType == DLG_FRM_OLE; } + void EnableVerticalPositioning( bool bEnable ); }; class SwGrfExtPage: public SfxTabPage @@ -217,7 +225,7 @@ class SwGrfExtPage: public SfxTabPage ::sfx2::FileDialogHelper* pGrfDlg; - BOOL bHtmlMode; + sal_Bool bHtmlMode; // Handler fuer Spiegeln DECL_LINK( MirrorHdl, CheckBox * ); @@ -234,7 +242,7 @@ public: static SfxTabPage *Create(Window *pParent, const SfxItemSet &rSet); - virtual BOOL FillItemSet(SfxItemSet &rSet); + virtual sal_Bool FillItemSet(SfxItemSet &rSet); virtual void Reset(const SfxItemSet &rSet); virtual int DeactivatePage(SfxItemSet *pSet); }; @@ -269,12 +277,13 @@ public: static SfxTabPage *Create(Window *pParent, const SfxItemSet &rSet); - virtual BOOL FillItemSet(SfxItemSet &rSet); + virtual sal_Bool FillItemSet(SfxItemSet &rSet); virtual void Reset(const SfxItemSet &rSet); }; class SwFrmAddPage : public SfxTabPage { + FixedLine aNamesFL; FixedText aNameFT; Edit aNameED; FixedText aAltNameFT; @@ -283,26 +292,25 @@ class SwFrmAddPage : public SfxTabPage ListBox aPrevLB; FixedText aNextFT; ListBox aNextLB; - FixedLine aNamesFL; + FixedLine aProtectFL; CheckBox aProtectContentCB; CheckBox aProtectFrameCB; CheckBox aProtectSizeCB; - FixedLine aProtectFL; + FixedLine aExtFL; CheckBox aEditInReadonlyCB; CheckBox aPrintFrameCB; FixedText aTextFlowFT; ListBox aTextFlowLB; - FixedLine aExtFL; SwWrtShell* pWrtSh; - USHORT nDlgType; - BOOL bHtmlMode; - BOOL bFormat; - BOOL bNew; + sal_uInt16 nDlgType; + sal_Bool bHtmlMode; + sal_Bool bFormat; + sal_Bool bNew; DECL_LINK(EditModifyHdl, Edit*); DECL_LINK(ChainModifyHdl, ListBox*); @@ -313,14 +321,14 @@ class SwFrmAddPage : public SfxTabPage public: static SfxTabPage* Create(Window *pParent, const SfxItemSet &rSet); - static USHORT* GetRanges(); + static sal_uInt16* GetRanges(); - virtual BOOL FillItemSet(SfxItemSet &rSet); + virtual sal_Bool FillItemSet(SfxItemSet &rSet); virtual void Reset(const SfxItemSet &rSet); - void SetFormatUsed(BOOL bFmt); - void SetFrmType(USHORT nType) { nDlgType = nType; } - void SetNewFrame(BOOL bNewFrame) { bNew = bNewFrame; } + void SetFormatUsed(sal_Bool bFmt); + void SetFrmType(sal_uInt16 nType) { nDlgType = nType; } + void SetNewFrame(sal_Bool bNewFrame) { bNew = bNewFrame; } void SetShell(SwWrtShell* pSh) { pWrtSh = pSh; } }; diff --git a/sw/source/ui/inc/glosbib.hxx b/sw/source/ui/inc/glosbib.hxx index 09495c424d..cc675c6986 100644 --- a/sw/source/ui/inc/glosbib.hxx +++ b/sw/source/ui/inc/glosbib.hxx @@ -68,9 +68,11 @@ public: class SwGlossaryGroupDlg : public SvxStandardDialog { - + FixedText aBibFT; FEdit aNameED; + FixedText aPathFT; ListBox aPathLB; + FixedText aSelectFT; SwGlossaryGroupTLB aGroupTLB; OKButton aOkPB; @@ -79,9 +81,6 @@ class SwGlossaryGroupDlg : public SvxStandardDialog PushButton aNewPB; PushButton aDelPB; PushButton aRenamePB; - FixedText aBibFT; - FixedText aPathFT; - FixedText aSelectFT; SvStrings* pRemovedArr; SvStrings* pInsertedArr; @@ -91,7 +90,7 @@ class SwGlossaryGroupDlg : public SvxStandardDialog String sCreatedGroup; - BOOL IsDeleteAllowed(const String &rGroup); + sal_Bool IsDeleteAllowed(const String &rGroup); protected: virtual void Apply(); diff --git a/sw/source/ui/inc/glosdoc.hxx b/sw/source/ui/inc/glosdoc.hxx index 89f09207a3..e2fc4f378e 100644 --- a/sw/source/ui/inc/glosdoc.hxx +++ b/sw/source/ui/inc/glosdoc.hxx @@ -68,9 +68,9 @@ class SW_DLLPUBLIC SwGlossaries String m_sErrPath; SvStrings *m_pPathArr; SvStrings *m_pGlosArr; - BOOL m_bError; + sal_Bool m_bError; - SW_DLLPRIVATE SwTextBlocks* GetGlosDoc(const String &rName, BOOL bCreate = TRUE) const; + SW_DLLPRIVATE SwTextBlocks* GetGlosDoc(const String &rName, sal_Bool bCreate = sal_True) const; SW_DLLPRIVATE SvStrings *GetNameList(); // implementation in unoatxt.cxx @@ -119,14 +119,14 @@ public: bool _bCreate = false ); - USHORT GetGroupCnt(); - String GetGroupName(USHORT ); + sal_uInt16 GetGroupCnt(); + String GetGroupName(sal_uInt16 ); String GetGroupTitle( const String& rGroupName ); - BOOL FindGroupName(String & rGroup); + sal_Bool FindGroupName(String & rGroup); SwTextBlocks* GetGroupDoc(const String &rName, - BOOL bCreate = FALSE) const; + sal_Bool bCreate = sal_False) const; SwTextBlocks* GetDefGroupDoc() const {return GetGroupDoc(GetDefName());} void PutGroupDoc(SwTextBlocks *pBlock); static String GetDefName(); @@ -134,14 +134,14 @@ public: String GetCompleteGroupName( const ::rtl::OUString& GroupName ); - BOOL NewGroupDoc(String &rGroupName, const String& rTitle); - BOOL RenameGroupDoc(const String& sOldGroup, String& sNewGroup, const String& rNewTitle); - BOOL DelGroupDoc(const String &); - SwDocShellRef EditGroupDoc(const String &rGrpName, const String& rShortName, BOOL bShow = TRUE ); + sal_Bool NewGroupDoc(String &rGroupName, const String& rTitle); + sal_Bool RenameGroupDoc(const String& sOldGroup, String& sNewGroup, const String& rNewTitle); + sal_Bool DelGroupDoc(const String &); + SwDocShellRef EditGroupDoc(const String &rGrpName, const String& rShortName, sal_Bool bShow = sal_True ); void SaveGroupDoc(const String &rGrpName, const String& rLongName ); - void UpdateGlosPath(BOOL bFull); + void UpdateGlosPath(sal_Bool bFull); void ShowError(); - inline ULONG IsGlosPathErr() { return m_bError; } + inline sal_uLong IsGlosPathErr() { return m_bError; } const SvStrings* GetPathArray() const {return m_pPathArr;} }; diff --git a/sw/source/ui/inc/gloshdl.hxx b/sw/source/ui/inc/gloshdl.hxx index 6abf6ddacb..ebc869fa9e 100644 --- a/sw/source/ui/inc/gloshdl.hxx +++ b/sw/source/ui/inc/gloshdl.hxx @@ -51,42 +51,42 @@ class SW_DLLPUBLIC SwGlossaryHdl const SvxMacro *pStart, const SvxMacro *pEnd); - SW_DLLPRIVATE BOOL Expand( const String& rShortName, + SW_DLLPRIVATE sal_Bool Expand( const String& rShortName, SwGlossaries* pGlossaries, SwTextBlocks *pGlossary ); public: - BOOL ConvertToNew(SwTextBlocks& rOld); + sal_Bool ConvertToNew(SwTextBlocks& rOld); void GlossaryDlg(); - USHORT GetGroupCnt() const; - String GetGroupName( USHORT, String* pTitle = 0 ); - BOOL NewGroup(String & rGroupName, const String& rTitle); - BOOL DelGroup(const String &); - BOOL RenameGroup(const String & rOld, String& rNew, const String& rNewTitle); - void SetCurGroup(const String &aGrp, BOOL bApi = FALSE, BOOL bAlwaysCreateNew = FALSE); + sal_uInt16 GetGroupCnt() const; + String GetGroupName( sal_uInt16, String* pTitle = 0 ); + sal_Bool NewGroup(String & rGroupName, const String& rTitle); + sal_Bool DelGroup(const String &); + sal_Bool RenameGroup(const String & rOld, String& rNew, const String& rNewTitle); + void SetCurGroup(const String &aGrp, sal_Bool bApi = sal_False, sal_Bool bAlwaysCreateNew = sal_False); const String &GetCurGroup() const { return aCurGrp; } - USHORT GetGlossaryCnt(); - String GetGlossaryName(USHORT); + sal_uInt16 GetGlossaryCnt(); + String GetGlossaryName(sal_uInt16); String GetGlossaryShortName(const String &rName); - String GetGlossaryShortName(USHORT); + String GetGlossaryShortName(sal_uInt16); - BOOL Rename( const String& rOldShortName, const String& rNewShortName, + sal_Bool Rename( const String& rOldShortName, const String& rNewShortName, const String& rNewName); - BOOL CopyOrMove( const String& rSourceGroupName, String& rSourceShortName, - const String& rDestGroupName, const String& rLongName, BOOL bMove ); - BOOL HasShortName(const String &rShortName) const; + sal_Bool CopyOrMove( const String& rSourceGroupName, String& rSourceShortName, + const String& rDestGroupName, const String& rLongName, sal_Bool bMove ); + sal_Bool HasShortName(const String &rShortName) const; //wird NewGlossary vom Basic gerufen, dann soll dir zuvor eingestellte //Gruppe ggf. neu erstellt werden - BOOL NewGlossary(const String &rName, const String &rShortName, - BOOL bApiCall = FALSE, BOOL bNoAttr = FALSE ); - BOOL DelGlossary(const String&); - BOOL CopyToClipboard(SwWrtShell& rSh, const String& rShortName); + sal_Bool NewGlossary(const String &rName, const String &rShortName, + sal_Bool bApiCall = sal_False, sal_Bool bNoAttr = sal_False ); + sal_Bool DelGlossary(const String&); + sal_Bool CopyToClipboard(SwWrtShell& rSh, const String& rShortName); - BOOL ExpandGlossary(); - BOOL InsertGlossary(const String &rName); + sal_Bool ExpandGlossary(); + sal_Bool InsertGlossary(const String &rName); void SetMacros(const String& rName, const SvxMacro* pStart, @@ -97,12 +97,12 @@ public: SvxMacro& rEnd, SwTextBlocks* pGlossary = 0 ); - BOOL IsReadOnly( const String* = 0 ) const; - BOOL IsOld() const; + sal_Bool IsReadOnly( const String* = 0 ) const; + sal_Bool IsOld() const; - BOOL FindGroupName(String & rGroup); // Gruppe ohne Pfadindex finden + sal_Bool FindGroupName(String & rGroup); // Gruppe ohne Pfadindex finden - BOOL ImportGlossaries( const String& rName ); + sal_Bool ImportGlossaries( const String& rName ); SwGlossaryHdl(SfxViewFrame* pViewFrame, SwWrtShell *); ~SwGlossaryHdl(); diff --git a/sw/source/ui/inc/gloslst.hxx b/sw/source/ui/inc/gloslst.hxx index 762734fd78..d216b23386 100644 --- a/sw/source/ui/inc/gloslst.hxx +++ b/sw/source/ui/inc/gloslst.hxx @@ -40,7 +40,7 @@ class SvStringsISortDtor; struct AutoTextGroup { - USHORT nCount; + sal_uInt16 nCount; String sName; String sTitle; String sLongNames; // durch 0x0A getrennte Langnamen @@ -56,7 +56,7 @@ class SwGlossaryList : public AutoTimer { AutoTextGroups aGroupArr; String sPath; - BOOL bFilled; + sal_Bool bFilled; AutoTextGroup* FindGroup(const String& rGroupName); void FillGroup(AutoTextGroup* pGroup, SwGlossaries* pGloss); @@ -65,14 +65,14 @@ public: SwGlossaryList(); ~SwGlossaryList(); - BOOL HasLongName(const String& rBegin, SvStringsISortDtor* pLongNames ); - BOOL GetShortName(const String& rLongName, + sal_Bool HasLongName(const String& rBegin, SvStringsISortDtor* pLongNames ); + sal_Bool GetShortName(const String& rLongName, String& rShortName, String& rGroupName ); - USHORT GetGroupCount(); - String GetGroupName(USHORT nPos, BOOL bNoPath = TRUE, String* pTitle = 0); - USHORT GetBlockCount(USHORT nGroup); - String GetBlockName(USHORT nGroup, USHORT nBlock, String& rShortName); + sal_uInt16 GetGroupCount(); + String GetGroupName(sal_uInt16 nPos, sal_Bool bNoPath = sal_True, String* pTitle = 0); + sal_uInt16 GetBlockCount(sal_uInt16 nGroup); + String GetBlockName(sal_uInt16 nGroup, sal_uInt16 nBlock, String& rShortName); void Update(); diff --git a/sw/source/ui/inc/glossary.hxx b/sw/source/ui/inc/glossary.hxx index 3fac7adacb..335f691f7b 100644 --- a/sw/source/ui/inc/glossary.hxx +++ b/sw/source/ui/inc/glossary.hxx @@ -72,12 +72,12 @@ class SwGlTreeListBox : public SvTreeListBox virtual sal_Bool NotifyMoving( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry, SvLBoxEntry*& rpNewParent, - ULONG& rNewChildPos + sal_uLong& rNewChildPos ); virtual sal_Bool NotifyCopying( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry, SvLBoxEntry*& rpNewParent, - ULONG& rNewChildPos); + sal_uLong& rNewChildPos); public: SwGlTreeListBox(Window* pParent, const ResId& rResId); @@ -121,7 +121,7 @@ class SwGlossaryDlg : public SvxStandardDialog String sResumeGroup; String sResumeShortName; - BOOL bResume; + sal_Bool bResume; const sal_Bool bSelection : 1; @@ -152,11 +152,11 @@ class SwGlossaryDlg : public SvxStandardDialog void ShowAutoText(const String& rGroup, const String& rShortName); void ResumeShowAutoText(); - BOOL GetResumeData(String& rGroup, String& rShortName) + sal_Bool GetResumeData(String& rGroup, String& rShortName) {rGroup = sResumeGroup; rShortName = sResumeShortName; return bResume;} void SetResumeData(const String& rGroup, const String& rShortName) - {sResumeGroup = rGroup; sResumeShortName = rShortName; bResume = TRUE;} - void ResetResumeData() {bResume = FALSE;} + {sResumeGroup = rGroup; sResumeShortName = rShortName; bResume = sal_True;} + void ResetResumeData() {bResume = sal_False;} public: SwGlossaryDlg(SfxViewFrame* pViewFrame, SwGlossaryHdl* pGlosHdl, SwWrtShell *pWrtShell); ~SwGlossaryDlg(); diff --git a/sw/source/ui/inc/glshell.hxx b/sw/source/ui/inc/glshell.hxx index f258613dd3..ffdcdd61c3 100644 --- a/sw/source/ui/inc/glshell.hxx +++ b/sw/source/ui/inc/glshell.hxx @@ -39,7 +39,7 @@ class SwGlosDocShell : public SwDocShell using SotObject::GetInterface; protected: - virtual BOOL Save(); + virtual sal_Bool Save(); public: @@ -70,7 +70,7 @@ class SwWebGlosDocShell : public SwWebDocShell using SotObject::GetInterface; protected: - virtual BOOL Save(); + virtual sal_Bool Save(); public: diff --git a/sw/source/ui/inc/initui.hxx b/sw/source/ui/inc/initui.hxx index f2698c6b7a..6e4acd3bb4 100644 --- a/sw/source/ui/inc/initui.hxx +++ b/sw/source/ui/inc/initui.hxx @@ -68,7 +68,7 @@ SW_DLLPUBLIC SwGlossaries* GetGlossaries(); class SwGlossaryList; -BOOL HasGlossaryList(); +sal_Bool HasGlossaryList(); SwGlossaryList* GetGlossaryList(); extern void _InitUI(); diff --git a/sw/source/ui/inc/inpdlg.hxx b/sw/source/ui/inc/inpdlg.hxx index 3634dd120a..29159a53bb 100644 --- a/sw/source/ui/inc/inpdlg.hxx +++ b/sw/source/ui/inc/inpdlg.hxx @@ -67,7 +67,7 @@ class SwFldInputDlg: public SvxStandardDialog DECL_LINK(NextHdl, PushButton*); public: SwFldInputDlg( Window *pParent, SwWrtShell &rSh, - SwField* pField, BOOL bNextButton = FALSE ); + SwField* pField, sal_Bool bNextButton = sal_False ); ~SwFldInputDlg(); }; diff --git a/sw/source/ui/inc/inputwin.hxx b/sw/source/ui/inc/inputwin.hxx index e409b1b9f4..05f1896674 100644 --- a/sw/source/ui/inc/inputwin.hxx +++ b/sw/source/ui/inc/inputwin.hxx @@ -28,11 +28,11 @@ #ifndef SW_INPUTWIN_HXX #define SW_INPUTWIN_HXX - +#include <vcl/edit.hxx> #include <vcl/menu.hxx> -#include <sfx2/childwin.hxx> #include <vcl/toolbox.hxx> -#include <vcl/edit.hxx> + +#include <sfx2/childwin.hxx> class SwFldMgr; class SwWrtShell; @@ -67,16 +67,17 @@ friend class InputEdit; SwView* pView; SfxBindings* pBindings; String aAktTableName, sOldFml; - USHORT nActionCnt; + sal_Int32 m_nActionCount; - BOOL bFirst : 1; //Initialisierungen beim ersten Aufruf - BOOL bActive : 1; //fuer Hide/Show beim Dokumentwechsel - BOOL bIsTable : 1; - BOOL bDelSel : 1; - BOOL bDoesUndo : 1; - BOOL bResetUndo : 1; - BOOL bCallUndo : 1; + sal_Bool bFirst : 1; //Initialisierungen beim ersten Aufruf + sal_Bool bActive : 1; //fuer Hide/Show beim Dokumentwechsel + sal_Bool bIsTable : 1; + sal_Bool bDelSel : 1; + bool m_bDoesUndo : 1; + bool m_bResetUndo : 1; + bool m_bCallUndo : 1; + void CleanupUglyHackWithUndo(); void DelBoxCntnt(); DECL_LINK( ModifyHdl, InputEdit* ); @@ -101,26 +102,26 @@ public: void ShowWin(); - BOOL IsActive(){ return bActive; }; + sal_Bool IsActive(){ return bActive; }; DECL_LINK( SelTblCellsNotify, SwWrtShell * ); - void SetFormula( const String& rFormula, BOOL bDelSel = TRUE ); + void SetFormula( const String& rFormula, sal_Bool bDelSel = sal_True ); const SwView* GetView() const{return pView;} }; class SwInputChild : public SfxChildWindow { - BOOL bObjVis; + sal_Bool bObjVis; SfxDispatcher* pDispatch; public: SwInputChild( Window* , - USHORT nId, + sal_uInt16 nId, SfxBindings*, SfxChildWinInfo* ); ~SwInputChild(); SFX_DECL_CHILDWINDOW( SwInputChild ); - void SetFormula( const String& rFormula, BOOL bDelSel = TRUE ) + void SetFormula( const String& rFormula, sal_Bool bDelSel = sal_True ) { ((SwInputWindow*)pWindow)->SetFormula( rFormula, bDelSel ); } const SwView* GetView() const{return ((SwInputWindow*)pWindow)->GetView();} diff --git a/sw/source/ui/inc/insfnote.hxx b/sw/source/ui/inc/insfnote.hxx index 208709f40d..dc5fdd4f7e 100644 --- a/sw/source/ui/inc/insfnote.hxx +++ b/sw/source/ui/inc/insfnote.hxx @@ -45,18 +45,18 @@ class SwInsFootNoteDlg: public SvxStandardDialog String aFontName; CharSet eCharSet; char cExtChar; - BOOL bExtCharAvailable; - BOOL bEdit; + sal_Bool bExtCharAvailable; + sal_Bool bEdit; + FixedLine aNumberFL; RadioButton aNumberAutoBtn; RadioButton aNumberCharBtn; Edit aNumberCharEdit; PushButton aNumberExtChar; - FixedLine aNumberFL; //Alles fuer die Auswahl Fussnote/Endnote + FixedLine aTypeFL; RadioButton aFtnBtn; RadioButton aEndNoteBtn; - FixedLine aTypeFL; OKButton aOkBtn; CancelButton aCancelBtn; @@ -75,13 +75,13 @@ class SwInsFootNoteDlg: public SvxStandardDialog void Init(); public: - SwInsFootNoteDlg(Window * pParent, SwWrtShell &rSh, BOOL bEd = FALSE); + SwInsFootNoteDlg(Window * pParent, SwWrtShell &rSh, sal_Bool bEd = sal_False); ~SwInsFootNoteDlg(); CharSet GetCharSet() { return eCharSet; } - BOOL IsExtCharAvailable() { return bExtCharAvailable; } + sal_Bool IsExtCharAvailable() { return bExtCharAvailable; } String GetFontName() { return aFontName; } - BOOL IsEndNote() { return aEndNoteBtn.IsChecked(); } + sal_Bool IsEndNote() { return aEndNoteBtn.IsChecked(); } String GetStr() { if ( aNumberCharBtn.IsChecked() ) diff --git a/sw/source/ui/inc/insrule.hxx b/sw/source/ui/inc/insrule.hxx index 4058c64edf..f06c057a15 100644 --- a/sw/source/ui/inc/insrule.hxx +++ b/sw/source/ui/inc/insrule.hxx @@ -42,7 +42,7 @@ class SwInsertGrfRulerDlg : public SfxModalDialog List aGrfNames; String sSimple; String sRulers; - USHORT nSelPos; + sal_uInt16 nSelPos; SwRulerValueSet* pExampleVS; @@ -55,8 +55,8 @@ public: ~SwInsertGrfRulerDlg(); String GetGraphicName(); - BOOL IsSimpleLine() {return nSelPos == 1;} - BOOL HasImages() const {return 0 != aGrfNames.Count();} + sal_Bool IsSimpleLine() {return nSelPos == 1;} + sal_Bool HasImages() const {return 0 != aGrfNames.Count();} }; #endif diff --git a/sw/source/ui/inc/instable.hxx b/sw/source/ui/inc/instable.hxx index 24b7a71e9f..afa0303108 100644 --- a/sw/source/ui/inc/instable.hxx +++ b/sw/source/ui/inc/instable.hxx @@ -85,7 +85,7 @@ public: SwInsTableDlg( SwView& rView ); ~SwInsTableDlg(); - void GetValues( String& rName, USHORT& rRow, USHORT& rCol, + void GetValues( String& rName, sal_uInt16& rRow, sal_uInt16& rCol, SwInsertTableOptions& rInsTblOpts, String& rTableAutoFmtName, SwTableAutoFmt *& prTAFmt ); }; diff --git a/sw/source/ui/inc/javaedit.hxx b/sw/source/ui/inc/javaedit.hxx index b931de0460..9a2f54c904 100644 --- a/sw/source/ui/inc/javaedit.hxx +++ b/sw/source/ui/inc/javaedit.hxx @@ -38,7 +38,7 @@ #include <vcl/button.hxx> -#include <vcl/imagebtn.hxx> +#include <vcl/button.hxx> class SwWrtShell; class SwFldMgr; @@ -69,8 +69,8 @@ private: String aText; String aType; - BOOL bNew; - BOOL bIsUrl; + sal_Bool bNew; + sal_Bool bIsUrl; SwScriptField* pFld; SwFldMgr* pMgr; @@ -101,9 +101,9 @@ public: String GetType() { return aType; } - BOOL IsUrl() { return bIsUrl; } - BOOL IsNew() { return bNew; } - BOOL IsUpdate(); + sal_Bool IsUrl() { return bIsUrl; } + sal_Bool IsNew() { return bNew; } + sal_Bool IsUpdate(); }; diff --git a/sw/source/ui/inc/label.hxx b/sw/source/ui/inc/label.hxx index debf93978d..4f180627ca 100644 --- a/sw/source/ui/inc/label.hxx +++ b/sw/source/ui/inc/label.hxx @@ -57,17 +57,17 @@ class SwLabDlg : public SfxTabDialog String sBusinessCardDlg; String sFormat; String sMedium; - BOOL m_bLabel; + sal_Bool m_bLabel; void _ReplaceGroup( const String &rMake ); - virtual void PageCreated( USHORT nId, SfxTabPage &rPage ); + virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage ); public: SwLabDlg( Window* pParent, const SfxItemSet& rSet, - SwNewDBMgr* pNewDBMgr, BOOL bLabel); + SwNewDBMgr* pNewDBMgr, sal_Bool bLabel); ~SwLabDlg(); - SwLabRec* GetRecord(const String &rRecName, BOOL bCont); + SwLabRec* GetRecord(const String &rRecName, sal_Bool bCont); void GetLabItem(SwLabItem &rItem); SwLabRecs &Recs() { return *pRecs; } diff --git a/sw/source/ui/inc/langhelper.hxx b/sw/source/ui/inc/langhelper.hxx index 21bdfa0504..9d2b8306a7 100644 --- a/sw/source/ui/inc/langhelper.hxx +++ b/sw/source/ui/inc/langhelper.hxx @@ -38,7 +38,7 @@ struct ESelection; namespace SwLangHelper { - extern USHORT GetLanguageStatus( OutlinerView* pOLV, SfxItemSet& rSet ); + extern sal_uInt16 GetLanguageStatus( OutlinerView* pOLV, SfxItemSet& rSet ); extern bool SetLanguageStatus( OutlinerView* pOLV, SfxRequest &rReq, SwView &rView, SwWrtShell &rSh ); extern void SetLanguage( SwWrtShell &rWrtSh, const String &rLangText, bool bIsForSelection, SfxItemSet &rCoreSet ); @@ -59,10 +59,10 @@ namespace SwLangHelper extern String GetTextForLanguageGuessing( EditEngine* rEditEngine, ESelection aDocSelection ); extern String GetTextForLanguageGuessing( SwWrtShell &rSh ); - extern LanguageType GetLanguage( SfxItemSet aSet, USHORT nLangWhichId ); - extern LanguageType GetLanguage( SwWrtShell &rSh, USHORT nLangWhichId ); + extern LanguageType GetLanguage( SfxItemSet aSet, sal_uInt16 nLangWhichId ); + extern LanguageType GetLanguage( SwWrtShell &rSh, sal_uInt16 nLangWhichId ); - extern LanguageType GetCurrentLanguage( SfxItemSet aSet, USHORT nScriptType ); + extern LanguageType GetCurrentLanguage( SfxItemSet aSet, sal_uInt16 nScriptType ); extern LanguageType GetCurrentLanguage( SwWrtShell &rSh ); } diff --git a/sw/source/ui/inc/linenum.hxx b/sw/source/ui/inc/linenum.hxx index ae99c2f505..a3a87aa11f 100644 --- a/sw/source/ui/inc/linenum.hxx +++ b/sw/source/ui/inc/linenum.hxx @@ -63,6 +63,7 @@ public: class SwLineNumberingPage : public SfxTabPage { CheckBox aNumberingOnCB; + FixedLine aDisplayFL; FixedText aCharStyleFT; ListBox aCharStyleLB; FixedText aFormatFT; @@ -74,17 +75,16 @@ class SwLineNumberingPage : public SfxTabPage FixedText aNumIntervalFT; NumericField aNumIntervalNF; FixedText aNumRowsFT; - FixedLine aDisplayFL; + FixedLine aDivisorFL; FixedText aDivisorFT; Edit aDivisorED; FixedText aDivIntervalFT; NumericField aDivIntervalNF; FixedText aDivRowsFT; - FixedLine aDivisorFL; + FixedLine aCountFL; CheckBox aCountEmptyLinesCB; CheckBox aCountFrameLinesCB; CheckBox aRestartEachPageCB; - FixedLine aCountFL; SwWrtShell* pSh; @@ -98,7 +98,7 @@ public: static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet ); - virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual sal_Bool FillItemSet( SfxItemSet& rSet ); virtual void Reset( const SfxItemSet& rSet ); }; diff --git a/sw/source/ui/inc/macassgn.hxx b/sw/source/ui/inc/macassgn.hxx index c2be6cbdf1..e1329564c4 100644 --- a/sw/source/ui/inc/macassgn.hxx +++ b/sw/source/ui/inc/macassgn.hxx @@ -47,7 +47,7 @@ class SwMacroAssignDlg { public: static SfxEventNamesItem AddEvents( DlgEventType eType ); - static BOOL INetFmtDlg( Window* pParent, SwWrtShell& rSh, + static sal_Bool INetFmtDlg( Window* pParent, SwWrtShell& rSh, SvxMacroItem*& rpINetItem ); }; diff --git a/sw/source/ui/inc/mailconfigpage.hxx b/sw/source/ui/inc/mailconfigpage.hxx index fded1cb9fc..7bdc45b6c9 100644 --- a/sw/source/ui/inc/mailconfigpage.hxx +++ b/sw/source/ui/inc/mailconfigpage.hxx @@ -81,7 +81,7 @@ public: static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet); - virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual sal_Bool FillItemSet( SfxItemSet& rSet ); virtual void Reset( const SfxItemSet& rSet ); }; diff --git a/sw/source/ui/inc/mailmergechildwindow.hxx b/sw/source/ui/inc/mailmergechildwindow.hxx index f79055a837..83a9420f86 100644 --- a/sw/source/ui/inc/mailmergechildwindow.hxx +++ b/sw/source/ui/inc/mailmergechildwindow.hxx @@ -51,7 +51,7 @@ class SwMailMergeChildWindow : public SfxChildWindow { public: SwMailMergeChildWindow( Window* , - USHORT nId, + sal_uInt16 nId, SfxBindings*, SfxChildWinInfo* ); diff --git a/sw/source/ui/inc/mailmrge.hxx b/sw/source/ui/inc/mailmrge.hxx index b229e511e6..b566ecffaf 100644 --- a/sw/source/ui/inc/mailmrge.hxx +++ b/sw/source/ui/inc/mailmrge.hxx @@ -117,7 +117,7 @@ class SwMailMergeDlg : public SvxStandardDialog const String& rDBName; const String& rTableName; - USHORT nMergeType; + sal_uInt16 nMergeType; ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > m_aSelection; ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > xFrame; @@ -146,7 +146,7 @@ public: ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >* pSelection = 0); ~SwMailMergeDlg(); - inline USHORT GetMergeType() { return nMergeType; } + inline sal_uInt16 GetMergeType() { return nMergeType; } const ::rtl::OUString& GetSaveFilter() const {return m_sSaveFilter;} inline const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > GetSelection() const { return m_aSelection; } ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet> GetResultSet() const; @@ -166,7 +166,7 @@ public: SwMailMergeCreateFromDlg(Window* pParent); ~SwMailMergeCreateFromDlg(); - BOOL IsThisDocument() const {return aThisDocRB.IsChecked();} + sal_Bool IsThisDocument() const {return aThisDocRB.IsChecked();} }; class SwMailMergeFieldConnectionsDlg : public ModalDialog @@ -184,7 +184,7 @@ public: SwMailMergeFieldConnectionsDlg(Window* pParent); ~SwMailMergeFieldConnectionsDlg(); - BOOL IsUseExistingConnections() const {return aUseExistingRB.IsChecked();} + sal_Bool IsUseExistingConnections() const {return aUseExistingRB.IsChecked();} }; #endif diff --git a/sw/source/ui/inc/makefile.mk b/sw/source/ui/inc/makefile.mk deleted file mode 100644 index cb9b968dcc..0000000000 --- a/sw/source/ui/inc/makefile.mk +++ /dev/null @@ -1,42 +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=uiinc - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -# --- Files -------------------------------------------------------- - -LOCALIZE_ME=swmn_tmpl.hrc toolbox_tmpl.hrc - -.INCLUDE : target.mk - diff --git a/sw/source/ui/inc/mergetbl.hxx b/sw/source/ui/inc/mergetbl.hxx index 0b765ea6ce..81cc96de77 100644 --- a/sw/source/ui/inc/mergetbl.hxx +++ b/sw/source/ui/inc/mergetbl.hxx @@ -43,12 +43,12 @@ class SwMergeTblDlg : public SvxStandardDialog RadioButton aMergePrevRB; RadioButton aMergeNextRB; - BOOL& rMergePrev; + sal_Bool& rMergePrev; protected: virtual void Apply(); public: - SwMergeTblDlg( Window *pParent, BOOL& rWithPrev ); + SwMergeTblDlg( Window *pParent, sal_Bool& rWithPrev ); }; #endif diff --git a/sw/source/ui/inc/mmconfigitem.hxx b/sw/source/ui/inc/mmconfigitem.hxx index 1bdace0097..ba2b202aea 100644 --- a/sw/source/ui/inc/mmconfigitem.hxx +++ b/sw/source/ui/inc/mmconfigitem.hxx @@ -68,8 +68,8 @@ class SW_DLLPUBLIC SwMailMergeConfigItem ::rtl::OUString m_rAddressBlockFrame; ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any> m_aSelection; - USHORT m_nStartPrint; - USHORT m_nEndPrint; + sal_uInt16 m_nStartPrint; + sal_uInt16 m_nEndPrint; ::rtl::OUString m_sSelectedPrinter; @@ -256,10 +256,10 @@ public: SwDocMergeInfo& GetDocumentMergeInfo(sal_uInt32 nDocument); sal_uInt32 GetMergedDocumentCount() const; - void SetPrintRange( USHORT nStartDocument, USHORT nEndDocument) + void SetPrintRange( sal_uInt16 nStartDocument, sal_uInt16 nEndDocument) {m_nStartPrint = nStartDocument; m_nEndPrint = nEndDocument;} - USHORT GetPrintRangeStart() const {return m_nStartPrint;} - USHORT GetPrintRangeEnd() const {return m_nEndPrint;} + sal_uInt16 GetPrintRangeStart() const {return m_nStartPrint;} + sal_uInt16 GetPrintRangeEnd() const {return m_nEndPrint;} const ::rtl::OUString& GetSelectedPrinter() const {return m_sSelectedPrinter;} void SetSelectedPrinter(const ::rtl::OUString& rSet ) diff --git a/sw/source/ui/inc/multmrk.hxx b/sw/source/ui/inc/multmrk.hxx index 9c9846071f..79413fe306 100644 --- a/sw/source/ui/inc/multmrk.hxx +++ b/sw/source/ui/inc/multmrk.hxx @@ -55,7 +55,7 @@ class SwMultiTOXMarkDlg : public SvxStandardDialog CancelButton aCancelBT; SwTOXMgr &rMgr; - USHORT nPos; + sal_uInt16 nPos; void Apply(); public: diff --git a/sw/source/ui/inc/navicont.hxx b/sw/source/ui/inc/navicont.hxx index d9bce94770..f0df6c3b1e 100644 --- a/sw/source/ui/inc/navicont.hxx +++ b/sw/source/ui/inc/navicont.hxx @@ -44,19 +44,19 @@ class NaviContentBookmark String aUrl; // URL inkl. Sprungmarke String aDescr; // Description long nDocSh; // Adresse der DocShell - USHORT nDefDrag; // Description enthaelt defaultDragType + sal_uInt16 nDefDrag; // Description enthaelt defaultDragType public: NaviContentBookmark(); NaviContentBookmark( const String &rUrl, const String& rDesc, - USHORT nDragType, const SwDocShell* ); + sal_uInt16 nDragType, const SwDocShell* ); const String& GetURL() const { return aUrl; } const String& GetDescription() const { return aDescr; } - USHORT GetDefaultDragType() const { return nDefDrag; } + sal_uInt16 GetDefaultDragType() const { return nDefDrag; } long GetDocShell() const { return nDocSh; } void Copy( TransferDataContainer& rData ) const; - BOOL Paste( TransferableDataHelper& rData ); + sal_Bool Paste( TransferableDataHelper& rData ); }; #endif diff --git a/sw/source/ui/inc/navipi.hxx b/sw/source/ui/inc/navipi.hxx index b9c73b06a0..d29ed815d4 100644 --- a/sw/source/ui/inc/navipi.hxx +++ b/sw/source/ui/inc/navipi.hxx @@ -94,19 +94,19 @@ class SwNavigationPI : public Window, long nDocLBIniHeight; long nWishWidth; - USHORT nAutoMarkIdx; - USHORT nRegionMode; // 0 - URL, 1 - Bereich mit Link 2 - B. ohne Link + sal_uInt16 nAutoMarkIdx; + sal_uInt16 nRegionMode; // 0 - URL, 1 - Bereich mit Link 2 - B. ohne Link short nZoomIn; short nZoomOutInit; short nZoomOut; - BOOL bSmallMode : 1; - BOOL bIsZoomedIn : 1; - BOOL bPageCtrlsVisible : 1; - BOOL bGlobalMode : 1; + sal_Bool bSmallMode : 1; + sal_Bool bIsZoomedIn : 1; + sal_Bool bPageCtrlsVisible : 1; + sal_Bool bGlobalMode : 1; // --------- methods ----------------------------- - BOOL _IsZoomedIn() const {return bIsZoomedIn;} + sal_Bool _IsZoomedIn() const {return bIsZoomedIn;} void _ZoomOut(); void _ZoomIn(); @@ -138,7 +138,7 @@ class SwNavigationPI : public Window, protected: - virtual BOOL Close(); + virtual sal_Bool Close(); virtual void Resize(); virtual void DataChanged( const DataChangedEvent& rDCEvt ); @@ -147,8 +147,8 @@ protected: virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ); NumEditAction& GetPageEdit(); - BOOL ToggleTree(); - void SetGlobalMode(BOOL bSet) {bGlobalMode = bSet;} + sal_Bool ToggleTree(); + void SetGlobalMode(sal_Bool bSet) {bGlobalMode = bSet;} public: @@ -159,32 +159,32 @@ public: void Update() { FillBox(); } void UpdateListBox(); - void MoveOutline(USHORT nSource, USHORT nTarget, BOOL bWithCilds); + void MoveOutline(sal_uInt16 nSource, sal_uInt16 nTarget, sal_Bool bWithCilds); - virtual void StateChanged( USHORT nSID, SfxItemState eState, + virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ); static String CreateDropFileName( TransferableDataHelper& rData ); static void CleanEntry( String& rEntry ); - USHORT GetRegionDropMode() const {return nRegionMode;} - void SetRegionDropMode(USHORT nNewMode); + sal_uInt16 GetRegionDropMode() const {return nRegionMode;} + void SetRegionDropMode(sal_uInt16 nNewMode); sal_Int8 AcceptDrop( const AcceptDropEvent& rEvt ); sal_Int8 ExecuteDrop( const ExecuteDropEvent& rEvt ); - BOOL IsGlobalDoc() const; - BOOL IsGlobalMode() const {return bGlobalMode;} + sal_Bool IsGlobalDoc() const; + sal_Bool IsGlobalMode() const {return bGlobalMode;} SwView* GetCreateView() const; - void CreateNavigationTool(const Rectangle& rRect, BOOL bSetFocus); + void CreateNavigationTool(const Rectangle& rRect, sal_Bool bSetFocus); }; class SwNavigationChild : public SfxChildWindowContext { public: SwNavigationChild( Window* , - USHORT nId, + sal_uInt16 nId, SfxBindings*, SfxChildWinInfo* ); diff --git a/sw/source/ui/inc/navmgr.hxx b/sw/source/ui/inc/navmgr.hxx index b2d35ae07e..2a86172e6c 100644 --- a/sw/source/ui/inc/navmgr.hxx +++ b/sw/source/ui/inc/navmgr.hxx @@ -60,9 +60,9 @@ public: /* Constructor that initializes the shell to the current shell */ SwNavigationMgr( SwWrtShell* pShell ); /* Can we go back in the history ? */ - BOOL backEnabled() ; + sal_Bool backEnabled() ; /* Can we go forward in the history ? */ - BOOL forwardEnabled(); + sal_Bool forwardEnabled(); /* The method that is called when we click the back button */ void goBack() ; /* The method that is called when we click the forward button */ diff --git a/sw/source/ui/inc/num.hxx b/sw/source/ui/inc/num.hxx index 76d141dfae..287b8d341b 100644 --- a/sw/source/ui/inc/num.hxx +++ b/sw/source/ui/inc/num.hxx @@ -48,7 +48,7 @@ class SwOutlineTabDialog; struct SwBmpItemInfo { SvxBrushItem* pBrushItem; - USHORT nItemId; + sal_uInt16 nItemId; }; #define NUM_PAGETYPE_BULLET 0 @@ -59,12 +59,12 @@ struct SwBmpItemInfo class SwNumPositionTabPage : public SfxTabPage { - FixedLine aPositionFL; - FixedLine aLevelFL; + FixedLine aLevelFL; MultiListBox aLevelLB; // former set of controls shown for numbering rules containing list level // attributes in SvxNumberFormat::SvxNumPositionAndSpaceMode == LABEL_WIDTH_AND_POSITION + FixedLine aPositionFL; FixedText aDistBorderFT; MetricField aDistBorderMF; CheckBox aRelativeCB; @@ -97,11 +97,11 @@ class SwNumPositionTabPage : public SfxTabPage SwWrtShell* pWrtSh; SwOutlineTabDialog* pOutlineDlg; - USHORT nActNumLvl; + sal_uInt16 nActNumLvl; - BOOL bModified : 1; - BOOL bPreset : 1; - BOOL bInInintControl : 1; //Modify-Fehler umgehen, soll ab 391 behoben sein + sal_Bool bModified : 1; + sal_Bool bPreset : 1; + sal_Bool bInInintControl : 1; //Modify-Fehler umgehen, soll ab 391 behoben sein bool bLabelAlignmentPosAndSpaceModeActive; void InitControls(); @@ -131,7 +131,7 @@ public: virtual void ActivatePage(const SfxItemSet& rSet); virtual int DeactivatePage(SfxItemSet *pSet); - virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual sal_Bool FillItemSet( SfxItemSet& rSet ); virtual void Reset( const SfxItemSet& rSet ); static SfxTabPage* Create( Window* pParent, @@ -140,10 +140,10 @@ public: void SetOutlineTabDialog(SwOutlineTabDialog* pDlg){pOutlineDlg = pDlg;} void SetWrtShell(SwWrtShell* pSh); #if OSL_DEBUG_LEVEL > 1 - void SetModified(BOOL bRepaint = TRUE); + void SetModified(sal_Bool bRepaint = sal_True); #else - void SetModified(BOOL bRepaint = TRUE) - { bModified = TRUE; + void SetModified(sal_Bool bRepaint = sal_True) + { bModified = sal_True; if(bRepaint) { aPreviewWIN.SetLevel(nActNumLvl); @@ -162,7 +162,7 @@ class SwSvxNumBulletTabDialog : public SfxTabDialog protected: virtual short Ok(); - virtual void PageCreated(USHORT nPageId, SfxTabPage& rPage); + virtual void PageCreated(sal_uInt16 nPageId, SfxTabPage& rPage); DECL_LINK(RemoveNumberingHdl, PushButton*); public: SwSvxNumBulletTabDialog(Window* pParent, diff --git a/sw/source/ui/inc/numberingtypelistbox.hxx b/sw/source/ui/inc/numberingtypelistbox.hxx index 68ba9615fc..164e3526a2 100644 --- a/sw/source/ui/inc/numberingtypelistbox.hxx +++ b/sw/source/ui/inc/numberingtypelistbox.hxx @@ -45,10 +45,10 @@ class SW_DLLPUBLIC SwNumberingTypeListBox : public ListBox public: SwNumberingTypeListBox( Window* pWin, const ResId& rResId, - USHORT nTypeFlags = INSERT_NUM_TYPE_PAGE_STYLE_NUMBERING|INSERT_NUM_TYPE_NO_NUMBERING|INSERT_NUM_EXTENDED_TYPES ); + sal_uInt16 nTypeFlags = INSERT_NUM_TYPE_PAGE_STYLE_NUMBERING|INSERT_NUM_TYPE_NO_NUMBERING|INSERT_NUM_EXTENDED_TYPES ); ~SwNumberingTypeListBox(); - void Reload(USHORT nTypeFlags); + void Reload(sal_uInt16 nTypeFlags); sal_Int16 GetSelectedNumberingType(); sal_Bool SelectNumberingType(sal_Int16 nType); diff --git a/sw/source/ui/inc/numfmtlb.hxx b/sw/source/ui/inc/numfmtlb.hxx index cb72486f71..72204448f9 100644 --- a/sw/source/ui/inc/numfmtlb.hxx +++ b/sw/source/ui/inc/numfmtlb.hxx @@ -37,49 +37,49 @@ class SwView; class SW_DLLPUBLIC NumFormatListBox : public ListBox { short nCurrFormatType; - USHORT nStdEntry; - BOOL bOneArea; - ULONG nDefFormat; + sal_uInt16 nStdEntry; + sal_Bool bOneArea; + sal_uLong nDefFormat; SwView* pVw; SvNumberFormatter* pOwnFormatter; LanguageType eCurLanguage; - BOOL bShowLanguageControl; //determine whether the language control has + sal_Bool bShowLanguageControl; //determine whether the language control has //to be shown in the number format dialog - BOOL bUseAutomaticLanguage;//determine whether language is automatically assigned + sal_Bool bUseAutomaticLanguage;//determine whether language is automatically assigned SW_DLLPRIVATE DECL_LINK( SelectHdl, ListBox * ); SW_DLLPRIVATE double GetDefValue(const short nFormatType) const; - SW_DLLPRIVATE void Init(short nFormatType, BOOL bUsrFmts); + SW_DLLPRIVATE void Init(short nFormatType, sal_Bool bUsrFmts); SW_DLLPRIVATE SwView* GetView(); public: NumFormatListBox( Window* pWin, const ResId& rResId, - short nFormatType = NUMBERFORMAT_NUMBER, ULONG nDefFmt = 0, - BOOL bUsrFmts = TRUE ); + short nFormatType = NUMBERFORMAT_NUMBER, sal_uLong nDefFmt = 0, + sal_Bool bUsrFmts = sal_True ); NumFormatListBox( Window* pWin, SwView* pView, const ResId& rResId, - short nFormatType = NUMBERFORMAT_NUMBER, ULONG nDefFmt = 0, - BOOL bUsrFmts = TRUE ); + short nFormatType = NUMBERFORMAT_NUMBER, sal_uLong nDefFmt = 0, + sal_Bool bUsrFmts = sal_True ); ~NumFormatListBox(); void Clear(); - inline void SetOneArea(BOOL bOnlyOne = TRUE) { bOneArea = bOnlyOne; } + inline void SetOneArea(sal_Bool bOnlyOne = sal_True) { bOneArea = bOnlyOne; } void SetFormatType(const short nFormatType); inline short GetFormatType() const { return nCurrFormatType; } - void SetDefFormat(const ULONG nDefFmt); - ULONG GetFormat() const; + void SetDefFormat(const sal_uLong nDefFmt); + sal_uLong GetFormat() const; inline LanguageType GetCurLanguage() const { return eCurLanguage;} void SetLanguage(LanguageType eSet) { eCurLanguage = eSet;} - void SetAutomaticLanguage(BOOL bSet){bUseAutomaticLanguage = bSet;} - BOOL IsAutomaticLanguage()const {return bUseAutomaticLanguage;} + void SetAutomaticLanguage(sal_Bool bSet){bUseAutomaticLanguage = bSet;} + sal_Bool IsAutomaticLanguage()const {return bUseAutomaticLanguage;} - void SetShowLanguageControl(BOOL bSet){bShowLanguageControl = bSet;} + void SetShowLanguageControl(sal_Bool bSet){bShowLanguageControl = bSet;} }; diff --git a/sw/source/ui/inc/numpara.hxx b/sw/source/ui/inc/numpara.hxx index d084a5d8a0..8bde96eaf6 100644 --- a/sw/source/ui/inc/numpara.hxx +++ b/sw/source/ui/inc/numpara.hxx @@ -47,10 +47,10 @@ class SwParagraphNumTabPage : public SfxTabPage FixedText aOutlineLvFT; ListBox aOutlineLvLB; + FixedLine aNewStartFL; FixedText aNumberStyleFT; ListBox aNumberStyleLB; - FixedLine aNewStartFL; TriStateBox aNewStartCB; TriStateBox aNewStartNumberCB; NumericField aNewStartNF; @@ -65,8 +65,8 @@ class SwParagraphNumTabPage : public SfxTabPage const String msOutlineNumbering; // <-- - BOOL bModified : 1; - BOOL bCurNumrule : 1; + sal_Bool bModified : 1; + sal_Bool bCurNumrule : 1; DECL_LINK( NewStartHdl_Impl, CheckBox* ); DECL_LINK( StyleHdl_Impl, ListBox* ); @@ -80,9 +80,9 @@ public: static SfxTabPage* Create( Window* pParent, const SfxItemSet& rSet ); - static USHORT* GetRanges(); + static sal_uInt16* GetRanges(); - virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual sal_Bool FillItemSet( SfxItemSet& rSet ); virtual void Reset( const SfxItemSet& rSet ); void EnableNewStart(); diff --git a/sw/source/ui/inc/numprevw.hxx b/sw/source/ui/inc/numprevw.hxx index 1987c4dcc9..e08e809979 100644 --- a/sw/source/ui/inc/numprevw.hxx +++ b/sw/source/ui/inc/numprevw.hxx @@ -40,8 +40,8 @@ class NumberingPreview : public Window Font aStdFont; long nPageWidth; const String* pOutlineNames; - BOOL bPosition; - UINT16 nActLevel; + sal_Bool bPosition; + sal_uInt16 nActLevel; protected: virtual void Paint( const Rectangle& rRect ); @@ -49,7 +49,7 @@ class NumberingPreview : public Window public: NumberingPreview(Window* pParent, const ResId& rResId ) : Window(pParent, rResId), - pActNum(0),nPageWidth(0), pOutlineNames(0), bPosition(FALSE), nActLevel(USHRT_MAX) {} + pActNum(0),nPageWidth(0), pOutlineNames(0), bPosition(sal_False), nActLevel(USHRT_MAX) {} ~NumberingPreview(); void SetNumRule(const SwNumRule* pNum) @@ -59,8 +59,8 @@ class NumberingPreview : public Window void SetOutlineNames(const String* pNames) {pOutlineNames = pNames;} void SetPositionMode() - { bPosition = TRUE;} - void SetLevel(USHORT nSet) {nActLevel = nSet;} + { bPosition = sal_True;} + void SetLevel(sal_uInt16 nSet) {nActLevel = nSet;} }; diff --git a/sw/source/ui/inc/olmenu.hxx b/sw/source/ui/inc/olmenu.hxx index df7e083e2d..bd8f2d68a4 100644 --- a/sw/source/ui/inc/olmenu.hxx +++ b/sw/source/ui/inc/olmenu.hxx @@ -65,7 +65,7 @@ class SwSpellPopup : public PopupMenu Image aInfo16; - void fillLangPopupMenu( PopupMenu *pPopupMenu, USHORT nLangStart, + void fillLangPopupMenu( PopupMenu *pPopupMenu, sal_uInt16 nLangStart, ::com::sun::star::uno::Sequence< ::rtl::OUString > aSeq, SwWrtShell* pWrtSh, std::map< sal_Int16, ::rtl::OUString > &rLangTable ); @@ -84,7 +84,7 @@ public: const String & rParaText ); sal_uInt16 Execute( const Rectangle& rPopupPos, Window* pWin ); - void Execute( USHORT nId ); + void Execute( sal_uInt16 nId ); }; diff --git a/sw/source/ui/inc/optcomp.hxx b/sw/source/ui/inc/optcomp.hxx index 6d2c525460..0416b15167 100644 --- a/sw/source/ui/inc/optcomp.hxx +++ b/sw/source/ui/inc/optcomp.hxx @@ -60,7 +60,7 @@ private: // impl object SwCompatibilityOptPage_Impl* m_pImpl; // saved options after "Reset"; used in "FillItemSet" for comparison - ULONG m_nSavedOptions; + sal_uLong m_nSavedOptions; // handler DECL_LINK( SelectHdl, ListBox* ); @@ -69,8 +69,8 @@ private: // private methods void InitControls( const SfxItemSet& rSet ); void ReplaceFormatName( String& rEntry ); - void SetCurrentOptions( ULONG nOptions ); - ULONG GetDocumentOptions() const; + void SetCurrentOptions( sal_uLong nOptions ); + sal_uLong GetDocumentOptions() const; void WriteOptions(); public: @@ -79,7 +79,7 @@ public: static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet ); - virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual sal_Bool FillItemSet( SfxItemSet& rSet ); virtual void Reset( const SfxItemSet& rSet ); }; diff --git a/sw/source/ui/inc/optload.hxx b/sw/source/ui/inc/optload.hxx index bbef62cc58..c96789733a 100644 --- a/sw/source/ui/inc/optload.hxx +++ b/sw/source/ui/inc/optload.hxx @@ -67,7 +67,7 @@ private: SwWrtShell* pWrtShell; sal_Bool bHTMLMode; - UINT16 nLastTab; + sal_uInt16 nLastTab; sal_Int32 nOldLinkMode; DECL_LINK(CaptionHdl, PushButton*); @@ -80,7 +80,7 @@ public: static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet); - virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual sal_Bool FillItemSet( SfxItemSet& rSet ); virtual void Reset( const SfxItemSet& rSet ); }; @@ -166,8 +166,8 @@ private: String sNone; SwFldMgr *pMgr; - USHORT eType; - BOOL bHTMLMode; + sal_uInt16 eType; + sal_Bool bHTMLMode; DECL_LINK( SelectHdl, ListBox *pLB = 0 ); DECL_LINK( ModifyHdl, Edit *pEdt = 0 ); @@ -176,7 +176,7 @@ private: DECL_LINK( SaveEntryHdl, SvxCheckListBox *pLB = 0 ); void DelUserData(); - void SetOptions( const USHORT nPos, + void SetOptions( const sal_uInt16 nPos, const SwCapObjType eType, const SvGlobalName *pOleId = 0); void SaveEntry( SvLBoxEntry* pEntry ); @@ -190,7 +190,7 @@ public: static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet); - virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual sal_Bool FillItemSet( SfxItemSet& rSet ); virtual void Reset( const SfxItemSet& rSet ); }; diff --git a/sw/source/ui/inc/optpage.hxx b/sw/source/ui/inc/optpage.hxx index 2fcf9b3a75..dcdd067a54 100644 --- a/sw/source/ui/inc/optpage.hxx +++ b/sw/source/ui/inc/optpage.hxx @@ -89,7 +89,7 @@ public: static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet); - virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual sal_Bool FillItemSet( SfxItemSet& rSet ); virtual void Reset( const SfxItemSet& rSet ); }; @@ -120,11 +120,11 @@ class SwAddPrinterTabPage : public SfxTabPage FixedLine aSeparatorRFL; + FixedLine aFL3; RadioButton aNoRB; RadioButton aOnlyRB; RadioButton aEndRB; RadioButton aEndPageRB; - FixedLine aFL3; FixedLine aFL4; CheckBox aPrintEmptyPagesCB; // CheckBox aSingleJobsCB; @@ -133,8 +133,8 @@ class SwAddPrinterTabPage : public SfxTabPage ListBox aFaxLB; String sNone; - BOOL bAttrModified; - BOOL bPreview; + sal_Bool bAttrModified; + sal_Bool bPreview; void Init(); DECL_LINK( AutoClickHdl, CheckBox * ); @@ -148,11 +148,11 @@ public: static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet ); - virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual sal_Bool FillItemSet( SfxItemSet& rSet ); virtual void Reset( const SfxItemSet& rSet ); void SetFax( const SvStringsDtor& ); void SelectFax( const String& ); - void SetPreview(BOOL bPrev); + void SetPreview(sal_Bool bPrev); virtual void PageCreated (SfxAllItemSet aSet); }; @@ -200,20 +200,20 @@ class SwStdFontTabPage : public SfxTabPage SwWrtShell* pWrtShell; LanguageType eLanguage; // waren nur defaults vorhanden? wurden sie mit den Boxen ueberschrieben - BOOL bListDefault :1; - BOOL bSetListDefault :1; - BOOL bLabelDefault :1; - BOOL bSetLabelDefault :1; - BOOL bIdxDefault :1; - BOOL bSetIdxDefault :1; - BOOL bDeletePrinter :1; - - BOOL bListHeightDefault :1; - BOOL bSetListHeightDefault :1; - BOOL bLabelHeightDefault :1; - BOOL bSetLabelHeightDefault :1; - BOOL bIndexHeightDefault :1; - BOOL bSetIndexHeightDefault :1; + sal_Bool bListDefault :1; + sal_Bool bSetListDefault :1; + sal_Bool bLabelDefault :1; + sal_Bool bSetLabelDefault :1; + sal_Bool bIdxDefault :1; + sal_Bool bSetIdxDefault :1; + sal_Bool bDeletePrinter :1; + + sal_Bool bListHeightDefault :1; + sal_Bool bSetListHeightDefault :1; + sal_Bool bLabelHeightDefault :1; + sal_Bool bSetLabelHeightDefault :1; + sal_Bool bIndexHeightDefault :1; + sal_Bool bSetIndexHeightDefault :1; sal_uInt8 nFontGroup; //fontcfg.hxx: FONT_GROUP_[STANDARD|CJK|CTL] @@ -234,7 +234,7 @@ public: static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet ); - virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual sal_Bool FillItemSet( SfxItemSet& rSet ); virtual void Reset( const SfxItemSet& rSet ); void SetFontMode(sal_uInt8 nGroup) {nFontGroup = nGroup;} @@ -278,7 +278,7 @@ class SwTableOptionsTabPage : public SfxTabPage FixedText aVarFT; SwWrtShell* pWrtShell; - BOOL bHTMLMode; + sal_Bool bHTMLMode; DECL_LINK(CheckBoxHdl, CheckBox *pCB); @@ -292,7 +292,7 @@ public: static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet ); - virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual sal_Bool FillItemSet( SfxItemSet& rSet ); virtual void Reset( const SfxItemSet& rSet ); void SetWrtShell(SwWrtShell* pSh) {pWrtShell = pSh;} @@ -331,6 +331,12 @@ class SwShdwCrsrOptionsTabPage : public SfxTabPage FixedLine aCrsrOptFL; CheckBox aCrsrInProtCB; + FixedLine m_aLayoutOptionsFL; + CheckBox m_aMathBaselineAlignmentCB; + + SwWrtShell * m_pWrtShell; + + SwShdwCrsrOptionsTabPage( Window* pParent, const SfxItemSet& rSet ); ~SwShdwCrsrOptionsTabPage(); @@ -338,8 +344,11 @@ public: static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet ); - virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual sal_Bool FillItemSet( SfxItemSet& rSet ); virtual void Reset( const SfxItemSet& rSet ); + + void SetWrtShell( SwWrtShell * pSh ) { m_pWrtShell = pSh; } + virtual void PageCreated( SfxAllItemSet aSet ); }; /*----------------------------------------------------------------------- @@ -359,7 +368,7 @@ class SwMarkPreview : public Window Rectangle aLeftPagePrtArea; Rectangle aRightPagePrtArea; - USHORT nMarkPos; + sal_uInt16 nMarkPos; using OutputDevice::DrawRect; void DrawRect(const Rectangle &rRect, const Color &rFillColor, const Color &rLineColor); @@ -376,7 +385,7 @@ public: virtual ~SwMarkPreview(); inline void SetColor(const Color& rCol) { m_aMarkCol = rCol; } - inline void SetMarkPos(USHORT nPos) { nMarkPos = nPos; } + inline void SetMarkPos(sal_uInt16 nPos) { nMarkPos = nPos; } }; /*----------------------------------------------------------------------- @@ -431,7 +440,7 @@ public: static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet ); - virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual sal_Bool FillItemSet( SfxItemSet& rSet ); virtual void Reset( const SfxItemSet& rSet ); }; @@ -450,7 +459,7 @@ public: static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet ); - virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual sal_Bool FillItemSet( SfxItemSet& rSet ); virtual void Reset( const SfxItemSet& rSet ); private: @@ -466,7 +475,7 @@ private: CheckBox aTest9CBox; CheckBox aTest10CBox; - BOOL bAttrModified; + sal_Bool bAttrModified; void Init(); DECL_LINK( AutoClickHdl, CheckBox * ); @@ -475,5 +484,4 @@ private: #endif //PRODUCT #endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
\ No newline at end of file diff --git a/sw/source/ui/inc/outline.hxx b/sw/source/ui/inc/outline.hxx index 4992bb6dd5..7c8e37bc3d 100644 --- a/sw/source/ui/inc/outline.hxx +++ b/sw/source/ui/inc/outline.hxx @@ -54,7 +54,7 @@ class SwChapterNumRules; class SwOutlineTabDialog : public SfxTabDialog { - static USHORT nNumLevel; + static sal_uInt16 nNumLevel; String aNullStr; String aCollNames[MAXLEVEL]; @@ -64,14 +64,14 @@ class SwOutlineTabDialog : public SfxTabDialog SwNumRule* pNumRule; SwChapterNumRules* pChapterNumRules; - BOOL bModified : 1; + sal_Bool bModified : 1; protected: DECL_LINK( CancelHdl, Button * ); DECL_LINK( FormHdl, Button * ); DECL_LINK( MenuSelectHdl, Menu * ); - virtual void PageCreated(USHORT nPageId, SfxTabPage& rPage); + virtual void PageCreated(sal_uInt16 nPageId, SfxTabPage& rPage); virtual short Ok(); public: @@ -81,18 +81,19 @@ class SwOutlineTabDialog : public SfxTabDialog ~SwOutlineTabDialog(); SwNumRule* GetNumRule() {return pNumRule;} - USHORT GetLevel(const String &rFmtName) const; + sal_uInt16 GetLevel(const String &rFmtName) const; String* GetCollNames() {return aCollNames;} - static USHORT GetActNumLevel() {return nNumLevel;} - static void SetActNumLevel(USHORT nSet) {nNumLevel = nSet;} + static sal_uInt16 GetActNumLevel() {return nNumLevel;} + static void SetActNumLevel(sal_uInt16 nSet) {nNumLevel = nSet;} }; class SwOutlineSettingsTabPage : public SfxTabPage { - ListBox aLevelLB; FixedLine aLevelFL; + ListBox aLevelLB; + FixedLine aNumberFL; FixedText aCollLbl; ListBox aCollBox; FixedText aNumberLbl; @@ -108,7 +109,6 @@ class SwOutlineSettingsTabPage : public SfxTabPage Edit aSuffixED; FixedText aStartLbl; NumericField aStartEdit; - FixedLine aNumberFL; NumberingPreview aPreviewWIN; String aNoFmtName; @@ -116,7 +116,7 @@ class SwOutlineSettingsTabPage : public SfxTabPage SwWrtShell* pSh; SwNumRule* pNumRule; String* pCollNames; - USHORT nActLevel; + sal_uInt16 nActLevel; DECL_LINK( LevelHdl, ListBox * ); DECL_LINK( ToggleComplete, NumericField * ); @@ -144,7 +144,7 @@ public: virtual void ActivatePage(const SfxItemSet& rSet); virtual int DeactivatePage(SfxItemSet *pSet); - virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual sal_Bool FillItemSet( SfxItemSet& rSet ); virtual void Reset( const SfxItemSet& rSet ); static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet); diff --git a/sw/source/ui/inc/pgfnote.hxx b/sw/source/ui/inc/pgfnote.hxx index 22a2629625..810a35b6ae 100644 --- a/sw/source/ui/inc/pgfnote.hxx +++ b/sw/source/ui/inc/pgfnote.hxx @@ -44,22 +44,23 @@ class SwFootNotePage: public SfxTabPage { public: static SfxTabPage *Create(Window *pParent, const SfxItemSet &rSet); - static USHORT* GetRanges(); + static sal_uInt16* GetRanges(); - virtual BOOL FillItemSet(SfxItemSet &rSet); + virtual sal_Bool FillItemSet(SfxItemSet &rSet); virtual void Reset(const SfxItemSet &rSet); private: SwFootNotePage(Window *pParent, const SfxItemSet &rSet); ~SwFootNotePage(); + FixedLine aPosHeader; RadioButton aMaxHeightPageBtn; RadioButton aMaxHeightBtn; MetricField aMaxHeightEdit; FixedText aDistLbl; MetricField aDistEdit; - FixedLine aPosHeader; + FixedLine aLineHeader; FixedText aLinePosLbl; ListBox aLinePosBox; FixedText aLineTypeLbl; @@ -68,7 +69,6 @@ private: MetricField aLineWidthEdit; FixedText aLineDistLbl; MetricField aLineDistEdit; - FixedLine aLineHeader; DECL_LINK( HeightPage, Button * ); DECL_LINK( HeightMetric, Button * ); diff --git a/sw/source/ui/inc/pggrid.hxx b/sw/source/ui/inc/pggrid.hxx index c580aa5fb5..3290088472 100644 --- a/sw/source/ui/inc/pggrid.hxx +++ b/sw/source/ui/inc/pggrid.hxx @@ -103,9 +103,9 @@ class SwTextGridPage: public SfxTabPage public: static SfxTabPage *Create(Window *pParent, const SfxItemSet &rSet); - static USHORT* GetRanges(); + static sal_uInt16* GetRanges(); - virtual BOOL FillItemSet(SfxItemSet &rSet); + virtual sal_Bool FillItemSet(SfxItemSet &rSet); virtual void Reset(const SfxItemSet &rSet); virtual void ActivatePage( const SfxItemSet& rSet ); diff --git a/sw/source/ui/inc/prcntfld.hxx b/sw/source/ui/inc/prcntfld.hxx index 20df4cf8e1..da7de4676e 100644 --- a/sw/source/ui/inc/prcntfld.hxx +++ b/sw/source/ui/inc/prcntfld.hxx @@ -40,12 +40,12 @@ class SW_DLLPUBLIC PercentField : public MetricField sal_Int64 nOldBaseValue; sal_Int64 nLastPercent; sal_Int64 nLastValue; - USHORT nOldDigits; + sal_uInt16 nOldDigits; FieldUnit eOldUnit; sal_Bool bLockAutoCalculation; //prevent recalcution of percent values when the //reference value is changed - SW_DLLPRIVATE sal_Int64 ImpPower10(USHORT n); + SW_DLLPRIVATE sal_Int64 ImpPower10(sal_uInt16 n); using MetricField::SetValue; using MetricField::GetValue; @@ -69,7 +69,7 @@ public: sal_Int64 GetValue(FieldUnit eOutUnit = FUNIT_NONE); - BOOL IsValueModified(); + sal_Bool IsValueModified(); //using NumericFormatter::SetMax; void SetMax(sal_Int64 nNewMax, FieldUnit eInUnit = FUNIT_NONE); @@ -86,9 +86,9 @@ public: sal_Int64 Convert(sal_Int64 nValue, FieldUnit eInUnit, FieldUnit eOutUnit); - void ShowPercent(BOOL bPercent); + void ShowPercent(sal_Bool bPercent); - USHORT GetOldDigits() const {return nOldDigits;} + sal_uInt16 GetOldDigits() const {return nOldDigits;} void LockAutoCalculation(sal_Bool bLock) {bLockAutoCalculation = bLock;} sal_Bool IsAutoCalculationLocked()const {return bLockAutoCalculation;} diff --git a/sw/source/ui/inc/prtopt.hxx b/sw/source/ui/inc/prtopt.hxx deleted file mode 100644 index ee2454db44..0000000000 --- a/sw/source/ui/inc/prtopt.hxx +++ /dev/null @@ -1,57 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef _PRTOPT_HXX -#define _PRTOPT_HXX - -#include <unotools/configitem.hxx> -#include <printdata.hxx> - -class SwPrintOptions : public SwPrintData, public utl::ConfigItem -{ - sal_Bool bIsWeb; - - com::sun::star::uno::Sequence<rtl::OUString> GetPropertyNames(); -public: - SwPrintOptions(sal_Bool bWeb); - virtual ~SwPrintOptions(); - - virtual void Commit(); - virtual void Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& aPropertyNames ); - virtual void doSetModified( ) { bModified = sal_True; SetModified();} - - SwPrintOptions& operator=(const SwPrintData& rData) - { - SwPrintData::operator=( rData ); - SetModified(); - return *this; - } -}; - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/inc/pview.hxx b/sw/source/ui/inc/pview.hxx index 3350689bbb..875579ce06 100644 --- a/sw/source/ui/inc/pview.hxx +++ b/sw/source/ui/inc/pview.hxx @@ -55,8 +55,8 @@ class SwPagePreviewLayout; class SwPagePreViewWin : public Window { ViewShell* mpViewShell; - USHORT mnSttPage; - BYTE mnRow, mnCol; + sal_uInt16 mnSttPage; + sal_uInt8 mnRow, mnCol; Size maPxWinSize; Fraction maScale; SwPagePreView& mrView; @@ -66,7 +66,7 @@ class SwPagePreViewWin : public Window // OD 12.12.2002 #103492# SwPagePreviewLayout* mpPgPrevwLayout; - void SetPagePreview( BYTE nRow, BYTE nCol ); + void SetPagePreview( sal_uInt8 nRow, sal_uInt8 nCol ); using Window::Scroll; @@ -85,14 +85,14 @@ public: ViewShell* GetViewShell() const { return mpViewShell; } - BYTE GetRow() const { return mnRow; } - void SetRow( BYTE n ) { if( n ) mnRow = n; } + sal_uInt8 GetRow() const { return mnRow; } + void SetRow( sal_uInt8 n ) { if( n ) mnRow = n; } - BYTE GetCol() const { return mnCol; } - void SetCol( BYTE n ) { if( n ) mnCol = n; } + sal_uInt8 GetCol() const { return mnCol; } + void SetCol( sal_uInt8 n ) { if( n ) mnCol = n; } - USHORT GetSttPage() const { return mnSttPage; } - void SetSttPage( USHORT n ) { mnSttPage = n; } + sal_uInt16 GetSttPage() const { return mnSttPage; } + void SetSttPage( sal_uInt16 n ) { mnSttPage = n; } /** get selected page number of document preview @@ -116,9 +116,9 @@ public: void SetSelectedPage( sal_uInt16 _nSelectedPageNum ); //JP 19.08.98: bei Einspaltigkeit gibt es keine 0. Seite! - USHORT GetDefSttPage() const { return 1 == mnCol ? 1 : 0; } + sal_uInt16 GetDefSttPage() const { return 1 == mnCol ? 1 : 0; } - void CalcWish( BYTE nNewRow, BYTE nNewCol ); + void CalcWish( sal_uInt8 nNewRow, sal_uInt8 nNewCol ); const Size& GetWinSize() const { return maPxWinSize; } void SetWinSize( const Size& rNewSize ); @@ -129,7 +129,7 @@ public: int MovePage( int eMoveMode ); // erzeuge den String fuer die StatusLeiste - void GetStatusStr( String& rStr, USHORT nPageCount ) const; + void GetStatusStr( String& rStr, sal_uInt16 nPageCount ) const; void RepaintCoreRect( const SwRect& rRect ); @@ -150,7 +150,7 @@ public: return maPaintedPreviewDocRect; } - void Scroll(long nXMove, long nYMove, USHORT nFlags = 0); + void Scroll(long nXMove, long nYMove, sal_uInt16 nFlags = 0); /** method to enable/disable book preview @@ -160,7 +160,7 @@ public: @param _bBookPreview input parameter - boolean indicating, if book preview mode has to - switch on <TRUE> or of <FALSE> + switch on <sal_True> or of <sal_False> @return boolean indicating, if book preview mode has changed. */ @@ -184,7 +184,7 @@ class SW_DLLPUBLIC SwPagePreView: public SfxViewShell //and the new cursor position if the user double click in the PagePreView sNewCrsrPos; // to support keyboard the number of the page to go to can be set too - USHORT nNewPage; + sal_uInt16 nNewPage; // Sichtbarer Bereich String sPageStr; Size aDocSz; @@ -199,8 +199,8 @@ class SW_DLLPUBLIC SwPagePreView: public SfxViewShell // aktiv sind Window *pScrollFill; - USHORT mnPageCount; - BOOL bNormalPrint; + sal_uInt16 mnPageCount; + sal_Bool bNormalPrint; // OD 09.01.2003 #106334# // new members to reset design mode at draw view for form shell on switching @@ -211,20 +211,19 @@ class SW_DLLPUBLIC SwPagePreView: public SfxViewShell SW_DLLPRIVATE void Init(const SwViewOption* = 0); SW_DLLPRIVATE Point AlignToPixel(const Point& rPt) const; - SW_DLLPRIVATE int _CreateScrollbar( BOOL bHori ); + SW_DLLPRIVATE int _CreateScrollbar( sal_Bool bHori ); SW_DLLPRIVATE DECL_LINK( ScrollHdl, SwScrollbar * ); SW_DLLPRIVATE DECL_LINK( EndScrollHdl, SwScrollbar * ); SW_DLLPRIVATE DECL_LINK( BtnPage, Button * ); - SW_DLLPRIVATE int ChgPage( int eMvMode, int bUpdateScrollbar = TRUE ); + SW_DLLPRIVATE int ChgPage( int eMvMode, int bUpdateScrollbar = sal_True ); - SW_DLLPRIVATE virtual SfxPrinter* GetPrinter( BOOL bCreate = FALSE ); - SW_DLLPRIVATE virtual USHORT SetPrinter( SfxPrinter *pNewPrinter, USHORT nDiffFlags = SFX_PRINTER_ALL, bool bIsAPI=false ); + SW_DLLPRIVATE virtual SfxPrinter* GetPrinter( sal_Bool bCreate = sal_False ); + SW_DLLPRIVATE virtual sal_uInt16 SetPrinter( SfxPrinter *pNewPrinter, sal_uInt16 nDiffFlags = SFX_PRINTER_ALL, bool bIsAPI=false ); SW_DLLPRIVATE virtual SfxTabPage* CreatePrintOptionsPage( Window *pParent, const SfxItemSet &rOptions ); - SW_DLLPRIVATE virtual PrintDialog* CreatePrintDialog( Window *pParent ); - SW_DLLPRIVATE void CalcAndSetBorderPixel( SvBorder &rToFill, BOOL bInner ); + SW_DLLPRIVATE void CalcAndSetBorderPixel( SvBorder &rToFill, sal_Bool bInner ); /** help method to execute SfxRequest FN_PAGE_UP and FN_PAGE_DOWN @@ -247,7 +246,7 @@ protected: virtual void OuterResizePixel( const Point &rOfs, const Size &rSize ); virtual Size GetOptimalSizePixel() const; - void SetZoom(SvxZoomType eSet, USHORT nFactor); + void SetZoom(SvxZoomType eSet, sal_uInt16 nFactor); public: SFX_DECL_VIEWFACTORY(SwPagePreView); @@ -264,7 +263,7 @@ public: void DocSzChgd(const Size& rNewSize); const Size& GetDocSz() const { return aDocSz; } - virtual void SetVisArea( const Rectangle&, BOOL bUpdateScrollbar = TRUE); + virtual void SetVisArea( const Rectangle&, sal_Bool bUpdateScrollbar = sal_True); inline void AdjustEditWin(); @@ -274,16 +273,16 @@ public: void ShowVScrollbar(sal_Bool bShow); - USHORT GetPageCount() const { return mnPageCount; } + sal_uInt16 GetPageCount() const { return mnPageCount; } - BOOL HandleWheelCommands( const CommandEvent& ); + sal_Bool HandleWheelCommands( const CommandEvent& ); const String& GetPrevSwViewData() const { return sSwViewData; } void SetNewCrsrPos( const String& rStr ) { sNewCrsrPos = rStr; } const String& GetNewCrsrPos() const { return sNewCrsrPos; } - USHORT GetNewPage() const {return nNewPage;} - void SetNewPage(USHORT nSet) {nNewPage = nSet;} + sal_uInt16 GetNewPage() const {return nNewPage;} + void SetNewPage(sal_uInt16 nSet) {nNewPage = nSet;} // Handler void Execute(SfxRequest&); diff --git a/sw/source/ui/inc/redlndlg.hxx b/sw/source/ui/inc/redlndlg.hxx index 9fa3700a9d..714d52f2fe 100644 --- a/sw/source/ui/inc/redlndlg.hxx +++ b/sw/source/ui/inc/redlndlg.hxx @@ -56,9 +56,9 @@ struct SwRedlineDataParent SvLBoxEntry* pTLBParent; // zugehoeriger TreeListBox-Eintrag String sComment; // Redline-Kommentar - inline BOOL operator==( const SwRedlineDataParent& rObj ) const + inline sal_Bool operator==( const SwRedlineDataParent& rObj ) const { return (pData && pData->GetSeqNo() == rObj.pData->GetSeqNo()); } - inline BOOL operator< ( const SwRedlineDataParent& rObj ) const + inline sal_Bool operator< ( const SwRedlineDataParent& rObj ) const { return (pData && pData->GetSeqNo() < rObj.pData->GetSeqNo()); } }; @@ -98,9 +98,9 @@ class SW_DLLPUBLIC SwRedlineAcceptDlg SvxRedlinTable* pTable; // PB 2006/02/02 #i48648 now SvHeaderTabListBox Link aOldSelectHdl; Link aOldDeselectHdl; - BOOL bOnlyFormatedRedlines; - BOOL bHasReadonlySel; - BOOL bRedlnAutoFmt; + sal_Bool bOnlyFormatedRedlines; + sal_Bool bHasReadonlySel; + sal_Bool bRedlnAutoFmt; // prevent update dialog data during longer operations (cf #102657#) bool bInhibitActivate; @@ -115,27 +115,27 @@ class SW_DLLPUBLIC SwRedlineAcceptDlg SW_DLLPRIVATE DECL_LINK( GotoHdl, void* ); SW_DLLPRIVATE DECL_LINK( CommandHdl, void* ); - SW_DLLPRIVATE USHORT CalcDiff(USHORT nStart, BOOL bChild); - SW_DLLPRIVATE void InsertChilds(SwRedlineDataParent *pParent, const SwRedline& rRedln, const USHORT nAutoFmt); - SW_DLLPRIVATE void InsertParents(USHORT nStart, USHORT nEnd = USHRT_MAX); - SW_DLLPRIVATE void RemoveParents(USHORT nStart, USHORT nEnd); + SW_DLLPRIVATE sal_uInt16 CalcDiff(sal_uInt16 nStart, sal_Bool bChild); + SW_DLLPRIVATE void InsertChilds(SwRedlineDataParent *pParent, const SwRedline& rRedln, const sal_uInt16 nAutoFmt); + SW_DLLPRIVATE void InsertParents(sal_uInt16 nStart, sal_uInt16 nEnd = USHRT_MAX); + SW_DLLPRIVATE void RemoveParents(sal_uInt16 nStart, sal_uInt16 nEnd); SW_DLLPRIVATE void InitAuthors(); - SW_DLLPRIVATE String GetRedlineText(const SwRedline& rRedln, DateTime &rDateTime, USHORT nStack = 0); - SW_DLLPRIVATE const String& GetActionText(const SwRedline& rRedln, USHORT nStack = 0); - SW_DLLPRIVATE USHORT GetRedlinePos( const SvLBoxEntry& rEntry) const; + SW_DLLPRIVATE String GetRedlineText(const SwRedline& rRedln, DateTime &rDateTime, sal_uInt16 nStack = 0); + SW_DLLPRIVATE const String& GetActionText(const SwRedline& rRedln, sal_uInt16 nStack = 0); + SW_DLLPRIVATE sal_uInt16 GetRedlinePos( const SvLBoxEntry& rEntry) const; public: - SwRedlineAcceptDlg(Dialog *pParent, BOOL bAutoFmt = FALSE); + SwRedlineAcceptDlg(Dialog *pParent, sal_Bool bAutoFmt = sal_False); virtual ~SwRedlineAcceptDlg(); DECL_LINK( FilterChangedHdl, void *pDummy = 0 ); inline SvxAcceptChgCtr* GetChgCtrl() { return &aTabPagesCTRL; } - inline BOOL HasRedlineAutoFmt() const { return bRedlnAutoFmt; } + inline sal_Bool HasRedlineAutoFmt() const { return bRedlnAutoFmt; } - void Init(USHORT nStart = 0); - void CallAcceptReject( BOOL bSelect, BOOL bAccept ); + void Init(sal_uInt16 nStart = 0); + void CallAcceptReject( sal_Bool bSelect, sal_Bool bAccept ); void Initialize(const String &rExtraData); void FillInfo(String &rExtraData) const; @@ -164,13 +164,13 @@ class SwRedlineAcceptChild : public SwChildWinWrapper { public: SwRedlineAcceptChild( Window* , - USHORT nId, + sal_uInt16 nId, SfxBindings*, SfxChildWinInfo* ); SFX_DECL_CHILDWINDOW( SwRedlineAcceptChild ); - virtual BOOL ReInitDlg(SwDocShell *pDocSh); + virtual sal_Bool ReInitDlg(SwDocShell *pDocSh); }; diff --git a/sw/source/ui/inc/regionsw.hxx b/sw/source/ui/inc/regionsw.hxx index 68ec42f0aa..8133e1855b 100644 --- a/sw/source/ui/inc/regionsw.hxx +++ b/sw/source/ui/inc/regionsw.hxx @@ -114,14 +114,14 @@ class SwEditRegionDlg : public SfxModalDialog sfx2::DocumentInserter* m_pDocInserter; Window* m_pOldDefDlgParent; - BOOL bDontCheckPasswd :1; - BOOL bWeb :1; + sal_Bool bDontCheckPasswd :1; + sal_Bool bWeb :1; - Image BuildBitmap(BOOL bProtect,BOOL bHidden); + Image BuildBitmap(sal_Bool bProtect,sal_Bool bHidden); void RecurseList( const SwSectionFmt* pFmt, SvLBoxEntry* pEntry); - USHORT FindArrPos(const SwSectionFmt* pFmt); + sal_uInt16 FindArrPos(const SwSectionFmt* pFmt); DECL_LINK( GetFirstEntryHdl, SvTreeListBox * ); DECL_LINK( DeselectHdl, SvTreeListBox * ); @@ -145,7 +145,7 @@ class SwEditRegionDlg : public SfxModalDialog DECL_LINK( DlgClosedHdl, sfx2::FileDialogHelper* ); DECL_LINK( SubRegionEventHdl, VclWindowEvent * ); - BOOL CheckPasswd(CheckBox* pBox = 0); + sal_Bool CheckPasswd(CheckBox* pBox = 0); public: SwEditRegionDlg( Window* pParent, SwWrtShell& rWrtSh ); @@ -216,7 +216,7 @@ public: void SetWrtShell(SwWrtShell& rSh); - virtual BOOL FillItemSet( SfxItemSet& ); + virtual sal_Bool FillItemSet( SfxItemSet& ); virtual void Reset( const SfxItemSet& ); static SfxTabPage* Create( Window* pParent, @@ -255,13 +255,13 @@ class SwSectionFtnEndTabPage : public SfxTabPage DECL_LINK( FootEndHdl, CheckBox * ); - void ResetState( BOOL bFtn, const SwFmtFtnEndAtTxtEnd& ); + void ResetState( sal_Bool bFtn, const SwFmtFtnEndAtTxtEnd& ); public: SwSectionFtnEndTabPage( Window *pParent, const SfxItemSet &rAttrSet ); virtual ~SwSectionFtnEndTabPage(); - virtual BOOL FillItemSet( SfxItemSet& ); + virtual sal_Bool FillItemSet( SfxItemSet& ); virtual void Reset( const SfxItemSet& ); static SfxTabPage* Create( Window* pParent, @@ -283,7 +283,7 @@ public: SwSectionIndentTabPage( Window *pParent, const SfxItemSet &rAttrSet ); virtual ~SwSectionIndentTabPage(); - virtual BOOL FillItemSet( SfxItemSet& ); + virtual sal_Bool FillItemSet( SfxItemSet& ); virtual void Reset( const SfxItemSet& ); static SfxTabPage* Create( Window* pParent, @@ -298,7 +298,7 @@ class SwInsertSectionTabDialog : public SfxTabDialog ::std::auto_ptr<SwSectionData> m_pSectionData; protected: - virtual void PageCreated( USHORT nId, SfxTabPage &rPage ); + virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage ); virtual short Ok(); public: SwInsertSectionTabDialog(Window* pParent, const SfxItemSet& rSet, SwWrtShell& rSh); @@ -312,7 +312,7 @@ class SwSectionPropertyTabDialog : public SfxTabDialog { SwWrtShell& rWrtSh; protected: - virtual void PageCreated( USHORT nId, SfxTabPage &rPage ); + virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage ); public: SwSectionPropertyTabDialog(Window* pParent, const SfxItemSet& rSet, SwWrtShell& rSh); virtual ~SwSectionPropertyTabDialog(); diff --git a/sw/source/ui/inc/ribbar.hrc b/sw/source/ui/inc/ribbar.hrc index 892261512a..301acb1ddc 100644 --- a/sw/source/ui/inc/ribbar.hrc +++ b/sw/source/ui/inc/ribbar.hrc @@ -69,10 +69,7 @@ #define MN_CALC_POPUP (RC_RIBBAR_BEGIN + 22) #define MN_NUMNAMES_POPUP (RC_RIBBAR_BEGIN + 23) -#define RID_INSERT_CTRL (RC_RIBBAR_BEGIN + 24) -#define RID_INSERT_OBJ_CTRL (RC_RIBBAR_BEGIN + 25) #define RID_INSERT_FIELD_CTRL (RC_RIBBAR_BEGIN + 26) -#define RID_TBL_OPT_CTRL (RC_RIBBAR_BEGIN + 27) #define RID_BEZIER_WIN (RC_RIBBAR_BEGIN + 28) #define RID_SCROLL_NAVI_TBX (RC_RIBBAR_BEGIN + 29) #define RID_SCROLL_NAVIGATION_WIN (RC_RIBBAR_BEGIN + 30) diff --git a/sw/source/ui/inc/rowht.hxx b/sw/source/ui/inc/rowht.hxx index d289422773..069684e417 100644 --- a/sw/source/ui/inc/rowht.hxx +++ b/sw/source/ui/inc/rowht.hxx @@ -37,9 +37,9 @@ class SwWrtShell; class SwTableHeightDlg : public SvxStandardDialog { + FixedLine aHeightFL; MetricField aHeightEdit; CheckBox aAutoHeightCB; - FixedLine aHeightFL; OKButton aOKBtn; CancelButton aCancelBtn; HelpButton aHelpBtn; diff --git a/sw/source/ui/inc/scroll.hxx b/sw/source/ui/inc/scroll.hxx index 2293db4f55..4f888419fe 100644 --- a/sw/source/ui/inc/scroll.hxx +++ b/sw/source/ui/inc/scroll.hxx @@ -32,11 +32,11 @@ class SwScrollbar: public ScrollBar { Size aDocSz; - BOOL bHori :1; // Horizontal = TRUE, sonst Vertikal - BOOL bAuto :1; // fuer Scrollingmode - BOOL bThumbEnabled:1; - BOOL bVisible :1; // Show/Hide sollen nur noch dieses Flag setzen - BOOL bSizeSet :1; // wurde die Groesse bereits gesetzt? + sal_Bool bHori :1; // Horizontal = sal_True, sonst Vertikal + sal_Bool bAuto :1; // fuer Scrollingmode + sal_Bool bThumbEnabled:1; + sal_Bool bVisible :1; // Show/Hide sollen nur noch dieses Flag setzen + sal_Bool bSizeSet :1; // wurde die Groesse bereits gesetzt? void AutoShow(); @@ -46,22 +46,22 @@ class SwScrollbar: public ScrollBar public: - void ExtendedShow( BOOL bVisible = TRUE ); - void Hide() { Show( FALSE ); } + void ExtendedShow( sal_Bool bVisible = sal_True ); + void Hide() { Show( sal_False ); } void SetPosSizePixel( const Point& rNewPos, const Size& rNewSize ); - BOOL IsVisible(BOOL bReal) const { return bReal ? ScrollBar::IsVisible() : bVisible; } + sal_Bool IsVisible(sal_Bool bReal) const { return bReal ? ScrollBar::IsVisible() : bVisible; } // Aenderung der Dokumentgroesse void DocSzChgd(const Size &rNewSize); // Aenderung des sichtbaren Bereiches void ViewPortChgd(const Rectangle &rRectangle); // was fuer einer ist es denn ?? - BOOL IsHoriScroll() const { return bHori; } + sal_Bool IsHoriScroll() const { return bHori; } - void SetAuto(BOOL bSet); - BOOL IsAuto() { return bAuto;} + void SetAuto(sal_Bool bSet); + sal_Bool IsAuto() { return bAuto;} - SwScrollbar(Window *pParent, BOOL bHori = TRUE ); + SwScrollbar(Window *pParent, sal_Bool bHori = sal_True ); ~SwScrollbar(); }; diff --git a/sw/source/ui/inc/selglos.hxx b/sw/source/ui/inc/selglos.hxx index 925a738095..7cbe016e50 100644 --- a/sw/source/ui/inc/selglos.hxx +++ b/sw/source/ui/inc/selglos.hxx @@ -49,8 +49,8 @@ public: SwSelGlossaryDlg(Window * pParent, const String &rShortName); ~SwSelGlossaryDlg(); void InsertGlos(const String &rRegion, const String &rGlosName); // inline - USHORT GetSelectedIdx() const; // inline - void SelectEntryPos(USHORT nIdx); // inline + sal_uInt16 GetSelectedIdx() const; // inline + void SelectEntryPos(sal_uInt16 nIdx); // inline }; inline void SwSelGlossaryDlg::InsertGlos(const String &rRegion, @@ -61,9 +61,9 @@ inline void SwSelGlossaryDlg::InsertGlos(const String &rRegion, aTmp += rGlosName; aGlosBox.InsertEntry( aTmp ); } -inline USHORT SwSelGlossaryDlg::GetSelectedIdx() const +inline sal_uInt16 SwSelGlossaryDlg::GetSelectedIdx() const { return aGlosBox.GetSelectEntryPos(); } -inline void SwSelGlossaryDlg::SelectEntryPos(USHORT nIdx) +inline void SwSelGlossaryDlg::SelectEntryPos(sal_uInt16 nIdx) { aGlosBox.SelectEntryPos(nIdx); } #endif diff --git a/sw/source/ui/inc/shdwcrsr.hxx b/sw/source/ui/inc/shdwcrsr.hxx index d01bc5bccf..7ea12f66dd 100644 --- a/sw/source/ui/inc/shdwcrsr.hxx +++ b/sw/source/ui/inc/shdwcrsr.hxx @@ -41,23 +41,23 @@ class SwShadowCursor Color aCol; Point aOldPt; long nOldHeight; - USHORT nOldMode; + sal_uInt16 nOldMode; - void DrawTri( const Point& rPt, long nHeight, BOOL bLeft ); - void DrawCrsr( const Point& rPt, long nHeight, USHORT nMode ); + void DrawTri( const Point& rPt, long nHeight, sal_Bool bLeft ); + void DrawCrsr( const Point& rPt, long nHeight, sal_uInt16 nMode ); public: SwShadowCursor( Window& rWin, const Color& rCol ) : pWin( &rWin ), aCol( rCol ), nOldHeight(0), nOldMode( USHRT_MAX ) {} ~SwShadowCursor(); - void SetPos( const Point& rPt, long nHeight, USHORT nMode ); + void SetPos( const Point& rPt, long nHeight, sal_uInt16 nMode ); void Paint(); const Point& GetPoint() const { return aOldPt; } long GetHeight() const { return nOldHeight; } - USHORT GetMode() const { return nOldMode; } + sal_uInt16 GetMode() const { return nOldMode; } Rectangle GetRect() const; }; diff --git a/sw/source/ui/inc/split.hxx b/sw/source/ui/inc/split.hxx index 661c063abd..ce733500a4 100644 --- a/sw/source/ui/inc/split.hxx +++ b/sw/source/ui/inc/split.hxx @@ -34,7 +34,7 @@ #include <vcl/field.hxx> -#include <vcl/imagebtn.hxx> +#include <vcl/button.hxx> #include <vcl/button.hxx> @@ -42,13 +42,13 @@ class SwWrtShell; class SwSplitTableDlg : public SvxStandardDialog { + FixedLine aCountFL; FixedText aCountLbl; NumericField aCountEdit; - FixedLine aCountFL; + FixedLine aDirFL; ImageRadioButton aHorzBox; ImageRadioButton aVertBox; CheckBox aPropCB; - FixedLine aDirFL; OKButton aOKBtn; CancelButton aCancelBtn; HelpButton aHelpBtn; @@ -61,8 +61,8 @@ public: SwSplitTableDlg(Window *pParent, SwWrtShell& rShell ); DECL_LINK( ClickHdl, Button * ); - BOOL IsHorizontal() const { return aHorzBox.IsChecked(); } - BOOL IsProportional() const { return aPropCB.IsChecked() && aHorzBox.IsChecked(); } + sal_Bool IsHorizontal() const { return aHorzBox.IsChecked(); } + sal_Bool IsProportional() const { return aPropCB.IsChecked() && aHorzBox.IsChecked(); } long GetCount() const { return sal::static_int_cast< long >(aCountEdit.GetValue()); } }; diff --git a/sw/source/ui/inc/splittbl.hxx b/sw/source/ui/inc/splittbl.hxx index 8e8da96dad..4d26df7cc7 100644 --- a/sw/source/ui/inc/splittbl.hxx +++ b/sw/source/ui/inc/splittbl.hxx @@ -46,7 +46,7 @@ class SwSplitTblDlg : public SvxStandardDialog RadioButton aBorderCopyRB; SwWrtShell &rShell; - USHORT m_nSplit; + sal_uInt16 m_nSplit; protected: virtual void Apply(); @@ -54,7 +54,7 @@ protected: public: SwSplitTblDlg( Window *pParent, SwWrtShell &rSh ); - USHORT GetSplitMode() const { return m_nSplit; } + sal_uInt16 GetSplitMode() const { return m_nSplit; } }; #endif diff --git a/sw/source/ui/inc/srcedtw.hxx b/sw/source/ui/inc/srcedtw.hxx index 05fb56e88d..39858a36ee 100644 --- a/sw/source/ui/inc/srcedtw.hxx +++ b/sw/source/ui/inc/srcedtw.hxx @@ -85,16 +85,16 @@ private: utl::SourceViewConfig* pSourceViewConfig; long nCurTextWidth; - USHORT nStartLine; + sal_uInt16 nStartLine; rtl_TextEncoding eSourceEncoding; - BOOL bReadonly; - BOOL bDoSyntaxHighlight; - BOOL bHighlighting; + sal_Bool bReadonly; + sal_Bool bDoSyntaxHighlight; + sal_Bool bHighlighting; Timer aSyntaxIdleTimer; Table aSyntaxLineTable; - void ImpDoHighlight( const String& rSource, USHORT nLineOff ); + void ImpDoHighlight( const String& rSource, sal_uInt16 nLineOff ); using OutputDevice::SetFont; void SetFont(); @@ -113,7 +113,7 @@ protected: // virtual void LoseFocus(); void CreateTextEngine(); - void DoSyntaxHighlight( USHORT nPara ); + void DoSyntaxHighlight( sal_uInt16 nPara ); virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ); virtual void ConfigurationChanged( utl::ConfigurationBroadcaster*, sal_uInt32 ); @@ -126,9 +126,9 @@ public: void SetScrollBarRanges(); void InitScrollBars(); - ULONG Read( SvStream& rInput) + sal_uLong Read( SvStream& rInput) {return pTextEngine->Read(rInput);} - ULONG Write( SvStream& rOutput) + sal_uLong Write( SvStream& rOutput) {return pTextEngine->Write(rOutput);} ExtTextView* GetTextView() @@ -139,20 +139,20 @@ public: TextViewOutWin* GetOutWin() {return pOutWin;} - virtual void Invalidate( USHORT nFlags = 0 ); + virtual void Invalidate( sal_uInt16 nFlags = 0 ); void ClearModifyFlag() - { pTextEngine->SetModified(FALSE); } - BOOL IsModified() const + { pTextEngine->SetModified(sal_False); } + sal_Bool IsModified() const { return pTextEngine->IsModified();} void CreateScrollbars(); - void SetReadonly(BOOL bSet){bReadonly = bSet;} - BOOL IsReadonly(){return bReadonly;} + void SetReadonly(sal_Bool bSet){bReadonly = bSet;} + sal_Bool IsReadonly(){return bReadonly;} - void DoDelayedSyntaxHighlight( USHORT nPara ); + void DoDelayedSyntaxHighlight( sal_uInt16 nPara ); - void SetStartLine(USHORT nLine){nStartLine = nLine;} + void SetStartLine(sal_uInt16 nLine){nStartLine = nLine;} virtual void Command( const CommandEvent& rCEvt ); void HandleWheelCommand( const CommandEvent& rCEvt ); diff --git a/sw/source/ui/inc/srcview.hxx b/sw/source/ui/inc/srcview.hxx index b4d6d55a7b..336a9fc18a 100644 --- a/sw/source/ui/inc/srcview.hxx +++ b/sw/source/ui/inc/srcview.hxx @@ -45,7 +45,7 @@ class SwSrcView: public SfxViewShell SvxSearchItem* pSearchItem; - BOOL bSourceSaved :1; + sal_Bool bSourceSaved :1; rtl_TextEncoding eLoadEncoding; void Init(); @@ -54,10 +54,10 @@ class SwSrcView: public SfxViewShell protected: - USHORT StartSearchAndReplace(const SvxSearchItem& rItem, - BOOL bFromStart, - BOOL bApi, - BOOL bRecursive = FALSE); + sal_uInt16 StartSearchAndReplace(const SvxSearchItem& rItem, + sal_Bool bFromStart, + sal_Bool bApi, + sal_Bool bRecursive = sal_False); public: @@ -76,7 +76,7 @@ public: void SaveContent(const String& rTmpFile); void SaveContentTo(SfxMedium& rMed); - BOOL IsModified() {return aEditWin.IsModified();} + sal_Bool IsModified() {return aEditWin.IsModified();} @@ -88,13 +88,13 @@ public: void Load(SwDocShell* pDocShell); - virtual USHORT SetPrinter( SfxPrinter* pNew, USHORT nDiff = SFX_PRINTER_ALL, bool bIsAPI=false ); - virtual SfxPrinter* GetPrinter( BOOL bCreate = FALSE ); + virtual sal_uInt16 SetPrinter( SfxPrinter* pNew, sal_uInt16 nDiff = SFX_PRINTER_ALL, bool bIsAPI=false ); + virtual SfxPrinter* GetPrinter( sal_Bool bCreate = sal_False ); sal_Int32 PrintSource( OutputDevice *pOutDev, sal_Int32 nPage, bool bCalcNumPagesOnly ); - void SourceSaved() {bSourceSaved = TRUE;} - BOOL HasSourceSaved() const {return bSourceSaved;} + void SourceSaved() {bSourceSaved = sal_True;} + sal_Bool HasSourceSaved() const {return bSourceSaved;} }; diff --git a/sw/source/ui/inc/srtdlg.hxx b/sw/source/ui/inc/srtdlg.hxx index 4863e737f4..689aca753d 100644 --- a/sw/source/ui/inc/srtdlg.hxx +++ b/sw/source/ui/inc/srtdlg.hxx @@ -44,7 +44,7 @@ class SwSortDlg : public SvxStandardDialog FixedText aTypLbl; FixedText aDirLbl; - FixedLine aDirFL; + FixedLine aSortFL; CheckBox aKeyCB1; NumericField aColEdt1; @@ -64,7 +64,7 @@ class SwSortDlg : public SvxStandardDialog RadioButton aSortUp3RB; RadioButton aSortDn3RB; - FixedLine aSortFL; + FixedLine aDirFL; RadioButton aColumnRB; RadioButton aRowRB; @@ -91,8 +91,8 @@ class SwSortDlg : public SvxStandardDialog SwWrtShell &rSh; CollatorRessource* pColRes; - USHORT nX; - USHORT nY; + sal_uInt16 nX; + sal_uInt16 nY; virtual void Apply(); sal_Unicode GetDelimChar() const; diff --git a/sw/source/ui/inc/swcont.hxx b/sw/source/ui/inc/swcont.hxx index 6f7358eab7..0688dd6732 100644 --- a/sw/source/ui/inc/swcont.hxx +++ b/sw/source/ui/inc/swcont.hxx @@ -70,13 +70,13 @@ class SwContentType; //mini rtti class SwTypeNumber { - BYTE nTypeId; + sal_uInt8 nTypeId; public: - SwTypeNumber(BYTE nId) :nTypeId(nId){} + SwTypeNumber(sal_uInt8 nId) :nTypeId(nId){} virtual ~SwTypeNumber(); - virtual BYTE GetTypeId(); + virtual sal_uInt8 GetTypeId(); }; //---------------------------------------------------------------------------- @@ -85,17 +85,17 @@ class SwContent : public SwTypeNumber const SwContentType* pParent; String sContentName; long nYPosition; - BOOL bInvisible; + sal_Bool bInvisible; public: SwContent(const SwContentType* pCnt, const String& rName, long nYPos ); - virtual BOOL IsProtect() const; + virtual sal_Bool IsProtect() const; const SwContentType* GetParent() const {return pParent;} const String& GetName() const {return sContentName;} int operator==(const SwContent& /*rCont*/) const { //gleich sind sie nie, sonst fallen sie aus dem Array - return FALSE; + return sal_False; } int operator<(const SwContent& rCont) const { @@ -107,8 +107,8 @@ public: long GetYPos() const {return nYPosition;} - BOOL IsInvisible() const {return bInvisible;} - void SetInvisible(){ bInvisible = TRUE;} + sal_Bool IsInvisible() const {return bInvisible;} + void SetInvisible(){ bInvisible = sal_True;} }; #endif diff --git a/sw/source/ui/inc/swdtflvr.hxx b/sw/source/ui/inc/swdtflvr.hxx index 9776574d34..4e37f6390b 100644 --- a/sw/source/ui/inc/swdtflvr.hxx +++ b/sw/source/ui/inc/swdtflvr.hxx @@ -66,7 +66,7 @@ namespace nsTransferBufferType class SwTransferable : public TransferableHelper { friend class SwView_Impl; - SfxObjectShellRef aDocShellRef; + SfxObjectShellLock aDocShellRef; TransferableDataHelper aOleData; TransferableObjectDescriptor aObjDesc; ::sfx2::SvBaseLinkRef refDdeLink; @@ -83,8 +83,8 @@ class SwTransferable : public TransferableHelper TransferBufferType eBufferType; - BOOL bOldIdle :1; //D&D Idle flag from the viewsettings - BOOL bCleanUp :1; //D&D cleanup after Drop (not by internal Drop) + sal_Bool bOldIdle :1; //D&D Idle flag from the viewsettings + sal_Bool bCleanUp :1; //D&D cleanup after Drop (not by internal Drop) // helper methods for the copy com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject > FindOLEObj( sal_Int64& nAspect ) const; @@ -93,50 +93,50 @@ class SwTransferable : public TransferableHelper // helper methods for the paste static SwTransferable* GetSwTransferable( const TransferableDataHelper& rData ); - static void SetSelInShell( SwWrtShell& , BOOL , const Point* ); - static BOOL _CheckForURLOrLNKFile( TransferableDataHelper& rData, + static void SetSelInShell( SwWrtShell& , sal_Bool , const Point* ); + static sal_Bool _CheckForURLOrLNKFile( TransferableDataHelper& rData, String& rFileName, String* pTitle = 0 ); static int _TestAllowedFormat( const TransferableDataHelper& rData, - ULONG nFormat, USHORT nDestination ); + sal_uLong nFormat, sal_uInt16 nDestination ); static int _PasteFileContent( TransferableDataHelper&, - SwWrtShell& rSh, ULONG nFmt, BOOL bMsg ); + SwWrtShell& rSh, sal_uLong nFmt, sal_Bool bMsg ); static int _PasteOLE( TransferableDataHelper& rData, SwWrtShell& rSh, - ULONG nFmt, BYTE nActionFlags, BOOL bMsg ); + sal_uLong nFmt, sal_uInt8 nActionFlags, sal_Bool bMsg ); static int _PasteTargetURL( TransferableDataHelper& rData, SwWrtShell& rSh, - USHORT nAction, const Point* pPt, BOOL bInsertGRF ); + sal_uInt16 nAction, const Point* pPt, sal_Bool bInsertGRF ); static int _PasteDDE( TransferableDataHelper& rData, SwWrtShell& rWrtShell, - BOOL bReReadGrf, BOOL bMsg ); + sal_Bool bReReadGrf, sal_Bool bMsg ); static int _PasteSdrFormat( TransferableDataHelper& rData, - SwWrtShell& rSh, USHORT nAction, - const Point* pPt, BYTE nActionFlags ); + SwWrtShell& rSh, sal_uInt16 nAction, + const Point* pPt, sal_uInt8 nActionFlags ); static int _PasteGrf( TransferableDataHelper& rData, SwWrtShell& rSh, - ULONG nFmt, USHORT nAction, const Point* pPt, - BYTE nActionFlags, BOOL bMsg ); + sal_uLong nFmt, sal_uInt16 nAction, const Point* pPt, + sal_uInt8 nActionFlags, sal_Bool bMsg ); static int _PasteImageMap( TransferableDataHelper& rData, SwWrtShell& rSh ); static int _PasteAsHyperlink( TransferableDataHelper& rData, - SwWrtShell& rSh, ULONG nFmt ); + SwWrtShell& rSh, sal_uLong nFmt ); static int _PasteFileName( TransferableDataHelper& rData, - SwWrtShell& rSh, ULONG nFmt, USHORT nAction, - const Point* pPt, BYTE nActionFlags, BOOL bMsg ); + SwWrtShell& rSh, sal_uLong nFmt, sal_uInt16 nAction, + const Point* pPt, sal_uInt8 nActionFlags, sal_Bool bMsg ); static int _PasteDBData( TransferableDataHelper& rData, SwWrtShell& rSh, - ULONG nFmt, BOOL bLink, const Point* pDragPt, - BOOL bMsg ); + sal_uLong nFmt, sal_Bool bLink, const Point* pDragPt, + sal_Bool bMsg ); static int _PasteFileList( TransferableDataHelper& rData, - SwWrtShell& rSh, BOOL bLink, - const Point* pPt, BOOL bMsg ); + SwWrtShell& rSh, sal_Bool bLink, + const Point* pPt, sal_Bool bMsg ); - int PrivateDrop( SwWrtShell& rSh, const Point& rDragPt, BOOL bMove, - BOOL bIsXSelection ); + int PrivateDrop( SwWrtShell& rSh, const Point& rDragPt, sal_Bool bMove, + sal_Bool bIsXSelection ); int PrivatePaste( SwWrtShell& rShell ); void SetDataForDragAndDrop( const Point& rSttPos ); @@ -162,7 +162,7 @@ public: SwTransferable( SwWrtShell& ); virtual ~SwTransferable(); - static USHORT GetSotDestination( const SwWrtShell& rSh, const Point* = 0 ); + static sal_uInt16 GetSotDestination( const SwWrtShell& rSh, const Point* = 0 ); // set properties on the document, like PageMargin, VisArea. // And set real Size @@ -170,8 +170,8 @@ public: // copy - methods and helper methods for the copy int Cut(); - int Copy( BOOL bIsCut = FALSE ); - int PrepareForCopy( BOOL bIsCut = FALSE ); + int Copy( sal_Bool bIsCut = sal_False ); + int PrepareForCopy( sal_Bool bIsCut = sal_False ); int CalculateAndCopy(); // special for Calculator int CopyGlossary( SwTextBlocks& rGlossary, const String& rStr ); @@ -179,21 +179,21 @@ public: void RemoveDDELinkFormat( const Window& rWin ); // paste - methods and helper methods for the paste - static BOOL IsPaste( const SwWrtShell&, const TransferableDataHelper& ); + static sal_Bool IsPaste( const SwWrtShell&, const TransferableDataHelper& ); static int Paste( SwWrtShell&, TransferableDataHelper& ); static int PasteData( TransferableDataHelper& rData, - SwWrtShell& rSh, USHORT nAction, ULONG nFormat, - USHORT nDestination, BOOL bIsPasteFmt, + SwWrtShell& rSh, sal_uInt16 nAction, sal_uLong nFormat, + sal_uInt16 nDestination, sal_Bool bIsPasteFmt, sal_Bool bIsDefault, const Point* pDDPos = 0, sal_Int8 nDropAction = 0, - BOOL bPasteSelection = FALSE ); + sal_Bool bPasteSelection = sal_False ); - static BOOL IsPasteSpecial( const SwWrtShell& rWrtShell, + static sal_Bool IsPasteSpecial( const SwWrtShell& rWrtShell, const TransferableDataHelper& ); static int PasteUnformatted( SwWrtShell& rSh, TransferableDataHelper& ); - static int PasteSpecial( SwWrtShell& rSh, TransferableDataHelper&, ULONG& rFormatUsed ); + static int PasteSpecial( SwWrtShell& rSh, TransferableDataHelper&, sal_uLong& rFormatUsed ); static int PasteFormat( SwWrtShell& rSh, TransferableDataHelper& rData, - ULONG nFormat ); + sal_uLong nFormat ); static void FillClipFmtItem( const SwWrtShell& rSh, const TransferableDataHelper& rData, @@ -203,7 +203,7 @@ public: void StartDrag( Window* pWin, const Point& rPos ); SwWrtShell* GetShell() { return pWrtShell; } - void SetCleanUp( BOOL bFlag ) { bCleanUp = bFlag; } + void SetCleanUp( sal_Bool bFlag ) { bCleanUp = bFlag; } // Interfaces for Selection /* #96392# Added pCreator to distinguish SwFrameShell from SwWrtShell. */ diff --git a/sw/source/ui/inc/swlbox.hxx b/sw/source/ui/inc/swlbox.hxx index 678eaf09e8..265b5ad3c5 100644 --- a/sw/source/ui/inc/swlbox.hxx +++ b/sw/source/ui/inc/swlbox.hxx @@ -47,14 +47,14 @@ class SW_DLLPUBLIC SwBoxEntry { friend class SwComboBox; - BOOL bModified : 1; - BOOL bNew : 1; + sal_Bool bModified : 1; + sal_Bool bNew : 1; String aName; - USHORT nId; + sal_uInt16 nId; public: - SwBoxEntry(const String& aName, USHORT nId=0); + SwBoxEntry(const String& aName, sal_uInt16 nId=0); SwBoxEntry(const SwBoxEntry& rOrg); SwBoxEntry(); @@ -64,7 +64,7 @@ public: /*-------------------------------------------------------------------- Beschreibung: fuer ComboBoxen --------------------------------------------------------------------*/ -typedef USHORT SwComboBoxStyle; +typedef sal_uInt16 SwComboBoxStyle; namespace nsSwComboBoxStyle { @@ -72,11 +72,7 @@ namespace nsSwComboBoxStyle const SwComboBoxStyle CBS_LOWER = 0x02; const SwComboBoxStyle CBS_ALL = 0x04; const SwComboBoxStyle CBS_FILENAME = 0x08; -#ifdef WIN - const SwComboBoxStyle CBS_SW_FILENAME = CBS_FILENAME | CBS_LOWER; -#else const SwComboBoxStyle CBS_SW_FILENAME = CBS_FILENAME; -#endif } class SW_DLLPUBLIC SwComboBox : public ComboBox @@ -84,7 +80,7 @@ class SW_DLLPUBLIC SwComboBox : public ComboBox SwEntryLst aEntryLst; SwEntryLst aDelEntryLst; SwBoxEntry aDefault; - USHORT nStyle; + sal_uInt16 nStyle; SW_DLLPRIVATE void InitComboBox(); SW_DLLPRIVATE void InsertSorted(SwBoxEntry* pEntry); @@ -98,25 +94,25 @@ public: using ComboBox::GetEntryPos; SwComboBox(Window* pParent, const ResId& rId, - USHORT nStyleBits = nsSwComboBoxStyle::CBS_ALL); + sal_uInt16 nStyleBits = nsSwComboBoxStyle::CBS_ALL); ~SwComboBox(); virtual void KeyInput( const KeyEvent& rKEvt ); void InsertEntry(const SwBoxEntry&); - USHORT InsertEntry( const XubString& rStr, USHORT = 0) + sal_uInt16 InsertEntry( const XubString& rStr, sal_uInt16 = 0) { InsertEntry( SwBoxEntry( rStr ) ); return 0; } - void RemoveEntry(USHORT nPos); + void RemoveEntry(sal_uInt16 nPos); - USHORT GetEntryPos(const SwBoxEntry& rEntry) const; - const SwBoxEntry& GetEntry(USHORT) const; + sal_uInt16 GetEntryPos(const SwBoxEntry& rEntry) const; + const SwBoxEntry& GetEntry(sal_uInt16) const; - USHORT GetRemovedCount() const; - const SwBoxEntry& GetRemovedEntry(USHORT nPos) const; + sal_uInt16 GetRemovedCount() const; + const SwBoxEntry& GetRemovedEntry(sal_uInt16 nPos) const; - USHORT GetStyle() const { return nStyle; } - void SetStyle(const USHORT nSt) { nStyle = nSt; } + sal_uInt16 GetStyle() const { return nStyle; } + void SetStyle(const sal_uInt16 nSt) { nStyle = nSt; } String GetText() const; }; diff --git a/sw/source/ui/inc/swmn_tmpl.hrc b/sw/source/ui/inc/swmn_tmpl.hrc deleted file mode 100644 index 188ae8eeb5..0000000000 --- a/sw/source/ui/inc/swmn_tmpl.hrc +++ /dev/null @@ -1,386 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef _SWMN_HRC -#define _SWMN_HRC - -#include <svx/dialogs.hrc> -#include <svx/globlmn.hrc> -#include "cmdid.h" -#include "app.hrc" -#include "globals.hrc" -#include "helpid.h" -#include "popup.hrc" - -/* --------------------- F O R M A T --------------------------------- */ - -#define SEPARATOR MenuItem { Separator = TRUE; } - -//define for ITEM_FORMAT_NUMBERING -#define DEFINE_SLOTID_FOR_NUMBER_BULLETS FN_NUMBER_BULLETS -#define MN_NUMBERING ITEM_FORMAT_NUMBERING - -#define MN_TXT\ - MenuItem\ - {\ - ITEM_FORMAT_CHAR_DLG\ - };\ - MenuItem\ - {\ - ITEM_FORMAT_PARA_DLG\ - };\ - MenuItem\ - {\ - Identifier = FN_FORMAT_PAGE_DLG ; \ - HelpID = FN_FORMAT_PAGE_DLG ; \ - Text [ en-US ] = "Pa~ge..." ; \ - };\ - MenuItem\ - {\ - Identifier = FN_FORMAT_TITLEPAGE_DLG ; \ - HelpID = FN_FORMAT_TITLEPAGE_DLG ; \ - Text [ en-US ] = "~Title Page..." ; \ - }; - -#define MN_TEXT_ATTR\ - MenuItem\ - {\ - ITEM_FORMAT_ATTR_CHAR_FONT\ - };\ - MenuItem\ - {\ - ITEM_FORMAT_ATTR_CHAR_FONTHEIGHT\ - };\ - MenuItem\ - {\ - Identifier = MN_FORMAT_STYLE ; \ - HelpID = MN_FORMAT_STYLE ; \ - Command = ".uno:StyleMenu" ; \ - Text [ en-US ] = "St~yle" ; \ - SubMenu = Menu\ - {\ - ItemList = \ - {\ - MenuItem\ - {\ - ITEM_FORMAT_ATTR_CHAR_WEIGHT\ - };\ - MenuItem\ - {\ - ITEM_FORMAT_ATTR_CHAR_POSTURE\ - };\ - MenuItem\ - {\ - ITEM_FORMAT_ATTR_CHAR_OVERLINE\ - };\ - MenuItem\ - {\ - ITEM_FORMAT_ATTR_CHAR_UNDERLINE\ - };\ - MenuItem\ - {\ - ITEM_FORMAT_ATTR_CHAR_STRIKEOUT\ - };\ - MenuItem\ - {\ - ITEM_FORMAT_ATTR_CHAR_SHADOWED\ - };\ - MenuItem\ - {\ - ITEM_FORMAT_ATTR_CHAR_CONTOUR\ - };\ - SEPARATOR ; \ - MenuItem\ - {\ - Identifier = FN_SET_SUPER_SCRIPT ; \ - HelpID = FN_SET_SUPER_SCRIPT ; \ - Text [ en-US ] = "Superscript" ; \ - };\ - MenuItem\ - {\ - Identifier = FN_SET_SUB_SCRIPT ; \ - HelpID = FN_SET_SUB_SCRIPT ; \ - Text [ en-US ] = "Subscript" ; \ - };\ - };\ - };\ - };\ - MenuItem\ - {\ - Identifier = MN_FORMAT_ALGN ; \ - HelpID = MN_FORMAT_ALGN ; \ - Command = ".uno:AlignTextMenu" ; \ - Text [ en-US ] = "A~lignment" ; \ - SubMenu = Menu\ - {\ - ItemList = \ - {\ - MenuItem\ - {\ - RadioCheck = TRUE ; \ - ITEM_FORMAT_ATTR_PARA_ADJUST_LEFT\ - };\ - MenuItem\ - {\ - RadioCheck = TRUE ; \ - ITEM_FORMAT_ATTR_PARA_ADJUST_RIGHT\ - };\ - MenuItem\ - {\ - RadioCheck = TRUE ; \ - ITEM_FORMAT_ATTR_PARA_ADJUST_CENTER\ - };\ - MenuItem\ - {\ - Identifier = SID_ATTR_PARA_ADJUST_BLOCK ; \ - HelpID = SID_ATTR_PARA_ADJUST_BLOCK ; \ - RadioCheck = TRUE ; \ - Text [ en-US ] = "Justified" ; \ - };\ - };\ - };\ - };\ - MenuItem\ - {\ - Identifier = MN_FORMAT_LINESPACE ; \ - HelpID = MN_FORMAT_LINESPACE ; \ - Command = ".uno:LineSpacingMenu" ; \ - Text [ en-US ] = "Line Spacing" ; \ - _MenuItemFlags = MIB_RADIOCHECK ; \ - SubMenu = Menu\ - {\ - ItemList = \ - {\ - MenuItem\ - {\ - RadioCheck = TRUE ; \ - ITEM_FORMAT_PARA_LINESPACE_10\ - };\ - MenuItem\ - {\ - RadioCheck = TRUE ; \ - ITEM_FORMAT_PARA_LINESPACE_15\ - };\ - MenuItem\ - {\ - RadioCheck = TRUE ; \ - ITEM_FORMAT_PARA_LINESPACE_20\ - };\ - };\ - };\ - }; - -/* --------------------- M E N U --------------------------------- */ - -/* - - -The application menu bar resource has become obsolete. You can now find the menu bar at the following -location: <project>/uiconfig/[swriter|sweb|sglobal]/menubar/menubar.xml - - -*/ - -/* --------------------- D O C U M E N T -------------------------- */ - - -#define _MN_EDIT_FIELD \ - MenuItem \ - { \ - Identifier = FN_EDIT_FIELD ; \ - HelpID = FN_EDIT_FIELD ; \ - Text [ en-US ] = "Fields..." ; \ - }; -#define _MN_EDIT_FOOTNOTE \ - MenuItem \ - { \ - Identifier = FN_EDIT_FOOTNOTE ; \ - HelpID = FN_EDIT_FOOTNOTE ; \ - Text [ en-US ] = "Footnote/Endnote~..." ; \ - }; - #define _MN_EDIT_IDX_ENTRY_DLG \ - MenuItem \ - { \ - Identifier = FN_EDIT_IDX_ENTRY_DLG ; \ - HelpID = FN_EDIT_IDX_ENTRY_DLG ; \ - Text [ en-US ] = "Inde~x Entry..." ; \ - }; - -#define _MN_EDIT_REDLINE \ - MenuItem \ - { \ - Identifier = FN_REDLINE_ACCEPT_DIRECT; \ - HelpID = FN_REDLINE_ACCEPT_DIRECT ; \ - Text [ en-US ] = "Accept Change" ; \ - };\ - MenuItem \ - { \ - Identifier = FN_REDLINE_REJECT_DIRECT ; \ - HelpID = FN_REDLINE_REJECT_DIRECT ; \ - Text [ en-US ] = "Reject Change" ; \ - }; \ - SEPARATOR ; -#define _MN_EDIT_BIB_ENTRY_DLG \ - MenuItem \ - { \ - Identifier = FN_EDIT_AUTH_ENTRY_DLG ; \ - HelpID = FN_EDIT_AUTH_ENTRY_DLG ; \ - Text [ en-US ] = "~Bibliography Entry..."; \ - }; \ - SEPARATOR ; - -#define _MN_EDIT_OPEN_HYPERLINK \ - MenuItem \ - { \ - ITEM_OPEN_HYPERLINK \ - };\ - MenuItem \ - { \ - Identifier = FN_EDIT_HYPERLINK ; \ - HelpID = FN_EDIT_HYPERLINK ; \ - Text [ en-US ] = "Edit Hyperlink..."; \ - }; \ - MenuItem \ - { \ - Identifier = FN_COPY_HYPERLINK_LOCATION; \ - HelpID = FN_COPY_HYPERLINK_LOCATION; \ - Text [ en-US ] = "Copy Hyperlink ~Location"; \ - }; \ - MenuItem \ - { \ - Identifier = FN_REMOVE_HYPERLINK ; \ - HelpID = FN_REMOVE_HYPERLINK ; \ - Text [ en-US ] = "Remo~ve Hyperlink"; \ - }; - -#define _MN_EDIT_OPEN_SMARTTAGMENU \ - MenuItem \ - { \ - ITEM_OPEN_SMARTTAGMENU \ - }; - -#define _MN_EDIT__HYPERLINK \ - MenuItem\ - {\ - Identifier = FN_EDIT_HYPERLINK ; \ - HelpID = FN_EDIT_HYPERLINK ; \ - Text [ en-US ] = "~Edit Hyperlink" ; \ - }; - -#define _DEFAULT_TEXT_EDIT_ELEMENTS \ - _MN_EDIT_FIELD \ - _MN_EDIT_FOOTNOTE \ - _MN_EDIT_IDX_ENTRY_DLG \ - _MN_EDIT_BIB_ENTRY_DLG \ - _MN_EDIT_REDLINE \ - MenuItem \ - { \ - ITEM_POPUP_TEMPLATE_EDIT \ - }; \ - SEPARATOR ; \ - _MN_EDIT_OPEN_HYPERLINK \ - _MN_EDIT_OPEN_SMARTTAGMENU - - -#define MN_RESET\ - MenuItem\ - {\ - Identifier = FN_FORMAT_RESET ; \ - HelpID = FN_FORMAT_RESET ; \ - Text [ en-US ] = "~Clear Direct Formatting" ; \ - }; - -#define _NUMBERING_RELATED_MENU \ - SEPARATOR ; \ - MenuItem \ - { \ - Identifier = FN_NUMBER_NEWSTART; \ - HelpId = FN_NUMBER_NEWSTART; \ - Text[ en-US ] = "Restart Numbering"; \ - }; \ - MenuItem \ - { \ - Identifier = FN_NUM_CONTINUE; \ - HelpId = FN_NUM_CONTINUE; \ - Text[ en-US ] = "Continue previous numbering"; \ - }; \ - MenuItem \ - { \ - Identifier = FN_NUM_BULLET_UP; \ - HelpId = FN_NUM_BULLET_UP; \ - Text[ en-US ] = "Up One Level"; \ - }; \ - MenuItem \ - { \ - Identifier = FN_NUM_BULLET_DOWN; \ - HelpId = FN_NUM_BULLET_DOWN; \ - Text[ en-US ] = "Down One Level"; \ - }; - -#define BASE_TEXT_POPUPMENU_BEGIN \ -{ \ - ItemList = \ - { \ - MN_RESET \ - _NUMBERING_RELATED_MENU \ - SEPARATOR ; \ - MN_TEXT_ATTR \ - SEPARATOR ; \ - MN_TXT \ - MN_NUMBERING \ - ITEM_TRANSLITERATE_MENU \ - SEPARATOR ; - -// not in Writer/Web -#define BASE_TEXT_POPUPMENU_NOWEB \ - MenuItem \ - { \ - Identifier = FN_UPDATE_CUR_TOX ; \ - HelpID = FN_UPDATE_CUR_TOX ; \ - Text [ en-US ] = "~Update Index/Table"; \ - }; \ - MenuItem \ - { \ - Identifier = FN_EDIT_CURRENT_TOX; \ - HelpID = FN_EDIT_CURRENT_TOX; \ - Text [ en-US ] = "~Edit Index/Table"; \ - }; \ - MenuItem \ - { \ - Identifier = FN_REMOVE_CUR_TOX; \ - HelpID = FN_REMOVE_CUR_TOX; \ - Text [ en-US ] = "Delete Index/Table"; \ - }; \ - SEPARATOR ; - -#define BASE_TEXT_POPUPMENU_END \ - _DEFAULT_TEXT_EDIT_ELEMENTS \ - }; \ -}; - -#endif - diff --git a/sw/source/ui/inc/swmodalredlineacceptdlg.hxx b/sw/source/ui/inc/swmodalredlineacceptdlg.hxx index 583870434a..bfc6ad5aaa 100644 --- a/sw/source/ui/inc/swmodalredlineacceptdlg.hxx +++ b/sw/source/ui/inc/swmodalredlineacceptdlg.hxx @@ -42,7 +42,7 @@ public: SwModalRedlineAcceptDlg(Window *pParent); ~SwModalRedlineAcceptDlg(); - void AcceptAll( BOOL bAccept ); + void AcceptAll( sal_Bool bAccept ); virtual void Activate(); }; diff --git a/sw/source/ui/inc/swrenamexnameddlg.hxx b/sw/source/ui/inc/swrenamexnameddlg.hxx index 30b8961cb4..0e53b28337 100644 --- a/sw/source/ui/inc/swrenamexnameddlg.hxx +++ b/sw/source/ui/inc/swrenamexnameddlg.hxx @@ -44,9 +44,9 @@ class SwRenameXNamedDlg : public ModalDialog { + FixedLine aNameFL; FixedText aNewNameFT; NoSpaceEdit aNewNameED; - FixedLine aNameFL; OKButton aOk; CancelButton aCancel; HelpButton aHelp; diff --git a/sw/source/ui/inc/swtablerep.hxx b/sw/source/ui/inc/swtablerep.hxx index e0684fcb13..d0807d0e18 100644 --- a/sw/source/ui/inc/swtablerep.hxx +++ b/sw/source/ui/inc/swtablerep.hxx @@ -43,20 +43,20 @@ class SW_DLLPUBLIC SwTableRep SwTwips nSpace; SwTwips nLeftSpace; SwTwips nRightSpace; - USHORT nAlign; - USHORT nColCount; - USHORT nAllCols; - USHORT nWidthPercent; - BOOL bComplex : 1; - BOOL bLineSelected : 1; - BOOL bWidthChanged : 1; - BOOL bColsChanged : 1; + sal_uInt16 nAlign; + sal_uInt16 nColCount; + sal_uInt16 nAllCols; + sal_uInt16 nWidthPercent; + sal_Bool bComplex : 1; + sal_Bool bLineSelected : 1; + sal_Bool bWidthChanged : 1; + sal_Bool bColsChanged : 1; public: - SwTableRep( const SwTabCols& rTabCol, BOOL bComplex ); + SwTableRep( const SwTabCols& rTabCol, sal_Bool bComplex ); ~SwTableRep(); - BOOL FillTabCols( SwTabCols& rTabCol ) const; + sal_Bool FillTabCols( SwTabCols& rTabCol ) const; SwTwips GetLeftSpace() const {return nLeftSpace;} void SetLeftSpace(SwTwips nSet) {nLeftSpace = nSet;} @@ -67,24 +67,24 @@ public: SwTwips GetWidth() const {return nTblWidth;} void SetWidth(SwTwips nSet) {nTblWidth = nSet;} - USHORT GetWidthPercent() const {return nWidthPercent;} - void SetWidthPercent(USHORT nSet) {nWidthPercent = nSet;} + sal_uInt16 GetWidthPercent() const {return nWidthPercent;} + void SetWidthPercent(sal_uInt16 nSet) {nWidthPercent = nSet;} - USHORT GetAlign() const {return nAlign;} - void SetAlign(USHORT nSet) {nAlign = nSet;} + sal_uInt16 GetAlign() const {return nAlign;} + void SetAlign(sal_uInt16 nSet) {nAlign = nSet;} - BOOL IsComplex() const {return bComplex;} - USHORT GetColCount() const {return nColCount;} - USHORT GetAllColCount() const {return nAllCols;} + sal_Bool IsComplex() const {return bComplex;} + sal_uInt16 GetColCount() const {return nColCount;} + sal_uInt16 GetAllColCount() const {return nAllCols;} - BOOL HasColsChanged() const {return bColsChanged;} - void SetColsChanged() {bColsChanged = TRUE;} + sal_Bool HasColsChanged() const {return bColsChanged;} + void SetColsChanged() {bColsChanged = sal_True;} - BOOL HasWidthChanged() const {return bWidthChanged;} - void SetWidthChanged() {bWidthChanged = TRUE;} + sal_Bool HasWidthChanged() const {return bWidthChanged;} + void SetWidthChanged() {bWidthChanged = sal_True;} - BOOL IsLineSelected() const {return bLineSelected;} - void SetLineSelected(BOOL bSet) {bLineSelected = bSet;} + sal_Bool IsLineSelected() const {return bLineSelected;} + void SetLineSelected(sal_Bool bSet) {bLineSelected = bSet;} SwTwips GetSpace() const { return nSpace;} void SetSpace(SwTwips nSet) {nSpace = nSet;} diff --git a/sw/source/ui/inc/swuiccoll.hxx b/sw/source/ui/inc/swuiccoll.hxx index a1ae526a98..ff520e4e4d 100644 --- a/sw/source/ui/inc/swuiccoll.hxx +++ b/sw/source/ui/inc/swuiccoll.hxx @@ -58,7 +58,7 @@ class SwCondCollPage : public SfxTabPage CollName* pNms; - BOOL bNewTemplate; + sal_Bool bNewTemplate; SwCondCollPage(Window *pParent, const SfxItemSet &rSet); @@ -76,12 +76,12 @@ class SwCondCollPage : public SfxTabPage public: static SfxTabPage *Create(Window *pParent, const SfxItemSet &rSet); - static USHORT* GetRanges(); + static sal_uInt16* GetRanges(); - virtual BOOL FillItemSet( SfxItemSet &rSet); + virtual sal_Bool FillItemSet( SfxItemSet &rSet); virtual void Reset (const SfxItemSet &rSet); - void SetCollection( SwFmt* pFormat, BOOL bNew ); + void SetCollection( SwFmt* pFormat, sal_Bool bNew ); }; diff --git a/sw/source/ui/inc/swuicnttab.hxx b/sw/source/ui/inc/swuicnttab.hxx index 7e8424163d..9108936473 100644 --- a/sw/source/ui/inc/swuicnttab.hxx +++ b/sw/source/ui/inc/swuicnttab.hxx @@ -86,12 +86,12 @@ class SwMultiTOXTabDialog : public SfxTabDialog CurTOXType eCurrentTOXType; String sUserDefinedIndex; - USHORT nTypeCount; - USHORT nInitialTOXType; + sal_uInt16 nTypeCount; + sal_uInt16 nInitialTOXType; - BOOL bEditTOX; - BOOL bExampleCreated; - BOOL bGlobalFlag; + sal_Bool bEditTOX; + sal_Bool bExampleCreated; + sal_Bool bGlobalFlag; virtual short Ok(); SwTOXDescription* CreateTOXDescFromTOXBase(const SwTOXBase*pCurTOX); @@ -102,11 +102,11 @@ class SwMultiTOXTabDialog : public SfxTabDialog public: SwMultiTOXTabDialog(Window* pParent, const SfxItemSet& rSet, SwWrtShell &rShell, - SwTOXBase* pCurTOX, USHORT nToxType = USHRT_MAX, - BOOL bGlobal = FALSE); + SwTOXBase* pCurTOX, sal_uInt16 nToxType = USHRT_MAX, + sal_Bool bGlobal = sal_False); ~SwMultiTOXTabDialog(); - virtual void PageCreated( USHORT nId, SfxTabPage &rPage ); + virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage ); SwForm* GetForm(CurTOXType eType); @@ -117,15 +117,15 @@ public: } void UpdateExample(); - BOOL IsTOXEditMode() const { return bEditTOX;} + sal_Bool IsTOXEditMode() const { return bEditTOX;} SwWrtShell& GetWrtShell() {return rSh;} SwTOXDescription& GetTOXDescription(CurTOXType eTOXTypes); void CreateOrUpdateExample( - TOXTypes nTOXIndex, USHORT nPage = 0, USHORT nCurLevel = USHRT_MAX); + TOXTypes nTOXIndex, sal_uInt16 nPage = 0, sal_uInt16 nCurLevel = USHRT_MAX); - static BOOL IsNoNum(SwWrtShell& rSh, const String& rName); + static sal_Bool IsNoNum(SwWrtShell& rSh, const String& rName); }; class IndexEntryRessource; @@ -151,6 +151,8 @@ class SwTOXSelectTabPage : public SfxTabPage CheckBox aFromHeadingsCB; CheckBox aAddStylesCB; PushButton aAddStylesPB; + Point aAddStylesPosDef; + Point aAddStylesPosUser; //user CheckBox aFromTablesCB; CheckBox aFromFramesCB; @@ -174,6 +176,7 @@ class SwTOXSelectTabPage : public SfxTabPage // //index only + FixedLine aIdxOptionsFL; CheckBox aCollectSameCB; CheckBox aUseFFCB; CheckBox aUseDashCB; @@ -182,7 +185,6 @@ class SwTOXSelectTabPage : public SfxTabPage CheckBox aKeyAsEntryCB; CheckBox aFromFileCB; MenuButton aAutoMarkPB; - FixedLine aIdxOptionsFL; // index only // object only SwOLENames aFromNames; @@ -215,7 +217,7 @@ class SwTOXSelectTabPage : public SfxTabPage const IndexEntrySupplierWrapper* pIndexEntryWrapper; - BOOL bFirstCall; + sal_Bool bFirstCall; DECL_LINK(TOXTypeHdl, ListBox* ); DECL_LINK(TOXAreaHdl, ListBox* ); @@ -238,7 +240,7 @@ public: SwTOXSelectTabPage(Window* pParent, const SfxItemSet& rAttrSet); ~SwTOXSelectTabPage(); - virtual BOOL FillItemSet( SfxItemSet& ); + virtual sal_Bool FillItemSet( SfxItemSet& ); virtual void Reset( const SfxItemSet& ); virtual void ActivatePage( const SfxItemSet& ); @@ -268,8 +270,8 @@ class SwTokenWindow : public Window ImageButton aRightScrollWin; TOXControlList aControlList; SwForm* pForm; - USHORT nLevel; - BOOL bValid; + sal_uInt16 nLevel; + sal_Bool bValid; String aButtonTexts[TOKEN_END]; // Text of the buttons String aButtonHelpTexts[TOKEN_END]; // QuickHelpText of the buttons String sCharStyle; @@ -297,12 +299,12 @@ public: SwTokenWindow(SwTOXEntryTabPage* pParent, const ResId& rResId); ~SwTokenWindow(); - void SetForm(SwForm& rForm, USHORT nLevel); - USHORT GetLastLevel()const {return nLevel;}; + void SetForm(SwForm& rForm, sal_uInt16 nLevel); + sal_uInt16 GetLastLevel()const {return nLevel;}; - BOOL IsValid() const {return bValid;} + sal_Bool IsValid() const {return bValid;} - void SetInvalid() {bValid = FALSE;} + void SetInvalid() {bValid = sal_False;} String GetPattern() const; @@ -315,14 +317,14 @@ public: { return pActiveCtrl;} void InsertAtSelection(const String& rText, const SwFormToken& aToken); - void RemoveControl(SwTOXButton* pDel, BOOL bInternalCall = FALSE); + void RemoveControl(SwTOXButton* pDel, sal_Bool bInternalCall = sal_False); - BOOL Contains(FormTokenType) const; + sal_Bool Contains(FormTokenType) const; - BOOL DetermineLinkStart(); + sal_Bool DetermineLinkStart(); //helper for pattern buttons and edits - BOOL CreateQuickHelp(Control* pCtrl, + sal_Bool CreateQuickHelp(Control* pCtrl, const SwFormToken& rToken, const HelpEvent& ); virtual void Resize(); @@ -345,6 +347,7 @@ class SwTOXEntryTabPage : public SfxTabPage FixedText aLevelFT; SwIdxTreeListBox aLevelLB; + FixedLine aEntryFL; FixedText aTokenFT; SwTokenWindow aTokenWIN; PushButton aAllLevelsPB; @@ -377,14 +380,13 @@ class SwTOXEntryTabPage : public SfxTabPage FixedText aTabPosFT; MetricField aTabPosMF; // tab stop position CheckBox aAutoRightCB; - FixedLine aEntryFL; + FixedLine aFormatFL; CheckBox aRelToStyleCB; // position relative to the right margin of the para style FixedText aMainEntryStyleFT; ListBox aMainEntryStyleLB; // character style of main entries in indexes CheckBox aAlphaDelimCB; CheckBox aCommaSeparatedCB; - FixedLine aFormatFL; RadioButton aSortDocPosRB; RadioButton aSortContentRB; @@ -421,7 +423,7 @@ class SwTOXEntryTabPage : public SfxTabPage Size aLevelFLSize; CurTOXType aLastTOXType; - BOOL bInLevelHdl; + sal_Bool bInLevelHdl; Point aChapterEntryFTPosition; //!< holds position of ChapterEntryFT control, //to be used in moving the element among different tokens @@ -456,7 +458,7 @@ public: SwTOXEntryTabPage(Window* pParent, const SfxItemSet& rAttrSet); ~SwTOXEntryTabPage(); - virtual BOOL FillItemSet( SfxItemSet& ); + virtual sal_Bool FillItemSet( SfxItemSet& ); virtual void Reset( const SfxItemSet& ); virtual void ActivatePage( const SfxItemSet& ); virtual int DeactivatePage( SfxItemSet* pSet = 0 ); @@ -465,21 +467,21 @@ public: const SfxItemSet& rAttrSet); void SetWrtShell(SwWrtShell& rSh); - String GetLevelHelp(USHORT nLevel) const; + String GetLevelHelp(sal_uInt16 nLevel) const; void PreTokenButtonRemoved(const SwFormToken& rToken); }; class SwTOXStylesTabPage : public SfxTabPage { + FixedLine aFormatFL; FixedText aLevelFT2; ListBox aLevelLB; + ImageButton aAssignBT; FixedText aTemplateFT; ListBox aParaLayLB; PushButton aStdBT; - ImageButton aAssignBT; PushButton aEditStyleBT; - FixedLine aFormatFL; SwForm* m_pCurrentForm; @@ -503,7 +505,7 @@ public: SwTOXStylesTabPage(Window* pParent, const SfxItemSet& rAttrSet); ~SwTOXStylesTabPage(); - virtual BOOL FillItemSet( SfxItemSet& ); + virtual sal_Bool FillItemSet( SfxItemSet& ); virtual void Reset( const SfxItemSet& ); virtual void ActivatePage( const SfxItemSet& ); diff --git a/sw/source/ui/inc/swuiidxmrk.hxx b/sw/source/ui/inc/swuiidxmrk.hxx index e4a179612f..c8ca13b0f7 100644 --- a/sw/source/ui/inc/swuiidxmrk.hxx +++ b/sw/source/ui/inc/swuiidxmrk.hxx @@ -42,7 +42,7 @@ #include <vcl/button.hxx> -#include <vcl/imagebtn.hxx> +#include <vcl/button.hxx> #include <sfx2/childwin.hxx> #include "toxe.hxx" #include <svtools/stdctrl.hxx> @@ -61,6 +61,7 @@ class SwIndexMarkDlg : public Window { friend class SwIndexMarkFloatDlg; friend class SwIndexMarkModalDlg; + FixedLine aIndexFL; FixedText aTypeFT; ListBox aTypeDCB; ImageButton aNewBT; @@ -87,7 +88,6 @@ class SwIndexMarkDlg : public Window CheckBox aSearchCaseSensitiveCB; CheckBox aSearchCaseWordOnlyCB; - FixedLine aIndexFL; OKButton aOKBT; CancelButton aCancelBT; @@ -106,11 +106,11 @@ class SwIndexMarkDlg : public Window sal_Bool bNewMark; sal_Bool bSelected; - BOOL bPhoneticED0_ChangedByUser; - BOOL bPhoneticED1_ChangedByUser; - BOOL bPhoneticED2_ChangedByUser; + sal_Bool bPhoneticED0_ChangedByUser; + sal_Bool bPhoneticED1_ChangedByUser; + sal_Bool bPhoneticED2_ChangedByUser; LanguageType nLangForPhoneticReading; //Language of current text used for phonetic reading proposal - BOOL bIsPhoneticReadingEnabled; //this value states wether phopentic reading is enabled in principle dependend of global cjk settings and language of current entry + sal_Bool bIsPhoneticReadingEnabled; //this value states wether phopentic reading is enabled in principle dependend of global cjk settings and language of current entry com::sun::star::uno::Reference< com::sun::star::i18n::XExtendedIndexEntrySupplier > xExtendedIndexEntrySupplier; diff --git a/sw/source/ui/inc/swuipardlg.hxx b/sw/source/ui/inc/swuipardlg.hxx index 2da3159335..475265ee87 100644 --- a/sw/source/ui/inc/swuipardlg.hxx +++ b/sw/source/ui/inc/swuipardlg.hxx @@ -32,20 +32,20 @@ class SwParaDlg: public SfxTabDialog { SwView& rView; - USHORT nHtmlMode; - BYTE nDlgMode; - BOOL bDrawParaDlg; + sal_uInt16 nHtmlMode; + sal_uInt8 nDlgMode; + sal_Bool bDrawParaDlg; - void PageCreated(USHORT nID, SfxTabPage& rPage); + void PageCreated(sal_uInt16 nID, SfxTabPage& rPage); public: SwParaDlg( Window *pParent, SwView& rVw, const SfxItemSet&, - BYTE nDialogMode, + sal_uInt8 nDialogMode, const String *pCollName = 0, - BOOL bDraw = FALSE, - UINT16 nDefPage = 0); + sal_Bool bDraw = sal_False, + sal_uInt16 nDefPage = 0); ~SwParaDlg(); }; diff --git a/sw/source/ui/inc/swwrtshitem.hxx b/sw/source/ui/inc/swwrtshitem.hxx index 5a2872cf62..95530b608d 100644 --- a/sw/source/ui/inc/swwrtshitem.hxx +++ b/sw/source/ui/inc/swwrtshitem.hxx @@ -39,7 +39,7 @@ class SW_DLLPUBLIC SwWrtShellItem: public SfxPoolItem public: TYPEINFO(); SwWrtShellItem(); - SwWrtShellItem( USHORT nWhich , SwWrtShell* pWrtSh); + SwWrtShellItem( sal_uInt16 nWhich , SwWrtShell* pWrtSh); SwWrtShellItem( const SwWrtShellItem& ); diff --git a/sw/source/ui/inc/syncbtn.hxx b/sw/source/ui/inc/syncbtn.hxx index b4067fc86f..edfff239aa 100644 --- a/sw/source/ui/inc/syncbtn.hxx +++ b/sw/source/ui/inc/syncbtn.hxx @@ -50,7 +50,7 @@ class SwSyncChildWin : public SfxChildWindow { public: SwSyncChildWin( Window* , - USHORT nId, + sal_uInt16 nId, SfxBindings*, SfxChildWinInfo* ); diff --git a/sw/source/ui/inc/tabledlg.hxx b/sw/source/ui/inc/tabledlg.hxx index 3b233cdaef..9b26c95762 100644 --- a/sw/source/ui/inc/tabledlg.hxx +++ b/sw/source/ui/inc/tabledlg.hxx @@ -44,9 +44,9 @@ struct TColumn; class SwTableTabDlg : public SfxTabDialog { SwWrtShell* pShell; - USHORT nHtmlMode; + sal_uInt16 nHtmlMode; - virtual void PageCreated(USHORT nId, SfxTabPage& rPage); + virtual void PageCreated(sal_uInt16 nId, SfxTabPage& rPage); public: SwTableTabDlg( Window* pParent, SfxItemPool& Pool, const SfxItemSet* pItemSet, SwWrtShell* pSh ); diff --git a/sw/source/ui/inc/tablemgr.hxx b/sw/source/ui/inc/tablemgr.hxx index e00bb65382..2ffc47c306 100644 --- a/sw/source/ui/inc/tablemgr.hxx +++ b/sw/source/ui/inc/tablemgr.hxx @@ -53,7 +53,7 @@ class SW_DLLPUBLIC SwTableFUNC { SwFrmFmt *pFmt; SwWrtShell *pSh; - BOOL bCopy; + sal_Bool bCopy; SwTabCols aCols; private: @@ -61,18 +61,18 @@ private: public: inline SwTableFUNC(SwFrmFmt &); - SwTableFUNC(SwWrtShell *pShell, BOOL bCopyFmt = FALSE); + SwTableFUNC(SwWrtShell *pShell, sal_Bool bCopyFmt = sal_False); ~SwTableFUNC(); void InitTabCols(); void ColWidthDlg(Window *pParent ); - SwTwips GetColWidth(USHORT nNum) const; - SwTwips GetMaxColWidth(USHORT nNum) const; - void SetColWidth(USHORT nNum, SwTwips nWidth ); - USHORT GetColCount() const; - USHORT GetCurColNum() const; + SwTwips GetColWidth(sal_uInt16 nNum) const; + SwTwips GetMaxColWidth(sal_uInt16 nNum) const; + void SetColWidth(sal_uInt16 nNum, SwTwips nWidth ); + sal_uInt16 GetColCount() const; + sal_uInt16 GetCurColNum() const; - BOOL IsTableSelected() const { return pFmt != 0; } + sal_Bool IsTableSelected() const { return pFmt != 0; } const SwFrmFmt *GetTableFmt() const { return pFmt; } @@ -89,7 +89,7 @@ public: inline SwTableFUNC::SwTableFUNC(SwFrmFmt &rFmt) : pFmt(&rFmt), pSh(0), - bCopy(FALSE) + bCopy(sal_False) { } diff --git a/sw/source/ui/inc/tabsh.hxx b/sw/source/ui/inc/tabsh.hxx index 90601ec082..163e69d76c 100644 --- a/sw/source/ui/inc/tabsh.hxx +++ b/sw/source/ui/inc/tabsh.hxx @@ -36,8 +36,8 @@ class SwWrtShell; SW_DLLPUBLIC void ItemSetToTableParam( const SfxItemSet& rSet, SwWrtShell &rSh ); -extern const USHORT aUITableAttrRange[]; -SW_DLLPUBLIC const USHORT* SwuiGetUITableAttrRange(); +extern const sal_uInt16 aUITableAttrRange[]; +SW_DLLPUBLIC const sal_uInt16* SwuiGetUITableAttrRange(); class SwTableShell: public SwBaseShell { diff --git a/sw/source/ui/inc/tautofmt.hxx b/sw/source/ui/inc/tautofmt.hxx index d78b44a890..11d8a4b1ad 100644 --- a/sw/source/ui/inc/tautofmt.hxx +++ b/sw/source/ui/inc/tautofmt.hxx @@ -54,12 +54,12 @@ class SwAutoFormatDlg : public SfxModalDialog { FixedLine aFlFormat; ListBox aLbFormat; + FixedLine aFlFormats; CheckBox aBtnNumFormat; CheckBox aBtnBorder; CheckBox aBtnFont; CheckBox aBtnPattern; CheckBox aBtnAlignment; - FixedLine aFlFormats; OKButton aBtnOk; CancelButton aBtnCancel; HelpButton aBtnHelp; @@ -79,14 +79,14 @@ class SwAutoFormatDlg : public SfxModalDialog //------------------------ SwWrtShell* pShell; SwTableAutoFmtTbl* pTableTbl; - BYTE nIndex; - BYTE nDfltStylePos; - BOOL bCoreDataChanged : 1; - BOOL bSetAutoFmt : 1; + sal_uInt8 nIndex; + sal_uInt8 nDfltStylePos; + sal_Bool bCoreDataChanged : 1; + sal_Bool bSetAutoFmt : 1; void Init( const SwTableAutoFmt* pSelFmt ); - void UpdateChecks( const SwTableAutoFmt&, BOOL bEnableBtn ); + void UpdateChecks( const SwTableAutoFmt&, sal_Bool bEnableBtn ); //------------------------ DECL_LINK( CheckHdl, Button * ); DECL_LINK( OkHdl, Button * ); @@ -97,7 +97,7 @@ class SwAutoFormatDlg : public SfxModalDialog public: SwAutoFormatDlg( Window* pParent, SwWrtShell* pShell, - BOOL bSetAutoFmt = TRUE, + sal_Bool bSetAutoFmt = sal_True, const SwTableAutoFmt* pSelFmt = 0 ); virtual ~SwAutoFormatDlg(); diff --git a/sw/source/ui/inc/tblctrl.hxx b/sw/source/ui/inc/tblctrl.hxx index df2e1a0799..73fa55a587 100644 --- a/sw/source/ui/inc/tblctrl.hxx +++ b/sw/source/ui/inc/tblctrl.hxx @@ -42,7 +42,7 @@ class SwTableOptimizeCtrl : public SfxToolBoxControl public: SFX_DECL_TOOLBOX_CONTROL(); - SwTableOptimizeCtrl( USHORT nSlotId, USHORT nId, ToolBox& rTbx ); + SwTableOptimizeCtrl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ); ~SwTableOptimizeCtrl(); virtual SfxPopupWindowType GetPopupWindowType() const; diff --git a/sw/source/ui/inc/tbxanchr.hxx b/sw/source/ui/inc/tbxanchr.hxx index a79ae1e769..cfff29f2fb 100644 --- a/sw/source/ui/inc/tbxanchr.hxx +++ b/sw/source/ui/inc/tbxanchr.hxx @@ -32,17 +32,17 @@ class SwTbxAnchor : public SfxToolBoxControl { - USHORT nActAnchorId; + sal_uInt16 nActAnchorId; public: - virtual void StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pState ); + virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ); virtual void Click(); virtual SfxPopupWindow* CreatePopupWindow(); SFX_DECL_TOOLBOX_CONTROL(); - SwTbxAnchor( USHORT nSlotId, USHORT nId, ToolBox& rTbx ); + SwTbxAnchor( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ); ~SwTbxAnchor(); }; diff --git a/sw/source/ui/inc/textcontrolcombo.hxx b/sw/source/ui/inc/textcontrolcombo.hxx index ba4deea8a3..d1ad4126ea 100644 --- a/sw/source/ui/inc/textcontrolcombo.hxx +++ b/sw/source/ui/inc/textcontrolcombo.hxx @@ -51,14 +51,14 @@ public: Control& _rCtrl, FixedText& _rFTbefore, FixedText& _rFTafter ); virtual ~TextControlCombo(); - void Arrange( FixedText& _rOrg, BOOL bShow = true ); + void Arrange( FixedText& _rOrg, sal_Bool bShow = true ); // identical to window functionality - void Show( BOOL bVisible = TRUE, USHORT nFlags = 0 ); - void Hide( USHORT nFlags = 0 ) { Show( FALSE, nFlags ); } + void Show( sal_Bool bVisible = sal_True, sal_uInt16 nFlags = 0 ); + void Hide( sal_uInt16 nFlags = 0 ) { Show( sal_False, nFlags ); } - void Enable( BOOL bEnable = TRUE, BOOL bChild = TRUE ); - void Disable( BOOL bChild = TRUE ) { Enable( FALSE, bChild ); } + void Enable( sal_Bool bEnable = sal_True, sal_Bool bChild = sal_True ); + void Disable( sal_Bool bChild = sal_True ) { Enable( sal_False, bChild ); } }; diff --git a/sw/source/ui/inc/textsh.hxx b/sw/source/ui/inc/textsh.hxx index a8215b653e..337c4aead5 100644 --- a/sw/source/ui/inc/textsh.hxx +++ b/sw/source/ui/inc/textsh.hxx @@ -42,7 +42,7 @@ class SwTextShell: public SwBaseShell void InsertSymbol( SfxRequest& ); void InsertHyperlink(const SvxHyperlinkItem& rHlnkItem); bool InsertMediaDlg( SfxRequest& ); - void ChangeHeaderOrFooter(const String& rStyleName, BOOL bHeader, BOOL bOn, BOOL bShowWarning); + void ChangeHeaderOrFooter(const String& rStyleName, sal_Bool bHeader, sal_Bool bOn, sal_Bool bShowWarning); public: SFX_DECL_INTERFACE(SW_TEXTSHELL) diff --git a/sw/source/ui/inc/titlepage.hxx b/sw/source/ui/inc/titlepage.hxx index 44230b90f1..5f102e0082 100644 --- a/sw/source/ui/inc/titlepage.hxx +++ b/sw/source/ui/inc/titlepage.hxx @@ -83,7 +83,7 @@ private: void FillList(); - USHORT GetInsertPosition() const; + sal_uInt16 GetInsertPosition() const; DECL_LINK( OKHdl, Button * ); DECL_LINK( EditHdl, Button * ); diff --git a/sw/source/ui/inc/tmpdlg.hxx b/sw/source/ui/inc/tmpdlg.hxx index 7729dcac97..6a8e7de1b8 100644 --- a/sw/source/ui/inc/tmpdlg.hxx +++ b/sw/source/ui/inc/tmpdlg.hxx @@ -39,25 +39,25 @@ class SwWrtShell; class SwTemplateDlg: public SfxStyleDialog { - USHORT nType; - USHORT nHtmlMode; + sal_uInt16 nType; + sal_uInt16 nHtmlMode; SwWrtShell* pWrtShell; - BOOL bNewStyle; + sal_Bool bNewStyle; DECL_LINK( NumOptionsHdl, PushButton* ); public: SwTemplateDlg( Window* pParent, SfxStyleSheetBase& rBase, - USHORT nRegion, - BOOL bColumn = FALSE, + sal_uInt16 nRegion, + sal_Bool bColumn = sal_False, SwWrtShell* pActShell = 0, - BOOL bNew = FALSE ); + sal_Bool bNew = sal_False ); ~SwTemplateDlg(); const SfxItemSet* GetRefreshedSet(); - virtual void PageCreated( USHORT nId, SfxTabPage &rPage ); + virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage ); virtual short Ok(); }; diff --git a/sw/source/ui/inc/tmplctrl.hxx b/sw/source/ui/inc/tmplctrl.hxx index 81ef7b73b8..6a9a2d35c2 100644 --- a/sw/source/ui/inc/tmplctrl.hxx +++ b/sw/source/ui/inc/tmplctrl.hxx @@ -38,13 +38,13 @@ class SwTemplateControl : public SfxStatusBarControl protected: virtual void Command( const CommandEvent& rCEvt ); public: - virtual void StateChanged( USHORT nSID, SfxItemState eState, + virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ); virtual void Paint( const UserDrawEvent& rEvt ); SFX_DECL_STATUSBAR_CONTROL(); - SwTemplateControl( USHORT nSlotId, USHORT nId, StatusBar& rStb ); + SwTemplateControl( sal_uInt16 nSlotId, sal_uInt16 nId, StatusBar& rStb ); ~SwTemplateControl(); private: diff --git a/sw/source/ui/inc/toolbox_tmpl.hrc b/sw/source/ui/inc/toolbox.hrc index 8c73a70c60..8c73a70c60 100644 --- a/sw/source/ui/inc/toolbox_tmpl.hrc +++ b/sw/source/ui/inc/toolbox.hrc diff --git a/sw/source/ui/inc/toxmgr.hxx b/sw/source/ui/inc/toxmgr.hxx index 22d4914f0c..5c2aeb0b70 100644 --- a/sw/source/ui/inc/toxmgr.hxx +++ b/sw/source/ui/inc/toxmgr.hxx @@ -50,9 +50,9 @@ class SW_DLLPUBLIC SwTOXDescription String* pTitle; String* pTOUName; SwForm* pForm; - USHORT nContent; - USHORT nIndexOptions; - USHORT nOLEOptions; + sal_uInt16 nContent; + sal_uInt16 nIndexOptions; + sal_uInt16 nOLEOptions; LanguageType eLanguage; String sSortAlgorithm; @@ -61,13 +61,13 @@ class SW_DLLPUBLIC SwTOXDescription SwTOXSortKey eSortKey1; SwTOXSortKey eSortKey2; SwTOXSortKey eSortKey3; - BYTE nLevel; - BOOL bFromObjectNames : 1; - BOOL bFromChapter : 1; - BOOL bReadonly: 1; - BOOL bLevelFromChapter : 1; - BOOL bIsAuthSequence :1; - BOOL bSortByDocument :1; + sal_uInt8 nLevel; + sal_Bool bFromObjectNames : 1; + sal_Bool bFromChapter : 1; + sal_Bool bReadonly: 1; + sal_Bool bLevelFromChapter : 1; + sal_Bool bIsAuthSequence :1; + sal_Bool bSortByDocument :1; //TODO: TemplateNames //const String* pTemplateName = 0, ??? @@ -90,12 +90,12 @@ public: eLanguage((LanguageType)::GetAppLanguage()), eCaptionDisplay(CAPTION_COMPLETE), nLevel(MAXLEVEL), - bFromObjectNames(FALSE), - bFromChapter(FALSE), - bReadonly(TRUE), - bLevelFromChapter(FALSE), - bIsAuthSequence(FALSE), - bSortByDocument(TRUE) + bFromObjectNames(sal_False), + bFromChapter(sal_False), + bReadonly(sal_True), + bLevelFromChapter(sal_False), + bIsAuthSequence(sal_False), + bSortByDocument(sal_True) {} ~SwTOXDescription() { @@ -107,9 +107,9 @@ public: void SetTOXType(TOXTypes eSet) { eTOXType = eSet;} TOXTypes GetTOXType() const { return eTOXType;} - const String& GetStyleNames(USHORT nLvl) const + const String& GetStyleNames(sal_uInt16 nLvl) const {return aStyleNames[nLvl];} - void SetStyleNames(const String& rSet, USHORT nLvl) + void SetStyleNames(const String& rSet, sal_uInt16 nLvl) {aStyleNames[nLvl] = rSet; } const String& GetAutoMarkURL() const { return sAutoMarkURL;} @@ -124,20 +124,20 @@ public: void SetForm(const SwForm& rSet) {delete pForm; pForm = new SwForm(rSet);} const SwForm* GetForm() const {return pForm;} - void SetContentOptions(USHORT nSet) { nContent = nSet;} - USHORT GetContentOptions() const { return nContent;} + void SetContentOptions(sal_uInt16 nSet) { nContent = nSet;} + sal_uInt16 GetContentOptions() const { return nContent;} - void SetIndexOptions(USHORT nSet) { nIndexOptions = nSet;} - USHORT GetIndexOptions() const { return nIndexOptions;} + void SetIndexOptions(sal_uInt16 nSet) { nIndexOptions = nSet;} + sal_uInt16 GetIndexOptions() const { return nIndexOptions;} const String& GetMainEntryCharStyle() const {return sMainEntryCharStyle;} void SetMainEntryCharStyle(const String& rSet) {sMainEntryCharStyle = rSet;} - void SetLevel(BYTE nSet) {nLevel = nSet;} - BYTE GetLevel()const {return nLevel; } + void SetLevel(sal_uInt8 nSet) {nLevel = nSet;} + sal_uInt8 GetLevel()const {return nLevel; } - void SetCreateFromObjectNames(BOOL bSet) { bFromObjectNames = bSet;} - BOOL IsCreateFromObjectNames() const {return bFromObjectNames;} + void SetCreateFromObjectNames(sal_Bool bSet) { bFromObjectNames = bSet;} + sal_Bool IsCreateFromObjectNames() const {return bFromObjectNames;} const String& GetSequenceName() const {return sSequenceName;} void SetSequenceName(const String& rSet) {sSequenceName = rSet;} @@ -145,26 +145,26 @@ public: SwCaptionDisplay GetCaptionDisplay() const { return eCaptionDisplay;} void SetCaptionDisplay(SwCaptionDisplay eSet) {eCaptionDisplay = eSet;} - void SetFromChapter(BOOL bSet) { bFromChapter = bSet;} - BOOL IsFromChapter() const {return bFromChapter;} + void SetFromChapter(sal_Bool bSet) { bFromChapter = bSet;} + sal_Bool IsFromChapter() const {return bFromChapter;} - void SetReadonly(BOOL bSet){bReadonly = bSet;} - BOOL IsReadonly() const {return bReadonly;} + void SetReadonly(sal_Bool bSet){bReadonly = bSet;} + sal_Bool IsReadonly() const {return bReadonly;} - USHORT GetOLEOptions() const {return nOLEOptions;} - void SetOLEOptions(USHORT nOpt) {nOLEOptions = nOpt;} + sal_uInt16 GetOLEOptions() const {return nOLEOptions;} + void SetOLEOptions(sal_uInt16 nOpt) {nOLEOptions = nOpt;} - BOOL IsLevelFromChapter() const {return bLevelFromChapter;} - void SetLevelFromChapter(BOOL bSet) {bLevelFromChapter = bSet;} + sal_Bool IsLevelFromChapter() const {return bLevelFromChapter;} + void SetLevelFromChapter(sal_Bool bSet) {bLevelFromChapter = bSet;} String GetAuthBrackets() const {return sAuthBrackets;} void SetAuthBrackets(const String& rSet) {sAuthBrackets = rSet;} - BOOL IsAuthSequence() const {return bIsAuthSequence;} - void SetAuthSequence(BOOL bSet){bIsAuthSequence = bSet;} + sal_Bool IsAuthSequence() const {return bIsAuthSequence;} + void SetAuthSequence(sal_Bool bSet){bIsAuthSequence = bSet;} - BOOL IsSortByDocument()const {return bSortByDocument ;} - void SetSortByDocument(BOOL bSet) {bSortByDocument = bSet;} + sal_Bool IsSortByDocument()const {return bSortByDocument ;} + void SetSortByDocument(sal_Bool bSet) {bSortByDocument = bSet;} void SetSortKeys(SwTOXSortKey eKey1, SwTOXSortKey eKey2, @@ -188,7 +188,7 @@ class SwTOXMarkDescription { TOXTypes eTOXType; int nLevel; - BOOL bMainEntry; + sal_Bool bMainEntry; String* pPrimKey; String* pSecKey; @@ -209,7 +209,7 @@ public: explicit SwTOXMarkDescription(TOXTypes eType) : eTOXType(eType), nLevel(0), - bMainEntry(FALSE), + bMainEntry(sal_False), pPrimKey(0), pSecKey(0), pAltStr(0), @@ -235,8 +235,8 @@ public: void SetLevel(int nSet) {nLevel = nSet;} int GetLevel() const {return nLevel;} - void SetMainEntry(BOOL bSet) {bMainEntry = bSet;} - BOOL IsMainEntry() const {return bMainEntry;} + void SetMainEntry(sal_Bool bSet) {bMainEntry = bSet;} + sal_Bool IsMainEntry() const {return bMainEntry;} void SetPrimKey(const String& rSet) {delete pPrimKey; pPrimKey = new String(rSet);} @@ -274,7 +274,7 @@ class SW_DLLPUBLIC SwTOXMgr SwTOXMark* pCurTOXMark; SwTOXMarks aCurMarks; - SW_DLLPRIVATE USHORT GetUserTypeID(const String& rStr); + SW_DLLPRIVATE sal_uInt16 GetUserTypeID(const String& rStr); public: // single argument ctors shall be explicit. @@ -289,22 +289,22 @@ public: void DeleteTOXMark(); - void NextTOXMark(BOOL bSame=FALSE); - void PrevTOXMark(BOOL bSame=FALSE); + void NextTOXMark(sal_Bool bSame=sal_False); + void PrevTOXMark(sal_Bool bSame=sal_False); // Aktuelle TOXmarks holen - USHORT GetTOXMarks(); - USHORT GetTOXMarkCount(); - SwTOXMark* GetTOXMark(USHORT nId); + sal_uInt16 GetTOXMarks(); + sal_uInt16 GetTOXMarkCount(); + SwTOXMark* GetTOXMark(sal_uInt16 nId); SwTOXMark* GetCurTOXMark(); - void SetCurTOXMark(USHORT nId); + void SetCurTOXMark(sal_uInt16 nId); // // Methoden fuer Verzeichnisse // - BOOL UpdateOrInsertTOX(const SwTOXDescription& rDesc, SwTOXBase** ppBase = 0, const SfxItemSet* pSet = 0); + sal_Bool UpdateOrInsertTOX(const SwTOXDescription& rDesc, SwTOXBase** ppBase = 0, const SfxItemSet* pSet = 0); - const SwTOXType* GetTOXType(TOXTypes eTyp, USHORT nId) const; + const SwTOXType* GetTOXType(TOXTypes eTyp, sal_uInt16 nId) const; const SwTOXBase* GetCurTOX(); }; @@ -312,7 +312,7 @@ public: /*-------------------------------------------------------------------- Beschreibung: Inlines --------------------------------------------------------------------*/ -inline USHORT SwTOXMgr::GetTOXMarkCount() +inline sal_uInt16 SwTOXMgr::GetTOXMarkCount() { return aCurMarks.Count(); } inline SwTOXMark* SwTOXMgr::GetCurTOXMark() diff --git a/sw/source/ui/inc/uiborder.hxx b/sw/source/ui/inc/uiborder.hxx index f8f426f8f8..44900332e3 100644 --- a/sw/source/ui/inc/uiborder.hxx +++ b/sw/source/ui/inc/uiborder.hxx @@ -42,7 +42,7 @@ public: // SW_BORDER_MODE_TABLE // SW_BORDER_MODE_FRAME - SwBorderDlg(Window* pParent, SfxItemSet& rSet, USHORT nType); + SwBorderDlg(Window* pParent, SfxItemSet& rSet, sal_uInt16 nType); ~SwBorderDlg(); }; diff --git a/sw/source/ui/inc/uiitems.hxx b/sw/source/ui/inc/uiitems.hxx index 8990e15eb8..f34a76b384 100644 --- a/sw/source/ui/inc/uiitems.hxx +++ b/sw/source/ui/inc/uiitems.hxx @@ -45,7 +45,7 @@ class SW_DLLPUBLIC SwPageFtnInfoItem : public SfxPoolItem public: - SwPageFtnInfoItem(const USHORT nId, SwPageFtnInfo& rInfo); + SwPageFtnInfoItem(const sal_uInt16 nId, SwPageFtnInfo& rInfo); SwPageFtnInfoItem(const SwPageFtnInfoItem& rItem ); ~SwPageFtnInfoItem(); @@ -57,8 +57,8 @@ public: String &rText, const IntlWrapper* pIntl = 0 ) const; - virtual bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; + virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); SwPageFtnInfo& GetPageFtnInfo() { return aFtnInfo; } const SwPageFtnInfo& GetPageFtnInfo() const { return aFtnInfo; } @@ -70,7 +70,7 @@ class SW_DLLPUBLIC SwPtrItem : public SfxPoolItem void* pMisc; public: - SwPtrItem( const USHORT nId = FN_PARAM_GRF_DIALOG, void* pPtr = 0); + SwPtrItem( const sal_uInt16 nId = FN_PARAM_GRF_DIALOG, void* pPtr = 0); SwPtrItem( const SwPtrItem& rItem ); virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; @@ -85,15 +85,15 @@ class SW_DLLPUBLIC SwUINumRuleItem : public SfxPoolItem SwNumRule* pRule; public: - SwUINumRuleItem( const SwNumRule& rRule, const USHORT = FN_PARAM_ACT_NUMBER); + SwUINumRuleItem( const SwNumRule& rRule, const sal_uInt16 = FN_PARAM_ACT_NUMBER); SwUINumRuleItem( const SwUINumRuleItem& rItem ); virtual ~SwUINumRuleItem(); virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; virtual int operator==( const SfxPoolItem& ) const; - virtual bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; + virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); const SwNumRule* GetNumRule() const { return pRule; } SwNumRule* GetNumRule() { return pRule; } @@ -102,7 +102,7 @@ public: class SwBackgroundDestinationItem : public SfxUInt16Item { public: - SwBackgroundDestinationItem(USHORT nWhich, USHORT nValue); + SwBackgroundDestinationItem(sal_uInt16 nWhich, sal_uInt16 nValue); virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; }; diff --git a/sw/source/ui/inc/uinums.hxx b/sw/source/ui/inc/uinums.hxx index 2301193597..c6571787b0 100644 --- a/sw/source/ui/inc/uinums.hxx +++ b/sw/source/ui/inc/uinums.hxx @@ -50,7 +50,7 @@ class SW_DLLPUBLIC SwNumRulesWithName { SwNumFmt aFmt; String sCharFmtName; - USHORT nCharPoolId; + sal_uInt16 nCharPoolId; _SwNumFmtsAttrs aItems; _SwNumFmtGlobal& operator=( const _SwNumFmtGlobal& ); @@ -58,7 +58,7 @@ class SW_DLLPUBLIC SwNumRulesWithName public: _SwNumFmtGlobal( const SwNumFmt& rFmt ); _SwNumFmtGlobal( const _SwNumFmtGlobal& ); - _SwNumFmtGlobal( SvStream&, USHORT nVersion ); + _SwNumFmtGlobal( SvStream&, sal_uInt16 nVersion ); ~_SwNumFmtGlobal(); void Store( SvStream& ); @@ -73,7 +73,7 @@ protected: public: SwNumRulesWithName(const SwNumRule &, const String &); SwNumRulesWithName( const SwNumRulesWithName & ); - SwNumRulesWithName(SvStream &, USHORT nVersion); + SwNumRulesWithName(SvStream &, sal_uInt16 nVersion); ~SwNumRulesWithName(); const SwNumRulesWithName &operator=(const SwNumRulesWithName &); @@ -91,11 +91,11 @@ public: protected: SwNumRulesWithName *pNumRules[ MAX_NUM_RULES ]; String sFileName; - USHORT nVersion; - BOOL bModified; + sal_uInt16 nVersion; + sal_Bool bModified; virtual int Load(SvStream&); - virtual BOOL Store(SvStream&); + virtual sal_Bool Store(SvStream&); void Init(); @@ -103,10 +103,10 @@ public: SwBaseNumRules(const String& rFileName); virtual ~SwBaseNumRules(); - inline const SwNumRulesWithName* GetRules(USHORT nIdx) const; + inline const SwNumRulesWithName* GetRules(sal_uInt16 nIdx) const; virtual void ApplyNumRules( const SwNumRulesWithName &rCopy, - USHORT nIdx); + sal_uInt16 nIdx); }; @@ -118,11 +118,11 @@ public: virtual ~SwChapterNumRules(); virtual void ApplyNumRules( const SwNumRulesWithName &rCopy, - USHORT nIdx); + sal_uInt16 nIdx); }; // INLINE METHODE -------------------------------------------------------- -inline const SwNumRulesWithName *SwBaseNumRules::GetRules(USHORT nIdx) const +inline const SwNumRulesWithName *SwBaseNumRules::GetRules(sal_uInt16 nIdx) const { OSL_ENSURE(nIdx < nMaxRules, "Array der NumRules ueberindiziert."); return pNumRules[nIdx]; diff --git a/sw/source/ui/inc/uitool.hxx b/sw/source/ui/inc/uitool.hxx index ef4d99c412..0534680274 100644 --- a/sw/source/ui/inc/uitool.hxx +++ b/sw/source/ui/inc/uitool.hxx @@ -28,7 +28,7 @@ #ifndef _UITOOL_HXX #define _UITOOL_HXX -#include <vcl/wintypes.hxx> +#include <tools/wintypes.hxx> #include <vcl/field.hxx> #include <swtypes.hxx> #include "swdllapi.h" @@ -63,7 +63,7 @@ SW_DLLPUBLIC void MakeDefTabs(SwTwips nDefDist, SvxTabStopItem& rTabs); //void EraseDefTabs(SvxTabStopItem& rTabs); // Abstand zwischen dem 1. und zweitem Element ermitteln -SW_DLLPUBLIC USHORT GetTabDist(const SvxTabStopItem& rTabs); +SW_DLLPUBLIC sal_uInt16 GetTabDist(const SvxTabStopItem& rTabs); // erfrage ob im Set eine Sfx-PageDesc-Kombination vorliegt // und setze diesen im Set und loesche die Transport Items @@ -71,27 +71,27 @@ SW_DLLPUBLIC USHORT GetTabDist(const SvxTabStopItem& rTabs); void SwToSfxPageDescAttr( SfxItemSet& rSet ); void SfxToSwPageDescAttr( const SwWrtShell& rShell, SfxItemSet& rSet ); -SW_DLLPUBLIC FieldUnit GetDfltMetric(BOOL bWeb); -void SetDfltMetric(FieldUnit eMetric, BOOL bWeb); +SW_DLLPUBLIC FieldUnit GetDfltMetric(sal_Bool bWeb); +void SetDfltMetric(FieldUnit eMetric, sal_Bool bWeb); -SW_DLLPUBLIC BOOL HasCharUnit( BOOL bWeb ); -void SetApplyCharUnit(BOOL bApplyChar, BOOL bWeb); +SW_DLLPUBLIC sal_Bool HasCharUnit( sal_Bool bWeb ); +void SetApplyCharUnit(sal_Bool bApplyChar, sal_Bool bWeb); // ListBox mit allen Zeichenvorlagen fuellen - ausser Standard! -SW_DLLPUBLIC void FillCharStyleListBox(ListBox& rToFill, SwDocShell* pDocSh, BOOL bSorted = FALSE, BOOL bWithDefault = FALSE); +SW_DLLPUBLIC void FillCharStyleListBox(ListBox& rToFill, SwDocShell* pDocSh, sal_Bool bSorted = sal_False, sal_Bool bWithDefault = sal_False); //inserts a string sorted into a ListBox, -SW_DLLPUBLIC USHORT InsertStringSorted(const String& rEntry, ListBox& rToFill, USHORT nOffset); +SW_DLLPUBLIC sal_uInt16 InsertStringSorted(const String& rEntry, ListBox& rToFill, sal_uInt16 nOffset); // Tabellenbreite und Ausrichtung ermitteln -SwTwips GetTableWidth( SwFrmFmt* pFmt, SwTabCols& rCols, USHORT *pPercent, +SwTwips GetTableWidth( SwFrmFmt* pFmt, SwTabCols& rCols, sal_uInt16 *pPercent, SwWrtShell* pSh ); String GetAppLangDateTimeString( const DateTime& ); // search for a command string withing the menu structure and execute it // at the dispatcher if there is one, if executed return true -bool ExecuteMenuCommand( PopupMenu& rMenu, SfxViewFrame& rViewFrame, USHORT nId ); +bool ExecuteMenuCommand( PopupMenu& rMenu, SfxViewFrame& rViewFrame, sal_uInt16 nId ); #endif // _UITOOL_HXX diff --git a/sw/source/ui/inc/uivwimp.hxx b/sw/source/ui/inc/uivwimp.hxx index e8941ab6c0..dc97992b66 100644 --- a/sw/source/ui/inc/uivwimp.hxx +++ b/sw/source/ui/inc/uivwimp.hxx @@ -90,7 +90,7 @@ public: void ViewDestroyed() { pView = 0; } - void AddRemoveListener( BOOL bAdd ); + void AddRemoveListener( sal_Bool bAdd ); }; class SwMailMergeConfigItem; @@ -105,8 +105,7 @@ class SwView_Impl // temporary document for printing text of selection / multi selection // in PDF export. - SfxObjectShellRef xTmpSelDocSh; - SfxObjectShellRef aEmbeddedObjRef; + SfxObjectShellLock xTmpSelDocSh; SwView* pView; SwScannerEventListener* pScanEvtLstnr; @@ -142,9 +141,7 @@ public: void AddClipboardListener(); - SfxObjectShellRef & GetTmpSelectionDoc() { return xTmpSelDocSh; } - - SfxObjectShellRef& GetEmbeddedObjRef() { return *boost::addressof(aEmbeddedObjRef); } + SfxObjectShellLock& GetTmpSelectionDoc() { return xTmpSelDocSh; } void AddTransferable(SwTransferable& rTransferable); diff --git a/sw/source/ui/inc/unotools.hxx b/sw/source/ui/inc/unotools.hxx index c58e98779b..16572bb779 100644 --- a/sw/source/ui/inc/unotools.hxx +++ b/sw/source/ui/inc/unotools.hxx @@ -115,7 +115,7 @@ public: STAR_REFERENCE( frame::XController ) & GetController() {return _xController;} STAR_REFERENCE( text::XTextCursor ) & GetTextCursor() {return _xCursor;} - void ClearDocument( BOOL bStartTimer = FALSE ); + void ClearDocument( sal_Bool bStartTimer = sal_False ); sal_Bool IsInitialized() const {return bIsInitialized;} sal_Bool IsServiceAvailable() const {return bServiceAvailable;} diff --git a/sw/source/ui/inc/unotxvw.hxx b/sw/source/ui/inc/unotxvw.hxx index 9a205d08cd..93c42fee61 100644 --- a/sw/source/ui/inc/unotxvw.hxx +++ b/sw/source/ui/inc/unotxvw.hxx @@ -154,7 +154,7 @@ public: void Invalidate(); // temporary document used for PDF export of selections/multi-selections - SfxObjectShellRef BuildTmpSelectionDoc( SfxObjectShellRef& ); + SfxObjectShellLock BuildTmpSelectionDoc(); }; typedef cppu::WeakImplHelper8< @@ -190,12 +190,12 @@ public: //XTextCursor - neu virtual void SAL_CALL collapseToStart( ) throw(::com::sun::star::uno::RuntimeException); virtual void SAL_CALL collapseToEnd( ) throw(::com::sun::star::uno::RuntimeException); - virtual BOOL SAL_CALL isCollapsed( ) throw(::com::sun::star::uno::RuntimeException); - virtual BOOL SAL_CALL goLeft( sal_Int16 nCount, BOOL bExpand ) throw(::com::sun::star::uno::RuntimeException); - virtual BOOL SAL_CALL goRight( sal_Int16 nCount, BOOL bExpand ) throw(::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL gotoStart( BOOL bExpand ) throw(::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL gotoEnd( BOOL bExpand ) throw(::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL gotoRange( const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange >& xRange, BOOL bExpand ) throw(::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL isCollapsed( ) throw(::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL goLeft( sal_Int16 nCount, sal_Bool bExpand ) throw(::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL goRight( sal_Int16 nCount, sal_Bool bExpand ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL gotoStart( sal_Bool bExpand ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL gotoEnd( sal_Bool bExpand ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL gotoRange( const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange >& xRange, sal_Bool bExpand ) throw(::com::sun::star::uno::RuntimeException); //XPageCursor virtual sal_Bool SAL_CALL jumpToFirstPage(void) throw( ::com::sun::star::uno::RuntimeException ); diff --git a/sw/source/ui/inc/usrpref.hxx b/sw/source/ui/inc/usrpref.hxx index db607c05b4..53f2d76af1 100644 --- a/sw/source/ui/inc/usrpref.hxx +++ b/sw/source/ui/inc/usrpref.hxx @@ -33,18 +33,18 @@ #include <unotools/configitem.hxx> #include <fldupde.hxx> #include "viewopt.hxx" -#include <vcl/fldunit.hxx> +#include <tools/fldunit.hxx> class SwMasterUsrPref; class SwContentViewConfig : public utl::ConfigItem { SwMasterUsrPref& rParent; - BOOL bWeb; + sal_Bool bWeb; com::sun::star::uno::Sequence<rtl::OUString> GetPropertyNames(); public: - SwContentViewConfig(BOOL bWeb, SwMasterUsrPref& rParent); + SwContentViewConfig(sal_Bool bWeb, SwMasterUsrPref& rParent); ~SwContentViewConfig(); // utl::ConfigItem @@ -58,11 +58,11 @@ class SwContentViewConfig : public utl::ConfigItem class SwLayoutViewConfig : public utl::ConfigItem { SwMasterUsrPref& rParent; - BOOL bWeb; + sal_Bool bWeb; com::sun::star::uno::Sequence<rtl::OUString> GetPropertyNames(); public: - SwLayoutViewConfig(BOOL bWeb, SwMasterUsrPref& rParent); + SwLayoutViewConfig(sal_Bool bWeb, SwMasterUsrPref& rParent); ~SwLayoutViewConfig(); virtual void Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& aPropertyNames ); @@ -74,11 +74,11 @@ class SwLayoutViewConfig : public utl::ConfigItem class SwGridConfig : public utl::ConfigItem { SwMasterUsrPref& rParent; - BOOL bWeb; + sal_Bool bWeb; com::sun::star::uno::Sequence<rtl::OUString> GetPropertyNames(); public: - SwGridConfig(BOOL bWeb, SwMasterUsrPref& rParent); + SwGridConfig(sal_Bool bWeb, SwMasterUsrPref& rParent); ~SwGridConfig(); virtual void Commit(); @@ -136,6 +136,8 @@ class SwMasterUsrPref : public SwViewOption sal_Int32 nDefTab; //default tab stop distance sal_Bool bIsSquaredPageMode; //default page mode for text grid + sal_Bool bIsAlignMathObjectsToBaseline; + SwContentViewConfig aContentConfig; SwLayoutViewConfig aLayoutConfig; SwGridConfig aGridConfig; @@ -144,7 +146,7 @@ class SwMasterUsrPref : public SwViewOption sal_Bool bApplyCharUnit; // apply_char_unit public: - SwMasterUsrPref(BOOL bWeb); + SwMasterUsrPref(sal_Bool bWeb); ~SwMasterUsrPref(); void SetUsrPref(const SwViewOption &rCopy); @@ -176,7 +178,7 @@ public: } sal_Int32 GetUpdateLinkMode() const {return nLinkUpdateMode; } - void SetUpdateFields(BOOL bSet, sal_Bool bNoModify = sal_False) + void SetUpdateFields(sal_Bool bSet, sal_Bool bNoModify = sal_False) { if(bSet && eFldUpdateFlags == AUTOUPD_OFF) { @@ -201,7 +203,7 @@ public: aContentConfig.SetModified(); } - void SetUpdateCharts(BOOL bSet, sal_Bool bNoModify = sal_False) + void SetUpdateCharts(sal_Bool bSet, sal_Bool bNoModify = sal_False) { if(bSet) { @@ -248,7 +250,7 @@ public: { return bApplyCharUnit; } - void SetApplyCharUnit(BOOL bSet, sal_Bool bNoModify = sal_False) + void SetApplyCharUnit(sal_Bool bSet, sal_Bool bNoModify = sal_False) { bApplyCharUnit = bSet; if(!bNoModify) @@ -272,6 +274,13 @@ public: aLayoutConfig.SetModified(); } + sal_Bool IsAlignMathObjectsToBaseline() const { return bIsAlignMathObjectsToBaseline; } + void SetAlignMathObjectsToBaseline( sal_Bool bVal, sal_Bool bNoModify = sal_False ) + { + bIsAlignMathObjectsToBaseline = bVal; + if(!bNoModify) + aLayoutConfig.SetModified(); + } }; #endif diff --git a/sw/source/ui/inc/view.hxx b/sw/source/ui/inc/view.hxx index 3855105a6c..8961760c08 100644 --- a/sw/source/ui/inc/view.hxx +++ b/sw/source/ui/inc/view.hxx @@ -34,7 +34,7 @@ #include <svtools/htmlcfg.hxx> #include <sfx2/viewfac.hxx> #include <sfx2/viewsh.hxx> -#include <sfx2/objsh.hxx> // SfxObjectShellRef <-> SV_DECL_REF(SfxObjectShell) +#include <sfx2/objsh.hxx> #include <editeng/svxenum.hxx> #include <svx/zoomitem.hxx> #include <editeng/editstat.hxx> @@ -59,7 +59,6 @@ class SvxRuler; class SvxLRSpaceItem; class SwDocShell; class SwScrollbar; -class PrintDialog; class SvxVCBrowser; class SvBorder; class Ruler; @@ -85,7 +84,6 @@ class CommandEvent; class InsCaptionOpt; class SvGlobalName; class SvtAccessibilityOptions; -class SwPrtOptions; class SwTransferable; class SwMailMergeConfigItem; class SwTxtNode; // #i23726# @@ -150,15 +148,15 @@ struct SwApplyTemplate } aColl; int eType; - USHORT nColor; + sal_uInt16 nColor; SwFormatClipboard* pFormatClipboard; - BOOL bUndo; + sal_Bool bUndo; SwApplyTemplate() : eType(0), nColor(0), pFormatClipboard(0), - bUndo(FALSE) + bUndo(sal_False) { aColl.pTxtColl = 0; } @@ -182,16 +180,16 @@ class SW_DLLPUBLIC SwView: public SfxViewShell static SvxSearchDialog *pSrchDlg; static SvxSearchItem *pSrchItem; - static USHORT nInsertCtrlState; - static USHORT nWebInsertCtrlState; - static USHORT nInsertObjectCtrlState; - static USHORT nInsertFieldCtrlState; - static USHORT nMoveType; // fuer Buttons unter dem Scrollbar (viewmdi) + static sal_uInt16 nInsertCtrlState; + static sal_uInt16 nWebInsertCtrlState; + static sal_uInt16 nInsertObjectCtrlState; + static sal_uInt16 nInsertFieldCtrlState; + static sal_uInt16 nMoveType; // fuer Buttons unter dem Scrollbar (viewmdi) static sal_Int32 nActMark; // aktuelle Sprungmarke fuer unbenannte Merker - static BOOL bExtra; - static BOOL bFound; - static BOOL bJustOpened; + static sal_Bool bExtra; + static sal_Bool bFound; + static sal_Bool bJustOpened; static SearchAttrItemList* pSrchList; static SearchAttrItemList* pReplList; @@ -205,7 +203,7 @@ class SW_DLLPUBLIC SwView: public SfxViewShell //and the new cursor position if the user double click in the PagePreView sNewCrsrPos; // to support keyboard the number of the page to go to can be set too - USHORT nNewPage; + sal_uInt16 nNewPage; Point aTabColFromDocPos; //Verschieben von Tabellenspalten aus //aus dem Dokument heraus. @@ -254,19 +252,19 @@ class SW_DLLPUBLIC SwView: public SfxViewShell String aCurrShapeEnumCommand[ MASTERENUMCOMMANDS ]; - USHORT nPageCnt; + sal_uInt16 nPageCnt; // Aktueller Drawmode - USHORT nDrawSfxId; + sal_uInt16 nDrawSfxId; String sDrawCustom; //some drawing types are marked with strings! - USHORT nFormSfxId; - USHORT nLastPasteDestination; + sal_uInt16 nFormSfxId; + sal_uInt16 nLastPasteDestination; // save the border distance status from SwView::StateTabWin to re-use it in SwView::ExecTabWin() - USHORT nLeftBorderDistance; - USHORT nRightBorderDistance; + sal_uInt16 nLeftBorderDistance; + sal_uInt16 nRightBorderDistance; - BOOL bCenterCrsr : 1, + sal_Bool bCenterCrsr : 1, bTopCrsr : 1, bAllwaysShowSel : 1, bTabColFromDoc : 1, @@ -292,14 +290,14 @@ class SW_DLLPUBLIC SwView: public SfxViewShell // Methoden fuers Suchen // Suchkontext setzen - SW_DLLPRIVATE BOOL SearchAndWrap(BOOL bApi = FALSE); - SW_DLLPRIVATE BOOL SearchAll(USHORT* pFound = 0); - SW_DLLPRIVATE ULONG FUNC_Search( const SwSearchOptions& rOptions ); + SW_DLLPRIVATE sal_Bool SearchAndWrap(sal_Bool bApi = sal_False); + SW_DLLPRIVATE sal_Bool SearchAll(sal_uInt16* pFound = 0); + SW_DLLPRIVATE sal_uLong FUNC_Search( const SwSearchOptions& rOptions ); SW_DLLPRIVATE void Replace(); - BOOL IsDocumentBorder(); + sal_Bool IsDocumentBorder(); - SW_DLLPRIVATE BOOL IsTextTool() const; + SW_DLLPRIVATE sal_Bool IsTextTool() const; // Bedienelemente verwalten anlegen SW_DLLPRIVATE void CreateBtns(); @@ -316,32 +314,32 @@ class SW_DLLPUBLIC SwView: public SfxViewShell inline long GetYScroll() const; SW_DLLPRIVATE Point AlignToPixel(const Point& rPt) const; SW_DLLPRIVATE void CalcPt( Point* pPt,const Rectangle& rRect, - USHORT nRangeX = USHRT_MAX, - USHORT nRangeY = USHRT_MAX); + sal_uInt16 nRangeX = USHRT_MAX, + sal_uInt16 nRangeY = USHRT_MAX); - SW_DLLPRIVATE BOOL GetPageScrollUpOffset(SwTwips& rOff) const; - SW_DLLPRIVATE BOOL GetPageScrollDownOffset(SwTwips& rOff) const; + SW_DLLPRIVATE sal_Bool GetPageScrollUpOffset(SwTwips& rOff) const; + SW_DLLPRIVATE sal_Bool GetPageScrollDownOffset(SwTwips& rOff) const; // Scrollbar Movements SW_DLLPRIVATE long PageUp(); SW_DLLPRIVATE long PageDown(); - SW_DLLPRIVATE long PageUpCrsr(BOOL bSelect); - SW_DLLPRIVATE long PageDownCrsr(BOOL bSelect); + SW_DLLPRIVATE long PageUpCrsr(sal_Bool bSelect); + SW_DLLPRIVATE long PageDownCrsr(sal_Bool bSelect); SW_DLLPRIVATE long PhyPageUp(); SW_DLLPRIVATE long PhyPageDown(); - SW_DLLPRIVATE int _CreateScrollbar( BOOL bHori ); + SW_DLLPRIVATE int _CreateScrollbar( sal_Bool bHori ); SW_DLLPRIVATE DECL_LINK( ScrollHdl, SwScrollbar * ); SW_DLLPRIVATE DECL_LINK( EndScrollHdl, SwScrollbar * ); + SW_DLLPRIVATE sal_Bool UpdateScrollbars(); SW_DLLPRIVATE DECL_LINK( WindowChildEventListener, VclSimpleEvent* ); - SW_DLLPRIVATE BOOL UpdateScrollbars(); SW_DLLPRIVATE void CalcVisArea( const Size &rPixelSz ); - SW_DLLPRIVATE void CreatePageButtons(BOOL bShow); + SW_DLLPRIVATE void CreatePageButtons(sal_Bool bShow); // Linguistik-Funktionen SW_DLLPRIVATE void HyphenateDocument(); - SW_DLLPRIVATE BOOL IsDrawTextHyphenate(); + SW_DLLPRIVATE sal_Bool IsDrawTextHyphenate(); SW_DLLPRIVATE void HyphenateDrawText(); SW_DLLPRIVATE void StartThesaurus(); @@ -349,18 +347,17 @@ class SW_DLLPUBLIC SwView: public SfxViewShell SW_DLLPRIVATE void StartTextConversion( LanguageType nSourceLang, LanguageType nTargetLang, const Font *pTargetFont, sal_Int32 nOptions, sal_Bool bIsInteractive ); // used for spell checking and text conversion - SW_DLLPRIVATE void SpellStart( SvxSpellArea eSpell, BOOL bStartDone, - BOOL bEndDone, SwConversionArgs *pConvArgs = 0 ); + SW_DLLPRIVATE void SpellStart( SvxSpellArea eSpell, sal_Bool bStartDone, + sal_Bool bEndDone, SwConversionArgs *pConvArgs = 0 ); SW_DLLPRIVATE void SpellEnd( SwConversionArgs *pConvArgs = 0 ); SW_DLLPRIVATE void HyphStart( SvxSpellArea eSpell ); - SW_DLLPRIVATE BOOL CheckSpecialCntnt(); - SW_DLLPRIVATE void SpellKontext(BOOL bOn = TRUE) + SW_DLLPRIVATE sal_Bool CheckSpecialCntnt(); + SW_DLLPRIVATE void SpellKontext(sal_Bool bOn = sal_True) { bCenterCrsr = bOn; bAllwaysShowSel = bOn; } // Methoden fuers Printing - SW_DLLPRIVATE virtual SfxPrinter* GetPrinter( BOOL bCreate = FALSE ); - SW_DLLPRIVATE virtual PrintDialog* CreatePrintDialog( Window* pParent ); + SW_DLLPRIVATE virtual SfxPrinter* GetPrinter( sal_Bool bCreate = sal_False ); SfxTabPage* CreatePrintOptionsPage( Window* pParent, const SfxItemSet& rSet); // fuer Readonly-Umschaltung @@ -374,14 +371,14 @@ class SW_DLLPUBLIC SwView: public SfxViewShell SW_DLLPRIVATE void _SetZoom( const Size &rEditSz, SvxZoomType eZoomType, short nFactor = 100, - BOOL bViewOnly = FALSE); - SW_DLLPRIVATE void CalcAndSetBorderPixel( SvBorder &rToFill, BOOL bInner ); + sal_Bool bViewOnly = sal_False); + SW_DLLPRIVATE void CalcAndSetBorderPixel( SvBorder &rToFill, sal_Bool bInner ); SW_DLLPRIVATE void ShowAtResize(); SW_DLLPRIVATE virtual void Move(); - SW_DLLPRIVATE BOOL InsertGraphicDlg( SfxRequest& ); + SW_DLLPRIVATE sal_Bool InsertGraphicDlg( SfxRequest& ); protected: @@ -398,8 +395,8 @@ protected: virtual void SelectShell(); - virtual void Activate(BOOL); - virtual void Deactivate(BOOL); + virtual void Activate(sal_Bool); + virtual void Deactivate(sal_Bool); virtual void InnerResizePixel( const Point &rOfs, const Size &rSize ); virtual void OuterResizePixel( const Point &rOfs, const Size &rSize ); virtual Size GetOptimalSizePixel() const; @@ -410,7 +407,7 @@ protected: void SetLastTblFrmFmt(const SwFrmFmt* pSet) {pLastTableFormat = pSet;} // form letter execution - void GenerateFormLetter(BOOL bUseCurrentDocument); + void GenerateFormLetter(sal_Bool bUseCurrentDocument); using SfxShell::GetDispatcher; @@ -425,20 +422,20 @@ public: void GotFocus() const; virtual SdrView* GetDrawView() const; virtual sal_Bool HasUIFeature( sal_uInt32 nFeature ); - virtual void ShowCursor( bool bOn = TRUE ); + virtual void ShowCursor( bool bOn = sal_True ); virtual ErrCode DoVerb( long nVerb ); - virtual USHORT SetPrinter( SfxPrinter* pNew, - USHORT nDiff = SFX_PRINTER_ALL, bool bIsAPI=false); + virtual sal_uInt16 SetPrinter( SfxPrinter* pNew, + sal_uInt16 nDiff = SFX_PRINTER_ALL, bool bIsAPI=false); ShellModes GetShellMode(); com::sun::star::view::XSelectionSupplier* GetUNOObject(); - String GetSelectionTextParam( BOOL bCompleteWords, - BOOL bEraseTrail ); - virtual BOOL HasSelection( BOOL bText ) const; - virtual String GetSelectionText( BOOL bCompleteWords = FALSE ); - virtual USHORT PrepareClose( BOOL bUI = TRUE, BOOL bForBrowsing = FALSE ); + String GetSelectionTextParam( sal_Bool bCompleteWords, + sal_Bool bEraseTrail ); + virtual sal_Bool HasSelection( sal_Bool bText ) const; + virtual String GetSelectionText( sal_Bool bCompleteWords = sal_False ); + virtual sal_uInt16 PrepareClose( sal_Bool bUI = sal_True, sal_Bool bForBrowsing = sal_False ); virtual void MarginChanged(); // replace word/selection with text from the thesaurus @@ -456,7 +453,7 @@ public: inline SwEditWin &GetEditWin() { return *pEditWin; } inline const SwEditWin &GetEditWin () const { return *pEditWin; } -#if defined WIN || defined WNT || defined UNX +#if defined WNT || defined UNX void ScannerEventHdl( const ::com::sun::star::lang::EventObject& rEventObject ); #endif @@ -465,58 +462,59 @@ public: inline const Rectangle& GetVisArea() const { return aVisArea; } - BOOL IsScroll(const Rectangle& rRect) const; + sal_Bool IsScroll(const Rectangle& rRect) const; void Scroll( const Rectangle& rRect, - USHORT nRangeX = USHRT_MAX, - USHORT nRangeY = USHRT_MAX); + sal_uInt16 nRangeX = USHRT_MAX, + sal_uInt16 nRangeY = USHRT_MAX); long SetVScrollMax(long lMax); long SetHScrollMax(long lMax); DECL_LINK( SpellError, LanguageType * ); - BOOL ExecSpellPopup( const Point& rPt ); - void ExecFieldPopup( const Point& rPt, sw::mark::IFieldmark *fieldBM ); + sal_Bool ExecSpellPopup( const Point& rPt ); + void ExecFieldPopup( const Point& rPt, sw::mark::IFieldmark *fieldBM ); + // SMARTTAGS - BOOL ExecSmartTagPopup( const Point& rPt ); + sal_Bool ExecSmartTagPopup( const Point& rPt ); DECL_LINK( OnlineSpellCallback, SpellCallbackInfo*); - BOOL ExecDrwTxtSpellPopup(const Point& rPt); + sal_Bool ExecDrwTxtSpellPopup(const Point& rPt); void SetTabColFromDocPos( const Point &rPt ) { aTabColFromDocPos = rPt; } - void SetTabColFromDoc( BOOL b ) { bTabColFromDoc = b; } - BOOL IsTabColFromDoc() const { return bTabColFromDoc; } - void SetTabRowFromDoc( BOOL b ) { bTabRowFromDoc = b; } - BOOL IsTabRowFromDoc() const { return bTabRowFromDoc; } + void SetTabColFromDoc( sal_Bool b ) { bTabColFromDoc = b; } + sal_Bool IsTabColFromDoc() const { return bTabColFromDoc; } + void SetTabRowFromDoc( sal_Bool b ) { bTabRowFromDoc = b; } + sal_Bool IsTabRowFromDoc() const { return bTabRowFromDoc; } // -> #i23726# void SetNumRuleNodeFromDoc( SwTxtNode * pNumRuleNode ) { pNumRuleNodeFromDoc = pNumRuleNode; } - void SetNumIndentFromDoc(BOOL b) { bNumIndentFromDoc = b; } - BOOL IsNumIndentFromDoc() const { return NULL != pNumRuleNodeFromDoc; } + void SetNumIndentFromDoc(sal_Bool b) { bNumIndentFromDoc = b; } + sal_Bool IsNumIndentFromDoc() const { return NULL != pNumRuleNodeFromDoc; } // <- #i23726# void DocSzChgd( const Size& rNewSize ); const Size& GetDocSz() const { return aDocSz; } - virtual void SetVisArea( const Rectangle&, BOOL bUpdateScrollbar = TRUE); - void SetVisArea( const Point&, BOOL bUpdateScrollbar = TRUE); + virtual void SetVisArea( const Rectangle&, sal_Bool bUpdateScrollbar = sal_True); + void SetVisArea( const Point&, sal_Bool bUpdateScrollbar = sal_True); void CheckVisArea(); static LAYOUT_NS Dialog* GetSearchDialog(); - static USHORT GetMoveType(); - static void SetMoveType(USHORT nSet); + static sal_uInt16 GetMoveType(); + static void SetMoveType(sal_uInt16 nSet); DECL_STATIC_LINK( SwView, MoveNavigationHdl, bool* ); // #i75416# static void SetActMark(sal_Int32 nSet); - BOOL HandleWheelCommands( const CommandEvent& ); + sal_Bool HandleWheelCommands( const CommandEvent& ); // Rahmen einfuegen - void InsFrmMode(USHORT nCols); + void InsFrmMode(sal_uInt16 nCols); - void SetZoom( SvxZoomType eZoomType, short nFactor = 100, BOOL bViewOnly = FALSE); + void SetZoom( SvxZoomType eZoomType, short nFactor = 100, sal_Bool bViewOnly = sal_False); virtual void SetZoomFactor( const Fraction &rX, const Fraction & ); - void SetViewLayout( USHORT nColumns, bool bBookMode, BOOL bViewOnly = FALSE ); + void SetViewLayout( sal_uInt16 nColumns, bool bBookMode, sal_Bool bViewOnly = sal_False ); void ShowHScrollbar(sal_Bool bShow); sal_Bool IsHScrollbarVisible()const; @@ -555,7 +553,7 @@ public: void ExecTabWin(SfxRequest&); void ExecuteStatusLine(SfxRequest&); DECL_LINK( ExecRulerClick, Ruler * ); - void ExecSearch(SfxRequest&, BOOL bNoMessage = FALSE); + void ExecSearch(SfxRequest&, sal_Bool bNoMessage = sal_False); void ExecViewOptions(SfxRequest &); void StateViewOptions(SfxItemSet &); @@ -566,24 +564,24 @@ public: // Funktionen fuer Drawing void SetDrawFuncPtr(SwDrawBase* pFuncPtr); - inline SwDrawBase* GetDrawFuncPtr(/*BOOL bBuf = FALSE*/) const { return pDrawActual; } + inline SwDrawBase* GetDrawFuncPtr(/*sal_Bool bBuf = sal_False*/) const { return pDrawActual; } void GetDrawState(SfxItemSet &rSet); void ExitDraw(); - inline BOOL IsDrawRotate() { return bDrawRotate; } + inline sal_Bool IsDrawRotate() { return bDrawRotate; } inline void FlipDrawRotate() { bDrawRotate = !bDrawRotate; } - inline BOOL IsDrawSelMode() { return bDrawSelMode; } + inline sal_Bool IsDrawSelMode() { return bDrawSelMode; } void SetSelDrawSlot(); inline void FlipDrawSelMode() { bDrawSelMode = !bDrawSelMode; } void NoRotate(); // Rotate-Mode abschalten - BOOL EnterDrawTextMode(const Point& aDocPos); + sal_Bool EnterDrawTextMode(const Point& aDocPos); void LeaveDrawCreate() { nDrawSfxId = nFormSfxId = USHRT_MAX; sDrawCustom.Erase();} - BOOL IsDrawMode() { return (nDrawSfxId != USHRT_MAX || nFormSfxId != USHRT_MAX); } - BOOL IsFormMode() const; - BOOL IsBezierEditMode(); - BOOL AreOnlyFormsSelected() const; - BOOL HasDrwObj(SdrObject *pSdrObj) const; - BOOL HasOnlyObj(SdrObject *pSdrObj, UINT32 eObjInventor) const; - BOOL BeginTextEdit( SdrObject* pObj, SdrPageView* pPV=NULL, + sal_Bool IsDrawMode() { return (nDrawSfxId != USHRT_MAX || nFormSfxId != USHRT_MAX); } + sal_Bool IsFormMode() const; + sal_Bool IsBezierEditMode(); + sal_Bool AreOnlyFormsSelected() const; + sal_Bool HasDrwObj(SdrObject *pSdrObj) const; + sal_Bool HasOnlyObj(SdrObject *pSdrObj, sal_uInt32 eObjInventor) const; + sal_Bool BeginTextEdit( SdrObject* pObj, SdrPageView* pPV=NULL, Window* pWin=NULL, bool bIsNewObj=false, bool bSetSelectionToStart=false ); void StateTabWin(SfxItemSet&); @@ -596,13 +594,13 @@ public: // Links bearbeiten void EditLinkDlg(); - void AutoCaption(const USHORT nType, const SvGlobalName *pOleId = 0); + void AutoCaption(const sal_uInt16 nType, const SvGlobalName *pOleId = 0); void InsertCaption(const InsCaptionOpt *pOpt); // Async Aufruf durch Core - void UpdatePageNums(USHORT nPhyNum, USHORT nVirtNum, const String& rPgStr); + void UpdatePageNums(sal_uInt16 nPhyNum, sal_uInt16 nVirtNum, const String& rPgStr); - String GetPageStr(USHORT nPhyNum, USHORT nVirtNum, const String& rPgStr); + String GetPageStr(sal_uInt16 nPhyNum, sal_uInt16 nVirtNum, const String& rPgStr); // Shell rausreichen SfxShell *GetCurShell() { return pShell; } @@ -614,32 +612,32 @@ public: //damit in DToren der SubShells ggf. pShell zurueckgesetzt werden kann void ResetSubShell() { pShell = 0; } - virtual void WriteUserData(String &, BOOL bBrowse = FALSE ); - virtual void ReadUserData(const String &, BOOL bBrowse = FALSE ); + virtual void WriteUserData(String &, sal_Bool bBrowse = sal_False ); + virtual void ReadUserData(const String &, sal_Bool bBrowse = sal_False ); virtual void ReadUserDataSequence ( const com::sun::star::uno::Sequence < com::sun::star::beans::PropertyValue >&, sal_Bool bBrowse ); virtual void WriteUserDataSequence ( com::sun::star::uno::Sequence < com::sun::star::beans::PropertyValue >&, sal_Bool bBrowse ); - void SetCrsrAtTop( BOOL bFlag, BOOL bCenter = FALSE ) + void SetCrsrAtTop( sal_Bool bFlag, sal_Bool bCenter = sal_False ) { bTopCrsr = bFlag, bCenterCrsr = bCenter; } - BOOL IsCrsrAtTop() const { return bTopCrsr; } - BOOL IsCrsrAtCenter() const { return bCenterCrsr; } + sal_Bool IsCrsrAtTop() const { return bTopCrsr; } + sal_Bool IsCrsrAtCenter() const { return bCenterCrsr; } - BOOL JumpToSwMark( const String& rMark ); + sal_Bool JumpToSwMark( const String& rMark ); - long InsertDoc( USHORT nSlotId, const String& rFileName, - const String& rFilterName, INT16 nVersion = 0 ); + long InsertDoc( sal_uInt16 nSlotId, const String& rFileName, + const String& rFilterName, sal_Int16 nVersion = 0 ); void ExecuteInsertDoc( SfxRequest& rRequest, const SfxPoolItem* pItem ); - long InsertMedium( USHORT nSlotId, SfxMedium* pMedium, INT16 nVersion ); + long InsertMedium( sal_uInt16 nSlotId, SfxMedium* pMedium, sal_Int16 nVersion ); DECL_LINK( DialogClosedHdl, sfx2::FileDialogHelper * ); // status methods for clipboard. // Status changes now notified from the clipboard. - BOOL IsPasteAllowed(); - BOOL IsPasteSpecialAllowed(); + sal_Bool IsPasteAllowed(); + sal_Bool IsPasteSpecialAllowed(); // Enable mail merge - mail merge field dialog enabled - void EnableMailMerge(BOOL bEnable = TRUE); + void EnableMailMerge(sal_Bool bEnable = sal_True); //apply Accessiblity options void ApplyAccessiblityOptions(SvtAccessibilityOptions& rAccessibilityOptions); @@ -648,8 +646,8 @@ public: void NotifyDBChanged(); - SfxObjectShellRef & GetTmpSelectionDoc(); - SfxObjectShellRef & GetOrCreateTmpSelectionDoc(); + SfxObjectShellLock & GetTmpSelectionDoc(); + SfxObjectShellLock & GetOrCreateTmpSelectionDoc(); void AddTransferable(SwTransferable& rTransferable); @@ -665,9 +663,9 @@ public: //public fuer D&D int InsertGraphic( const String &rPath, const String &rFilter, - BOOL bLink = TRUE, GraphicFilter *pFlt = 0, + sal_Bool bLink = sal_True, GraphicFilter *pFlt = 0, Graphic* pPreviewGrf = 0, - BOOL bRule = FALSE ); + sal_Bool bRule = sal_False ); void ExecuteScan( SfxRequest& rReq ); @@ -693,7 +691,7 @@ inline const SwDocShell *SwView::GetDocShell() const SfxTabPage* CreatePrintOptionsPage( Window *pParent, const SfxItemSet &rOptions, - BOOL bPreview); + sal_Bool bPreview); #endif diff --git a/sw/source/ui/inc/viewlayoutctrl.hxx b/sw/source/ui/inc/viewlayoutctrl.hxx index ccab207954..6a0a59414a 100644 --- a/sw/source/ui/inc/viewlayoutctrl.hxx +++ b/sw/source/ui/inc/viewlayoutctrl.hxx @@ -43,12 +43,12 @@ public: SFX_DECL_STATUSBAR_CONTROL(); - SwViewLayoutControl( USHORT nSlotId, USHORT nId, StatusBar& rStb ); + SwViewLayoutControl( sal_uInt16 nSlotId, sal_uInt16 nId, StatusBar& rStb ); ~SwViewLayoutControl(); - virtual void StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pState ); + virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ); virtual void Paint( const UserDrawEvent& rEvt ); - virtual BOOL MouseButtonDown( const MouseEvent & ); + virtual sal_Bool MouseButtonDown( const MouseEvent & ); }; #endif diff --git a/sw/source/ui/inc/workctrl.hxx b/sw/source/ui/inc/workctrl.hxx index 86cab39940..b014472cb1 100644 --- a/sw/source/ui/inc/workctrl.hxx +++ b/sw/source/ui/inc/workctrl.hxx @@ -31,7 +31,7 @@ #include <sfx2/tbxctrl.hxx> #include <vcl/toolbox.hxx> #include <svtools/stdctrl.hxx> -#include <vcl/imagebtn.hxx> +#include <vcl/button.hxx> class PopupMenu; class SwView; @@ -69,20 +69,20 @@ class SwView; class SwTbxInsertCtrl : public SfxToolBoxControl { - USHORT nLastSlotId; + sal_uInt16 nLastSlotId; using SfxToolBoxControl::Select; - virtual void Select( BOOL bMod1 = FALSE ); + virtual void Select( sal_Bool bMod1 = sal_False ); public: SFX_DECL_TOOLBOX_CONTROL(); - SwTbxInsertCtrl( USHORT nSlotId, USHORT nId, ToolBox& rTbx ); + SwTbxInsertCtrl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ); ~SwTbxInsertCtrl(); virtual SfxPopupWindowType GetPopupWindowType() const; virtual SfxPopupWindow* CreatePopupWindow(); - virtual void StateChanged( USHORT nSID, + virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ); @@ -103,12 +103,12 @@ class SwTbxAutoTextCtrl : public SfxToolBoxControl public: SFX_DECL_TOOLBOX_CONTROL(); - SwTbxAutoTextCtrl( USHORT nSlotId, USHORT nId, ToolBox& rTbx ); + SwTbxAutoTextCtrl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ); ~SwTbxAutoTextCtrl(); virtual SfxPopupWindowType GetPopupWindowType() const; virtual SfxPopupWindow* CreatePopupWindow(); - virtual void StateChanged( USHORT nSID, + virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ); @@ -139,8 +139,8 @@ class SwScrollNaviPopup : public SfxPopupWindow String sQuickHelp[2 * NID_COUNT]; - USHORT nFwdId; - USHORT nBackId; + sal_uInt16 nFwdId; + sal_uInt16 nBackId; void ApplyImageList(); @@ -151,10 +151,10 @@ protected: virtual void DataChanged( const DataChangedEvent& rDCEvt ); public: - SwScrollNaviPopup( USHORT nId, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame ); + SwScrollNaviPopup( sal_uInt16 nId, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame ); ~SwScrollNaviPopup(); - static String GetQuickHelpText(BOOL bNext); + static String GetQuickHelpText(sal_Bool bNext); virtual SfxPopupWindow* Clone() const; void GrabFocus(){aToolBox.GrabFocus();} @@ -191,9 +191,9 @@ class SwNaviImageButton : public ImageButton class SwHlpImageButton : public ImageButton { - BOOL bUp; + sal_Bool bUp; public: - SwHlpImageButton(Window* pParent, const ResId& rResId, BOOL bUpBtn) : + SwHlpImageButton(Window* pParent, const ResId& rResId, sal_Bool bUpBtn) : ImageButton(pParent, rResId), bUp(bUpBtn){} virtual void RequestHelp( const HelpEvent& rHEvt ); @@ -205,10 +205,10 @@ class SwPreviewZoomControl : public SfxToolBoxControl public: SFX_DECL_TOOLBOX_CONTROL(); - SwPreviewZoomControl( USHORT nSlotId, USHORT nId, ToolBox& rTbx ); + SwPreviewZoomControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ); ~SwPreviewZoomControl(); - virtual void StateChanged( USHORT nSID, + virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ); diff --git a/sw/source/ui/inc/wrap.hxx b/sw/source/ui/inc/wrap.hxx index ce0172e553..07ec857cb1 100644 --- a/sw/source/ui/inc/wrap.hxx +++ b/sw/source/ui/inc/wrap.hxx @@ -31,7 +31,7 @@ #include <sfx2/tabdlg.hxx> #include <sfx2/basedlgs.hxx> -#include <vcl/imagebtn.hxx> +#include <vcl/button.hxx> #include <vcl/button.hxx> @@ -48,7 +48,7 @@ class SwWrapDlg : public SfxSingleTabDialog SwWrtShell* pWrtShell; public: - SwWrapDlg(Window* pParent, SfxItemSet& rSet, SwWrtShell* pSh, BOOL bDrawMode); + SwWrapDlg(Window* pParent, SfxItemSet& rSet, SwWrtShell* pSh, sal_Bool bDrawMode); ~SwWrapDlg(); inline SwWrtShell* GetWrtShell() { return pWrtShell; } @@ -92,22 +92,22 @@ class SwWrapTabPage: public SfxTabPage ImageList aWrapIL; ImageList aWrapILH; - USHORT nOldLeftMargin; - USHORT nOldRightMargin; - USHORT nOldUpperMargin; - USHORT nOldLowerMargin; + sal_uInt16 nOldLeftMargin; + sal_uInt16 nOldRightMargin; + sal_uInt16 nOldUpperMargin; + sal_uInt16 nOldLowerMargin; RndStdIds nAnchorId; - USHORT nHtmlMode; + sal_uInt16 nHtmlMode; Size aFrmSize; SwWrtShell* pWrtSh; - BOOL bFormat; - BOOL bNew; - BOOL bHtmlMode; - BOOL bDrawMode; - BOOL bContourImage; + sal_Bool bFormat; + sal_Bool bNew; + sal_Bool bHtmlMode; + sal_Bool bDrawMode; + sal_Bool bContourImage; SwWrapTabPage(Window *pParent, const SfxItemSet &rSet); ~SwWrapTabPage(); @@ -129,12 +129,12 @@ public: static SfxTabPage *Create(Window *pParent, const SfxItemSet &rSet); - virtual BOOL FillItemSet(SfxItemSet &rSet); + virtual sal_Bool FillItemSet(SfxItemSet &rSet); virtual void Reset(const SfxItemSet &rSet); - static USHORT* GetRanges(); - inline void SetNewFrame(BOOL bNewFrame) { bNew = bNewFrame; } - inline void SetFormatUsed(BOOL bFmt, BOOL bDrw) { bFormat = bFmt; + static sal_uInt16* GetRanges(); + inline void SetNewFrame(sal_Bool bNewFrame) { bNew = bNewFrame; } + inline void SetFormatUsed(sal_Bool bFmt, sal_Bool bDrw) { bFormat = bFmt; bDrawMode = bDrw; } inline void SetShell(SwWrtShell* pSh) { pWrtSh = pSh; } }; diff --git a/sw/source/ui/inc/wrtsh.hxx b/sw/source/ui/inc/wrtsh.hxx index 9b8ef40720..34b08e195c 100644 --- a/sw/source/ui/inc/wrtsh.hxx +++ b/sw/source/ui/inc/wrtsh.hxx @@ -108,7 +108,7 @@ public: using SwEditShell::Insert; - typedef long (SwWrtShell::*SELECTFUNC)(const Point *, BOOL bProp ); + typedef long (SwWrtShell::*SELECTFUNC)(const Point *, sal_Bool bProp ); SELECTFUNC fnDrag; SELECTFUNC fnSetCrsr; @@ -116,160 +116,160 @@ public: SELECTFUNC fnKillSel; // Alle Selektionen aufheben - long ResetSelect( const Point *, BOOL ); + long ResetSelect( const Point *, sal_Bool ); //setzt den Cursorstack nach dem Bewegen mit PageUp/-Down //zurueck, falls ein Stack aufgebaut ist inline void ResetCursorStack(); SelectionType GetSelectionType() const; - BOOL IsModePushed() const { return 0 != pModeStack; } + sal_Bool IsModePushed() const { return 0 != pModeStack; } void PushMode(); void PopMode(); void SttSelect(); void EndSelect(); - BOOL IsInSelect() const { return bInSelect; } - void SetInSelect(BOOL bSel = TRUE) { bInSelect = bSel; } + sal_Bool IsInSelect() const { return bInSelect; } + void SetInSelect(sal_Bool bSel = sal_True) { bInSelect = bSel; } // Liegt eine Text- oder Rahmenselektion vor? - BOOL HasSelection() const { return SwCrsrShell::HasSelection() || + sal_Bool HasSelection() const { return SwCrsrShell::HasSelection() || IsMultiSelection() || IsSelFrmMode() || IsObjSelected(); } - BOOL Pop( BOOL bOldCrsr = TRUE ); + sal_Bool Pop( sal_Bool bOldCrsr = sal_True ); void EnterStdMode(); - BOOL IsStdMode() const { return !bExtMode && !bAddMode && !bBlockMode; } + sal_Bool IsStdMode() const { return !bExtMode && !bAddMode && !bBlockMode; } void EnterExtMode(); void LeaveExtMode(); long ToggleExtMode(); - BOOL IsExtMode() const { return bExtMode; } + sal_Bool IsExtMode() const { return bExtMode; } void EnterAddMode(); void LeaveAddMode(); long ToggleAddMode(); - BOOL IsAddMode() const { return bAddMode; } + sal_Bool IsAddMode() const { return bAddMode; } void EnterBlockMode(); void LeaveBlockMode(); long ToggleBlockMode(); - BOOL IsBlockMode() const { return bBlockMode; } + sal_Bool IsBlockMode() const { return bBlockMode; } - void SetInsMode( BOOL bOn = TRUE ); + void SetInsMode( sal_Bool bOn = sal_True ); void ToggleInsMode() { SetInsMode( !bIns ); } - BOOL IsInsMode() const { return bIns; } - void SetRedlineModeAndCheckInsMode( USHORT eMode ); + sal_Bool IsInsMode() const { return bIns; } + void SetRedlineModeAndCheckInsMode( sal_uInt16 eMode ); void EnterSelFrmMode(const Point *pStartDrag = 0); void LeaveSelFrmMode(); - BOOL IsSelFrmMode() const { return bLayoutMode; } + sal_Bool IsSelFrmMode() const { return bLayoutMode; } // Selektion von Rahmen aufheben void UnSelectFrm(); void Invalidate(); // Tabellenzellen selektieren fuer Bearbeiten von Formeln in der Ribbonbar - inline void SelTblCells( const Link &rLink, BOOL bMark = TRUE ); + inline void SelTblCells( const Link &rLink, sal_Bool bMark = sal_True ); inline void EndSelTblCells(); //Wortweisen oder zeilenweisen Selektionsmodus verlassen. Wird //in der Regel in MB-Up gerufen. - BOOL IsExtSel() const { return bSelWrd || bSelLn; } + sal_Bool IsExtSel() const { return bSelWrd || bSelLn; } // erfrage, ob der akt. fnDrag - Pointer auf BeginDrag gesetzt ist // Wird fuer MouseMove gebraucht, um die Bugs 55592/55931 zu umgehen. - inline BOOL Is_FnDragEQBeginDrag() const; + inline sal_Bool Is_FnDragEQBeginDrag() const; //Basisabfragen - BOOL IsInWrd() { return IsInWord(); } - BOOL IsSttWrd() { return IsStartWord(); } - BOOL IsEndWrd(); - BOOL IsSttOfPara() const { return IsSttPara(); } - BOOL IsEndOfPara() const { return IsEndPara(); } + sal_Bool IsInWrd() { return IsInWord(); } + sal_Bool IsSttWrd() { return IsStartWord(); } + sal_Bool IsEndWrd(); + sal_Bool IsSttOfPara() const { return IsSttPara(); } + sal_Bool IsEndOfPara() const { return IsEndPara(); } //Word bzw. Satz selektieren. - BOOL SelNearestWrd(); - BOOL SelWrd (const Point * = 0, BOOL bProp=FALSE ); + sal_Bool SelNearestWrd(); + sal_Bool SelWrd (const Point * = 0, sal_Bool bProp=sal_False ); // --> FME 2004-07-30 #i32329# Enhanced selection - void SelSentence (const Point * = 0, BOOL bProp=FALSE ); - void SelPara (const Point * = 0, BOOL bProp=FALSE ); + void SelSentence (const Point * = 0, sal_Bool bProp=sal_False ); + void SelPara (const Point * = 0, sal_Bool bProp=sal_False ); // <-- long SelAll(); //Basiscursortravelling -typedef BOOL (SwWrtShell:: *FNSimpleMove)(); - BOOL SimpleMove( FNSimpleMove, BOOL bSelect ); - - BOOL Left ( USHORT nMode, BOOL bSelect, - USHORT nCount, BOOL bBasicCall, BOOL bVisual = FALSE ); - BOOL Right ( USHORT nMode, BOOL bSelect, - USHORT nCount, BOOL bBasicCall, BOOL bVisual = FALSE ); - BOOL Up ( BOOL bSelect = FALSE, USHORT nCount = 1, - BOOL bBasicCall = FALSE ); - BOOL Down ( BOOL bSelect = FALSE, USHORT nCount = 1, - BOOL bBasicCall = FALSE ); - BOOL NxtWrd ( BOOL bSelect = FALSE ) { return SimpleMove( &SwWrtShell::_NxtWrd, bSelect ); } - BOOL PrvWrd ( BOOL bSelect = FALSE ) { return SimpleMove( &SwWrtShell::_PrvWrd, bSelect ); } - - BOOL LeftMargin ( BOOL bSelect, BOOL bBasicCall ); - BOOL RightMargin( BOOL bSelect, BOOL bBasicCall ); - - BOOL SttDoc ( BOOL bSelect = FALSE ); - BOOL EndDoc ( BOOL bSelect = FALSE ); - - BOOL SttNxtPg ( BOOL bSelect = FALSE ); - BOOL SttPrvPg ( BOOL bSelect = FALSE ); - BOOL EndNxtPg ( BOOL bSelect = FALSE ); - BOOL EndPrvPg ( BOOL bSelect = FALSE ); - BOOL SttPg ( BOOL bSelect = FALSE ); - BOOL EndPg ( BOOL bSelect = FALSE ); - BOOL SttPara ( BOOL bSelect = FALSE ); - BOOL EndPara ( BOOL bSelect = FALSE ); - BOOL FwdPara ( BOOL bSelect = FALSE ) +typedef sal_Bool (SwWrtShell:: *FNSimpleMove)(); + sal_Bool SimpleMove( FNSimpleMove, sal_Bool bSelect ); + + sal_Bool Left ( sal_uInt16 nMode, sal_Bool bSelect, + sal_uInt16 nCount, sal_Bool bBasicCall, sal_Bool bVisual = sal_False ); + sal_Bool Right ( sal_uInt16 nMode, sal_Bool bSelect, + sal_uInt16 nCount, sal_Bool bBasicCall, sal_Bool bVisual = sal_False ); + sal_Bool Up ( sal_Bool bSelect = sal_False, sal_uInt16 nCount = 1, + sal_Bool bBasicCall = sal_False ); + sal_Bool Down ( sal_Bool bSelect = sal_False, sal_uInt16 nCount = 1, + sal_Bool bBasicCall = sal_False ); + sal_Bool NxtWrd ( sal_Bool bSelect = sal_False ) { return SimpleMove( &SwWrtShell::_NxtWrd, bSelect ); } + sal_Bool PrvWrd ( sal_Bool bSelect = sal_False ) { return SimpleMove( &SwWrtShell::_PrvWrd, bSelect ); } + + sal_Bool LeftMargin ( sal_Bool bSelect, sal_Bool bBasicCall ); + sal_Bool RightMargin( sal_Bool bSelect, sal_Bool bBasicCall ); + + sal_Bool SttDoc ( sal_Bool bSelect = sal_False ); + sal_Bool EndDoc ( sal_Bool bSelect = sal_False ); + + sal_Bool SttNxtPg ( sal_Bool bSelect = sal_False ); + sal_Bool SttPrvPg ( sal_Bool bSelect = sal_False ); + sal_Bool EndNxtPg ( sal_Bool bSelect = sal_False ); + sal_Bool EndPrvPg ( sal_Bool bSelect = sal_False ); + sal_Bool SttPg ( sal_Bool bSelect = sal_False ); + sal_Bool EndPg ( sal_Bool bSelect = sal_False ); + sal_Bool SttPara ( sal_Bool bSelect = sal_False ); + sal_Bool EndPara ( sal_Bool bSelect = sal_False ); + sal_Bool FwdPara ( sal_Bool bSelect = sal_False ) { return SimpleMove( &SwWrtShell::_FwdPara, bSelect ); } - BOOL BwdPara ( BOOL bSelect = FALSE ) + sal_Bool BwdPara ( sal_Bool bSelect = sal_False ) { return SimpleMove( &SwWrtShell::_BwdPara, bSelect ); } - BOOL FwdSentence( BOOL bSelect = FALSE ) + sal_Bool FwdSentence( sal_Bool bSelect = sal_False ) { return SimpleMove( &SwWrtShell::_FwdSentence, bSelect ); } - BOOL BwdSentence( BOOL bSelect = FALSE ) + sal_Bool BwdSentence( sal_Bool bSelect = sal_False ) { return SimpleMove( &SwWrtShell::_BwdSentence, bSelect ); } // --> FME 2004-07-30 #i20126# Enhanced table selection - BOOL SelectTableRowCol( const Point& rPt, const Point* pEnd = 0, bool bRowDrag = false ); + sal_Bool SelectTableRowCol( const Point& rPt, const Point* pEnd = 0, bool bRowDrag = false ); // <-- - BOOL SelectTableRow(); - BOOL SelectTableCol(); - BOOL SelectTableCell(); + sal_Bool SelectTableRow(); + sal_Bool SelectTableCol(); + sal_Bool SelectTableCell(); - BOOL SelectTxtAttr( USHORT nWhich, const SwTxtAttr* pAttr = 0 ); + sal_Bool SelectTxtAttr( sal_uInt16 nWhich, const SwTxtAttr* pAttr = 0 ); // Spaltenweise Spruenge - BOOL StartOfColumn ( BOOL bSelect = FALSE ); - BOOL EndOfColumn ( BOOL bSelect = FALSE ); - BOOL StartOfNextColumn ( BOOL bSelect = FALSE ); - BOOL EndOfNextColumn ( BOOL bSelect = FALSE ); - BOOL StartOfPrevColumn ( BOOL bSelect = FALSE ); - BOOL EndOfPrevColumn ( BOOL bSelect = FALSE ); + sal_Bool StartOfColumn ( sal_Bool bSelect = sal_False ); + sal_Bool EndOfColumn ( sal_Bool bSelect = sal_False ); + sal_Bool StartOfNextColumn ( sal_Bool bSelect = sal_False ); + sal_Bool EndOfNextColumn ( sal_Bool bSelect = sal_False ); + sal_Bool StartOfPrevColumn ( sal_Bool bSelect = sal_False ); + sal_Bool EndOfPrevColumn ( sal_Bool bSelect = sal_False ); // setze den Cursor auf die Seite "nPage" an den Anfang // zusaetzlich zu der gleichnamigen Implementierung in crsrsh.hxx // werden hier alle bestehenden Selektionen vor dem Setzen des // Cursors aufgehoben - BOOL GotoPage( USHORT nPage, BOOL bRecord ); + sal_Bool GotoPage( sal_uInt16 nPage, sal_Bool bRecord ); //setzen des Cursors; merken der alten Position fuer Zurueckblaettern. DECL_LINK( ExecFlyMac, void * ); - BOOL PageCrsr(SwTwips lOffset, BOOL bSelect); + sal_Bool PageCrsr(SwTwips lOffset, sal_Bool bSelect); // Felder Update - void UpdateInputFlds( SwInputFieldList* pLst = 0, BOOL bOnlyInSel = FALSE ); + void UpdateInputFlds( SwInputFieldList* pLst = 0, sal_Bool bOnlyInSel = sal_False ); - void NoEdit(BOOL bHideCrsr = TRUE); + void NoEdit(sal_Bool bHideCrsr = sal_True); void Edit(); - BOOL IsNoEdit() const { return bNoEdit; } + sal_Bool IsNoEdit() const { return bNoEdit; } - BOOL IsRetainSelection() const { return mbRetainSelection; } - void SetRetainSelection( BOOL bRet ) { mbRetainSelection = bRet; } + sal_Bool IsRetainSelection() const { return mbRetainSelection; } + void SetRetainSelection( sal_Bool bRet ) { mbRetainSelection = bRet; } // change current data base and notify void ChgDBData(const SwDBData& SwDBData); @@ -281,7 +281,7 @@ typedef BOOL (SwWrtShell:: *FNSimpleMove)(); long DelLeft(); // loescht auch Rahmen bzw. setzt den Cursor in den Rahmen, - // wenn bDelFrm == FALSE ist + // wenn bDelFrm == sal_False ist long DelRight(); long DelToEndOfPara(); long DelToStartOfPara(); @@ -300,7 +300,7 @@ typedef BOOL (SwWrtShell:: *FNSimpleMove)(); WORD_SPACE_AFTER = 2, WORD_NO_SPACE = 3 }; - int IntelligentCut(int nSelectionType, BOOL bCut = TRUE); + int IntelligentCut(int nSelectionType, sal_Bool bCut = sal_True); // Editieren void Insert(SwField &); @@ -308,28 +308,28 @@ typedef BOOL (SwWrtShell:: *FNSimpleMove)(); // Graphic void Insert( const String &rPath, const String &rFilter, const Graphic &, SwFlyFrmAttrMgr * = 0, - BOOL bRule = FALSE ); + sal_Bool bRule = sal_False ); void InsertByWord( const String & ); - void InsertPageBreak(const String *pPageDesc = 0, USHORT nPgNum = 0 ); + void InsertPageBreak(const String *pPageDesc = 0, sal_uInt16 nPgNum = 0 ); void InsertLineBreak(); void InsertColumnBreak(); - void InsertFootnote(const String &, BOOL bEndNote = FALSE, BOOL bEdit = TRUE ); - void SplitNode( BOOL bAutoFormat = FALSE, BOOL bCheckTableStart = TRUE ); - BOOL CanInsert(); + void InsertFootnote(const String &, sal_Bool bEndNote = sal_False, sal_Bool bEdit = sal_True ); + void SplitNode( sal_Bool bAutoFormat = sal_False, sal_Bool bCheckTableStart = sal_True ); + sal_Bool CanInsert(); // Verzeichnisse void InsertTableOf(const SwTOXBase& rTOX, const SfxItemSet* pSet = 0); - BOOL UpdateTableOf(const SwTOXBase& rTOX, const SfxItemSet* pSet = 0); + sal_Bool UpdateTableOf(const SwTOXBase& rTOX, const SfxItemSet* pSet = 0); // Numerierung und Bullets /** Turns on numbering or bullets. - @param bNum TRUE: turn on numbering - FALSE: turn on bullets + @param bNum sal_True: turn on numbering + sal_False: turn on bullets */ - void NumOrBulletOn(BOOL bNum); // #i29560# + void NumOrBulletOn(sal_Bool bNum); // #i29560# void NumOrBulletOff(); // #i29560# void NumOn(); void BulletOn(); @@ -338,12 +338,12 @@ typedef BOOL (SwWrtShell:: *FNSimpleMove)(); void InsertObject( /*SvInPlaceObjectRef *pObj, */ // != 0 fuer Clipboard const svt::EmbeddedObjectRef&, SvGlobalName *pName = 0, // != 0 entspr. Object erzeugen. - BOOL bActivate = TRUE, - USHORT nSlotId = 0); // SlotId fuer Dialog + sal_Bool bActivate = sal_True, + sal_uInt16 nSlotId = 0); // SlotId fuer Dialog - BOOL InsertOleObject( const svt::EmbeddedObjectRef& xObj, SwFlyFrmFmt **pFlyFrmFmt = 0 ); + sal_Bool InsertOleObject( const svt::EmbeddedObjectRef& xObj, SwFlyFrmFmt **pFlyFrmFmt = 0 ); void LaunchOLEObj( long nVerb = 0 ); // Server starten - BOOL IsOLEObj() const { return GetCntType() == CNT_OLE;} + sal_Bool IsOLEObj() const { return GetCntType() == CNT_OLE;} virtual void MoveObjectIfActive( svt::EmbeddedObjectRef& xObj, const Point& rOffset ); virtual void CalcAndSetScale( svt::EmbeddedObjectRef& xObj, const SwRect *pFlyPrtRect = 0, @@ -366,32 +366,32 @@ typedef BOOL (SwWrtShell:: *FNSimpleMove)(); void SetPageStyle(const String &rCollName); - String GetCurPageStyle( const BOOL bCalcFrm = TRUE ) const; + String GetCurPageStyle( const sal_Bool bCalcFrm = sal_True ) const; // Aktuelle Vorlage anhand der geltenden Attribute aendern void QuickUpdateStyle(); enum DoType { UNDO, REDO, REPEAT }; - void Do( DoType eDoType, USHORT nCnt = 1 ); + void Do( DoType eDoType, sal_uInt16 nCnt = 1 ); String GetDoString( DoType eDoType ) const; String GetRepeatString() const; - USHORT GetDoStrings( DoType eDoType, SfxStringListItem& rStrLstItem ) const; + sal_uInt16 GetDoStrings( DoType eDoType, SfxStringListItem& rStrLstItem ) const; //Suchen oder Ersetzen - ULONG SearchPattern(const com::sun::star::util::SearchOptions& rSearchOpt, - BOOL bSearchInNotes, + sal_uLong SearchPattern(const com::sun::star::util::SearchOptions& rSearchOpt, + sal_Bool bSearchInNotes, SwDocPositions eStart, SwDocPositions eEnde, FindRanges eFlags = FND_IN_BODY, - int bReplace = FALSE ); + int bReplace = sal_False ); - ULONG SearchTempl (const String &rTempl, + sal_uLong SearchTempl (const String &rTempl, SwDocPositions eStart, SwDocPositions eEnde, FindRanges eFlags = FND_IN_BODY, const String* pReplTempl = 0 ); - ULONG SearchAttr (const SfxItemSet& rFindSet, - BOOL bNoColls, + sal_uLong SearchAttr (const SfxItemSet& rFindSet, + sal_Bool bNoColls, SwDocPositions eStart,SwDocPositions eEnde, FindRanges eFlags = FND_IN_BODY, const com::sun::star::util::SearchOptions* pSearchOpt = 0, @@ -401,30 +401,30 @@ typedef BOOL (SwWrtShell:: *FNSimpleMove)(); // Aktion vor Cursorbewegung // Hebt gfs. Selektionen auf, triggert Timer und GCAttr() - void MoveCrsr( BOOL bWithSelect = FALSE ); + void MoveCrsr( sal_Bool bWithSelect = sal_False ); // Eingabefelder updaten - BOOL StartInputFldDlg(SwField*, BOOL bNextButton, Window* pParentWin = 0, ByteString* pWindowState = 0); + sal_Bool StartInputFldDlg(SwField*, sal_Bool bNextButton, Window* pParentWin = 0, ByteString* pWindowState = 0); // update DropDown fields - BOOL StartDropDownFldDlg(SwField*, BOOL bNextButton, ByteString* pWindowState = 0); + sal_Bool StartDropDownFldDlg(SwField*, sal_Bool bNextButton, ByteString* pWindowState = 0); //"Handler" fuer Anederungen an der DrawView - fuer Controls. virtual void DrawSelChanged( ); // springe zum Bookmark und setze die "Selections-Flags" wieder richtig - BOOL GotoMark( const ::sw::mark::IMark* const pMark ); - BOOL GotoMark( const ::sw::mark::IMark* const pMark, BOOL bSelect, BOOL bStart ); - BOOL GotoMark( const ::rtl::OUString& rName ); - BOOL GoNextBookmark(); // TRUE, wenn's noch eine gab - BOOL GoPrevBookmark(); + sal_Bool GotoMark( const ::sw::mark::IMark* const pMark ); + sal_Bool GotoMark( const ::sw::mark::IMark* const pMark, sal_Bool bSelect, sal_Bool bStart ); + sal_Bool GotoMark( const ::rtl::OUString& rName ); + sal_Bool GoNextBookmark(); // sal_True, wenn's noch eine gab + sal_Bool GoPrevBookmark(); bool GotoFieldmark(::sw::mark::IFieldmark const * const pMark); - BOOL GotoField( const SwFmtFld& rFld ); + sal_Bool GotoField( const SwFmtFld& rFld ); // jump to the next / previous hyperlink - inside text and also // on graphics - BOOL SelectNextPrevHyperlink( BOOL bNext = TRUE ); + sal_Bool SelectNextPrevHyperlink( sal_Bool bNext = sal_True ); // Zugehoerige SwView ermitteln const SwView& GetView() const { return rView; } @@ -433,23 +433,23 @@ typedef BOOL (SwWrtShell:: *FNSimpleMove)(); //Weil es sonst keiner macht, gibt es hier eine ExecMacro() void ExecMacro( const SvxMacro& rMacro, String* pRet = 0, SbxArray* pArgs = 0 ); // rufe ins dunkle Basic/JavaScript - USHORT CallEvent( USHORT nEvent, const SwCallMouseEvent& rCallEvent, - BOOL bCheckPtr = FALSE, SbxArray* pArgs = 0, + sal_uInt16 CallEvent( sal_uInt16 nEvent, const SwCallMouseEvent& rCallEvent, + sal_Bool bCheckPtr = sal_False, SbxArray* pArgs = 0, const Link* pCallBack = 0 ); // ein Klick aus das angegebene Feld. Der Cursor steht auf diesem. // Fuehre die vor definierten Aktionen aus. void ClickToField( const SwField& rFld ); - void ClickToINetAttr( const SwFmtINetFmt& rItem, USHORT nFilter = URLLOAD_NOFILTER ); - BOOL ClickToINetGrf( const Point& rDocPt, USHORT nFilter = URLLOAD_NOFILTER ); - inline BOOL IsInClickToEdit() const ; + void ClickToINetAttr( const SwFmtINetFmt& rItem, sal_uInt16 nFilter = URLLOAD_NOFILTER ); + sal_Bool ClickToINetGrf( const Point& rDocPt, sal_uInt16 nFilter = URLLOAD_NOFILTER ); + inline sal_Bool IsInClickToEdit() const ; // fall ein URL-Button selektiert ist, dessen URL returnen, ansonsten // einen LeerString - BOOL GetURLFromButton( String& rURL, String& rDescr ) const; + sal_Bool GetURLFromButton( String& rURL, String& rDescr ) const; void NavigatorPaste( const NaviContentBookmark& rBkmk, - const USHORT nAction ); + const sal_uInt16 nAction ); // die Core erzeugt eine Selektion, das SttSelect muss gerufen werden virtual void NewCoreSelection(); @@ -469,29 +469,29 @@ typedef BOOL (SwWrtShell:: *FNSimpleMove)(); const SwViewOption *pViewOpt = 0); virtual ~SwWrtShell(); - BOOL TryRemoveIndent(); // #i23725# + sal_Bool TryRemoveIndent(); // #i23725# String GetSelDescr() const; SwNavigationMgr& GetNavigationMgr(); void addCurrentPosition(); - BOOL GotoFly( const String& rName, FlyCntType eType = FLYCNTTYPE_ALL, - BOOL bSelFrame = TRUE ); - BOOL GotoINetAttr( const SwTxtINetFmt& rAttr ); - void GotoOutline( USHORT nIdx ); - BOOL GotoOutline( const String& rName ); - BOOL GotoRegion( const String& rName ); - BOOL GotoRefMark( const String& rRefMark, USHORT nSubType = 0, - USHORT nSeqNo = 0 ); - BOOL GotoNextTOXBase( const String* pName = 0); - BOOL GotoTable( const String& rName ); - BOOL GotoFld( const SwFmtFld& rFld ); - const SwRedline* GotoRedline( USHORT nArrPos, BOOL bSelect = FALSE); + sal_Bool GotoFly( const String& rName, FlyCntType eType = FLYCNTTYPE_ALL, + sal_Bool bSelFrame = sal_True ); + sal_Bool GotoINetAttr( const SwTxtINetFmt& rAttr ); + void GotoOutline( sal_uInt16 nIdx ); + sal_Bool GotoOutline( const String& rName ); + sal_Bool GotoRegion( const String& rName ); + sal_Bool GotoRefMark( const String& rRefMark, sal_uInt16 nSubType = 0, + sal_uInt16 nSeqNo = 0 ); + sal_Bool GotoNextTOXBase( const String* pName = 0); + sal_Bool GotoTable( const String& rName ); + sal_Bool GotoFld( const SwFmtFld& rFld ); + const SwRedline* GotoRedline( sal_uInt16 nArrPos, sal_Bool bSelect = sal_False); private: SW_DLLPRIVATE void OpenMark(); - SW_DLLPRIVATE void CloseMark( BOOL bOkFlag ); + SW_DLLPRIVATE void CloseMark( sal_Bool bOkFlag ); SW_DLLPRIVATE String GetWrdDelim(); SW_DLLPRIVATE String GetSDelim(); @@ -500,11 +500,11 @@ private: struct ModeStack { ModeStack *pNext; - BOOL bAdd, + sal_Bool bAdd, bBlock, bExt, bIns; - ModeStack(ModeStack *pNextMode, BOOL _bIns, BOOL _bExt, BOOL _bAdd, BOOL _bBlock): + ModeStack(ModeStack *pNextMode, sal_Bool _bIns, sal_Bool _bExt, sal_Bool _bAdd, sal_Bool _bBlock): pNext(pNextMode), bAdd(_bAdd), bBlock(_bBlock), @@ -525,11 +525,11 @@ private: { Point aDocPos; CrsrStack *pNext; - BOOL bValidCurPos : 1; - BOOL bIsFrmSel : 1; + sal_Bool bValidCurPos : 1; + sal_Bool bIsFrmSel : 1; SwTwips lOffset; - CrsrStack( BOOL bValid, BOOL bFrmSel, const Point &rDocPos, + CrsrStack( sal_Bool bValid, sal_Bool bFrmSel, const Point &rDocPos, SwTwips lOff, CrsrStack *pN ) : aDocPos(rDocPos), pNext(pN), @@ -547,39 +547,39 @@ private: SwNavigationMgr aNavigationMgr; Point aDest; - BOOL bDestOnStack; - BOOL HasCrsrStack() const { return 0 != pCrsrStack; } - SW_DLLPRIVATE BOOL PushCrsr(SwTwips lOffset, BOOL bSelect); - SW_DLLPRIVATE BOOL PopCrsr(BOOL bUpdate, BOOL bSelect = FALSE); + sal_Bool bDestOnStack; + sal_Bool HasCrsrStack() const { return 0 != pCrsrStack; } + SW_DLLPRIVATE sal_Bool PushCrsr(SwTwips lOffset, sal_Bool bSelect); + SW_DLLPRIVATE sal_Bool PopCrsr(sal_Bool bUpdate, sal_Bool bSelect = sal_False); // ENDE Cursor bei PageUp / -Down mitnehmen - SW_DLLPRIVATE BOOL _SttWrd(); - SW_DLLPRIVATE BOOL _EndWrd(); - SW_DLLPRIVATE BOOL _NxtWrd(); - SW_DLLPRIVATE BOOL _PrvWrd(); + SW_DLLPRIVATE sal_Bool _SttWrd(); + SW_DLLPRIVATE sal_Bool _EndWrd(); + SW_DLLPRIVATE sal_Bool _NxtWrd(); + SW_DLLPRIVATE sal_Bool _PrvWrd(); // --> OD 2008-08-06 #i92468# - SW_DLLPRIVATE BOOL _NxtWrdForDelete(); - SW_DLLPRIVATE BOOL _PrvWrdForDelete(); + SW_DLLPRIVATE sal_Bool _NxtWrdForDelete(); + SW_DLLPRIVATE sal_Bool _PrvWrdForDelete(); // <-- - SW_DLLPRIVATE BOOL _FwdSentence(); - SW_DLLPRIVATE BOOL _BwdSentence(); - BOOL _FwdPara(); - SW_DLLPRIVATE BOOL _BwdPara(); + SW_DLLPRIVATE sal_Bool _FwdSentence(); + SW_DLLPRIVATE sal_Bool _BwdSentence(); + sal_Bool _FwdPara(); + SW_DLLPRIVATE sal_Bool _BwdPara(); // Selektionen - BOOL bIns :1; - BOOL bInSelect :1; - BOOL bExtMode :1; - BOOL bAddMode :1; - BOOL bBlockMode :1; - BOOL bLayoutMode :1; - BOOL bNoEdit :1; - BOOL bCopy :1; - BOOL bSelWrd :1; - BOOL bSelLn :1; - BOOL bIsInClickToEdit:1; - BOOL bClearMark :1; // Selektion fuer ChartAutoPilot nicht loeschen - BOOL mbRetainSelection :1; // Do not remove selections + sal_Bool bIns :1; + sal_Bool bInSelect :1; + sal_Bool bExtMode :1; + sal_Bool bAddMode :1; + sal_Bool bBlockMode :1; + sal_Bool bLayoutMode :1; + sal_Bool bNoEdit :1; + sal_Bool bCopy :1; + sal_Bool bSelWrd :1; + sal_Bool bSelLn :1; + sal_Bool bIsInClickToEdit:1; + sal_Bool bClearMark :1; // Selektion fuer ChartAutoPilot nicht loeschen + sal_Bool mbRetainSelection :1; // Do not remove selections Point aStart; Link aSelTblLink; @@ -592,37 +592,37 @@ private: SW_DLLPRIVATE void SttDragDrop(Timer *); using SwCrsrShell::SetCrsr; - SW_DLLPRIVATE long SetCrsr(const Point *, BOOL bProp=FALSE ); + SW_DLLPRIVATE long SetCrsr(const Point *, sal_Bool bProp=sal_False ); - SW_DLLPRIVATE long SetCrsrKillSel(const Point *, BOOL bProp=FALSE ); + SW_DLLPRIVATE long SetCrsrKillSel(const Point *, sal_Bool bProp=sal_False ); - SW_DLLPRIVATE long StdSelect(const Point *, BOOL bProp=FALSE ); - SW_DLLPRIVATE long BeginDrag(const Point *, BOOL bProp=FALSE ); - SW_DLLPRIVATE long Drag(const Point *, BOOL bProp=FALSE ); - SW_DLLPRIVATE long EndDrag(const Point *, BOOL bProp=FALSE ); + SW_DLLPRIVATE long StdSelect(const Point *, sal_Bool bProp=sal_False ); + SW_DLLPRIVATE long BeginDrag(const Point *, sal_Bool bProp=sal_False ); + SW_DLLPRIVATE long Drag(const Point *, sal_Bool bProp=sal_False ); + SW_DLLPRIVATE long EndDrag(const Point *, sal_Bool bProp=sal_False ); - SW_DLLPRIVATE long ExtSelWrd(const Point *, BOOL bProp=FALSE ); - SW_DLLPRIVATE long ExtSelLn(const Point *, BOOL bProp=FALSE ); + SW_DLLPRIVATE long ExtSelWrd(const Point *, sal_Bool bProp=sal_False ); + SW_DLLPRIVATE long ExtSelLn(const Point *, sal_Bool bProp=sal_False ); //Verschieben von Text aus Drag and Drop; Point ist //Destination fuer alle Selektionen. - SW_DLLPRIVATE long MoveText(const Point *, BOOL bProp=FALSE ); + SW_DLLPRIVATE long MoveText(const Point *, sal_Bool bProp=sal_False ); - SW_DLLPRIVATE long BeginFrmDrag(const Point *, BOOL bProp=FALSE ); + SW_DLLPRIVATE long BeginFrmDrag(const Point *, sal_Bool bProp=sal_False ); //nach SSize/Move eines Frames Update; Point ist Destination. - SW_DLLPRIVATE long UpdateLayoutFrm(const Point *, BOOL bProp=FALSE ); + SW_DLLPRIVATE long UpdateLayoutFrm(const Point *, sal_Bool bProp=sal_False ); - SW_DLLPRIVATE long SttLeaveSelect(const Point *, BOOL bProp=FALSE ); - SW_DLLPRIVATE long AddLeaveSelect(const Point *, BOOL bProp=FALSE ); - SW_DLLPRIVATE long Ignore(const Point *, BOOL bProp=FALSE ); + SW_DLLPRIVATE long SttLeaveSelect(const Point *, sal_Bool bProp=sal_False ); + SW_DLLPRIVATE long AddLeaveSelect(const Point *, sal_Bool bProp=sal_False ); + SW_DLLPRIVATE long Ignore(const Point *, sal_Bool bProp=sal_False ); - SW_DLLPRIVATE void LeaveExtSel() { bSelWrd = bSelLn = FALSE;} - SW_DLLPRIVATE BOOL _CanInsert(); + SW_DLLPRIVATE void LeaveExtSel() { bSelWrd = bSelLn = sal_False;} + SW_DLLPRIVATE sal_Bool _CanInsert(); - SW_DLLPRIVATE BOOL GoStart(BOOL KeepArea = FALSE, BOOL * = 0, - BOOL bSelect = FALSE, BOOL bDontMoveRegion = FALSE); - SW_DLLPRIVATE BOOL GoEnd(BOOL KeepArea = FALSE, BOOL * = 0); + SW_DLLPRIVATE sal_Bool GoStart(sal_Bool KeepArea = sal_False, sal_Bool * = 0, + sal_Bool bSelect = sal_False, sal_Bool bDontMoveRegion = sal_False); + SW_DLLPRIVATE sal_Bool GoEnd(sal_Bool KeepArea = sal_False, sal_Bool * = 0); enum BookMarkMove { @@ -632,7 +632,7 @@ private: BOOKMARK_LAST_LAST_ENTRY }; - SW_DLLPRIVATE BOOL MoveBookMark(BookMarkMove eFuncId, const ::sw::mark::IMark* const pMark=NULL); + SW_DLLPRIVATE sal_Bool MoveBookMark(BookMarkMove eFuncId, const ::sw::mark::IMark* const pMark=NULL); }; inline void SwWrtShell::ResetCursorStack() @@ -641,27 +641,27 @@ inline void SwWrtShell::ResetCursorStack() _ResetCursorStack(); } -inline void SwWrtShell::SelTblCells(const Link &rLink, BOOL bMark ) +inline void SwWrtShell::SelTblCells(const Link &rLink, sal_Bool bMark ) { - SetSelTblCells( TRUE ); + SetSelTblCells( sal_True ); bClearMark = bMark; aSelTblLink = rLink; } inline void SwWrtShell::EndSelTblCells() { - SetSelTblCells( FALSE ); - bClearMark = TRUE; + SetSelTblCells( sal_False ); + bClearMark = sal_True; } -inline BOOL SwWrtShell::IsInClickToEdit() const { return bIsInClickToEdit; } +inline sal_Bool SwWrtShell::IsInClickToEdit() const { return bIsInClickToEdit; } -inline BOOL SwWrtShell::Is_FnDragEQBeginDrag() const +inline sal_Bool SwWrtShell::Is_FnDragEQBeginDrag() const { #ifdef GCC SELECTFUNC fnTmp = &SwWrtShell::BeginDrag; return fnDrag == fnTmp; #else - return sal::static_int_cast< BOOL >(fnDrag == &SwWrtShell::BeginDrag); + return sal::static_int_cast< sal_Bool >(fnDrag == &SwWrtShell::BeginDrag); #endif } diff --git a/sw/source/ui/inc/zoomctrl.hxx b/sw/source/ui/inc/zoomctrl.hxx index ed69f44a62..b07848c50d 100644 --- a/sw/source/ui/inc/zoomctrl.hxx +++ b/sw/source/ui/inc/zoomctrl.hxx @@ -36,13 +36,13 @@ private: String sPreviewZoom; public: virtual void Command( const CommandEvent& rCEvt ); - virtual void StateChanged( USHORT nSID, SfxItemState eState, + virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ); virtual void Paint( const UserDrawEvent& rEvt ); SFX_DECL_STATUSBAR_CONTROL(); - SwZoomControl( USHORT nSlotId, USHORT nId, StatusBar& rStb ); + SwZoomControl( sal_uInt16 nSlotId, sal_uInt16 nId, StatusBar& rStb ); ~SwZoomControl(); }; diff --git a/sw/source/ui/index/cntex.cxx b/sw/source/ui/index/cntex.cxx index 17e8aa056f..17bd9e593e 100644 --- a/sw/source/ui/index/cntex.cxx +++ b/sw/source/ui/index/cntex.cxx @@ -105,14 +105,14 @@ void lcl_SetProp( uno::Reference< XPropertySetInfo > & xInfo, void lcl_SetProp( uno::Reference< XPropertySetInfo > & xInfo, uno::Reference< XPropertySet > & xProps, - USHORT nId, const String& rValue) + sal_uInt16 nId, const String& rValue) { lcl_SetProp( xInfo, xProps, SW_PROP_NAME_STR(nId), rValue); } void lcl_SetProp( uno::Reference< XPropertySetInfo > & xInfo, uno::Reference< XPropertySet > & xProps, - USHORT nId, sal_Int16 nValue ) + sal_uInt16 nId, sal_Int16 nValue ) { OUString uPropName(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(nId))); if(xInfo->hasPropertyByName(uPropName)) @@ -126,7 +126,7 @@ void lcl_SetProp( uno::Reference< XPropertySetInfo > & xInfo, void lcl_SetBOOLProp( uno::Reference< beans::XPropertySetInfo > & xInfo, uno::Reference< beans::XPropertySet > & xProps, - USHORT nId, sal_Bool bValue ) + sal_uInt16 nId, sal_Bool bValue ) { OUString uPropName(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(nId))); if(xInfo->hasPropertyByName(uPropName)) @@ -146,7 +146,7 @@ IMPL_LINK( SwMultiTOXTabDialog, CreateExample_Hdl, void*, EMPTYARG ) SwXTextDocument* pDoc = reinterpret_cast<SwXTextDocument*>(xDocTunnel->getSomething(SwXTextDocument::getUnoTunnelId())); if( pDoc ) - pDoc->GetDocShell()->_LoadStyles( *rSh.GetView().GetDocShell(), TRUE ); + pDoc->GetDocShell()->_LoadStyles( *rSh.GetView().GetDocShell(), sal_True ); uno::Reference< lang::XMultiServiceFactory > xFact( xModel, uno::UNO_QUERY); @@ -235,7 +235,7 @@ void SwMultiTOXTabDialog::CreateOrUpdateExample( if(xSectPr.is()) { - BOOL bTemp = i == nTOXIndex; + sal_Bool bTemp = i == nTOXIndex; aVal.setValue(&bTemp, ::getBooleanCppuType()); xSectPr->setPropertyValue(uIsVisible, aVal); } @@ -403,7 +403,7 @@ void SwMultiTOXTabDialog::CreateOrUpdateExample( if(TOKEN_TAB_STOP == aToken.eTokenType) { pPropValArr[2].Name = C2U("TabStopRightAligned"); - BOOL bTemp = SVX_TAB_ADJUST_END == aToken.eTabAlign; + sal_Bool bTemp = SVX_TAB_ADJUST_END == aToken.eTabAlign; pPropValArr[2].Value.setValue(&bTemp, ::getBooleanCppuType()); pPropValArr[3].Name = C2U("TabStopFillCharacter"); pPropValArr[3].Value <<= OUString(aToken.cTabFillChar); diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx index c9c265baf4..dc52c7a441 100644 --- a/sw/source/ui/index/cnttab.cxx +++ b/sw/source/ui/index/cnttab.cxx @@ -215,7 +215,7 @@ public: sal_Bool IsModified()const; - virtual String GetCellText( long nRow, USHORT nColumn ) const; + virtual String GetCellText( long nRow, sal_uInt16 nColumn ) const; }; class SwAutoMarkDlg_Impl : public ModalDialog @@ -349,6 +349,8 @@ SwMultiTOXTabDialog::SwMultiTOXTabDialog(Window* pParent, const SfxItemSet& rSet aShowExampleCB.SetClickHdl(LINK(this, SwMultiTOXTabDialog, ShowPreviewHdl)); aShowExampleCB.Check( SW_MOD()->GetModuleConfig()->IsShowIndexPreview()); + + aExampleContainerWIN.SetAccessibleName(aShowExampleCB.GetText()); SetViewAlign( WINDOWALIGN_LEFT ); // SetViewWindow does not work if the dialog is visible! @@ -499,7 +501,7 @@ SwTOXDescription* SwMultiTOXTabDialog::CreateTOXDescFromTOXBase( pDesc->SetIndexOptions(pCurTOX->GetOptions()); pDesc->SetMainEntryCharStyle(pCurTOX->GetMainEntryCharStyle()); if(pDesc->GetTOXType() != TOX_INDEX) - pDesc->SetLevel((BYTE)pCurTOX->GetLevel()); + pDesc->SetLevel((sal_uInt8)pCurTOX->GetLevel()); pDesc->SetCreateFromObjectNames(pCurTOX->IsFromObjectNames()); pDesc->SetSequenceName(pCurTOX->GetSequenceName()); pDesc->SetCaptionDisplay(pCurTOX->GetCaptionDisplay()); @@ -530,7 +532,7 @@ IMPL_LINK( SwMultiTOXTabDialog, ShowPreviewHdl, CheckBox *, pBox ) SvtPathOptions aOpt; // 6.0 (extension .sxw) - BOOL bExist = aOpt.SearchFile( sTemplate, SvtPathOptions::PATH_TEMPLATE ); + sal_Bool bExist = aOpt.SearchFile( sTemplate, SvtPathOptions::PATH_TEMPLATE ); #ifndef MAC_WITHOUT_EXT if( !bExist ) @@ -623,7 +625,7 @@ long SwIndexTreeLB::GetTabPos( SvLBoxEntry* pEntry, SvLBoxTab* pTab) long nData = (long)pEntry->GetUserData(); if(nData != USHRT_MAX) { - long nPos = pHeaderBar->GetItemRect( static_cast< USHORT >(101 + nData) ).TopLeft().X(); + long nPos = pHeaderBar->GetItemRect( static_cast< sal_uInt16 >(101 + nData) ).TopLeft().X(); nData = nPos; } else @@ -743,6 +745,10 @@ SwAddStylesDlg_Impl::SwAddStylesDlg_Impl(Window* pParent, { FreeResource(); + aHeaderTree.SetAccessibleRelationMemberOf(&aStylesFL); + aLeftPB.SetAccessibleRelationMemberOf(&aStylesFL); + aRightPB.SetAccessibleRelationMemberOf(&aStylesFL); + aOk.SetClickHdl(LINK(this, SwAddStylesDlg_Impl, OkHdl)); aLeftPB.SetClickHdl(LINK(this, SwAddStylesDlg_Impl, LeftRightHdl)); aRightPB.SetClickHdl(LINK(this, SwAddStylesDlg_Impl, LeftRightHdl)); @@ -761,7 +767,7 @@ SwAddStylesDlg_Impl::SwAddStylesDlg_Impl(Window* pParent, rHB.Show(); SwIndexTreeLB& rTLB = aHeaderTree.GetTreeListBox(); - rTLB.SetWindowBits(WB_CLIPCHILDREN|WB_SORT); + rTLB.SetStyle(rTLB.GetStyle()|WB_CLIPCHILDREN|WB_SORT); rTLB.GetModel()->SetSortMode(SortAscending); for(i = 0; i < MAXLEVEL; ++i) { @@ -904,6 +910,7 @@ SwTOXSelectTabPage::SwTOXSelectTabPage(Window* pParent, const SfxItemSet& rAttrS aTOXMarksCB( this, SW_RES(CB_TOXMARKS )), + aIdxOptionsFL( this, SW_RES(FL_IDXOPTIONS )), aCollectSameCB( this, SW_RES(CB_COLLECTSAME )), aUseFFCB( this, SW_RES(CB_USEFF )), aUseDashCB( this, SW_RES(CB_USE_DASH )), @@ -912,7 +919,6 @@ SwTOXSelectTabPage::SwTOXSelectTabPage(Window* pParent, const SfxItemSet& rAttrS aKeyAsEntryCB( this, SW_RES(CB_KEYASENTRY )), aFromFileCB( this, SW_RES(CB_FROMFILE )), aAutoMarkPB( this, SW_RES(MB_AUTOMARK )), - aIdxOptionsFL( this, SW_RES(FL_IDXOPTIONS )), aFromNames( SW_RES(RES_SRCTYPES )), aFromObjCLB( this, SW_RES(CLB_FROMOBJ )), @@ -936,12 +942,17 @@ SwTOXSelectTabPage::SwTOXSelectTabPage(Window* pParent, const SfxItemSet& rAttrS bFirstCall(sal_True) { aBracketLB.InsertEntry(String(SW_RES(ST_NO_BRACKET)), 0); + + aAddStylesPB.SetAccessibleRelationMemberOf(&aCreateFromFL); + aAddStylesPB.SetAccessibleRelationLabeledBy(&aAddStylesCB); + aAddStylesPB.SetAccessibleName(aAddStylesCB.GetText()); + FreeResource(); pIndexEntryWrapper = new IndexEntrySupplierWrapper(); aLanguageLB.SetLanguageList( LANG_LIST_ALL | LANG_LIST_ONLY_KNOWN, - FALSE, FALSE, FALSE ); + sal_False, sal_False, sal_False ); sAddStyleContent = aAddStylesCB.GetText(); @@ -1149,7 +1160,7 @@ void SwTOXSelectTabPage::ApplyTOXDescription() aFromObjectNamesRB.Check(rDesc.IsCreateFromObjectNames()); aFromCaptionsRB.Check(!rDesc.IsCreateFromObjectNames()); aCaptionSequenceLB.SelectEntry(rDesc.GetSequenceName()); - aDisplayTypeLB.SelectEntryPos( static_cast< USHORT >(rDesc.GetCaptionDisplay()) ); + aDisplayTypeLB.SelectEntryPos( static_cast< sal_uInt16 >(rDesc.GetCaptionDisplay()) ); RadioButtonHdl(&aFromCaptionsRB); } @@ -1180,11 +1191,11 @@ void SwTOXSelectTabPage::ApplyTOXDescription() LanguageHdl(0); for( long nCnt = 0; nCnt < aSortAlgorithmLB.GetEntryCount(); ++nCnt ) { - const String* pEntryData = (const String*)aSortAlgorithmLB.GetEntryData( (USHORT)nCnt ); + const String* pEntryData = (const String*)aSortAlgorithmLB.GetEntryData( (sal_uInt16)nCnt ); OSL_ENSURE(pEntryData, "no entry data available"); if( pEntryData && *pEntryData == rDesc.GetSortAlgorithm()) { - aSortAlgorithmLB.SelectEntryPos( (USHORT)nCnt ); + aSortAlgorithmLB.SelectEntryPos( (sal_uInt16)nCnt ); break; } } @@ -1261,7 +1272,7 @@ void SwTOXSelectTabPage::FillTOXDescription() nOLEData |= nData; } } - rDesc.SetOLEOptions((USHORT)nOLEData); + rDesc.SetOLEOptions((sal_uInt16)nOLEData); } break; case TOX_AUTHORITIES: @@ -1286,7 +1297,7 @@ void SwTOXSelectTabPage::FillTOXDescription() rDesc.SetContentOptions(nContentOptions); rDesc.SetIndexOptions(nIndexOptions); - rDesc.SetLevel( static_cast< BYTE >(aLevelNF.GetValue()) ); + rDesc.SetLevel( static_cast< sal_uInt8 >(aLevelNF.GetValue()) ); rDesc.SetReadonly(aReadOnlyCB.IsChecked()); @@ -1406,7 +1417,19 @@ IMPL_LINK(SwTOXSelectTabPage, TOXTypeHdl, ListBox*, pBox) aSortAlgorithmFT.Show(bEnableSortLanguage); aSortAlgorithmLB.Show(bEnableSortLanguage); - if( nType & TO_ILLUSTRATION ) //add by zhaojianwei + // initialize button positions + + //#i111993# add styles button has two different positions + if( !aAddStylesPosDef.X() ) + { + aAddStylesPosDef = ( aAddStylesPB.GetPosPixel() ); + // move left! + Point aPos(aAddStylesPosDef); + aPos.X() -= 2 * aAddStylesPB.GetSizePixel().Width(); + aAddStylesPosUser = aPos; + } + + if( nType & TO_ILLUSTRATION ) //add by zhaojianwei aCaptionSequenceLB.SelectEntry( SwStyleNameMapper::GetUIName( RES_POOLCOLL_LABEL_ABB, aEmptyStr )); else if( nType & TO_TABLE ) @@ -1415,10 +1438,11 @@ IMPL_LINK(SwTOXSelectTabPage, TOXTypeHdl, ListBox*, pBox) else if( nType & TO_USER ) { aAddStylesCB.SetText(sAddStyleUser); - // move left! - Point aPos(aAddStylesPB.GetPosPixel()); - aPos.X() -= 2 * aAddStylesPB.GetSizePixel().Width(); - aAddStylesPB.SetPosPixel(aPos); + aAddStylesPB.SetPosPixel(aAddStylesPosUser); + } + else if( nType & TO_CONTENT ) + { + aAddStylesPB.SetPosPixel(aAddStylesPosDef); } aCollectSameCB.Show( 0 != (nType & TO_INDEX) ); @@ -1514,16 +1538,16 @@ IMPL_LINK(SwTOXSelectTabPage, LanguageHdl, ListBox*, pBox) if( 0 != (pUserData = aSortAlgorithmLB.GetEntryData( aSortAlgorithmLB.GetSelectEntryPos())) ) sOldString = *(String*)pUserData; void* pDel; - USHORT nEnd = aSortAlgorithmLB.GetEntryCount(); - for( USHORT n = 0; n < nEnd; ++n ) + sal_uInt16 nEnd = aSortAlgorithmLB.GetEntryCount(); + for( sal_uInt16 n = 0; n < nEnd; ++n ) if( 0 != ( pDel = aSortAlgorithmLB.GetEntryData( n )) ) delete (String*)pDel; aSortAlgorithmLB.Clear(); - USHORT nInsPos; + sal_uInt16 nInsPos; String sAlg, sUINm; - nEnd = static_cast< USHORT >(aSeq.getLength()); - for( USHORT nCnt = 0; nCnt < nEnd; ++nCnt ) + nEnd = static_cast< sal_uInt16 >(aSeq.getLength()); + for( sal_uInt16 nCnt = 0; nCnt < nEnd; ++nCnt ) { sUINm = pIndexRes->GetTranslation( sAlg = aSeq[ nCnt ] ); nInsPos = aSortAlgorithmLB.InsertEntry( sUINm ); @@ -1819,7 +1843,7 @@ void SwIdxTreeListBox::RequestHelp( const HelpEvent& rHEvt ) SvLBoxEntry* pEntry = GetEntry( aPos ); if( pEntry ) { - USHORT nLevel = static_cast< USHORT >(GetModel()->GetAbsPos(pEntry)); + sal_uInt16 nLevel = static_cast< sal_uInt16 >(GetModel()->GetAbsPos(pEntry)); String sEntry = pParent->GetLevelHelp(++nLevel); if('*' == sEntry) sEntry = GetEntryText(pEntry); @@ -1853,6 +1877,7 @@ SwTOXEntryTabPage::SwTOXEntryTabPage(Window* pParent, const SfxItemSet& rAttrSet SfxTabPage(pParent, SW_RES(TP_TOX_ENTRY), rAttrSet), aLevelFT(this, SW_RES(FT_LEVEL )), aLevelLB(this, SW_RES(LB_LEVEL )), + aEntryFL(this, SW_RES(FL_ENTRY )), aTokenFT(this, SW_RES(FT_TOKEN )), aTokenWIN(this, SW_RES(WIN_TOKEN )), @@ -1886,14 +1911,14 @@ SwTOXEntryTabPage::SwTOXEntryTabPage(Window* pParent, const SfxItemSet& rAttrSet aTabPosFT(this, SW_RES(FT_TABPOS )), aTabPosMF(this, SW_RES(MF_TABPOS )), aAutoRightCB(this, SW_RES(CB_AUTORIGHT )), - aEntryFL(this, SW_RES(FL_ENTRY )), + aFormatFL(this, SW_RES(FL_FORMAT )), + aRelToStyleCB(this, SW_RES(CB_RELTOSTYLE )), aMainEntryStyleFT(this, SW_RES(FT_MAIN_ENTRY_STYLE)), aMainEntryStyleLB(this, SW_RES(LB_MAIN_ENTRY_STYLE)), aAlphaDelimCB(this, SW_RES(CB_ALPHADELIM )), aCommaSeparatedCB(this, SW_RES(CB_COMMASEPARATED )), - aFormatFL(this, SW_RES(FL_FORMAT )), aSortDocPosRB(this, SW_RES(RB_DOCPOS )), aSortContentRB(this, SW_RES(RB_SORTCONTENT )), @@ -1924,10 +1949,20 @@ SwTOXEntryTabPage::SwTOXEntryTabPage(Window* pParent, const SfxItemSet& rAttrSet m_pCurrentForm(0), bInLevelHdl(sal_False) { + aEditStylePB.SetAccessibleRelationMemberOf(&aEntryFL); + aHyperLinkPB.SetAccessibleRelationMemberOf(&aEntryFL); + aPageNoPB.SetAccessibleRelationMemberOf(&aEntryFL); + aTabPB.SetAccessibleRelationMemberOf(&aEntryFL); + aEntryPB.SetAccessibleRelationMemberOf(&aEntryFL); + aEntryNoPB.SetAccessibleRelationMemberOf(&aEntryFL); + aAllLevelsPB.SetAccessibleRelationMemberOf(&aEntryFL); + aTokenWIN.SetAccessibleRelationMemberOf(&aEntryFL); + aTokenWIN.SetAccessibleRelationLabeledBy(&aTokenFT); + FreeResource(); sLevelStr = aLevelFT.GetText(); - aLevelLB.SetWindowBits( WB_HSCROLL ); + aLevelLB.SetStyle( aLevelLB.GetStyle() | WB_HSCROLL ); aLevelLB.SetSpaceBetweenEntries(0); aLevelLB.SetSelectionMode( SINGLE_SELECTION ); aLevelLB.SetHighlightRange(); // select full width @@ -1968,7 +2003,7 @@ SwTOXEntryTabPage::SwTOXEntryTabPage(Window* pParent, const SfxItemSet& rAttrSet aCommaSeparatedCB.SetClickHdl(LINK(this, SwTOXEntryTabPage, ModifyHdl)); aRelToStyleCB.SetClickHdl(LINK(this, SwTOXEntryTabPage, ModifyHdl)); - FieldUnit aMetric = ::GetDfltMetric(FALSE); + FieldUnit aMetric = ::GetDfltMetric(sal_False); SetMetric(aTabPosMF, aMetric); aSortDocPosRB.Check(); @@ -1998,7 +2033,7 @@ SwTOXEntryTabPage::SwTOXEntryTabPage(Window* pParent, const SfxItemSet& rAttrSet aEntryOutlineLevelFT.GetPosPixel().X(); //fill the types in - USHORT i; + sal_uInt16 i; for( i = 0; i < AUTH_FIELD_END; i++) { String sTmp(SW_RES(STR_AUTH_FIELD_START + i)); @@ -2103,9 +2138,9 @@ void SwTOXEntryTabPage::ActivatePage( const SfxItemSet& /*rSet*/) m_pCurrentForm = pTOXDlg->GetForm(aCurType); if( !( aLastTOXType == aCurType )) { - BOOL bToxIsAuthorities = TOX_AUTHORITIES == aCurType.eType; - BOOL bToxIsIndex = TOX_INDEX == aCurType.eType; - BOOL bToxIsContent = TOX_CONTENT == aCurType.eType; + sal_Bool bToxIsAuthorities = TOX_AUTHORITIES == aCurType.eType; + sal_Bool bToxIsIndex = TOX_INDEX == aCurType.eType; + sal_Bool bToxIsContent = TOX_CONTENT == aCurType.eType; aLevelLB.Clear(); for(sal_uInt16 i = 1; i < m_pCurrentForm->GetFormMax(); i++) @@ -2397,7 +2432,7 @@ IMPL_LINK(SwTOXEntryTabPage, InsertTokenHdl, PushButton*, pBtn) String sText; FormTokenType eTokenType = TOKEN_ENTRY_NO; String sCharStyle; - USHORT nChapterFormat = CF_NUMBER; // i89791 + sal_uInt16 nChapterFormat = CF_NUMBER; // i89791 if(pBtn == &aEntryNoPB) { sText.AssignAscii(SwForm::aFormEntryNum); @@ -2692,7 +2727,7 @@ IMPL_LINK(SwTOXEntryTabPage, ChapterInfoHdl, ListBox*, pBox) IMPL_LINK(SwTOXEntryTabPage, ChapterInfoOutlineHdl, NumericField*, pField) { - const sal_uInt16 nLevel = static_cast<BYTE>(pField->GetValue()); + const sal_uInt16 nLevel = static_cast<sal_uInt8>(pField->GetValue()); Control* pCtrl = aTokenWIN.GetActiveControl(); OSL_ENSURE(pCtrl, "no active control?"); @@ -2776,7 +2811,7 @@ IMPL_LINK(SwTOXEntryTabPage, AutoRightHdl, CheckBox*, pBox) void SwTOXEntryTabPage::SetWrtShell(SwWrtShell& rSh) { SwDocShell* pDocSh = rSh.GetView().GetDocShell(); - ::FillCharStyleListBox(aCharStyleLB, pDocSh, TRUE, TRUE); + ::FillCharStyleListBox(aCharStyleLB, pDocSh, sal_True, sal_True); const String sDefault(SW_RES(STR_POOLCOLL_STANDARD)); for(sal_uInt16 i = 0; i < aCharStyleLB.GetEntryCount(); i++) { @@ -3142,9 +3177,9 @@ void SwTokenWindow::InsertAtSelection( aSel.Justify(); String sEditText = ((SwTOXEdit*)pActiveCtrl)->GetText(); - String sLeft = sEditText.Copy( 0, static_cast< USHORT >(aSel.A()) ); - String sRight = sEditText.Copy( static_cast< USHORT >(aSel.B()), - static_cast< USHORT >(sEditText.Len() - aSel.B())); + String sLeft = sEditText.Copy( 0, static_cast< sal_uInt16 >(aSel.A()) ); + String sRight = sEditText.Copy( static_cast< sal_uInt16 >(aSel.B()), + static_cast< sal_uInt16 >(sEditText.Len() - aSel.B())); ((SwTOXEdit*)pActiveCtrl)->SetText(sLeft); ((SwTOXEdit*)pActiveCtrl)->AdjustSize(); @@ -3454,11 +3489,11 @@ sal_Bool SwTokenWindow::Contains(FormTokenType eSearchFor) const return bRet; } -BOOL SwTokenWindow::CreateQuickHelp(Control* pCtrl, +sal_Bool SwTokenWindow::CreateQuickHelp(Control* pCtrl, const SwFormToken& rToken, const HelpEvent& rHEvt) { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; if( rHEvt.GetMode() & HELPMODE_QUICK ) { sal_Bool bBalloon = Help::IsBalloonHelpEnabled(); @@ -3495,7 +3530,7 @@ BOOL SwTokenWindow::CreateQuickHelp(Control* pCtrl, else Help::ShowQuickHelp( this, aItemRect, sEntry, QUICKHELP_LEFT|QUICKHELP_VCENTER ); - bRet = TRUE; + bRet = sal_True; } return bRet; } @@ -3643,17 +3678,18 @@ void SwTokenWindow::GetFocus() SwTOXStylesTabPage::SwTOXStylesTabPage(Window* pParent, const SfxItemSet& rAttrSet ) : SfxTabPage(pParent, SW_RES(TP_TOX_STYLES), rAttrSet), + aFormatFL(this, SW_RES(FL_FORMAT )), aLevelFT2(this, SW_RES(FT_LEVEL )), aLevelLB(this, SW_RES(LB_LEVEL )), + aAssignBT(this, SW_RES(BT_ASSIGN )), aTemplateFT(this, SW_RES(FT_TEMPLATE)), aParaLayLB(this, SW_RES(LB_PARALAY )), aStdBT(this, SW_RES(BT_STD )), - aAssignBT(this, SW_RES(BT_ASSIGN )), aEditStyleBT(this, SW_RES(BT_EDIT_STYLE )), - aFormatFL(this, SW_RES(FL_FORMAT )), m_pCurrentForm(0) { FreeResource(); + SetExchangeSupport( sal_True ); aEditStyleBT.SetClickHdl (LINK( this, SwTOXStylesTabPage, EditStyleHdl)); @@ -3662,6 +3698,11 @@ SwTOXStylesTabPage::SwTOXStylesTabPage(Window* pParent, const SfxItemSet& rAttrS aParaLayLB.SetSelectHdl (LINK( this, SwTOXStylesTabPage, EnableSelectHdl)); aLevelLB.SetSelectHdl (LINK( this, SwTOXStylesTabPage, EnableSelectHdl)); aParaLayLB.SetDoubleClickHdl(LINK( this, SwTOXStylesTabPage, DoubleClickHdl)); + + aStdBT.SetAccessibleRelationMemberOf(&aFormatFL); + aAssignBT.SetAccessibleRelationMemberOf(&aFormatFL); + aEditStyleBT.SetAccessibleRelationMemberOf(&aFormatFL); + } SwTOXStylesTabPage::~SwTOXStylesTabPage() @@ -3932,15 +3973,15 @@ SwEntryBrowseBox::SwEntryBrowseBox(Window* pParent, const ResId& rId, sal_Bool SwEntryBrowseBox::SeekRow( long nRow ) { nCurrentRow = nRow; - return TRUE; + return sal_True; } -String SwEntryBrowseBox::GetCellText(long nRow, USHORT nColumn) const +String SwEntryBrowseBox::GetCellText(long nRow, sal_uInt16 nColumn) const { const String* pRet = &aEmptyStr; if(aEntryArr.Count() > nRow) { - AutoMarkEntry* pEntry = aEntryArr[ static_cast< USHORT >(nRow) ]; + AutoMarkEntry* pEntry = aEntryArr[ static_cast< sal_uInt16 >(nRow) ]; switch(nColumn) { case ITEM_SEARCH :pRet = &pEntry->sSearch; break; @@ -3971,7 +4012,7 @@ void SwEntryBrowseBox::PaintCell(OutputDevice& rDev, sal_Bool SwEntryBrowseBox::SaveModified() { SetModified(); - USHORT nRow = static_cast< USHORT >(GetCurRow()); + sal_uInt16 nRow = static_cast< sal_uInt16 >(GetCurRow()); sal_uInt16 nCol = GetCurColumnId(); String sNew; @@ -4054,7 +4095,7 @@ void SwEntryBrowseBox::ReadEntries(SvStream& rInStr) if( !pToInsert ) pToInsert = new AutoMarkEntry; - USHORT nSttPos = 0; + sal_uInt16 nSttPos = 0; pToInsert->sSearch = sLine.GetToken(0, ';', nSttPos ); pToInsert->sAlternative = sLine.GetToken(0, ';', nSttPos ); pToInsert->sPrimKey = sLine.GetToken(0, ';', nSttPos ); @@ -4164,7 +4205,7 @@ SwAutoMarkDlg_Impl::SwAutoMarkDlg_Impl(Window* pParent, const String& rAutoMarkU aEntriesBB.RowInserted(0, 1, sal_True); else { - SfxMedium aMed( sAutoMarkURL, STREAM_STD_READ, FALSE ); + SfxMedium aMed( sAutoMarkURL, STREAM_STD_READ, sal_False ); if( aMed.GetInStream() && !aMed.GetInStream()->GetError() ) aEntriesBB.ReadEntries( *aMed.GetInStream() ); else @@ -4187,7 +4228,7 @@ IMPL_LINK(SwAutoMarkDlg_Impl, OkHdl, OKButton*, EMPTYARG) SfxMedium aMed( sAutoMarkURL, bCreateMode ? STREAM_WRITE : STREAM_WRITE| STREAM_TRUNC, - FALSE ); + sal_False ); SvStream* pStrm = aMed.GetOutStream(); pStrm->SetStreamCharSet( RTL_TEXTENCODING_MS_1253 ); if( !pStrm->GetError() ) diff --git a/sw/source/ui/index/cnttab.hrc b/sw/source/ui/index/cnttab.hrc index 3869e0636e..ae8a1b11f8 100644 --- a/sw/source/ui/index/cnttab.hrc +++ b/sw/source/ui/index/cnttab.hrc @@ -173,6 +173,7 @@ #define STR_TOKEN_HELP_AUTHORITY (STR_BUTTON_HELP_TEXT_START + 9) #define STR_CHARSTYLE (STR_TOKEN_HELP_AUTHORITY + 1) + #define TLB_STYLES 100 #define FL_STYLES 101 #define PB_OK 102 diff --git a/sw/source/ui/index/cnttab.src b/sw/source/ui/index/cnttab.src index 3972c33763..6d2f75b643 100644 --- a/sw/source/ui/index/cnttab.src +++ b/sw/source/ui/index/cnttab.src @@ -132,6 +132,7 @@ TabPage TP_TOX_SELECT }; Edit ED_TITLE { + HelpID = "sw:Edit:TP_TOX_SELECT:ED_TITLE"; Pos = MAP_APPFONT ( 45 , 14 ) ; Size = MAP_APPFONT ( 203 , 12 ) ; Border = TRUE; @@ -144,6 +145,7 @@ TabPage TP_TOX_SELECT }; ListBox LB_TYPE { + HelpID = "sw:ListBox:TP_TOX_SELECT:LB_TYPE"; Pos = MAP_APPFONT ( 45 , 30 ) ; Size = MAP_APPFONT ( 80 , 80 ) ; TabStop = TRUE ; @@ -161,6 +163,7 @@ TabPage TP_TOX_SELECT }; CheckBox CB_READONLY { + HelpID = "sw:CheckBox:TP_TOX_SELECT:CB_READONLY"; Pos = MAP_APPFONT ( 51 , 46 ) ; Size = MAP_APPFONT ( 200 , 10 ) ; Check = TRUE; @@ -180,6 +183,7 @@ TabPage TP_TOX_SELECT }; ListBox LB_AREA { + HelpID = "sw:ListBox:TP_TOX_SELECT:LB_AREA"; Pos = MAP_APPFONT ( 45 , 70 ) ; Size = MAP_APPFONT ( 80 , 12 ) ; TabStop = TRUE ; @@ -198,6 +202,7 @@ TabPage TP_TOX_SELECT }; NumericField NF_LEVEL { + HelpID = "sw:NumericField:TP_TOX_SELECT:NF_LEVEL"; Pos = MAP_APPFONT ( 231 , 72 ) ; Size = MAP_APPFONT ( 20 , 12 ) ; Border = TRUE ; @@ -218,6 +223,7 @@ TabPage TP_TOX_SELECT }; CheckBox CB_FROMHEADINGS { + HelpID = "sw:CheckBox:TP_TOX_SELECT:CB_FROMHEADINGS"; Pos = MAP_APPFONT ( 12 , 99 ) ; Size = MAP_APPFONT ( 95 , 10 ) ; Check = TRUE; @@ -234,6 +240,7 @@ TabPage TP_TOX_SELECT */ CheckBox CB_ADDSTYLES { + HelpID = "sw:CheckBox:TP_TOX_SELECT:CB_ADDSTYLES"; Pos = MAP_APPFONT ( 12 , 115 ) ; Size = MAP_APPFONT ( 75 , 10 ) ; Text [ en-US ] = "~Additional Styles"; @@ -244,6 +251,7 @@ TabPage TP_TOX_SELECT }; PushButton PB_ADDSTYLES { + HelpID = "sw:PushButton:TP_TOX_SELECT:PB_ADDSTYLES"; Pos = MAP_APPFONT ( 115 , 114 ) ; Size = MAP_APPFONT ( 12 , 12 ) ; Text = "..." ; @@ -251,6 +259,7 @@ TabPage TP_TOX_SELECT }; CheckBox CB_TOXMARKS { + HelpID = "sw:CheckBox:TP_TOX_SELECT:CB_TOXMARKS"; Pos = MAP_APPFONT ( 12 , 131 ) ; Size = MAP_APPFONT ( 90 , 10 ) ; Text [ en-US ] = "Inde~x marks"; @@ -258,6 +267,7 @@ TabPage TP_TOX_SELECT RadioButton RB_FROMCAPTIONS { + HelpID = "sw:RadioButton:TP_TOX_SELECT:RB_FROMCAPTIONS"; Pos = MAP_APPFONT ( 12 , 98 ) ; Size = MAP_APPFONT ( 90 , 10 ) ; Text [ en-US ] = "Captions"; @@ -270,6 +280,7 @@ TabPage TP_TOX_SELECT }; ListBox LB_CAPTIONSEQUENCE { + HelpID = "sw:ListBox:TP_TOX_SELECT:LB_CAPTIONSEQUENCE"; Pos = MAP_APPFONT ( 55 , 112 ) ; Size = MAP_APPFONT ( 70 , 40 ) ; DropDown = TRUE; @@ -283,6 +294,7 @@ TabPage TP_TOX_SELECT }; ListBox LB_DISPLAYTYPE { + HelpID = "sw:ListBox:TP_TOX_SELECT:LB_DISPLAYTYPE"; Pos = MAP_APPFONT ( 55 , 128 ) ; Size = MAP_APPFONT ( 70 , 40 ) ; DropDown = TRUE; @@ -296,54 +308,63 @@ TabPage TP_TOX_SELECT }; RadioButton RB_FROMOBJECTNAMES { + HelpID = "sw:RadioButton:TP_TOX_SELECT:RB_FROMOBJECTNAMES"; Pos = MAP_APPFONT ( 156 , 98 ) ; Size = MAP_APPFONT ( 90 , 10 ) ; Text [ en-US ] = "Object names"; }; CheckBox CB_COLLECTSAME { + HelpID = "sw:CheckBox:TP_TOX_SELECT:CB_COLLECTSAME"; Pos = MAP_APPFONT ( 12 , 98 ) ; Size = MAP_APPFONT ( 121 , 10 ) ; Text [ en-US ] = "Combine identical entries"; }; CheckBox CB_USEFF { + HelpID = "sw:CheckBox:TP_TOX_SELECT:CB_USEFF"; Pos = MAP_APPFONT ( 18 , 111 ) ; Size = MAP_APPFONT ( 115 , 10 ) ; Text [ en-US ] = "Combine identical entries with p or ~pp"; }; CheckBox CB_USE_DASH { + HelpID = "sw:CheckBox:TP_TOX_SELECT:CB_USE_DASH"; Pos = MAP_APPFONT ( 18 , 124 ) ; Size = MAP_APPFONT ( 115 , 10 ) ; Text [ en-US ] = "Combine with -"; }; CheckBox CB_CASESENSITIVE { + HelpID = "sw:CheckBox:TP_TOX_SELECT:CB_CASESENSITIVE"; Pos = MAP_APPFONT ( 18 , 137 ) ; Size = MAP_APPFONT ( 115 , 10 ) ; Text [ en-US ] = "Case sensitive"; }; CheckBox CB_INITIALCAPS { + HelpID = "sw:CheckBox:TP_TOX_SELECT:CB_INITIALCAPS"; Pos = MAP_APPFONT ( 136 , 98 ) ; Size = MAP_APPFONT ( 115 , 10 ) ; Text [ en-US ] = "AutoCapitalize entries"; }; CheckBox CB_KEYASENTRY { + HelpID = "sw:CheckBox:TP_TOX_SELECT:CB_KEYASENTRY"; Pos = MAP_APPFONT ( 136, 111 ) ; Size = MAP_APPFONT ( 115 , 10 ) ; Text [ en-US ] = "Keys as separate entries"; }; CheckBox CB_FROMFILE { + HelpID = "sw:CheckBox:TP_TOX_SELECT:CB_FROMFILE"; Pos = MAP_APPFONT ( 136 , 124 ) ; Size = MAP_APPFONT ( 115 , 10 ) ; Text [ en-US ] = "~Concordance file"; }; MenuButton MB_AUTOMARK { + HelpID = "sw:MenuButton:TP_TOX_SELECT:MB_AUTOMARK"; Pos = MAP_APPFONT ( 136 , 137 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; TabStop = TRUE ; @@ -372,30 +393,35 @@ TabPage TP_TOX_SELECT }; CheckBox CB_FROMTABLES { + HelpID = "sw:CheckBox:TP_TOX_SELECT:CB_FROMTABLES"; Pos = MAP_APPFONT ( 112 , 99 ) ; Size = MAP_APPFONT ( 68 , 10 ) ; Text [ en-US ] = "Tables"; }; CheckBox CB_FROMFRAMES { + HelpID = "sw:CheckBox:TP_TOX_SELECT:CB_FROMFRAMES"; Pos = MAP_APPFONT ( 182 , 99 ) ; Size = MAP_APPFONT ( 68 , 10 ) ; Text [ en-US ] = "Te~xt frames"; }; CheckBox CB_FROMGRAPHICS { + HelpID = "sw:CheckBox:TP_TOX_SELECT:CB_FROMGRAPHICS"; Pos = MAP_APPFONT ( 112 , 113 ) ; Size = MAP_APPFONT ( 68 , 10 ) ; Text [ en-US ] = "Graphics"; }; CheckBox CB_FROMOLE { + HelpID = "sw:CheckBox:TP_TOX_SELECT:CB_FROMOLE"; Pos = MAP_APPFONT ( 182 , 113 ) ; Size = MAP_APPFONT ( 68 , 10 ) ; Text [ en-US ] = "OLE objects"; }; CheckBox CB_LEVELFROMCHAPTER { + HelpID = "sw:CheckBox:TP_TOX_SELECT:CB_LEVELFROMCHAPTER"; Pos = MAP_APPFONT ( 118 , 127 ) ; Size = MAP_APPFONT ( 103 , 10 ) ; Text [ en-US ] = "Use level from source chapter"; @@ -443,6 +469,7 @@ TabPage TP_TOX_SELECT }; CheckBox CB_SEQUENCE { + HelpID = "sw:CheckBox:TP_TOX_SELECT:CB_SEQUENCE"; Pos = MAP_APPFONT ( 12, 70) ; Size = MAP_APPFONT ( 100, 10 ) ; Text [ en-US ] = "~Number entries"; @@ -455,6 +482,7 @@ TabPage TP_TOX_SELECT }; ListBox LB_BRACKET { + HelpID = "sw:ListBox:TP_TOX_SELECT:LB_BRACKET"; Pos = MAP_APPFONT ( 75, 84) ; Size = MAP_APPFONT ( 40, 50 ) ; Border = TRUE; @@ -495,6 +523,7 @@ TabPage TP_TOX_SELECT }; ListBox LB_LANGUAGE { + HelpID = "sw:ListBox:TP_TOX_SELECT:LB_LANGUAGE"; Pos = MAP_APPFONT ( 47, 164) ; Size = MAP_APPFONT ( 80, 50 ) ; Border = TRUE; @@ -508,6 +537,7 @@ TabPage TP_TOX_SELECT }; ListBox LB_SORTALG { + HelpID = "sw:ListBox:TP_TOX_SELECT:LB_SORTALG"; Pos = MAP_APPFONT ( 201, 164) ; Size = MAP_APPFONT ( 50, 50 ) ; Border = TRUE; @@ -549,6 +579,7 @@ TabPage TP_TOX_ENTRY Size = MAP_APPFONT ( 136, 12 ) ; ImageButton WIN_LEFT_SCROLL { + HelpID = "sw:ImageButton:TP_TOX_ENTRY:WIN_LEFT_SCROLL"; Pos = MAP_APPFONT ( 0, 0 ) ; Size = MAP_APPFONT ( 10, 12 ) ; Symbol = IMAGEBUTTON_ARROW_LEFT; @@ -563,6 +594,7 @@ TabPage TP_TOX_ENTRY }; ImageButton WIN_RIGHT_SCROLL { + HelpID = "sw:ImageButton:TP_TOX_ENTRY:WIN_RIGHT_SCROLL"; Pos = MAP_APPFONT ( 126, 0 ) ; Size = MAP_APPFONT ( 10, 12 ) ; Symbol = IMAGEBUTTON_ARROW_RIGHT; @@ -649,48 +681,56 @@ TabPage TP_TOX_ENTRY }; PushButton PB_ALL_LEVELS { + HelpID = "sw:PushButton:TP_TOX_ENTRY:PB_ALL_LEVELS"; Pos = MAP_APPFONT ( 209 , 14 ) ; Size = MAP_APPFONT ( 40, 14 ) ; Text [ en-US ] = "~All"; }; PushButton PB_ENTRYNO { + HelpID = "sw:PushButton:TP_TOX_ENTRY:PB_ENTRYNO"; Pos = MAP_APPFONT ( 37 , 32 ) ; Size = MAP_APPFONT ( 40, 14 ) ; Text [ en-US ] = "Chapter no."; }; PushButton PB_ENTRY { + HelpID = "sw:PushButton:TP_TOX_ENTRY:PB_ENTRY"; Pos = MAP_APPFONT ( 80, 32 ) ; Size = MAP_APPFONT ( 40, 14 ) ; Text [ en-US ] = "Entry text"; }; PushButton PB_CHAPTERINFO { + HelpID = "sw:PushButton:TP_TOX_ENTRY:PB_CHAPTERINFO"; Pos = MAP_APPFONT ( 123 , 32 ) ; Size = MAP_APPFONT ( 40, 14) ; Text [ en-US ] = "~Chapter info"; }; PushButton PB_PAGENO { + HelpID = "sw:PushButton:TP_TOX_ENTRY:PB_PAGENO"; Pos = MAP_APPFONT ( 166 , 32 ) ; Size = MAP_APPFONT ( 40, 14 ) ; Text [ en-US ] = "Page no."; }; PushButton PB_TAB { + HelpID = "sw:PushButton:TP_TOX_ENTRY:PB_TAB"; Pos = MAP_APPFONT ( 209 ,32 ) ; Size = MAP_APPFONT ( 40, 14 ) ; Text [ en-US ] = "Tab stop"; }; PushButton PB_HYPERLINK { + HelpID = "sw:PushButton:TP_TOX_ENTRY:PB_HYPERLINK"; Pos = MAP_APPFONT ( 209 , 32 ) ; Size = MAP_APPFONT ( 40, 14 ) ; Text [ en-US ] = "H~yperlink"; }; ListBox LB_AUTHFIELD { + HelpID = "sw:ListBox:TP_TOX_ENTRY:LB_AUTHFIELD"; Pos = MAP_APPFONT ( 37 , 33 ) ; Size = MAP_APPFONT ( 59, 60 ) ; DropDown = TRUE; @@ -699,12 +739,14 @@ TabPage TP_TOX_ENTRY }; PushButton PB_AUTHINSERT { + HelpID = "sw:PushButton:TP_TOX_ENTRY:PB_AUTHINSERT"; Pos = MAP_APPFONT ( 99 , 32 ) ; Size = MAP_APPFONT ( 39, 14 ) ; Text [ en-US ] = "~Insert"; }; PushButton PB_AUTHREMOVE { + HelpID = "sw:PushButton:TP_TOX_ENTRY:PB_AUTHREMOVE"; Pos = MAP_APPFONT ( 142 , 32 ) ; Size = MAP_APPFONT ( 39, 14 ) ; Text [ en-US ] = "~Remove"; @@ -717,6 +759,7 @@ TabPage TP_TOX_ENTRY }; ListBox LB_CHARSTYLE { + HelpID = "sw:ListBox:TP_TOX_ENTRY:LB_CHARSTYLE"; Pos = MAP_APPFONT ( 100 , 53 ) ; Size = MAP_APPFONT ( 93, 60 ) ; TabStop = TRUE ; @@ -724,6 +767,7 @@ TabPage TP_TOX_ENTRY }; PushButton PB_EDITSTYLE { + HelpID = "sw:PushButton:TP_TOX_ENTRY:PB_EDITSTYLE"; Pos = MAP_APPFONT ( 199 , 52 ) ; Size = MAP_APPFONT ( 50, 14 ) ; Text [ en-US ] = "~Edit..."; @@ -736,6 +780,7 @@ TabPage TP_TOX_ENTRY }; ComboBox CB_FILLCHAR { + HelpID = "sw:ComboBox:TP_TOX_ENTRY:CB_FILLCHAR"; Pos = MAP_APPFONT ( 100 , 69 ) ; Size = MAP_APPFONT ( 40, 40 ) ; TabStop = TRUE ; @@ -749,6 +794,7 @@ TabPage TP_TOX_ENTRY }; ListBox LB_CHAPTERENTRY { + HelpID = "sw:ListBox:TP_TOX_ENTRY:LB_CHAPTERENTRY"; Pos = MAP_APPFONT ( 100 , 69 ) ; Size = MAP_APPFONT ( 93, 40 ) ; TabStop = TRUE ; @@ -769,6 +815,7 @@ TabPage TP_TOX_ENTRY }; ListBox LB_ENTRY_NO { + HelpID = "sw:ListBox:TP_TOX_ENTRY:LB_ENTRY_NO"; Pos = MAP_APPFONT ( 100 , 69 ) ; Size = MAP_APPFONT ( 93, 40 ) ; TabStop = TRUE ; @@ -788,6 +835,7 @@ TabPage TP_TOX_ENTRY }; NumericField NF_LEVEL_OL { + HelpID = "sw:NumericField:TP_TOX_ENTRY:NF_LEVEL_OL"; Pos = MAP_APPFONT ( 100 , 85 ) ; Size = MAP_APPFONT ( 20 , 12 ) ; Border = TRUE ; @@ -809,6 +857,7 @@ TabPage TP_TOX_ENTRY }; MetricField MF_TABPOS { + HelpID = "sw:MetricField:TP_TOX_ENTRY:MF_TABPOS"; Pos = MAP_APPFONT ( 100 , 85 ) ; Size = MAP_APPFONT ( 40, 12 ) ; Border = TRUE ; @@ -827,6 +876,7 @@ TabPage TP_TOX_ENTRY }; CheckBox CB_AUTORIGHT { + HelpID = "sw:CheckBox:TP_TOX_ENTRY:CB_AUTORIGHT"; Pos = MAP_APPFONT ( 143 , 86 ) ; Size = MAP_APPFONT ( 100, 10 ) ; Text [ en-US ] = "Align right"; @@ -839,6 +889,7 @@ TabPage TP_TOX_ENTRY }; CheckBox CB_RELTOSTYLE { + HelpID = "sw:CheckBox:TP_TOX_ENTRY:CB_RELTOSTYLE"; Pos = MAP_APPFONT ( 37 , 110 ) ; Size = MAP_APPFONT ( 200, 10 ) ; Text [ en-US ] = "Tab position relati~ve to Paragraph Style indent"; @@ -851,6 +902,7 @@ TabPage TP_TOX_ENTRY }; ListBox LB_MAIN_ENTRY_STYLE { + HelpID = "sw:ListBox:TP_TOX_ENTRY:LB_MAIN_ENTRY_STYLE"; Pos = MAP_APPFONT ( 157 , 110 ) ; Size = MAP_APPFONT ( 92, 80 ) ; TabStop = TRUE ; @@ -860,12 +912,14 @@ TabPage TP_TOX_ENTRY CheckBox CB_ALPHADELIM { + HelpID = "sw:CheckBox:TP_TOX_ENTRY:CB_ALPHADELIM"; Pos = MAP_APPFONT ( 37 , 126 ) ; Size = MAP_APPFONT ( 105, 10 ) ; Text [ en-US ] = "Alphabetical delimiter"; }; CheckBox CB_COMMASEPARATED { + HelpID = "sw:CheckBox:TP_TOX_ENTRY:CB_COMMASEPARATED"; Pos = MAP_APPFONT ( 37 , 140 ) ; Size = MAP_APPFONT ( 105, 10 ) ; Text [ en-US ] = "Key separated by commas"; @@ -878,12 +932,14 @@ TabPage TP_TOX_ENTRY }; RadioButton RB_DOCPOS { + HelpID = "sw:RadioButton:TP_TOX_ENTRY:RB_DOCPOS"; Pos = MAP_APPFONT ( 40 , 113) ; Size = MAP_APPFONT ( 94, 10 ) ; Text [ en-US ] = "Document ~position "; }; RadioButton RB_SORTCONTENT { + HelpID = "sw:RadioButton:TP_TOX_ENTRY:RB_SORTCONTENT"; Pos = MAP_APPFONT ( 136 , 113 ) ; Size = MAP_APPFONT ( 90, 10 ) ; Text [ en-US ] = "~Content"; @@ -902,6 +958,7 @@ TabPage TP_TOX_ENTRY }; ListBox LB_FIRSTKEY { + HelpID = "sw:ListBox:TP_TOX_ENTRY:LB_FIRSTKEY"; Pos = MAP_APPFONT ( 60 , 138 ) ; Size = MAP_APPFONT ( 159, 50 ) ; Border = TRUE; @@ -909,6 +966,7 @@ TabPage TP_TOX_ENTRY }; ImageRadioButton RB_SORTUP1 { + HelpID = "sw:ImageRadioButton:TP_TOX_ENTRY:RB_SORTUP1"; Pos = MAP_APPFONT ( 222 , 138 ) ; Size = MAP_APPFONT ( 12, 12 ) ; RadioButtonImage = @@ -922,6 +980,7 @@ TabPage TP_TOX_ENTRY }; ImageRadioButton RB_SORTDOWN1 { + HelpID = "sw:ImageRadioButton:TP_TOX_ENTRY:RB_SORTDOWN1"; Pos = MAP_APPFONT ( 237 , 138 ) ; Size = MAP_APPFONT ( 12, 12 ) ; RadioButtonImage = @@ -934,6 +993,7 @@ TabPage TP_TOX_ENTRY }; ImageRadioButton RB_SORTUP2 { + HelpID = "sw:ImageRadioButton:TP_TOX_ENTRY:RB_SORTUP2"; Pos = MAP_APPFONT ( 222 , 153 ) ; Size = MAP_APPFONT ( 12, 12 ) ; RadioButtonImage = @@ -947,6 +1007,7 @@ TabPage TP_TOX_ENTRY }; ImageRadioButton RB_SORTDOWN2 { + HelpID = "sw:ImageRadioButton:TP_TOX_ENTRY:RB_SORTDOWN2"; Pos = MAP_APPFONT ( 237 , 153 ) ; Size = MAP_APPFONT ( 12, 12 ) ; RadioButtonImage = @@ -959,6 +1020,7 @@ TabPage TP_TOX_ENTRY }; ImageRadioButton RB_SORTUP3 { + HelpID = "sw:ImageRadioButton:TP_TOX_ENTRY:RB_SORTUP3"; Pos = MAP_APPFONT ( 222 , 168 ) ; Size = MAP_APPFONT ( 12, 12 ) ; RadioButtonImage = @@ -972,6 +1034,7 @@ TabPage TP_TOX_ENTRY }; ImageRadioButton RB_SORTDOWN3 { + HelpID = "sw:ImageRadioButton:TP_TOX_ENTRY:RB_SORTDOWN3"; Pos = MAP_APPFONT ( 237 ,168 ) ; Size = MAP_APPFONT ( 12, 12 ) ; RadioButtonImage = @@ -990,6 +1053,7 @@ TabPage TP_TOX_ENTRY }; ListBox LB_SECONDKEY { + HelpID = "sw:ListBox:TP_TOX_ENTRY:LB_SECONDKEY"; Pos = MAP_APPFONT ( 60 , 153 ) ; Size = MAP_APPFONT ( 159, 50 ) ; Border = TRUE; @@ -1003,6 +1067,7 @@ TabPage TP_TOX_ENTRY }; ListBox LB_THIRDKEY { + HelpID = "sw:ListBox:TP_TOX_ENTRY:LB_THIRDKEY"; Pos = MAP_APPFONT ( 60 , 168 ) ; Size = MAP_APPFONT ( 159, 50 ) ; Border = TRUE; @@ -1042,6 +1107,7 @@ TabPage TP_TOX_STYLES }; ListBox LB_LEVEL { + HelpID = "sw:ListBox:TP_TOX_STYLES:LB_LEVEL"; Border = TRUE ; Pos = MAP_APPFONT ( 12 , 25 ) ; Size = MAP_APPFONT ( 102 , 131 ) ; @@ -1057,6 +1123,7 @@ TabPage TP_TOX_STYLES }; ListBox LB_PARALAY { + HelpID = "sw:ListBox:TP_TOX_STYLES:LB_PARALAY"; Border = TRUE ; Pos = MAP_APPFONT ( 142 , 25 ) ; Size = MAP_APPFONT ( 101 , 131 ) ; @@ -1066,6 +1133,7 @@ TabPage TP_TOX_STYLES }; PushButton BT_STD { + HelpID = "sw:PushButton:TP_TOX_STYLES:BT_STD"; Pos = MAP_APPFONT ( 64 , 162 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; TabStop = TRUE ; @@ -1073,6 +1141,7 @@ TabPage TP_TOX_STYLES }; ImageButton BT_ASSIGN { + HelpID = "sw:ImageButton:TP_TOX_STYLES:BT_ASSIGN"; Pos = MAP_APPFONT ( 118 , 28 ) ; Size = MAP_APPFONT ( 20 , 12 ) ; TabStop = TRUE ; @@ -1087,6 +1156,7 @@ TabPage TP_TOX_STYLES }; PushButton BT_EDIT_STYLE { + HelpID = "sw:PushButton:TP_TOX_STYLES:BT_EDIT_STYLE"; Pos = MAP_APPFONT ( 193 , 162 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; TabStop = TRUE ; @@ -1126,6 +1196,7 @@ ModalDialog DLG_ADD_IDX_STYLES }; ImageButton PB_LEFT { + HelpID = "sw:ImageButton:DLG_ADD_IDX_STYLES:PB_LEFT"; Pos = MAP_APPFONT ( 12 , 182 ) ; Size = MAP_APPFONT ( 50 , 12 ) ; TabStop = TRUE ; @@ -1137,9 +1208,13 @@ ModalDialog DLG_ADD_IDX_STYLES }; MaskColor = IMAGE_MASK_COLOR ; }; + //IAccessibility2 Implementation 2009----- + QuickHelpText [ en-US ] = "Left" ; + //-----IAccessibility2 Implementation 2009 }; ImageButton PB_RIGHT { + HelpID = "sw:ImageButton:DLG_ADD_IDX_STYLES:PB_RIGHT"; Pos = MAP_APPFONT ( 65 , 182 ) ; Size = MAP_APPFONT ( 50 , 12 ) ; TabStop = TRUE ; @@ -1151,6 +1226,9 @@ ModalDialog DLG_ADD_IDX_STYLES }; MaskColor = IMAGE_MASK_COLOR ; }; + //IAccessibility2 Implementation 2009----- + QuickHelpText [ en-US ] = "Right" ; + //-----IAccessibility2 Implementation 2009 }; FixedLine FL_STYLES { diff --git a/sw/source/ui/index/idxmrk.src b/sw/source/ui/index/idxmrk.src index 5abe243c64..2eaeb63e67 100644 --- a/sw/source/ui/index/idxmrk.src +++ b/sw/source/ui/index/idxmrk.src @@ -275,7 +275,7 @@ ModalDialog DLG_EDIT_IDXMARK Moveable = TRUE ; Closeable = TRUE; Sizeable = FALSE ; - HelpID = FN_EDIT_IDX_ENTRY_DLG; + HelpId = CMD_FN_EDIT_IDX_ENTRY_DLG; SVLook = TRUE ; #define IDX_WIN_WIDTH IDX_WIN_WIDTH_NORMAL Size = MAP_APPFONT ( IDX_WIN_WIDTH , 118 ) ; @@ -294,7 +294,7 @@ ModalDialog DLG_EDIT_IDXMARK_CJK Moveable = TRUE ; Closeable = TRUE; Sizeable = FALSE ; - HelpID = FN_EDIT_IDX_ENTRY_DLG; + HelpId = CMD_FN_EDIT_IDX_ENTRY_DLG; SVLook = TRUE ; #define IDX_WIN_WIDTH IDX_WIN_WIDTH_CJK Size = MAP_APPFONT ( IDX_WIN_WIDTH , 118 ) ; @@ -315,7 +315,7 @@ ModelessDialog DLG_INSIDXMARK Sizeable = FALSE ; Hide = TRUE ; // Zoomable = TRUE ; - HelpID = FN_INSERT_IDX_ENTRY_DLG; + HelpId = CMD_FN_INSERT_IDX_ENTRY_DLG; SVLook = TRUE ; #define IDX_WIN_WIDTH IDX_WIN_WIDTH_NORMAL Size = MAP_APPFONT ( IDX_WIN_WIDTH , 138) ; @@ -336,7 +336,7 @@ ModelessDialog DLG_INSIDXMARK_CJK Closeable = TRUE; Sizeable = FALSE ; // Zoomable = TRUE ; - HelpID = FN_INSERT_IDX_ENTRY_DLG; + HelpId = CMD_FN_INSERT_IDX_ENTRY_DLG; SVLook = TRUE ; #define IDX_WIN_WIDTH IDX_WIN_WIDTH_CJK Size = MAP_APPFONT ( IDX_WIN_WIDTH , 138) ; @@ -392,6 +392,7 @@ ModalDialog DLG_NEW_USER_IDX }; Edit ED_NAME { + HelpID = "sw:Edit:DLG_NEW_USER_IDX:ED_NAME"; Border = TRUE ; Pos = MAP_APPFONT ( 55 , 15 ) ; Size = MAP_APPFONT ( 78 , 12 ) ; @@ -522,7 +523,7 @@ ModalDialog DLG_EDIT_AUTHMARK Moveable = TRUE ; Closeable = TRUE ; Sizeable = FALSE ; - HelpID = FN_EDIT_AUTH_ENTRY_DLG; + HelpId = CMD_FN_EDIT_AUTH_ENTRY_DLG; SVLook = TRUE ; Size = MAP_APPFONT ( 218 , 118 ) ; #define RADIO_BUTTON_HEIGHT 0 @@ -535,7 +536,7 @@ ModelessDialog DLG_INSAUTHMARK Closeable = TRUE ; Sizeable = FALSE ; // Zoomable = TRUE ; - HelpID = FN_INSERT_AUTH_ENTRY_DLG; + HelpId = CMD_FN_INSERT_AUTH_ENTRY_DLG; SVLook = TRUE ; #define RADIO_BUTTON_HEIGHT 30 Size = MAP_APPFONT ( 218 , 118 + RADIO_BUTTON_HEIGHT) ; diff --git a/sw/source/ui/index/makefile.mk b/sw/source/ui/index/makefile.mk deleted file mode 100644 index a42f98122b..0000000000 --- a/sw/source/ui/index/makefile.mk +++ /dev/null @@ -1,67 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=index -LIBTARGET=NO -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -SRS1NAME=$(TARGET) -SRC1FILES = \ - cnttab.src \ - idxmrk.src \ - multmrk.src - -EXCEPTIONSFILES = \ - $(SLO)$/cnttab.obj \ - $(SLO)$/cntex.obj \ - $(SLO)$/idxmrk.obj \ - $(SLO)$/multmrk.obj \ - $(SLO)$/swuiidxmrk.obj \ - $(SLO)$/toxmgr.obj - -SLOFILES = \ - $(EXCEPTIONSFILES) - -LIB1TARGET= $(SLB)$/$(TARGET).lib - -LIB1OBJFILES = \ - $(SLO)$/idxmrk.obj \ - $(SLO)$/toxmgr.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/ui/index/multmrk.cxx b/sw/source/ui/index/multmrk.cxx index fcf6cf0360..d314fdb410 100644 --- a/sw/source/ui/index/multmrk.cxx +++ b/sw/source/ui/index/multmrk.cxx @@ -60,8 +60,8 @@ SwMultiTOXMarkDlg::SwMultiTOXMarkDlg( Window* pParent, SwTOXMgr& rTOXMgr ) : { aTOXLB.SetSelectHdl(LINK(this, SwMultiTOXMarkDlg, SelectHdl)); - USHORT nSize = rMgr.GetTOXMarkCount(); - for(USHORT i=0; i < nSize; ++i) + sal_uInt16 nSize = rMgr.GetTOXMarkCount(); + for(sal_uInt16 i=0; i < nSize; ++i) aTOXLB.InsertEntry(rMgr.GetTOXMark(i)->GetText()); aTOXLB.SelectEntryPos(0); diff --git a/sw/source/ui/index/multmrk.src b/sw/source/ui/index/multmrk.src index 83db407d1a..d5d11ed530 100644 --- a/sw/source/ui/index/multmrk.src +++ b/sw/source/ui/index/multmrk.src @@ -31,7 +31,7 @@ #include "helpid.h" ModalDialog DLG_MULTMRK { - HelpID = FN_EDIT_IDX_ENTRY_DLG ; + HelpID = CMD_FN_EDIT_IDX_ENTRY_DLG ; OutputSize = TRUE ; SVLook = TRUE ; Size = MAP_APPFONT ( 220 , 95 ) ; @@ -65,6 +65,7 @@ ModalDialog DLG_MULTMRK }; ListBox LB_TOX { + HelpID = "sw:ListBox:DLG_MULTMRK:LB_TOX"; Border = TRUE ; Pos = MAP_APPFONT ( 12 , 37 ) ; Size = MAP_APPFONT ( 100 , 49 ) ; diff --git a/sw/source/ui/index/swuiidxmrk.cxx b/sw/source/ui/index/swuiidxmrk.cxx index c7d1c331bd..d80617053e 100644 --- a/sw/source/ui/index/swuiidxmrk.cxx +++ b/sw/source/ui/index/swuiidxmrk.cxx @@ -72,7 +72,6 @@ #include <ndtxt.hxx> #include <breakit.hxx> #include <SwRewriter.hxx> -#include <undobj.hxx> #include <unomid.h> @@ -103,6 +102,7 @@ SwIndexMarkDlg::SwIndexMarkDlg(Window *pParent, const ResId& rResId, sal_Int32 _nOptionsId, SwWrtShell& rWrtShell ) : Window(pParent, rResId), + aIndexFL(this, SW_RES(FL_INDEX )), aTypeFT (this, SW_RES(LBL_INDEX )), aTypeDCB(this, SW_RES(DCB_INDEX )), aNewBT(this, SW_RES(BT_NEW )), @@ -129,7 +129,6 @@ SwIndexMarkDlg::SwIndexMarkDlg(Window *pParent, aSearchCaseSensitiveCB(this, SW_RES(CB_CASESENSITIVE )), aSearchCaseWordOnlyCB(this, SW_RES(CB_WORDONLY )), - aIndexFL(this, SW_RES(FL_INDEX )), aOKBT(this, SW_RES(BT_OK )), aCancelBT(this, SW_RES(BT_CANCEL )), @@ -146,15 +145,17 @@ SwIndexMarkDlg::SwIndexMarkDlg(Window *pParent, bNewMark(bNewDlg), bSelected(sal_False), - bPhoneticED0_ChangedByUser(FALSE), - bPhoneticED1_ChangedByUser(FALSE), - bPhoneticED2_ChangedByUser(FALSE), + bPhoneticED0_ChangedByUser(sal_False), + bPhoneticED1_ChangedByUser(sal_False), + bPhoneticED2_ChangedByUser(sal_False), nLangForPhoneticReading(2052), - bIsPhoneticReadingEnabled(FALSE), + bIsPhoneticReadingEnabled(sal_False), xExtendedIndexEntrySupplier(NULL), pTOXMgr(0), pSh(&rWrtShell) { + aNewBT.SetAccessibleRelationMemberOf(&aIndexFL); + if( SvtCJKOptions().IsCJKFontEnabled() ) { uno::Reference< lang::XMultiServiceFactory > xMSF = getProcessServiceFactory(); @@ -350,10 +351,10 @@ void SwIndexMarkDlg::UpdateLanguageDependenciesForPhoneticReading() //no phonetic reading if no global cjk support if( !xExtendedIndexEntrySupplier.is() ) { - bIsPhoneticReadingEnabled = FALSE; + bIsPhoneticReadingEnabled = sal_False; return; } - bIsPhoneticReadingEnabled = TRUE; + bIsPhoneticReadingEnabled = sal_True; //get the current language if(!bNewMark) //if dialog is opened to iterate existing marks @@ -378,8 +379,8 @@ void SwIndexMarkDlg::UpdateLanguageDependenciesForPhoneticReading() } else //if dialog is opened to create a new mark { - USHORT nScriptType = pSh->GetScriptType(); - USHORT nWhich; + sal_uInt16 nScriptType = pSh->GetScriptType(); + sal_uInt16 nWhich; switch(nScriptType) { case SCRIPTTYPE_ASIAN: nWhich = RES_CHRATR_CJK_LANGUAGE; break; @@ -483,7 +484,7 @@ void SwIndexMarkDlg::InsertUpdate() /*-------------------------------------------------------------------- Beschreibung: Marke einfuegen --------------------------------------------------------------------*/ -static void lcl_SelectSameStrings(SwWrtShell& rSh, BOOL bWordOnly, BOOL bCaseSensitive) +static void lcl_SelectSameStrings(SwWrtShell& rSh, sal_Bool bWordOnly, sal_Bool bCaseSensitive) { rSh.Push(); @@ -498,12 +499,12 @@ static void lcl_SelectSameStrings(SwWrtShell& rSh, BOOL bWordOnly, BOOL bCaseSen : TransliterationModules_IGNORE_CASE) ); rSh.ClearMark(); - BOOL bCancel; + sal_Bool bCancel; //todo/mba: assuming that notes should not be searched - BOOL bSearchInNotes = FALSE; + sal_Bool bSearchInNotes = sal_False; rSh.Find( aSearchOpt, bSearchInNotes, DOCPOS_START, DOCPOS_END, bCancel, - (FindRanges)(FND_IN_SELALL|FND_IN_BODYONLY), FALSE ); + (FindRanges)(FND_IN_SELALL|FND_IN_BODYONLY), sal_False ); } @@ -540,9 +541,9 @@ void SwIndexMarkDlg::InsertMark() } if (aOrgStr != aEntryED.GetText()) aDesc.SetAltStr(aEntryED.GetText()); - BOOL bApplyAll = aApplyToAllCB.IsChecked(); - BOOL bWordOnly = aSearchCaseWordOnlyCB.IsChecked(); - BOOL bCaseSensitive = aSearchCaseSensitiveCB.IsChecked(); + sal_Bool bApplyAll = aApplyToAllCB.IsChecked(); + sal_Bool bWordOnly = aSearchCaseWordOnlyCB.IsChecked(); + sal_Bool bCaseSensitive = aSearchCaseSensitiveCB.IsChecked(); pSh->StartAllAction(); // hier muessen alle gleichen Strings selektiert werden @@ -555,7 +556,7 @@ void SwIndexMarkDlg::InsertMark() SwTOXMgr aMgr(pSh); aMgr.InsertTOXMark(aDesc); if(bApplyAll) - pSh->Pop(FALSE); + pSh->Pop(sal_False); pSh->EndAllAction(); } @@ -773,11 +774,11 @@ IMPL_LINK( SwIndexMarkDlg, ModifyHdl, ListBox *, pBox ) } else //aEntryED !!aEntryED is not a ListBox but a Edit { - BOOL bHasText = (aEntryED.GetText().Len()>0); + sal_Bool bHasText = (aEntryED.GetText().Len()>0); if(!bHasText) { aPhoneticED0.SetText(aEmptyStr); - bPhoneticED0_ChangedByUser = FALSE; + bPhoneticED0_ChangedByUser = sal_False; } else if(!bPhoneticED0_ChangedByUser) aPhoneticED0.SetText(GetDefaultPhoneticReading(aEntryED.GetText())); @@ -980,15 +981,15 @@ IMPL_LINK( SwIndexMarkDlg, KeyDCBModifyHdl, ComboBox *, pBox ) aKey2DCB.SetText(aEmptyStr); aPhoneticED1.SetText(aEmptyStr); aPhoneticED2.SetText(aEmptyStr); - bPhoneticED1_ChangedByUser = FALSE; - bPhoneticED2_ChangedByUser = FALSE; + bPhoneticED1_ChangedByUser = sal_False; + bPhoneticED2_ChangedByUser = sal_False; } else { if(pBox->IsInDropDown()) { //reset bPhoneticED1_ChangedByUser if a completly new string is selected - bPhoneticED1_ChangedByUser = FALSE; + bPhoneticED1_ChangedByUser = sal_False; } if(!bPhoneticED1_ChangedByUser) aPhoneticED1.SetText(GetDefaultPhoneticReading(pBox->GetText())); @@ -1001,14 +1002,14 @@ IMPL_LINK( SwIndexMarkDlg, KeyDCBModifyHdl, ComboBox *, pBox ) if(!(pBox->GetText().Len()>0)) { aPhoneticED2.SetText(aEmptyStr); - bPhoneticED2_ChangedByUser = FALSE; + bPhoneticED2_ChangedByUser = sal_False; } else { if(pBox->IsInDropDown()) { //reset bPhoneticED1_ChangedByUser if a completly new string is selected - bPhoneticED2_ChangedByUser = FALSE; + bPhoneticED2_ChangedByUser = sal_False; } if(!bPhoneticED2_ChangedByUser) aPhoneticED2.SetText(GetDefaultPhoneticReading(pBox->GetText())); @@ -1041,7 +1042,7 @@ void SwIndexMarkDlg::ReInitDlg(SwWrtShell& rWrtShell, SwTOXMark* pCurTOXMark) pTOXMgr = new SwTOXMgr(pSh); if(pCurTOXMark) { - for(USHORT i = 0; i < pTOXMgr->GetTOXMarkCount(); i++) + for(sal_uInt16 i = 0; i < pTOXMgr->GetTOXMarkCount(); i++) if(pTOXMgr->GetTOXMark(i) == pCurTOXMark) { pTOXMgr->SetCurTOXMark(i); @@ -1129,7 +1130,7 @@ public: struct TextInfo { sal_uInt16 nToxField; - sal_uInt16 nHelpId; + const char* pHelpId; }; static const TextInfo aTextInfoArr[] = @@ -1640,7 +1641,7 @@ SwCreateAuthEntryDlg_Impl::SwCreateAuthEntryDlg_Impl(Window* pParent, pTypeListBox->SetPosPixel(bLeft ? aTR1 : aTR2); pTypeListBox->Show(); pTypeListBox->SetSelectHdl(LINK(this, SwCreateAuthEntryDlg_Impl, EnableHdl)); - pTypeListBox->SetHelpId(aCurInfo.nHelpId); + pTypeListBox->SetHelpId(aCurInfo.pHelpId); } else if(AUTH_FIELD_IDENTIFIER == aCurInfo.nToxField && !m_bNewEntryMode) @@ -1668,7 +1669,7 @@ SwCreateAuthEntryDlg_Impl::SwCreateAuthEntryDlg_Impl(Window* pParent, pIdentifierBox->SetSizePixel(aTmp); pIdentifierBox->SetPosPixel(bLeft ? aTR1 : aTR2); pIdentifierBox->Show(); - pIdentifierBox->SetHelpId(aCurInfo.nHelpId); + pIdentifierBox->SetHelpId(aCurInfo.pHelpId); } else { @@ -1679,7 +1680,7 @@ SwCreateAuthEntryDlg_Impl::SwCreateAuthEntryDlg_Impl(Window* pParent, pEdits[nIndex]->SetPosPixel(bLeft ? aTR1 : aTR2); pEdits[nIndex]->SetText(pFields[aCurInfo.nToxField]); pEdits[nIndex]->Show(); - pEdits[nIndex]->SetHelpId(aCurInfo.nHelpId); + pEdits[nIndex]->SetHelpId(aCurInfo.pHelpId); if(AUTH_FIELD_IDENTIFIER == aCurInfo.nToxField) { pEdits[nIndex]->SetModifyHdl(LINK(this, SwCreateAuthEntryDlg_Impl, ShortNameHdl)); diff --git a/sw/source/ui/index/toxmgr.cxx b/sw/source/ui/index/toxmgr.cxx index 251b4f11b7..e91c648505 100644 --- a/sw/source/ui/index/toxmgr.cxx +++ b/sw/source/ui/index/toxmgr.cxx @@ -28,6 +28,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" + #include <wrtsh.hxx> #include <shellres.hxx> #include <swwait.hxx> @@ -35,6 +36,7 @@ #include <toxmgr.hxx> #include <crsskip.hxx> #include <doc.hxx> +#include <IDocumentUndoRedo.hxx> #include <swundo.hxx> #include <globals.hrc> @@ -55,13 +57,13 @@ SwTOXMgr::SwTOXMgr(SwWrtShell* pShell): --------------------------------------------------------------------*/ -USHORT SwTOXMgr::GetTOXMarks() +sal_uInt16 SwTOXMgr::GetTOXMarks() { return pSh->GetCurTOXMarks(aCurMarks); } -SwTOXMark* SwTOXMgr::GetTOXMark(USHORT nId) +SwTOXMark* SwTOXMgr::GetTOXMark(sal_uInt16 nId) { if(aCurMarks.Count() > 0) return aCurMarks[nId]; @@ -95,7 +97,7 @@ void SwTOXMgr::InsertTOXMark(const SwTOXMarkDescription& rDesc) OSL_ENSURE(rDesc.GetLevel() > 0 && rDesc.GetLevel() <= MAXLEVEL, "invalid InsertTOCMark level"); pMark = new SwTOXMark(pSh->GetTOXType(TOX_CONTENT, 0)); - pMark->SetLevel( static_cast< USHORT >(rDesc.GetLevel()) ); + pMark->SetLevel( static_cast< sal_uInt16 >(rDesc.GetLevel()) ); if(rDesc.GetAltStr()) pMark->SetAlternativeText(*rDesc.GetAltStr()); @@ -129,10 +131,10 @@ void SwTOXMgr::InsertTOXMark(const SwTOXMarkDescription& rDesc) { OSL_ENSURE(rDesc.GetLevel() > 0 && rDesc.GetLevel() <= MAXLEVEL, "invalid InsertTOCMark level"); - USHORT nId = rDesc.GetTOUName() ? + sal_uInt16 nId = rDesc.GetTOUName() ? GetUserTypeID(*rDesc.GetTOUName()) : 0; pMark = new SwTOXMark(pSh->GetTOXType(TOX_USER, nId)); - pMark->SetLevel( static_cast< USHORT >(rDesc.GetLevel()) ); + pMark->SetLevel( static_cast< sal_uInt16 >(rDesc.GetLevel()) ); if(rDesc.GetAltStr()) pMark->SetAlternativeText(*rDesc.GetAltStr()); @@ -192,13 +194,13 @@ void SwTOXMgr::UpdateTOXMark(const SwTOXMarkDescription& rDesc) pCurTOXMark->SetMainEntry(rDesc.IsMainEntry()); } else - pCurTOXMark->SetLevel( static_cast< USHORT >(rDesc.GetLevel()) ); + pCurTOXMark->SetLevel( static_cast< sal_uInt16 >(rDesc.GetLevel()) ); if(rDesc.GetAltStr()) { // JP 26.08.96: Bug 30344 - entweder der Text aus dem Doc oder // ein Alternativ-Text, beides gibts nicht! - BOOL bReplace = pCurTOXMark->IsAlternativeText(); + sal_Bool bReplace = pCurTOXMark->IsAlternativeText(); if( bReplace ) pCurTOXMark->SetAlternativeText( *rDesc.GetAltStr() ); else @@ -216,7 +218,7 @@ void SwTOXMgr::UpdateTOXMark(const SwTOXMarkDescription& rDesc) // Bug 36207 pCurTOXMark zeigt hier in den Wald! if(!pCurTOXMark) { - pSh->Left(CRSR_SKIP_CHARS, FALSE, 1, FALSE ); + pSh->Left(CRSR_SKIP_CHARS, sal_False, 1, sal_False ); pSh->GetCurTOXMarks(aCurMarks); SetCurTOXMark(0); } @@ -228,10 +230,10 @@ void SwTOXMgr::UpdateTOXMark(const SwTOXMarkDescription& rDesc) --------------------------------------------------------------------*/ -USHORT SwTOXMgr::GetUserTypeID(const String& rStr) +sal_uInt16 SwTOXMgr::GetUserTypeID(const String& rStr) { - USHORT nSize = pSh->GetTOXTypeCount(TOX_USER); - for(USHORT i=0; i < nSize; ++i) + sal_uInt16 nSize = pSh->GetTOXTypeCount(TOX_USER); + for(sal_uInt16 i=0; i < nSize; ++i) { const SwTOXType* pTmp = pSh->GetTOXType(TOX_USER, i); if(pTmp && pTmp->GetTypeName() == rStr) @@ -247,7 +249,7 @@ USHORT SwTOXMgr::GetUserTypeID(const String& rStr) --------------------------------------------------------------------*/ -void SwTOXMgr::NextTOXMark(BOOL bSame) +void SwTOXMgr::NextTOXMark(sal_Bool bSame) { OSL_ENSURE(pCurTOXMark, "no current TOXMark"); if( pCurTOXMark ) @@ -258,7 +260,7 @@ void SwTOXMgr::NextTOXMark(BOOL bSame) } -void SwTOXMgr::PrevTOXMark(BOOL bSame) +void SwTOXMgr::PrevTOXMark(sal_Bool bSame) { OSL_ENSURE(pCurTOXMark, "no current TOXMark"); if( pCurTOXMark ) @@ -276,22 +278,22 @@ const SwTOXBase* SwTOXMgr::GetCurTOX() return pSh->GetCurTOX(); } -const SwTOXType* SwTOXMgr::GetTOXType(TOXTypes eTyp, USHORT nId) const +const SwTOXType* SwTOXMgr::GetTOXType(TOXTypes eTyp, sal_uInt16 nId) const { return pSh->GetTOXType(eTyp, nId); } -void SwTOXMgr::SetCurTOXMark(USHORT nId) +void SwTOXMgr::SetCurTOXMark(sal_uInt16 nId) { pCurTOXMark = (nId < aCurMarks.Count()) ? aCurMarks[nId] : 0; } -BOOL SwTOXMgr::UpdateOrInsertTOX(const SwTOXDescription& rDesc, +sal_Bool SwTOXMgr::UpdateOrInsertTOX(const SwTOXDescription& rDesc, SwTOXBase** ppBase, const SfxItemSet* pSet) { - SwWait aWait( *pSh->GetView().GetDocShell(), TRUE ); - BOOL bRet = TRUE; + SwWait aWait( *pSh->GetView().GetDocShell(), sal_True ); + sal_Bool bRet = sal_True; const SwTOXBase* pCurTOX = ppBase && *ppBase ? *ppBase : GetCurTOX(); SwTOXBase* pTOX = (SwTOXBase*)pCurTOX; @@ -336,9 +338,9 @@ BOOL SwTOXMgr::UpdateOrInsertTOX(const SwTOXDescription& rDesc, { if(!pCurTOX || (ppBase && !(*ppBase))) { - USHORT nPos = 0; - USHORT nSize = pSh->GetTOXTypeCount(eCurTOXType); - for(USHORT i=0; rDesc.GetTOUName() && i < nSize; ++i) + sal_uInt16 nPos = 0; + sal_uInt16 nSize = pSh->GetTOXTypeCount(eCurTOXType); + for(sal_uInt16 i=0; rDesc.GetTOUName() && i < nSize; ++i) { const SwTOXType* pType = pSh->GetTOXType(TOX_USER, i); if(pType->GetTypeName() == *rDesc.GetTOUName()) { nPos = i; @@ -409,14 +411,14 @@ BOOL SwTOXMgr::UpdateOrInsertTOX(const SwTOXDescription& rDesc, OSL_ENSURE(pNewTOX, "no TOXBase created!" ); if(!pNewTOX) - return FALSE; + return sal_False; pNewTOX->SetFromChapter(rDesc.IsFromChapter()); pNewTOX->SetSequenceName(rDesc.GetSequenceName()); pNewTOX->SetCaptionDisplay(rDesc.GetCaptionDisplay()); pNewTOX->SetProtected(rDesc.IsReadonly()); - for(USHORT nLevel = 0; nLevel < MAXLEVEL; nLevel++) + for(sal_uInt16 nLevel = 0; nLevel < MAXLEVEL; nLevel++) pNewTOX->SetStyleNames(rDesc.GetStyleNames(nLevel), nLevel); if(rDesc.GetTitle()) @@ -442,12 +444,14 @@ BOOL SwTOXMgr::UpdateOrInsertTOX(const SwTOXDescription& rDesc, { SwDoc * pDoc = pSh->GetDoc(); - if (pDoc->DoesUndo()) + if (pDoc->GetIDocumentUndoRedo().DoesUndo()) { if (pNewTOX != NULL) - pDoc->DelAllUndoObj(); + { + pDoc->GetIDocumentUndoRedo().DelAllUndoObj(); + } - pDoc->StartUndo(UNDO_TOXCHANGE, NULL); + pDoc->GetIDocumentUndoRedo().StartUndo(UNDO_TOXCHANGE, NULL); } if (pNewTOX != NULL) // => pTOX != NULL @@ -455,12 +459,14 @@ BOOL SwTOXMgr::UpdateOrInsertTOX(const SwTOXDescription& rDesc, bRet = pSh->UpdateTableOf(*pTOX, pSet); - if (pDoc->DoesUndo()) + if (pDoc->GetIDocumentUndoRedo().DoesUndo()) { - pDoc->EndUndo(UNDO_TOXCHANGE, NULL); + pDoc->GetIDocumentUndoRedo().EndUndo(UNDO_TOXCHANGE, NULL); if (pNewTOX == NULL) - pDoc->DelAllUndoObj(); + { + pDoc->GetIDocumentUndoRedo().DelAllUndoObj(); + } } } @@ -472,7 +478,7 @@ void SwTOXDescription::SetSortKeys(SwTOXSortKey eKey1, SwTOXSortKey eKey3) { SwTOXSortKey aArr[3]; - USHORT nPos = 0; + sal_uInt16 nPos = 0; if(AUTH_FIELD_END > eKey1.eField) aArr[nPos++] = eKey1; if(AUTH_FIELD_END > eKey2.eField) @@ -487,7 +493,7 @@ void SwTOXDescription::SetSortKeys(SwTOXSortKey eKey1, void SwTOXDescription::ApplyTo(SwTOXBase& rTOXBase) { - for(USHORT i = 0; i < MAXLEVEL; i++) + for(sal_uInt16 i = 0; i < MAXLEVEL; i++) rTOXBase.SetStyleNames(GetStyleNames(i), i); rTOXBase.SetTitle(GetTitle() ? *GetTitle() : aEmptyStr); rTOXBase.SetCreate(GetContentOptions()); diff --git a/sw/source/ui/lingu/hhcwrp.cxx b/sw/source/ui/lingu/hhcwrp.cxx index 15177d84bb..956be1f865 100644 --- a/sw/source/ui/lingu/hhcwrp.cxx +++ b/sw/source/ui/lingu/hhcwrp.cxx @@ -217,10 +217,10 @@ void SwHHCWrapper::SelectNewUnit_impl( sal_Int32 nUnitStart, sal_Int32 nUnitEnd pCrsr->DeleteMark(); rWrtShell.Right( CRSR_SKIP_CHARS, /*bExpand*/ sal_False, - (USHORT) (nUnitOffset + nUnitStart), sal_True ); + (sal_uInt16) (nUnitOffset + nUnitStart), sal_True ); pCrsr->SetMark(); rWrtShell.Right( CRSR_SKIP_CHARS, /*bExpand*/ sal_True, - (USHORT) (nUnitEnd - nUnitStart), sal_True ); + (sal_uInt16) (nUnitEnd - nUnitStart), sal_True ); // end selection now. Otherwise SHIFT+HOME (extending the selection) // won't work when the dialog is closed without any replacement. // (see #116346#) @@ -491,7 +491,7 @@ void SwHHCWrapper::ReplaceUnit( // of the flag. rWrtShell.EndSelect(); - rWrtShell.Left( 0, TRUE, aNewOrigText.Len(), TRUE, TRUE ); + rWrtShell.Left( 0, sal_True, aNewOrigText.Len(), sal_True, sal_True ); } pRuby->SetPosition( bRubyBelow ); diff --git a/sw/source/ui/lingu/makefile.mk b/sw/source/ui/lingu/makefile.mk deleted file mode 100644 index 0abd0c319a..0000000000 --- a/sw/source/ui/lingu/makefile.mk +++ /dev/null @@ -1,56 +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=lingu - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -EXCEPTIONSFILES= \ - $(SLO)$/hhcwrp.obj \ - $(SLO)$/hyp.obj \ - $(SLO)$/olmenu.obj \ - $(SLO)$/sdrhhcwrap.obj - -SLOFILES = \ - $(EXCEPTIONSFILES) - -SRS1NAME=$(TARGET) -SRC1FILES = \ - olmenu.src - -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/ui/lingu/olmenu.cxx b/sw/source/ui/lingu/olmenu.cxx index ccacbc595d..88147f35df 100644 --- a/sw/source/ui/lingu/olmenu.cxx +++ b/sw/source/ui/lingu/olmenu.cxx @@ -48,7 +48,6 @@ #include "swtypes.hxx" #include "swundo.hxx" #include "uitool.hxx" -#include "undobj.hxx" #include "unomid.h" #include "view.hxx" #include "viewopt.hxx" @@ -108,7 +107,7 @@ using namespace ::com::sun::star; using ::rtl::OUString; -extern void lcl_CharDialog( SwWrtShell &rWrtSh, BOOL bUseDialog, USHORT nSlot,const SfxItemSet *pArgs, SfxRequest *pReq ); +extern void lcl_CharDialog( SwWrtShell &rWrtSh, sal_Bool bUseDialog, sal_uInt16 nSlot,const SfxItemSet *pArgs, SfxRequest *pReq ); /*-------------------------------------------------------------------------- @@ -176,10 +175,10 @@ LanguageType lcl_CheckLanguage( lang::Locale a3( SvxCreateLocale( aLangList[3] ) ); #endif - INT32 nCount = SAL_N_ELEMENTS(aLangList); - for (INT32 i = 0; i < nCount; i++) + sal_Int32 nCount = SAL_N_ELEMENTS(aLangList); + for (sal_Int32 i = 0; i < nCount; i++) { - INT16 nTmpLang = aLangList[i]; + sal_Int16 nTmpLang = aLangList[i]; if (nTmpLang != LANGUAGE_NONE && nTmpLang != LANGUAGE_DONTKNOW) { if (xSpell->hasLanguage( nTmpLang ) && @@ -213,7 +212,7 @@ inline bool lcl_checkScriptType( sal_Int16 nScriptType, LanguageType nLang ) void SwSpellPopup::fillLangPopupMenu( PopupMenu *pPopupMenu, - USHORT nLangItemIdStart, + sal_uInt16 nLangItemIdStart, uno::Sequence< OUString > aSeq, SwWrtShell* pWrtSh, std::map< sal_Int16, ::rtl::OUString > &rLangTable ) @@ -227,7 +226,7 @@ void SwSpellPopup::fillLangPopupMenu( std::set< OUString > aLangItems; OUString aCurLang( aSeq[0] ); - USHORT nScriptType = static_cast< sal_Int16 >(aSeq[1].toInt32()); + sal_uInt16 nScriptType = static_cast< sal_Int16 >(aSeq[1].toInt32()); OUString aKeyboardLang( aSeq[2] ); OUString aGuessedTextLang( aSeq[3] ); @@ -283,7 +282,7 @@ void SwSpellPopup::fillLangPopupMenu( uno::Sequence< lang::Locale > rLocales( xDocumentLanguages->getDocumentLanguages( nScriptType, nMaxCount ) ); if (rLocales.getLength() > 0) { - for (USHORT i = 0; i < rLocales.getLength(); ++i) + for (sal_uInt16 i = 0; i < rLocales.getLength(); ++i) { if (aLangItems.size() == (size_t)nMaxCount) break; @@ -295,7 +294,7 @@ void SwSpellPopup::fillLangPopupMenu( } - USHORT nItemId = nLangItemIdStart; + sal_uInt16 nItemId = nLangItemIdStart; const OUString sAsterix(RTL_CONSTASCII_USTRINGPARAM("*")); // multiple languages in current selection const OUString sEmpty; // 'no language found' from language guessing std::set< OUString >::const_iterator it; @@ -312,7 +311,7 @@ void SwSpellPopup::fillLangPopupMenu( if (aEntryTxt == aCurLang) { //make a check mark for the current language - pPopupMenu->CheckItem( nItemId, TRUE ); + pPopupMenu->CheckItem( nItemId, sal_True ); } rLangTable[ nItemId ] = aEntryTxt; ++nItemId; @@ -423,9 +422,9 @@ SwSpellPopup::SwSpellPopup( InsertSeparator(0); bEnable = sal_True; - USHORT nAutoCorrItemId = MN_AUTOCORR_START; - USHORT nItemId = MN_SUGGESTION_START; - for (USHORT i = 0; i < nStringCount; ++i) + sal_uInt16 nAutoCorrItemId = MN_AUTOCORR_START; + sal_uInt16 nItemId = MN_SUGGESTION_START; + for (sal_uInt16 i = 0; i < nStringCount; ++i) { const String aEntry = aSuggestions[ i ]; InsertItem( nItemId, aEntry, 0, i ); @@ -444,7 +443,7 @@ SwSpellPopup::SwSpellPopup( OUString aIgnoreSelection( String( SW_RES( STR_IGNORE_SELECTION ) ) ); OUString aSpellingAndGrammar = RetrieveLabelFromCommand( C2U(".uno:SpellingAndGrammarDialog") ); SetItemText( MN_SPELLING_DLG, aSpellingAndGrammar ); - USHORT nItemPos = GetItemPos( MN_IGNORE_WORD ); + sal_uInt16 nItemPos = GetItemPos( MN_IGNORE_WORD ); InsertItem( MN_IGNORE_SELECTION, aIgnoreSelection, 0, nItemPos ); SetHelpId( MN_IGNORE_SELECTION, HID_LINGU_IGNORE_SELECTION); @@ -469,7 +468,7 @@ SwSpellPopup::SwSpellPopup( pMenu = GetPopupMenu(MN_ADD_TO_DIC); pMenu->SetMenuFlags(MENU_FLAG_NOAUTOMNEMONICS); //! necessary to retrieve the correct dictionary name in 'Execute' below - bEnable = FALSE; // enable MN_ADD_TO_DIC? + bEnable = sal_False; // enable MN_ADD_TO_DIC? uno::Reference< linguistic2::XDictionaryList > xDicList( SvxGetDictionaryList() ); if (xDicList.is()) { @@ -482,10 +481,10 @@ SwSpellPopup::SwSpellPopup( aDics = xDicList->getDictionaries(); const uno::Reference< linguistic2::XDictionary > *pDic = aDics.getConstArray(); - USHORT nDicCount = static_cast< USHORT >(aDics.getLength()); + sal_uInt16 nDicCount = static_cast< sal_uInt16 >(aDics.getLength()); - USHORT nItemId = MN_DICTIONARIES_START; - for( USHORT i = 0; i < nDicCount; i++ ) + sal_uInt16 nItemId = MN_DICTIONARIES_START; + for( sal_uInt16 i = 0; i < nDicCount; i++ ) { uno::Reference< linguistic2::XDictionary > xDicTmp( pDic[i], uno::UNO_QUERY ); if (!xDicTmp.is() || SvxGetIgnoreAllList() == xDicTmp) @@ -563,7 +562,7 @@ SwSpellPopup::SwSpellPopup( ////////////////////////////////////////////////////////////////////////////////// - RemoveDisabledEntries( TRUE, TRUE ); + RemoveDisabledEntries( sal_True, sal_True ); } /*-------------------------------------------------------------------------- @@ -584,7 +583,7 @@ aInfo16( SW_RES(IMG_INFO_16) ) { nCheckedLanguage = SvxLocaleToLanguage( rResult.aLocale ); - USHORT nPos = 0; + sal_uInt16 nPos = 0; OUString aMessageText( rResult.aErrors[ nErrorInResult ].aShortComment ); InsertSeparator( nPos++ ); InsertItem( MN_SHORT_COMMENT, aMessageText, MIB_NOSELECT, nPos++ ); @@ -605,7 +604,7 @@ aInfo16( SW_RES(IMG_INFO_16) ) aImage = Image( lcl_GetImageFromPngUrl( aSuggestionImageUrl ) ); } - USHORT nItemId = MN_SUGGESTION_START; + sal_uInt16 nItemId = MN_SUGGESTION_START; for (sal_uInt16 i = 0; i < nStringCount; ++i) { const String aEntry = aSuggestions[ i ]; @@ -622,7 +621,7 @@ aInfo16( SW_RES(IMG_INFO_16) ) OUString aIgnoreSelection( String( SW_RES( STR_IGNORE_SELECTION ) ) ); OUString aSpellingAndGrammar = RetrieveLabelFromCommand( C2U(".uno:SpellingAndGrammarDialog") ); SetItemText( MN_SPELLING_DLG, aSpellingAndGrammar ); - USHORT nItemPos = GetItemPos( MN_IGNORE_WORD ); + sal_uInt16 nItemPos = GetItemPos( MN_IGNORE_WORD ); InsertItem( MN_IGNORE_SELECTION, aIgnoreSelection, 0, nItemPos ); SetHelpId( MN_IGNORE_SELECTION, HID_LINGU_IGNORE_SELECTION); @@ -689,7 +688,7 @@ aInfo16( SW_RES(IMG_INFO_16) ) ////////////////////////////////////////////////////////////////////////////////// - RemoveDisabledEntries( TRUE, TRUE ); + RemoveDisabledEntries( sal_True, sal_True ); } /*-------------------------------------------------------------------------- @@ -702,7 +701,7 @@ sal_uInt16 SwSpellPopup::Execute( const Rectangle& rWordPos, Window* pWin ) return nRet; } -void SwSpellPopup::Execute( USHORT nId ) +void SwSpellPopup::Execute( sal_uInt16 nId ) { if (nId == USHRT_MAX) return; @@ -768,7 +767,7 @@ void SwSpellPopup::Execute( USHORT nId ) of temporary auto correction is now undoable two and must reside in the same undo group.*/ pSh->EndAction(); - pSh->EndUndo(UNDO_UI_REPLACE); + pSh->EndUndo(); pSh->SetInsMode( bOldIns ); } @@ -779,7 +778,7 @@ void SwSpellPopup::Execute( USHORT nId ) { SvtLinguConfig().SetProperty( A2OU( UPN_IS_GRAMMAR_INTERACTIVE ), uno::makeAny( sal_True )); } - pSh->Left(CRSR_SKIP_CHARS, FALSE, 1, FALSE ); + pSh->Left(CRSR_SKIP_CHARS, sal_False, 1, sal_False ); { uno::Reference<linguistic2::XDictionaryList> xDictionaryList( SvxGetDictionaryList() ); SvxDicListChgClamp aClamp( xDictionaryList ); @@ -813,7 +812,7 @@ void SwSpellPopup::Execute( USHORT nId ) if (xDic.is()) { - INT16 nAddRes = linguistic::AddEntryToDic( xDic, aWord, FALSE, aEmptyStr, LANGUAGE_NONE ); + sal_Int16 nAddRes = linguistic::AddEntryToDic( xDic, aWord, sal_False, aEmptyStr, LANGUAGE_NONE ); // save modified user-dictionary if it is persistent uno::Reference< frame::XStorable > xSavDic( xDic, uno::UNO_QUERY ); if (xSavDic.is()) @@ -867,7 +866,7 @@ void SwSpellPopup::Execute( USHORT nId ) pSh->Push(); // save cursor SwLangHelper::SelectCurrentPara( *pSh ); SwLangHelper::SetLanguage( *pSh, aNewLangTxt, true, aCoreSet ); - pSh->Pop( FALSE ); // restore cursor + pSh->Pop( sal_False ); // restore cursor } else if (nId == MN_SET_PARA_NONE) { @@ -875,7 +874,7 @@ void SwSpellPopup::Execute( USHORT nId ) pSh->Push(); // save cursor SwLangHelper::SelectCurrentPara( *pSh ); SwLangHelper::SetLanguage_None( *pSh, true, aCoreSet ); - pSh->Pop( FALSE ); // restore cursor + pSh->Pop( sal_False ); // restore cursor } else if (nId == MN_SET_PARA_RESET) { @@ -883,7 +882,7 @@ void SwSpellPopup::Execute( USHORT nId ) pSh->Push(); // save cursor SwLangHelper::SelectCurrentPara( *pSh ); SwLangHelper::ResetLanguages( *pSh, true ); - pSh->Pop( FALSE ); // restore cursor + pSh->Pop( sal_False ); // restore cursor } else if (nId == MN_SET_PARA_MORE) { @@ -891,7 +890,7 @@ void SwSpellPopup::Execute( USHORT nId ) SwLangHelper::SelectCurrentPara( *pSh ); //Open Format/Character Dialog lcl_CharDialog( *pSh, true, nId, 0, 0 ); - pSh->Pop( FALSE ); // restore cursor + pSh->Pop( sal_False ); // restore cursor } } diff --git a/sw/source/ui/makefile.mk b/sw/source/ui/makefile.mk deleted file mode 100644 index b331a2a007..0000000000 --- a/sw/source/ui/makefile.mk +++ /dev/null @@ -1,101 +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=ui - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -.IF "$(GUI)" != "OS2" -.IF "$(GUI)" != "WNT" -.IF "$(COM)" != "BLC" -.IF "$(COM)" != "WTC" -LIBFLAGS=/NOI /NOE /PAGE:256 -.ENDIF -.ENDIF -.ENDIF -.ENDIF - -# --- Files -------------------------------------------------------- - -# andere Label als Verzeichnisnamen fuer VC++/NT - -SUBLIBS1= \ - $(SLB)$/app.lib \ - $(SLB)$/cctrl.lib \ - $(SLB)$/chrdlg.lib \ - $(SLB)$/config.lib \ - $(SLB)$/dbui.lib \ - $(SLB)$/dialog.lib \ - $(SLB)$/dochdl.lib \ - $(SLB)$/docvw.lib \ - $(SLB)$/envelp.lib \ - $(SLB)$/fldui.lib \ - $(SLB)$/frmdlg.lib \ - $(SLB)$/globdoc.lib - -SUBLIBS2= \ - $(SLB)$/index.lib \ - $(SLB)$/lingu.lib \ - $(SLB)$/misc.lib \ - $(SLB)$/ribbar.lib \ - $(SLB)$/shells.lib \ - $(SLB)$/smartmenu.lib \ - $(SLB)$/table.lib \ - $(SLB)$/unoidl.lib \ - $(SLB)$/utlui.lib \ - $(SLB)$/web.lib \ - $(SLB)$/uiview.lib \ - $(SLB)$/wrtsh.lib - -# ----------------------------------------------------------- - -################################################################ - -LIB1TARGET=$(SLB)$/ui1.lib -LIB1FILES= \ - $(SUBLIBS1) - -LIB2TARGET=$(SLB)$/ui2.lib -LIB2FILES= \ - $(SUBLIBS2) - -.INCLUDE : target.mk - -################################################################ - -kill: - @$(RM) $(SLB)$/ui.lst - @$(RM) $(SLB)$/ui.lib - - diff --git a/sw/source/ui/misc/bookmark.cxx b/sw/source/ui/misc/bookmark.cxx index 2851f6735e..49d2c40eaa 100644 --- a/sw/source/ui/misc/bookmark.cxx +++ b/sw/source/ui/misc/bookmark.cxx @@ -52,17 +52,17 @@ const String BookmarkCombo::aForbiddenChars = String::CreateFromAscii("/\\@:*?\" IMPL_LINK( SwInsertBookmarkDlg, ModifyHdl, BookmarkCombo *, pBox ) { - BOOL bSelEntries = pBox->GetSelectEntryCount() != 0; + sal_Bool bSelEntries = pBox->GetSelectEntryCount() != 0; // if a string has been pasted from the clipboard then // there may be illegal characters in the box if(!bSelEntries) { String sTmp = pBox->GetText(); - USHORT nLen = sTmp.Len(); + sal_uInt16 nLen = sTmp.Len(); String sMsg; - for(USHORT i = 0; i < BookmarkCombo::aForbiddenChars.Len(); i++) + for(sal_uInt16 i = 0; i < BookmarkCombo::aForbiddenChars.Len(); i++) { - USHORT nTmpLen = sTmp.Len(); + sal_uInt16 nTmpLen = sTmp.Len(); sTmp.EraseAllChars(BookmarkCombo::aForbiddenChars.GetChar(i)); if(sTmp.Len() != nTmpLen) sMsg += BookmarkCombo::aForbiddenChars.GetChar(i); @@ -91,11 +91,11 @@ IMPL_LINK( SwInsertBookmarkDlg, DeleteHdl, Button *, EMPTYARG ) { // Textmarken aus der ComboBox entfernen - for (USHORT i = aBookmarkBox.GetSelectEntryCount(); i; i-- ) + for (sal_uInt16 i = aBookmarkBox.GetSelectEntryCount(); i; i-- ) aBookmarkBox.RemoveEntry(aBookmarkBox.GetSelectEntryPos(i - 1)); aBookmarkBox.SetText(aEmptyStr); - aDeleteBtn.Enable(FALSE); // keine weiteren Eintraege vorhanden + aDeleteBtn.Enable(sal_False); // keine weiteren Eintraege vorhanden aOkBtn.Enable(); // Im OK Handler wird geloescht return 0; @@ -110,7 +110,7 @@ void SwInsertBookmarkDlg::Apply() { //at first remove deleted bookmarks to prevent multiple bookmarks with the same //name - for (USHORT nCount = aBookmarkBox.GetRemovedCount(); nCount > 0; nCount--) + for (sal_uInt16 nCount = aBookmarkBox.GetRemovedCount(); nCount > 0; nCount--) { String sRemoved = aBookmarkBox.GetRemovedEntry( nCount -1 ).GetName(); IDocumentMarkAccess* const pMarkAccess = rSh.getIDocumentMarkAccess(); @@ -121,7 +121,7 @@ void SwInsertBookmarkDlg::Apply() } // Textmarke einfuegen - USHORT nLen = aBookmarkBox.GetText().Len(); + sal_uInt16 nLen = aBookmarkBox.GetText().Len(); SwBoxEntry aTmpEntry(aBookmarkBox.GetText(), 0 ); if ( nLen && (aBookmarkBox.GetEntryPos(aTmpEntry) == COMBOBOX_ENTRY_NOTFOUND) ) @@ -145,9 +145,8 @@ void SwInsertBookmarkDlg::Apply() SwInsertBookmarkDlg::SwInsertBookmarkDlg( Window *pParent, SwWrtShell &rS, SfxRequest& rRequest ) : SvxStandardDialog(pParent,SW_RES(DLG_INSERT_BOOKMARK)), - - aBookmarkBox(this,SW_RES(CB_BOOKMARK)), aBookmarkFl(this,SW_RES(FL_BOOKMARK)), + aBookmarkBox(this,SW_RES(CB_BOOKMARK)), aOkBtn(this,SW_RES(BT_OK)), aCancelBtn(this,SW_RES(BT_CANCEL)), aDeleteBtn(this,SW_RES(BT_DELETE)), @@ -155,14 +154,14 @@ SwInsertBookmarkDlg::SwInsertBookmarkDlg( Window *pParent, SwWrtShell &rS, SfxRe rReq( rRequest ) { aBookmarkBox.SetModifyHdl(LINK(this, SwInsertBookmarkDlg, ModifyHdl)); - aBookmarkBox.EnableMultiSelection(TRUE); - aBookmarkBox.EnableAutocomplete( TRUE, TRUE ); + aBookmarkBox.EnableMultiSelection(sal_True); + aBookmarkBox.EnableAutocomplete( sal_True, sal_True ); aDeleteBtn.SetClickHdl(LINK(this, SwInsertBookmarkDlg, DeleteHdl)); // Combobox mit vorhandenen Bookmarks fuellen IDocumentMarkAccess* const pMarkAccess = rSh.getIDocumentMarkAccess(); - USHORT nId = 0; + sal_uInt16 nId = 0; for( IDocumentMarkAccess::const_iterator_t ppBookmark = pMarkAccess->getBookmarksBegin(); ppBookmark != pMarkAccess->getBookmarksEnd(); ppBookmark++) @@ -183,21 +182,21 @@ BookmarkCombo::BookmarkCombo( Window* pWin, const ResId& rResId ) : { } -USHORT BookmarkCombo::GetFirstSelEntryPos() const +sal_uInt16 BookmarkCombo::GetFirstSelEntryPos() const { return GetSelEntryPos(0); } -USHORT BookmarkCombo::GetNextSelEntryPos(USHORT nPos) const +sal_uInt16 BookmarkCombo::GetNextSelEntryPos(sal_uInt16 nPos) const { return GetSelEntryPos(nPos + 1); } -USHORT BookmarkCombo::GetSelEntryPos(USHORT nPos) const +sal_uInt16 BookmarkCombo::GetSelEntryPos(sal_uInt16 nPos) const { sal_Unicode cSep = GetMultiSelectionSeparator(); - USHORT nCnt = GetText().GetTokenCount(cSep); + sal_uInt16 nCnt = GetText().GetTokenCount(cSep); for (; nPos < nCnt; nPos++) { @@ -211,11 +210,11 @@ USHORT BookmarkCombo::GetSelEntryPos(USHORT nPos) const return COMBOBOX_ENTRY_NOTFOUND; } -USHORT BookmarkCombo::GetSelectEntryCount() const +sal_uInt16 BookmarkCombo::GetSelectEntryCount() const { - USHORT nCnt = 0; + sal_uInt16 nCnt = 0; - USHORT nPos = GetFirstSelEntryPos(); + sal_uInt16 nPos = GetFirstSelEntryPos(); while (nPos != COMBOBOX_ENTRY_NOTFOUND) { nPos = GetNextSelEntryPos(nPos); @@ -228,10 +227,10 @@ USHORT BookmarkCombo::GetSelectEntryCount() const /*------------------------------------------------------------------------ Beschreibung: Position in der Listbox (der ComboBox) -----------------------------------------------------------------------*/ -USHORT BookmarkCombo::GetSelectEntryPos( USHORT nSelIndex ) const +sal_uInt16 BookmarkCombo::GetSelectEntryPos( sal_uInt16 nSelIndex ) const { - USHORT nCnt = 0; - USHORT nPos = GetFirstSelEntryPos(); + sal_uInt16 nCnt = 0; + sal_uInt16 nPos = GetFirstSelEntryPos(); while (nPos != COMBOBOX_ENTRY_NOTFOUND) { diff --git a/sw/source/ui/misc/bookmark.src b/sw/source/ui/misc/bookmark.src index d5d0c8a4ce..bdf00f0636 100644 --- a/sw/source/ui/misc/bookmark.src +++ b/sw/source/ui/misc/bookmark.src @@ -31,7 +31,7 @@ #include "helpid.h" ModalDialog DLG_INSERT_BOOKMARK { - HelpID = FN_INSERT_BOOKMARK ; + HelpID = CMD_FN_INSERT_BOOKMARK ; OUTPUTSIZE = TRUE ; Size = MAP_APPFONT ( 179 , 96 ) ; Text [ en-US ] = "Insert Bookmark" ; @@ -53,6 +53,7 @@ ModalDialog DLG_INSERT_BOOKMARK }; ComboBox CB_BOOKMARK { + HelpID = "sw:ComboBox:DLG_INSERT_BOOKMARK:CB_BOOKMARK"; Pos = MAP_APPFONT ( 12 , 14 ) ; Size = MAP_APPFONT ( 99 , 76 ) ; TABSTOP = TRUE ; @@ -61,6 +62,7 @@ ModalDialog DLG_INSERT_BOOKMARK }; PushButton BT_DELETE { + HelpID = "sw:PushButton:DLG_INSERT_BOOKMARK:BT_DELETE"; Pos = MAP_APPFONT ( 123 , 40 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "~Delete" ; diff --git a/sw/source/ui/misc/docfnote.cxx b/sw/source/ui/misc/docfnote.cxx index 9b150d2664..68bd819576 100644 --- a/sw/source/ui/misc/docfnote.cxx +++ b/sw/source/ui/misc/docfnote.cxx @@ -69,7 +69,7 @@ SwFootNoteOptionDlg::SwFootNoteOptionDlg( Window *pParent, SwWrtShell &rS ) : AddTabPage( TP_ENDNOTEOPTION, SwEndNoteOptionPage::Create, 0 ); } -void SwFootNoteOptionDlg::PageCreated( USHORT /*nId*/, SfxTabPage &rPage ) +void SwFootNoteOptionDlg::PageCreated( sal_uInt16 /*nId*/, SfxTabPage &rPage ) { ((SwEndNoteOptionPage&)rPage).SetShell( rSh ); } @@ -95,9 +95,11 @@ IMPL_LINK( SwFootNoteOptionDlg, OkHdl, Button *, pBtn ) //---------------------------------------------------------------------- -SwEndNoteOptionPage::SwEndNoteOptionPage( Window *pParent, BOOL bEN, +SwEndNoteOptionPage::SwEndNoteOptionPage( Window *pParent, sal_Bool bEN, const SfxItemSet &rSet ) : SfxTabPage( pParent, SW_RES(bEN ? TP_ENDNOTEOPTION : TP_FOOTNOTEOPTION), rSet ), + aNumFL (this, SW_RES( FL_NUM )), + aNumTypeFT (this, SW_RES( FT_NUMTYPE )), aNumViewBox (this, SW_RES( LB_NUMVIEW ), INSERT_NUM_EXTENDED_TYPES), aOffsetLbl (this, SW_RES( FT_OFFSET )), @@ -111,31 +113,30 @@ SwEndNoteOptionPage::SwEndNoteOptionPage( Window *pParent, BOOL bEN, aPosFT (this, SW_RES( FT_POS )), aPosPageBox (this, SW_RES( RB_POS_PAGE )), aPosChapterBox (this, SW_RES( RB_POS_CHAPTER)), - aNumFL (this, SW_RES( FL_NUM )), + aTemplFL (this, SW_RES( FL_TEMPL )), aParaTemplLbl (this, SW_RES( FT_PARA_TEMPL)), aParaTemplBox (this, SW_RES( LB_PARA_TEMPL)), aPageTemplLbl (this, SW_RES( FT_PAGE_TEMPL)), aPageTemplBox (this, SW_RES( LB_PAGE_TEMPL)), - aTemplFL (this, SW_RES( FL_TEMPL )), + aCharTemplFL( this, SW_RES(FL_CHAR_TEMPL)), aFtnCharAnchorTemplLbl( this, SW_RES( FT_ANCHR_CHARFMT)), aFtnCharAnchorTemplBox( this, SW_RES( LB_ANCHR_CHARFMT)), aFtnCharTextTemplLbl( this, SW_RES( FT_TEXT_CHARFMT)), aFtnCharTextTemplBox( this, SW_RES( LB_TEXT_CHARFMT)), - aCharTemplFL( this, SW_RES(FL_CHAR_TEMPL)), + aContFL (this, SW_RES( FL_CONT )), aContLbl (this, SW_RES( FT_CONT )), aContEdit (this, SW_RES( ED_CONT )), aContFromLbl (this, SW_RES( FT_CONT_FROM )), aContFromEdit (this, SW_RES( ED_CONT_FROM )), - aContFL (this, SW_RES( FL_CONT )), aNumDoc(aNumCountBox.GetEntry(FTNNUM_DOC)), aNumPage(aNumCountBox.GetEntry(FTNNUM_PAGE)), aNumChapter(aNumCountBox.GetEntry(FTNNUM_CHAPTER)), pSh( 0 ), - bPosDoc(FALSE), + bPosDoc(sal_False), bEndNote( bEN ) { FreeResource(); @@ -144,6 +145,8 @@ SwEndNoteOptionPage::SwEndNoteOptionPage( Window *pParent, BOOL bEN, aPosChapterBox.SetClickHdl(LINK(this, SwEndNoteOptionPage, PosChapterHdl)); aNumCountBox.SetSelectHdl(LINK(this, SwEndNoteOptionPage, NumCountHdl)); + aPosPageBox.SetAccessibleRelationMemberOf(&aPosFT); + aPosChapterBox.SetAccessibleRelationMemberOf(&aPosFT); } void SwEndNoteOptionPage::Reset( const SfxItemSet& ) @@ -151,7 +154,7 @@ void SwEndNoteOptionPage::Reset( const SfxItemSet& ) SwEndNoteInfo *pInf = bEndNote ? new SwEndNoteInfo( pSh->GetEndNoteInfo() ) : new SwFtnInfo( pSh->GetFtnInfo() ); SfxObjectShell * pDocSh = SfxObjectShell::Current(); - USHORT i; + sal_uInt16 i; if(PTR_CAST(SwWebDocShell, pDocSh)) { @@ -176,7 +179,7 @@ void SwEndNoteOptionPage::Reset( const SfxItemSet& ) aContFromLbl.Hide(); aContFromEdit.Hide(); aContFL.Hide(); - bPosDoc = TRUE; + bPosDoc = sal_True; } else { @@ -185,15 +188,15 @@ void SwEndNoteOptionPage::Reset( const SfxItemSet& ) if ( rInf.ePos == FTNPOS_PAGE ) { aPosPageBox.Check(); - aPageTemplLbl.Enable(FALSE); - aPageTemplBox.Enable(FALSE); + aPageTemplLbl.Enable(sal_False); + aPageTemplBox.Enable(sal_False); } else { aPosChapterBox.Check(); aNumCountBox.RemoveEntry(aNumPage); aNumCountBox.RemoveEntry(aNumChapter); - bPosDoc = TRUE; + bPosDoc = sal_True; } // Verweistexte aContEdit.SetText(rInf.aQuoVadis); @@ -242,7 +245,7 @@ void SwEndNoteOptionPage::Reset( const SfxItemSet& ) else { OSL_ENSURE(!pColl->IsDefault(), "default style for footnotes is wrong"); - const USHORT nPos = aParaTemplBox.GetEntryPos(pColl->GetName()); + const sal_uInt16 nPos = aParaTemplBox.GetEntryPos(pColl->GetName()); if( LISTBOX_ENTRY_NOTFOUND != nPos ) aParaTemplBox.SelectEntryPos( nPos ); else @@ -253,10 +256,10 @@ void SwEndNoteOptionPage::Reset( const SfxItemSet& ) } // Seite - for( i = RES_POOLPAGE_BEGIN; i <= RES_POOLPAGE_LANDSCAPE; ++i ) + for( i = RES_POOLPAGE_BEGIN; i < RES_POOLPAGE_END; ++i ) aPageTemplBox.InsertEntry(SwStyleNameMapper::GetUIName( i, aEmptyStr )); - USHORT nCount = pSh->GetPageDescCnt(); + sal_uInt16 nCount = pSh->GetPageDescCnt(); for(i = 0; i < nCount; ++i) { const SwPageDesc &rPageDesc = pSh->GetPageDesc(i); @@ -274,7 +277,7 @@ SwEndNoteOptionPage::~SwEndNoteOptionPage() SfxTabPage *SwEndNoteOptionPage::Create( Window *pParent, const SfxItemSet &rSet ) { - return new SwEndNoteOptionPage( pParent, TRUE, rSet ); + return new SwEndNoteOptionPage( pParent, sal_True, rSet ); } /*------------------------------------------------------------------------ @@ -310,7 +313,7 @@ void SwEndNoteOptionPage::SelectNumbering(int eNum) int SwEndNoteOptionPage::GetNumbering() const { - const USHORT nPos = aNumCountBox.GetSelectEntryPos(); + const sal_uInt16 nPos = aNumCountBox.GetSelectEntryPos(); return (int) bPosDoc? nPos + 1: nPos; } @@ -338,25 +341,25 @@ void SwEndNoteOptionPage::SetShell( SwWrtShell &rShell ) IMPL_LINK( SwEndNoteOptionPage, PosPageHdl, Button *, EMPTYARG ) { const SwFtnNum eNum = (const SwFtnNum)GetNumbering(); - bPosDoc = FALSE; + bPosDoc = sal_False; if(LISTBOX_ENTRY_NOTFOUND == aNumCountBox.GetEntryPos(aNumPage)) { aNumCountBox.InsertEntry(aNumPage, FTNNUM_PAGE); aNumCountBox.InsertEntry(aNumChapter, FTNNUM_CHAPTER); SelectNumbering(eNum); } - aPageTemplLbl.Enable(FALSE); - aPageTemplBox.Enable(FALSE); + aPageTemplLbl.Enable(sal_False); + aPageTemplBox.Enable(sal_False); return 0; } IMPL_LINK( SwEndNoteOptionPage, NumCountHdl, ListBox*, EMPTYARG ) { - BOOL bEnable = TRUE; + sal_Bool bEnable = sal_True; if( aNumCountBox.GetEntryCount() - 1 != aNumCountBox.GetSelectEntryPos() ) { - bEnable = FALSE; + bEnable = sal_False; aOffsetFld.SetValue(1); } aOffsetLbl.Enable(bEnable); @@ -377,7 +380,7 @@ IMPL_LINK_INLINE_START( SwEndNoteOptionPage, PosChapterHdl, Button *, EMPTYARG ) if ( !bPosDoc ) SelectNumbering(FTNNUM_DOC); - bPosDoc = TRUE; + bPosDoc = sal_True; aNumCountBox.RemoveEntry(aNumPage); aNumCountBox.RemoveEntry(aNumChapter); aPageTemplLbl.Enable(); @@ -389,8 +392,8 @@ IMPL_LINK_INLINE_END( SwEndNoteOptionPage, PosChapterHdl, Button *, EMPTYARG ) SwCharFmt* lcl_GetCharFormat( SwWrtShell* pSh, const String& rCharFmtName ) { SwCharFmt* pFmt = 0; - USHORT nChCount = pSh->GetCharFmtCount(); - for(USHORT i = 0; i< nChCount; i++) + sal_uInt16 nChCount = pSh->GetCharFmtCount(); + for(sal_uInt16 i = 0; i< nChCount; i++) { SwCharFmt& rChFmt = pSh->GetCharFmt(i); if(rChFmt.GetName() == rCharFmtName ) @@ -411,11 +414,11 @@ SwCharFmt* lcl_GetCharFormat( SwWrtShell* pSh, const String& rCharFmtName ) return pFmt; } -BOOL SwEndNoteOptionPage::FillItemSet( SfxItemSet & ) +sal_Bool SwEndNoteOptionPage::FillItemSet( SfxItemSet & ) { SwEndNoteInfo *pInf = bEndNote ? new SwEndNoteInfo() : new SwFtnInfo(); - pInf->nFtnOffset = static_cast< USHORT >(aOffsetFld.GetValue() -1); + pInf->nFtnOffset = static_cast< sal_uInt16 >(aOffsetFld.GetValue() -1); pInf->aFmt.SetNumberingType(aNumViewBox.GetSelectedNumberingType() ); pInf->SetPrefix(aPrefixED.GetText()); pInf->SetSuffix(aSuffixED.GetText()); @@ -426,7 +429,7 @@ BOOL SwEndNoteOptionPage::FillItemSet( SfxItemSet & ) aFtnCharAnchorTemplBox.GetSelectEntry() ) ); // Absatzvorlage - USHORT nPos = aParaTemplBox.GetSelectEntryPos(); + sal_uInt16 nPos = aParaTemplBox.GetSelectEntryPos(); if(LISTBOX_ENTRY_NOTFOUND != nPos) { const String aFmtName( aParaTemplBox.GetSelectEntry() ); @@ -437,7 +440,7 @@ BOOL SwEndNoteOptionPage::FillItemSet( SfxItemSet & ) // Seitenvorlage pInf->ChgPageDesc( pSh->FindPageDescByName( - aPageTemplBox.GetSelectEntry(), TRUE ) ); + aPageTemplBox.GetSelectEntry(), sal_True ) ); if ( bEndNote ) { @@ -455,11 +458,11 @@ BOOL SwEndNoteOptionPage::FillItemSet( SfxItemSet & ) pSh->SetFtnInfo( *pI ); } delete pInf; - return TRUE; + return sal_True; } SwFootNoteOptionPage::SwFootNoteOptionPage( Window *pParent, const SfxItemSet &rSet ) : - SwEndNoteOptionPage( pParent, FALSE, rSet ) + SwEndNoteOptionPage( pParent, sal_False, rSet ) { } diff --git a/sw/source/ui/misc/docfnote.src b/sw/source/ui/misc/docfnote.src index 68ee867fbc..606c76f2e0 100644 --- a/sw/source/ui/misc/docfnote.src +++ b/sw/source/ui/misc/docfnote.src @@ -78,6 +78,7 @@ TabPage TP_FOOTNOTEOPTION }; ListBox LB_NUMVIEW { + HelpID = "sw:ListBox:TP_FOOTNOTEOPTION:LB_NUMVIEW"; Border = TRUE ; Pos = MAP_APPFONT ( 65 , 14 ) ; Size = MAP_APPFONT ( 59 , 72 ) ; @@ -94,6 +95,7 @@ TabPage TP_FOOTNOTEOPTION }; NumericField FLD_OFFSET { + HelpID = "sw:NumericField:TP_FOOTNOTEOPTION:FLD_OFFSET"; Pos = MAP_APPFONT ( 189 , 14 ) ; Size = MAP_APPFONT ( 30 , 12 ) ; Spin = TRUE ; @@ -112,6 +114,7 @@ TabPage TP_FOOTNOTEOPTION }; ListBox LB_NUMCOUNT { + HelpID = "sw:ListBox:TP_FOOTNOTEOPTION:LB_NUMCOUNT"; Border = TRUE ; Pos = MAP_APPFONT ( 65 , 29 ) ; Size = MAP_APPFONT ( 59 , 50 ) ; @@ -135,6 +138,7 @@ TabPage TP_FOOTNOTEOPTION }; Edit ED_PREFIX { + HelpID = "sw:Edit:TP_FOOTNOTEOPTION:ED_PREFIX"; Border = TRUE ; Pos = MAP_APPFONT ( 65 , 44 ) ; Size = MAP_APPFONT ( 59 , 12 ) ; @@ -151,6 +155,7 @@ TabPage TP_FOOTNOTEOPTION }; Edit ED_SUFFIX { + HelpID = "sw:Edit:TP_FOOTNOTEOPTION:ED_SUFFIX"; Border = TRUE ; Pos = MAP_APPFONT ( 189 , 44 ) ; Size = MAP_APPFONT ( 59 , 12 ) ; @@ -166,6 +171,7 @@ TabPage TP_FOOTNOTEOPTION }; RadioButton RB_POS_PAGE { + HelpID = "sw:RadioButton:TP_FOOTNOTEOPTION:RB_POS_PAGE"; Pos = MAP_APPFONT ( 65 , 62 ) ; Size = MAP_APPFONT ( 150 , 10 ) ; Text [ en-US ] = "~End of page" ; @@ -174,6 +180,7 @@ TabPage TP_FOOTNOTEOPTION }; RadioButton RB_POS_CHAPTER { + HelpID = "sw:RadioButton:TP_FOOTNOTEOPTION:RB_POS_CHAPTER"; Pos = MAP_APPFONT ( 65 , 75 ) ; Size = MAP_APPFONT ( 150 , 10 ) ; Text [ en-US ] = "En~d of document" ; @@ -193,6 +200,7 @@ TabPage TP_FOOTNOTEOPTION }; ListBox LB_PARA_TEMPL { + HelpID = "sw:ListBox:TP_FOOTNOTEOPTION:LB_PARA_TEMPL"; Border = TRUE ; Pos = MAP_APPFONT ( 48 , 100 ) ; Size = MAP_APPFONT ( 58 , 80 ) ; @@ -210,6 +218,7 @@ TabPage TP_FOOTNOTEOPTION }; ListBox LB_PAGE_TEMPL { + HelpID = "sw:ListBox:TP_FOOTNOTEOPTION:LB_PAGE_TEMPL"; Border = TRUE ; Pos = MAP_APPFONT ( 48 , 116) ; Size = MAP_APPFONT ( 58 , 80 ) ; @@ -232,6 +241,7 @@ TabPage TP_FOOTNOTEOPTION }; ListBox LB_ANCHR_CHARFMT { + HelpID = "sw:ListBox:TP_FOOTNOTEOPTION:LB_ANCHR_CHARFMT"; Border = TRUE ; Pos = MAP_APPFONT ( 186 , 100 ) ; Size = MAP_APPFONT ( 65 , 72 ) ; @@ -248,6 +258,7 @@ TabPage TP_FOOTNOTEOPTION }; ListBox LB_TEXT_CHARFMT { + HelpID = "sw:ListBox:TP_FOOTNOTEOPTION:LB_TEXT_CHARFMT"; Border = TRUE ; Pos = MAP_APPFONT ( 186 , 116 ) ; Size = MAP_APPFONT ( 65 , 72 ) ; @@ -270,6 +281,7 @@ TabPage TP_FOOTNOTEOPTION }; Edit ED_CONT { + HelpID = "sw:Edit:TP_FOOTNOTEOPTION:ED_CONT"; Border = TRUE ; Pos = MAP_APPFONT ( 88, 145 ) ; Size = MAP_APPFONT ( 160 , 12 ) ; @@ -286,6 +298,7 @@ TabPage TP_FOOTNOTEOPTION }; Edit ED_CONT_FROM { + HelpID = "sw:Edit:TP_FOOTNOTEOPTION:ED_CONT_FROM"; Border = TRUE ; Pos = MAP_APPFONT ( 88 , 161 ) ; Size = MAP_APPFONT ( 160 , 12 ) ; @@ -316,6 +329,7 @@ TabPage TP_ENDNOTEOPTION }; ListBox LB_NUMVIEW { + HelpID = "sw:ListBox:TP_ENDNOTEOPTION:LB_NUMVIEW"; Border = TRUE ; Pos = MAP_APPFONT ( 65 , 14 ) ; Size = MAP_APPFONT ( 59 , 72 ) ; @@ -343,6 +357,7 @@ TabPage TP_ENDNOTEOPTION }; NumericField FLD_OFFSET { + HelpID = "sw:NumericField:TP_ENDNOTEOPTION:FLD_OFFSET"; Pos = MAP_APPFONT ( 189 , 14 ) ; Size = MAP_APPFONT ( 30 , 12 ) ; Spin = TRUE ; @@ -361,6 +376,7 @@ TabPage TP_ENDNOTEOPTION }; ListBox LB_NUMCOUNT { + HelpID = "sw:ListBox:TP_ENDNOTEOPTION:LB_NUMCOUNT"; Border = TRUE ; Pos = MAP_APPFONT ( 12 , 27 ) ; Size = MAP_APPFONT ( 62 , 72 ) ; @@ -376,6 +392,7 @@ TabPage TP_ENDNOTEOPTION }; Edit ED_PREFIX { + HelpID = "sw:Edit:TP_ENDNOTEOPTION:ED_PREFIX"; Pos = MAP_APPFONT ( 65 , 30 ) ; Size = MAP_APPFONT ( 59 , 12 ) ; Border = TRUE ; @@ -392,6 +409,7 @@ TabPage TP_ENDNOTEOPTION }; Edit ED_SUFFIX { + HelpID = "sw:Edit:TP_ENDNOTEOPTION:ED_SUFFIX"; Pos = MAP_APPFONT ( 189 , 30 ) ; Size = MAP_APPFONT ( 59 , 12 ) ; Border = TRUE ; @@ -407,6 +425,7 @@ TabPage TP_ENDNOTEOPTION }; RadioButton RB_POS_PAGE { + HelpID = "sw:RadioButton:TP_ENDNOTEOPTION:RB_POS_PAGE"; Pos = MAP_APPFONT ( 12 , 104 ) ; Size = MAP_APPFONT ( 60 , 10 ) ; Text [ en-US ] = "End ~of page" ; @@ -415,6 +434,7 @@ TabPage TP_ENDNOTEOPTION }; RadioButton RB_POS_CHAPTER { + HelpID = "sw:RadioButton:TP_ENDNOTEOPTION:RB_POS_CHAPTER"; Pos = MAP_APPFONT ( 12 , 118 ) ; Size = MAP_APPFONT ( 60 , 10 ) ; Text [ en-US ] = "End of ~document" ; @@ -434,6 +454,7 @@ TabPage TP_ENDNOTEOPTION }; ListBox LB_PARA_TEMPL { + HelpID = "sw:ListBox:TP_ENDNOTEOPTION:LB_PARA_TEMPL"; Border = TRUE ; Pos = MAP_APPFONT ( 51 , 56 ) ; Size = MAP_APPFONT ( 67 , 72 ) ; @@ -451,6 +472,7 @@ TabPage TP_ENDNOTEOPTION }; ListBox LB_PAGE_TEMPL { + HelpID = "sw:ListBox:TP_ENDNOTEOPTION:LB_PAGE_TEMPL"; Border = TRUE ; Pos = MAP_APPFONT ( 51 , 72 ) ; Size = MAP_APPFONT ( 67 , 72 ) ; @@ -472,6 +494,7 @@ TabPage TP_ENDNOTEOPTION }; ListBox LB_ANCHR_CHARFMT { + HelpID = "sw:ListBox:TP_ENDNOTEOPTION:LB_ANCHR_CHARFMT"; Border = TRUE ; Pos = MAP_APPFONT ( 186 , 56 ) ; Size = MAP_APPFONT ( 65 , 72 ) ; @@ -488,6 +511,7 @@ TabPage TP_ENDNOTEOPTION }; ListBox LB_TEXT_CHARFMT { + HelpID = "sw:ListBox:TP_ENDNOTEOPTION:LB_TEXT_CHARFMT"; Border = TRUE ; Pos = MAP_APPFONT ( 186 , 72 ) ; Size = MAP_APPFONT ( 65 , 72 ) ; @@ -510,6 +534,7 @@ TabPage TP_ENDNOTEOPTION }; Edit ED_CONT { + HelpID = "sw:Edit:TP_ENDNOTEOPTION:ED_CONT"; Border = TRUE ; Pos = MAP_APPFONT ( 137 , 101 ) ; Size = MAP_APPFONT ( 114 , 12 ) ; @@ -526,6 +551,7 @@ TabPage TP_ENDNOTEOPTION }; Edit ED_CONT_FROM { + HelpID = "sw:Edit:TP_ENDNOTEOPTION:ED_CONT_FROM"; Border = TRUE ; Pos = MAP_APPFONT ( 137 , 116 ) ; Size = MAP_APPFONT ( 114 , 12 ) ; diff --git a/sw/source/ui/misc/glosbib.cxx b/sw/source/ui/misc/glosbib.cxx index 57703df74e..7ebec767ed 100644 --- a/sw/source/ui/misc/glosbib.cxx +++ b/sw/source/ui/misc/glosbib.cxx @@ -66,9 +66,11 @@ SwGlossaryGroupDlg::SwGlossaryGroupDlg(Window * pParent, const SvStrings* pPathArr, SwGlossaryHdl *pHdl) : SvxStandardDialog(pParent, SW_RES(DLG_BIB_BASE)), - + aBibFT( this, SW_RES(FT_BIB)), aNameED( this, SW_RES(ED_NAME)), + aPathFT( this, SW_RES(FT_PATH)), aPathLB( this, SW_RES(LB_PATH)), + aSelectFT( this, SW_RES(FT_SELECT)), aGroupTLB( this, SW_RES(TLB_GROUPS)), aOkPB( this, SW_RES(BT_OK)), @@ -77,16 +79,13 @@ SwGlossaryGroupDlg::SwGlossaryGroupDlg(Window * pParent, aNewPB( this, SW_RES(PB_NEW)), aDelPB( this, SW_RES(PB_DELETE)), aRenamePB( this, SW_RES(PB_RENAME)), - aBibFT( this, SW_RES(FT_BIB)), - aPathFT( this, SW_RES(FT_PATH)), - aSelectFT( this, SW_RES(FT_SELECT)), pRemovedArr(0), pInsertedArr(0), pRenamedArr(0), pGlosHdl(pHdl) { - USHORT i; + sal_uInt16 i; FreeResource(); @@ -97,7 +96,7 @@ SwGlossaryGroupDlg::SwGlossaryGroupDlg(Window * pParent, aGroupTLB.SetHelpId(HID_GLOS_GROUP_TREE); aGroupTLB.SetTabs( &nTabs[0], MAP_APPFONT ); - aGroupTLB.SetWindowBits(WB_HSCROLL|WB_CLIPCHILDREN|WB_SORT); + aGroupTLB.SetStyle(aGroupTLB.GetStyle()|WB_HSCROLL|WB_CLIPCHILDREN|WB_SORT); aGroupTLB.SetSelectHdl(LINK(this, SwGlossaryGroupDlg, SelectHdl)); aGroupTLB.GetModel()->SetSortMode(SortAscending); aNewPB.SetClickHdl(LINK(this, SwGlossaryGroupDlg, NewHdl)); @@ -111,7 +110,7 @@ SwGlossaryGroupDlg::SwGlossaryGroupDlg(Window * pParent, INetURLObject aTempURL(sPath); sPath = aTempURL.GetMainURL(INetURLObject::DECODE_WITH_CHARSET ); aPathLB.InsertEntry(sPath); - ULONG nCaseReadonly = 0; + sal_uLong nCaseReadonly = 0; utl::TempFile aTempFile(&sPath); aTempFile.EnableKillingFile(); if(!aTempFile.IsValid()) @@ -121,9 +120,9 @@ SwGlossaryGroupDlg::SwGlossaryGroupDlg(Window * pParent, aPathLB.SetEntryData(i, (void*)nCaseReadonly); } aPathLB.SelectEntryPos(0); - aPathLB.Enable(TRUE); + aPathLB.Enable(sal_True); - const USHORT nCount = pHdl->GetGroupCnt(); + const sal_uInt16 nCount = pHdl->GetGroupCnt(); for(i = 0; i < nCount; ++i) { String sTitle; @@ -135,7 +134,7 @@ SwGlossaryGroupDlg::SwGlossaryGroupDlg(Window * pParent, pData->sGroupTitle = sTitle; String sTemp(sTitle); sTemp += '\t'; - pData->sPath = aPathLB.GetEntry((USHORT)sGroup.GetToken(1, GLOS_DELIM).ToInt32()); + pData->sPath = aPathLB.GetEntry((sal_uInt16)sGroup.GetToken(1, GLOS_DELIM).ToInt32()); sTemp += pData->sPath; SvLBoxEntry* pEntry = aGroupTLB.InsertEntry(sTemp); pEntry->SetUserData(pData); @@ -174,8 +173,8 @@ void SwGlossaryGroupDlg::Apply() if(pRemovedArr && pRemovedArr->Count()) { - USHORT nCount = pRemovedArr->Count(); - for(USHORT i = 0; i < nCount; ++i) + sal_uInt16 nCount = pRemovedArr->Count(); + for(sal_uInt16 i = 0; i < nCount; ++i) { const String* pDelEntry = (*pRemovedArr)[i]; const String sDelGroup = pDelEntry->GetToken(0, '\t'); @@ -206,8 +205,8 @@ void SwGlossaryGroupDlg::Apply() //erst umbenennen, falls es schon eins gab if(pRenamedArr && pRenamedArr->Count()) { - USHORT nCount = pRenamedArr->Count(); - for(USHORT i = 0; i < nCount; ++i) + sal_uInt16 nCount = pRenamedArr->Count(); + for(sal_uInt16 i = 0; i < nCount; ++i) { String * pEntry = (*pRenamedArr)[i]; xub_StrLen nStrSttPos = 0; @@ -221,8 +220,8 @@ void SwGlossaryGroupDlg::Apply() } if(pInsertedArr && pInsertedArr->Count()) { - USHORT nCount = pInsertedArr->Count(); - for(USHORT i = 0; i < nCount; ++i) + sal_uInt16 nCount = pInsertedArr->Count(); + for(sal_uInt16 i = 0; i < nCount; ++i) { String sNewGroup = *(*pInsertedArr)[i]; String sNewTitle = sNewGroup.GetToken(0, GLOS_DELIM); @@ -238,15 +237,15 @@ void SwGlossaryGroupDlg::Apply() IMPL_LINK( SwGlossaryGroupDlg, SelectHdl, SvTabListBox*, EMPTYARG ) { - aNewPB.Enable(FALSE); + aNewPB.Enable(sal_False); SvLBoxEntry* pFirstEntry = aGroupTLB.FirstSelected(); if(pFirstEntry) { GlosBibUserData* pUserData = (GlosBibUserData*)pFirstEntry->GetUserData(); String sEntry(pUserData->sGroupName); String sName(aNameED.GetText()); - BOOL bExists = FALSE; - ULONG nPos = aGroupTLB.GetEntryPos(sName, 0); + sal_Bool bExists = sal_False; + sal_uLong nPos = aGroupTLB.GetEntryPos(sName, 0); if( 0xffffffff > nPos) { SvLBoxEntry* pEntry = aGroupTLB.GetEntry(nPos); @@ -291,24 +290,24 @@ IMPL_LINK( SwGlossaryGroupDlg, DeleteHdl, Button*, pButton ) SvLBoxEntry* pEntry = aGroupTLB.FirstSelected(); if(!pEntry) { - pButton->Enable(FALSE); + pButton->Enable(sal_False); return 0; } GlosBibUserData* pUserData = (GlosBibUserData*)pEntry->GetUserData(); String sEntry(pUserData->sGroupName); // befindet sich der zu loeschende Name schon unter den // den neuen - dann weg damit - BOOL bDelete = TRUE; + sal_Bool bDelete = sal_True; if(pInsertedArr && pInsertedArr->Count()) { - USHORT nCount = pInsertedArr->Count(); - for(USHORT i = 0; i < nCount; ++i) + sal_uInt16 nCount = pInsertedArr->Count(); + for(sal_uInt16 i = 0; i < nCount; ++i) { const String* pTemp = (*pInsertedArr)[i]; if(*pTemp == sEntry) { pInsertedArr->Remove(i); - bDelete = FALSE; + bDelete = sal_False; break; } @@ -319,15 +318,15 @@ IMPL_LINK( SwGlossaryGroupDlg, DeleteHdl, Button*, pButton ) { if(pRenamedArr && pRenamedArr->Count()) { - USHORT nCount = pRenamedArr->Count(); - for(USHORT i = 0; i < nCount; ++i) + sal_uInt16 nCount = pRenamedArr->Count(); + for(sal_uInt16 i = 0; i < nCount; ++i) { const String* pTemp = (*pRenamedArr)[i]; String sTemp( pTemp->GetToken(0, RENAME_TOKEN_DELIM )); if(sTemp == sEntry) { pRenamedArr->Remove(i); - bDelete = FALSE; + bDelete = sal_False; break; } } @@ -345,7 +344,7 @@ IMPL_LINK( SwGlossaryGroupDlg, DeleteHdl, Button*, pButton ) delete pUserData; aGroupTLB.GetModel()->Remove(pEntry); if(!aGroupTLB.First()) - pButton->Enable(FALSE); + pButton->Enable(sal_False); //the content must be deleted - otherwise the new handler would be called in Apply() aNameED.SetText(aEmptyStr); return 0; @@ -367,18 +366,18 @@ IMPL_LINK( SwGlossaryGroupDlg, RenameHdl, Button *, EMPTYARG ) // befindet sich der umzubenennende Name unter den // den neuen - dann austauschen - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; if(pInsertedArr && pInsertedArr->Count()) { - USHORT nCount = pInsertedArr->Count(); - for(USHORT i = 0; i < nCount; ++i) + sal_uInt16 nCount = pInsertedArr->Count(); + for(sal_uInt16 i = 0; i < nCount; ++i) { const String* pTemp = (*pInsertedArr)[i]; if(*pTemp == sEntry) { pInsertedArr->Remove(i); pInsertedArr->Insert(new String(sNewName), pInsertedArr->Count()); - bDone = TRUE; + bDone = sal_True; break; } } @@ -413,17 +412,17 @@ IMPL_LINK( SwGlossaryGroupDlg, RenameHdl, Button *, EMPTYARG ) IMPL_LINK( SwGlossaryGroupDlg, ModifyHdl, Edit*, EMPTYARG ) { String sEntry(aNameED.GetText()); - BOOL bEnableNew = TRUE; - BOOL bEnableDel = FALSE; - ULONG nCaseReadonly = - (ULONG)aPathLB.GetEntryData(aPathLB.GetSelectEntryPos()); - BOOL bDirReadonly = 0 != (nCaseReadonly&PATH_READONLY); + sal_Bool bEnableNew = sal_True; + sal_Bool bEnableDel = sal_False; + sal_uLong nCaseReadonly = + (sal_uLong)aPathLB.GetEntryData(aPathLB.GetSelectEntryPos()); + sal_Bool bDirReadonly = 0 != (nCaseReadonly&PATH_READONLY); if(!sEntry.Len() || bDirReadonly) - bEnableNew = FALSE; + bEnableNew = sal_False; else if(sEntry.Len()) { - ULONG nPos = 0xffffffff; + sal_uLong nPos = 0xffffffff; nPos = aGroupTLB.GetEntryPos(sEntry, 0); @@ -431,12 +430,12 @@ IMPL_LINK( SwGlossaryGroupDlg, ModifyHdl, Edit*, EMPTYARG ) if( 0xffffffff == nPos) { const ::utl::TransliterationWrapper& rSCmp = GetAppCmpStrIgnore(); - for(USHORT i = 0; i < aGroupTLB.GetEntryCount(); i++) + for(sal_uInt16 i = 0; i < aGroupTLB.GetEntryCount(); i++) { String sTemp = aGroupTLB.GetEntryText( i, 0 ); - nCaseReadonly = (ULONG)aPathLB.GetEntryData( + nCaseReadonly = (sal_uLong)aPathLB.GetEntryData( aPathLB.GetEntryPos(aGroupTLB.GetEntryText(i,1))); - BOOL bCase = 0 != (nCaseReadonly & PATH_CASE_SENSITIVE); + sal_Bool bCase = 0 != (nCaseReadonly & PATH_CASE_SENSITIVE); if( !bCase && rSCmp.isEqual( sTemp, sEntry )) { @@ -447,7 +446,7 @@ IMPL_LINK( SwGlossaryGroupDlg, ModifyHdl, Edit*, EMPTYARG ) } if( 0xffffffff > nPos) { - bEnableNew = FALSE; + bEnableNew = sal_False; aGroupTLB.Select(aGroupTLB.GetEntry( nPos )); aGroupTLB.MakeVisible(aGroupTLB.GetEntry( nPos )); } @@ -465,23 +464,23 @@ IMPL_LINK( SwGlossaryGroupDlg, ModifyHdl, Edit*, EMPTYARG ) return 0; } -BOOL SwGlossaryGroupDlg::IsDeleteAllowed(const String &rGroup) +sal_Bool SwGlossaryGroupDlg::IsDeleteAllowed(const String &rGroup) { - BOOL bDel = (!pGlosHdl->IsReadOnly(&rGroup)); + sal_Bool bDel = (!pGlosHdl->IsReadOnly(&rGroup)); // OM: befindet sich der Name unter den den neuen Bereichsnamen, // dann ist er auch loeschbar! Bei noch nicht existenten Bereichsnamen - // liefert ReadOnly naemlich TRUE. + // liefert ReadOnly naemlich sal_True. if(pInsertedArr && pInsertedArr->Count()) { - USHORT nCount = pInsertedArr->Count(); - for(USHORT i = 0; i < nCount; ++i) + sal_uInt16 nCount = pInsertedArr->Count(); + for(sal_uInt16 i = 0; i < nCount; ++i) { const String* pTemp = (*pInsertedArr)[i]; if(*pTemp == rGroup) { - bDel = TRUE; + bDel = sal_True; break; } } diff --git a/sw/source/ui/misc/glosbib.src b/sw/source/ui/misc/glosbib.src index ba2d1b2d2b..011bfce073 100644 --- a/sw/source/ui/misc/glosbib.src +++ b/sw/source/ui/misc/glosbib.src @@ -38,6 +38,7 @@ ModalDialog DLG_BIB_BASE Text [ en-US ] = "Edit Categories" ; PushButton PB_NEW { + HelpID = "sw:PushButton:DLG_BIB_BASE:PB_NEW"; Disable = TRUE ; Pos = MAP_APPFONT ( 293 , 66 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; @@ -46,6 +47,7 @@ ModalDialog DLG_BIB_BASE }; PushButton PB_DELETE { + HelpID = "sw:PushButton:DLG_BIB_BASE:PB_DELETE"; Pos = MAP_APPFONT ( 293 , 83 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "~Delete" ; @@ -54,6 +56,7 @@ ModalDialog DLG_BIB_BASE }; PushButton PB_RENAME { + HelpID = "sw:PushButton:DLG_BIB_BASE:PB_RENAME"; Disable = TRUE ; Pos = MAP_APPFONT ( 293 , 100 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; @@ -87,6 +90,7 @@ ModalDialog DLG_BIB_BASE }; Edit ED_NAME { + HelpID = "sw:Edit:DLG_BIB_BASE:ED_NAME"; Pos = MAP_APPFONT ( 12 , 14 ) ; Size = MAP_APPFONT ( 159 , 12 ) ; TabStop = TRUE ; @@ -101,6 +105,7 @@ ModalDialog DLG_BIB_BASE }; ListBox LB_PATH { + HelpID = "sw:ListBox:DLG_BIB_BASE:LB_PATH"; Pos = MAP_APPFONT ( 174 , 14 ) ; Size = MAP_APPFONT ( 107 , 50 ) ; DropDown = TRUE ; diff --git a/sw/source/ui/misc/glosdoc.cxx b/sw/source/ui/misc/glosdoc.cxx index d6cb8a4ee5..d06234ddb3 100644 --- a/sw/source/ui/misc/glosdoc.cxx +++ b/sw/source/ui/misc/glosdoc.cxx @@ -79,7 +79,7 @@ String lcl_CheckFileName( const String& rNewFilePath, sRet.EraseLeadingChars(); sRet.EraseTrailingChars(); - BOOL bOk = FALSE; + sal_Bool bOk = sal_False; if( sRet.Len() ) { String sTmpDir(rNewFilePath); @@ -251,7 +251,7 @@ sal_Bool SwGlossaries::RenameGroupDoc( sOldFileURL += INET_PATH_TOKEN; sOldFileURL += rOldGroup.GetToken(0, GLOS_DELIM); sOldFileURL += SwGlossaries::GetExtension(); - BOOL bExist = FStatHelper::IsDocument( sOldFileURL ); + sal_Bool bExist = FStatHelper::IsDocument( sOldFileURL ); OSL_ENSURE(bExist, "group doesn't exist!"); if(bExist) { @@ -270,8 +270,8 @@ sal_Bool SwGlossaries::RenameGroupDoc( OSL_ENSURE(!bExist, "group already exists!"); if(!bExist) { - BOOL bCopyCompleted = SWUnoHelper::UCB_CopyFile( - sOldFileURL, sTempNewFilePath, TRUE ); + sal_Bool bCopyCompleted = SWUnoHelper::UCB_CopyFile( + sOldFileURL, sTempNewFilePath, sal_True ); if(bCopyCompleted) { bRet = sal_True; @@ -319,7 +319,7 @@ sal_Bool SwGlossaries::DelGroupDoc(const String &rName) // Auch, wenn das File nicht existiert, muss es aus der Liste // der Textbausteinbereiche entfernt werden // Kein && wegen CFfront - BOOL bRemoved = SWUnoHelper::UCB_DeleteFile( sFileURL ); + sal_Bool bRemoved = SWUnoHelper::UCB_DeleteFile( sFileURL ); OSL_ENSURE(bRemoved, "file has not been removed"); RemoveFileFromList( aName ); return bRemoved; @@ -365,7 +365,7 @@ SwTextBlocks* SwGlossaries::GetGlosDoc( const String &rName, sal_Bool bCreate ) sFileURL += INET_PATH_TOKEN; sFileURL += aTmp; - BOOL bExist = FALSE; + sal_Bool bExist = sal_False; if(!bCreate) bExist = FStatHelper::IsDocument( sFileURL ); @@ -402,7 +402,7 @@ SvStrings* SwGlossaries::GetNameList() SWUnoHelper::UCB_GetFileListOfFolder( *(*m_pPathArr)[i], aFiles, &sExt ); - for( USHORT nFiles = 0, nFEnd = aFiles.Count(); + for( sal_uInt16 nFiles = 0, nFEnd = aFiles.Count(); nFiles < nFEnd; ++nFiles ) { String* pTitle = aFiles[ nFiles ]; diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx index 0c708a8e38..1e0b5acefb 100644 --- a/sw/source/ui/misc/glossary.cxx +++ b/sw/source/ui/misc/glossary.cxx @@ -84,6 +84,8 @@ #include <swmodule.hxx> #include <sfx2/filedlghelper.hxx> +#include "access.hrc" + #define LONG_LENGTH 60 #define SHORT_LENGTH 30 @@ -124,11 +126,11 @@ struct GroupUserData { String sGroupName; sal_uInt16 nPathIdx; - BOOL bReadonly; + sal_Bool bReadonly; GroupUserData() : nPathIdx(0), - bReadonly(FALSE) {} + bReadonly(sal_False) {} }; /*------------------------------------------------------------------------ @@ -142,11 +144,11 @@ class SwNewGlosNameDlg : public ModalDialog NoSpaceEdit aNewShort; OKButton aOk; CancelButton aCancel; - FixedLine aFL; FixedText aONFT; Edit aOldName; FixedText aOSFT; Edit aOldShort; + FixedLine aFL; protected: DECL_LINK( Modify, Edit * ); @@ -171,11 +173,12 @@ SwNewGlosNameDlg::SwNewGlosNameDlg(Window* pParent, aNewShort(this,SW_RES( ED_NS )), aOk (this, SW_RES( BT_OKNEW)), aCancel (this, SW_RES( BT_CANCEL)), - aFL (this, SW_RES( FL_NN )), aONFT (this, SW_RES( FT_ON )), aOldName(this, SW_RES( ED_ON )), aOSFT (this, SW_RES( FT_OS )), - aOldShort(this,SW_RES( ED_OS )) + aOldShort(this,SW_RES( ED_OS )), + aFL (this, SW_RES( FL_NN )) + { FreeResource(); aOldName.SetText( rOldName ); @@ -279,10 +282,12 @@ SwGlossaryDlg::SwGlossaryDlg(SfxViewFrame* pViewFrame, aInsertBtn.Enable(sal_False); aNameED.GrabFocus(); aCategoryBox.SetHelpId(HID_MD_GLOS_CATEGORY); - aCategoryBox.SetWindowBits(WB_HASBUTTONS|WB_HASBUTTONSATROOT|WB_HSCROLL|WB_VSCROLL|WB_CLIPCHILDREN|WB_SORT); + aCategoryBox.SetStyle(aCategoryBox.GetStyle()|WB_HASBUTTONS|WB_HASBUTTONSATROOT|WB_HSCROLL|WB_VSCROLL|WB_CLIPCHILDREN|WB_SORT); aCategoryBox.GetModel()->SetSortMode(SortAscending); aCategoryBox.SetHighlightRange(); // ueber volle Breite selektieren aCategoryBox.SetNodeDefaultImages( ); + aCategoryBox.SetAccessibleName(SW_RES(STR_ACCESS_SW_CATEGORY)); + aCategoryBox.SetAccessibleRelationLabeledBy(&aInsertTipCB); Init(); } @@ -666,9 +671,9 @@ IMPL_LINK( SwGlossaryDlg, BibHdl, Button *, EMPTYARG ) //check if at least one glossary path is write enabled SvtPathOptions aPathOpt; String sGlosPath( aPathOpt.GetAutoTextPath() ); - USHORT nPaths = sGlosPath.GetTokenCount(';'); - BOOL bIsWritable = FALSE; - for(USHORT nPath = 0; nPath < nPaths; nPath++) + sal_uInt16 nPaths = sGlosPath.GetTokenCount(';'); + sal_Bool bIsWritable = sal_False; + for(sal_uInt16 nPath = 0; nPath < nPaths; nPath++) { String sPath = URIHelper::SmartRel2Abs( INetURLObject(), sGlosPath.GetToken(nPath, ';'), @@ -833,7 +838,7 @@ IMPL_LINK_INLINE_START( SwGlossaryDlg, EditHdl, Button *, EMPTYARG ) if(aEditBtn.GetCurItemId() == FN_GL_EDIT ) { SwTextBlocks *pGroup = ::GetGlossaries()->GetGroupDoc ( GetCurrGrpName () ); - BOOL bRet = pGlossaryHdl->ConvertToNew ( *pGroup ); + sal_Bool bRet = pGlossaryHdl->ConvertToNew ( *pGroup ); delete pGroup; if ( bRet ) EndDialog(RET_EDIT); @@ -1009,7 +1014,7 @@ sal_Bool SwGlTreeListBox::NotifyAcceptDrop( SvLBoxEntry* pEntry) sal_Bool SwGlTreeListBox::NotifyMoving( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry, SvLBoxEntry*& /*rpNewParent*/, - ULONG& /*rNewChildPos*/ + sal_uLong& /*rNewChildPos*/ ) { pDragEntry = 0; @@ -1055,7 +1060,7 @@ sal_Bool SwGlTreeListBox::NotifyMoving( SvLBoxEntry* pTarget, sal_Bool SwGlTreeListBox::NotifyCopying( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry, SvLBoxEntry*& /*rpNewParent*/, - ULONG& /*rNewChildPos*/ + sal_uLong& /*rNewChildPos*/ ) { pDragEntry = 0; @@ -1155,7 +1160,7 @@ IMPL_LINK( SwGlossaryDlg, ShowPreviewHdl, CheckBox *, pBox ) } } - BOOL bShow = pBox->IsChecked() && !bCreated; + sal_Bool bShow = pBox->IsChecked() && !bCreated; aExampleWIN.Show( bShow ); aExampleDummyWIN.Show(!bShow); if( ::GetCurrGlosGroup() ) @@ -1166,7 +1171,7 @@ IMPL_LINK( SwGlossaryDlg, ShowPreviewHdl, CheckBox *, pBox ) IMPL_LINK( SwGlossaryDlg, PreviewLoadedHdl, void *, EMPTYARG ) { - BOOL bShow = aShowExampleCB.IsChecked(); + sal_Bool bShow = aShowExampleCB.IsChecked(); aExampleWIN.Show( bShow ); aExampleDummyWIN.Show(!bShow); ResumeShowAutoText(); @@ -1179,7 +1184,7 @@ void SwGlossaryDlg::ShowAutoText(const String& rGroup, const String& rShortName) { SetResumeData(rGroup, rShortName); //try to make an Undo() - pExampleFrame->ClearDocument( TRUE ); + pExampleFrame->ClearDocument( sal_True ); } } diff --git a/sw/source/ui/misc/glossary.src b/sw/source/ui/misc/glossary.src index dba81acfce..721b36522c 100644 --- a/sw/source/ui/misc/glossary.src +++ b/sw/source/ui/misc/glossary.src @@ -29,10 +29,12 @@ #include "glossary.hrc" #include "cmdid.h" #include "helpid.h" +#include "access.hrc" + // #define DLG_GLOSSARY 256 ModalDialog DLG_GLOSSARY { - HelpID = FN_GLOSSARY_DLG ; + HelpID = CMD_FN_GLOSSARY_DLG ; OutputSize = TRUE ; SVLook = TRUE ; Size = MAP_APPFONT ( 375 , 164 ) ; @@ -40,6 +42,7 @@ ModalDialog DLG_GLOSSARY Moveable = TRUE ; CheckBox CB_INSERT_TIP { + HelpID = "sw:CheckBox:DLG_GLOSSARY:CB_INSERT_TIP"; Pos = MAP_APPFONT ( 12 , 12 ) ; Size = MAP_APPFONT ( 200 , 12 ) ; TabStop = TRUE ; @@ -54,6 +57,7 @@ ModalDialog DLG_GLOSSARY }; Edit ED_NAME { + HelpID = "sw:Edit:DLG_GLOSSARY:ED_NAME"; Border = TRUE ; Pos = MAP_APPFONT ( 55 , 29 ) ; Size = MAP_APPFONT ( 85 , 12 ) ; @@ -70,6 +74,7 @@ ModalDialog DLG_GLOSSARY }; Edit ED_SHORTNAME { + HelpID = "sw:Edit:DLG_GLOSSARY:ED_SHORTNAME"; Disable = TRUE ; Border = TRUE ; Pos = MAP_APPFONT ( 203 , 29 ) ; @@ -98,6 +103,7 @@ ModalDialog DLG_GLOSSARY }; CheckBox CB_FILE_REL { + HelpID = "sw:CheckBox:DLG_GLOSSARY:CB_FILE_REL"; Pos = MAP_APPFONT ( 14 , 145 ) ; Size = MAP_APPFONT ( 90 , 12 ) ; TabStop = TRUE ; @@ -105,6 +111,7 @@ ModalDialog DLG_GLOSSARY }; CheckBox CB_NET_REL { + HelpID = "sw:CheckBox:DLG_GLOSSARY:CB_NET_REL"; Pos = MAP_APPFONT ( 109 , 145 ) ; Size = MAP_APPFONT ( 90 , 12 ) ; Text [ en-US ] = "Inte~rnet" ; @@ -122,6 +129,7 @@ ModalDialog DLG_GLOSSARY }; CheckBox CB_SHOW_EXAMPLE { + HelpID = "sw:CheckBox:DLG_GLOSSARY:CB_SHOW_EXAMPLE"; Pos = MAP_APPFONT ( 231 , 145 ) ; Size = MAP_APPFONT ( 82 , 12 ) ; Text [ en-US ] = "Sho~w preview"; @@ -148,6 +156,7 @@ ModalDialog DLG_GLOSSARY }; MenuButton PB_EDIT { + HelpID = "sw:MenuButton:DLG_GLOSSARY:PB_EDIT"; Pos = MAP_APPFONT ( 319 , 60 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "AutoTe~xt" ; @@ -155,6 +164,7 @@ ModalDialog DLG_GLOSSARY }; PushButton PB_BIB { + HelpID = "sw:PushButton:DLG_GLOSSARY:PB_BIB"; Pos = MAP_APPFONT ( 319 , 77 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "C~ategories..." ; @@ -162,6 +172,7 @@ ModalDialog DLG_GLOSSARY }; PushButton PB_PATH { + HelpID = "sw:PushButton:DLG_GLOSSARY:PB_PATH"; Pos = MAP_APPFONT ( 319 , 94 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; TabStop = TRUE ; @@ -272,6 +283,12 @@ String STR_GLOSSARY { Text [ en-US ] = "AutoText :" ; }; +/*IAccessibility2 Implementation 2009-----*/ +String STR_ACCESS_SW_CATEGORY +{ + Text [ en-US ] = "Category" ; +}; +/*-----IAccessibility2 Implementation 2009*/ ModalDialog DLG_RENAME_GLOS { OutputSize = TRUE ; @@ -301,6 +318,7 @@ ModalDialog DLG_RENAME_GLOS }; Edit ED_ON { + HelpID = "sw:Edit:DLG_RENAME_GLOS:ED_ON"; ReadOnly = TRUE ; Border = TRUE ; Pos = MAP_APPFONT ( 44 , 12 ) ; @@ -315,6 +333,7 @@ ModalDialog DLG_RENAME_GLOS }; Edit ED_OS { + HelpID = "sw:Edit:DLG_RENAME_GLOS:ED_OS"; ReadOnly = TRUE ; Border = TRUE ; Pos = MAP_APPFONT ( 200 , 12 ) ; @@ -329,6 +348,7 @@ ModalDialog DLG_RENAME_GLOS }; Edit ED_NN { + HelpID = "sw:Edit:DLG_RENAME_GLOS:ED_NN"; TabStop = TRUE ; Border = TRUE ; Pos = MAP_APPFONT ( 44 , 27 ) ; @@ -343,6 +363,7 @@ ModalDialog DLG_RENAME_GLOS }; Edit ED_NS { + HelpID = "sw:Edit:DLG_RENAME_GLOS:ED_NS"; TabStop = TRUE ; Border = TRUE ; Pos = MAP_APPFONT ( 200 , 27 ) ; diff --git a/sw/source/ui/misc/glshell.cxx b/sw/source/ui/misc/glshell.cxx index 765ef4f62b..4bc35a1b8c 100644 --- a/sw/source/ui/misc/glshell.cxx +++ b/sw/source/ui/misc/glshell.cxx @@ -49,6 +49,7 @@ #include <view.hxx> #include <glshell.hxx> #include <doc.hxx> +#include <IDocumentUndoRedo.hxx> #include <glosdoc.hxx> #include <shellio.hxx> #include <initui.hxx> // fuer ::GetGlossaries() @@ -96,7 +97,7 @@ void lcl_Execute( SwDocShell& rSh, SfxRequest& rReq ) void lcl_GetState( SwDocShell& rSh, SfxItemSet& rSet ) { - if( SFX_ITEM_AVAILABLE >= rSet.GetItemState( SID_SAVEDOC, FALSE )) + if( SFX_ITEM_AVAILABLE >= rSet.GetItemState( SID_SAVEDOC, sal_False )) { if( !rSh.GetDoc()->IsModified() ) rSet.DisableItem( SID_SAVEDOC ); @@ -105,7 +106,7 @@ void lcl_GetState( SwDocShell& rSh, SfxItemSet& rSet ) } } -BOOL lcl_Save( SwWrtShell& rSh, const String& rGroupName, +sal_Bool lcl_Save( SwWrtShell& rSh, const String& rGroupName, const String& rShortNm, const String& rLongNm ) { const SvxAutoCorrCfg* pCfg = SvxAutoCorrCfg::Get(); @@ -118,7 +119,7 @@ BOOL lcl_Save( SwWrtShell& rSh, const String& rGroupName, pGlosHdl = rSh.GetView().GetGlosHdl(); pGlosHdl->GetMacros( rShortNm, aStart, aEnd, pBlock ); - USHORT nRet = rSh.SaveGlossaryDoc( *pBlock, rLongNm, rShortNm, + sal_uInt16 nRet = rSh.SaveGlossaryDoc( *pBlock, rLongNm, rShortNm, pCfg->IsSaveRelFile(), pBlock->IsOnlyTextBlock( rShortNm ) ); @@ -158,7 +159,7 @@ void SwGlosDocShell::GetState( SfxItemSet& rSet ) ::lcl_GetState( *this, rSet ); } -BOOL SwGlosDocShell::Save() +sal_Bool SwGlosDocShell::Save() { // In case of an API object which holds this document, it is possible that the WrtShell is already // dead. For instance, if the doc is modified via this API object, and then, upon office shutdown, @@ -169,8 +170,8 @@ BOOL SwGlosDocShell::Save() return ::lcl_Save( *GetWrtShell(), aGroupName, aShortName, aLongName ); else { - SetModified( FALSE ); - return FALSE; + SetModified( sal_False ); + return sal_False; } } @@ -194,21 +195,21 @@ void SwWebGlosDocShell::GetState( SfxItemSet& rSet ) ::lcl_GetState( *this, rSet ); } -BOOL SwWebGlosDocShell::Save() +sal_Bool SwWebGlosDocShell::Save() { // same comment as in SwGlosDocShell::Save - see there if ( GetWrtShell() ) return ::lcl_Save( *GetWrtShell(), aGroupName, aShortName, aLongName ); else { - SetModified( FALSE ); - return FALSE; + SetModified( sal_False ); + return sal_False; } } SV_IMPL_REF ( SwDocShell ) -SwDocShellRef SwGlossaries::EditGroupDoc( const String& rGroup, const String& rShortName, BOOL bShow ) +SwDocShellRef SwGlossaries::EditGroupDoc( const String& rGroup, const String& rShortName, sal_Bool bShow ) { SwDocShellRef xDocSh; @@ -217,7 +218,7 @@ SwDocShellRef SwGlossaries::EditGroupDoc( const String& rGroup, const String& rS { // erfrage welche View registriert ist. Im WebWriter gibts es keine // normale View - USHORT nViewId = 0 != &SwView::Factory() ? 2 : 6; + sal_uInt16 nViewId = 0 != &SwView::Factory() ? 2 : 6; String sLongName = pGroup->GetLongName(pGroup->GetIndex( rShortName )); if( 6 == nViewId ) @@ -245,8 +246,9 @@ SwDocShellRef SwGlossaries::EditGroupDoc( const String& rGroup, const String& rS aDocTitle += ' '; aDocTitle += sLongName; - BOOL bDoesUndo = xDocSh->GetDoc()->DoesUndo(); - xDocSh->GetDoc()->DoUndo( FALSE ); + bool const bDoesUndo = + xDocSh->GetDoc()->GetIDocumentUndoRedo().DoesUndo(); + xDocSh->GetDoc()->GetIDocumentUndoRedo().DoUndo( false ); xDocSh->GetWrtShell()->InsertGlossary( *pGroup, rShortName ); if( !xDocSh->GetDoc()->getPrinter( false ) ) @@ -274,7 +276,7 @@ SwDocShellRef SwGlossaries::EditGroupDoc( const String& rGroup, const String& rS catch( uno::Exception& ) {} - xDocSh->GetDoc()->DoUndo( bDoesUndo ); + xDocSh->GetDoc()->GetIDocumentUndoRedo().DoUndo( bDoesUndo ); xDocSh->GetDoc()->ResetModified(); if ( bShow ) pFrame->GetFrame().Appear(); diff --git a/sw/source/ui/misc/impfnote.hxx b/sw/source/ui/misc/impfnote.hxx index 163eeba357..5516b3e3e9 100644 --- a/sw/source/ui/misc/impfnote.hxx +++ b/sw/source/ui/misc/impfnote.hxx @@ -39,6 +39,7 @@ class SwWrtShell; class SwEndNoteOptionPage : public SfxTabPage { + FixedLine aNumFL; FixedText aNumTypeFT; SwNumberingTypeListBox aNumViewBox; FixedText aOffsetLbl; @@ -52,32 +53,31 @@ class SwEndNoteOptionPage : public SfxTabPage FixedText aPosFT; RadioButton aPosPageBox; RadioButton aPosChapterBox; - FixedLine aNumFL; + FixedLine aTemplFL; FixedText aParaTemplLbl; ListBox aParaTemplBox; FixedText aPageTemplLbl; ListBox aPageTemplBox; - FixedLine aTemplFL; + FixedLine aCharTemplFL; FixedText aFtnCharAnchorTemplLbl; ListBox aFtnCharAnchorTemplBox; FixedText aFtnCharTextTemplLbl; ListBox aFtnCharTextTemplBox; - FixedLine aCharTemplFL; + FixedLine aContFL; FixedText aContLbl; Edit aContEdit; FixedText aContFromLbl; Edit aContFromEdit; - FixedLine aContFL; String aNumDoc; String aNumPage; String aNumChapter; SwWrtShell *pSh; - BOOL bPosDoc; - BOOL bEndNote; + sal_Bool bPosDoc; + sal_Bool bEndNote; inline void SelectNumbering(int eNum); int GetNumbering() const; @@ -88,12 +88,12 @@ class SwEndNoteOptionPage : public SfxTabPage public: - SwEndNoteOptionPage( Window *pParent, BOOL bEndNote, + SwEndNoteOptionPage( Window *pParent, sal_Bool bEndNote, const SfxItemSet &rSet ); ~SwEndNoteOptionPage(); static SfxTabPage *Create(Window *pParent, const SfxItemSet &rSet); - virtual BOOL FillItemSet(SfxItemSet &rSet); + virtual sal_Bool FillItemSet(SfxItemSet &rSet); virtual void Reset( const SfxItemSet& ); void SetShell( SwWrtShell &rShell ); diff --git a/sw/source/ui/misc/insfnote.cxx b/sw/source/ui/misc/insfnote.cxx index f667c0ab7c..efbe591d26 100644 --- a/sw/source/ui/misc/insfnote.cxx +++ b/sw/source/ui/misc/insfnote.cxx @@ -53,7 +53,7 @@ #include <svx/dialogs.hrc> #include <sfx2/viewfrm.hxx> -static BOOL bFootnote = TRUE; +static sal_Bool bFootnote = sal_True; /*------------------------------------------------------------------------ Beschreibung: Einfuegen der Fussnote durch OK @@ -69,14 +69,14 @@ void SwInsFootNoteDlg::Apply() if ( bEdit ) { rSh.StartAction(); - rSh.Left(CRSR_SKIP_CHARS, FALSE, 1, FALSE ); + rSh.Left(CRSR_SKIP_CHARS, sal_False, 1, sal_False ); rSh.StartUndo( UNDO_START ); SwFmtFtn aNote( aEndNoteBtn.IsChecked() ); aNote.SetNumStr( aStr ); if( rSh.SetCurFtn( aNote ) && bExtCharAvailable ) { - rSh.Right(CRSR_SKIP_CHARS, TRUE, 1, FALSE ); + rSh.Right(CRSR_SKIP_CHARS, sal_True, 1, sal_False ); SfxItemSet aSet( rSh.GetAttrPool(), RES_CHRATR_FONT, RES_CHRATR_FONT ); rSh.GetCurAttr( aSet ); SvxFontItem &rFont = (SvxFontItem &) aSet.Get( RES_CHRATR_FONT ); @@ -85,8 +85,8 @@ void SwInsFootNoteDlg::Apply() eCharSet, RES_CHRATR_FONT ); aSet.Put( aFont ); rSh.SetAttr( aSet, nsSetAttrMode::SETATTR_DONTEXPAND ); - rSh.ResetSelect(0, FALSE); - rSh.Left(CRSR_SKIP_CHARS, FALSE, 1, FALSE ); + rSh.ResetSelect(0, sal_False); + rSh.Left(CRSR_SKIP_CHARS, sal_False, 1, sal_False ); } rSh.EndUndo( UNDO_END ); rSh.EndAction(); @@ -109,7 +109,7 @@ IMPL_LINK_INLINE_END( SwInsFootNoteDlg, NumberCharHdl, Button *, EMPTYARG ) IMPL_LINK_INLINE_START( SwInsFootNoteDlg, NumberEditHdl, void *, EMPTYARG ) { - aNumberCharBtn.Check( TRUE ); + aNumberCharBtn.Check( sal_True ); aOkBtn.Enable( 0 != aNumberCharEdit.GetText().Len() ); return 0; @@ -118,21 +118,21 @@ IMPL_LINK_INLINE_END( SwInsFootNoteDlg, NumberEditHdl, void *, EMPTYARG ) IMPL_LINK_INLINE_START( SwInsFootNoteDlg, NumberAutoBtnHdl, Button *, EMPTYARG ) { - aOkBtn.Enable( TRUE ); + aOkBtn.Enable( sal_True ); return 0; } IMPL_LINK_INLINE_END( SwInsFootNoteDlg, NumberAutoBtnHdl, Button *, EMPTYARG ) IMPL_LINK( SwInsFootNoteDlg, NumberExtCharHdl, Button *, EMPTYARG ) { - aNumberCharBtn.Check( TRUE ); + aNumberCharBtn.Check( sal_True ); SfxItemSet aSet( rSh.GetAttrPool(), RES_CHRATR_FONT, RES_CHRATR_FONT ); rSh.GetCurAttr( aSet ); const SvxFontItem &rFont = (SvxFontItem &) aSet.Get( RES_CHRATR_FONT ); SfxAllItemSet aAllSet( rSh.GetAttrPool() ); - aAllSet.Put( SfxBoolItem( FN_PARAM_1, FALSE ) ); + aAllSet.Put( SfxBoolItem( FN_PARAM_1, sal_False ) ); aAllSet.Put( rFont ); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); @@ -140,8 +140,8 @@ IMPL_LINK( SwInsFootNoteDlg, NumberExtCharHdl, Button *, EMPTYARG ) rSh.GetView().GetViewFrame()->GetFrame().GetFrameInterface(), RID_SVXDLG_CHARMAP ); if (RET_OK == pDlg->Execute()) { - SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pItem, SfxStringItem, SID_CHARMAP, FALSE ); - SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pFontItem, SvxFontItem, SID_ATTR_CHAR_FONT, FALSE ); + SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pItem, SfxStringItem, SID_CHARMAP, sal_False ); + SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pFontItem, SvxFontItem, SID_ATTR_CHAR_FONT, sal_False ); if ( pItem ) { String sExtChars(pItem->GetValue()); @@ -157,7 +157,7 @@ IMPL_LINK( SwInsFootNoteDlg, NumberExtCharHdl, Button *, EMPTYARG ) aNumberCharEdit.SetFont( aFont ); } - bExtCharAvailable = TRUE; + bExtCharAvailable = sal_True; aOkBtn.Enable(0 != aNumberCharEdit.GetText().Len()); } } @@ -171,7 +171,7 @@ IMPL_LINK( SwInsFootNoteDlg, NextPrevHdl, Button *, pBtn ) Apply(); // Hier zur naechsten Fuss/Endnote wandern - rSh.ResetSelect(0, FALSE); + rSh.ResetSelect(0, sal_False); if (pBtn == &aNextBT) rSh.GotoNextFtnAnchor(); else @@ -182,22 +182,22 @@ IMPL_LINK( SwInsFootNoteDlg, NextPrevHdl, Button *, pBtn ) return 0; } -SwInsFootNoteDlg::SwInsFootNoteDlg(Window *pParent, SwWrtShell &rShell, BOOL bEd) : +SwInsFootNoteDlg::SwInsFootNoteDlg(Window *pParent, SwWrtShell &rShell, sal_Bool bEd) : SvxStandardDialog(pParent,SW_RES(DLG_INS_FOOTNOTE)), rSh(rShell), - bExtCharAvailable(FALSE), + bExtCharAvailable(sal_False), bEdit(bEd), + aNumberFL (this,SW_RES(FL_NUMBER)), aNumberAutoBtn (this,SW_RES(RB_NUMBER_AUTO)), aNumberCharBtn (this,SW_RES(RB_NUMBER_CHAR)), aNumberCharEdit (this,SW_RES(ED_NUMBER_CHAR)), aNumberExtChar (this,SW_RES(BT_NUMBER_CHAR)), - aNumberFL (this,SW_RES(FL_NUMBER)), + aTypeFL (this,SW_RES(FL_TYPE)), aFtnBtn (this,SW_RES(RB_TYPE_FTN)), aEndNoteBtn (this,SW_RES(RB_TYPE_ENDNOTE)), - aTypeFL (this,SW_RES(FL_TYPE)), aOkBtn (this,SW_RES(BT_OK)), aCancelBtn (this,SW_RES(BT_CANCEL)), @@ -205,6 +205,10 @@ SwInsFootNoteDlg::SwInsFootNoteDlg(Window *pParent, SwWrtShell &rShell, BOOL bEd aPrevBT (this,SW_RES(BT_PREV)), aNextBT (this,SW_RES(BT_NEXT)) { + aNumberCharEdit.SetAccessibleName(String(SW_RES(STR_CHAR))); + aNumberExtChar.SetAccessibleRelationMemberOf(&aNumberFL); + aNumberCharEdit.SetAccessibleRelationLabeledBy(&aNumberCharBtn); + aNumberAutoBtn.SetClickHdl(LINK(this,SwInsFootNoteDlg,NumberAutoBtnHdl)); aNumberExtChar.SetClickHdl(LINK(this,SwInsFootNoteDlg,NumberExtCharHdl)); aNumberCharBtn.SetClickHdl(LINK(this,SwInsFootNoteDlg,NumberCharHdl)); @@ -232,7 +236,7 @@ SwInsFootNoteDlg::~SwInsFootNoteDlg() rSh.SetCareWin(0); if (bEdit) - rSh.ResetSelect(0, FALSE); + rSh.ResetSelect(0, sal_False); } void SwInsFootNoteDlg::Init() @@ -240,7 +244,7 @@ void SwInsFootNoteDlg::Init() SwFmtFtn aFtnNote; String sNumStr; Font aFont; - bExtCharAvailable = FALSE; + bExtCharAvailable = sal_False; rSh.StartAction(); @@ -250,7 +254,7 @@ void SwInsFootNoteDlg::Init() { sNumStr = aFtnNote.GetNumStr(); - rSh.Right(CRSR_SKIP_CHARS, TRUE, 1, FALSE ); + rSh.Right(CRSR_SKIP_CHARS, sal_True, 1, sal_False ); SfxItemSet aSet( rSh.GetAttrPool(), RES_CHRATR_FONT, RES_CHRATR_FONT ); rSh.GetCurAttr( aSet ); const SvxFontItem &rFont = (SvxFontItem &) aSet.Get( RES_CHRATR_FONT ); @@ -260,14 +264,14 @@ void SwInsFootNoteDlg::Init() eCharSet = rFont.GetCharSet(); aFont.SetName(aFontName); aFont.SetCharSet(eCharSet); - bExtCharAvailable = TRUE; - rSh.Left( CRSR_SKIP_CHARS, FALSE, 1, FALSE ); + bExtCharAvailable = sal_True; + rSh.Left( CRSR_SKIP_CHARS, sal_False, 1, sal_False ); } bFootnote = !aFtnNote.IsEndNote(); } aNumberCharEdit.SetFont(aFont); - BOOL bNumChar = sNumStr.Len() != 0; + sal_Bool bNumChar = sNumStr.Len() != 0; aNumberCharEdit.SetText(sNumStr); aNumberCharBtn.Check(bNumChar); @@ -280,12 +284,12 @@ void SwInsFootNoteDlg::Init() else aEndNoteBtn.Check(); - BOOL bNext = rSh.GotoNextFtnAnchor(); + sal_Bool bNext = rSh.GotoNextFtnAnchor(); if (bNext) rSh.GotoPrevFtnAnchor(); - BOOL bPrev = rSh.GotoPrevFtnAnchor(); + sal_Bool bPrev = rSh.GotoPrevFtnAnchor(); if (bPrev) rSh.GotoNextFtnAnchor(); @@ -293,7 +297,7 @@ void SwInsFootNoteDlg::Init() aPrevBT.Enable(bPrev); aNextBT.Enable(bNext); - rSh.Right(CRSR_SKIP_CHARS, TRUE, 1, FALSE ); + rSh.Right(CRSR_SKIP_CHARS, sal_True, 1, sal_False ); rSh.EndAction(); } diff --git a/sw/source/ui/misc/insfnote.hrc b/sw/source/ui/misc/insfnote.hrc index 104693acea..c3649748f0 100644 --- a/sw/source/ui/misc/insfnote.hrc +++ b/sw/source/ui/misc/insfnote.hrc @@ -39,3 +39,7 @@ #define BT_HELP 102 #define BT_PREV 103 #define BT_NEXT 104 + +//IAccessibility2 Implementation 2009----- +#define STR_CHAR 105 +//-----IAccessibility2 Implementation 2009 diff --git a/sw/source/ui/misc/insfnote.src b/sw/source/ui/misc/insfnote.src index 686844fcbe..0081513666 100644 --- a/sw/source/ui/misc/insfnote.src +++ b/sw/source/ui/misc/insfnote.src @@ -31,6 +31,7 @@ // #define DLG_INS_FOOTNOTE 257 ModalDialog DLG_INS_FOOTNOTE { + HelpID = "sw:ModalDialog:DLG_INS_FOOTNOTE"; OutputSize = TRUE ; SVLook = TRUE ; Size = MAP_APPFONT ( 160 , 100 ) ; @@ -38,6 +39,7 @@ ModalDialog DLG_INS_FOOTNOTE Moveable = TRUE ; Edit ED_NUMBER_CHAR { + HelpID = "sw:Edit:DLG_INS_FOOTNOTE:ED_NUMBER_CHAR"; Disable = TRUE ; Border = TRUE ; Pos = MAP_APPFONT ( 69 , 27 ) ; @@ -46,6 +48,12 @@ ModalDialog DLG_INS_FOOTNOTE Group = TRUE ; Left = TRUE ; }; + //IAccessibility2 Implementation 2009----- + String STR_CHAR + { + Text [ en-US ] = "Character" ; + }; + //-----IAccessibility2 Implementation 2009 OKButton BT_OK { Pos = MAP_APPFONT ( 104 , 6 ) ; @@ -70,6 +78,7 @@ ModalDialog DLG_INS_FOOTNOTE }; ImageButton BT_PREV { + HelpID = "sw:ImageButton:DLG_INS_FOOTNOTE:BT_PREV"; Pos = MAP_APPFONT ( 104 , 82 ) ; Size = MAP_APPFONT ( 24 , 14 ) ; TabStop = TRUE ; @@ -78,6 +87,7 @@ ModalDialog DLG_INS_FOOTNOTE }; ImageButton BT_NEXT { + HelpID = "sw:ImageButton:DLG_INS_FOOTNOTE:BT_NEXT"; Pos = MAP_APPFONT ( 130 , 82 ) ; Size = MAP_APPFONT ( 24 , 14 ) ; TabStop = TRUE ; @@ -86,6 +96,7 @@ ModalDialog DLG_INS_FOOTNOTE }; RadioButton RB_NUMBER_AUTO { + HelpID = "sw:RadioButton:DLG_INS_FOOTNOTE:RB_NUMBER_AUTO"; Pos = MAP_APPFONT ( 12 , 14 ) ; Size = MAP_APPFONT ( 79 , 10 ) ; Text [ en-US ] = "~Automatic" ; @@ -95,6 +106,7 @@ ModalDialog DLG_INS_FOOTNOTE }; RadioButton RB_NUMBER_CHAR { + HelpID = "sw:RadioButton:DLG_INS_FOOTNOTE:RB_NUMBER_CHAR"; Pos = MAP_APPFONT ( 12 , 27 ) ; Size = MAP_APPFONT ( 54 , 10 ) ; Text [ en-US ] = "~Character" ; @@ -107,12 +119,14 @@ ModalDialog DLG_INS_FOOTNOTE }; PushButton BT_NUMBER_CHAR { + HelpID = "sw:PushButton:DLG_INS_FOOTNOTE:BT_NUMBER_CHAR"; Pos = MAP_APPFONT ( 69 , 42 ) ; Size = MAP_APPFONT ( 12 , 12 ) ; Text = "..." ; }; RadioButton RB_TYPE_FTN { + HelpID = "sw:RadioButton:DLG_INS_FOOTNOTE:RB_TYPE_FTN"; Pos = MAP_APPFONT ( 12 , 70 ) ; Size = MAP_APPFONT ( 79 , 10 ) ; TabStop = TRUE ; @@ -122,6 +136,7 @@ ModalDialog DLG_INS_FOOTNOTE }; RadioButton RB_TYPE_ENDNOTE { + HelpID = "sw:RadioButton:DLG_INS_FOOTNOTE:RB_TYPE_ENDNOTE"; Pos = MAP_APPFONT ( 12 , 83 ) ; Size = MAP_APPFONT ( 79 , 10 ) ; Text [ en-US ] = "~Endnote" ; diff --git a/sw/source/ui/misc/insrule.cxx b/sw/source/ui/misc/insrule.cxx index e1eee29665..e8074bfc6a 100644 --- a/sw/source/ui/misc/insrule.cxx +++ b/sw/source/ui/misc/insrule.cxx @@ -76,7 +76,7 @@ SwInsertGrfRulerDlg::SwInsertGrfRulerDlg( Window* pParent ) : pExampleVS->InsertItem( 1, 1); pExampleVS->SetItemText( 1, sSimple); - for(USHORT i = 1; i <= aGrfNames.Count(); i++) + for(sal_uInt16 i = 1; i <= aGrfNames.Count(); i++) { pExampleVS->InsertItem( i + 1, i); pExampleVS->SetItemText( i + 1, *((String*)aGrfNames.GetObject(i-1))); @@ -94,7 +94,7 @@ SwInsertGrfRulerDlg::~SwInsertGrfRulerDlg() String SwInsertGrfRulerDlg::GetGraphicName() { String sRet; - USHORT nSel = nSelPos - 2; //align selection position with ValueSet index + sal_uInt16 nSel = nSelPos - 2; //align selection position with ValueSet index if(nSel < aGrfNames.Count()) sRet = URIHelper::SmartRel2Abs( INetURLObject(), *(String*) aGrfNames.GetObject(nSel), @@ -123,7 +123,7 @@ void SwRulerValueSet::UserDraw( const UserDrawEvent& rUDEvt ) { Rectangle aRect = rUDEvt.GetRect(); OutputDevice* pDev = rUDEvt.GetDevice(); - USHORT nItemId = rUDEvt.GetItemId(); + sal_uInt16 nItemId = rUDEvt.GetItemId(); Point aBLPos = aRect.TopLeft(); // Itemzaehlung beginnt bei 1, und die 1. ist die einfache Linie @@ -165,7 +165,7 @@ void SwRulerValueSet::UserDraw( const UserDrawEvent& rUDEvt ) } else { - SetGrfNotFound(TRUE); + SetGrfNotFound(sal_True); } } else diff --git a/sw/source/ui/misc/linenum.cxx b/sw/source/ui/misc/linenum.cxx index fe354a09a0..72f76f8124 100644 --- a/sw/source/ui/misc/linenum.cxx +++ b/sw/source/ui/misc/linenum.cxx @@ -85,6 +85,7 @@ SwLineNumberingPage::SwLineNumberingPage( Window* pParent, const SfxItemSet& rSet ) : SfxTabPage(pParent, SW_RES(TP_LINENUMBERING), rSet), aNumberingOnCB ( this, SW_RES( CB_NUMBERING_ON )), + aDisplayFL ( this, SW_RES( FL_DISPLAY )), aCharStyleFT ( this, SW_RES( FT_CHAR_STYLE )), aCharStyleLB ( this, SW_RES( LB_CHAR_STYLE )), aFormatFT ( this, SW_RES( FT_FORMAT )), @@ -96,19 +97,29 @@ SwLineNumberingPage::SwLineNumberingPage( Window* pParent, aNumIntervalFT ( this, SW_RES( FT_NUM_INVERVAL )), aNumIntervalNF ( this, SW_RES( NF_NUM_INVERVAL )), aNumRowsFT ( this, SW_RES( FT_NUM_ROWS )), - aDisplayFL ( this, SW_RES( FL_DISPLAY )), + aDivisorFL ( this, SW_RES( FL_DIVISOR )), aDivisorFT ( this, SW_RES( FT_DIVISOR )), aDivisorED ( this, SW_RES( ED_DIVISOR )), aDivIntervalFT ( this, SW_RES( FT_DIV_INTERVAL )), aDivIntervalNF ( this, SW_RES( NF_DIV_INTERVAL )), aDivRowsFT ( this, SW_RES( FT_DIV_ROWS )), - aDivisorFL ( this, SW_RES( FL_DIVISOR )), + aCountFL ( this, SW_RES( FL_COUNT )), aCountEmptyLinesCB ( this, SW_RES( CB_COUNT_EMPTYLINES )), aCountFrameLinesCB ( this, SW_RES( CB_COUNT_FRAMELINES )), - aRestartEachPageCB ( this, SW_RES( CB_RESTART_PAGE )), - aCountFL ( this, SW_RES( FL_COUNT )) + aRestartEachPageCB ( this, SW_RES( CB_RESTART_PAGE )) { + String sIntervalName = aDivIntervalFT.GetAccessibleName(); + sIntervalName += String::CreateFromAscii("("); + sIntervalName += aDivRowsFT.GetAccessibleName(); + sIntervalName += String::CreateFromAscii(")"); + aDivIntervalNF.SetAccessibleName(sIntervalName); + sIntervalName = aNumIntervalFT.GetAccessibleName(); + sIntervalName += String::CreateFromAscii("("); + sIntervalName += aNumRowsFT.GetAccessibleName(); + sIntervalName += String::CreateFromAscii(")"); + aNumIntervalNF.SetAccessibleName(sIntervalName); + FreeResource(); SwLineNumberingDlg *pDlg = (SwLineNumberingDlg *)GetParent(); pSh = pDlg->GetWrtShell(); @@ -131,7 +142,7 @@ void SwLineNumberingPage::Reset( const SfxItemSet& ) IDocumentStylePoolAccess* pIDSPA = pSh->getIDocumentStylePoolAccess(); String sStyleName(rInf.GetCharFmt( *pIDSPA )->GetName()); - const USHORT nPos = aCharStyleLB.GetEntryPos(sStyleName); + const sal_uInt16 nPos = aCharStyleLB.GetEntryPos(sStyleName); if (nPos != LISTBOX_ENTRY_NOTFOUND) aCharStyleLB.SelectEntryPos(nPos); @@ -145,15 +156,15 @@ void SwLineNumberingPage::Reset( const SfxItemSet& ) } // Format - USHORT nSelFmt = rInf.GetNumType().GetNumberingType(); + sal_uInt16 nSelFmt = rInf.GetNumType().GetNumberingType(); aFormatLB.SelectNumberingType(nSelFmt); // Position - aPosLB.SelectEntryPos((USHORT)rInf.GetPos()); + aPosLB.SelectEntryPos((sal_uInt16)rInf.GetPos()); // Offset - USHORT nOffset = rInf.GetPosFromLeft(); + sal_uInt16 nOffset = rInf.GetPosFromLeft(); if (nOffset == USHRT_MAX) nOffset = 0; @@ -186,7 +197,7 @@ void SwLineNumberingPage::Reset( const SfxItemSet& ) --------------------------------------------------------------------*/ IMPL_LINK( SwLineNumberingPage, ModifyHdl, Edit *, EMPTYARG ) { - BOOL bHasValue = aDivisorED.GetText().Len() != 0; + sal_Bool bHasValue = aDivisorED.GetText().Len() != 0; aDivIntervalFT.Enable(bHasValue); aDivIntervalNF.Enable(bHasValue); @@ -200,7 +211,7 @@ IMPL_LINK( SwLineNumberingPage, ModifyHdl, Edit *, EMPTYARG ) --------------------------------------------------------------------*/ IMPL_LINK( SwLineNumberingPage, LineOnOffHdl, CheckBox *, EMPTYARG ) { - BOOL bEnable = aNumberingOnCB.IsChecked(); + sal_Bool bEnable = aNumberingOnCB.IsChecked(); aCharStyleFT.Enable(bEnable); aCharStyleLB.Enable(bEnable); @@ -228,7 +239,7 @@ IMPL_LINK( SwLineNumberingPage, LineOnOffHdl, CheckBox *, EMPTYARG ) return 0; } -BOOL SwLineNumberingPage::FillItemSet( SfxItemSet& ) +sal_Bool SwLineNumberingPage::FillItemSet( SfxItemSet& ) { SwLineNumberInfo aInf(pSh->GetLineNumberInfo()); @@ -258,16 +269,16 @@ BOOL SwLineNumberingPage::FillItemSet( SfxItemSet& ) aInf.SetPos((LineNumberPosition)aPosLB.GetSelectEntryPos()); // Offset - aInf.SetPosFromLeft((USHORT)aOffsetMF.Denormalize(aOffsetMF.GetValue(FUNIT_TWIP))); + aInf.SetPosFromLeft((sal_uInt16)aOffsetMF.Denormalize(aOffsetMF.GetValue(FUNIT_TWIP))); // Numerierungsoffset - aInf.SetCountBy((USHORT)aNumIntervalNF.GetValue()); + aInf.SetCountBy((sal_uInt16)aNumIntervalNF.GetValue()); // Teiler aInf.SetDivider(aDivisorED.GetText()); // Teileroffset - aInf.SetDividerCountBy((USHORT)aDivIntervalNF.GetValue()); + aInf.SetDividerCountBy((sal_uInt16)aDivIntervalNF.GetValue()); // Zaehlen aInf.SetCountBlankLines(aCountEmptyLinesCB.IsChecked()); @@ -278,7 +289,7 @@ BOOL SwLineNumberingPage::FillItemSet( SfxItemSet& ) pSh->SetLineNumberInfo(aInf); - return FALSE; + return sal_False; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/misc/linenum.src b/sw/source/ui/misc/linenum.src index 61cee918d7..feb17ca5bb 100644 --- a/sw/source/ui/misc/linenum.src +++ b/sw/source/ui/misc/linenum.src @@ -47,6 +47,7 @@ TabPage TP_LINENUMBERING Size = MAP_APPFONT ( 260 , 185 ) ; CheckBox CB_NUMBERING_ON { + HelpID = "sw:CheckBox:TP_LINENUMBERING:CB_NUMBERING_ON"; Pos = MAP_APPFONT ( 12 , 6 ) ; Size = MAP_APPFONT ( 242 , 8 ) ; TabStop = TRUE ; @@ -60,6 +61,7 @@ TabPage TP_LINENUMBERING }; ListBox LB_CHAR_STYLE { + HelpID = "sw:ListBox:TP_LINENUMBERING:LB_CHAR_STYLE"; Pos = MAP_APPFONT ( 100 , 30 ) ; Size = MAP_APPFONT ( 148 , 80 ) ; TabStop = TRUE ; @@ -74,6 +76,7 @@ TabPage TP_LINENUMBERING }; ListBox LB_FORMAT { + HelpID = "sw:ListBox:TP_LINENUMBERING:LB_FORMAT"; Pos = MAP_APPFONT ( 100 , 44 ) ; Size = MAP_APPFONT ( 148 , 80 ) ; TabStop = TRUE ; @@ -87,6 +90,7 @@ TabPage TP_LINENUMBERING }; ListBox LB_POS { + HelpID = "sw:ListBox:TP_LINENUMBERING:LB_POS"; Pos = MAP_APPFONT ( 100 , 60 ) ; Size = MAP_APPFONT ( 148 , 60 ) ; TabStop = TRUE ; @@ -107,6 +111,7 @@ TabPage TP_LINENUMBERING }; MetricField MF_OFFSET { + HelpID = "sw:MetricField:TP_LINENUMBERING:MF_OFFSET"; Pos = MAP_APPFONT ( 100 , 76 ) ; Size = MAP_APPFONT ( 45 , 12 ) ; Border = TRUE ; @@ -130,6 +135,7 @@ TabPage TP_LINENUMBERING }; NumericField NF_NUM_INVERVAL { + HelpID = "sw:NumericField:TP_LINENUMBERING:NF_NUM_INVERVAL"; Pos = MAP_APPFONT ( 100 , 92 ) ; Size = MAP_APPFONT ( 30 , 12 ) ; Border = TRUE ; @@ -163,6 +169,7 @@ TabPage TP_LINENUMBERING }; Edit ED_DIVISOR { + HelpID = "sw:Edit:TP_LINENUMBERING:ED_DIVISOR"; Pos = MAP_APPFONT ( 45 , 121 ) ; Size = MAP_APPFONT ( 76 , 12 ) ; Left = TRUE ; @@ -177,6 +184,7 @@ TabPage TP_LINENUMBERING }; NumericField NF_DIV_INTERVAL { + HelpID = "sw:NumericField:TP_LINENUMBERING:NF_DIV_INTERVAL"; Pos = MAP_APPFONT ( 45 , 137 ) ; Size = MAP_APPFONT ( 30 , 12 ) ; Border = TRUE ; @@ -205,6 +213,7 @@ TabPage TP_LINENUMBERING }; CheckBox CB_COUNT_EMPTYLINES { + HelpID = "sw:CheckBox:TP_LINENUMBERING:CB_COUNT_EMPTYLINES"; Pos = MAP_APPFONT ( 139 , 121 ) ; Size = MAP_APPFONT ( 110 , 10 ) ; TabStop = TRUE ; @@ -212,6 +221,7 @@ TabPage TP_LINENUMBERING }; CheckBox CB_COUNT_FRAMELINES { + HelpID = "sw:CheckBox:TP_LINENUMBERING:CB_COUNT_FRAMELINES"; Pos = MAP_APPFONT ( 139 , 135 ) ; Size = MAP_APPFONT ( 110 , 10 ) ; TabStop = TRUE ; @@ -219,6 +229,7 @@ TabPage TP_LINENUMBERING }; CheckBox CB_RESTART_PAGE { + HelpID = "sw:CheckBox:TP_LINENUMBERING:CB_RESTART_PAGE"; Pos = MAP_APPFONT ( 139 , 149 ); Size = MAP_APPFONT ( 110 , 10 ); TabStop = TRUE; diff --git a/sw/source/ui/misc/makefile.mk b/sw/source/ui/misc/makefile.mk deleted file mode 100644 index 4448c9acfa..0000000000 --- a/sw/source/ui/misc/makefile.mk +++ /dev/null @@ -1,93 +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=misc -LIBTARGET=no -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -SRS1NAME=$(TARGET) -SRC1FILES=\ - bookmark.src \ - docfnote.src \ - glossary.src \ - glosbib.src \ - insfnote.src \ - insrule.src \ - linenum.src \ - num.src \ - numberingtypelistbox.src \ - outline.src \ - pgfnote.src \ - pggrid.src \ - redlndlg.src \ - srtdlg.src \ - titlepage.src - -EXCEPTIONSFILES = \ - $(SLO)$/bookmark.obj \ - $(SLO)$/docfnote.obj \ - $(SLO)$/glosbib.obj \ - $(SLO)$/glosdoc.obj \ - $(SLO)$/glossary.obj \ - $(SLO)$/glshell.obj \ - $(SLO)$/insfnote.obj \ - $(SLO)$/insrule.obj \ - $(SLO)$/linenum.obj \ - $(SLO)$/num.obj \ - $(SLO)$/numberingtypelistbox.obj \ - $(SLO)$/outline.obj \ - $(SLO)$/pgfnote.obj \ - $(SLO)$/pggrid.obj \ - $(SLO)$/redlndlg.obj \ - $(SLO)$/srtdlg.obj \ - $(SLO)$/swmodalredlineacceptdlg.obj \ - $(SLO)$/titlepage.obj - - -SLOFILES = \ - $(EXCEPTIONSFILES) - -LIB1TARGET = $(SLB)$/$(TARGET).lib - -LIB1OBJFILES = \ - $(SLO)$/glosdoc.obj \ - $(SLO)$/glshell.obj \ - $(SLO)$/numberingtypelistbox.obj \ - $(SLO)$/redlndlg.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/ui/misc/num.cxx b/sw/source/ui/misc/num.cxx index 68212bf73f..f42cd9a9ed 100644 --- a/sw/source/ui/misc/num.cxx +++ b/sw/source/ui/misc/num.cxx @@ -76,14 +76,14 @@ #include <svl/aeitem.hxx> #include <svl/slstitm.hxx> -static BOOL bLastRelative = FALSE; +static sal_Bool bLastRelative = sal_False; SwNumPositionTabPage::SwNumPositionTabPage(Window* pParent, const SfxItemSet& rSet) : SfxTabPage( pParent, SW_RES( TP_NUM_POSITION ), rSet ), - aPositionFL( this, SW_RES(FL_POSITION )), aLevelFL( this, SW_RES(FL_LEVEL )), aLevelLB( this, SW_RES(LB_LEVEL )), + aPositionFL( this, SW_RES(FL_POSITION )), aDistBorderFT( this, SW_RES(FT_BORDERDIST )), aDistBorderMF( this, SW_RES(MF_BORDERDIST )), @@ -112,18 +112,21 @@ SwNumPositionTabPage::SwNumPositionTabPage(Window* pParent, pSaveNum(0), pWrtSh(0), pOutlineDlg(0), - bPreset( FALSE ), - bInInintControl(FALSE), + bPreset( sal_False ), + bInInintControl(sal_False), bLabelAlignmentPosAndSpaceModeActive( false ) { FreeResource(); SetExchangeSupport(); aPreviewWIN.SetBackground(Wallpaper(Color(COL_TRANSPARENT))); + + aStandardPB.SetAccessibleRelationMemberOf(&aPositionFL); + aRelativeCB.Check(); aAlignLB.SetSelectHdl(LINK(this, SwNumPositionTabPage, EditModifyHdl)); aAlign2LB.SetSelectHdl(LINK(this, SwNumPositionTabPage, EditModifyHdl)); - for ( USHORT i = 0; i < aAlignLB.GetEntryCount(); ++i ) + for ( sal_uInt16 i = 0; i < aAlignLB.GetEntryCount(); ++i ) { aAlign2LB.InsertEntry( aAlignLB.GetEntry( i ) ); } @@ -164,7 +167,7 @@ SwNumPositionTabPage::SwNumPositionTabPage(Window* pParent, aStandardPB.SetClickHdl(LINK(this, SwNumPositionTabPage, StandardHdl)); // Ebenen einfuegen - for(USHORT i = 1; i <= MAXLEVEL; i++) + for(sal_uInt16 i = 1; i <= MAXLEVEL; i++) aLevelLB.InsertEntry(String::CreateFromInt32(i)); String sEntry(String::CreateFromAscii("1 - ")); sEntry += String::CreateFromInt32(MAXLEVEL); @@ -182,7 +185,7 @@ SwNumPositionTabPage::~SwNumPositionTabPage() void SwNumPositionTabPage::InitControls() { - bInInintControl = TRUE; + bInInintControl = sal_True; const bool bRelative = !bLabelAlignmentPosAndSpaceModeActive && aRelativeCB.IsEnabled() && aRelativeCB.IsChecked(); const bool bSingleSelection = aLevelLB.GetSelectEntryCount() == 1 && @@ -205,10 +208,10 @@ void SwNumPositionTabPage::InitControls() bool bSameIndentAt = bLabelAlignmentPosAndSpaceModeActive; const SwNumFmt* aNumFmtArr[MAXLEVEL]; - USHORT nMask = 1; - USHORT nLvl = USHRT_MAX; + sal_uInt16 nMask = 1; + sal_uInt16 nLvl = USHRT_MAX; long nFirstBorderTextRelative = -1; - for(USHORT i = 0; i < MAXLEVEL; i++) + for(sal_uInt16 i = 0; i < MAXLEVEL; i++) { aNumFmtArr[i] = &pActNum->Get(i); if(nActNumLvl & nMask) @@ -278,7 +281,7 @@ void SwNumPositionTabPage::InitControls() aDistBorderMF.SetValue(aDistBorderMF.Normalize(nDistBorderNum),FUNIT_TWIP); } else - bSetDistEmpty = TRUE; + bSetDistEmpty = sal_True; if(bSameDist) aDistNumMF .SetValue(aDistNumMF.Normalize(aNumFmtArr[nLvl]->GetCharTextDistance()), FUNIT_TWIP); @@ -291,7 +294,7 @@ void SwNumPositionTabPage::InitControls() if(bSameAdjust) { - USHORT nPos = 1; // zentriert + sal_uInt16 nPos = 1; // zentriert if(aNumFmtArr[nLvl]->GetNumAdjust() == SVX_ADJUST_LEFT) nPos = 0; else if(aNumFmtArr[nLvl]->GetNumAdjust() == SVX_ADJUST_RIGHT) @@ -307,7 +310,7 @@ void SwNumPositionTabPage::InitControls() if ( bSameLabelFollowedBy ) { - USHORT nPos = 0; // LISTTAB + sal_uInt16 nPos = 0; // LISTTAB if ( aNumFmtArr[nLvl]->GetLabelFollowedBy() == SvxNumberFormat::SPACE ) { nPos = 1; @@ -365,19 +368,19 @@ void SwNumPositionTabPage::InitControls() aIndentAtMF.SetText(aEmptyStr); } - if(TRUE == bSetDistEmpty) + if(sal_True == bSetDistEmpty) aDistBorderMF.SetText(aEmptyStr); - bInInintControl = FALSE; + bInInintControl = sal_False; } void SwNumPositionTabPage::ActivatePage(const SfxItemSet& ) { const SfxPoolItem* pItem; - UINT16 nTmpNumLvl = + sal_uInt16 nTmpNumLvl = pOutlineDlg ? pOutlineDlg->GetActNumLevel() : 0; const SfxItemSet* pExampleSet = GetTabDialog()->GetExampleSet(); - if(pExampleSet && pExampleSet->GetItemState(FN_PARAM_NUM_PRESET, FALSE, &pItem)) + if(pExampleSet && pExampleSet->GetItemState(FN_PARAM_NUM_PRESET, sal_False, &pItem)) { bPreset = ((const SfxBoolItem*)pItem)->GetValue(); } @@ -387,18 +390,18 @@ void SwNumPositionTabPage::ActivatePage(const SfxItemSet& ) { *pActNum = *pSaveNum; nActNumLvl = nTmpNumLvl; - USHORT nMask = 1; - aLevelLB.SetUpdateMode(FALSE); + sal_uInt16 nMask = 1; + aLevelLB.SetUpdateMode(sal_False); aLevelLB.SetNoSelection(); aLevelLB.SelectEntryPos( MAXLEVEL, nActNumLvl == USHRT_MAX); if(nActNumLvl != USHRT_MAX) - for(USHORT i = 0; i < MAXLEVEL; i++) + for(sal_uInt16 i = 0; i < MAXLEVEL; i++) { if(nActNumLvl & nMask) - aLevelLB.SelectEntryPos( i, TRUE); + aLevelLB.SelectEntryPos( i, sal_True); nMask <<= 1 ; } - aLevelLB.SetUpdateMode(TRUE); + aLevelLB.SetUpdateMode(sal_True); InitPosAndSpaceMode(); ShowControlsDependingOnPosAndSpaceMode(); @@ -414,11 +417,11 @@ int SwNumPositionTabPage::DeactivatePage(SfxItemSet *_pSet) SwOutlineTabDialog::SetActNumLevel(nActNumLvl); if(_pSet) FillItemSet(*_pSet); - return TRUE; + return sal_True; } -BOOL SwNumPositionTabPage::FillItemSet( SfxItemSet& rSet ) +sal_Bool SwNumPositionTabPage::FillItemSet( SfxItemSet& rSet ) { if(pOutlineDlg) *pOutlineDlg->GetNumRule() = *pActNum; @@ -426,7 +429,7 @@ BOOL SwNumPositionTabPage::FillItemSet( SfxItemSet& rSet ) { *pSaveNum = *pActNum; rSet.Put(SwUINumRuleItem( *pSaveNum )); - rSet.Put(SfxBoolItem(FN_PARAM_NUM_PRESET, FALSE)); + rSet.Put(SfxBoolItem(FN_PARAM_NUM_PRESET, sal_False)); } return bModified; } @@ -437,27 +440,27 @@ void SwNumPositionTabPage::Reset( const SfxItemSet& rSet ) if(pOutlineDlg) { pSaveNum = pOutlineDlg->GetNumRule(); - aLevelLB.EnableMultiSelection(FALSE); + aLevelLB.EnableMultiSelection(sal_False); } - else if(SFX_ITEM_SET == rSet.GetItemState(FN_PARAM_ACT_NUMBER, FALSE, &pItem)) + else if(SFX_ITEM_SET == rSet.GetItemState(FN_PARAM_ACT_NUMBER, sal_False, &pItem)) pSaveNum = ((SwUINumRuleItem*)pItem)->GetNumRule(); nActNumLvl = SwOutlineTabDialog::GetActNumLevel(); - USHORT nMask = 1; - aLevelLB.SetUpdateMode(FALSE); + sal_uInt16 nMask = 1; + aLevelLB.SetUpdateMode(sal_False); aLevelLB.SetNoSelection(); if(nActNumLvl == USHRT_MAX) { - aLevelLB.SelectEntryPos( MAXLEVEL, TRUE); + aLevelLB.SelectEntryPos( MAXLEVEL, sal_True); } else - for(USHORT i = 0; i < MAXLEVEL; i++) + for(sal_uInt16 i = 0; i < MAXLEVEL; i++) { if(nActNumLvl & nMask) - aLevelLB.SelectEntryPos( i, TRUE); + aLevelLB.SelectEntryPos( i, sal_True); nMask <<= 1; } - aLevelLB.SetUpdateMode(TRUE); + aLevelLB.SetUpdateMode(sal_True); if(!pActNum) pActNum = new SwNumRule(*pSaveNum); @@ -467,7 +470,7 @@ void SwNumPositionTabPage::Reset( const SfxItemSet& rSet ) InitPosAndSpaceMode(); ShowControlsDependingOnPosAndSpaceMode(); InitControls(); - bModified = FALSE; + bModified = sal_False; } void SwNumPositionTabPage::InitPosAndSpaceMode() @@ -481,8 +484,8 @@ void SwNumPositionTabPage::InitPosAndSpaceMode() SvxNumberFormat::SvxNumPositionAndSpaceMode ePosAndSpaceMode = SvxNumberFormat::LABEL_ALIGNMENT; - USHORT nMask = 1; - for( USHORT i = 0; i < MAXLEVEL; ++i ) + sal_uInt16 nMask = 1; + for( sal_uInt16 i = 0; i < MAXLEVEL; ++i ) { if(nActNumLvl & nMask) { @@ -572,14 +575,14 @@ void SwNumPositionTabPage::SetWrtShell(SwWrtShell* pSh) IMPL_LINK( SwNumPositionTabPage, EditModifyHdl, Edit *, EMPTYARG ) { - USHORT nMask = 1; - for(USHORT i = 0; i < MAXLEVEL; i++) + sal_uInt16 nMask = 1; + for(sal_uInt16 i = 0; i < MAXLEVEL; i++) { if(nActNumLvl & nMask) { SwNumFmt aNumFmt(pActNum->Get(i)); - const USHORT nPos = aAlignLB.IsVisible() + const sal_uInt16 nPos = aAlignLB.IsVisible() ? aAlignLB.GetSelectEntryPos() : aAlign2LB.GetSelectEntryPos(); SvxAdjust eAdjust = SVX_ADJUST_CENTER; @@ -598,33 +601,33 @@ IMPL_LINK( SwNumPositionTabPage, EditModifyHdl, Edit *, EMPTYARG ) IMPL_LINK( SwNumPositionTabPage, LevelHdl, ListBox *, pBox ) { - USHORT nSaveNumLvl = nActNumLvl; + sal_uInt16 nSaveNumLvl = nActNumLvl; nActNumLvl = 0; if(pBox->IsEntryPosSelected( MAXLEVEL ) && (pBox->GetSelectEntryCount() == 1 || nSaveNumLvl != 0xffff)) { nActNumLvl = 0xFFFF; - pBox->SetUpdateMode(FALSE); - for( USHORT i = 0; i < MAXLEVEL; i++ ) - pBox->SelectEntryPos( i, FALSE ); - pBox->SetUpdateMode(TRUE); + pBox->SetUpdateMode(sal_False); + for( sal_uInt16 i = 0; i < MAXLEVEL; i++ ) + pBox->SelectEntryPos( i, sal_False ); + pBox->SetUpdateMode(sal_True); } else if(pBox->GetSelectEntryCount()) { - USHORT nMask = 1; - for( USHORT i = 0; i < MAXLEVEL; i++ ) + sal_uInt16 nMask = 1; + for( sal_uInt16 i = 0; i < MAXLEVEL; i++ ) { if(pBox->IsEntryPosSelected( i )) nActNumLvl |= nMask; nMask <<= 1; } - pBox->SelectEntryPos( MAXLEVEL, FALSE ); + pBox->SelectEntryPos( MAXLEVEL, sal_False ); } else { nActNumLvl = nSaveNumLvl; - USHORT nMask = 1; - for( USHORT i = 0; i < MAXLEVEL; i++ ) + sal_uInt16 nMask = 1; + for( sal_uInt16 i = 0; i < MAXLEVEL; i++ ) { if(nActNumLvl & nMask) { @@ -647,8 +650,8 @@ IMPL_LINK( SwNumPositionTabPage, DistanceHdl, MetricField *, pFld ) if(bInInintControl) return 0; long nValue = static_cast< long >(pFld->Denormalize(pFld->GetValue(FUNIT_TWIP))); - USHORT nMask = 1; - for(USHORT i = 0; i < MAXLEVEL; i++) + sal_uInt16 nMask = 1; + for(sal_uInt16 i = 0; i < MAXLEVEL; i++) { if(nActNumLvl & nMask) { @@ -661,7 +664,7 @@ IMPL_LINK( SwNumPositionTabPage, DistanceHdl, MetricField *, pFld ) if(0 == i) { long nTmp = aNumFmt.GetFirstLineOffset(); - aNumFmt.SetAbsLSpace( USHORT(nValue - nTmp)); + aNumFmt.SetAbsLSpace( sal_uInt16(nValue - nTmp)); } else { @@ -669,7 +672,7 @@ IMPL_LINK( SwNumPositionTabPage, DistanceHdl, MetricField *, pFld ) pActNum->Get( i - 1 ).GetFirstLineOffset() - pActNum->Get( i ).GetFirstLineOffset(); - aNumFmt.SetAbsLSpace( USHORT(nValue + nTmp)); + aNumFmt.SetAbsLSpace( sal_uInt16(nValue + nTmp)); } } else @@ -686,7 +689,7 @@ IMPL_LINK( SwNumPositionTabPage, DistanceHdl, MetricField *, pFld ) //jetzt muss mit dem FirstLineOffset auch der AbsLSpace veraendert werden long nDiff = nValue + aNumFmt.GetFirstLineOffset(); long nAbsLSpace = aNumFmt.GetAbsLSpace(); - aNumFmt.SetAbsLSpace(USHORT(nAbsLSpace + nDiff)); + aNumFmt.SetAbsLSpace(sal_uInt16(nAbsLSpace + nDiff)); aNumFmt.SetFirstLineOffset( -(short)nValue ); } @@ -704,16 +707,16 @@ IMPL_LINK( SwNumPositionTabPage, DistanceHdl, MetricField *, pFld ) IMPL_LINK( SwNumPositionTabPage, RelativeHdl, CheckBox *, pBox ) { - BOOL bOn = pBox->IsChecked(); - BOOL bSingleSelection = aLevelLB.GetSelectEntryCount() == 1 && USHRT_MAX != nActNumLvl; - BOOL bSetValue = FALSE; + sal_Bool bOn = pBox->IsChecked(); + sal_Bool bSingleSelection = aLevelLB.GetSelectEntryCount() == 1 && USHRT_MAX != nActNumLvl; + sal_Bool bSetValue = sal_False; long nValue = 0; if(bOn || bSingleSelection) { - USHORT nMask = 1; - BOOL bFirst = TRUE; - bSetValue = TRUE; - for(USHORT i = 0; i < MAXLEVEL; i++) + sal_uInt16 nMask = 1; + sal_Bool bFirst = sal_True; + bSetValue = sal_True; + for(sal_uInt16 i = 0; i < MAXLEVEL; i++) { if(nActNumLvl & nMask) { @@ -726,7 +729,7 @@ IMPL_LINK( SwNumPositionTabPage, RelativeHdl, CheckBox *, pBox ) } else bSetValue = nValue == rNumFmt.GetAbsLSpace() - pActNum->Get(i - 1).GetAbsLSpace(); - bFirst = FALSE; + bFirst = sal_False; } nMask <<= 1; } @@ -747,7 +750,7 @@ IMPL_LINK( SwNumPositionTabPage, LabelFollowedByHdl_Impl, ListBox*, EMPTYARG ) SvxNumberFormat::SvxNumLabelFollowedBy eLabelFollowedBy = SvxNumberFormat::LISTTAB; { - const USHORT nPos = aLabelFollowedByLB.GetSelectEntryPos(); + const sal_uInt16 nPos = aLabelFollowedByLB.GetSelectEntryPos(); if ( nPos == 1 ) { eLabelFollowedBy = SvxNumberFormat::SPACE; @@ -760,9 +763,9 @@ IMPL_LINK( SwNumPositionTabPage, LabelFollowedByHdl_Impl, ListBox*, EMPTYARG ) // set value at the chosen list levels bool bSameListtabPos = true; - USHORT nFirstLvl = USHRT_MAX; - USHORT nMask = 1; - for( USHORT i = 0; i < MAXLEVEL; ++i ) + sal_uInt16 nFirstLvl = USHRT_MAX; + sal_uInt16 nMask = 1; + for( sal_uInt16 i = 0; i < MAXLEVEL; ++i ) { if ( nActNumLvl & nMask ) { @@ -809,8 +812,8 @@ IMPL_LINK( SwNumPositionTabPage, ListtabPosHdl_Impl, MetricField*, pFld ) const long nValue = static_cast< long >(pFld->Denormalize(pFld->GetValue(FUNIT_TWIP))); // set value at the chosen list levels - USHORT nMask = 1; - for( USHORT i = 0; i < MAXLEVEL; ++i ) + sal_uInt16 nMask = 1; + for( sal_uInt16 i = 0; i < MAXLEVEL; ++i ) { if ( nActNumLvl & nMask ) { @@ -832,8 +835,8 @@ IMPL_LINK( SwNumPositionTabPage, AlignAtHdl_Impl, MetricField*, pFld ) const long nValue = static_cast< long >(pFld->Denormalize(pFld->GetValue(FUNIT_TWIP))); // set value at the chosen list levels - USHORT nMask = 1; - for( USHORT i = 0; i < MAXLEVEL; ++i ) + sal_uInt16 nMask = 1; + for( sal_uInt16 i = 0; i < MAXLEVEL; ++i ) { if ( nActNumLvl & nMask ) { @@ -856,8 +859,8 @@ IMPL_LINK( SwNumPositionTabPage, IndentAtHdl_Impl, MetricField*, pFld ) const long nValue = static_cast< long >(pFld->Denormalize(pFld->GetValue(FUNIT_TWIP))); // set value at the chosen list levels - USHORT nMask = 1; - for( USHORT i = 0; i < MAXLEVEL; ++i ) + sal_uInt16 nMask = 1; + for( sal_uInt16 i = 0; i < MAXLEVEL; ++i ) { if ( nActNumLvl & nMask ) { @@ -879,8 +882,8 @@ IMPL_LINK( SwNumPositionTabPage, IndentAtHdl_Impl, MetricField*, pFld ) IMPL_LINK( SwNumPositionTabPage, StandardHdl, PushButton *, EMPTYARG ) { - USHORT nMask = 1; - for(USHORT i = 0; i < MAXLEVEL; i++) + sal_uInt16 nMask = 1; + for(sal_uInt16 i = 0; i < MAXLEVEL; i++) { if(nActNumLvl & nMask) { @@ -915,9 +918,9 @@ IMPL_LINK( SwNumPositionTabPage, StandardHdl, PushButton *, EMPTYARG ) } #if OSL_DEBUG_LEVEL > 1 -void SwNumPositionTabPage::SetModified(BOOL bRepaint) +void SwNumPositionTabPage::SetModified(sal_Bool bRepaint) { - bModified = TRUE; + bModified = sal_True; if(bRepaint) { aPreviewWIN.SetLevel(nActNumLvl); @@ -929,7 +932,7 @@ void SwNumPositionTabPage::SetModified(BOOL bRepaint) SwSvxNumBulletTabDialog::SwSvxNumBulletTabDialog(Window* pParent, const SfxItemSet* pSwItemSet, SwWrtShell & rSh) : - SfxTabDialog(pParent, SW_RES(DLG_SVXTEST_NUM_BULLET), pSwItemSet, FALSE, &aEmptyStr), + SfxTabDialog(pParent, SW_RES(DLG_SVXTEST_NUM_BULLET), pSwItemSet, sal_False, &aEmptyStr), rWrtSh(rSh), sRemoveText(SW_RES(ST_RESET)), nRetOptionsDialog(USHRT_MAX) @@ -939,7 +942,7 @@ SwSvxNumBulletTabDialog::SwSvxNumBulletTabDialog(Window* pParent, GetUserButton()->SetHelpId(HID_NUM_RESET); GetUserButton()->SetClickHdl(LINK(this, SwSvxNumBulletTabDialog, RemoveNumberingHdl)); if(!rWrtSh.GetCurNumRule()) - GetUserButton()->Enable(FALSE); + GetUserButton()->Enable(sal_False); AddTabPage( RID_SVXPAGE_PICK_SINGLE_NUM ); AddTabPage( RID_SVXPAGE_PICK_BULLET ); AddTabPage( RID_SVXPAGE_PICK_NUM ); @@ -953,7 +956,7 @@ SwSvxNumBulletTabDialog::~SwSvxNumBulletTabDialog() { } -void SwSvxNumBulletTabDialog::PageCreated(USHORT nPageId, SfxTabPage& rPage) +void SwSvxNumBulletTabDialog::PageCreated(sal_uInt16 nPageId, SfxTabPage& rPage) { //Namen der Vorlagen und Metric setzen String sNumCharFmt, sBulletCharFmt; @@ -990,7 +993,7 @@ void SwSvxNumBulletTabDialog::PageCreated(USHORT nPageId, SfxTabPage& rPage) SwDocShell* pDocShell = rWrtSh.GetView().GetDocShell(); ::FillCharStyleListBox(rCharFmtLB, pDocShell); List aList; - for(USHORT j = 0; j < rCharFmtLB.GetEntryCount(); j++) + for(sal_uInt16 j = 0; j < rCharFmtLB.GetEntryCount(); j++) { aList.Insert( new XubString(rCharFmtLB.GetEntry(j)), LIST_APPEND ); @@ -998,9 +1001,9 @@ void SwSvxNumBulletTabDialog::PageCreated(USHORT nPageId, SfxTabPage& rPage) aSet.Put( SfxStringListItem( SID_CHAR_FMT_LIST_BOX,&aList ) ) ; FieldUnit eMetric = ::GetDfltMetric(0 != PTR_CAST(SwWebDocShell, pDocShell)); - aSet.Put ( SfxAllEnumItem(SID_METRIC_ITEM, static_cast< USHORT >(eMetric) ) ); + aSet.Put ( SfxAllEnumItem(SID_METRIC_ITEM, static_cast< sal_uInt16 >(eMetric) ) ); rPage.PageCreated(aSet); - for( USHORT i = (USHORT)aList.Count(); i; --i ) + for( sal_uInt16 i = (sal_uInt16)aList.Count(); i; --i ) delete (XubString*)aList.Remove(i); aList.Clear(); } @@ -1010,7 +1013,7 @@ void SwSvxNumBulletTabDialog::PageCreated(USHORT nPageId, SfxTabPage& rPage) SwDocShell* pDocShell = rWrtSh.GetView().GetDocShell(); FieldUnit eMetric = ::GetDfltMetric(0 != PTR_CAST(SwWebDocShell, pDocShell)); SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool())); - aSet.Put ( SfxAllEnumItem(SID_METRIC_ITEM, static_cast< USHORT >(eMetric)) ); + aSet.Put ( SfxAllEnumItem(SID_METRIC_ITEM, static_cast< sal_uInt16 >(eMetric)) ); rPage.PageCreated(aSet); } break; diff --git a/sw/source/ui/misc/num.src b/sw/source/ui/misc/num.src index f8951b2ccf..3d5f83f4eb 100644 --- a/sw/source/ui/misc/num.src +++ b/sw/source/ui/misc/num.src @@ -53,6 +53,7 @@ TabPage TP_NUM_POSITION }; MultiListBox LB_LEVEL { + HelpID = "sw:MultiListBox:TP_NUM_POSITION:LB_LEVEL"; Pos = MAP_APPFONT ( 12 , 14 ) ; Size = MAP_APPFONT ( 26 , 163 ) ; TabStop = TRUE ; @@ -75,6 +76,7 @@ TabPage TP_NUM_POSITION }; MetricField MF_BORDERDIST { + HelpID = "sw:MetricField:TP_NUM_POSITION:MF_BORDERDIST"; Pos = MAP_APPFONT ( 198 , 25 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; Border = TRUE ; @@ -93,6 +95,7 @@ TabPage TP_NUM_POSITION }; CheckBox CB_RELATIVE { + HelpID = "sw:CheckBox:TP_NUM_POSITION:CB_RELATIVE"; Pos = MAP_APPFONT ( 198 , 41 ) ; Size = MAP_APPFONT ( 52 , 10 ) ; Text [ en-US ] = "Relati~ve" ; @@ -105,6 +108,7 @@ TabPage TP_NUM_POSITION }; MetricField MF_INDENT { + HelpID = "sw:MetricField:TP_NUM_POSITION:MF_INDENT"; Pos = MAP_APPFONT ( 198 , 57 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; Border = TRUE ; @@ -129,6 +133,7 @@ TabPage TP_NUM_POSITION }; MetricField MF_NUMDIST { + HelpID = "sw:MetricField:TP_NUM_POSITION:MF_NUMDIST"; Pos = MAP_APPFONT ( 198 , 73 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; Left = TRUE ; @@ -153,6 +158,7 @@ TabPage TP_NUM_POSITION }; ListBox LB_ALIGN { + HelpID = "sw:ListBox:TP_NUM_POSITION:LB_ALIGN"; Pos = MAP_APPFONT ( 198 , 89 ) ; Size = MAP_APPFONT ( 40 , 40 ) ; TabStop = TRUE ; @@ -172,6 +178,7 @@ TabPage TP_NUM_POSITION }; ListBox LB_LABEL_FOLLOWED_BY { + HelpID = "sw:ListBox:TP_NUM_POSITION:LB_LABEL_FOLLOWED_BY"; Pos = MAP_APPFONT ( 198 , 25 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; TabStop = TRUE ; @@ -192,6 +199,7 @@ TabPage TP_NUM_POSITION }; MetricField MF_LISTTAB { + HelpID = "sw:MetricField:TP_NUM_POSITION:MF_LISTTAB"; Pos = MAP_APPFONT ( 198 , 41 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; Border = TRUE ; @@ -215,6 +223,7 @@ TabPage TP_NUM_POSITION }; ListBox LB_ALIGN_2 { + HelpID = "sw:ListBox:TP_NUM_POSITION:LB_ALIGN_2"; Pos = MAP_APPFONT ( 198 , 57 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; TabStop = TRUE ; @@ -228,6 +237,7 @@ TabPage TP_NUM_POSITION }; MetricField MF_ALIGNED_AT { + HelpID = "sw:MetricField:TP_NUM_POSITION:MF_ALIGNED_AT"; Pos = MAP_APPFONT ( 198 , 73 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; Left = TRUE ; @@ -252,6 +262,7 @@ TabPage TP_NUM_POSITION }; MetricField MF_INDENT_AT { + HelpID = "sw:MetricField:TP_NUM_POSITION:MF_INDENT_AT"; Pos = MAP_APPFONT ( 198 , 89 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; Left = TRUE ; @@ -270,6 +281,7 @@ TabPage TP_NUM_POSITION }; PushButton PB_STANDARD { + HelpID = "sw:PushButton:TP_NUM_POSITION:PB_STANDARD"; Pos = MAP_APPFONT ( 198 , 165 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "Default" ; diff --git a/sw/source/ui/misc/numberingtypelistbox.cxx b/sw/source/ui/misc/numberingtypelistbox.cxx index 04594b059d..4dcdad06a8 100644 --- a/sw/source/ui/misc/numberingtypelistbox.cxx +++ b/sw/source/ui/misc/numberingtypelistbox.cxx @@ -48,7 +48,7 @@ struct SwNumberingTypeListBox_Impl }; SwNumberingTypeListBox::SwNumberingTypeListBox( Window* pWin, const ResId& rResId, - USHORT nTypeFlags ) : + sal_uInt16 nTypeFlags ) : ListBox(pWin, rResId), pImpl(new SwNumberingTypeListBox_Impl) { @@ -67,7 +67,7 @@ SwNumberingTypeListBox::~SwNumberingTypeListBox() delete pImpl; } -void SwNumberingTypeListBox::Reload(USHORT nTypeFlags) +void SwNumberingTypeListBox::Reload(sal_uInt16 nTypeFlags) { Clear(); uno::Sequence<sal_Int16> aTypes; @@ -86,7 +86,7 @@ void SwNumberingTypeListBox::Reload(USHORT nTypeFlags) { long nValue = rNames.GetValue(i); sal_Bool bInsert = sal_True; - USHORT nPos = LISTBOX_APPEND; + sal_uInt16 nPos = LISTBOX_APPEND; switch(nValue) { case style::NumberingType::NUMBER_NONE: @@ -116,7 +116,7 @@ void SwNumberingTypeListBox::Reload(USHORT nTypeFlags) } if(bInsert) { - USHORT nEntry = InsertEntry(rNames.GetString(i), nPos); + sal_uInt16 nEntry = InsertEntry(rNames.GetString(i), nPos); SetEntryData( nEntry, (void*)nValue ); } } @@ -129,11 +129,11 @@ void SwNumberingTypeListBox::Reload(USHORT nTypeFlags) sal_Int16 nCurrent = pTypes[nType]; if(nCurrent > style::NumberingType::CHARS_LOWER_LETTER_N) { - if(LISTBOX_ENTRY_NOTFOUND == GetEntryPos((void*)(ULONG)nCurrent)) + if(LISTBOX_ENTRY_NOTFOUND == GetEntryPos((void*)(sal_uLong)nCurrent)) { OUString aIdent = pImpl->xInfo->getNumberingIdentifier( nCurrent ); - USHORT nPos = InsertEntry(aIdent); - SetEntryData(nPos,(void*)(ULONG)nCurrent); + sal_uInt16 nPos = InsertEntry(aIdent); + SetEntryData(nPos,(void*)(sal_uLong)nCurrent); } } } @@ -145,9 +145,9 @@ void SwNumberingTypeListBox::Reload(USHORT nTypeFlags) sal_Int16 SwNumberingTypeListBox::GetSelectedNumberingType() { sal_Int16 nRet = 0; - USHORT nSelPos = GetSelectEntryPos(); + sal_uInt16 nSelPos = GetSelectEntryPos(); if(LISTBOX_ENTRY_NOTFOUND != nSelPos) - nRet = (sal_Int16)(ULONG)GetEntryData(nSelPos); + nRet = (sal_Int16)(sal_uLong)GetEntryData(nSelPos); #if OSL_DEBUG_LEVEL > 1 else OSL_ENSURE(false, "SwNumberingTypeListBox not selected"); @@ -157,7 +157,7 @@ sal_Int16 SwNumberingTypeListBox::GetSelectedNumberingType() sal_Bool SwNumberingTypeListBox::SelectNumberingType(sal_Int16 nType) { - USHORT nPos = GetEntryPos((void*)(ULONG)nType); + sal_uInt16 nPos = GetEntryPos((void*)(sal_uLong)nType); SelectEntryPos( nPos ); return LISTBOX_ENTRY_NOTFOUND != nPos; } diff --git a/sw/source/ui/misc/outline.cxx b/sw/source/ui/misc/outline.cxx index 9fd0424545..b69393b0f7 100644 --- a/sw/source/ui/misc/outline.cxx +++ b/sw/source/ui/misc/outline.cxx @@ -70,15 +70,19 @@ #include <IDocumentOutlineNodes.hxx> #include <app.hrc> +#ifndef _COM_SUN_STAR_ACCESSIBILITY_ACCESSIBLEROLE_HPP_ +#include <com/sun/star/accessibility/AccessibleRole.hpp> +#endif + using namespace ::com::sun::star; DBG_NAME(outlinehdl) class SwNumNamesDlg: public ModalDialog { + FixedLine aFormFL; Edit aFormEdit; ListBox aFormBox; - FixedLine aFormFL; OKButton aOKBtn; CancelButton aCancelBtn; HelpButton aHelpBtn; @@ -92,7 +96,7 @@ public: ~SwNumNamesDlg(); void SetUserNames(const String *pList[]); String GetName() const { return aFormEdit.GetText(); } - USHORT GetCurEntryPos() const { return aFormBox.GetSelectEntryPos(); } + sal_uInt16 GetCurEntryPos() const { return aFormBox.GetSelectEntryPos(); } }; /*------------------------------------------------------------------------ @@ -113,8 +117,8 @@ IMPL_LINK_INLINE_END( SwNumNamesDlg, SelectHdl, ListBox *, pBox ) ------------------------------------------------------------------------*/ void SwNumNamesDlg::SetUserNames(const String *pList[]) { - USHORT nSelect = 0; - for(USHORT i = 0; i < SwBaseNumRules::nMaxRules; ++i) + sal_uInt16 nSelect = 0; + for(sal_uInt16 i = 0; i < SwBaseNumRules::nMaxRules; ++i) { if(pList[i]) { @@ -150,9 +154,9 @@ IMPL_LINK_INLINE_END( SwNumNamesDlg, DoubleClickHdl, ListBox *, EMPTYARG ) SwNumNamesDlg::SwNumNamesDlg(Window *pParent) : ModalDialog(pParent, SW_RES(DLG_NUM_NAMES)), + aFormFL(this, SW_RES(FL_FORM)), aFormEdit(this, SW_RES(ED_FORM)), aFormBox(this, SW_RES(LB_FORM)), - aFormFL(this, SW_RES(FL_FORM)), aOKBtn(this, SW_RES(BT_OK)), aCancelBtn(this, SW_RES(BT_CANCEL)), aHelpBtn(this, SW_RES(BT_HELP)) @@ -166,21 +170,21 @@ SwNumNamesDlg::SwNumNamesDlg(Window *pParent) SwNumNamesDlg::~SwNumNamesDlg() {} -USHORT lcl_BitToLevel(USHORT nActLevel) +sal_uInt16 lcl_BitToLevel(sal_uInt16 nActLevel) { - USHORT nTmp = nActLevel; - USHORT nTmpLevel = 0; + sal_uInt16 nTmp = nActLevel; + sal_uInt16 nTmpLevel = 0; while( 0 != (nTmp >>= 1) ) nTmpLevel++; return nTmpLevel; } -USHORT SwOutlineTabDialog::nNumLevel = 1; +sal_uInt16 SwOutlineTabDialog::nNumLevel = 1; SwOutlineTabDialog::SwOutlineTabDialog(Window* pParent, const SfxItemSet* pSwItemSet, SwWrtShell &rSh) : //der UserString wird danach richtig gesetzt - SfxTabDialog(pParent, SW_RES(DLG_TAB_OUTLINE), pSwItemSet, FALSE, &aEmptyStr), + SfxTabDialog(pParent, SW_RES(DLG_TAB_OUTLINE), pSwItemSet, sal_False, &aEmptyStr), aNullStr(C2S("____")), aFormMenu(SW_RES(MN_FORM)), rWrtSh(rSh), @@ -194,6 +198,7 @@ SwOutlineTabDialog::SwOutlineTabDialog(Window* pParent, pUserButton->SetText(SW_RES(ST_FORM)); pUserButton->SetHelpId(HID_OUTLINE_FORM); pUserButton->SetClickHdl(LINK(this, SwOutlineTabDialog, FormHdl)); + pUserButton->SetAccessibleRole( com::sun::star::accessibility::AccessibleRole::BUTTON_MENU ); FreeResource(); pNumRule = new SwNumRule( *rSh.GetOutlineNumRule() ); @@ -203,7 +208,7 @@ SwOutlineTabDialog::SwOutlineTabDialog(Window* pParent, AddTabPage(TP_OUTLINE_NUM , &SwOutlineSettingsTabPage::Create, 0); String sHeadline; - USHORT i; + sal_uInt16 i; for( i = 0; i < MAXLEVEL; ++i ) { @@ -215,7 +220,7 @@ SwOutlineTabDialog::SwOutlineTabDialog(Window* pParent, } // Erfragen der Gliederungsebenen der Textvorlagen - const USHORT nCount = rWrtSh.GetTxtFmtCollCount(); + const sal_uInt16 nCount = rWrtSh.GetTxtFmtCollCount(); for(i = 0; i < nCount; ++i ) { SwTxtFmtColl &rTxtColl = rWrtSh.GetTxtFmtColl(i); @@ -237,7 +242,7 @@ SwOutlineTabDialog::~SwOutlineTabDialog() delete pNumRule; } -void SwOutlineTabDialog::PageCreated(USHORT nPageId, SfxTabPage& rPage) +void SwOutlineTabDialog::PageCreated(sal_uInt16 nPageId, SfxTabPage& rPage) { switch ( nPageId ) { @@ -262,7 +267,7 @@ IMPL_LINK( SwOutlineTabDialog, CancelHdl, Button *, EMPTYARG ) IMPL_LINK( SwOutlineTabDialog, FormHdl, Button *, pBtn ) { //PopupMenu auffuellen - for( USHORT i = 0; i < SwChapterNumRules::nMaxRules; ++i ) + for( sal_uInt16 i = 0; i < SwChapterNumRules::nMaxRules; ++i ) { const SwNumRulesWithName *pRules = pChapterNumRules->GetRules(i); if( pRules ) @@ -275,7 +280,7 @@ IMPL_LINK( SwOutlineTabDialog, FormHdl, Button *, pBtn ) IMPL_LINK( SwOutlineTabDialog, MenuSelectHdl, Menu *, pMenu ) { - BYTE nLevelNo = 0; + sal_uInt8 nLevelNo = 0; switch(pMenu->GetCurItemId()) { case MN_FORM1: nLevelNo = 1; break; @@ -292,7 +297,7 @@ IMPL_LINK( SwOutlineTabDialog, MenuSelectHdl, Menu *, pMenu ) { SwNumNamesDlg *pDlg = new SwNumNamesDlg(this); const String *aStrArr[SwChapterNumRules::nMaxRules]; - for(USHORT i = 0; i < SwChapterNumRules::nMaxRules; ++i) + for(sal_uInt16 i = 0; i < SwChapterNumRules::nMaxRules; ++i) { const SwNumRulesWithName *pRules = pChapterNumRules->GetRules(i); if(pRules) @@ -327,16 +332,16 @@ IMPL_LINK( SwOutlineTabDialog, MenuSelectHdl, Menu *, pMenu ) *pNumRule = *rWrtSh.GetOutlineNumRule(); } - USHORT nPageId = GetCurPageId(); + sal_uInt16 nPageId = GetCurPageId(); SfxTabPage* pPage = GetTabPage( nPageId ); pPage->Reset(*GetOutputItemSet()); return 0; } -USHORT SwOutlineTabDialog::GetLevel(const String &rFmtName) const +sal_uInt16 SwOutlineTabDialog::GetLevel(const String &rFmtName) const { - for(USHORT i = 0; i < MAXLEVEL; ++i) + for(sal_uInt16 i = 0; i < MAXLEVEL; ++i) { if(aCollNames[i] == rFmtName) return i; @@ -360,7 +365,7 @@ short SwOutlineTabDialog::Ok() const SwNumRule * pOutlineRule = rWrtSh.GetOutlineNumRule(); - USHORT i, nCount = rWrtSh.GetTxtFmtCollCount(); + sal_uInt16 i, nCount = rWrtSh.GetTxtFmtCollCount(); for( i = 0; i < nCount; ++i ) { SwTxtFmtColl &rTxtColl = rWrtSh.GetTxtFmtColl(i); @@ -368,9 +373,9 @@ short SwOutlineTabDialog::Ok() { const SfxPoolItem & rItem = - rTxtColl.GetFmtAttr(RES_PARATR_NUMRULE, FALSE); + rTxtColl.GetFmtAttr(RES_PARATR_NUMRULE, sal_False); - if ((BYTE)GetLevel(rTxtColl.GetName()) == MAXLEVEL) //add by zhaojianwei + if ((sal_uInt8)GetLevel(rTxtColl.GetName()) == MAXLEVEL) //add by zhaojianwei { if(rTxtColl.IsAssignedToListLevelOfOutlineStyle()) { @@ -407,7 +412,7 @@ short SwOutlineTabDialog::Ok() if(aCollNames[i] != sHeadline)//->added by zhaojianwei { SwTxtFmtColl* pTxtColl = rWrtSh.GetTxtCollFromPool( - static_cast< USHORT >(RES_POOLCOLL_HEADLINE1 + i) ); + static_cast< sal_uInt16 >(RES_POOLCOLL_HEADLINE1 + i) ); pTxtColl->DeleteAssignmentToListLevelOfOutlineStyle(); pTxtColl->ResetFmtAttr(RES_PARATR_NUMRULE); @@ -437,8 +442,9 @@ short SwOutlineTabDialog::Ok() SwOutlineSettingsTabPage::SwOutlineSettingsTabPage(Window* pParent, const SfxItemSet& rSet) : SfxTabPage(pParent, SW_RES(TP_OUTLINE_NUM), rSet), - aLevelLB( this, SW_RES(LB_LEVEL )), aLevelFL( this, SW_RES(FL_LEVEL )), + aLevelLB( this, SW_RES(LB_LEVEL )), + aNumberFL(this, SW_RES(FL_NUMBER)), aCollLbl(this, SW_RES(FT_COLL)), aCollBox(this, SW_RES(LB_COLL)), aNumberLbl(this, SW_RES(FT_NUMBER)), @@ -454,7 +460,6 @@ SwOutlineSettingsTabPage::SwOutlineSettingsTabPage(Window* pParent, const SfxIte aSuffixED(this, SW_RES(ED_SUFFIX)), aStartLbl(this, SW_RES(FT_START)), aStartEdit(this, SW_RES(ED_START)), - aNumberFL(this, SW_RES(FL_NUMBER)), aPreviewWIN( this, SW_RES(WIN_PREVIEW )), aNoFmtName(SW_RES(ST_NO_COLL)), @@ -485,17 +490,17 @@ void SwOutlineSettingsTabPage::Update() aCollBox.Enable(USHRT_MAX != nActLevel); if(USHRT_MAX == nActLevel) { - BOOL bSamePrefix = TRUE; - BOOL bSameSuffix = TRUE; - BOOL bSameType = TRUE; - BOOL bSameComplete = TRUE; - BOOL bSameStart = TRUE; - BOOL bSameCharFmt = TRUE; + sal_Bool bSamePrefix = sal_True; + sal_Bool bSameSuffix = sal_True; + sal_Bool bSameType = sal_True; + sal_Bool bSameComplete = sal_True; + sal_Bool bSameStart = sal_True; + sal_Bool bSameCharFmt = sal_True; const SwNumFmt* aNumFmtArr[MAXLEVEL]; const SwCharFmt* pFirstFmt = 0; - for(USHORT i = 0; i < MAXLEVEL; i++) + for(sal_uInt16 i = 0; i < MAXLEVEL; i++) { aNumFmtArr[ i ] = &pNumRule->Get(i); @@ -541,8 +546,8 @@ void SwOutlineSettingsTabPage::Update() else aCharFmtLB.SetNoSelection(); - aAllLevelFT.Enable(TRUE); - aAllLevelNF.Enable(TRUE); + aAllLevelFT.Enable(sal_True); + aAllLevelNF.Enable(sal_True); aAllLevelNF.SetMax(MAXLEVEL); if(bSameComplete) { @@ -555,7 +560,7 @@ void SwOutlineSettingsTabPage::Update() } else { - USHORT nTmpLevel = lcl_BitToLevel(nActLevel); + sal_uInt16 nTmpLevel = lcl_BitToLevel(nActLevel); String aColl(pCollNames[nTmpLevel]); if(aColl.Len()) aCollBox.SelectEntry(aColl); @@ -574,16 +579,16 @@ void SwOutlineSettingsTabPage::Update() if(nTmpLevel) { - aAllLevelFT.Enable(TRUE); - aAllLevelNF.Enable(TRUE); + aAllLevelFT.Enable(sal_True); + aAllLevelNF.Enable(sal_True); aAllLevelNF.SetMax(nTmpLevel + 1); aAllLevelNF.SetValue(rFmt.GetIncludeUpperLevels()); } else { aAllLevelNF.SetText(aEmptyStr); - aAllLevelNF.Enable(FALSE); - aAllLevelFT.Enable(FALSE); + aAllLevelNF.Enable(sal_False); + aAllLevelFT.Enable(sal_False); } CheckForStartValue_Impl(rFmt.GetNumberingType()); aStartEdit.SetValue( rFmt.GetStart() ); @@ -600,8 +605,8 @@ IMPL_LINK( SwOutlineSettingsTabPage, LevelHdl, ListBox *, pBox ) } else { - USHORT nMask = 1; - for( USHORT i = 0; i < MAXLEVEL; i++ ) + sal_uInt16 nMask = 1; + for( sal_uInt16 i = 0; i < MAXLEVEL; i++ ) { if(pBox->IsEntryPosSelected( i )) nActLevel |= nMask; @@ -614,14 +619,14 @@ IMPL_LINK( SwOutlineSettingsTabPage, LevelHdl, ListBox *, pBox ) IMPL_LINK( SwOutlineSettingsTabPage, ToggleComplete, NumericField *, pFld ) { - USHORT nMask = 1; - for(USHORT i = 0; i < MAXLEVEL; i++) + sal_uInt16 nMask = 1; + for(sal_uInt16 i = 0; i < MAXLEVEL; i++) { if(nActLevel & nMask) { SwNumFmt aNumFmt(pNumRule->Get(i)); - aNumFmt.SetIncludeUpperLevels( Min( (BYTE)pFld->GetValue(), - (BYTE)(i + 1)) ); + aNumFmt.SetIncludeUpperLevels( Min( (sal_uInt8)pFld->GetValue(), + (sal_uInt8)(i + 1)) ); pNumRule->Set(i, aNumFmt); } nMask <<= 1; @@ -632,11 +637,11 @@ IMPL_LINK( SwOutlineSettingsTabPage, ToggleComplete, NumericField *, pFld ) IMPL_LINK( SwOutlineSettingsTabPage, CollSelect, ListBox *, pBox ) { - BYTE i; + sal_uInt8 i; const String aCollName(pBox->GetSelectEntry()); //0xFFFF darf hier nicht sein (disable) - USHORT nTmpLevel = lcl_BitToLevel(nActLevel); + sal_uInt16 nTmpLevel = lcl_BitToLevel(nActLevel); String sOldName( pCollNames[nTmpLevel] ); for( i = 0; i < MAXLEVEL; ++i) @@ -659,7 +664,7 @@ IMPL_LINK( SwOutlineSettingsTabPage, CollSelect, ListBox *, pBox ) if( aSaveCollNames[ i ] == sOldName && i != nTmpLevel && !pCollNames[ i ].Len() ) { - BYTE n; + sal_uInt8 n; for( n = 0; n < MAXLEVEL; ++n ) if( pCollNames[ n ] == sOldName ) break; @@ -675,16 +680,16 @@ IMPL_LINK( SwOutlineSettingsTabPage, CollSelect, ListBox *, pBox ) IMPL_LINK( SwOutlineSettingsTabPage, CollSelectGetFocus, ListBox *, EMPTYARG ) { - for( BYTE i = 0; i < MAXLEVEL; ++i) + for( sal_uInt8 i = 0; i < MAXLEVEL; ++i) aSaveCollNames[i] = pCollNames[i]; return 0; } IMPL_LINK( SwOutlineSettingsTabPage, NumberSelect, SwNumberingTypeListBox *, pBox ) { - USHORT nMask = 1; + sal_uInt16 nMask = 1; sal_Int16 nNumberType = pBox->GetSelectedNumberingType(); - for(USHORT i = 0; i < MAXLEVEL; i++) + for(sal_uInt16 i = 0; i < MAXLEVEL; i++) { if(nActLevel & nMask) { @@ -701,8 +706,8 @@ IMPL_LINK( SwOutlineSettingsTabPage, NumberSelect, SwNumberingTypeListBox *, pBo IMPL_LINK( SwOutlineSettingsTabPage, DelimModify, Edit *, EMPTYARG ) { - USHORT nMask = 1; - for(USHORT i = 0; i < MAXLEVEL; i++) + sal_uInt16 nMask = 1; + for(sal_uInt16 i = 0; i < MAXLEVEL; i++) { if(nActLevel & nMask) { @@ -719,13 +724,13 @@ IMPL_LINK( SwOutlineSettingsTabPage, DelimModify, Edit *, EMPTYARG ) IMPL_LINK( SwOutlineSettingsTabPage, StartModified, NumericField *, pFld ) { - USHORT nMask = 1; - for(USHORT i = 0; i < MAXLEVEL; i++) + sal_uInt16 nMask = 1; + for(sal_uInt16 i = 0; i < MAXLEVEL; i++) { if(nActLevel & nMask) { SwNumFmt aNumFmt(pNumRule->Get(i)); - aNumFmt.SetStart( (USHORT)pFld->GetValue() ); + aNumFmt.SetStart( (sal_uInt16)pFld->GetValue() ); pNumRule->Set(i, aNumFmt); } nMask <<= 1; @@ -737,13 +742,13 @@ IMPL_LINK( SwOutlineSettingsTabPage, StartModified, NumericField *, pFld ) IMPL_LINK( SwOutlineSettingsTabPage, CharFmtHdl, ListBox *, EMPTYARG ) { String sEntry = aCharFmtLB.GetSelectEntry(); - USHORT nMask = 1; - BOOL bFormatNone = sEntry == ViewShell::GetShellRes()->aStrNone; + sal_uInt16 nMask = 1; + sal_Bool bFormatNone = sEntry == ViewShell::GetShellRes()->aStrNone; SwCharFmt* pFmt = 0; if(!bFormatNone) { - USHORT nChCount = pSh->GetCharFmtCount(); - for(USHORT i = 0; i < nChCount; i++) + sal_uInt16 nChCount = pSh->GetCharFmtCount(); + for(sal_uInt16 i = 0; i < nChCount; i++) { SwCharFmt& rChFmt = pSh->GetCharFmt(i); if(rChFmt.GetName() == sEntry) @@ -764,7 +769,7 @@ IMPL_LINK( SwOutlineSettingsTabPage, CharFmtHdl, ListBox *, EMPTYARG ) } } - for(USHORT i = 0; i < MAXLEVEL; i++) + for(sal_uInt16 i = 0; i < MAXLEVEL; i++) { if(nActLevel & nMask) { @@ -794,13 +799,13 @@ void SwOutlineSettingsTabPage::SetWrtShell(SwWrtShell* pShell) aPreviewWIN.SetNumRule(pNumRule); aPreviewWIN.SetOutlineNames(pCollNames); // Startwert setzen - nActLevel muss hier 1 sein - USHORT nTmpLevel = lcl_BitToLevel(nActLevel); + sal_uInt16 nTmpLevel = lcl_BitToLevel(nActLevel); const SwNumFmt& rNumFmt = pNumRule->Get( nTmpLevel ); aStartEdit.SetValue( rNumFmt.GetStart() ); // Poolformate fuer Ueberschriften anlegen String sStr; - USHORT i; + sal_uInt16 i; for( i = 0; i < MAXLEVEL; ++i ) { aCollBox.InsertEntry( SwStyleNameMapper::GetUIName( @@ -812,7 +817,7 @@ void SwOutlineSettingsTabPage::SetWrtShell(SwWrtShell* pShell) aLevelLB.InsertEntry( sStr ); // Erfragen der Gliederungsebenen der Textvorlagen - const USHORT nCount = pSh->GetTxtFmtCollCount(); + const sal_uInt16 nCount = pSh->GetTxtFmtCollCount(); for( i = 0; i < nCount; ++i ) { SwTxtFmtColl &rTxtColl = pSh->GetTxtFmtColl(i); @@ -825,11 +830,11 @@ void SwOutlineSettingsTabPage::SetWrtShell(SwWrtShell* pShell) } aNumberBox.SelectNumberingType(rNumFmt.GetNumberingType()); - USHORT nOutlinePos = pSh->GetOutlinePos(MAXLEVEL); - USHORT nTmp = 0; + sal_uInt16 nOutlinePos = pSh->GetOutlinePos(MAXLEVEL); + sal_uInt16 nTmp = 0; if(nOutlinePos != USHRT_MAX) { - nTmp = static_cast<USHORT>(pSh->getIDocumentOutlineNodesAccess()->getOutlineLevel(nOutlinePos)); + nTmp = static_cast<sal_uInt16>(pSh->getIDocumentOutlineNodesAccess()->getOutlineLevel(nOutlinePos)); } aLevelLB.SelectEntryPos(nTmp-1);//nTmp);//#outline level,zhaojianwei @@ -859,9 +864,9 @@ int SwOutlineSettingsTabPage::DeactivatePage(SfxItemSet*) return LEAVE_PAGE; } -BOOL SwOutlineSettingsTabPage::FillItemSet( SfxItemSet& ) +sal_Bool SwOutlineSettingsTabPage::FillItemSet( SfxItemSet& ) { - return TRUE; + return sal_True; } void SwOutlineSettingsTabPage::Reset( const SfxItemSet& rSet ) @@ -877,8 +882,8 @@ SfxTabPage* SwOutlineSettingsTabPage::Create( Window* pParent, void SwOutlineSettingsTabPage::CheckForStartValue_Impl(sal_uInt16 nNumberingType) { - BOOL bIsNull = aStartEdit.GetValue() == 0; - BOOL bNoZeroAllowed = nNumberingType < SVX_NUM_ARABIC || + sal_Bool bIsNull = aStartEdit.GetValue() == 0; + sal_Bool bNoZeroAllowed = nNumberingType < SVX_NUM_ARABIC || SVX_NUM_CHARS_UPPER_LETTER_N == nNumberingType || SVX_NUM_CHARS_LOWER_LETTER_N == nNumberingType; aStartEdit.SetMin(bNoZeroAllowed ? 1 : 0); @@ -886,29 +891,29 @@ void SwOutlineSettingsTabPage::CheckForStartValue_Impl(sal_uInt16 nNumberingType aStartEdit.GetModifyHdl().Call(&aStartEdit); } -USHORT lcl_DrawBullet(VirtualDevice* pVDev, - const SwNumFmt& rFmt, USHORT nXStart, - USHORT nYStart, const Size& rSize) +sal_uInt16 lcl_DrawBullet(VirtualDevice* pVDev, + const SwNumFmt& rFmt, sal_uInt16 nXStart, + sal_uInt16 nYStart, const Size& rSize) { Font aTmpFont(pVDev->GetFont()); Font aFont(*rFmt.GetBulletFont()); aFont.SetSize(rSize); - aFont.SetTransparent(TRUE); + aFont.SetTransparent(sal_True); pVDev->SetFont( aFont ); String aText(rFmt.GetBulletChar()); pVDev->DrawText( Point(nXStart, nYStart), aText ); - USHORT nRet = (USHORT)pVDev->GetTextWidth(aText); + sal_uInt16 nRet = (sal_uInt16)pVDev->GetTextWidth(aText); pVDev->SetFont(aTmpFont); return nRet; } -USHORT lcl_DrawGraphic(VirtualDevice* pVDev, const SwNumFmt &rFmt, USHORT nXStart, - USHORT nYStart, USHORT nDivision) +sal_uInt16 lcl_DrawGraphic(VirtualDevice* pVDev, const SwNumFmt &rFmt, sal_uInt16 nXStart, + sal_uInt16 nYStart, sal_uInt16 nDivision) { const SvxBrushItem* pBrushItem = rFmt.GetBrush(); - USHORT nRet = 0; + sal_uInt16 nRet = 0; if(pBrushItem) { const Graphic* pGrf = pBrushItem->GetGraphic(); @@ -916,7 +921,7 @@ USHORT lcl_DrawGraphic(VirtualDevice* pVDev, const SwNumFmt &rFmt, USHORT nXStar { Size aGSize( rFmt.GetGraphicSize()); aGSize.Width() /= nDivision; - nRet = (USHORT)aGSize.Width(); + nRet = (sal_uInt16)aGSize.Width(); aGSize.Height() /= nDivision; pGrf->Draw( pVDev, Point(nXStart,nYStart), pVDev->PixelToLogic( aGSize ) ); @@ -945,10 +950,10 @@ void NumberingPreview::Paint( const Rectangle& /*rRect*/ ) if(pActNum) { - USHORT nWidthRelation; + sal_uInt16 nWidthRelation; if(nPageWidth) { - nWidthRelation = USHORT (nPageWidth / aSize.Width()); + nWidthRelation = sal_uInt16 (nPageWidth / aSize.Width()); if(bPosition) nWidthRelation = nWidthRelation * 2 / 3; else @@ -958,28 +963,28 @@ void NumberingPreview::Paint( const Rectangle& /*rRect*/ ) nWidthRelation = 30; // Kapiteldialog //Hoehe pro Ebene - USHORT nXStep = USHORT(aSize.Width() / (3 * MAXLEVEL)); + sal_uInt16 nXStep = sal_uInt16(aSize.Width() / (3 * MAXLEVEL)); if(MAXLEVEL < 10) nXStep /= 2; - USHORT nYStart = 4; - USHORT nYStep = USHORT((aSize.Height() - 6)/ MAXLEVEL); + sal_uInt16 nYStart = 4; + sal_uInt16 nYStep = sal_uInt16((aSize.Height() - 6)/ MAXLEVEL); aStdFont = OutputDevice::GetDefaultFont( DEFAULTFONT_UI_SANS, (LanguageType)GetAppLanguage(), DEFAULTFONT_FLAGS_ONLYONE, this ); // #101524# OJ aStdFont.SetColor( SwViewOption::GetFontColor() ); - USHORT nFontHeight = nYStep * 6 / 10; + sal_uInt16 nFontHeight = nYStep * 6 / 10; if(bPosition) nFontHeight = nYStep * 15 / 10; aStdFont.SetSize(Size( 0, nFontHeight )); - USHORT nPreNum = pActNum->Get(0).GetStart(); + sal_uInt16 nPreNum = pActNum->Get(0).GetStart(); if(bPosition) { - USHORT nLineHeight = nFontHeight * 8 / 7; - BYTE nStart = 0; + sal_uInt16 nLineHeight = nFontHeight * 8 / 7; + sal_uInt8 nStart = 0; while( !(nActLevel & (1<<nStart)) ) { nStart++; @@ -988,21 +993,21 @@ void NumberingPreview::Paint( const Rectangle& /*rRect*/ ) nStart--; SwNumberTree::tNumberVector aNumVector; - BYTE nEnd = Min( (BYTE)(nStart + 3), MAXLEVEL ); - for( BYTE nLevel = nStart; nLevel < nEnd; ++nLevel ) + sal_uInt8 nEnd = Min( (sal_uInt8)(nStart + 3), MAXLEVEL ); + for( sal_uInt8 nLevel = nStart; nLevel < nEnd; ++nLevel ) { const SwNumFmt &rFmt = pActNum->Get(nLevel); aNumVector.push_back(rFmt.GetStart()); - USHORT nXStart( 0 ); + sal_uInt16 nXStart( 0 ); short nTextOffset( 0 ); - USHORT nNumberXPos( 0 ); + sal_uInt16 nNumberXPos( 0 ); if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION ) { nXStart = rFmt.GetAbsLSpace() / nWidthRelation; nTextOffset = rFmt.GetCharTextDistance() / nWidthRelation; nNumberXPos = nXStart; - USHORT nFirstLineOffset = (-rFmt.GetFirstLineOffset()) / nWidthRelation; + sal_uInt16 nFirstLineOffset = (-rFmt.GetFirstLineOffset()) / nWidthRelation; if(nFirstLineOffset <= nNumberXPos) nNumberXPos = nNumberXPos - nFirstLineOffset; @@ -1020,11 +1025,11 @@ void NumberingPreview::Paint( const Rectangle& /*rRect*/ ) } else { - nNumberXPos = static_cast<USHORT>(nTmpNumberXPos); + nNumberXPos = static_cast<sal_uInt16>(nTmpNumberXPos); } } - USHORT nBulletWidth = 0; + sal_uInt16 nBulletWidth = 0; if( SVX_NUM_BITMAP == rFmt.GetNumberingType() ) { nBulletWidth = lcl_DrawGraphic(pVDev, rFmt, @@ -1044,7 +1049,7 @@ void NumberingPreview::Paint( const Rectangle& /*rRect*/ ) String aText(pActNum->MakeNumString( aNumVector )); // <-- pVDev->DrawText( Point(nNumberXPos, nYStart), aText ); - nBulletWidth = (USHORT)pVDev->GetTextWidth(aText); + nBulletWidth = (sal_uInt16)pVDev->GetTextWidth(aText); nPreNum++; } if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT && @@ -1053,10 +1058,10 @@ void NumberingPreview::Paint( const Rectangle& /*rRect*/ ) pVDev->SetFont(aStdFont); String aText(' '); pVDev->DrawText( Point(nNumberXPos, nYStart), aText ); - nBulletWidth = nBulletWidth + (USHORT)pVDev->GetTextWidth(aText); + nBulletWidth = nBulletWidth + (sal_uInt16)pVDev->GetTextWidth(aText); } - USHORT nTextXPos( 0 ); + sal_uInt16 nTextXPos( 0 ); if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION ) { nTextXPos = nXStart; @@ -1071,7 +1076,7 @@ void NumberingPreview::Paint( const Rectangle& /*rRect*/ ) { case SvxNumberFormat::LISTTAB: { - nTextXPos = static_cast<USHORT>( + nTextXPos = static_cast<sal_uInt16>( rFmt.GetListtabPos() / nWidthRelation ); if ( nTextXPos < nNumberXPos + nBulletWidth ) { @@ -1087,7 +1092,7 @@ void NumberingPreview::Paint( const Rectangle& /*rRect*/ ) break; } - nXStart = static_cast<USHORT>( rFmt.GetIndentAt() / nWidthRelation ); + nXStart = static_cast<sal_uInt16>( rFmt.GetIndentAt() / nWidthRelation ); } @@ -1103,13 +1108,13 @@ void NumberingPreview::Paint( const Rectangle& /*rRect*/ ) else { SwNumberTree::tNumberVector aNumVector; - USHORT nLineHeight = nFontHeight * 3 / 2; - for( BYTE nLevel = 0; nLevel < MAXLEVEL; + sal_uInt16 nLineHeight = nFontHeight * 3 / 2; + for( sal_uInt8 nLevel = 0; nLevel < MAXLEVEL; ++nLevel, nYStart = nYStart + nYStep ) { const SwNumFmt &rFmt = pActNum->Get(nLevel); aNumVector.push_back(rFmt.GetStart()); - USHORT nXStart( 0 ); + sal_uInt16 nXStart( 0 ); if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION ) { nXStart = rFmt.GetAbsLSpace() / nWidthRelation; @@ -1125,12 +1130,12 @@ void NumberingPreview::Paint( const Rectangle& /*rRect*/ ) } else { - nXStart = static_cast<USHORT>(nTmpXStart); + nXStart = static_cast<sal_uInt16>(nTmpXStart); } } nXStart /= 2; nXStart += 2; - USHORT nTextOffset = 2 * nXStep; + sal_uInt16 nTextOffset = 2 * nXStep; if( SVX_NUM_BITMAP == rFmt.GetNumberingType() ) { lcl_DrawGraphic(pVDev, rFmt, nXStart, nYStart, nWidthRelation); @@ -1150,7 +1155,7 @@ void NumberingPreview::Paint( const Rectangle& /*rRect*/ ) String aText(pActNum->MakeNumString( aNumVector )); // <-- pVDev->DrawText( Point(nXStart, nYStart), aText ); - nTextOffset = (USHORT)pVDev->GetTextWidth(aText); + nTextOffset = (sal_uInt16)pVDev->GetTextWidth(aText); nTextOffset = nTextOffset + nXStep; nPreNum++; } diff --git a/sw/source/ui/misc/outline.src b/sw/source/ui/misc/outline.src index 64dd97494a..f54025127d 100644 --- a/sw/source/ui/misc/outline.src +++ b/sw/source/ui/misc/outline.src @@ -65,6 +65,7 @@ ModalDialog DLG_NUM_NAMES }; ListBox LB_FORM { + HelpID = "sw:ListBox:DLG_NUM_NAMES:LB_FORM"; Border = TRUE ; Pos = MAP_APPFONT ( 12 , 29 ) ; Size = MAP_APPFONT ( 84 , 42 ) ; @@ -85,6 +86,7 @@ ModalDialog DLG_NUM_NAMES }; Edit ED_FORM { + HelpID = "sw:Edit:DLG_NUM_NAMES:ED_FORM"; Border = TRUE ; Pos = MAP_APPFONT ( 12 , 14 ) ; Size = MAP_APPFONT ( 84 , 12 ) ; @@ -211,6 +213,7 @@ TabPage TP_OUTLINE_NUM Hide = TRUE; ListBox LB_LEVEL { + HelpID = "sw:ListBox:TP_OUTLINE_NUM:LB_LEVEL"; Pos = MAP_APPFONT ( 12 , 14 ) ; Size = MAP_APPFONT ( 23 , 129 ) ; TabStop = TRUE ; @@ -233,6 +236,7 @@ TabPage TP_OUTLINE_NUM }; ListBox LB_COLL { + HelpID = "sw:ListBox:TP_OUTLINE_NUM:LB_COLL"; Border = TRUE ; Pos = MAP_APPFONT ( 50 , 25 ) ; Size = MAP_APPFONT ( 120 , 75 ) ; @@ -251,6 +255,7 @@ TabPage TP_OUTLINE_NUM }; ListBox LB_NUMBER { + HelpID = "sw:ListBox:TP_OUTLINE_NUM:LB_NUMBER"; Pos = MAP_APPFONT ( 104 , 41 ) ; Size = MAP_APPFONT ( 66 , 65 ) ; TabStop = TRUE ; @@ -266,6 +271,7 @@ TabPage TP_OUTLINE_NUM }; ListBox LB_CHARFMT { + HelpID = "sw:ListBox:TP_OUTLINE_NUM:LB_CHARFMT"; TabStop = TRUE ; DropDown = TRUE ; Pos = MAP_APPFONT ( 104 , 57 ) ; @@ -279,6 +285,7 @@ TabPage TP_OUTLINE_NUM }; NumericField NF_ALL_LEVEL { + HelpID = "sw:NumericField:TP_OUTLINE_NUM:NF_ALL_LEVEL"; Border = TRUE ; Pos = MAP_APPFONT ( 104 , 73 ) ; Size = MAP_APPFONT ( 66 , 12 ) ; @@ -308,6 +315,7 @@ TabPage TP_OUTLINE_NUM }; Edit ED_PREFIX { + HelpID = "sw:Edit:TP_OUTLINE_NUM:ED_PREFIX"; Border = TRUE ; Pos = MAP_APPFONT ( 104 , 100 ) ; Size = MAP_APPFONT ( 66 , 12 ) ; @@ -324,6 +332,7 @@ TabPage TP_OUTLINE_NUM }; Edit ED_SUFFIX { + HelpID = "sw:Edit:TP_OUTLINE_NUM:ED_SUFFIX"; Border = TRUE ; Pos = MAP_APPFONT ( 104 , 115 ) ; Size = MAP_APPFONT ( 66 , 12 ) ; @@ -340,6 +349,7 @@ TabPage TP_OUTLINE_NUM }; NumericField ED_START { + HelpID = "sw:NumericField:TP_OUTLINE_NUM:ED_START"; Border = TRUE ; Pos = MAP_APPFONT ( 104 , 131 ) ; Size = MAP_APPFONT ( 66 , 12 ) ; diff --git a/sw/source/ui/misc/pgfnote.cxx b/sw/source/ui/misc/pgfnote.cxx index 7bd2febab8..f68ba4d9d4 100644 --- a/sw/source/ui/misc/pgfnote.cxx +++ b/sw/source/ui/misc/pgfnote.cxx @@ -62,7 +62,7 @@ /*-----------------------------------------------------#--------------- Beschreibung: vordefinierte Linien in Point --------------------------------------------------------------------*/ -static const USHORT nLines[] = { +static const sal_uInt16 nLines[] = { 0, 50, 100, @@ -71,9 +71,9 @@ static const USHORT nLines[] = { 500 }; -static const USHORT nLineCount = SAL_N_ELEMENTS(nLines); +static const sal_uInt16 nLineCount = SAL_N_ELEMENTS(nLines); -static USHORT aPageRg[] = { +static sal_uInt16 aPageRg[] = { FN_PARAM_FTN_INFO, FN_PARAM_FTN_INFO, 0 }; @@ -82,13 +82,13 @@ static USHORT aPageRg[] = { Beschreibung: liefert zurueck, ob die Linienbreite nWidth bereits in der Listbox enthalten ist. ------------------------------------------------------------------------*/ -BOOL lcl_HasLineWidth(USHORT nWidth) +sal_Bool lcl_HasLineWidth(sal_uInt16 nWidth) { - for(USHORT i = 0; i < nLineCount; ++i) { + for(sal_uInt16 i = 0; i < nLineCount; ++i) { if(nLines[i] == nWidth) - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } /*------------------------------------------------------------------------ @@ -98,7 +98,7 @@ BOOL lcl_HasLineWidth(USHORT nWidth) ------------------------------------------------------------------------*/ IMPL_LINK_INLINE_START( SwFootNotePage, HeightPage, Button *, EMPTYARG ) { - aMaxHeightEdit.Enable(FALSE); + aMaxHeightEdit.Enable(sal_False); return 0; } IMPL_LINK_INLINE_END( SwFootNotePage, HeightPage, Button *, EMPTYARG ) @@ -141,14 +141,14 @@ IMPL_LINK( SwFootNotePage, HeightModify, MetricField *, EMPTYARG ) SwFootNotePage::SwFootNotePage(Window *pParent, const SfxItemSet &rSet) : SfxTabPage(pParent, SW_RES(TP_FOOTNOTE_PAGE), rSet), - + aPosHeader(this, SW_RES(FL_FOOTNOTE_SIZE)), aMaxHeightPageBtn(this, SW_RES(RB_MAXHEIGHT_PAGE)), aMaxHeightBtn(this, SW_RES(RB_MAXHEIGHT)), aMaxHeightEdit(this, SW_RES(ED_MAXHEIGHT)), aDistLbl(this, SW_RES(FT_DIST)), aDistEdit(this, SW_RES(ED_DIST)), - aPosHeader(this, SW_RES(FL_FOOTNOTE_SIZE)), - + + aLineHeader(this, SW_RES(FL_LINE)), aLinePosLbl(this, SW_RES(FT_LINEPOS)), aLinePosBox(this, SW_RES(DLB_LINEPOS)), aLineTypeLbl(this, SW_RES(FT_LINETYPE)), @@ -156,19 +156,19 @@ SwFootNotePage::SwFootNotePage(Window *pParent, const SfxItemSet &rSet) : aLineWidthLbl(this, SW_RES(FT_LINEWIDTH)), aLineWidthEdit(this, SW_RES(ED_LINEWIDTH)), aLineDistLbl(this, SW_RES(FT_LINEDIST)), - aLineDistEdit(this, SW_RES(ED_LINEDIST)), - aLineHeader(this, SW_RES(FL_LINE)) -{ + aLineDistEdit(this, SW_RES(ED_LINEDIST)) + { FreeResource(); SetExchangeSupport(); - FieldUnit aMetric = ::GetDfltMetric(FALSE); + FieldUnit aMetric = ::GetDfltMetric(sal_False); SetMetric( aMaxHeightEdit, aMetric ); SetMetric( aDistEdit, aMetric ); SetMetric( aLineDistEdit, aMetric ); MeasurementSystem eSys = SvtSysLocale().GetLocaleData().getMeasurementSystemEnum(); long nHeightValue = MEASURE_METRIC != eSys ? 1440 : 1134; aMaxHeightEdit.SetValue(aMaxHeightEdit.Normalize(nHeightValue),FUNIT_TWIP);; + aMaxHeightEdit.SetAccessibleRelationLabeledBy(&aMaxHeightBtn); } SwFootNotePage::~SwFootNotePage() @@ -203,12 +203,12 @@ void SwFootNotePage::Reset(const SfxItemSet &rSet) if(lHeight) { aMaxHeightEdit.SetValue(aMaxHeightEdit.Normalize(lHeight),FUNIT_TWIP); - aMaxHeightBtn.Check(TRUE); + aMaxHeightBtn.Check(sal_True); } else { - aMaxHeightPageBtn.Check(TRUE); - aMaxHeightEdit.Enable(FALSE); + aMaxHeightPageBtn.Check(sal_True); + aMaxHeightEdit.Enable(sal_False); } aMaxHeightPageBtn.SetClickHdl(LINK(this,SwFootNotePage,HeightPage)); aMaxHeightBtn.SetClickHdl(LINK(this,SwFootNotePage,HeightMetric)); @@ -218,16 +218,16 @@ void SwFootNotePage::Reset(const SfxItemSet &rSet) aLineDistEdit.SetLoseFocusHdl( aLk ); // Trennlinie - for(USHORT i = 0; i < nLineCount; ++i) + for(sal_uInt16 i = 0; i < nLineCount; ++i) aLineTypeBox.InsertEntry(nLines[i]); - const USHORT nWidth = (USHORT)pFtnInfo->GetLineWidth() * TWIP_TO_LBOX; + const sal_uInt16 nWidth = (sal_uInt16)pFtnInfo->GetLineWidth() * TWIP_TO_LBOX; if ( !lcl_HasLineWidth(nWidth) ) aLineTypeBox.InsertEntry(nWidth); aLineTypeBox.SelectEntry(nWidth); // Position - aLinePosBox.SelectEntryPos( static_cast< USHORT >(pFtnInfo->GetAdj()) ); + aLinePosBox.SelectEntryPos( static_cast< sal_uInt16 >(pFtnInfo->GetAdj()) ); // Breite Fraction aTmp( 100, 1 ); @@ -245,7 +245,7 @@ void SwFootNotePage::Reset(const SfxItemSet &rSet) /*-------------------------------------------------------------------- Beschreibung: Attribute in den Set stopfen bei OK --------------------------------------------------------------------*/ -BOOL SwFootNotePage::FillItemSet(SfxItemSet &rSet) +sal_Bool SwFootNotePage::FillItemSet(SfxItemSet &rSet) { SwPageFtnInfoItem aItem((const SwPageFtnInfoItem&)GetItemSet().Get(FN_PARAM_FTN_INFO)); @@ -266,7 +266,7 @@ BOOL SwFootNotePage::FillItemSet(SfxItemSet &rSet) aLineDistEdit.Denormalize(aLineDistEdit.GetValue(FUNIT_TWIP)))); // Trennlinie - const USHORT nPos = aLineTypeBox.GetSelectEntryPos(); + const sal_uInt16 nPos = aLineTypeBox.GetSelectEntryPos(); if( LISTBOX_ENTRY_NOTFOUND != nPos ) rFtnInfo.SetLineWidth(nLines[nPos] / TWIP_TO_LBOX); @@ -281,7 +281,7 @@ BOOL SwFootNotePage::FillItemSet(SfxItemSet &rSet) aItem != *pOldItem ) rSet.Put(aItem); - return TRUE; + return sal_True; } void SwFootNotePage::ActivatePage(const SfxItemSet& rSet) @@ -290,7 +290,7 @@ void SwFootNotePage::ActivatePage(const SfxItemSet& rSet) lMaxHeight = rSize.GetSize().Height(); const SfxPoolItem* pItem; - if( SFX_ITEM_SET == rSet.GetItemState( rSet.GetPool()->GetWhich( SID_ATTR_PAGE_HEADERSET), FALSE, &pItem ) ) + if( SFX_ITEM_SET == rSet.GetItemState( rSet.GetPool()->GetWhich( SID_ATTR_PAGE_HEADERSET), sal_False, &pItem ) ) { const SfxItemSet& rHeaderSet = ((SvxSetItem*)pItem)->GetItemSet(); const SfxBoolItem& rHeaderOn = @@ -305,7 +305,7 @@ void SwFootNotePage::ActivatePage(const SfxItemSet& rSet) } if( SFX_ITEM_SET == rSet.GetItemState( rSet.GetPool()->GetWhich( SID_ATTR_PAGE_FOOTERSET), - FALSE, &pItem ) ) + sal_False, &pItem ) ) { const SfxItemSet& rFooterSet = ((SvxSetItem*)pItem)->GetItemSet(); const SfxBoolItem& rFooterOn = @@ -319,7 +319,7 @@ void SwFootNotePage::ActivatePage(const SfxItemSet& rSet) } } - if ( rSet.GetItemState( RES_UL_SPACE , FALSE ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( RES_UL_SPACE , sal_False ) == SFX_ITEM_SET ) { const SvxULSpaceItem &rUL = (const SvxULSpaceItem&)rSet.Get( RES_UL_SPACE ); lMaxHeight -= rUL.GetUpper() + rUL.GetLower(); @@ -337,10 +337,10 @@ int SwFootNotePage::DeactivatePage( SfxItemSet* _pSet) if(_pSet) FillItemSet(*_pSet); - return TRUE; + return sal_True; } -USHORT* SwFootNotePage::GetRanges() +sal_uInt16* SwFootNotePage::GetRanges() { return aPageRg; } diff --git a/sw/source/ui/misc/pgfnote.src b/sw/source/ui/misc/pgfnote.src index 18acc28267..eebc13ca5d 100644 --- a/sw/source/ui/misc/pgfnote.src +++ b/sw/source/ui/misc/pgfnote.src @@ -35,6 +35,7 @@ TabPage TP_FOOTNOTE_PAGE Hide = TRUE; RadioButton RB_MAXHEIGHT_PAGE { + HelpID = "sw:RadioButton:TP_FOOTNOTE_PAGE:RB_MAXHEIGHT_PAGE"; Pos = MAP_APPFONT ( 12 , 14 ) ; Size = MAP_APPFONT ( 132 , 10 ) ; Text [ en-US ] = "~Not larger than page area" ; @@ -43,12 +44,14 @@ TabPage TP_FOOTNOTE_PAGE }; RadioButton RB_MAXHEIGHT { + HelpID = "sw:RadioButton:TP_FOOTNOTE_PAGE:RB_MAXHEIGHT"; Pos = MAP_APPFONT ( 12 , 28 ) ; Size = MAP_APPFONT ( 132 , 10 ) ; Text [ en-US ] = "Maximum footnote ~height" ; }; MetricField ED_MAXHEIGHT { + HelpID = "sw:MetricField:TP_FOOTNOTE_PAGE:ED_MAXHEIGHT"; Border = TRUE ; Pos = MAP_APPFONT ( 148 , 26 ) ; Size = MAP_APPFONT ( 42 , 12 ) ; @@ -75,6 +78,7 @@ TabPage TP_FOOTNOTE_PAGE }; MetricField ED_DIST { + HelpID = "sw:MetricField:TP_FOOTNOTE_PAGE:ED_DIST"; Border = TRUE ; Pos = MAP_APPFONT ( 148 , 42 ) ; Size = MAP_APPFONT ( 42 , 12 ) ; @@ -105,6 +109,7 @@ TabPage TP_FOOTNOTE_PAGE }; ListBox DLB_LINEPOS { + HelpID = "sw:ListBox:TP_FOOTNOTE_PAGE:DLB_LINEPOS"; Pos = MAP_APPFONT ( 148 , 71 ) ; Size = MAP_APPFONT ( 57 , 40 ) ; TabStop = TRUE ; @@ -128,6 +133,7 @@ TabPage TP_FOOTNOTE_PAGE }; ListBox DLB_LINETYPE { + HelpID = "sw:ListBox:TP_FOOTNOTE_PAGE:DLB_LINETYPE"; Pos = MAP_APPFONT ( 148 , 87 ) ; Size = MAP_APPFONT ( 57 , 50 ) ; TabStop = TRUE ; @@ -145,6 +151,7 @@ TabPage TP_FOOTNOTE_PAGE }; MetricField ED_LINEWIDTH { + HelpID = "sw:MetricField:TP_FOOTNOTE_PAGE:ED_LINEWIDTH"; Border = TRUE ; Pos = MAP_APPFONT ( 148 , 103 ) ; Size = MAP_APPFONT ( 42 , 12 ) ; @@ -168,6 +175,7 @@ TabPage TP_FOOTNOTE_PAGE }; MetricField ED_LINEDIST { + HelpID = "sw:MetricField:TP_FOOTNOTE_PAGE:ED_LINEDIST"; Border = TRUE ; Pos = MAP_APPFONT ( 148 , 119 ) ; Size = MAP_APPFONT ( 42 , 12 ) ; diff --git a/sw/source/ui/misc/pggrid.cxx b/sw/source/ui/misc/pggrid.cxx index cfbff63c0f..41ab7dee62 100644 --- a/sw/source/ui/misc/pggrid.cxx +++ b/sw/source/ui/misc/pggrid.cxx @@ -151,14 +151,14 @@ SwTextGridPage::SwTextGridPage(Window *pParent, const SfxItemSet &rSet) : XColorTable* pColorTbl = XColorTable::GetStdColorTable(); aColorLB.InsertAutomaticEntry(); - for( USHORT i = 0; i < pColorTbl->Count(); ++i ) + for( sal_uInt16 i = 0; i < pColorTbl->Count(); ++i ) { XColorEntry* pEntry = pColorTbl->GetColor( i ); Color aColor = pEntry->GetColor(); String sName = pEntry->GetName(); aColorLB.InsertEntry( aColor, sName ); } - aColorLB.SetUpdateMode( TRUE ); + aColorLB.SetUpdateMode( sal_True ); //Get the default paper mode SwView *pView = ::GetActiveView(); if( pView ) @@ -198,9 +198,9 @@ SfxTabPage *SwTextGridPage::Create(Window *pParent, const SfxItemSet &rSet) return new SwTextGridPage(pParent, rSet); } -BOOL SwTextGridPage::FillItemSet(SfxItemSet &rSet) +sal_Bool SwTextGridPage::FillItemSet(SfxItemSet &rSet) { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; if(aNoGridRB.GetSavedValue() != aNoGridRB.IsChecked()|| aLinesGridRB.GetSavedValue() != aLinesGridRB.IsChecked()|| aLinesPerPageNF.GetSavedValue().ToInt32() @@ -217,7 +217,7 @@ BOOL SwTextGridPage::FillItemSet(SfxItemSet &rSet) aColorLB.GetSavedValue() != aColorLB.GetSelectEntryPos()) { PutGridItem(rSet); - bRet = TRUE; + bRet = sal_True; } // draw ticks of ruler @@ -231,7 +231,7 @@ BOOL SwTextGridPage::FillItemSet(SfxItemSet &rSet) void SwTextGridPage::Reset(const SfxItemSet &rSet) { - if(SFX_ITEM_AVAILABLE <= rSet.GetItemState(RES_TEXTGRID, TRUE)) + if(SFX_ITEM_AVAILABLE <= rSet.GetItemState(RES_TEXTGRID, sal_True)) { const SwTextGridItem& rGridItem = (const SwTextGridItem&)rSet.Get(RES_TEXTGRID); RadioButton* pButton = 0; @@ -320,7 +320,7 @@ void SwTextGridPage::PutGridItem(SfxItemSet& rSet) void SwTextGridPage::UpdatePageSize(const SfxItemSet& rSet) { - if( SFX_ITEM_UNKNOWN != rSet.GetItemState( RES_FRAMEDIR, TRUE )) + if( SFX_ITEM_UNKNOWN != rSet.GetItemState( RES_FRAMEDIR, sal_True )) { const SvxFrameDirectionItem& rDirItem = (const SvxFrameDirectionItem&)rSet.Get(RES_FRAMEDIR); @@ -393,9 +393,9 @@ void SwTextGridPage::SetLinesOrCharsRanges(FixedText & rField, const sal_Int32 n rField.SetText( aFieldStr ); } -USHORT* SwTextGridPage::GetRanges() +sal_uInt16* SwTextGridPage::GetRanges() { - static USHORT aPageRg[] = { + static sal_uInt16 aPageRg[] = { RES_TEXTGRID, RES_TEXTGRID, 0}; return aPageRg; diff --git a/sw/source/ui/misc/pggrid.src b/sw/source/ui/misc/pggrid.src index a6377dd25f..f660772415 100644 --- a/sw/source/ui/misc/pggrid.src +++ b/sw/source/ui/misc/pggrid.src @@ -41,24 +41,28 @@ TabPage TP_TEXTGRID_PAGE }; RadioButton RB_NOGRID { + HelpID = "sw:RadioButton:TP_TEXTGRID_PAGE:RB_NOGRID"; Pos = MAP_APPFONT ( 12 , 14 ) ; Size = MAP_APPFONT ( 158 , 10 ) ; Text [ en-US ] = "No grid" ; }; RadioButton RB_LINESGRID { + HelpID = "sw:RadioButton:TP_TEXTGRID_PAGE:RB_LINESGRID"; Pos = MAP_APPFONT ( 12 , 27 ) ; Size = MAP_APPFONT ( 158 , 10 ) ; Text [ en-US ] = "Grid (lines only)" ; }; RadioButton RB_CHARSGRID { + HelpID = "sw:RadioButton:TP_TEXTGRID_PAGE:RB_CHARSGRID"; Pos = MAP_APPFONT ( 12 , 40 ) ; Size = MAP_APPFONT ( 158 , 10 ) ; Text [ en-US ] = "Grid (lines and characters)" ; }; CheckBox CB_SNAPTOCHARS { + HelpID = "sw:CheckBox:TP_TEXTGRID_PAGE:CB_SNAPTOCHARS"; Pos = MAP_APPFONT ( 14 , 53 ) ; Size = MAP_APPFONT ( 158 , 10 ) ; Text [ en-US ] = "~Snap to characters" ; @@ -83,6 +87,7 @@ TabPage TP_TEXTGRID_PAGE }; NumericField NF_LINESPERPAGE { + HelpID = "sw:NumericField:TP_TEXTGRID_PAGE:NF_LINESPERPAGE"; Pos = MAP_APPFONT ( 74 , 80 ) ; Size = MAP_APPFONT ( 25 , 12 ) ; Border = TRUE ; @@ -111,6 +116,7 @@ TabPage TP_TEXTGRID_PAGE }; MetricField MF_TEXTSIZE { + HelpID = "sw:MetricField:TP_TEXTGRID_PAGE:MF_TEXTSIZE"; Pos = MAP_APPFONT ( 216 , 80 ) ; Size = MAP_APPFONT ( 35 , 12 ) ; Border = TRUE ; @@ -134,6 +140,7 @@ TabPage TP_TEXTGRID_PAGE }; NumericField NF_CHARSPERLINE { + HelpID = "sw:NumericField:TP_TEXTGRID_PAGE:NF_CHARSPERLINE"; Pos = MAP_APPFONT ( 74 , 96 ) ; Size = MAP_APPFONT ( 25 , 12 ) ; Border = TRUE ; @@ -157,6 +164,7 @@ TabPage TP_TEXTGRID_PAGE }; MetricField MF_CHARWIDTH { + HelpID = "sw:MetricField:TP_TEXTGRID_PAGE:MF_CHARWIDTH"; Pos = MAP_APPFONT ( 216 , 96 ) ; Size = MAP_APPFONT ( 35 , 12 ) ; Border = TRUE ; @@ -186,6 +194,7 @@ TabPage TP_TEXTGRID_PAGE }; MetricField MF_RUBYSIZE { + HelpID = "sw:MetricField:TP_TEXTGRID_PAGE:MF_RUBYSIZE"; Pos = MAP_APPFONT ( 216 , 96 ) ; Size = MAP_APPFONT ( 35 , 12 ) ; Border = TRUE ; @@ -203,6 +212,7 @@ TabPage TP_TEXTGRID_PAGE }; CheckBox CB_RUBYBELOW { + HelpID = "sw:CheckBox:TP_TEXTGRID_PAGE:CB_RUBYBELOW"; Pos = MAP_APPFONT ( 14 , 112 ) ; Size = MAP_APPFONT ( 237 , 10 ) ; Text [ en-US ] = "Ruby text below/left from base text" ; @@ -215,12 +225,14 @@ TabPage TP_TEXTGRID_PAGE }; CheckBox CB_DISPLAY { + HelpID = "sw:CheckBox:TP_TEXTGRID_PAGE:CB_DISPLAY"; Pos = MAP_APPFONT ( 12 , 139 ) ; Size = MAP_APPFONT ( 118 , 10 ) ; Text [ en-US ] = "Display grid" ; }; CheckBox CB_PRINT { + HelpID = "sw:CheckBox:TP_TEXTGRID_PAGE:CB_PRINT"; Pos = MAP_APPFONT ( 18 , 154 ) ; Size = MAP_APPFONT ( 112 , 10 ) ; Text [ en-US ] = "Print grid" ; @@ -233,6 +245,7 @@ TabPage TP_TEXTGRID_PAGE }; ListBox LB_COLOR { + HelpID = "sw:ListBox:TP_TEXTGRID_PAGE:LB_COLOR"; Pos = MAP_APPFONT ( 191 , 137 ) ; Size = MAP_APPFONT ( 60 , 50 ) ; TabStop = TRUE; diff --git a/sw/source/ui/misc/redlndlg.cxx b/sw/source/ui/misc/redlndlg.cxx index 2752bbfb38..aef9050a0d 100644 --- a/sw/source/ui/misc/redlndlg.cxx +++ b/sw/source/ui/misc/redlndlg.cxx @@ -64,7 +64,6 @@ // -> #111827# #include <comcore.hrc> #include <swundo.hxx> -#include <undobj.hxx> #include <SwRewriter.hxx> // <- #111827# @@ -85,11 +84,11 @@ SV_IMPL_OP_PTRARR_SORT(SwRedlineDataParentSortArr, SwRedlineDataParentPtr) SV_IMPL_PTRARR(SwRedlineDataChildArr, SwRedlineDataChildPtr) SV_IMPL_PTRARR(SvLBoxEntryArr, SvLBoxEntryPtr) -static USHORT nSortMode = 0xffff; -static BOOL bSortDir = TRUE; +static sal_uInt16 nSortMode = 0xffff; +static sal_Bool bSortDir = sal_True; SwRedlineAcceptChild::SwRedlineAcceptChild( Window* _pParent, - USHORT nId, + sal_uInt16 nId, SfxBindings* pBindings, SfxChildWinInfo* pInfo ) : SwChildWinWrapper( _pParent, nId ) @@ -102,11 +101,11 @@ SwRedlineAcceptChild::SwRedlineAcceptChild( Window* _pParent, /*-------------------------------------------------------------------- Beschreibung: Nach Dok-Wechsel Dialog neu initialisieren --------------------------------------------------------------------*/ -BOOL SwRedlineAcceptChild::ReInitDlg(SwDocShell *pDocSh) +sal_Bool SwRedlineAcceptChild::ReInitDlg(SwDocShell *pDocSh) { - BOOL bRet; + sal_Bool bRet; - if ((bRet = SwChildWinWrapper::ReInitDlg(pDocSh)) == TRUE) // Sofort aktualisieren, Dok-Wechsel + if ((bRet = SwChildWinWrapper::ReInitDlg(pDocSh)) == sal_True) // Sofort aktualisieren, Dok-Wechsel ((SwModelessRedlineAcceptDlg*)GetWindow())->Activate(); return bRet; @@ -134,13 +133,13 @@ void SwModelessRedlineAcceptDlg::Activate() if (pChildWin->GetOldDocShell() != pDocSh) { // Dok-Wechsel - SwWait aWait( *pDocSh, FALSE ); + SwWait aWait( *pDocSh, sal_False ); SwWrtShell* pSh = pView->GetWrtShellPtr(); pChildWin->SetOldDocShell(pDocSh); // Rekursion vermeiden (durch Modified-Hdl) - BOOL bMod = pSh->IsModified(); - SfxBoolItem aShow(FN_REDLINE_SHOW, TRUE); + sal_Bool bMod = pSh->IsModified(); + SfxBoolItem aShow(FN_REDLINE_SHOW, sal_True); pSh->GetView().GetViewFrame()->GetDispatcher()->Execute( FN_REDLINE_SHOW, SFX_CALLMODE_SYNCHRON|SFX_CALLMODE_RECORD, &aShow, 0L); if (!bMod) @@ -179,7 +178,7 @@ SwModelessRedlineAcceptDlg::~SwModelessRedlineAcceptDlg() delete pImplDlg; } -SwRedlineAcceptDlg::SwRedlineAcceptDlg(Dialog *pParent, BOOL bAutoFmt) : +SwRedlineAcceptDlg::SwRedlineAcceptDlg(Dialog *pParent, sal_Bool bAutoFmt) : pParentDlg (pParent), aTabPagesCTRL (pParent, SW_RES(CTRL_TABPAGES)), aPopup (SW_RES(MN_REDLINE_POPUP)), @@ -189,8 +188,8 @@ SwRedlineAcceptDlg::SwRedlineAcceptDlg(Dialog *pParent, BOOL bAutoFmt) : sTableChgd (SW_RES(STR_REDLINE_TABLECHG)), sFmtCollSet (SW_RES(STR_REDLINE_FMTCOLLSET)), sAutoFormat (SW_RES(STR_REDLINE_AUTOFMT)), - bOnlyFormatedRedlines( FALSE ), - bHasReadonlySel ( FALSE ), + bOnlyFormatedRedlines( sal_False ), + bHasReadonlySel ( sal_False ), bRedlnAutoFmt (bAutoFmt), bInhibitActivate( false ) { @@ -217,13 +216,13 @@ SwRedlineAcceptDlg::SwRedlineAcceptDlg(Dialog *pParent, BOOL bAutoFmt) : { pActLB->InsertEntry(sFmtCollSet); pActLB->InsertEntry(sAutoFormat); - pTPView->ShowUndo(TRUE); + pTPView->ShowUndo(sal_True); pTPView->DisableUndo(); // Noch gibts keine UNDO-Events } pActLB->SelectEntryPos(0); - pTable->SetWindowBits(WB_HASLINES|WB_CLIPCHILDREN|WB_HASBUTTONS|WB_HASBUTTONSATROOT|WB_HSCROLL); + pTable->SetStyle(pTable->GetStyle()|WB_HASLINES|WB_CLIPCHILDREN|WB_HASBUTTONS|WB_HASBUTTONSATROOT|WB_HSCROLL); pTable->SetNodeDefaultImages(); pTable->SetSelectionMode(MULTIPLE_SELECTION); pTable->SetHighlightRange(1); @@ -269,11 +268,11 @@ SwRedlineAcceptDlg::~SwRedlineAcceptDlg() { } -void SwRedlineAcceptDlg::Init(USHORT nStart) +void SwRedlineAcceptDlg::Init(sal_uInt16 nStart) { - SwWait aWait( *::GetActiveView()->GetDocShell(), FALSE ); - pTable->SetUpdateMode(FALSE); - aUsedSeqNo.Remove((USHORT)0, aUsedSeqNo.Count()); + SwWait aWait( *::GetActiveView()->GetDocShell(), sal_False ); + pTable->SetUpdateMode(sal_False); + aUsedSeqNo.Remove((sal_uInt16)0, aUsedSeqNo.Count()); if (nStart) RemoveParents(nStart, aRedlineParents.Count() - 1); @@ -288,7 +287,7 @@ void SwRedlineAcceptDlg::Init(USHORT nStart) InsertParents(nStart); InitAuthors(); - pTable->SetUpdateMode(TRUE); + pTable->SetUpdateMode(sal_True); // #i69618# this moves the list box to the right position, visually SvLBoxEntry* pSelEntry = pTable->FirstSelected(); if( pSelEntry ) @@ -307,12 +306,12 @@ void SwRedlineAcceptDlg::InitAuthors() pFilterPage->ClearAuthors(); String sParent; - USHORT nCount = pSh->GetRedlineCount(); + sal_uInt16 nCount = pSh->GetRedlineCount(); - bOnlyFormatedRedlines = TRUE; - bHasReadonlySel = FALSE; - BOOL bIsNotFormated = FALSE; - USHORT i; + bOnlyFormatedRedlines = sal_True; + bHasReadonlySel = sal_False; + sal_Bool bIsNotFormated = sal_False; + sal_uInt16 i; // Autoren ermitteln for ( i = 0; i < nCount; i++) @@ -320,13 +319,13 @@ void SwRedlineAcceptDlg::InitAuthors() const SwRedline& rRedln = pSh->GetRedline(i); if( bOnlyFormatedRedlines && nsRedlineType_t::REDLINE_FORMAT != rRedln.GetType() ) - bOnlyFormatedRedlines = FALSE; + bOnlyFormatedRedlines = sal_False; String *pAuthor = new String(rRedln.GetAuthorString()); if (!aStrings.Insert(pAuthor)) delete pAuthor; - for (USHORT nStack = 1; nStack < rRedln.GetStackCount(); nStack++) + for (sal_uInt16 nStack = 1; nStack < rRedln.GetStackCount(); nStack++) { pAuthor = new String(rRedln.GetAuthorString(nStack)); if (!aStrings.Insert(pAuthor)) @@ -340,13 +339,13 @@ void SwRedlineAcceptDlg::InitAuthors() if (pFilterPage->SelectAuthor(sOldAuthor) == LISTBOX_ENTRY_NOTFOUND && aStrings.Count()) pFilterPage->SelectAuthor(*aStrings[0]); - BOOL bEnable = pTable->GetEntryCount() != 0 && !pSh->getIDocumentRedlineAccess()->GetRedlinePassword().getLength(); - BOOL bSel = pTable->FirstSelected() != 0; + sal_Bool bEnable = pTable->GetEntryCount() != 0 && !pSh->getIDocumentRedlineAccess()->GetRedlinePassword().getLength(); + sal_Bool bSel = pTable->FirstSelected() != 0; SvLBoxEntry* pSelEntry = pTable->FirstSelected(); while (pSelEntry) { - USHORT nPos = GetRedlinePos(*pSelEntry); + sal_uInt16 nPos = GetRedlinePos(*pSelEntry); const SwRedline& rRedln = pSh->GetRedline( nPos ); bIsNotFormated |= nsRedlineType_t::REDLINE_FORMAT != rRedln.GetType(); @@ -361,7 +360,7 @@ void SwRedlineAcceptDlg::InitAuthors() } String SwRedlineAcceptDlg::GetRedlineText( const SwRedline& rRedln, - DateTime &rDateTime, USHORT nStack) + DateTime &rDateTime, sal_uInt16 nStack) { String sEntry(GetActionText(rRedln, nStack)); sEntry += '\t'; @@ -379,7 +378,7 @@ String SwRedlineAcceptDlg::GetRedlineText( const SwRedline& rRedln, return sEntry; } -const String &SwRedlineAcceptDlg::GetActionText(const SwRedline& rRedln, USHORT nStack) +const String &SwRedlineAcceptDlg::GetActionText(const SwRedline& rRedln, sal_uInt16 nStack) { switch( rRedln.GetType(nStack) ) { @@ -416,20 +415,20 @@ void SwRedlineAcceptDlg::Activate() return; SwView *pView = ::GetActiveView(); - SwWait aWait( *pView->GetDocShell(), FALSE ); + SwWait aWait( *pView->GetDocShell(), sal_False ); - aUsedSeqNo.Remove((USHORT)0, aUsedSeqNo.Count()); + aUsedSeqNo.Remove((sal_uInt16)0, aUsedSeqNo.Count()); if (!pView) // Kann passieren, wenn man auf eine andere App umschaltet, wenn return; // vorher eine Listbox im Dialog den Focus hatte (eigentlich THs Bug) // Hat sich was geaendert? SwWrtShell* pSh = pView->GetWrtShellPtr(); - USHORT nCount = pSh->GetRedlineCount(); + sal_uInt16 nCount = pSh->GetRedlineCount(); // Anzahl und Pointer ueberpruefen SwRedlineDataParent *pParent = 0; - USHORT i; + sal_uInt16 i; for ( i = 0; i < nCount; i++) { @@ -446,7 +445,7 @@ void SwRedlineAcceptDlg::Activate() if (&rRedln.GetRedlineData() != pParent->pData) { // Redline-Parents wurden eingefuegt, geaendert oder geloescht - if ((i = CalcDiff(i, FALSE)) == USHRT_MAX) + if ((i = CalcDiff(i, sal_False)) == USHRT_MAX) return; continue; } @@ -457,7 +456,7 @@ void SwRedlineAcceptDlg::Activate() if (!pRedlineData && pBackupData) { // Redline-Childs wurden geloescht - if ((i = CalcDiff(i, TRUE)) == USHRT_MAX) + if ((i = CalcDiff(i, sal_True)) == USHRT_MAX) return; continue; } @@ -468,7 +467,7 @@ void SwRedlineAcceptDlg::Activate() if (pRedlineData != pBackupData->pChild) { // Redline-Childs wurden eingefuegt, geaendert oder geloescht - if ((i = CalcDiff(i, TRUE)) == USHRT_MAX) + if ((i = CalcDiff(i, sal_True)) == USHRT_MAX) return; continue; } @@ -508,7 +507,7 @@ void SwRedlineAcceptDlg::Activate() InitAuthors(); } -USHORT SwRedlineAcceptDlg::CalcDiff(USHORT nStart, BOOL bChild) +sal_uInt16 SwRedlineAcceptDlg::CalcDiff(sal_uInt16 nStart, sal_Bool bChild) { if (!nStart) { @@ -516,10 +515,10 @@ USHORT SwRedlineAcceptDlg::CalcDiff(USHORT nStart, BOOL bChild) return USHRT_MAX; } - pTable->SetUpdateMode(FALSE); + pTable->SetUpdateMode(sal_False); SwView *pView = ::GetActiveView(); SwWrtShell* pSh = pView->GetWrtShellPtr(); - USHORT nAutoFmt = HasRedlineAutoFmt() ? nsRedlineType_t::REDLINE_FORM_AUTOFMT : 0; + sal_uInt16 nAutoFmt = HasRedlineAutoFmt() ? nsRedlineType_t::REDLINE_FORM_AUTOFMT : 0; SwRedlineDataParent *pParent = aRedlineParents[nStart]; const SwRedline& rRedln = pSh->GetRedline(nStart); @@ -543,26 +542,26 @@ USHORT SwRedlineAcceptDlg::CalcDiff(USHORT nStart, BOOL bChild) // Neue Childs einfuegen InsertChilds(pParent, rRedln, nAutoFmt); - pTable->SetUpdateMode(TRUE); + pTable->SetUpdateMode(sal_True); return nStart; } // Wurden Eintraege geloescht? const SwRedlineData *pRedlineData = &rRedln.GetRedlineData(); - USHORT i; + sal_uInt16 i; for ( i = nStart + 1; i < aRedlineParents.Count(); i++) { if (aRedlineParents[i]->pData == pRedlineData) { // Eintraege von nStart bis i-1 entfernen RemoveParents(nStart, i - 1); - pTable->SetUpdateMode(TRUE); + pTable->SetUpdateMode(sal_True); return nStart - 1; } } // Wurden Eintraege eingefuegt? - USHORT nCount = pSh->GetRedlineCount(); + sal_uInt16 nCount = pSh->GetRedlineCount(); pRedlineData = aRedlineParents[nStart]->pData; for (i = nStart + 1; i < nCount; i++) @@ -571,29 +570,29 @@ USHORT SwRedlineAcceptDlg::CalcDiff(USHORT nStart, BOOL bChild) { // Eintraege von nStart bis i-1 einfuegen InsertParents(nStart, i - 1); - pTable->SetUpdateMode(TRUE); + pTable->SetUpdateMode(sal_True); return nStart - 1; } } - pTable->SetUpdateMode(TRUE); + pTable->SetUpdateMode(sal_True); Init(nStart); // Alle Eintraege bis zum Ende abgleichen return USHRT_MAX; } -void SwRedlineAcceptDlg::InsertChilds(SwRedlineDataParent *pParent, const SwRedline& rRedln, const USHORT nAutoFmt) +void SwRedlineAcceptDlg::InsertChilds(SwRedlineDataParent *pParent, const SwRedline& rRedln, const sal_uInt16 nAutoFmt) { String sChild; SwRedlineDataChild *pLastRedlineChild = 0; const SwRedlineData *pRedlineData = &rRedln.GetRedlineData(); - BOOL bAutoFmt = (rRedln.GetRealType() & nAutoFmt) != 0; + sal_Bool bAutoFmt = (rRedln.GetRealType() & nAutoFmt) != 0; const String *pAction = &GetActionText(rRedln); - BOOL bValidParent = !sFilterAction.Len() || sFilterAction == *pAction; + sal_Bool bValidParent = !sFilterAction.Len() || sFilterAction == *pAction; bValidParent = bValidParent && pTable->IsValidEntry(&rRedln.GetAuthorString(), &rRedln.GetTimeStamp(), &rRedln.GetComment()); if (nAutoFmt) { - USHORT nPos; + sal_uInt16 nPos; if (pParent->pData->GetSeqNo() && !aUsedSeqNo.Insert(pParent, nPos)) // Gibts schon { @@ -607,9 +606,9 @@ void SwRedlineAcceptDlg::InsertChilds(SwRedlineDataParent *pParent, const SwRedl } bValidParent = bValidParent && bAutoFmt; } - BOOL bValidTree = bValidParent; + sal_Bool bValidTree = bValidParent; - for (USHORT nStack = 1; nStack < rRedln.GetStackCount(); nStack++) + for (sal_uInt16 nStack = 1; nStack < rRedln.GetStackCount(); nStack++) { pRedlineData = pRedlineData->Next(); @@ -623,7 +622,7 @@ void SwRedlineAcceptDlg::InsertChilds(SwRedlineDataParent *pParent, const SwRedl pParent->pNext = pRedlineChild; pAction = &GetActionText(rRedln, nStack); - BOOL bValidChild = !sFilterAction.Len() || sFilterAction == *pAction; + sal_Bool bValidChild = !sFilterAction.Len() || sFilterAction == *pAction; bValidChild = bValidChild && pTable->IsValidEntry(&rRedln.GetAuthorString(nStack), &rRedln.GetTimeStamp(nStack), &rRedln.GetComment()); if (nAutoFmt) bValidChild = bValidChild && bAutoFmt; @@ -633,7 +632,7 @@ void SwRedlineAcceptDlg::InsertChilds(SwRedlineDataParent *pParent, const SwRedl { RedlinData *pData = new RedlinData; pData->pData = pRedlineChild; - pData->bDisabled = TRUE; + pData->bDisabled = sal_True; sChild = GetRedlineText(rRedln, pData->aDateTime, nStack); SvLBoxEntry* pChild = pTable->InsertEntry(sChild, pData, pParent->pTLBParent); @@ -660,22 +659,22 @@ void SwRedlineAcceptDlg::InsertChilds(SwRedlineDataParent *pParent, const SwRedl } } -void SwRedlineAcceptDlg::RemoveParents(USHORT nStart, USHORT nEnd) +void SwRedlineAcceptDlg::RemoveParents(sal_uInt16 nStart, sal_uInt16 nEnd) { SwWrtShell* pSh = ::GetActiveView()->GetWrtShellPtr(); - USHORT nCount = pSh->GetRedlineCount(); + sal_uInt16 nCount = pSh->GetRedlineCount(); SvLBoxEntryArr aLBoxArr; // Wegen Bug der TLB, die bei Remove den SelectHandler IMMER ruft: pTable->SetSelectHdl(aOldSelectHdl); pTable->SetDeselectHdl(aOldDeselectHdl); - BOOL bChildsRemoved = FALSE; - pTable->SelectAll(FALSE); + sal_Bool bChildsRemoved = sal_False; + pTable->SelectAll(sal_False); // Hinter dem letzten Eintrag Cursor setzen, da sonst Performance-Problem in TLB. // TLB wuerde sonst bei jedem Remove den Cursor erneut umsetzen (teuer) - USHORT nPos = Min((USHORT)nCount, (USHORT)aRedlineParents.Count()); + sal_uInt16 nPos = Min((sal_uInt16)nCount, (sal_uInt16)aRedlineParents.Count()); SvLBoxEntry *pCurEntry = NULL; while( ( pCurEntry == NULL ) && ( nPos > 0 ) ) { @@ -688,16 +687,16 @@ void SwRedlineAcceptDlg::RemoveParents(USHORT nStart, USHORT nEnd) SvLBoxTreeList* pModel = pTable->GetModel(); - for (USHORT i = nStart; i <= nEnd; i++) + for (sal_uInt16 i = nStart; i <= nEnd; i++) { if (!bChildsRemoved && aRedlineParents[i]->pNext) { SwRedlineDataChildPtr pChildPtr = (SwRedlineDataChildPtr)aRedlineParents[i]->pNext; - USHORT nChildPos = aRedlineChilds.GetPos(pChildPtr); + sal_uInt16 nChildPos = aRedlineChilds.GetPos(pChildPtr); if (nChildPos != USHRT_MAX) { - USHORT nChilds = 0; + sal_uInt16 nChilds = 0; while (pChildPtr) { @@ -706,43 +705,43 @@ void SwRedlineAcceptDlg::RemoveParents(USHORT nStart, USHORT nEnd) } aRedlineChilds.DeleteAndDestroy(nChildPos, nChilds); - bChildsRemoved = TRUE; + bChildsRemoved = sal_True; } } SvLBoxEntry *pEntry = aRedlineParents[i]->pTLBParent; if (pEntry) { long nIdx = aLBoxArr.Count() - 1L; - ULONG nAbsPos = pModel->GetAbsPos(pEntry); + sal_uLong nAbsPos = pModel->GetAbsPos(pEntry); while (nIdx >= 0 && - pModel->GetAbsPos(aLBoxArr[ static_cast< USHORT >(nIdx) ]) > nAbsPos) + pModel->GetAbsPos(aLBoxArr[ static_cast< sal_uInt16 >(nIdx) ]) > nAbsPos) nIdx--; - aLBoxArr.Insert( pEntry, static_cast< USHORT >(++nIdx) ); + aLBoxArr.Insert( pEntry, static_cast< sal_uInt16 >(++nIdx) ); } } // TLB von hinten abraeumen long nIdx = (long)aLBoxArr.Count() - 1L; while (nIdx >= 0) - pTable->RemoveEntry(aLBoxArr[ static_cast< USHORT >(nIdx--) ]); + pTable->RemoveEntry(aLBoxArr[ static_cast< sal_uInt16 >(nIdx--) ]); pTable->SetSelectHdl(LINK(this, SwRedlineAcceptDlg, SelectHdl)); pTable->SetDeselectHdl(LINK(this, SwRedlineAcceptDlg, DeselectHdl)); // Durch Remove wurde leider wieder dauernd von der TLB selektiert... - pTable->SelectAll(FALSE); + pTable->SelectAll(sal_False); aRedlineParents.DeleteAndDestroy( nStart, nEnd - nStart + 1); } -void SwRedlineAcceptDlg::InsertParents(USHORT nStart, USHORT nEnd) +void SwRedlineAcceptDlg::InsertParents(sal_uInt16 nStart, sal_uInt16 nEnd) { SwView *pView = ::GetActiveView(); SwWrtShell* pSh = pView->GetWrtShellPtr(); - USHORT nAutoFmt = HasRedlineAutoFmt() ? nsRedlineType_t::REDLINE_FORM_AUTOFMT : 0; + sal_uInt16 nAutoFmt = HasRedlineAutoFmt() ? nsRedlineType_t::REDLINE_FORM_AUTOFMT : 0; String sParent; - USHORT nCount = pSh->GetRedlineCount(); - nEnd = Min((USHORT)nEnd, (USHORT)(nCount - 1)); // Handelt auch nEnd=USHRT_MAX (bis zum Ende) ab + sal_uInt16 nCount = pSh->GetRedlineCount(); + nEnd = Min((sal_uInt16)nEnd, (sal_uInt16)(nCount - 1)); // Handelt auch nEnd=USHRT_MAX (bis zum Ende) ab if (nEnd == USHRT_MAX) return; // Keine Redlines im Dokument @@ -759,13 +758,13 @@ void SwRedlineAcceptDlg::InsertParents(USHORT nStart, USHORT nEnd) pSh->SwCrsrShell::Push(); if( 0 == (pCurrRedline = pSh->SelNextRedline())) pCurrRedline = pSh->SelPrevRedline(); - pSh->SwCrsrShell::Pop( FALSE ); + pSh->SwCrsrShell::Pop( sal_False ); } } else pCurrRedline = 0; - for (USHORT i = nStart; i <= nEnd; i++) + for (sal_uInt16 i = nStart; i <= nEnd; i++) { const SwRedline& rRedln = pSh->GetRedline(i); const SwRedlineData *pRedlineData = &rRedln.GetRedlineData(); @@ -780,7 +779,7 @@ void SwRedlineAcceptDlg::InsertParents(USHORT nStart, USHORT nEnd) pData = new RedlinData; pData->pData = pRedlineParent; - pData->bDisabled = FALSE; + pData->bDisabled = sal_False; sParent = GetRedlineText(rRedln, pData->aDateTime); pParent = pTable->InsertEntry(sParent, pData, 0, i); @@ -797,11 +796,11 @@ void SwRedlineAcceptDlg::InsertParents(USHORT nStart, USHORT nEnd) } } -void SwRedlineAcceptDlg::CallAcceptReject( BOOL bSelect, BOOL bAccept ) +void SwRedlineAcceptDlg::CallAcceptReject( sal_Bool bSelect, sal_Bool bAccept ) { SwWrtShell* pSh = ::GetActiveView()->GetWrtShellPtr(); SvLBoxEntry* pEntry = bSelect ? pTable->FirstSelected() : pTable->First(); - ULONG nPos = LONG_MAX; + sal_uLong nPos = LONG_MAX; typedef std::vector<SvLBoxEntry*> ListBoxEntries_t; ListBoxEntries_t aRedlines; @@ -828,11 +827,11 @@ void SwRedlineAcceptDlg::CallAcceptReject( BOOL bSelect, BOOL bAccept ) pEntry = bSelect ? pTable->NextSelected(pEntry) : pTable->Next(pEntry); } - BOOL (SwEditShell:: *FnAccRej)( USHORT ) = &SwEditShell::AcceptRedline; + sal_Bool (SwEditShell:: *FnAccRej)( sal_uInt16 ) = &SwEditShell::AcceptRedline; if( !bAccept ) FnAccRej = &SwEditShell::RejectRedline; - SwWait aWait( *pSh->GetView().GetDocShell(), TRUE ); + SwWait aWait( *pSh->GetView().GetDocShell(), sal_True ); pSh->StartAction(); // #111827# @@ -863,14 +862,16 @@ void SwRedlineAcceptDlg::CallAcceptReject( BOOL bSelect, BOOL bAccept ) aIter != aEnd; ++aIter ) { - USHORT nPosition = GetRedlinePos( **aIter ); + sal_uInt16 nPosition = GetRedlinePos( **aIter ); if( nPosition != USHRT_MAX ) (pSh->*FnAccRej)( nPosition ); } // #111827# if (aRedlines.size() > 1) - pSh->EndUndo(bAccept? UNDO_ACCEPT_REDLINE : UNDO_REJECT_REDLINE); + { + pSh->EndUndo(); + } pSh->EndAction(); @@ -894,7 +895,7 @@ void SwRedlineAcceptDlg::CallAcceptReject( BOOL bSelect, BOOL bAccept ) pTPView->EnableUndo(); } -USHORT SwRedlineAcceptDlg::GetRedlinePos( const SvLBoxEntry& rEntry ) const +sal_uInt16 SwRedlineAcceptDlg::GetRedlinePos( const SvLBoxEntry& rEntry ) const { SwWrtShell* pSh = ::GetActiveView()->GetWrtShellPtr(); return pSh->FindRedlineOfData( *((SwRedlineDataParent*)((RedlinData *) @@ -903,25 +904,25 @@ USHORT SwRedlineAcceptDlg::GetRedlinePos( const SvLBoxEntry& rEntry ) const IMPL_LINK( SwRedlineAcceptDlg, AcceptHdl, void*, EMPTYARG) { - CallAcceptReject( TRUE, TRUE ); + CallAcceptReject( sal_True, sal_True ); return 0; } IMPL_LINK( SwRedlineAcceptDlg, AcceptAllHdl, void*, EMPTYARG ) { - CallAcceptReject( FALSE, TRUE ); + CallAcceptReject( sal_False, sal_True ); return 0; } IMPL_LINK( SwRedlineAcceptDlg, RejectHdl, void*, EMPTYARG ) { - CallAcceptReject( TRUE, FALSE ); + CallAcceptReject( sal_True, sal_False ); return 0; } IMPL_LINK( SwRedlineAcceptDlg, RejectAllHdl, void*, EMPTYARG ) { - CallAcceptReject( FALSE, FALSE ); + CallAcceptReject( sal_False, sal_False ); return 0; } @@ -972,8 +973,8 @@ IMPL_LINK( SwRedlineAcceptDlg, GotoHdl, void*, EMPTYARG ) SwWrtShell* pSh = ::GetActiveView()->GetWrtShellPtr(); aSelectTimer.Stop(); - BOOL bIsNotFormated = FALSE; - BOOL bSel = FALSE; + sal_Bool bIsNotFormated = sal_False; + sal_Bool bSel = sal_False; //#98883# don't select redlines while the dialog is not focussed //#107938# But not only ask pTable if it has the focus. To move @@ -1004,17 +1005,17 @@ IMPL_LINK( SwRedlineAcceptDlg, GotoHdl, void*, EMPTYARG ) } } else - bSel = TRUE; + bSel = sal_True; // #98864# find the selected redline (ignore, if the redline is already gone) - USHORT nPos = GetRedlinePos(*pActEntry); + sal_uInt16 nPos = GetRedlinePos(*pActEntry); if( nPos != USHRT_MAX ) { const SwRedline& rRedln = pSh->GetRedline( nPos ); bIsNotFormated |= nsRedlineType_t::REDLINE_FORMAT != rRedln.GetType(); - if (pSh->GotoRedline(nPos, TRUE)) + if (pSh->GotoRedline(nPos, sal_True)) { pSh->SetInSelect(); pSh->EnterAddMode(); @@ -1028,7 +1029,7 @@ IMPL_LINK( SwRedlineAcceptDlg, GotoHdl, void*, EMPTYARG ) pSh->EndAction(); pSh->SetCareWin(NULL); } - BOOL bEnable = !pSh->getIDocumentRedlineAccess()->GetRedlinePassword().getLength(); + sal_Bool bEnable = !pSh->getIDocumentRedlineAccess()->GetRedlinePassword().getLength(); pTPView->EnableAccept( bEnable && bSel /*&& !bReadonlySel*/ ); pTPView->EnableReject( bEnable && bSel && bIsNotFormated /*&& !bReadonlySel*/ ); pTPView->EnableRejectAll( bEnable && !bOnlyFormatedRedlines && !bHasReadonlySel ); @@ -1055,10 +1056,10 @@ IMPL_LINK( SwRedlineAcceptDlg, CommandHdl, void*, EMPTYARG ) if (pTable->GetParent(pEntry)) pTopEntry = pTable->GetParent(pEntry); - USHORT nPos = GetRedlinePos(*pTopEntry); + sal_uInt16 nPos = GetRedlinePos(*pTopEntry); // Bei geschuetzten Bereichen kommentieren disablen - if ((pRed = pSh->GotoRedline(nPos, TRUE)) != 0) + if ((pRed = pSh->GotoRedline(nPos, sal_True)) != 0) { if( pSh->IsCrsrPtAtEnd() ) pSh->SwapPam(); @@ -1074,20 +1075,20 @@ IMPL_LINK( SwRedlineAcceptDlg, CommandHdl, void*, EMPTYARG ) ); aPopup.EnableItem( MN_SUB_SORT, pTable->First() != 0 ); - USHORT nColumn = pTable->GetSortedCol(); + sal_uInt16 nColumn = pTable->GetSortedCol(); if (nColumn == 0xffff) nColumn = 4; PopupMenu *pSubMenu = aPopup.GetPopupMenu(MN_SUB_SORT); if (pSubMenu) { - for (USHORT i = MN_SORT_ACTION; i < MN_SORT_ACTION + 5; i++) - pSubMenu->CheckItem(i, FALSE); + for (sal_uInt16 i = MN_SORT_ACTION; i < MN_SORT_ACTION + 5; i++) + pSubMenu->CheckItem(i, sal_False); pSubMenu->CheckItem(nColumn + MN_SORT_ACTION); } - USHORT nRet = aPopup.Execute(pTable, aCEvt.GetMousePosPixel()); + sal_uInt16 nRet = aPopup.Execute(pTable, aCEvt.GetMousePosPixel()); switch( nRet ) { @@ -1099,7 +1100,7 @@ IMPL_LINK( SwRedlineAcceptDlg, CommandHdl, void*, EMPTYARG ) if (pTable->GetParent(pEntry)) pEntry = pTable->GetParent(pEntry); - USHORT nPos = GetRedlinePos(*pEntry); + sal_uInt16 nPos = GetRedlinePos(*pEntry); const SwRedline &rRedline = pSh->GetRedline(nPos); @@ -1124,12 +1125,12 @@ IMPL_LINK( SwRedlineAcceptDlg, CommandHdl, void*, EMPTYARG ) rRedline.GetRedlineData().GetTimeStamp() ), SID_ATTR_POSTIT_DATE )); - AbstractSvxPostItDialog* pDlg = pFact->CreateSvxPostItDialog( pParentDlg, aSet, FALSE ); + AbstractSvxPostItDialog* pDlg = pFact->CreateSvxPostItDialog( pParentDlg, aSet, sal_False ); OSL_ENSURE(pDlg, "Dialogdiet fail!"); pDlg->HideAuthor(); - USHORT nResId = 0; + sal_uInt16 nResId = 0; switch( rRedline.GetType() ) { case nsRedlineType_t::REDLINE_INSERT: @@ -1177,7 +1178,7 @@ IMPL_LINK( SwRedlineAcceptDlg, CommandHdl, void*, EMPTYARG ) case MN_SORT_COMMENT: case MN_SORT_POSITION: { - bSortDir = TRUE; + bSortDir = sal_True; if (nRet - MN_SORT_ACTION == 4 && pTable->GetSortedCol() == 0xffff) break; // Haben wir schon @@ -1188,7 +1189,7 @@ IMPL_LINK( SwRedlineAcceptDlg, CommandHdl, void*, EMPTYARG ) if (pTable->GetSortedCol() == nSortMode) bSortDir = !pTable->GetSortDirection(); - SwWait aWait( *::GetActiveView()->GetDocShell(), FALSE ); + SwWait aWait( *::GetActiveView()->GetDocShell(), sal_False ); pTable->SortByCol(nSortMode, bSortDir); if (nSortMode == 0xffff) Init(); // Alles neu fuellen @@ -1206,16 +1207,16 @@ void SwRedlineAcceptDlg::Initialize(const String& rExtraData) { if (rExtraData.Len()) { - USHORT nPos = rExtraData.Search(C2S("AcceptChgDat:")); + sal_uInt16 nPos = rExtraData.Search(C2S("AcceptChgDat:")); // Versuche, den Alignment-String "ALIGN:(...)" einzulesen; wenn // er nicht vorhanden ist, liegt eine "altere Version vor if (nPos != STRING_NOTFOUND) { - USHORT n1 = rExtraData.Search('(', nPos); + sal_uInt16 n1 = rExtraData.Search('(', nPos); if (n1 != STRING_NOTFOUND) { - USHORT n2 = rExtraData.Search(')', n1); + sal_uInt16 n2 = rExtraData.Search(')', n1); if (n2 != STRING_NOTFOUND) { // Alignment-String herausschneiden @@ -1224,11 +1225,11 @@ void SwRedlineAcceptDlg::Initialize(const String& rExtraData) if (aStr.Len()) { - USHORT nCount = static_cast< USHORT >(aStr.ToInt32()); + sal_uInt16 nCount = static_cast< sal_uInt16 >(aStr.ToInt32()); - for (USHORT i = 0; i < nCount; i++) + for (sal_uInt16 i = 0; i < nCount; i++) { - USHORT n3 = aStr.Search(';'); + sal_uInt16 n3 = aStr.Search(';'); aStr.Erase(0, n3 + 1); pTable->SetTab(i, aStr.ToInt32(), MAP_PIXEL); } @@ -1243,11 +1244,11 @@ void SwRedlineAcceptDlg::FillInfo(String &rExtraData) const { rExtraData.AppendAscii("AcceptChgDat:("); - USHORT nCount = pTable->TabCount(); + sal_uInt16 nCount = pTable->TabCount(); rExtraData += String::CreateFromInt32(nCount); rExtraData += ';'; - for(USHORT i = 0; i < nCount; i++) + for(sal_uInt16 i = 0; i < nCount; i++) { rExtraData += String::CreateFromInt32( pTable->GetTab(i) ); rExtraData += ';'; diff --git a/sw/source/ui/misc/srtdlg.cxx b/sw/source/ui/misc/srtdlg.cxx index 0abd31faf0..6d8c8f0270 100644 --- a/sw/source/ui/misc/srtdlg.cxx +++ b/sw/source/ui/misc/srtdlg.cxx @@ -59,25 +59,25 @@ SV_IMPL_PTRARR( _FndBoxes, _FndBox* ) SV_IMPL_PTRARR( _FndLines, _FndLine* ) -static BOOL bCheck1 = TRUE; -static BOOL bCheck2 = FALSE; -static BOOL bCheck3 = FALSE; +static sal_Bool bCheck1 = sal_True; +static sal_Bool bCheck2 = sal_False; +static sal_Bool bCheck3 = sal_False; -static USHORT nCol1 = 1; -static USHORT nCol2 = 1; -static USHORT nCol3 = 1; +static sal_uInt16 nCol1 = 1; +static sal_uInt16 nCol2 = 1; +static sal_uInt16 nCol3 = 1; -static USHORT nType1 = 0; -static USHORT nType2 = 0; -static USHORT nType3 = 0; +static sal_uInt16 nType1 = 0; +static sal_uInt16 nType2 = 0; +static sal_uInt16 nType3 = 0; -static USHORT nLang = LANGUAGE_NONE; +static sal_uInt16 nLang = LANGUAGE_NONE; -static BOOL bAsc1 = TRUE; -static BOOL bAsc2 = TRUE; -static BOOL bAsc3 = TRUE; -static BOOL bCol = FALSE; -static BOOL bCsSens= FALSE; +static sal_Bool bAsc1 = sal_True; +static sal_Bool bAsc2 = sal_True; +static sal_Bool bAsc3 = sal_True; +static sal_Bool bCol = sal_False; +static sal_Bool bCsSens= sal_False; static sal_Unicode cDeli = '\t'; @@ -88,7 +88,7 @@ using ::rtl::OUString; void lcl_ClearLstBoxAndDelUserData( ListBox& rLstBox ) { void* pDel; - for( USHORT n = 0, nEnd = rLstBox.GetEntryCount(); n < nEnd; ++n ) + for( sal_uInt16 n = 0, nEnd = rLstBox.GetEntryCount(); n < nEnd; ++n ) if( 0 != ( pDel = rLstBox.GetEntryData( n )) ) delete (String*)pDel; rLstBox.Clear(); @@ -98,11 +98,11 @@ void lcl_ClearLstBoxAndDelUserData( ListBox& rLstBox ) Beschreibung: Fuer Tabellenselektion sel. Zeilen und Spalten feststellen --------------------------------------------------------------------*/ -BOOL lcl_GetSelTbl( SwWrtShell &rSh, USHORT& rX, USHORT& rY ) +sal_Bool lcl_GetSelTbl( SwWrtShell &rSh, sal_uInt16& rX, sal_uInt16& rY ) { const SwTableNode* pTblNd = rSh.IsCrsrInTbl(); if( !pTblNd ) - return FALSE; + return sal_False; _FndBox aFndBox( 0, 0 ); @@ -116,10 +116,10 @@ BOOL lcl_GetSelTbl( SwWrtShell &rSh, USHORT& rX, USHORT& rY ) } rX = aFndBox.GetLines().Count(); if( !rX ) - return FALSE; + return sal_False; rY = aFndBox.GetLines()[0]->GetBoxes().Count(); - return TRUE; + return sal_True; } /*-------------------------------------------------------------------- @@ -128,12 +128,13 @@ BOOL lcl_GetSelTbl( SwWrtShell &rSh, USHORT& rX, USHORT& rY ) SwSortDlg::SwSortDlg(Window* pParent, SwWrtShell &rShell) : SvxStandardDialog(pParent, SW_RES(DLG_SORTING)), + aColLbl(this, SW_RES(FT_COL )), aTypLbl(this, SW_RES(FT_KEYTYP)), aDirLbl(this, SW_RES(FT_DIR )), + aSortFL(this, SW_RES(FL_SORT_2 )), - aDirFL(this, SW_RES(FL_DIR )), - + aKeyCB1(this, SW_RES(CB_KEY1 )), aColEdt1(this, SW_RES(ED_KEY1 )), aTypDLB1(this, SW_RES(DLB_KEY1 )), @@ -151,8 +152,8 @@ SwSortDlg::SwSortDlg(Window* pParent, SwWrtShell &rShell) : aTypDLB3(this, SW_RES(DLB_KEY3 )), aSortUp3RB(this, SW_RES(RB_UP3 )), aSortDn3RB(this, SW_RES(RB_DN3 )), + aDirFL(this, SW_RES(FL_DIR )), - aSortFL(this, SW_RES(FL_SORT_2 )), aColumnRB(this, SW_RES(RB_COL )), aRowRB(this, SW_RES(RB_ROW )), @@ -180,6 +181,19 @@ SwSortDlg::SwSortDlg(Window* pParent, SwWrtShell &rShell) : nX( 99 ), nY( 99 ) { + aColEdt1.SetAccessibleName(aColLbl.GetText()); + aColEdt2.SetAccessibleName(aColLbl.GetText()); + aColEdt3.SetAccessibleName(aColLbl.GetText()); + aTypDLB1.SetAccessibleName(aTypLbl.GetText()); + aTypDLB2.SetAccessibleName(aTypLbl.GetText()); + aTypDLB3.SetAccessibleName(aTypLbl.GetText()); + aSortUpRB.SetAccessibleRelationMemberOf( &aKeyCB1 ); + aSortDnRB.SetAccessibleRelationMemberOf( &aKeyCB1 ); + aSortUp2RB.SetAccessibleRelationMemberOf( &aKeyCB2 ); + aSortDn2RB.SetAccessibleRelationMemberOf( &aKeyCB2 ); + aSortUp3RB.SetAccessibleRelationMemberOf( &aKeyCB3 ); + aSortDn3RB.SetAccessibleRelationMemberOf( &aKeyCB3 ); + aDelimEdt.SetMaxTextLen( 1 ); if(rSh.GetSelectionType() & (nsSelectionType::SEL_TBL|nsSelectionType::SEL_TBL_CELLS) ) @@ -187,14 +201,14 @@ SwSortDlg::SwSortDlg(Window* pParent, SwWrtShell &rShell) : aColumnRB.Check(bCol); aColLbl.SetText(bCol ? aRowTxt : aColTxt); aRowRB.Check(!bCol); - aDelimTabRB.Enable(FALSE); - aDelimFreeRB.Enable(FALSE); - aDelimEdt.Enable(FALSE); + aDelimTabRB.Enable(sal_False); + aDelimFreeRB.Enable(sal_False); + aDelimEdt.Enable(sal_False); } else { - aColumnRB.Enable(FALSE); - aRowRB.Check(TRUE); + aColumnRB.Enable(sal_False); + aRowRB.Check(sal_True); aColLbl.SetText(aColTxt); } @@ -222,9 +236,9 @@ SwSortDlg::SwSortDlg(Window* pParent, SwWrtShell &rShell) : // first initialise the language, then select the if( LANGUAGE_NONE == nLang || LANGUAGE_DONTKNOW == nLang ) - nLang = (USHORT)GetAppLanguage(); + nLang = (sal_uInt16)GetAppLanguage(); - aLangLB.SetLanguageList( LANG_LIST_ALL | LANG_LIST_ONLY_KNOWN, TRUE, FALSE); + aLangLB.SetLanguageList( LANG_LIST_ALL | LANG_LIST_ONLY_KNOWN, sal_True, sal_False); aLangLB.SelectLanguage( nLang ); LanguageHdl( 0 ); @@ -243,7 +257,7 @@ SwSortDlg::SwSortDlg(Window* pParent, SwWrtShell &rShell) : if(!aDelimTabRB.IsChecked()) { aDelimEdt.SetText(cDeli); - aDelimFreeRB.Check(TRUE); + aDelimFreeRB.Check(sal_True); DelimHdl(&aDelimFreeRB); } else @@ -252,11 +266,30 @@ SwSortDlg::SwSortDlg(Window* pParent, SwWrtShell &rShell) : FreeResource(); if( ::lcl_GetSelTbl( rSh, nX, nY) ) { - USHORT nMax = aRowRB.IsChecked()? nY : nX; + sal_uInt16 nMax = aRowRB.IsChecked()? nY : nX; aColEdt1.SetMax(nMax); aColEdt2.SetMax(nMax); aColEdt3.SetMax(nMax); } + + aDelimEdt.SetAccessibleRelationLabeledBy(&aDelimFreeRB); + aDelimPB.SetAccessibleRelationLabeledBy(&aDelimFreeRB); + aDelimPB.SetAccessibleRelationMemberOf(&aDelimFL); + + aColEdt1.SetAccessibleRelationMemberOf(&aKeyCB1); + aColEdt1.SetAccessibleRelationLabeledBy(&aColLbl); + aTypDLB1.SetAccessibleRelationMemberOf(&aKeyCB1); + aTypDLB1.SetAccessibleRelationLabeledBy(&aTypLbl); + + aColEdt2.SetAccessibleRelationMemberOf(&aKeyCB2); + aColEdt2.SetAccessibleRelationLabeledBy(&aColLbl); + aTypDLB2.SetAccessibleRelationMemberOf(&aKeyCB2); + aTypDLB2.SetAccessibleRelationLabeledBy(&aTypLbl); + + aColEdt3.SetAccessibleRelationMemberOf(&aKeyCB3); + aColEdt3.SetAccessibleRelationLabeledBy(&aColLbl); + aTypDLB3.SetAccessibleRelationMemberOf(&aKeyCB3); + aTypDLB3.SetAccessibleRelationLabeledBy(&aTypLbl); } SwSortDlg::~SwSortDlg() @@ -290,9 +323,9 @@ void SwSortDlg::Apply() bCheck2 = aKeyCB2.IsChecked(); bCheck3 = aKeyCB3.IsChecked(); - nCol1 = (USHORT)aColEdt1.GetValue(); - nCol2 = (USHORT)aColEdt2.GetValue(); - nCol3 = (USHORT)aColEdt3.GetValue(); + nCol1 = (sal_uInt16)aColEdt1.GetValue(); + nCol2 = (sal_uInt16)aColEdt2.GetValue(); + nCol3 = (sal_uInt16)aColEdt3.GetValue(); nType1 = aTypDLB1.GetSelectEntryPos(); nType2 = aTypDLB2.GetSelectEntryPos(); @@ -356,9 +389,9 @@ void SwSortDlg::Apply() aOptions.bTable = rSh.IsTableMode(); aOptions.bIgnoreCase = !bCsSens; - BOOL bRet; + sal_Bool bRet; { - SwWait aWait( *rSh.GetView().GetDocShell(), TRUE ); + SwWait aWait( *rSh.GetView().GetDocShell(), sal_True ); rSh.StartAllAction(); if( 0 != (bRet = rSh.Sort( aOptions ))) rSh.SetModified(); @@ -371,7 +404,7 @@ void SwSortDlg::Apply() IMPL_LINK( SwSortDlg, DelimHdl, RadioButton*, pButton ) { - BOOL bEnable = pButton == &aDelimFreeRB && aDelimFreeRB.IsEnabled(); + sal_Bool bEnable = pButton == &aDelimFreeRB && aDelimFreeRB.IsEnabled(); aDelimEdt.Enable( bEnable ); aDelimPB.Enable( bEnable ); return 0; @@ -388,7 +421,7 @@ IMPL_LINK( SwSortDlg, DelimCharHdl, PushButton*, EMPTYARG ) rSh.GetView().GetViewFrame()->GetFrame().GetFrameInterface(), RID_SVXDLG_CHARMAP ); if( RET_OK == pMap->Execute() ) { - SFX_ITEMSET_ARG( pMap->GetOutputItemSet(), pItem, SfxInt32Item, SID_ATTR_CHAR, FALSE ); + SFX_ITEMSET_ARG( pMap->GetOutputItemSet(), pItem, SfxInt32Item, SID_ATTR_CHAR, sal_False ); if ( pItem ) aDelimEdt.SetText( sal_Unicode ( pItem->GetValue() ) ); } @@ -407,6 +440,9 @@ IMPL_LINK( SwSortDlg, CheckHdl, CheckBox *, pCheck ) aColEdt2.SetMax(nY); aColEdt3.SetMax(nY); + aColEdt1.SetAccessibleName(aColTxt); + aColEdt2.SetAccessibleName(aColTxt); + aColEdt3.SetAccessibleName(aColTxt); } else if( pCheck == ( CheckBox* ) &aColumnRB) { @@ -414,11 +450,15 @@ IMPL_LINK( SwSortDlg, CheckHdl, CheckBox *, pCheck ) aColEdt1.SetMax(nX); aColEdt2.SetMax(nX); aColEdt3.SetMax(nX); + + aColEdt1.SetAccessibleName(aRowTxt); + aColEdt2.SetAccessibleName(aRowTxt); + aColEdt3.SetAccessibleName(aRowTxt); } else if(!aKeyCB1.IsChecked() && !aKeyCB2.IsChecked() && !aKeyCB3.IsChecked()) - pCheck->Check(TRUE); + pCheck->Check(sal_True); return 0; } @@ -431,11 +471,11 @@ IMPL_LINK( SwSortDlg, LanguageHdl, ListBox*, pLBox ) if( !pColRes ) pColRes = new CollatorRessource(); - const USHORT nLstBoxCnt = 3; + const sal_uInt16 nLstBoxCnt = 3; ListBox* aLstArr[ nLstBoxCnt ] = { &aTypDLB1, &aTypDLB2, &aTypDLB3 }; - USHORT* aTypeArr[ nLstBoxCnt ] = { &nType1, &nType2, &nType3 }; + sal_uInt16* aTypeArr[ nLstBoxCnt ] = { &nType1, &nType2, &nType3 }; String aOldStrArr[ nLstBoxCnt ]; - USHORT n; + sal_uInt16 n; void* pUserData; for( n = 0; n < nLstBoxCnt; ++n ) @@ -446,7 +486,7 @@ IMPL_LINK( SwSortDlg, LanguageHdl, ListBox*, pLBox ) ::lcl_ClearLstBoxAndDelUserData( *pL ); } - USHORT nInsPos; + sal_uInt16 nInsPos; String sAlg, sUINm; for( long nCnt = 0, nEnd = aSeq.getLength(); nCnt <= nEnd; ++nCnt ) { diff --git a/sw/source/ui/misc/srtdlg.src b/sw/source/ui/misc/srtdlg.src index c55d32f7f3..5ff6c48a8c 100644 --- a/sw/source/ui/misc/srtdlg.src +++ b/sw/source/ui/misc/srtdlg.src @@ -32,7 +32,7 @@ ModalDialog DLG_SORTING { - HelpID = FN_SORTING_DLG ; + HelpID = CMD_FN_SORTING_DLG ; OutputSize = TRUE ; SVLook = TRUE ; Size = MAP_APPFONT ( 268 , 193 ) ; @@ -79,6 +79,7 @@ ModalDialog DLG_SORTING }; CheckBox CB_KEY1 { + HelpID = "sw:CheckBox:DLG_SORTING:CB_KEY1"; Pos = MAP_APPFONT ( 12 , 25 ) ; Size = MAP_APPFONT ( 49 , 8 ) ; Text [ en-US ] = "Key ~1" ; @@ -86,6 +87,7 @@ ModalDialog DLG_SORTING }; NumericField ED_KEY1 { + HelpID = "sw:NumericField:DLG_SORTING:ED_KEY1"; Border = TRUE ; Pos = MAP_APPFONT ( 66 , 23 ) ; Size = MAP_APPFONT ( 25 , 12 ) ; @@ -107,6 +109,7 @@ ModalDialog DLG_SORTING }; ListBox DLB_KEY1 { + HelpID = "sw:ListBox:DLG_SORTING:DLB_KEY1"; Pos = MAP_APPFONT ( 96 , 23 ) ; Size = MAP_APPFONT ( 55 , 45 ) ; TabStop = TRUE ; @@ -116,6 +119,7 @@ ModalDialog DLG_SORTING }; RadioButton RB_UP { + HelpID = "sw:RadioButton:DLG_SORTING:RB_UP"; Pos = MAP_APPFONT ( 155 , 23 ) ; Size = MAP_APPFONT ( 50 , 10 ) ; Text [ en-US ] = "~Ascending" ; @@ -124,6 +128,7 @@ ModalDialog DLG_SORTING }; RadioButton RB_DN { + HelpID = "sw:RadioButton:DLG_SORTING:RB_DN"; Pos = MAP_APPFONT ( 155 , 35 ) ; Size = MAP_APPFONT ( 50 , 10 ) ; Text [ en-US ] = "~Descending" ; @@ -131,12 +136,14 @@ ModalDialog DLG_SORTING }; CheckBox CB_KEY2 { + HelpID = "sw:CheckBox:DLG_SORTING:CB_KEY2"; Pos = MAP_APPFONT ( 12 , 52 ) ; Size = MAP_APPFONT ( 49 , 8 ) ; Text [ en-US ] = "Key ~2" ; }; NumericField ED_KEY2 { + HelpID = "sw:NumericField:DLG_SORTING:ED_KEY2"; Border = TRUE ; Pos = MAP_APPFONT ( 66 , 50 ) ; Size = MAP_APPFONT ( 25 , 12 ) ; @@ -153,6 +160,7 @@ ModalDialog DLG_SORTING }; ListBox DLB_KEY2 { + HelpID = "sw:ListBox:DLG_SORTING:DLB_KEY2"; Pos = MAP_APPFONT ( 96 , 50 ) ; Size = MAP_APPFONT ( 55 , 45 ) ; TabStop = TRUE ; @@ -162,6 +170,7 @@ ModalDialog DLG_SORTING }; RadioButton RB_UP2 { + HelpID = "sw:RadioButton:DLG_SORTING:RB_UP2"; Pos = MAP_APPFONT ( 155 , 50 ) ; Size = MAP_APPFONT ( 50 , 10 ) ; Text [ en-US ] = "Ascending" ; @@ -170,6 +179,7 @@ ModalDialog DLG_SORTING }; RadioButton RB_DN2 { + HelpID = "sw:RadioButton:DLG_SORTING:RB_DN2"; Pos = MAP_APPFONT ( 155 , 62 ) ; Size = MAP_APPFONT ( 50 , 10 ) ; Text [ en-US ] = "Descending" ; @@ -177,12 +187,14 @@ ModalDialog DLG_SORTING }; CheckBox CB_KEY3 { + HelpID = "sw:CheckBox:DLG_SORTING:CB_KEY3"; Pos = MAP_APPFONT ( 12 , 81 ) ; Size = MAP_APPFONT ( 49 , 8 ) ; Text [ en-US ] = "Key ~3" ; }; NumericField ED_KEY3 { + HelpID = "sw:NumericField:DLG_SORTING:ED_KEY3"; Border = TRUE ; Pos = MAP_APPFONT ( 66 , 79 ) ; Size = MAP_APPFONT ( 25 , 12 ) ; @@ -199,6 +211,7 @@ ModalDialog DLG_SORTING }; ListBox DLB_KEY3 { + HelpID = "sw:ListBox:DLG_SORTING:DLB_KEY3"; Pos = MAP_APPFONT ( 96 , 79 ) ; Size = MAP_APPFONT ( 55 , 45 ) ; TabStop = TRUE ; @@ -208,6 +221,7 @@ ModalDialog DLG_SORTING }; RadioButton RB_UP3 { + HelpID = "sw:RadioButton:DLG_SORTING:RB_UP3"; Pos = MAP_APPFONT ( 155 , 79 ) ; Size = MAP_APPFONT ( 50 , 10 ) ; Text [ en-US ] = "Ascending" ; @@ -216,6 +230,7 @@ ModalDialog DLG_SORTING }; RadioButton RB_DN3 { + HelpID = "sw:RadioButton:DLG_SORTING:RB_DN3"; Pos = MAP_APPFONT ( 155 , 91 ) ; Size = MAP_APPFONT ( 50 , 10 ) ; Text [ en-US ] = "Descending" ; @@ -229,6 +244,7 @@ ModalDialog DLG_SORTING }; RadioButton RB_COL { + HelpID = "sw:RadioButton:DLG_SORTING:RB_COL"; Pos = MAP_APPFONT ( 12 , 120 ) ; Size = MAP_APPFONT ( 38 , 10 ) ; Text [ en-US ] = "Col~umns" ; @@ -236,6 +252,7 @@ ModalDialog DLG_SORTING }; RadioButton RB_ROW { + HelpID = "sw:RadioButton:DLG_SORTING:RB_ROW"; Pos = MAP_APPFONT ( 12 , 133 ) ; Size = MAP_APPFONT ( 34 , 10 ) ; Text [ en-US ] = "~Rows" ; @@ -250,6 +267,7 @@ ModalDialog DLG_SORTING }; RadioButton RB_TAB { + HelpID = "sw:RadioButton:DLG_SORTING:RB_TAB"; Pos = MAP_APPFONT ( 113 , 120 ) ; Size = MAP_APPFONT ( 44 , 9 ) ; Text [ en-US ] = "~Tabs" ; @@ -258,6 +276,7 @@ ModalDialog DLG_SORTING }; RadioButton RB_TABCH { + HelpID = "sw:RadioButton:DLG_SORTING:RB_TABCH"; Pos = MAP_APPFONT ( 113 , 133 ) ; Size = MAP_APPFONT ( 38 , 10 ) ; Text [ en-US ] = "~Character" ; @@ -265,6 +284,7 @@ ModalDialog DLG_SORTING }; Edit ED_TABCH { + HelpID = "sw:Edit:DLG_SORTING:ED_TABCH"; Border = TRUE ; Pos = MAP_APPFONT ( 180 , 133 ) ; Size = MAP_APPFONT ( 12 , 12 ) ; @@ -287,6 +307,7 @@ ModalDialog DLG_SORTING }; PushButton PB_DELIM { + HelpID = "sw:PushButton:DLG_SORTING:PB_DELIM"; Pos = MAP_APPFONT ( 195 , 133 ) ; Size = MAP_APPFONT ( 12 , 12 ) ; TabStop = TRUE ; @@ -300,6 +321,7 @@ ModalDialog DLG_SORTING }; ListBox LB_LANG { + HelpID = "sw:ListBox:DLG_SORTING:LB_LANG"; Pos = MAP_APPFONT ( 12 , 158 ) ; Size = MAP_APPFONT ( 83 , 61 ) ; TabStop = TRUE ; @@ -314,6 +336,7 @@ ModalDialog DLG_SORTING }; CheckBox CB_CASE { + HelpID = "sw:CheckBox:DLG_SORTING:CB_CASE"; Pos = MAP_APPFONT ( 113 , 159 ) ; Size = MAP_APPFONT ( 147 , 10 ) ; TabStop = TRUE ; diff --git a/sw/source/ui/misc/swmodalredlineacceptdlg.cxx b/sw/source/ui/misc/swmodalredlineacceptdlg.cxx index f45ef0ad4d..0e16b9ebaa 100644 --- a/sw/source/ui/misc/swmodalredlineacceptdlg.cxx +++ b/sw/source/ui/misc/swmodalredlineacceptdlg.cxx @@ -73,7 +73,7 @@ SwModalRedlineAcceptDlg::SwModalRedlineAcceptDlg(Window *pParent) : SfxModalDialog(pParent, SW_RES(DLG_MOD_REDLINE_ACCEPT)) { - pImplDlg = new SwRedlineAcceptDlg(this, TRUE); + pImplDlg = new SwRedlineAcceptDlg(this, sal_True); pImplDlg->Initialize(GetExtraData()); pImplDlg->Activate(); // Zur Initialisierung der Daten @@ -83,7 +83,7 @@ SwModalRedlineAcceptDlg::SwModalRedlineAcceptDlg(Window *pParent) : SwModalRedlineAcceptDlg::~SwModalRedlineAcceptDlg() { - AcceptAll(FALSE); // Alles uebriggebliebene ablehnen + AcceptAll(sal_False); // Alles uebriggebliebene ablehnen pImplDlg->FillInfo(GetExtraData()); delete pImplDlg; @@ -99,21 +99,21 @@ void SwModalRedlineAcceptDlg::Resize() SfxModalDialog::Resize(); } -void SwModalRedlineAcceptDlg::AcceptAll( BOOL bAccept ) +void SwModalRedlineAcceptDlg::AcceptAll( sal_Bool bAccept ) { SvxTPFilter* pFilterTP = pImplDlg->GetChgCtrl()->GetFilterPage(); if (pFilterTP->IsDate() || pFilterTP->IsAuthor() || pFilterTP->IsRange() || pFilterTP->IsAction()) { - pFilterTP->CheckDate(FALSE); // Alle Filter abschalten - pFilterTP->CheckAuthor(FALSE); - pFilterTP->CheckRange(FALSE); - pFilterTP->CheckAction(FALSE); + pFilterTP->CheckDate(sal_False); // Alle Filter abschalten + pFilterTP->CheckAuthor(sal_False); + pFilterTP->CheckRange(sal_False); + pFilterTP->CheckAction(sal_False); pImplDlg->FilterChangedHdl(); } - pImplDlg->CallAcceptReject( FALSE, bAccept ); + pImplDlg->CallAcceptReject( sal_False, bAccept ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/misc/titlepage.cxx b/sw/source/ui/misc/titlepage.cxx index 46bddfd659..f41bc49c9d 100644 --- a/sw/source/ui/misc/titlepage.cxx +++ b/sw/source/ui/misc/titlepage.cxx @@ -55,14 +55,14 @@ namespace { - bool lcl_GetPageDesc(SwWrtShell *pSh, USHORT &rPageNo, const SwFmtPageDesc **ppPageFmtDesc) + bool lcl_GetPageDesc(SwWrtShell *pSh, sal_uInt16 &rPageNo, const SwFmtPageDesc **ppPageFmtDesc) { bool bRet = false; SfxItemSet aSet( pSh->GetAttrPool(), RES_PAGEDESC, RES_PAGEDESC ); if (pSh->GetCurAttr( aSet )) { const SfxPoolItem* pItem(0); - if (SFX_ITEM_SET == aSet.GetItemState( RES_PAGEDESC, TRUE, &pItem ) && pItem) + if (SFX_ITEM_SET == aSet.GetItemState( RES_PAGEDESC, sal_True, &pItem ) && pItem) { rPageNo = ((const SwFmtPageDesc *)pItem)->GetNumOffset(); if (ppPageFmtDesc) @@ -73,26 +73,26 @@ namespace return bRet; } - bool lcl_SkipNPages(SwWrtShell *pSh, USHORT nNoPages) + bool lcl_SkipNPages(SwWrtShell *pSh, sal_uInt16 nNoPages) { bool bAllOk = true; - for (USHORT nI = 0; nI < nNoPages && bAllOk; ++nI) + for (sal_uInt16 nI = 0; nI < nNoPages && bAllOk; ++nI) bAllOk = pSh->SttNxtPg(); return bAllOk; } - void lcl_ChangePage(SwWrtShell *pSh, USHORT nNewNumber, + void lcl_ChangePage(SwWrtShell *pSh, sal_uInt16 nNewNumber, const SwPageDesc *pNewDesc) { - const USHORT nCurIdx = pSh->GetCurPageDesc(); + const sal_uInt16 nCurIdx = pSh->GetCurPageDesc(); const SwPageDesc &rCurrentDesc = pSh->GetPageDesc( nCurIdx ); const SwFmtPageDesc *pPageFmtDesc(0); - USHORT nDontCare; + sal_uInt16 nDontCare; lcl_GetPageDesc(pSh, nDontCare, &pPageFmtDesc); //If we want a new number then set it, otherwise reuse the existing one - USHORT nPgNo = nNewNumber ? + sal_uInt16 nPgNo = nNewNumber ? nNewNumber : ( pPageFmtDesc ? pPageFmtDesc->GetNumOffset() : 0 ); //If we want a new descriptior then set it, otherwise reuse the existing one @@ -114,22 +114,22 @@ namespace void lcl_PushCursor(SwWrtShell *pSh) { - pSh->LockView( TRUE ); + pSh->LockView( sal_True ); pSh->StartAllAction(); pSh->SwCrsrShell::Push(); } void lcl_PopCursor(SwWrtShell *pSh) { - pSh->SwCrsrShell::Pop( FALSE ); + pSh->SwCrsrShell::Pop( sal_False ); pSh->EndAllAction(); - pSh->LockView( FALSE ); + pSh->LockView( sal_False ); } - USHORT lcl_GetCurrentPage(SwWrtShell *pSh) + sal_uInt16 lcl_GetCurrentPage(SwWrtShell *pSh) { String sDummy; - USHORT nPhyNum=1, nVirtNum=1; + sal_uInt16 nPhyNum=1, nVirtNum=1; pSh->GetPageNumber(0, true, nPhyNum, nVirtNum, sDummy); return nPhyNum; } @@ -141,7 +141,7 @@ namespace */ void SwTitlePageDlg::FillList() { - USHORT nTitlePages = aPageCountNF.GetValue(); + sal_uInt16 nTitlePages = aPageCountNF.GetValue(); aPagePropertiesLB.Clear(); if (mpTitleDesc) aPagePropertiesLB.InsertEntry(mpTitleDesc->GetName()); @@ -152,9 +152,9 @@ void SwTitlePageDlg::FillList() aPagePropertiesLB.SelectEntryPos(0); } -USHORT SwTitlePageDlg::GetInsertPosition() const +sal_uInt16 SwTitlePageDlg::GetInsertPosition() const { - USHORT nPage = 1; + sal_uInt16 nPage = 1; if (aPageStartNF.IsEnabled()) nPage = aPageStartNF.GetValue(); return nPage; @@ -200,9 +200,9 @@ SwTitlePageDlg::SwTitlePageDlg( Window *pParent ) : aRestartNumberingCB.SetClickHdl(LINK(this, SwTitlePageDlg, RestartNumberingHdl)); aSetPageNumberCB.SetClickHdl(LINK(this, SwTitlePageDlg, SetPageNumberHdl)); - USHORT nSetPage = 1; - USHORT nResetPage = 1; - USHORT nTitlePages = 1; + sal_uInt16 nSetPage = 1; + sal_uInt16 nResetPage = 1; + sal_uInt16 nTitlePages = 1; mpSh = ::GetActiveView()->GetWrtShellPtr(); lcl_PushCursor(mpSh); @@ -222,7 +222,7 @@ SwTitlePageDlg::SwTitlePageDlg( Window *pParent ) : { while (mpSh->SttNxtPg()) { - const USHORT nCurIdx = mpSh->GetCurPageDesc(); + const sal_uInt16 nCurIdx = mpSh->GetCurPageDesc(); const SwPageDesc &rPageDesc = mpSh->GetPageDesc( nCurIdx ); if (mpIndexDesc != &rPageDesc) @@ -324,16 +324,16 @@ IMPL_LINK( SwTitlePageDlg, OKHdl, Button *, /*pBtn*/ ) else if (mpPageFmtDesc) aTitleDesc.SetNumOffset(mpPageFmtDesc->GetNumOffset()); - USHORT nNoPages = aPageCountNF.GetValue(); + sal_uInt16 nNoPages = aPageCountNF.GetValue(); if (!aUseExistingPagesRB.IsChecked()) { mpSh->GotoPage(GetInsertPosition(), false); - for (USHORT nI=0; nI < nNoPages; ++nI) + for (sal_uInt16 nI=0; nI < nNoPages; ++nI) mpSh->InsertPageBreak(); } mpSh->GotoPage(GetInsertPosition(), false); - for (USHORT nI=1; nI < nNoPages; ++nI) + for (sal_uInt16 nI=1; nI < nNoPages; ++nI) { if (mpSh->SttNxtPg()) lcl_ChangePage(mpSh, 0, mpIndexDesc); @@ -350,7 +350,7 @@ IMPL_LINK( SwTitlePageDlg, OKHdl, Button *, /*pBtn*/ ) if (aRestartNumberingCB.IsChecked() || nNoPages > 1) { - USHORT nPgNo = aRestartNumberingCB.IsChecked() ? aRestartNumberingNF.GetValue() : 0; + sal_uInt16 nPgNo = aRestartNumberingCB.IsChecked() ? aRestartNumberingNF.GetValue() : 0; const SwPageDesc *pNewDesc = nNoPages > 1 ? mpNormalDesc : 0; mpSh->GotoPage(GetInsertPosition() + nNoPages, false); lcl_ChangePage(mpSh, nPgNo, pNewDesc); diff --git a/sw/source/ui/ribbar/conarc.cxx b/sw/source/ui/ribbar/conarc.cxx index af0a511484..fde2a98d7d 100644 --- a/sw/source/ui/ribbar/conarc.cxx +++ b/sw/source/ui/ribbar/conarc.cxx @@ -62,11 +62,11 @@ ConstArc::ConstArc(SwWrtShell* pWrtShell, SwEditWin* pEditWin, SwView* pSwView) -BOOL ConstArc::MouseButtonDown( const MouseEvent& rMEvt ) +sal_Bool ConstArc::MouseButtonDown( const MouseEvent& rMEvt ) { - BOOL bReturn; + sal_Bool bReturn; - if ((bReturn = SwDrawBase::MouseButtonDown(rMEvt)) == TRUE) + if ((bReturn = SwDrawBase::MouseButtonDown(rMEvt)) == sal_True) { if (!nAnzButUp) aStartPnt = m_pWin->PixelToLogic(rMEvt.GetPosPixel()); @@ -82,9 +82,9 @@ BOOL ConstArc::MouseButtonDown( const MouseEvent& rMEvt ) -BOOL ConstArc::MouseButtonUp( const MouseEvent& rMEvt ) +sal_Bool ConstArc::MouseButtonUp( const MouseEvent& rMEvt ) { - BOOL bReturn = FALSE; + sal_Bool bReturn = sal_False; if ((m_pSh->IsDrawCreate() || m_pWin->IsDrawAction()) && rMEvt.IsLeft()) { @@ -92,7 +92,7 @@ BOOL ConstArc::MouseButtonUp( const MouseEvent& rMEvt ) if (!nAnzButUp && aPnt == aStartPnt) { SwDrawBase::MouseButtonUp(rMEvt); - bReturn = TRUE; + bReturn = sal_True; } else { nAnzButUp++; @@ -101,7 +101,7 @@ BOOL ConstArc::MouseButtonUp( const MouseEvent& rMEvt ) { SwDrawBase::MouseButtonUp(rMEvt); nAnzButUp = 0; - bReturn = TRUE; + bReturn = sal_True; } else m_pSh->EndCreate(SDRCREATE_NEXTPOINT); @@ -119,7 +119,7 @@ BOOL ConstArc::MouseButtonUp( const MouseEvent& rMEvt ) -void ConstArc::Activate(const USHORT nSlotId) +void ConstArc::Activate(const sal_uInt16 nSlotId) { switch (nSlotId) { diff --git a/sw/source/ui/ribbar/concustomshape.cxx b/sw/source/ui/ribbar/concustomshape.cxx index 78263f4423..ff266f1b47 100644 --- a/sw/source/ui/ribbar/concustomshape.cxx +++ b/sw/source/ui/ribbar/concustomshape.cxx @@ -97,9 +97,9 @@ rtl::OUString ConstCustomShape::GetShapeTypeFromRequest( SfxRequest& rReq ) |* \************************************************************************/ -BOOL ConstCustomShape::MouseButtonDown(const MouseEvent& rMEvt) +sal_Bool ConstCustomShape::MouseButtonDown(const MouseEvent& rMEvt) { - BOOL bReturn = SwDrawBase::MouseButtonDown(rMEvt); + sal_Bool bReturn = SwDrawBase::MouseButtonDown(rMEvt); if ( bReturn ) { SdrView *pSdrView = m_pSh->GetDrawView(); @@ -129,7 +129,7 @@ BOOL ConstCustomShape::MouseButtonDown(const MouseEvent& rMEvt) |* \************************************************************************/ -BOOL ConstCustomShape::MouseButtonUp(const MouseEvent& rMEvt) +sal_Bool ConstCustomShape::MouseButtonUp(const MouseEvent& rMEvt) { return SwDrawBase::MouseButtonUp(rMEvt); } @@ -140,7 +140,7 @@ BOOL ConstCustomShape::MouseButtonUp(const MouseEvent& rMEvt) |* \************************************************************************/ -void ConstCustomShape::Activate(const USHORT nSlotId) +void ConstCustomShape::Activate(const sal_uInt16 nSlotId) { m_pWin->SetSdrDrawMode( OBJ_CUSTOMSHAPE ); diff --git a/sw/source/ui/ribbar/conform.cxx b/sw/source/ui/ribbar/conform.cxx index bda0c71765..46082251a8 100644 --- a/sw/source/ui/ribbar/conform.cxx +++ b/sw/source/ui/ribbar/conform.cxx @@ -40,7 +40,7 @@ #include "drawbase.hxx" #include "conform.hxx" -extern BOOL bNoInterrupt; // in mainwn.cxx +extern sal_Bool bNoInterrupt; // in mainwn.cxx /************************************************************************* |* @@ -52,7 +52,7 @@ extern BOOL bNoInterrupt; // in mainwn.cxx ConstFormControl::ConstFormControl(SwWrtShell* pWrtShell, SwEditWin* pEditWin, SwView* pSwView) : SwDrawBase(pWrtShell, pEditWin, pSwView) { - m_bInsForm = TRUE; + m_bInsForm = sal_True; } /************************************************************************* @@ -62,9 +62,9 @@ ConstFormControl::ConstFormControl(SwWrtShell* pWrtShell, SwEditWin* pEditWin, S \************************************************************************/ -BOOL ConstFormControl::MouseButtonDown(const MouseEvent& rMEvt) +sal_Bool ConstFormControl::MouseButtonDown(const MouseEvent& rMEvt) { - BOOL bReturn = FALSE; + sal_Bool bReturn = sal_False; SdrView *pSdrView = m_pSh->GetDrawView(); @@ -73,13 +73,13 @@ BOOL ConstFormControl::MouseButtonDown(const MouseEvent& rMEvt) if (rMEvt.IsMod2()) { - pSdrView->SetCreate1stPointAsCenter(TRUE); - pSdrView->SetResizeAtCenter(TRUE); + pSdrView->SetCreate1stPointAsCenter(sal_True); + pSdrView->SetResizeAtCenter(sal_True); } else { - pSdrView->SetCreate1stPointAsCenter(FALSE); - pSdrView->SetResizeAtCenter(FALSE); + pSdrView->SetCreate1stPointAsCenter(sal_False); + pSdrView->SetResizeAtCenter(sal_False); } SdrViewEvent aVEvt; @@ -89,16 +89,16 @@ BOOL ConstFormControl::MouseButtonDown(const MouseEvent& rMEvt) if (rMEvt.IsLeft() && !m_pWin->IsDrawAction() && (eHit == SDRHIT_UNMARKEDOBJECT || eHit == SDRHIT_NONE || m_pSh->IsDrawCreate())) { - bNoInterrupt = TRUE; + bNoInterrupt = sal_True; m_pWin->CaptureMouse(); m_pWin->SetPointer(Pointer(POINTER_DRAW_RECT)); m_aStartPos = m_pWin->PixelToLogic(rMEvt.GetPosPixel()); - bReturn = m_pSh->BeginCreate( static_cast< UINT16 >(m_pWin->GetSdrDrawMode()), FmFormInventor, m_aStartPos); + bReturn = m_pSh->BeginCreate( static_cast< sal_uInt16 >(m_pWin->GetSdrDrawMode()), FmFormInventor, m_aStartPos); if (bReturn) - m_pWin->SetDrawAction(TRUE); + m_pWin->SetDrawAction(sal_True); } else bReturn = SwDrawBase::MouseButtonDown(rMEvt); @@ -113,7 +113,7 @@ BOOL ConstFormControl::MouseButtonDown(const MouseEvent& rMEvt) \************************************************************************/ -void ConstFormControl::Activate(const USHORT nSlotId) +void ConstFormControl::Activate(const sal_uInt16 nSlotId) { m_pWin->SetSdrDrawMode( static_cast<SdrObjKind>(nSlotId) ); SwDrawBase::Activate(nSlotId); @@ -135,8 +135,8 @@ void ConstFormControl::CreateDefaultObject() m_pSh->MakeDrawView(); SdrView *pSdrView = m_pSh->GetDrawView(); - pSdrView->SetDesignMode(TRUE); - m_pSh->BeginCreate( static_cast< UINT16 >(m_pWin->GetSdrDrawMode()), FmFormInventor, aStartPos); + pSdrView->SetDesignMode(sal_True); + m_pSh->BeginCreate( static_cast< sal_uInt16 >(m_pWin->GetSdrDrawMode()), FmFormInventor, aStartPos); m_pSh->MoveCreate(aEndPos); m_pSh->EndCreate(SDRCREATE_FORCEEND); } diff --git a/sw/source/ui/ribbar/conpoly.cxx b/sw/source/ui/ribbar/conpoly.cxx index 1a738450d9..5dbb5583ba 100644 --- a/sw/source/ui/ribbar/conpoly.cxx +++ b/sw/source/ui/ribbar/conpoly.cxx @@ -62,11 +62,11 @@ ConstPolygon::ConstPolygon(SwWrtShell* pWrtShell, SwEditWin* pEditWin, SwView* p -BOOL ConstPolygon::MouseButtonDown(const MouseEvent& rMEvt) +sal_Bool ConstPolygon::MouseButtonDown(const MouseEvent& rMEvt) { - BOOL bReturn; + sal_Bool bReturn; - if ((bReturn = SwDrawBase::MouseButtonDown(rMEvt)) == TRUE) + if ((bReturn = SwDrawBase::MouseButtonDown(rMEvt)) == sal_True) aLastPos = rMEvt.GetPosPixel(); return (bReturn); @@ -80,9 +80,9 @@ BOOL ConstPolygon::MouseButtonDown(const MouseEvent& rMEvt) -BOOL ConstPolygon::MouseMove(const MouseEvent& rMEvt) +sal_Bool ConstPolygon::MouseMove(const MouseEvent& rMEvt) { - BOOL bReturn = FALSE; + sal_Bool bReturn = sal_False; bReturn = SwDrawBase::MouseMove(rMEvt); @@ -97,9 +97,9 @@ BOOL ConstPolygon::MouseMove(const MouseEvent& rMEvt) -BOOL ConstPolygon::MouseButtonUp(const MouseEvent& rMEvt) +sal_Bool ConstPolygon::MouseButtonUp(const MouseEvent& rMEvt) { - BOOL bReturn = FALSE; + sal_Bool bReturn = sal_False; if (m_pSh->IsDrawCreate()) { @@ -110,7 +110,7 @@ BOOL ConstPolygon::MouseButtonUp(const MouseEvent& rMEvt) { m_pSh->BreakCreate(); EnterSelectMode(rMEvt); - return TRUE; + return sal_True; } } else @@ -137,7 +137,7 @@ BOOL ConstPolygon::MouseButtonUp(const MouseEvent& rMEvt) -void ConstPolygon::Activate(const USHORT nSlotId) +void ConstPolygon::Activate(const sal_uInt16 nSlotId) { switch (nSlotId) { diff --git a/sw/source/ui/ribbar/conrect.cxx b/sw/source/ui/ribbar/conrect.cxx index 9d0bd9b4bb..315006cc3d 100644 --- a/sw/source/ui/ribbar/conrect.cxx +++ b/sw/source/ui/ribbar/conrect.cxx @@ -59,7 +59,7 @@ ConstRectangle::ConstRectangle( SwWrtShell* pWrtShell, SwEditWin* pEditWin, SwView* pSwView ) : SwDrawBase( pWrtShell, pEditWin, pSwView ), - bMarquee(FALSE), + bMarquee(sal_False), // #93382# mbVertical(sal_False) { @@ -71,11 +71,11 @@ ConstRectangle::ConstRectangle( SwWrtShell* pWrtShell, SwEditWin* pEditWin, |* \************************************************************************/ -BOOL ConstRectangle::MouseButtonDown(const MouseEvent& rMEvt) +sal_Bool ConstRectangle::MouseButtonDown(const MouseEvent& rMEvt) { - BOOL bReturn; + sal_Bool bReturn; - if ((bReturn = SwDrawBase::MouseButtonDown(rMEvt)) == TRUE + if ((bReturn = SwDrawBase::MouseButtonDown(rMEvt)) == sal_True && m_pWin->GetSdrDrawMode() == OBJ_CAPTION) { m_pView->NoRotate(); @@ -94,11 +94,11 @@ BOOL ConstRectangle::MouseButtonDown(const MouseEvent& rMEvt) |* \************************************************************************/ -BOOL ConstRectangle::MouseButtonUp(const MouseEvent& rMEvt) +sal_Bool ConstRectangle::MouseButtonUp(const MouseEvent& rMEvt) { Point aPnt(m_pWin->PixelToLogic(rMEvt.GetPosPixel())); - BOOL bRet = SwDrawBase::MouseButtonUp(rMEvt); + sal_Bool bRet = SwDrawBase::MouseButtonUp(rMEvt); if( bRet ) { SdrView *pSdrView = m_pSh->GetDrawView(); @@ -118,13 +118,13 @@ BOOL ConstRectangle::MouseButtonUp(const MouseEvent& rMEvt) SfxItemSet aItemSet( pSdrView->GetModel()->GetItemPool(), SDRATTR_MISC_FIRST, SDRATTR_MISC_LAST); - aItemSet.Put( SdrTextAutoGrowWidthItem( FALSE ) ); - aItemSet.Put( SdrTextAutoGrowHeightItem( FALSE ) ); + aItemSet.Put( SdrTextAutoGrowWidthItem( sal_False ) ); + aItemSet.Put( SdrTextAutoGrowHeightItem( sal_False ) ); aItemSet.Put( SdrTextAniKindItem( SDRTEXTANI_SCROLL ) ); aItemSet.Put( SdrTextAniDirectionItem( SDRTEXTANI_LEFT ) ); aItemSet.Put( SdrTextAniCountItem( 0 ) ); aItemSet.Put( SdrTextAniAmountItem( - (INT16)m_pWin->PixelToLogic(Size(2,1)).Width()) ); + (sal_Int16)m_pWin->PixelToLogic(Size(2,1)).Width()) ); pObj->SetMergedItemSetAndBroadcast(aItemSet); } @@ -135,10 +135,10 @@ BOOL ConstRectangle::MouseButtonUp(const MouseEvent& rMEvt) SdrTextObj* pText = (SdrTextObj*)pObj; SfxItemSet aSet(pSdrView->GetModel()->GetItemPool()); - pText->SetVerticalWriting(TRUE); + pText->SetVerticalWriting(sal_True); - aSet.Put(SdrTextAutoGrowWidthItem(TRUE)); - aSet.Put(SdrTextAutoGrowHeightItem(FALSE)); + aSet.Put(SdrTextAutoGrowWidthItem(sal_True)); + aSet.Put(SdrTextAutoGrowHeightItem(sal_False)); aSet.Put(SdrTextVertAdjustItem(SDRTEXTVERTADJUST_TOP)); aSet.Put(SdrTextHorzAdjustItem(SDRTEXTHORZADJUST_RIGHT)); @@ -161,7 +161,7 @@ BOOL ConstRectangle::MouseButtonUp(const MouseEvent& rMEvt) pCaptObj->ForceOutlinerParaObject(); OutlinerParaObject* pOPO = pCaptObj->GetOutlinerParaObject(); if( pOPO && !pOPO->IsVertical() ) - pOPO->SetVertical( TRUE ); + pOPO->SetVertical( sal_True ); } } break; @@ -177,9 +177,9 @@ BOOL ConstRectangle::MouseButtonUp(const MouseEvent& rMEvt) |* \************************************************************************/ -void ConstRectangle::Activate(const USHORT nSlotId) +void ConstRectangle::Activate(const sal_uInt16 nSlotId) { - bMarquee = bCapVertical = FALSE; + bMarquee = bCapVertical = sal_False; mbVertical = sal_False; switch (nSlotId) @@ -197,7 +197,7 @@ void ConstRectangle::Activate(const USHORT nSlotId) break; case SID_DRAW_TEXT_MARQUEE: - bMarquee = TRUE; + bMarquee = sal_True; m_pWin->SetSdrDrawMode(OBJ_TEXT); break; @@ -212,7 +212,7 @@ void ConstRectangle::Activate(const USHORT nSlotId) break; case SID_DRAW_CAPTION_VERTICAL: - bCapVertical = TRUE; + bCapVertical = sal_True; // no break case SID_DRAW_CAPTION: m_pWin->SetSdrDrawMode(OBJ_CAPTION); diff --git a/sw/source/ui/ribbar/drawbase.cxx b/sw/source/ui/ribbar/drawbase.cxx index bb91f882e7..1b28476669 100644 --- a/sw/source/ui/ribbar/drawbase.cxx +++ b/sw/source/ui/ribbar/drawbase.cxx @@ -28,6 +28,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" + #include <hintids.hxx> #include <svx/svdview.hxx> #include <svx/svdobj.hxx> @@ -45,14 +46,14 @@ #include "edtwin.hxx" #include "caption.hxx" #include "swundo.hxx" -#include "undobj.hxx" +#include <SwRewriter.hxx> #include "comcore.hrc" using namespace ::com::sun::star; -extern BOOL bNoInterrupt; // in mainwn.cxx +extern sal_Bool bNoInterrupt; // in mainwn.cxx -#define MINMOVE ((USHORT)m_pSh->GetOut()->PixelToLogic(Size(m_pSh->GetDrawView()->GetMarkHdlSizePixel()/2,0)).Width()) +#define MINMOVE ((sal_uInt16)m_pSh->GetOut()->PixelToLogic(Size(m_pSh->GetDrawView()->GetMarkHdlSizePixel()/2,0)).Width()) /************************************************************************* @@ -67,8 +68,8 @@ SwDrawBase::SwDrawBase(SwWrtShell* pSwWrtShell, SwEditWin* pWindow, SwView* pSwV m_pSh(pSwWrtShell), m_pWin(pWindow), m_nSlotId(USHRT_MAX), - m_bCreateObj(TRUE), - m_bInsForm(FALSE) + m_bCreateObj(sal_True), + m_bInsForm(sal_False) { if ( !m_pSh->HasDrawView() ) m_pSh->MakeDrawView(); @@ -83,7 +84,7 @@ SwDrawBase::SwDrawBase(SwWrtShell* pSwWrtShell, SwEditWin* pWindow, SwView* pSwV SwDrawBase::~SwDrawBase() { if (m_pView->GetWrtShellPtr()) // Im view-Dtor koennte die wrtsh bereits geloescht worden sein... - m_pSh->GetDrawView()->SetEditMode(TRUE); + m_pSh->GetDrawView()->SetEditMode(sal_True); } /************************************************************************* @@ -93,9 +94,9 @@ SwDrawBase::~SwDrawBase() \************************************************************************/ -BOOL SwDrawBase::MouseButtonDown(const MouseEvent& rMEvt) +sal_Bool SwDrawBase::MouseButtonDown(const MouseEvent& rMEvt) { - BOOL bReturn = FALSE; + sal_Bool bReturn = sal_False; SdrView *pSdrView = m_pSh->GetDrawView(); @@ -105,13 +106,13 @@ BOOL SwDrawBase::MouseButtonDown(const MouseEvent& rMEvt) if (rMEvt.IsMod2()) { - pSdrView->SetCreate1stPointAsCenter(TRUE); - pSdrView->SetResizeAtCenter(TRUE); + pSdrView->SetCreate1stPointAsCenter(sal_True); + pSdrView->SetResizeAtCenter(sal_True); } else { - pSdrView->SetCreate1stPointAsCenter(FALSE); - pSdrView->SetResizeAtCenter(FALSE); + pSdrView->SetCreate1stPointAsCenter(sal_False); + pSdrView->SetResizeAtCenter(sal_False); } SdrViewEvent aVEvt; @@ -122,17 +123,17 @@ BOOL SwDrawBase::MouseButtonDown(const MouseEvent& rMEvt) { if (IsCreateObj() && (eHit == SDRHIT_UNMARKEDOBJECT || eHit == SDRHIT_NONE || m_pSh->IsDrawCreate())) { - bNoInterrupt = TRUE; + bNoInterrupt = sal_True; m_pWin->CaptureMouse(); m_aStartPos = m_pWin->PixelToLogic(rMEvt.GetPosPixel()); - bReturn = m_pSh->BeginCreate( static_cast< UINT16 >(m_pWin->GetSdrDrawMode()), m_aStartPos); + bReturn = m_pSh->BeginCreate( static_cast< sal_uInt16 >(m_pWin->GetSdrDrawMode()), m_aStartPos); SetDrawPointer(); if ( bReturn ) - m_pWin->SetDrawAction(TRUE); + m_pWin->SetDrawAction(sal_True); } else if (!pSdrView->IsAction()) { @@ -141,25 +142,25 @@ BOOL SwDrawBase::MouseButtonDown(const MouseEvent& rMEvt) **********************************************************************/ m_pWin->CaptureMouse(); m_aStartPos = m_pWin->PixelToLogic(rMEvt.GetPosPixel()); - UINT16 nEditMode = m_pWin->GetBezierMode(); + sal_uInt16 nEditMode = m_pWin->GetBezierMode(); if (eHit == SDRHIT_HANDLE && aVEvt.pHdl->GetKind() == HDL_BWGT) { /****************************************************************** * Handle draggen ******************************************************************/ - bNoInterrupt = TRUE; + bNoInterrupt = sal_True; bReturn = pSdrView->BegDragObj(m_aStartPos, (OutputDevice*) NULL, aVEvt.pHdl); - m_pWin->SetDrawAction(TRUE); + m_pWin->SetDrawAction(sal_True); } else if (eHit == SDRHIT_MARKEDOBJECT && nEditMode == SID_BEZIER_INSERT) { /****************************************************************** * Klebepunkt einfuegen ******************************************************************/ - bNoInterrupt = TRUE; + bNoInterrupt = sal_True; bReturn = pSdrView->BegInsObjPoint(m_aStartPos, rMEvt.IsMod1()); - m_pWin->SetDrawAction(TRUE); + m_pWin->SetDrawAction(sal_True); } else if (eHit == SDRHIT_MARKEDOBJECT && rMEvt.IsMod1()) { @@ -170,14 +171,14 @@ BOOL SwDrawBase::MouseButtonDown(const MouseEvent& rMEvt) pSdrView->UnmarkAllPoints(); bReturn = pSdrView->BegMarkPoints(m_aStartPos); - m_pWin->SetDrawAction(TRUE); + m_pWin->SetDrawAction(sal_True); } else if (eHit == SDRHIT_MARKEDOBJECT && !rMEvt.IsShift() && !rMEvt.IsMod2()) { /****************************************************************** * Objekt verschieben ******************************************************************/ - return FALSE; + return sal_False; } else if (eHit == SDRHIT_HANDLE) { @@ -208,7 +209,7 @@ BOOL SwDrawBase::MouseButtonDown(const MouseEvent& rMEvt) if (pHdl) { - bNoInterrupt = TRUE; + bNoInterrupt = sal_True; pSdrView->MarkPoint(*pHdl); } } @@ -223,12 +224,12 @@ BOOL SwDrawBase::MouseButtonDown(const MouseEvent& rMEvt) if (pSdrView->HasMarkablePoints()) pSdrView->UnmarkAllPoints(); - bNoInterrupt = FALSE; + bNoInterrupt = sal_False; // Drag im edtwin verwenden - return FALSE; + return sal_False; } - bNoInterrupt = TRUE; + bNoInterrupt = sal_True; if (m_pSh->IsObjSelected()) { @@ -236,11 +237,11 @@ BOOL SwDrawBase::MouseButtonDown(const MouseEvent& rMEvt) { if (!pSdrView->HasMarkablePoints()) { - BOOL bUnlockView = !m_pSh->IsViewLocked(); - m_pSh->LockView( TRUE ); //lock visible section + sal_Bool bUnlockView = !m_pSh->IsViewLocked(); + m_pSh->LockView( sal_True ); //lock visible section m_pSh->SelectObj(Point(LONG_MAX, LONG_MAX)); // deselect all if( bUnlockView ) - m_pSh->LockView( FALSE ); + m_pSh->LockView( sal_False ); } else pSdrView->UnmarkAllPoints(); @@ -250,7 +251,7 @@ BOOL SwDrawBase::MouseButtonDown(const MouseEvent& rMEvt) m_pSh->EnterSelFrmMode(NULL); if( 0 != (bReturn = m_pSh->BeginMark(m_aStartPos)) ) - m_pWin->SetDrawAction(TRUE); + m_pWin->SetDrawAction(sal_True); SetDrawPointer(); } @@ -266,11 +267,11 @@ BOOL SwDrawBase::MouseButtonDown(const MouseEvent& rMEvt) \************************************************************************/ -BOOL SwDrawBase::MouseMove(const MouseEvent& rMEvt) +sal_Bool SwDrawBase::MouseMove(const MouseEvent& rMEvt) { SdrView *pSdrView = m_pSh->GetDrawView(); Point aPnt(m_pWin->PixelToLogic(rMEvt.GetPosPixel())); - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; if (IsCreateObj() && !m_pWin->IsDrawSelMode() && pSdrView->IsCreateObj()) { @@ -279,12 +280,12 @@ BOOL SwDrawBase::MouseMove(const MouseEvent& rMEvt) pSdrView->SetAngleSnapEnabled(rMEvt.IsShift()); m_pSh->MoveCreate(aPnt); - bRet = TRUE; + bRet = sal_True; } else if (pSdrView->IsAction() || pSdrView->IsInsObjPoint() || pSdrView->IsMarkPoints()) { m_pSh->MoveMark(aPnt); - bRet = TRUE; + bRet = sal_True; } return (bRet); @@ -297,11 +298,11 @@ BOOL SwDrawBase::MouseMove(const MouseEvent& rMEvt) \************************************************************************/ -BOOL SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt) +sal_Bool SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt) { - BOOL bReturn = FALSE; - BOOL bCheckShell = FALSE; - BOOL bAutoCap = FALSE; + sal_Bool bReturn = sal_False; + sal_Bool bCheckShell = sal_False; + sal_Bool bAutoCap = sal_False; Point aPnt(m_pWin->PixelToLogic(rMEvt.GetPosPixel())); @@ -309,7 +310,7 @@ BOOL SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt) { const SdrObjKind nDrawMode = m_pWin->GetSdrDrawMode(); //objects with multiple point may end at the start position - BOOL bMultiPoint = OBJ_PLIN == nDrawMode || + sal_Bool bMultiPoint = OBJ_PLIN == nDrawMode || OBJ_PATHLINE == nDrawMode || OBJ_FREELINE == nDrawMode; if(rMEvt.IsRight() || (aPnt == m_aStartPos && !bMultiPoint)) @@ -336,12 +337,12 @@ BOOL SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt) { SfxRequest aReq(m_pSh->GetView().GetViewFrame(),FN_INSERT_FRAME); aReq.AppendItem(SfxUInt16Item( FN_INSERT_FRAME, - static_cast<USHORT>(FLY_AT_PARA) )); + static_cast<sal_uInt16>(FLY_AT_PARA) )); aReq.AppendItem(SfxPointItem( FN_PARAM_1, m_pSh->GetAnchorObjDiff())); aReq.AppendItem(SvxSizeItem( FN_PARAM_2, m_pSh->GetObjSize())); aReq.Done(); } - bAutoCap = TRUE; + bAutoCap = sal_True; if(m_pWin->GetFrmColCount() > 1) { SfxItemSet aSet(m_pView->GetPool(),RES_COL,RES_COL); @@ -357,10 +358,12 @@ BOOL SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt) } } if (m_pWin->GetSdrDrawMode() == OBJ_NONE) - m_pSh->EndUndo(UNDO_INSERT); + { + m_pSh->EndUndo(); + } } - bReturn = TRUE; + bReturn = sal_True; EnterSelectMode(rMEvt); } @@ -378,7 +381,7 @@ BOOL SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt) { bReturn = m_pSh->EndMark(); - m_pWin->SetDrawAction(FALSE); + m_pWin->SetDrawAction(sal_False); if (aPnt == m_aStartPos && m_pSh->IsObjSelectable(aPnt)) { @@ -396,7 +399,7 @@ BOOL SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt) } m_pView->NoRotate(); - bCheckShell = TRUE; // ggf BezierShell anwerfen + bCheckShell = sal_True; // ggf BezierShell anwerfen } else if (!m_pSh->IsObjSelected() && !m_pWin->IsDrawAction()) { @@ -411,7 +414,7 @@ BOOL SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt) } m_pView->NoRotate(); - bReturn = TRUE; + bReturn = sal_True; } } } @@ -429,9 +432,9 @@ BOOL SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt) else { pSdrView->EndAction(); - bReturn = TRUE; + bReturn = sal_True; } - m_pWin->SetDrawAction(FALSE); + m_pWin->SetDrawAction(sal_False); if (aPnt == m_aStartPos) { @@ -456,7 +459,7 @@ BOOL SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt) } m_pView->NoRotate(); - bCheckShell = TRUE; // ggf BezierShell anwerfen + bCheckShell = sal_True; // ggf BezierShell anwerfen } } @@ -469,7 +472,7 @@ BOOL SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt) m_pSh->LeaveSelFrmMode(); m_pView->NoRotate(); - bReturn = TRUE; + bReturn = sal_True; } } } @@ -491,13 +494,13 @@ BOOL SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt) \************************************************************************/ -void SwDrawBase::Activate(const USHORT nSlot) +void SwDrawBase::Activate(const sal_uInt16 nSlot) { SetSlotId(nSlot); SdrView *pSdrView = m_pSh->GetDrawView(); - pSdrView->SetCurrentObj( static_cast< UINT16 >(m_pWin->GetSdrDrawMode()) ); - pSdrView->SetEditMode(FALSE); + pSdrView->SetCurrentObj( static_cast< sal_uInt16 >(m_pWin->GetSdrDrawMode()) ); + pSdrView->SetEditMode(sal_False); SetDrawPointer(); m_pSh->NoEdit(); @@ -513,16 +516,16 @@ void SwDrawBase::Activate(const USHORT nSlot) void SwDrawBase::Deactivate() { SdrView *pSdrView = m_pSh->GetDrawView(); - pSdrView->SetOrtho(FALSE); - pSdrView->SetAngleSnapEnabled(FALSE); + pSdrView->SetOrtho(sal_False); + pSdrView->SetAngleSnapEnabled(sal_False); if (m_pWin->IsDrawAction() && m_pSh->IsDrawCreate()) m_pSh->BreakCreate(); - m_pWin->SetDrawAction(FALSE); + m_pWin->SetDrawAction(sal_False); m_pWin->ReleaseMouse(); - bNoInterrupt = FALSE; + bNoInterrupt = sal_False; if(m_pWin->GetApplyTemplate()) m_pWin->SetApplyTemplate(SwApplyTemplate()); @@ -533,16 +536,16 @@ void SwDrawBase::Deactivate() |* |* Tastaturereignisse bearbeiten |* -|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert TRUE, andernfalls -|* FALSE. +|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert sal_True, andernfalls +|* sal_False. |* \************************************************************************/ -BOOL SwDrawBase::KeyInput(const KeyEvent& rKEvt) +sal_Bool SwDrawBase::KeyInput(const KeyEvent& rKEvt) { - BOOL bReturn = FALSE; - USHORT nCode = rKEvt.GetKeyCode().GetCode(); + sal_Bool bReturn = sal_False; + sal_uInt16 nCode = rKEvt.GetKeyCode().GetCode(); switch (nCode) { @@ -554,14 +557,14 @@ BOOL SwDrawBase::KeyInput(const KeyEvent& rKEvt) m_pView->LeaveDrawCreate(); } - bReturn = TRUE; + bReturn = sal_True; } break; case KEY_DELETE: { m_pSh->DelSelectedObj(); - bReturn = TRUE; + bReturn = sal_True; } break; @@ -610,7 +613,7 @@ BOOL SwDrawBase::KeyInput(const KeyEvent& rKEvt) pSdrView->MoveAllMarked(Size(nX, nY)); } - bReturn = TRUE; + bReturn = sal_True; } } break; @@ -624,8 +627,8 @@ BOOL SwDrawBase::KeyInput(const KeyEvent& rKEvt) |* |* Tastaturereignisse bearbeiten |* -|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert TRUE, andernfalls -|* FALSE. +|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert sal_True, andernfalls +|* sal_False. |* \************************************************************************/ @@ -633,7 +636,7 @@ BOOL SwDrawBase::KeyInput(const KeyEvent& rKEvt) void SwDrawBase::BreakCreate() { m_pSh->BreakCreate(); - m_pWin->SetDrawAction(FALSE); + m_pWin->SetDrawAction(sal_False); m_pWin->ReleaseMouse(); Deactivate(); @@ -664,7 +667,7 @@ void SwDrawBase::SetDrawPointer() void SwDrawBase::EnterSelectMode(const MouseEvent& rMEvt) { - m_pWin->SetDrawAction(FALSE); + m_pWin->SetDrawAction(sal_False); if (!m_pSh->IsObjSelected() && !m_pWin->IsDrawAction()) { @@ -699,7 +702,7 @@ void SwDrawBase::CreateDefaultObject() aEndPos.X() += 8 * MM50; aEndPos.Y() += 4 * MM50; Rectangle aRect(aStartPos, aEndPos); - m_pSh->CreateDefaultShape( static_cast< UINT16 >(m_pWin->GetSdrDrawMode()), aRect, m_nSlotId); + m_pSh->CreateDefaultShape( static_cast< sal_uInt16 >(m_pWin->GetSdrDrawMode()), aRect, m_nSlotId); } Point SwDrawBase::GetDefaultCenterPos() diff --git a/sw/source/ui/ribbar/dselect.cxx b/sw/source/ui/ribbar/dselect.cxx index 5c8c546901..65056b24e6 100644 --- a/sw/source/ui/ribbar/dselect.cxx +++ b/sw/source/ui/ribbar/dselect.cxx @@ -38,7 +38,7 @@ #include "drawbase.hxx" #include "dselect.hxx" -extern BOOL bNoInterrupt; // in mainwn.cxx +extern sal_Bool bNoInterrupt; // in mainwn.cxx /************************************************************************* |* @@ -49,21 +49,21 @@ extern BOOL bNoInterrupt; // in mainwn.cxx DrawSelection::DrawSelection(SwWrtShell* pWrtShell, SwEditWin* pEditWin, SwView* pSwView) : SwDrawBase(pWrtShell, pEditWin, pSwView) { - m_bCreateObj = FALSE; + m_bCreateObj = sal_False; } /************************************************************************* |* |* Tastaturereignisse bearbeiten |* -|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert TRUE, andernfalls -|* FALSE. +|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert sal_True, andernfalls +|* sal_False. |* \************************************************************************/ -BOOL DrawSelection::KeyInput(const KeyEvent& rKEvt) +sal_Bool DrawSelection::KeyInput(const KeyEvent& rKEvt) { - BOOL bReturn = FALSE; + sal_Bool bReturn = sal_False; switch (rKEvt.GetKeyCode().GetCode()) { @@ -74,7 +74,7 @@ BOOL DrawSelection::KeyInput(const KeyEvent& rKEvt) m_pSh->BreakMark(); m_pWin->ReleaseMouse(); } - bReturn = TRUE; + bReturn = sal_True; } break; } @@ -91,10 +91,10 @@ BOOL DrawSelection::KeyInput(const KeyEvent& rKEvt) |* \************************************************************************/ -void DrawSelection::Activate(const USHORT nSlotId) +void DrawSelection::Activate(const sal_uInt16 nSlotId) { m_pWin->SetSdrDrawMode(OBJ_NONE); - m_pWin->SetObjectSelect( TRUE ); + m_pWin->SetObjectSelect( sal_True ); SwDrawBase::Activate(nSlotId); m_pSh->GetView().GetViewFrame()->GetBindings().Invalidate(SID_INSERT_DRAW); diff --git a/sw/source/ui/ribbar/inputwin.cxx b/sw/source/ui/ribbar/inputwin.cxx index 899e877be0..a2be68441f 100644..100755 --- a/sw/source/ui/ribbar/inputwin.cxx +++ b/sw/source/ui/ribbar/inputwin.cxx @@ -37,6 +37,7 @@ #include <svx/ruler.hxx> #include <svl/zforlist.hxx> #include <svl/stritem.hxx> +#include <unotools/undoopt.hxx> #include "swtypes.hxx" #include "cmdid.h" @@ -75,11 +76,17 @@ SwInputWindow::SwInputWindow( Window* pParent, SfxBindings* pBind ) pView(0), pBindings(pBind), aAktTableName(aEmptyStr) + , m_nActionCount(0) + , m_bDoesUndo(true) + , m_bResetUndo(false) + , m_bCallUndo(false) { - bFirst = bDoesUndo = TRUE; - bActive = bIsTable = bDelSel = bResetUndo = bCallUndo = FALSE; + bFirst = sal_True; + bActive = bIsTable = bDelSel = sal_False; FreeResource(); + + aEdit.SetSizePixel( aEdit.CalcMinimumSize() ); SfxImageManager* pManager = SfxImageManager::GetImageManager( SW_MOD() ); pManager->RegisterToolBox(this); @@ -101,16 +108,23 @@ SwInputWindow::SwInputWindow( Window* pParent, SfxBindings* pBind ) SetDropdownClickHdl( LINK( this, SwInputWindow, DropdownClickHdl )); Size aSizeTbx = CalcWindowSizePixel(); + Size aEditSize = aEdit.GetSizePixel(); + Rectangle aItemRect( GetItemRect(FN_FORMULA_CALC) ); + long nMaxHeight = (aEditSize.Height() > aItemRect.GetHeight()) ? aEditSize.Height() : aItemRect.GetHeight(); + if( nMaxHeight+2 > aSizeTbx.Height() ) + aSizeTbx.Height() = nMaxHeight+2; Size aSize = GetSizePixel(); aSize.Height() = aSizeTbx.Height(); SetSizePixel( aSize ); - Size aPosSize = aPos.GetSizePixel(); - Size aEditSize = aEdit.GetSizePixel(); - aPosSize.Height() = aEditSize.Height() = GetItemRect(FN_FORMULA_CALC).GetHeight() - 2; - Point aPosPos = aPos.GetPosPixel(); - Point aEditPos= aEdit.GetPosPixel(); - aPosPos.Y() = aEditPos.Y() = GetItemRect( FN_FORMULA_CALC ).TopLeft().Y() + 1; + // align edit and item vcentered + Size aPosSize = aPos.GetSizePixel(); + aPosSize.Height() = nMaxHeight; + aEditSize.Height() = nMaxHeight; + Point aPosPos = aPos.GetPosPixel(); + Point aEditPos = aEdit.GetPosPixel(); + aPosPos.Y() = (aSize.Height() - nMaxHeight)/2 + 1; + aEditPos.Y() = (aSize.Height() - nMaxHeight)/2 + 1; aPos.SetPosSizePixel( aPosPos, aPosSize ); aEdit.SetPosSizePixel( aEditPos, aEditSize ); @@ -126,24 +140,35 @@ SwInputWindow::~SwInputWindow() //Lineale aufwecken if(pView) { - pView->GetHLineal().SetActive( TRUE ); - pView->GetVLineal().SetActive( TRUE ); + pView->GetHLineal().SetActive( sal_True ); + pView->GetVLineal().SetActive( sal_True ); } if ( pMgr ) delete pMgr; if(pWrtShell) pWrtShell->EndSelTblCells(); - if( bResetUndo ) + CleanupUglyHackWithUndo(); +} + +void SwInputWindow::CleanupUglyHackWithUndo() +{ + if (m_bResetUndo) { DelBoxCntnt(); - pWrtShell->DoUndo( bDoesUndo ); - if(bCallUndo) + pWrtShell->DoUndo(m_bDoesUndo); + if (m_bCallUndo) + { pWrtShell->Undo(); - SwEditShell::SetUndoActionCount( nActionCnt ); + } + if (0 == m_nActionCount) + { + SW_MOD()->GetUndoOptions().SetUndoCount(0); + } } } + //================================================================== void SwInputWindow::DataChanged( const DataChangedEvent& rDCEvt ) @@ -180,16 +205,16 @@ void SwInputWindow::Resize() void SwInputWindow::ShowWin() { - bIsTable = FALSE; + bIsTable = sal_False; //Lineale anhalten if(pView) { - pView->GetHLineal().SetActive( FALSE ); - pView->GetVLineal().SetActive( FALSE ); + pView->GetHLineal().SetActive( sal_False ); + pView->GetVLineal().SetActive( sal_False ); OSL_ENSURE(pWrtShell, "no WrtShell!"); // Cursor in Tabelle - bIsTable = pWrtShell->IsCrsrInTbl() ? TRUE : FALSE; + bIsTable = pWrtShell->IsCrsrInTbl() ? sal_True : sal_False; if( bFirst ) pWrtShell->SelTblCells( LINK( this, SwInputWindow, @@ -197,7 +222,7 @@ void SwInputWindow::ShowWin() if( bIsTable ) { const String& rPos = pWrtShell->GetBoxNms(); - USHORT nPos = 0; + sal_uInt16 nPos = 0; short nSrch = -1; while( (nPos = rPos.Search( ':',nPos + 1 ) ) != STRING_NOTFOUND ) nSrch = (short) nPos; @@ -222,13 +247,17 @@ void SwInputWindow::ShowWin() { if( bIsTable ) { - bResetUndo = TRUE; - nActionCnt = SwEditShell::GetUndoActionCount(); - SwEditShell::SetUndoActionCount( nActionCnt + 1 ); + m_bResetUndo = true; + m_nActionCount = SW_MOD()->GetUndoOptions().GetUndoCount(); + if (0 == m_nActionCount) { // deactivated? turn it on... + SW_MOD()->GetUndoOptions().SetUndoCount(1); + } - bDoesUndo = pWrtShell->DoesUndo(); - if( !bDoesUndo ) - pWrtShell->DoUndo( TRUE ); + m_bDoesUndo = pWrtShell->DoesUndo(); + if( !m_bDoesUndo ) + { + pWrtShell->DoUndo( sal_True ); + } if( !pWrtShell->SwCrsrShell::HasSelection() ) { @@ -241,9 +270,11 @@ void SwInputWindow::ShowWin() pWrtShell->StartUndo( UNDO_DELETE ); pWrtShell->Delete(); if( 0 != pWrtShell->EndUndo( UNDO_DELETE )) - bCallUndo = TRUE; + { + m_bCallUndo = true; + } } - pWrtShell->DoUndo( FALSE ); + pWrtShell->DoUndo(false); SfxItemSet aSet( pWrtShell->GetAttrPool(), RES_BOXATR_FORMULA, RES_BOXATR_FORMULA ); if( pWrtShell->GetTblBoxFormulaAttrs( aSet )) @@ -258,7 +289,7 @@ void SwInputWindow::ShowWin() pWrtShell->EndSelect(); } - bFirst = FALSE; + bFirst = sal_False; aEdit.SetModifyHdl( LINK( this, SwInputWindow, ModifyHdl )); @@ -271,8 +302,8 @@ void SwInputWindow::ShowWin() aEdit.GrabFocus(); // UserInterface fuer die Eingabe abklemmen - pView->GetEditWin().LockKeyInput(TRUE); - pView->GetViewFrame()->GetDispatcher()->Lock(TRUE); + pView->GetEditWin().LockKeyInput(sal_True); + pView->GetViewFrame()->GetDispatcher()->Lock(sal_True); pWrtShell->Push(); } ToolBox::Show(); @@ -309,7 +340,7 @@ static const char * const aStrArr[] = { sCalc_Round }; - USHORT nId = pMenu->GetCurItemId(); + sal_uInt16 nId = pMenu->GetCurItemId(); if ( nId <= MN_CALC_ROUND ) { String aTmp( String::CreateFromAscii(aStrArr[nId - 1]) ); @@ -321,7 +352,7 @@ static const char * const aStrArr[] = { IMPL_LINK( SwInputWindow, DropdownClickHdl, ToolBox*, EMPTYARG ) { - USHORT nCurID = GetCurItemId(); + sal_uInt16 nCurID = GetCurItemId(); EndSelection(); // setzt CurItemId zurueck ! switch ( nCurID ) { @@ -334,7 +365,7 @@ IMPL_LINK( SwInputWindow, DropdownClickHdl, ToolBox*, EMPTYARG ) } } - return TRUE; + return sal_True; } //================================================================== @@ -342,7 +373,7 @@ IMPL_LINK( SwInputWindow, DropdownClickHdl, ToolBox*, EMPTYARG ) void SwInputWindow::Click( ) { - USHORT nCurID = GetCurItemId(); + sal_uInt16 nCurID = GetCurItemId(); EndSelection(); // setzt CurItemId zurueck ! switch ( nCurID ) { @@ -363,18 +394,10 @@ void SwInputWindow::Click( ) void SwInputWindow::ApplyFormula() { - pView->GetViewFrame()->GetDispatcher()->Lock(FALSE); - pView->GetEditWin().LockKeyInput(FALSE); - if( bResetUndo ) - { - DelBoxCntnt(); - pWrtShell->DoUndo( bDoesUndo ); - SwEditShell::SetUndoActionCount( nActionCnt ); - if( bCallUndo ) - pWrtShell->Undo(); - bResetUndo = FALSE; - } - pWrtShell->Pop( FALSE ); + pView->GetViewFrame()->GetDispatcher()->Lock(sal_False); + pView->GetEditWin().LockKeyInput(sal_False); + CleanupUglyHackWithUndo(); + pWrtShell->Pop( sal_False ); // Formel soll immer mit einem "=" beginnen, hier // also wieder entfernen @@ -398,18 +421,10 @@ void SwInputWindow::CancelFormula() { if(pView) { - pView->GetViewFrame()->GetDispatcher()->Lock( FALSE ); - pView->GetEditWin().LockKeyInput(FALSE); - if( bResetUndo ) - { - DelBoxCntnt(); - pWrtShell->DoUndo( bDoesUndo ); - SwEditShell::SetUndoActionCount( nActionCnt ); - if( bCallUndo ) - pWrtShell->Undo(); - bResetUndo = FALSE; - } - pWrtShell->Pop( FALSE ); + pView->GetViewFrame()->GetDispatcher()->Lock( sal_False ); + pView->GetEditWin().LockKeyInput(sal_False); + CleanupUglyHackWithUndo(); + pWrtShell->Pop( sal_False ); if( bDelSel ) pWrtShell->EnterStdMode(); @@ -467,7 +482,7 @@ IMPL_LINK( SwInputWindow, SelTblCellsNotify, SwWrtShell *, pCaller ) } -void SwInputWindow::SetFormula( const String& rFormula, BOOL bDelFlag ) +void SwInputWindow::SetFormula( const String& rFormula, sal_Bool bDelFlag ) { String sEdit( '=' ); if( rFormula.Len() ) @@ -485,7 +500,7 @@ void SwInputWindow::SetFormula( const String& rFormula, BOOL bDelFlag ) IMPL_LINK( SwInputWindow, ModifyHdl, InputEdit*, EMPTYARG ) { - if( bIsTable && bResetUndo ) + if (bIsTable && m_bResetUndo) { pWrtShell->StartAllAction(); DelBoxCntnt(); @@ -507,7 +522,7 @@ void SwInputWindow::DelBoxCntnt() { pWrtShell->StartAllAction(); pWrtShell->ClearMark(); - pWrtShell->Pop( FALSE ); + pWrtShell->Pop( sal_False ); pWrtShell->Push(); pWrtShell->MoveSection( fnSectionCurr, fnSectionStart ); pWrtShell->SetMark(); @@ -548,32 +563,32 @@ void InputEdit::UpdateRange(const String& rBoxes, String aBoxes = aPrefix; aBoxes += rBoxes; Selection aSelection(GetSelection()); - USHORT nSel = (USHORT) aSelection.Len(); + sal_uInt16 nSel = (sal_uInt16) aSelection.Len(); //OS: mit dem folgenden Ausdruck wird sichergestellt, dass im overwrite-Modus //die selektierte schliessende Klammer nicht geloescht wird if( nSel && ( nSel > 1 || - GetText().GetChar( (USHORT)aSelection.Min() ) != cClose ) ) + GetText().GetChar( (sal_uInt16)aSelection.Min() ) != cClose ) ) Cut(); else aSelection.Max() = aSelection.Min(); String aActText(GetText()); - const USHORT nLen = aActText.Len(); + const sal_uInt16 nLen = aActText.Len(); if( !nLen ) { String aStr(cOpen); aStr += aBoxes; aStr += cClose; SetText(aStr); - USHORT nPos = aStr.Search( cClose ); + sal_uInt16 nPos = aStr.Search( cClose ); OSL_ENSURE(nPos < aStr.Len(), "delimiter not found"); ++nPos; SetSelection( Selection( nPos, nPos )); } else { - BOOL bFound = FALSE; + sal_Bool bFound = sal_False; sal_Unicode cCh; - USHORT nPos, nEndPos = 0, nStartPos = (USHORT) aSelection.Min(); + sal_uInt16 nPos, nEndPos = 0, nStartPos = (sal_uInt16) aSelection.Min(); if( nStartPos-- ) { do { @@ -587,21 +602,21 @@ void InputEdit::UpdateRange(const String& rBoxes, } if( bFound ) { - bFound = FALSE; + bFound = sal_False; nEndPos = nStartPos; while( nEndPos < nLen ) { if( cClose == (cCh = aActText.GetChar( nEndPos ))) { - bFound = TRUE; + bFound = sal_True; break; } ++nEndPos; } // nur wenn akt. Pos im Breich oder direkt dahinter liegt - if( bFound && !( nStartPos < (USHORT)aSelection.Max() && - (USHORT)aSelection.Max() <= nEndPos + 1 )) - bFound = FALSE; + if( bFound && !( nStartPos < (sal_uInt16)aSelection.Max() && + (sal_uInt16)aSelection.Max() <= nEndPos + 1 )) + bFound = sal_False; } if( bFound ) { @@ -615,7 +630,7 @@ void InputEdit::UpdateRange(const String& rBoxes, String aTmp( (char)cOpen ); aTmp += aBoxes; aTmp += (char)cClose; - nPos = (USHORT)aSelection.Min(); + nPos = (sal_uInt16)aSelection.Min(); aActText.Insert( aTmp, nPos ); nPos = nPos + aTmp.Len(); } @@ -631,7 +646,7 @@ void InputEdit::UpdateRange(const String& rBoxes, //================================================================== SwInputChild::SwInputChild(Window* _pParent, - USHORT nId, + sal_uInt16 nId, SfxBindings* pBindings, SfxChildWinInfo* ) : SfxChildWindow( _pParent, nId ) @@ -646,7 +661,7 @@ SwInputChild::SwInputChild(Window* _pParent, SwInputChild::~SwInputChild() { if(pDispatch) - pDispatch->Lock(FALSE); + pDispatch->Lock(sal_False); } diff --git a/sw/source/ui/ribbar/inputwin.src b/sw/source/ui/ribbar/inputwin.src index 29eaabbb53..8e6d36ad62 100644 --- a/sw/source/ui/ribbar/inputwin.src +++ b/sw/source/ui/ribbar/inputwin.src @@ -44,20 +44,20 @@ ToolBox RID_TBX_FORMULA ToolBoxItem { Identifier = FN_FORMULA_CALC ; - HelpID = FN_FORMULA_CALC ; + HelpId = HID_TBX_FORMULA_CALC ; DropDown = TRUE ; Text [ en-US ] = "Formula" ; }; ToolBoxItem { Identifier = FN_FORMULA_CANCEL ; - HelpID = FN_FORMULA_CANCEL ; + HelpId = HID_TBX_FORMULA_CANCEL ; Text [ en-US ] = "Cancel" ; }; ToolBoxItem { Identifier = FN_FORMULA_APPLY ; - HelpID = FN_FORMULA_APPLY ; + HelpId = HID_TBX_FORMULA_APPLY ; Text [ en-US ] = "Apply" ; }; }; @@ -281,19 +281,19 @@ String STR_TBL_FORMULA ToolBoxItem\ {\ Identifier = FN_FORMULA_CALC ; \ - HelpID = FN_FORMULA_CALC ; \ + HelpID = HID_TBX_FORMULA_CALC ; \ Text [ en-US ] = "Formula" ; \ };\ ToolBoxItem\ {\ Identifier = FN_FORMULA_CANCEL ; \ - HelpID = FN_FORMULA_CANCEL ; \ + HelpId = HID_TBX_FORMULA_CANCEL ; \ Text [ en-US ] = "Cancel" ; \ };\ ToolBoxItem\ {\ Identifier = FN_FORMULA_APPLY ; \ - HelpID = FN_FORMULA_APPLY ; \ + HelpID = HID_TBX_FORMULA_APPLY ; \ Text [ en-US ] = "Apply" ; \ }; diff --git a/sw/source/ui/ribbar/makefile.mk b/sw/source/ui/ribbar/makefile.mk deleted file mode 100644 index 13e3600aa8..0000000000 --- a/sw/source/ui/ribbar/makefile.mk +++ /dev/null @@ -1,69 +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=ribbar - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -SRS1NAME=$(TARGET) -SRC1FILES = \ - tbxanchr.src \ - inputwin.src \ - tblctrl.src \ - workctrl.src - -EXCEPTIONSFILES = \ - $(SLO)$/conarc.obj \ - $(SLO)$/concustomshape.obj \ - $(SLO)$/conform.obj \ - $(SLO)$/conpoly.obj \ - $(SLO)$/conrect.obj \ - $(SLO)$/drawbase.obj \ - $(SLO)$/dselect.obj \ - $(SLO)$/inputwin.obj \ - $(SLO)$/tblctrl.obj \ - $(SLO)$/tbxanchr.obj \ - $(SLO)$/workctrl.obj - -SLOFILES = \ - $(EXCEPTIONSFILES) - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - -$(SRS)$/ribbar.srs: $(SOLARINCDIR)$/svx$/globlmn.hrc - diff --git a/sw/source/ui/ribbar/tblctrl.cxx b/sw/source/ui/ribbar/tblctrl.cxx index 3e7f9ef275..497b8518f8 100644 --- a/sw/source/ui/ribbar/tblctrl.cxx +++ b/sw/source/ui/ribbar/tblctrl.cxx @@ -52,8 +52,8 @@ SFX_IMPL_TOOLBOX_CONTROL( SwTableOptimizeCtrl, SfxUInt16Item ); SwTableOptimizeCtrl::SwTableOptimizeCtrl( - USHORT nSlotId, - USHORT nId, + sal_uInt16 nSlotId, + sal_uInt16 nId, ToolBox& rTbx ) : SfxToolBoxControl( nSlotId, nId, rTbx ) { diff --git a/sw/source/ui/ribbar/tblctrl.src b/sw/source/ui/ribbar/tblctrl.src deleted file mode 100644 index afc5949983..0000000000 --- a/sw/source/ui/ribbar/tblctrl.src +++ /dev/null @@ -1,94 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#include "tblctrl.hrc" -#include "helpid.h" -#include "cmdid.h" -FloatingWindow RID_TBL_OPT_CTRL -{ - Moveable = TRUE ; - Closeable = TRUE ; - Hide = TRUE ; - SVLook = TRUE ; - HelpID = HID_TBL_OPT_CTRL ; - ToolBox TBX_OPTIMIZE_TABLE - { - MenuStrings = TRUE ; - SVLook = TRUE ; - HelpID = 1 ; - ItemList = - { - ToolBoxItem - { - Identifier = FN_TABLE_BALANCE_CELLS ; - HelpID = FN_TABLE_BALANCE_CELLS ; - }; - ToolBoxItem - { - Identifier = FN_TABLE_BALANCE_ROWS ; - HelpID = FN_TABLE_BALANCE_ROWS ; - }; - ToolBoxItem - { - Identifier = FN_TABLE_OPTIMAL_HEIGHT ; - HelpID = FN_TABLE_OPTIMAL_HEIGHT ; - }; - ToolBoxItem - { - Identifier = FN_TABLE_ADJUST_CELLS ; - HelpID = FN_TABLE_ADJUST_CELLS ; - }; - }; - }; - Text [ en-US ] = "Optimize" ; -}; - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/sw/source/ui/ribbar/tbxanchr.cxx b/sw/source/ui/ribbar/tbxanchr.cxx index 710110b1fc..f6927b44b9 100644 --- a/sw/source/ui/ribbar/tbxanchr.cxx +++ b/sw/source/ui/ribbar/tbxanchr.cxx @@ -55,7 +55,7 @@ SFX_IMPL_TOOLBOX_CONTROL(SwTbxAnchor, SfxUInt16Item); -SwTbxAnchor::SwTbxAnchor( USHORT nSlotId, USHORT nId, ToolBox& rTbx ) : +SwTbxAnchor::SwTbxAnchor( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ) : SfxToolBoxControl( nSlotId, nId, rTbx ), nActAnchorId(0) { @@ -66,7 +66,7 @@ SwTbxAnchor::SwTbxAnchor( USHORT nSlotId, USHORT nId, ToolBox& rTbx ) : { } -void SwTbxAnchor::StateChanged( USHORT /*nSID*/, SfxItemState eState, const SfxPoolItem* pState ) +void SwTbxAnchor::StateChanged( sal_uInt16 /*nSID*/, SfxItemState eState, const SfxPoolItem* pState ) { GetToolBox().EnableItem( GetId(), (GetItemState(pState) != SFX_ITEM_DISABLED) ); @@ -124,8 +124,8 @@ void SwTbxAnchor::Click() aPopMenu.EnableItem( FN_TOOL_ANKER_FRAME, 0 != pWrtShell->IsFlyInFly() ); Rectangle aRect(GetToolBox().GetItemRect(GetId())); - USHORT nHtmlMode = ::GetHtmlMode((SwDocShell*)SfxObjectShell::Current()); - BOOL bHtmlModeNoAnchor = ( nHtmlMode & HTMLMODE_ON) && 0 == (nHtmlMode & HTMLMODE_SOME_ABS_POS); + sal_uInt16 nHtmlMode = ::GetHtmlMode((SwDocShell*)SfxObjectShell::Current()); + sal_Bool bHtmlModeNoAnchor = ( nHtmlMode & HTMLMODE_ON) && 0 == (nHtmlMode & HTMLMODE_SOME_ABS_POS); if (bHtmlModeNoAnchor || pWrtShell->IsInHeaderFooter()) aPopMenu.RemoveItem(aPopMenu.GetItemPos(FN_TOOL_ANKER_PAGE)); @@ -134,7 +134,7 @@ void SwTbxAnchor::Click() aPopMenu.CheckItem(nActAnchorId); - USHORT nSlotId = aPopMenu.Execute(&GetToolBox(), aRect); + sal_uInt16 nSlotId = aPopMenu.Execute(&GetToolBox(), aRect); GetToolBox().EndSelection(); if (nSlotId) diff --git a/sw/source/ui/ribbar/workctrl.cxx b/sw/source/ui/ribbar/workctrl.cxx index bc306f374b..2713a22f3a 100644 --- a/sw/source/ui/ribbar/workctrl.cxx +++ b/sw/source/ui/ribbar/workctrl.cxx @@ -73,8 +73,8 @@ SFX_IMPL_TOOLBOX_CONTROL( SwTbxInsertCtrl, SfxImageItem); SFX_IMPL_TOOLBOX_CONTROL( SwTbxAutoTextCtrl, SfxBoolItem ); SwTbxInsertCtrl::SwTbxInsertCtrl( - USHORT nSlotId, - USHORT nId, + sal_uInt16 nSlotId, + sal_uInt16 nId, ToolBox& rTbx ) : SfxToolBoxControl( nSlotId, nId, rTbx ), nLastSlotId(FN_INSERT_CTRL == nSlotId ? FN_INSERT_TABLE : SID_INSERT_DIAGRAM) @@ -99,11 +99,11 @@ void SAL_CALL SwTbxInsertCtrl::update() throw (uno::RuntimeException) SfxToolBoxControl::update(); } -void SwTbxInsertCtrl::StateChanged( USHORT /*nSID*/, +void SwTbxInsertCtrl::StateChanged( sal_uInt16 /*nSID*/, SfxItemState eState, const SfxPoolItem* pState ) { - USHORT nId = GetId(); + sal_uInt16 nId = GetId(); GetToolBox().EnableItem( nId, (GetItemState(pState) != SFX_ITEM_DISABLED) ); if( eState == SFX_ITEM_AVAILABLE ) @@ -120,7 +120,7 @@ void SwTbxInsertCtrl::StateChanged( USHORT /*nSID*/, ToolBox& rBox = GetToolBox(); Image aImage = GetImage( m_xFrame, aSlotURL, hasBigImages() ); rBox.SetItemImage(GetId(), aImage); - rBox.SetItemImageMirrorMode( GetId(), FALSE ); + rBox.SetItemImageMirrorMode( GetId(), sal_False ); rBox.SetItemImageAngle( GetId(), pItem->GetRotation() ); rBox.SetItemImageMirrorMode( GetId(), pItem->IsMirrored() ); } @@ -149,7 +149,7 @@ SfxPopupWindowType SwTbxInsertCtrl::GetPopupWindowType() const } -void SwTbxInsertCtrl::Select( BOOL /*bMod1*/ ) +void SwTbxInsertCtrl::Select( sal_Bool /*bMod1*/ ) { if( nLastSlotId ) { @@ -169,8 +169,8 @@ void SwTbxInsertCtrl::Select( BOOL /*bMod1*/ ) } SwTbxAutoTextCtrl::SwTbxAutoTextCtrl( - USHORT nSlotId, - USHORT nId, + sal_uInt16 nSlotId, + sal_uInt16 nId, ToolBox& rTbx ) : SfxToolBoxControl( nSlotId, nId, rTbx ), pPopup(0), @@ -215,22 +215,22 @@ SfxPopupWindow* SwTbxAutoTextCtrl::CreatePopupWindow() { pPopup = new PopupMenu; SwGlossaryList* pGlossaryList = ::GetGlossaryList(); - USHORT nGroupCount = pGlossaryList->GetGroupCount(); - for(USHORT i = 1; i <= nGroupCount; i++) + sal_uInt16 nGroupCount = pGlossaryList->GetGroupCount(); + for(sal_uInt16 i = 1; i <= nGroupCount; i++) { // Gruppenname mit Pfad-Extension besorgen String sTitle; - String sGroupName = pGlossaryList->GetGroupName(i - 1, FALSE, &sTitle); - USHORT nBlockCount = pGlossaryList->GetBlockCount(i -1); + String sGroupName = pGlossaryList->GetGroupName(i - 1, sal_False, &sTitle); + sal_uInt16 nBlockCount = pGlossaryList->GetBlockCount(i -1); if(nBlockCount) { - USHORT nIndex = 100 * (i); + sal_uInt16 nIndex = 100 * (i); // aber ohne extension einfuegen pPopup->InsertItem( i, sTitle);//sGroupName.GetToken(0, GLOS_DELIM)); PopupMenu* pSub = new PopupMenu; pSub->SetSelectHdl(aLnk); pPopup->SetPopupMenu(i, pSub); - for(USHORT j = 0; j < nBlockCount; j++) + for(sal_uInt16 j = 0; j < nBlockCount; j++) { String sEntry; String sLongName(pGlossaryList->GetBlockName(i - 1, j, sEntry)); @@ -243,14 +243,14 @@ SfxPopupWindow* SwTbxAutoTextCtrl::CreatePopupWindow() } } ToolBox* pToolBox = &GetToolBox(); - USHORT nId = GetId(); - pToolBox->SetItemDown( nId, TRUE ); + sal_uInt16 nId = GetId(); + pToolBox->SetItemDown( nId, sal_True ); pPopup->Execute( pToolBox, pToolBox->GetItemRect( nId ), (pToolBox->GetAlign() == WINDOWALIGN_TOP || pToolBox->GetAlign() == WINDOWALIGN_BOTTOM) ? POPUPMENU_EXECUTE_DOWN : POPUPMENU_EXECUTE_RIGHT ); - pToolBox->SetItemDown( nId, FALSE ); + pToolBox->SetItemDown( nId, sal_False ); } GetToolBox().EndSelection(); DelPopup(); @@ -264,7 +264,7 @@ SfxPopupWindowType SwTbxAutoTextCtrl::GetPopupWindowType() const return SFX_POPUPWINDOW_ONTIMEOUT; } -void SwTbxAutoTextCtrl::StateChanged( USHORT nSID, +void SwTbxAutoTextCtrl::StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ) { @@ -277,7 +277,7 @@ void SwTbxAutoTextCtrl::StateChanged( USHORT nSID, IMPL_LINK(SwTbxAutoTextCtrl, PopupHdl, PopupMenu*, pMenu) { - USHORT nId = pMenu->GetCurItemId(); + sal_uInt16 nId = pMenu->GetCurItemId(); if ( GetSlotId() == FN_INSERT_FIELD_CTRL) { @@ -313,11 +313,11 @@ IMPL_LINK(SwTbxAutoTextCtrl, PopupHdl, PopupMenu*, pMenu) } else { - USHORT nBlock = nId / 100; + sal_uInt16 nBlock = nId / 100; SwGlossaryList* pGlossaryList = ::GetGlossaryList(); String sShortName; - String sGroup = pGlossaryList->GetGroupName(nBlock - 1, FALSE); + String sGroup = pGlossaryList->GetGroupName(nBlock - 1, sal_False); String sLongName(pGlossaryList->GetBlockName(nBlock - 1, nId - (100 * nBlock) - 1, sShortName)); SwGlossaryHdl* pGlosHdl = pView->GetGlosHdl(); @@ -326,7 +326,7 @@ IMPL_LINK(SwTbxAutoTextCtrl, PopupHdl, PopupMenu*, pMenu) ::GlossarySetActGroup fnSetActGroup = pFact->SetGlossaryActGroupFunc( DLG_RENAME_GLOS ); if ( fnSetActGroup ) (*fnSetActGroup)( sGroup ); - pGlosHdl->SetCurGroup(sGroup, TRUE); + pGlosHdl->SetCurGroup(sGroup, sal_True); pGlosHdl->InsertGlossary(sShortName); } return 0; @@ -338,7 +338,7 @@ void SwTbxAutoTextCtrl::DelPopup() { if (GetSlotId() != FN_INSERT_FIELD_CTRL) { - for( USHORT i = 0; i < pPopup->GetItemCount(); i ++ ) + for( sal_uInt16 i = 0; i < pPopup->GetItemCount(); i ++ ) { PopupMenu* pSubPopup = pPopup->GetPopupMenu(pPopup->GetItemId(i)); delete pSubPopup; @@ -351,7 +351,7 @@ void SwTbxAutoTextCtrl::DelPopup() /* Navigations-Popup */ // determine the order of the toolbox items -static USHORT const aNavigationInsertIds[ NAVI_ENTRIES ] = +static sal_uInt16 aNavigationInsertIds[ NAVI_ENTRIES ] = { // -- first line NID_TBL, @@ -376,7 +376,7 @@ static USHORT const aNavigationInsertIds[ NAVI_ENTRIES ] = NID_TABLE_FORMULA_ERROR, NID_NEXT }; -static USHORT const aNavigationHelpIds[ NAVI_ENTRIES ] = +static const char* aNavigationHelpIds[ NAVI_ENTRIES ] = { // -- first line HID_NID_TBL, @@ -402,7 +402,7 @@ static USHORT const aNavigationHelpIds[ NAVI_ENTRIES ] = HID_NID_NEXT }; -SwScrollNaviPopup::SwScrollNaviPopup( USHORT nId, const Reference< XFrame >& rFrame ) +SwScrollNaviPopup::SwScrollNaviPopup( sal_uInt16 nId, const Reference< XFrame >& rFrame ) : SfxPopupWindow(nId, rFrame, SW_RES(RID_SCROLL_NAVIGATION_WIN) ), aToolBox(this, 0), aSeparator(this, SW_RES(FL_SEP)), @@ -411,20 +411,20 @@ SwScrollNaviPopup::SwScrollNaviPopup( USHORT nId, const Reference< XFrame >& rFr nFwdId(FN_START_OF_NEXT_PAGE), nBackId(FN_START_OF_PREV_PAGE) { - USHORT i; + sal_uInt16 i; aToolBox.SetHelpId(HID_NAVI_VS); aToolBox.SetLineCount( 2 ); aToolBox.SetOutStyle(TOOLBOX_STYLE_FLAT); for( i = 0; i < NID_COUNT; i++) { - USHORT nNaviId = aNavigationInsertIds[i]; + sal_uInt16 nNaviId = aNavigationInsertIds[i]; String sText; ToolBoxItemBits nTbxBits = 0; if((NID_PREV != nNaviId) && (NID_NEXT != nNaviId)) { // -2, there's no string for Next/Prev - USHORT nResStr = ST_TBL - 2 + nNaviId - NID_START; + sal_uInt16 nResStr = ST_TBL - 2 + nNaviId - NID_START; sText = String(SW_RES(nResStr)); nTbxBits = TIB_CHECKABLE; } @@ -447,7 +447,7 @@ SwScrollNaviPopup::SwScrollNaviPopup( USHORT nId, const Reference< XFrame >& rFr aImgSize.Height() += 5; Size aSz = aToolBox.CalcWindowSizePixel(2); aToolBox.SetPosSizePixel( Point(), aSz ); - USHORT nItemId = SwView::GetMoveType(); + sal_uInt16 nItemId = SwView::GetMoveType(); aInfoField.SetText(aToolBox.GetItemText(nItemId)); aToolBox.CheckItem( nItemId, sal_True ); Size aFTSize(aInfoField.GetSizePixel()); @@ -483,9 +483,9 @@ void SwScrollNaviPopup::DataChanged( const DataChangedEvent& rDCEvt ) void SwScrollNaviPopup::ApplyImageList() { ImageList& rImgLst = aIList; - for(USHORT i = 0; i < NID_COUNT; i++) + for(sal_uInt16 i = 0; i < NID_COUNT; i++) { - USHORT nNaviId = aNavigationInsertIds[i]; + sal_uInt16 nNaviId = aNavigationInsertIds[i]; aToolBox.SetItemImage(nNaviId, rImgLst.GetImage(nNaviId)); } } @@ -497,7 +497,7 @@ SfxPopupWindow* SwScrollNaviPopup::Clone() const IMPL_LINK(SwScrollNaviPopup, SelectHdl, ToolBox*, pSet) { - USHORT nSet = pSet->GetCurItemId(); + sal_uInt16 nSet = pSet->GetCurItemId(); if( nSet != NID_PREV && nSet != NID_NEXT ) { SwView::SetMoveType(nSet); @@ -505,9 +505,9 @@ IMPL_LINK(SwScrollNaviPopup, SelectHdl, ToolBox*, pSet) aToolBox.SetItemText(NID_PREV, sQuickHelp[nSet - NID_START + NID_COUNT]); aInfoField.SetText(aToolBox.GetItemText(nSet)); //check the current button only - for(USHORT i = 0; i < NID_COUNT; i++) + for(sal_uInt16 i = 0; i < NID_COUNT; i++) { - USHORT nItemId = aToolBox.GetItemId( i ); + sal_uInt16 nItemId = aToolBox.GetItemId( i ); aToolBox.CheckItem( nItemId, nItemId == nSet ); } } @@ -535,15 +535,15 @@ void SwScrollNaviToolBox::MouseButtonUp( const MouseEvent& rMEvt ) void SwScrollNaviToolBox::RequestHelp( const HelpEvent& rHEvt ) { - SetItemText(NID_NEXT, SwScrollNaviPopup::GetQuickHelpText(TRUE)); - SetItemText(NID_PREV, SwScrollNaviPopup::GetQuickHelpText(FALSE)); + SetItemText(NID_NEXT, SwScrollNaviPopup::GetQuickHelpText(sal_True)); + SetItemText(NID_PREV, SwScrollNaviPopup::GetQuickHelpText(sal_False)); ToolBox::RequestHelp( rHEvt ); } -String SwScrollNaviPopup::GetQuickHelpText(BOOL bNext) +String SwScrollNaviPopup::GetQuickHelpText(sal_Bool bNext) { - USHORT nResId = STR_IMGBTN_START; + sal_uInt16 nResId = STR_IMGBTN_START; nResId += SwView::GetMoveType() - NID_START; if(!bNext) nResId += NID_COUNT; @@ -639,14 +639,14 @@ void SwNaviImageButton::DataChanged( const DataChangedEvent& rDCEvt ) class SwZoomBox_Impl : public ComboBox { - USHORT nSlotId; - BOOL bRelease; + sal_uInt16 nSlotId; + sal_Bool bRelease; uno::Reference< frame::XDispatchProvider > m_xDispatchProvider; public: SwZoomBox_Impl( Window* pParent, - USHORT nSlot, + sal_uInt16 nSlot, const Reference< XDispatchProvider >& rDispatchProvider ); ~SwZoomBox_Impl(); @@ -660,17 +660,17 @@ protected: SwZoomBox_Impl::SwZoomBox_Impl( Window* pParent, - USHORT nSlot, + sal_uInt16 nSlot, const Reference< XDispatchProvider >& rDispatchProvider ): ComboBox( pParent, SW_RES(RID_PVIEW_ZOOM_LB)), nSlotId(nSlot), - bRelease(TRUE), + bRelease(sal_True), m_xDispatchProvider( rDispatchProvider ) { - EnableAutocomplete( FALSE ); - USHORT aZoomValues[] = + EnableAutocomplete( sal_False ); + sal_uInt16 aZoomValues[] = { 25, 50, 75, 100, 150, 200 }; - for(USHORT i = 0; i < sizeof(aZoomValues)/sizeof(USHORT); i++) + for(sal_uInt16 i = 0; i < sizeof(aZoomValues)/sizeof(sal_uInt16); i++) { String sEntry = String::CreateFromInt32(aZoomValues[i]); sEntry += '%'; @@ -687,7 +687,7 @@ void SwZoomBox_Impl::Select() { String sEntry(GetText()); sEntry.EraseAllChars( '%' ); - USHORT nZoom = (USHORT)sEntry.ToInt32(); + sal_uInt16 nZoom = (sal_uInt16)sEntry.ToInt32(); if(nZoom < MINZOOM) nZoom = MINZOOM; if(nZoom > MAXZOOM) @@ -717,7 +717,7 @@ long SwZoomBox_Impl::Notify( NotifyEvent& rNEvt ) if ( rNEvt.GetType() == EVENT_KEYINPUT ) { - USHORT nCode = rNEvt.GetKeyEvent()->GetKeyCode().GetCode(); + sal_uInt16 nCode = rNEvt.GetKeyEvent()->GetKeyCode().GetCode(); switch ( nCode ) { @@ -725,7 +725,7 @@ long SwZoomBox_Impl::Notify( NotifyEvent& rNEvt ) case KEY_TAB: { if ( KEY_TAB == nCode ) - bRelease = FALSE; + bRelease = sal_False; else nHandled = 1; Select(); @@ -752,7 +752,7 @@ void SwZoomBox_Impl::ReleaseFocus() { if ( !bRelease ) { - bRelease = TRUE; + bRelease = sal_True; return; } SfxViewShell* pCurSh = SfxViewShell::Current(); @@ -769,8 +769,8 @@ void SwZoomBox_Impl::ReleaseFocus() SFX_IMPL_TOOLBOX_CONTROL( SwPreviewZoomControl, SfxUInt16Item); SwPreviewZoomControl::SwPreviewZoomControl( - USHORT nSlotId, - USHORT nId, + sal_uInt16 nSlotId, + sal_uInt16 nId, ToolBox& rTbx) : SfxToolBoxControl( nSlotId, nId, rTbx ) { @@ -780,11 +780,11 @@ SwPreviewZoomControl::~SwPreviewZoomControl() { } -void SwPreviewZoomControl::StateChanged( USHORT /*nSID*/, +void SwPreviewZoomControl::StateChanged( sal_uInt16 /*nSID*/, SfxItemState eState, const SfxPoolItem* pState ) { - USHORT nId = GetId(); + sal_uInt16 nId = GetId(); GetToolBox().EnableItem( nId, (GetItemState(pState) != SFX_ITEM_DISABLED) ); SwZoomBox_Impl* pBox = (SwZoomBox_Impl*)GetToolBox().GetItemWindow( GetId() ); if(SFX_ITEM_AVAILABLE <= eState) diff --git a/sw/source/ui/ribbar/workctrl.src b/sw/source/ui/ribbar/workctrl.src index 651cd4af89..ce0163974f 100644 --- a/sw/source/ui/ribbar/workctrl.src +++ b/sw/source/ui/ribbar/workctrl.src @@ -32,136 +32,9 @@ #include <svx/globlmn.hrc> #endif #include "workctrl.hrc" -#include "workctrl.hrc" #include "helpid.h" #include "cmdid.h" -FloatingWindow RID_INSERT_CTRL -{ - Moveable = TRUE ; - Closeable = TRUE ; - Hide = TRUE ; - SVLook = TRUE ; - HelpID = HID_INSERT_CTRL ; - ToolBox TBX_INSERT - { - MenuStrings = TRUE ; - SVLook = TRUE ; - HelpID = 1 ; - ItemList = - { - ToolBoxItem - { - Identifier = FN_INSERT_FRAME_INTERACT_NOCOL ; - HelpID = FN_INSERT_FRAME_INTERACT_NOCOL ; - }; - ToolBoxItem - { - Identifier = FN_INSERT_FRAME_INTERACT ; - HelpID = FN_INSERT_FRAME_INTERACT ; - DropDown = TRUE ; - }; - ToolBoxItem - { - Identifier = SID_INSERT_GRAPHIC ; - HelpID = SID_INSERT_GRAPHIC ; - }; - ToolBoxItem - { - Identifier = FN_INSERT_TABLE ; - HelpID = FN_INSERT_TABLE ; - DropDown = TRUE ; - }; - ToolBoxItem - { - Identifier = SID_INSERTDOC ; - HelpID = SID_INSERTDOC ; - }; - ToolBoxItem - { - Identifier = FN_INSERT_FOOTNOTE ; - HelpID = FN_INSERT_FOOTNOTE ; - }; - ToolBoxItem - { - Identifier = FN_INSERT_ENDNOTE ; - HelpID = FN_INSERT_ENDNOTE ; - }; - ToolBoxItem - { - Identifier = FN_INSERT_SYMBOL ; - HelpID = FN_INSERT_SYMBOL ; - }; - ToolBoxItem - { - Identifier = FN_INSERT_REGION ; - HelpID = FN_INSERT_REGION; - DropDown = TRUE ; - }; - ToolBoxItem - { - Identifier = FN_INSERT_IDX_ENTRY_DLG ; - HelpID = FN_INSERT_IDX_ENTRY_DLG ; - }; - ToolBoxItem - { - Identifier = FN_INSERT_BOOKMARK ; - HelpID = FN_INSERT_BOOKMARK ; - RadioCheck = TRUE ; - }; - }; - }; - Text [ en-US ] = "Insert" ; -}; -FloatingWindow RID_INSERT_OBJ_CTRL -{ - Moveable = TRUE ; - Closeable = TRUE ; - Hide = TRUE ; - SVLook = TRUE ; - HelpID = HID_INSERT_OBJ_CTRL ; - ToolBox TBX_OBJ_INSERT - { - MenuStrings = TRUE ; - SVLook = TRUE ; - HelpID = 1 ; - ItemList = - { - ToolBoxItem - { - Identifier = SID_INSERT_DIAGRAM ; - HelpID = SID_INSERT_DIAGRAM ; - }; - ToolBoxItem - { - Identifier = FN_INSERT_SMA ; - HelpID = FN_INSERT_SMA ; - }; - ToolBoxItem - { - Identifier = SID_INSERT_FLOATINGFRAME ; - HelpID = SID_INSERT_FLOATINGFRAME ; - }; - ToolBoxItem - { - Identifier = SID_INSERT_OBJECT ; - HelpID = SID_INSERT_OBJECT ; - }; - ToolBoxItem - { - Identifier = SID_INSERT_PLUGIN ; - HelpID = SID_INSERT_PLUGIN ; - }; -#ifdef SOLAR_JAVA - ToolBoxItem - { - Identifier = SID_INSERT_APPLET ; - HelpID = SID_INSERT_APPLET ; - }; -#endif - }; - }; - Text [ en-US ] = "Insert Object" ; -}; + Menu RID_INSERT_FIELD_CTRL { ItemList = @@ -169,43 +42,43 @@ Menu RID_INSERT_FIELD_CTRL MenuItem { Identifier = FN_INSERT_FLD_DATE ; - HelpID = FN_INSERT_FLD_DATE ; + HelpId = CMD_FN_INSERT_FLD_DATE ; Text [ en-US ] = "Date" ; }; MenuItem { Identifier = FN_INSERT_FLD_TIME ; - HelpID = FN_INSERT_FLD_TIME ; + HelpId = CMD_FN_INSERT_FLD_TIME ; Text [ en-US ] = "Time" ; }; MenuItem { Identifier = FN_INSERT_FLD_PGNUMBER ; - HelpID = FN_INSERT_FLD_PGNUMBER ; + HelpId = CMD_FN_INSERT_FLD_PGNUMBER ; Text [ en-US ] = "Page Number" ; }; MenuItem { Identifier = FN_INSERT_FLD_PGCOUNT ; - HelpID = FN_INSERT_FLD_PGCOUNT ; + HelpId = CMD_FN_INSERT_FLD_PGCOUNT ; Text [ en-US ] = "Page Count" ; }; MenuItem { Identifier = FN_INSERT_FLD_TOPIC ; - HelpID = FN_INSERT_FLD_TOPIC ; + HelpId = CMD_FN_INSERT_FLD_TOPIC ; Text [ en-US ] = "Subject" ; }; MenuItem { Identifier = FN_INSERT_FLD_TITLE ; - HelpID = FN_INSERT_FLD_TITLE ; + HelpId = CMD_FN_INSERT_FLD_TITLE ; Text [ en-US ] = "Title" ; }; MenuItem { Identifier = FN_INSERT_FLD_AUTHOR ; - HelpID = FN_INSERT_FLD_AUTHOR ; + HelpId = CMD_FN_INSERT_FLD_AUTHOR ; Text [ en-US ] = "Author" ; }; MenuItem @@ -215,7 +88,7 @@ Menu RID_INSERT_FIELD_CTRL MenuItem { Identifier = FN_INSERT_FIELD ; - HelpID = FN_INSERT_FIELD ; + HelpId = CMD_FN_INSERT_FIELD ; Text [ en-US ] = "Other..." ; }; }; diff --git a/sw/source/ui/shells/annotsh.cxx b/sw/source/ui/shells/annotsh.cxx index 56742b7220..16f04b3fa2 100644 --- a/sw/source/ui/shells/annotsh.cxx +++ b/sw/source/ui/shells/annotsh.cxx @@ -160,7 +160,7 @@ SwAnnotationShell::~SwAnnotationShell() { } -SfxUndoManager* SwAnnotationShell::GetUndoManager() +::svl::IUndoManager* SwAnnotationShell::GetUndoManager() { SwPostItMgr* pPostItMgr = rView.GetPostItMgr(); if ( !pPostItMgr || @@ -265,9 +265,9 @@ void SwAnnotationShell::Exec( SfxRequest &rReq ) Outliner * pOutliner = pOLV->GetOutliner(); if(pOutliner) { - ULONG nParaCount = pOutliner->GetParagraphCount(); + sal_uLong nParaCount = pOutliner->GetParagraphCount(); if (nParaCount > 0) - pOLV->SelectRange(0L, USHORT(nParaCount) ); + pOLV->SelectRange(0L, sal_uInt16(nParaCount) ); } break; } @@ -362,7 +362,7 @@ void SwAnnotationShell::Exec( SfxRequest &rReq ) { const SfxPoolItem* pItem = 0; if(pNewAttrs) - pNewAttrs->GetItemState(nSlot, FALSE, &pItem ); + pNewAttrs->GetItemState(nSlot, sal_False, &pItem ); if (pPostItMgr->GetActiveSidebarWin()->GetLayoutStatus()!=SwPostItHelper::DELETED) pOLV->InsertText(((const SfxStringItem *)pItem)->GetValue()); break; @@ -414,7 +414,7 @@ void SwAnnotationShell::Exec( SfxRequest &rReq ) SwDocStat aCurr; SwDocStat aDocStat( rSh.getIDocumentStatistics()->GetDocStat() ); { - SwWait aWait( *rView.GetDocShell(), TRUE ); + SwWait aWait( *rView.GetDocShell(), sal_True ); rSh.StartAction(); rSh.CountWords( aCurr ); rSh.UpdateDocStat( aDocStat ); @@ -452,7 +452,7 @@ void SwAnnotationShell::Exec( SfxRequest &rReq ) SfxAbstractTabDialog* pDlg = pFact->CreateSwCharDlg( rView.GetWindow(), rView, aDlgAttr, DLG_CHAR,0, sal_True ); OSL_ENSURE(pDlg, "Dialogdiet fail!"); - USHORT nRet = pDlg->Execute(); + sal_uInt16 nRet = pDlg->Execute(); if(RET_OK == nRet ) { rReq.Done( *( pDlg->GetOutputItemSet() ) ); @@ -500,7 +500,7 @@ void SwAnnotationShell::Exec( SfxRequest &rReq ) SfxAbstractTabDialog* pDlg = pFact->CreateSwParaDlg( rView.GetWindow(), rView, aDlgAttr,DLG_STD, DLG_PARA, 0, sal_True ); OSL_ENSURE(pDlg, "Dialogdiet fail!"); - USHORT nRet = pDlg->Execute(); + sal_uInt16 nRet = pDlg->Execute(); if(RET_OK == nRet) { rReq.Done( *( pDlg->GetOutputItemSet() ) ); @@ -526,7 +526,7 @@ void SwAnnotationShell::Exec( SfxRequest &rReq ) sal_Bool bLeftToRight = nSlot == SID_ATTR_PARA_LEFT_TO_RIGHT; const SfxPoolItem* pPoolItem; - if( pNewAttrs && SFX_ITEM_SET == pNewAttrs->GetItemState( nSlot, TRUE, &pPoolItem ) ) + if( pNewAttrs && SFX_ITEM_SET == pNewAttrs->GetItemState( nSlot, sal_True, &pPoolItem ) ) { if( !( (SfxBoolItem*)pPoolItem)->GetValue() ) bLeftToRight = !bLeftToRight; @@ -536,8 +536,8 @@ void SwAnnotationShell::Exec( SfxRequest &rReq ) EE_PARA_WRITINGDIR, EE_PARA_WRITINGDIR, 0 ); - USHORT nAdjust = SVX_ADJUST_LEFT; - if( SFX_ITEM_ON == aEditAttr.GetItemState(EE_PARA_JUST, TRUE, &pPoolItem ) ) + sal_uInt16 nAdjust = SVX_ADJUST_LEFT; + if( SFX_ITEM_ON == aEditAttr.GetItemState(EE_PARA_JUST, sal_True, &pPoolItem ) ) nAdjust = ( (SvxAdjustItem*)pPoolItem)->GetEnumValue(); if( bLeftToRight ) @@ -590,7 +590,7 @@ void SwAnnotationShell::GetState(SfxItemSet& rSet) while(nWhich) { sal_uInt16 nEEWhich = 0; - USHORT nSlotId = GetPool().GetSlotId( nWhich ); + sal_uInt16 nSlotId = GetPool().GetSlotId( nWhich ); switch( nSlotId ) { case SID_ATTR_CHAR_FONT: @@ -600,12 +600,12 @@ void SwAnnotationShell::GetState(SfxItemSet& rSet) { if ( pOLV ) { - USHORT nScriptType = pOLV->GetSelectedScriptType(); + sal_uInt16 nScriptType = pOLV->GetSelectedScriptType(); SfxItemPool* pSecondPool = aEditAttr.GetPool()->GetSecondaryPool(); if( !pSecondPool ) pSecondPool = aEditAttr.GetPool(); SvxScriptSetItem aSetItem( nSlotId, *pSecondPool ); - aSetItem.GetItemSet().Put( aEditAttr, FALSE ); + aSetItem.GetItemSet().Put( aEditAttr, sal_False ); const SfxPoolItem* pI = aSetItem.GetItemOfScript( nScriptType ); if( pI ) rSet.Put( *pI, nWhich ); @@ -626,7 +626,7 @@ void SwAnnotationShell::GetState(SfxItemSet& rSet) case FN_SET_SUPER_SCRIPT: case FN_SET_SUB_SCRIPT: { - USHORT nEsc = 0; + sal_uInt16 nEsc = 0; const SfxPoolItem *pEscItem = 0; if (nWhich==FN_SET_SUPER_SCRIPT) nEsc = SVX_ESCAPEMENT_SUPERSCRIPT; @@ -726,7 +726,7 @@ void SwAnnotationShell::GetState(SfxItemSet& rSet) rSet.DisableItem( nWhich ); else { - BOOL bFlag = FALSE; + sal_Bool bFlag = sal_False; switch( ( ( (SvxFrameDirectionItem&) aEditAttr.Get( EE_PARA_WRITINGDIR ) ) ).GetValue() ) { case FRMDIR_HORI_LEFT_TOP: @@ -773,7 +773,7 @@ void SwAnnotationShell::GetState(SfxItemSet& rSet) } } -void SwAnnotationShell::ExecSearch(SfxRequest& rReq, BOOL bNoMessage) +void SwAnnotationShell::ExecSearch(SfxRequest& rReq, sal_Bool bNoMessage) { rView.ExecSearch(rReq,bNoMessage); } @@ -821,7 +821,7 @@ void SwAnnotationShell::ExecClpbrd(SfxRequest &rReq) TransferableDataHelper aDataHelper( TransferableDataHelper::CreateFromSystemClipboard( &rView.GetEditWin() ) ); - ULONG nFormat = pDlg->GetFormat( aDataHelper.GetTransferable() ); + sal_uLong nFormat = pDlg->GetFormat( aDataHelper.GetTransferable() ); if (nFormat > 0) { @@ -836,9 +836,9 @@ void SwAnnotationShell::ExecClpbrd(SfxRequest &rReq) } case SID_CLIPBOARD_FORMAT_ITEMS: { - ULONG nFormat = 0; + sal_uLong nFormat = 0; const SfxPoolItem* pItem; - if ( rReq.GetArgs() && rReq.GetArgs()->GetItemState(nSlot, TRUE, &pItem) == SFX_ITEM_SET && + if ( rReq.GetArgs() && rReq.GetArgs()->GetItemState(nSlot, sal_True, &pItem) == SFX_ITEM_SET && pItem->ISA(SfxUInt32Item) ) { nFormat = ((const SfxUInt32Item*)pItem)->GetValue(); @@ -915,7 +915,7 @@ void SwAnnotationShell::StateClpbrd(SfxItemSet &rSet) void SwAnnotationShell::StateStatusLine(SfxItemSet &rSet) { SfxWhichIter aIter( rSet ); - USHORT nWhich = aIter.FirstWhich(); + sal_uInt16 nWhich = aIter.FirstWhich(); while( nWhich ) { @@ -1006,7 +1006,6 @@ void SwAnnotationShell::NoteExec(SfxRequest &rReq) case FN_REPLY: case FN_POSTIT: case FN_DELETE_COMMENT: - case FN_DELETE_NOTE: if ( pPostItMgr->HasActiveSidebarWin() ) pPostItMgr->GetActiveSidebarWin()->ExecuteCommand(nSlot); break; @@ -1015,7 +1014,7 @@ void SwAnnotationShell::NoteExec(SfxRequest &rReq) break; case FN_DELETE_NOTE_AUTHOR: { - SFX_REQUEST_ARG( rReq, pItem, SfxStringItem, nSlot, FALSE); + SFX_REQUEST_ARG( rReq, pItem, SfxStringItem, nSlot, sal_False); if ( pItem ) pPostItMgr->Delete( pItem->GetValue() ); break; @@ -1027,7 +1026,7 @@ void SwAnnotationShell::NoteExec(SfxRequest &rReq) break; case FN_HIDE_NOTE_AUTHOR: { - SFX_REQUEST_ARG( rReq, pItem, SfxStringItem, nSlot, FALSE); + SFX_REQUEST_ARG( rReq, pItem, SfxStringItem, nSlot, sal_False); if ( pItem ) pPostItMgr->Hide( pItem->GetValue() ); } @@ -1041,28 +1040,19 @@ void SwAnnotationShell::GetNoteState(SfxItemSet &rSet) sal_uInt16 nWhich = aIter.FirstWhich(); while(nWhich) { - USHORT nSlotId = GetPool().GetSlotId( nWhich ); + sal_uInt16 nSlotId = GetPool().GetSlotId( nWhich ); switch( nSlotId ) { case FN_POSTIT: - case FN_DELETE_NOTE: case FN_DELETE_NOTE_AUTHOR: case FN_DELETE_ALL_NOTES: case FN_HIDE_NOTE: case FN_HIDE_NOTE_AUTHOR: case FN_HIDE_ALL_NOTES: - { - if ( !pPostItMgr || - !pPostItMgr->HasActiveAnnotationWin() ) - { - rSet.DisableItem(nWhich); - } - break; - } case FN_DELETE_COMMENT: { if ( !pPostItMgr || - !pPostItMgr->HasActiveSidebarWin() /*HasActiveRedCommentWin()*/ ) + !pPostItMgr->HasActiveAnnotationWin() ) { rSet.DisableItem(nWhich); } @@ -1095,7 +1085,7 @@ void SwAnnotationShell::GetNoteState(SfxItemSet &rSet) if (pPostItMgr->HasActiveSidebarWin()) { if ( (pPostItMgr->GetActiveSidebarWin()->IsProtected()) && - ( (nSlotId==FN_DELETE_NOTE) || (nSlotId==FN_REPLY) ) ) + ( (nSlotId==FN_DELETE_COMMENT) || (nSlotId==FN_REPLY) ) ) rSet.DisableItem( nWhich ); } nWhich = aIter.NextWhich(); @@ -1269,7 +1259,7 @@ void SwAnnotationShell::GetLinguState(SfxItemSet &rSet) { const SfxPoolItem &rItem = rView.GetWrtShell().GetDoc()->GetDefault( GetWhichOfScript( RES_CHRATR_LANGUAGE, - GetI18NScriptTypeOfLanguage( (USHORT)GetAppLanguage())) ); + GetI18NScriptTypeOfLanguage( (sal_uInt16)GetAppLanguage())) ); LanguageType nLang = ((const SvxLanguageItem &) rItem).GetLanguage(); uno::Reference< linguistic2::XThesaurus > xThes( ::GetThesaurus() ); @@ -1355,17 +1345,17 @@ void SwAnnotationShell::ExecTransliteration(SfxRequest &rReq) void SwAnnotationShell::ExecUndo(SfxRequest &rReq) { const SfxItemSet* pArgs = rReq.GetArgs(); - SfxUndoManager* pUndoManager = GetUndoManager(); + ::svl::IUndoManager* pUndoManager = GetUndoManager(); SwWrtShell &rSh = rView.GetWrtShell(); long aOldHeight = rView.GetPostItMgr()->HasActiveSidebarWin() ? rView.GetPostItMgr()->GetActiveSidebarWin()->GetPostItTextHeight() : 0; - USHORT nId = rReq.GetSlot(); + sal_uInt16 nId = rReq.GetSlot(); sal_uInt16 nCnt = 1; const SfxPoolItem* pItem=0; - if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( nId, FALSE, &pItem ) ) + if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( nId, sal_False, &pItem ) ) nCnt = ((SfxUInt16Item*)pItem)->GetValue(); switch( nId ) { @@ -1384,7 +1374,7 @@ void SwAnnotationShell::ExecUndo(SfxRequest &rReq) nCnt = 0; while( nSteps-- ) - pUndoManager->Undo(0); + pUndoManager->Undo(); } if ( nCnt ) @@ -1408,7 +1398,7 @@ void SwAnnotationShell::ExecUndo(SfxRequest &rReq) nCnt = 0; while( nSteps-- ) - pUndoManager->Redo(0); + pUndoManager->Redo(); } if ( nCnt ) @@ -1431,8 +1421,8 @@ void SwAnnotationShell::StateUndo(SfxItemSet &rSet) return; SfxWhichIter aIter(rSet); - USHORT nWhich = aIter.FirstWhich(); - SfxUndoManager* pUndoManager = GetUndoManager(); + sal_uInt16 nWhich = aIter.FirstWhich(); + ::svl::IUndoManager* pUndoManager = GetUndoManager(); SfxViewFrame *pSfxViewFrame = rView.GetViewFrame(); SwWrtShell &rSh = rView.GetWrtShell(); @@ -1445,8 +1435,10 @@ void SwAnnotationShell::StateUndo(SfxItemSet &rSet) sal_uInt16 nCount = pUndoManager->GetUndoActionCount(); if ( nCount ) pSfxViewFrame->GetSlotState( nWhich, pSfxViewFrame->GetInterface(), &rSet ); - else if( rSh.GetUndoIds() ) + else if (rSh.GetLastUndoInfo(0, 0)) + { rSet.Put( SfxStringItem( nWhich, rSh.GetDoString(SwWrtShell::UNDO)) ); + } else rSet.DisableItem(nWhich); break; @@ -1456,8 +1448,10 @@ void SwAnnotationShell::StateUndo(SfxItemSet &rSet) sal_uInt16 nCount = pUndoManager->GetRedoActionCount(); if ( nCount ) pSfxViewFrame->GetSlotState( nWhich, pSfxViewFrame->GetInterface(), &rSet ); - else if(rSh.GetRedoIds()) + else if (rSh.GetFirstRedoInfo(0)) + { rSet.Put(SfxStringItem( nWhich, rSh.GetDoString(SwWrtShell::REDO)) ); + } else rSet.DisableItem(nWhich); break; @@ -1467,34 +1461,36 @@ void SwAnnotationShell::StateUndo(SfxItemSet &rSet) { if( pUndoManager ) { - UniString (SfxUndoManager:: *fnGetComment)( USHORT ) const; + UniString (::svl::IUndoManager:: *fnGetComment)( size_t, bool const ) const; sal_uInt16 nCount; if( SID_GETUNDOSTRINGS == nWhich ) { nCount = pUndoManager->GetUndoActionCount(); - fnGetComment = &SfxUndoManager::GetUndoActionComment; + fnGetComment = &::svl::IUndoManager::GetUndoActionComment; } else { nCount = pUndoManager->GetRedoActionCount(); - fnGetComment = &SfxUndoManager::GetRedoActionComment; + fnGetComment = &::svl::IUndoManager::GetRedoActionComment; } String sList; if( nCount ) { for( sal_uInt16 n = 0; n < nCount; ++n ) - ( sList += (pUndoManager->*fnGetComment)( n ) ) + ( sList += (pUndoManager->*fnGetComment)( n, ::svl::IUndoManager::TopLevel ) ) += '\n'; } SfxStringListItem aItem( nWhich ); - if( nWhich == SID_GETUNDOSTRINGS && rSh.GetUndoIds() ) + if ((nWhich == SID_GETUNDOSTRINGS) && + rSh.GetLastUndoInfo(0, 0)) { rSh.GetDoStrings( SwWrtShell::UNDO, aItem ); } - else if( nWhich == SID_GETREDOSTRINGS && rSh.GetRedoIds() ) + else if ((nWhich == SID_GETREDOSTRINGS) && + (rSh.GetFirstRedoInfo(0))) { rSh.GetDoStrings( SwWrtShell::UNDO, aItem ); } @@ -1526,7 +1522,7 @@ void SwAnnotationShell::StateUndo(SfxItemSet &rSet) void SwAnnotationShell::StateDisableItems( SfxItemSet &rSet ) { SfxWhichIter aIter(rSet); - USHORT nWhich = aIter.FirstWhich(); + sal_uInt16 nWhich = aIter.FirstWhich(); while (nWhich) { rSet.DisableItem( nWhich ); @@ -1545,7 +1541,7 @@ void SwAnnotationShell::InsertSymbol(SfxRequest& rReq) const SfxItemSet *pArgs = rReq.GetArgs(); const SfxPoolItem* pItem = 0; if( pArgs ) - pArgs->GetItemState(GetPool().GetWhich(SID_CHARMAP), FALSE, &pItem); + pArgs->GetItemState(GetPool().GetWhich(SID_CHARMAP), sal_False, &pItem); String sSym; String sFontName; @@ -1553,25 +1549,25 @@ void SwAnnotationShell::InsertSymbol(SfxRequest& rReq) { sSym = ((const SfxStringItem*)pItem)->GetValue(); const SfxPoolItem* pFtItem = NULL; - pArgs->GetItemState( GetPool().GetWhich(SID_ATTR_SPECIALCHAR), FALSE, &pFtItem); + pArgs->GetItemState( GetPool().GetWhich(SID_ATTR_SPECIALCHAR), sal_False, &pFtItem); const SfxStringItem* pFontItem = PTR_CAST( SfxStringItem, pFtItem ); if ( pFontItem ) sFontName = pFontItem->GetValue(); } SfxItemSet aSet(pOLV->GetAttribs()); - USHORT nScript = pOLV->GetSelectedScriptType(); + sal_uInt16 nScript = pOLV->GetSelectedScriptType(); SvxFontItem aSetDlgFont( RES_CHRATR_FONT ); { SvxScriptSetItem aSetItem( SID_ATTR_CHAR_FONT, *aSet.GetPool() ); - aSetItem.GetItemSet().Put( aSet, FALSE ); + aSetItem.GetItemSet().Put( aSet, sal_False ); const SfxPoolItem* pI = aSetItem.GetItemOfScript( nScript ); if( pI ) aSetDlgFont = *(SvxFontItem*)pI; else aSetDlgFont = (SvxFontItem&)aSet.Get( GetWhichOfScript( SID_ATTR_CHAR_FONT, - GetI18NScriptTypeOfLanguage( (USHORT)GetAppLanguage() ) )); + GetI18NScriptTypeOfLanguage( (sal_uInt16)GetAppLanguage() ) )); if (!sFontName.Len()) sFontName = aSetDlgFont.GetFamilyName(); } @@ -1582,7 +1578,7 @@ void SwAnnotationShell::InsertSymbol(SfxRequest& rReq) SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); SfxAllItemSet aAllSet( GetPool() ); - aAllSet.Put( SfxBoolItem( FN_PARAM_1, FALSE ) ); + aAllSet.Put( SfxBoolItem( FN_PARAM_1, sal_False ) ); SwViewOption aOpt(*rView.GetWrtShell().GetViewOptions()); String sSymbolFont = aOpt.GetSymbolFont(); @@ -1595,11 +1591,11 @@ void SwAnnotationShell::InsertSymbol(SfxRequest& rReq) SfxAbstractDialog* pDlg = pFact->CreateSfxDialog( rView.GetWindow(), aAllSet, rView.GetViewFrame()->GetFrame().GetFrameInterface(), RID_SVXDLG_CHARMAP ); - USHORT nResult = pDlg->Execute(); + sal_uInt16 nResult = pDlg->Execute(); if( nResult == RET_OK ) { - SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pCItem, SfxStringItem, SID_CHARMAP, FALSE ); - SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pFontItem, SvxFontItem, SID_ATTR_CHAR_FONT, FALSE ); + SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pCItem, SfxStringItem, SID_CHARMAP, sal_False ); + SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pFontItem, SvxFontItem, SID_ATTR_CHAR_FONT, sal_False ); if ( pFontItem ) { aFont.SetName( pFontItem->GetFamilyName() ); @@ -1624,7 +1620,7 @@ void SwAnnotationShell::InsertSymbol(SfxRequest& rReq) // nicht flackern pOLV->HideCursor(); Outliner * pOutliner = pOLV->GetOutliner(); - pOutliner->SetUpdateMode(FALSE); + pOutliner->SetUpdateMode(sal_False); SfxItemSet aOldSet( pOLV->GetAttribs() ); SfxItemSet aFontSet( *aOldSet.GetPool(), @@ -1643,7 +1639,7 @@ void SwAnnotationShell::InsertSymbol(SfxRequest& rReq) aFont.GetStyleName(), aFont.GetPitch(), aFont.GetCharSet(), EE_CHAR_FONTINFO ); - USHORT nScriptBreak = pBreakIt->GetAllScriptsOfText( sSym ); + sal_uInt16 nScriptBreak = pBreakIt->GetAllScriptsOfText( sSym ); if( SCRIPTTYPE_LATIN & nScriptBreak ) aSetFont.Put( aFontItem, EE_CHAR_FONTINFO ); if( SCRIPTTYPE_ASIAN & nScriptBreak ) @@ -1662,7 +1658,7 @@ void SwAnnotationShell::InsertSymbol(SfxRequest& rReq) pOLV->SetAttribs( aFontSet ); // ab jetzt wieder anzeigen - pOutliner->SetUpdateMode(TRUE); + pOutliner->SetUpdateMode(sal_True); pOLV->ShowCursor(); rReq.AppendItem( SfxStringItem( GetPool().GetWhich(SID_CHARMAP), sSym ) ); diff --git a/sw/source/ui/shells/basesh.cxx b/sw/source/ui/shells/basesh.cxx index 6a0fff08db..b292ccab87 100644 --- a/sw/source/ui/shells/basesh.cxx +++ b/sw/source/ui/shells/basesh.cxx @@ -28,6 +28,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" + #include <sot/factory.hxx> #include <hintids.hxx> #include <svl/urihelper.hxx> @@ -113,7 +114,6 @@ #include <instable.hxx> #include <svx/fmshell.hxx> // for FN_XFORMS_DESIGN_MODE #include <SwRewriter.hxx> -#include <undobj.hxx> #include <comcore.hrc> #include <unomid.h> @@ -122,19 +122,16 @@ FlyMode SwBaseShell::eFrameMode = FLY_DRAG_END; //Fuer die Erkennung der Id, die variable von Gallery mit SID_GALLERY_BG_BRUSH //ankommt. -static BYTE nParagraphPos; -static BYTE nGraphicPos; -static BYTE nOlePos; -static BYTE nFramePos; -static BYTE nTablePos; -static BYTE nTableRowPos; -static BYTE nTableCellPos; -static BYTE nPagePos; -static BYTE nHeaderPos; -static BYTE nFooterPos; - -#define Interior -#include <svx/svxslots.hxx> +static sal_uInt8 nParagraphPos; +static sal_uInt8 nGraphicPos; +static sal_uInt8 nOlePos; +static sal_uInt8 nFramePos; +static sal_uInt8 nTablePos; +static sal_uInt8 nTableRowPos; +static sal_uInt8 nTableCellPos; +static sal_uInt8 nPagePos; +static sal_uInt8 nHeaderPos; +static sal_uInt8 nFooterPos; #define SwBaseShell #define Shadow @@ -186,11 +183,11 @@ void lcl_UpdateIMapDlg( SwWrtShell& rSh ) delete pList; } -BOOL lcl_UpdateContourDlg( SwWrtShell &rSh, int nSel ) +sal_Bool lcl_UpdateContourDlg( SwWrtShell &rSh, int nSel ) { Graphic aGraf( rSh.GetIMapGraphic() ); GraphicType nGrfType = aGraf.GetType(); - BOOL bRet = GRAPHIC_NONE != nGrfType && GRAPHIC_DEFAULT != nGrfType; + sal_Bool bRet = GRAPHIC_NONE != nGrfType && GRAPHIC_DEFAULT != nGrfType; if( bRet ) { String aGrfName; @@ -222,7 +219,7 @@ void SwBaseShell::ExecDelete(SfxRequest &rReq) if( rSh.IsNoNum() ) { rSh.SttCrsrMove(); - BOOL bLeft = rSh.Left( CRSR_SKIP_CHARS, TRUE, 1, FALSE ); + sal_Bool bLeft = rSh.Left( CRSR_SKIP_CHARS, sal_True, 1, sal_False ); if( bLeft ) { rSh.DelLeft(); @@ -258,7 +255,7 @@ void SwBaseShell::ExecClpbrd(SfxRequest &rReq) SwWrtShell &rSh = GetShell(); - USHORT nId = rReq.GetSlot(); + sal_uInt16 nId = rReq.GetSlot(); sal_Bool bIgnore = sal_False; switch( nId ) { @@ -274,8 +271,8 @@ void SwBaseShell::ExecClpbrd(SfxRequest &rReq) pTransfer->Cut(); else { - const BOOL bLockedView = rSh.IsViewLocked(); - rSh.LockView( TRUE ); //lock visible section + const sal_Bool bLockedView = rSh.IsViewLocked(); + rSh.LockView( sal_True ); //lock visible section pTransfer->Copy(); rSh.LockView( bLockedView ); } @@ -309,7 +306,7 @@ void SwBaseShell::ExecClpbrd(SfxRequest &rReq) { const SfxItemSet* pArgs = rReq.GetArgs(); const SfxPoolItem* pFmt; - if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( nId, FALSE, &pFmt ) ) + if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( nId, sal_False, &pFmt ) ) { TransferableDataHelper aDataHelper( TransferableDataHelper::CreateFromSystemClipboard( @@ -381,7 +378,7 @@ void SwBaseShell::ExecClpbrd(SfxRequest &rReq) // temp. Variablen, da die Shell nach dem Paste schon // zerstoert sein kann SwView* pView = &rView; - ULONG nFormatId = 0; + sal_uLong nFormatId = 0; rReq.Ignore(); bIgnore = sal_True; int nRet = SwTransferable::PasteSpecial( rSh, aDataHelper, nFormatId ); @@ -421,9 +418,9 @@ void SwBaseShell::StateClpbrd(SfxItemSet &rSet) SwWrtShell &rSh = GetShell(); SfxWhichIter aIter(rSet); - const BOOL bCopy = rSh.HasSelection(); + const sal_Bool bCopy = rSh.HasSelection(); - USHORT nWhich = aIter.FirstWhich(); + sal_uInt16 nWhich = aIter.FirstWhich(); while(nWhich) { @@ -476,10 +473,10 @@ void SwBaseShell::ExecUndo(SfxRequest &rReq) { SwWrtShell &rSh = GetShell(); - USHORT nId = rReq.GetSlot(), nCnt = 1; + sal_uInt16 nId = rReq.GetSlot(), nCnt = 1; const SfxItemSet* pArgs = rReq.GetArgs(); const SfxPoolItem* pItem; - if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( nId, FALSE, &pItem )) + if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( nId, sal_False, &pItem )) nCnt = ((SfxUInt16Item*)pItem)->GetValue(); // #i106349#: save pointer: undo/redo may delete the shell, i.e., this! @@ -516,42 +513,48 @@ void SwBaseShell::StateUndo(SfxItemSet &rSet) { SwWrtShell &rSh = GetShell(); SfxWhichIter aIter(rSet); - USHORT nWhich = aIter.FirstWhich(); + sal_uInt16 nWhich = aIter.FirstWhich(); while(nWhich) { switch(nWhich) { case SID_UNDO: { - if( rSh.GetUndoIds() ) + if (rSh.GetLastUndoInfo(0, 0)) + { rSet.Put( SfxStringItem(nWhich, rSh.GetDoString(SwWrtShell::UNDO))); + } else rSet.DisableItem(nWhich); break; } case SID_REDO: { - if(rSh.GetRedoIds()) + if (rSh.GetFirstRedoInfo(0)) + { rSet.Put(SfxStringItem(nWhich, rSh.GetDoString(SwWrtShell::REDO))); + } else rSet.DisableItem(nWhich); break; } case SID_REPEAT: { // Repeat nur moeglich wenn kein REDO moeglich - UI-Restriktion - if(rSh.GetRedoIds() == UNDO_EMPTY && + if ((!rSh.GetFirstRedoInfo(0)) && !rSh.IsSelFrmMode() && - rSh.GetRepeatIds() ) + (UNDO_EMPTY != rSh.GetRepeatInfo(0))) + { rSet.Put(SfxStringItem(nWhich, rSh.GetRepeatString())); + } else rSet.DisableItem(nWhich); break; } case SID_GETUNDOSTRINGS: - if( rSh.GetUndoIds() ) + if (rSh.GetLastUndoInfo(0, 0)) { SfxStringListItem aStrLst( nWhich ); rSh.GetDoStrings( SwWrtShell::UNDO, aStrLst ); @@ -562,7 +565,7 @@ void SwBaseShell::StateUndo(SfxItemSet &rSet) break; case SID_GETREDOSTRINGS: - if( rSh.GetRedoIds() ) + if (rSh.GetFirstRedoInfo(0)) { SfxStringListItem aStrLst( nWhich ); rSh.GetDoStrings( SwWrtShell::REDO, aStrLst ); @@ -584,9 +587,9 @@ void SwBaseShell::Execute(SfxRequest &rReq) const SfxPoolItem *pItem; SwWrtShell &rSh = GetShell(); const SfxItemSet* pArgs = rReq.GetArgs(); - BOOL bMore = FALSE; + sal_Bool bMore = sal_False; - USHORT nSlot = rReq.GetSlot(); + sal_uInt16 nSlot = rReq.GetSlot(); switch(nSlot) { case FN_REPAGINATE: @@ -603,12 +606,12 @@ void SwBaseShell::Execute(SfxRequest &rReq) SwDocStat aDocStat; rSh.UpdateDocStat(aDocStat); rSh.EndAllTblBoxEdit(); - rSh.ViewShell::UpdateFlds(TRUE); + rSh.ViewShell::UpdateFlds(sal_True); if( rSh.IsCrsrInTbl() ) { if( !rSh.IsTblComplexForChart() ) - SwTableFUNC( &rSh, FALSE).UpdateChart(); + SwTableFUNC( &rSh, sal_False).UpdateChart(); rSh.ClearTblBoxCntnt(); rSh.SaveTblBoxCntnt(); } @@ -616,7 +619,7 @@ void SwBaseShell::Execute(SfxRequest &rReq) break; case FN_UPDATE_CHARTS: { - SwWait aWait( *rView.GetDocShell(), TRUE ); + SwWait aWait( *rView.GetDocShell(), sal_True ); rSh.UpdateAllCharts(); } break; @@ -628,7 +631,7 @@ void SwBaseShell::Execute(SfxRequest &rReq) if( rSh.GetLinkManager().GetLinks().Count() ) { rSh.StartAllAction(); - rSh.GetLinkManager().UpdateAllLinks( FALSE, TRUE, TRUE ); + rSh.GetLinkManager().UpdateAllLinks( sal_False, sal_True, sal_True ); rSh.EndAllAction(); } SfxDispatcher &rDis = *rTempView.GetViewFrame()->GetDispatcher(); @@ -640,7 +643,7 @@ void SwBaseShell::Execute(SfxRequest &rReq) break; case FN_UPDATE_INPUTFIELDS: - rSh.UpdateInputFlds(NULL, FALSE); + rSh.UpdateInputFlds(NULL, sal_False); break; case FN_PREV_BOOKMARK: rReq.SetReturnValue(SfxBoolItem( nSlot, rSh.GoPrevBookmark())); @@ -671,7 +674,7 @@ void SwBaseShell::Execute(SfxRequest &rReq) rSh.ClearMark(); rSh.EndSelect(); } - BOOL bRet = rSh.MoveFldType(pFldType, nSlot == FN_GOTO_NEXT_MARK); + sal_Bool bRet = rSh.MoveFldType(pFldType, nSlot == FN_GOTO_NEXT_MARK); SwField* pCurField = bRet ? rSh.GetCurFld() : 0; if (pCurField) rSh.ClickToField(*pCurField); @@ -690,15 +693,15 @@ void SwBaseShell::Execute(SfxRequest &rReq) } rSh.EnterStdMode(); nSlot == FN_START_DOC_DIRECT ? - rSh.SttEndDoc(TRUE) : - rSh.SttEndDoc(FALSE); + rSh.SttEndDoc(sal_True) : + rSh.SttEndDoc(sal_False); } break; case FN_GOTO_PREV_OBJ: case FN_GOTO_NEXT_OBJ: { - BOOL bSuccess = rSh.GotoObj( - nSlot == FN_GOTO_NEXT_OBJ ? TRUE : FALSE); + sal_Bool bSuccess = rSh.GotoObj( + nSlot == FN_GOTO_NEXT_OBJ ? sal_True : sal_False); rReq.SetReturnValue(SfxBoolItem(nSlot, bSuccess)); if (bSuccess && !rSh.IsSelFrmMode()) { @@ -711,14 +714,14 @@ void SwBaseShell::Execute(SfxRequest &rReq) case SID_GALLERY_FORMATS: { const int nSelType = rSh.GetSelectionType(); - if(SFX_ITEM_SET == pArgs->GetItemState( nSlot, TRUE, &pItem)) + if(SFX_ITEM_SET == pArgs->GetItemState( nSlot, sal_True, &pItem)) { GalleryExplorer* pGal = 0; if ( (!rSh.IsSelFrmMode() || nSelType & nsSelectionType::SEL_GRF) && 0!= (pGal = SVX_GALLERY())&& 0 != (SGA_FORMAT_GRAPHIC & ((SfxUInt32Item*)pItem)->GetValue())) { - SwWait aWait( *rView.GetDocShell(), TRUE ); + SwWait aWait( *rView.GetDocShell(), sal_True ); String aGrfName, aFltName; const Graphic aGrf( pGal->GetGraphic() ); @@ -750,19 +753,19 @@ void SwBaseShell::Execute(SfxRequest &rReq) if (pArgs) { // aktuellen PageDescriptor ermitteln und damit den Set fuellen - const USHORT nCurIdx = rSh.GetCurPageDesc(); + const sal_uInt16 nCurIdx = rSh.GetCurPageDesc(); SwPageDesc aPageDesc(rSh.GetPageDesc(nCurIdx)); SwFrmFmt &rFmt = aPageDesc.GetMaster(); SwFmtCol aFmtCol = rFmt.GetCol(); - USHORT nCount; + sal_uInt16 nCount; if(SFX_ITEM_SET == pArgs->GetItemState(nSlot)) nCount = ((SfxUInt16Item &)pArgs->Get(nSlot)).GetValue(); else nCount = ((SfxUInt16Item &)pArgs->Get(SID_ATTR_COLUMNS)).GetValue(); - USHORT nGutterWidth = DEF_GUTTER_WIDTH; + sal_uInt16 nGutterWidth = DEF_GUTTER_WIDTH; aFmtCol.Init(nCount ? nCount : 1, nGutterWidth, USHRT_MAX); aFmtCol.SetWishWidth(USHRT_MAX); @@ -773,7 +776,7 @@ void SwBaseShell::Execute(SfxRequest &rReq) rSh.ChgPageDesc(nCurIdx, aPageDesc); } else - GetView().GetViewFrame()->GetDispatcher()->Execute(FN_FORMAT_PAGE_COLUMN_DLG, FALSE); + GetView().GetViewFrame()->GetDispatcher()->Execute(FN_FORMAT_PAGE_COLUMN_DLG, sal_False); } break; case FN_CONVERT_TABLE_TO_TEXT: @@ -789,7 +792,7 @@ void SwBaseShell::Execute(SfxRequest &rReq) SwTableAutoFmt* pTAFmt = 0; SwTableAutoFmtTbl* pAutoFmtTbl = 0; bool bDeleteFormat = true; - if(pArgs && SFX_ITEM_SET == pArgs->GetItemState( FN_PARAM_1, TRUE, &pItem)) + if(pArgs && SFX_ITEM_SET == pArgs->GetItemState( FN_PARAM_1, sal_True, &pItem)) { aInsTblOpts.mnInsMode = 0; //Delimiter @@ -797,14 +800,14 @@ void SwBaseShell::Execute(SfxRequest &rReq) if(sDelim.Len()) cDelim = sDelim.GetChar(0); //AutoFormat - if(SFX_ITEM_SET == pArgs->GetItemState( FN_PARAM_2, TRUE, &pItem)) + if(SFX_ITEM_SET == pArgs->GetItemState( FN_PARAM_2, sal_True, &pItem)) { String sAutoFmt = static_cast< const SfxStringItem* >(pItem)->GetValue(); pAutoFmtTbl = new SwTableAutoFmtTbl; pAutoFmtTbl->Load(); - for( USHORT i = 0, nCount = pAutoFmtTbl->Count(); i < nCount; i++ ) + for( sal_uInt16 i = 0, nCount = pAutoFmtTbl->Count(); i < nCount; i++ ) { SwTableAutoFmt* pFmt = (*pAutoFmtTbl)[ i ]; if( pFmt->GetName() == sAutoFmt ) @@ -816,19 +819,19 @@ void SwBaseShell::Execute(SfxRequest &rReq) } } //WithHeader - if(SFX_ITEM_SET == pArgs->GetItemState( FN_PARAM_3, TRUE, &pItem) && + if(SFX_ITEM_SET == pArgs->GetItemState( FN_PARAM_3, sal_True, &pItem) && static_cast< const SfxBoolItem* >(pItem)->GetValue()) aInsTblOpts.mnInsMode |= tabopts::HEADLINE; // RepeatHeaderLines - if(SFX_ITEM_SET == pArgs->GetItemState( FN_PARAM_4, TRUE, &pItem)) + if(SFX_ITEM_SET == pArgs->GetItemState( FN_PARAM_4, sal_True, &pItem)) aInsTblOpts.mnRowsToRepeat = - (USHORT)static_cast< const SfxInt16Item* >(pItem)->GetValue(); + (sal_uInt16)static_cast< const SfxInt16Item* >(pItem)->GetValue(); //WithBorder - if(SFX_ITEM_SET == pArgs->GetItemState( FN_PARAM_5, TRUE, &pItem) && + if(SFX_ITEM_SET == pArgs->GetItemState( FN_PARAM_5, sal_True, &pItem) && static_cast< const SfxBoolItem* >(pItem)->GetValue()) aInsTblOpts.mnInsMode |= tabopts::DEFAULT_BORDER; //DontSplitTable - if(SFX_ITEM_SET == pArgs->GetItemState( FN_PARAM_6, TRUE, &pItem) && + if(SFX_ITEM_SET == pArgs->GetItemState( FN_PARAM_6, sal_True, &pItem) && !static_cast< const SfxBoolItem* >(pItem)->GetValue() ) aInsTblOpts.mnInsMode |= tabopts::SPLIT_LAYOUT; } @@ -852,7 +855,7 @@ void SwBaseShell::Execute(SfxRequest &rReq) { //Shellwechsel! SwView& rSaveView = rView; - BOOL bInserted = FALSE; + sal_Bool bInserted = sal_False; //recording: SfxViewFrame* pViewFrame = GetView().GetViewFrame(); @@ -903,8 +906,8 @@ void SwBaseShell::Execute(SfxRequest &rReq) // oj #107754# if ( SID_STYLE_WATERCAN == nSlot ) { - const BOOL bLockedView = rSh.IsViewLocked(); - rSh.LockView( TRUE ); //lock visible section + const sal_Bool bLockedView = rSh.IsViewLocked(); + rSh.LockView( sal_True ); //lock visible section GetView().GetDocShell()->ExecStyleSheet(rReq); @@ -921,7 +924,7 @@ void SwBaseShell::Execute(SfxRequest &rReq) break; case SID_IMAP: { - USHORT nId = SvxIMapDlgChildWindow::GetChildWindowId(); + sal_uInt16 nId = SvxIMapDlgChildWindow::GetChildWindowId(); SfxViewFrame* pVFrame = GetView().GetViewFrame(); pVFrame->ToggleChildWindow( nId ); @@ -950,7 +953,7 @@ void SwBaseShell::Execute(SfxRequest &rReq) break; case SID_CONTOUR_DLG: { - USHORT nId = SvxContourDlgChildWindow::GetChildWindowId(); + sal_uInt16 nId = SvxContourDlgChildWindow::GetChildWindowId(); SfxViewFrame* pVFrame = GetView().GetViewFrame(); pVFrame->ToggleChildWindow( nId ); @@ -980,7 +983,7 @@ void SwBaseShell::Execute(SfxRequest &rReq) SwFmtSurround aSur( (SwFmtSurround&)aSet.Get( RES_SURROUND ) ); if ( !aSur.IsContour() ) { - aSur.SetContour( TRUE ); + aSur.SetContour( sal_True ); if ( aSur.GetSurround() == SURROUND_NONE ) aSur.SetSurround( SURROUND_PARALLEL ); aSet.Put( aSur ); @@ -1033,7 +1036,15 @@ void SwBaseShell::Execute(SfxRequest &rReq) rSh.SetFlyFrmAttr(aSet); } - USHORT nHtmlMode = ::GetHtmlMode(GetView().GetDocShell()); + // if new anchor is 'as char' and it is a Math object and the usual + // pre-conditions are met then align the formula to the baseline of the text + const uno::Reference < embed::XEmbeddedObject > xObj( rSh.GetOleRef() ); + const bool bDoMathBaselineAlignment = xObj.is() && SotExchange::IsMath( xObj->getClassID() ) + && FLY_AS_CHAR == eSet && rSh.GetDoc()->get( IDocumentSettingAccess::MATH_BASELINE_ALIGNMENT ); + if (bDoMathBaselineAlignment) + rSh.AlignFormulaToBaseline( xObj ); + + sal_uInt16 nHtmlMode = ::GetHtmlMode(GetView().GetDocShell()); if( nHtmlMode ) { SfxItemSet aSet(GetPool(), RES_SURROUND, RES_HORI_ORIENT); @@ -1115,10 +1126,10 @@ void SwBaseShell::Execute(SfxRequest &rReq) { if( rSh.GetLinkManager().GetLinks().Count() ) { - BOOL bUpdateGrf = FALSE, bCallErrHdl = FALSE; + sal_Bool bUpdateGrf = sal_False, bCallErrHdl = sal_False; rSh.EnterStdMode(); rSh.StartAllAction(); - rSh.GetLinkManager().UpdateAllLinks( FALSE, bCallErrHdl, bUpdateGrf ); + rSh.GetLinkManager().UpdateAllLinks( sal_False, bCallErrHdl, bUpdateGrf ); rSh.EndAllAction(); } } @@ -1126,11 +1137,11 @@ void SwBaseShell::Execute(SfxRequest &rReq) case FN_XFORMS_DESIGN_MODE: if( pArgs != NULL - && pArgs->GetItemState( nSlot, TRUE, &pItem ) == SFX_ITEM_SET + && pArgs->GetItemState( nSlot, sal_True, &pItem ) == SFX_ITEM_SET && pItem != NULL && pItem->ISA( SfxBoolItem ) ) { - BOOL bDesignMode = + sal_Bool bDesignMode = static_cast<const SfxBoolItem*>( pItem )->GetValue(); // set form design mode @@ -1148,12 +1159,12 @@ void SwBaseShell::Execute(SfxRequest &rReq) break; default: - bMore = TRUE; + bMore = sal_True; } if(bMore && pArgs) { pItem = 0; - pArgs->GetItemState(GetPool().GetWhich(nSlot), FALSE, &pItem); + pArgs->GetItemState(GetPool().GetWhich(nSlot), sal_False, &pItem); if(pItem) switch(nSlot) { @@ -1176,7 +1187,7 @@ void SwBaseShell::Execute(SfxRequest &rReq) else if ( rSh.IsFrmSelected() ) { // Umrandungsattribute ueber Frame-Manager setzen - SwFlyFrmAttrMgr aMgr( FALSE, &rSh, FRMMGR_TYPE_NONE ); + SwFlyFrmAttrMgr aMgr( sal_False, &rSh, FRMMGR_TYPE_NONE ); aMgr.SetAttrSet( *pArgs ); aMgr.UpdateFlyFrm(); } @@ -1208,7 +1219,7 @@ void SwBaseShell::Execute(SfxRequest &rReq) else if ( rSh.IsFrmSelected() ) { // Umrandungsattribute ueber Frame-Manager setzen - SwFlyFrmAttrMgr aMgr( FALSE, &rSh, FRMMGR_TYPE_NONE ); + SwFlyFrmAttrMgr aMgr( sal_False, &rSh, FRMMGR_TYPE_NONE ); aMgr.SetAttrSet(*pArgs); aMgr.UpdateFlyFrm(); } @@ -1232,25 +1243,25 @@ void SwBaseShell::Execute(SfxRequest &rReq) * --------------------------------------------------*/ IMPL_LINK(SwBaseShell, GraphicArrivedHdl, SwCrsrShell* , EMPTYARG ) { - USHORT nGrfType; + sal_uInt16 nGrfType; SwWrtShell &rSh = GetShell(); if( CNT_GRF == rSh.SwEditShell::GetCntType() && GRAPHIC_NONE != ( nGrfType = rSh.GetGraphicType() ) && aGrfUpdateSlots.Count() ) { - BOOL bProtect = 0 != rSh.IsSelObjProtected(FLYPROTECT_CONTENT|FLYPROTECT_PARENT); + sal_Bool bProtect = 0 != rSh.IsSelObjProtected(FLYPROTECT_CONTENT|FLYPROTECT_PARENT); SfxViewFrame* pVFrame = GetView().GetViewFrame(); - USHORT nSlot; - for( USHORT n = 0; n < aGrfUpdateSlots.Count(); ++n ) + sal_uInt16 nSlot; + for( sal_uInt16 n = 0; n < aGrfUpdateSlots.Count(); ++n ) { - BOOL bSetState = FALSE; - BOOL bState = FALSE; + sal_Bool bSetState = sal_False; + sal_Bool bState = sal_False; switch( nSlot = aGrfUpdateSlots[ n ] ) { case SID_IMAP: case SID_IMAP_EXEC: { - USHORT nId = SvxIMapDlgChildWindow::GetChildWindowId(); + sal_uInt16 nId = SvxIMapDlgChildWindow::GetChildWindowId(); SvxIMapDlg *pDlg = pVFrame->HasChildWindow( nId ) ? (SvxIMapDlg*) ( pVFrame->GetChildWindow( nId ) ->GetWindow()) : 0; @@ -1261,14 +1272,14 @@ IMPL_LINK(SwBaseShell, GraphicArrivedHdl, SwCrsrShell* , EMPTYARG ) lcl_UpdateIMapDlg( rSh ); if( !bProtect && SID_IMAP == nSlot ) - bSetState = TRUE, bState = 0 != pDlg; + bSetState = sal_True, bState = 0 != pDlg; } break; case SID_CONTOUR_DLG: if( !bProtect ) { - USHORT nId = SvxContourDlgChildWindow::GetChildWindowId(); + sal_uInt16 nId = SvxContourDlgChildWindow::GetChildWindowId(); SvxIMapDlg *pDlg = pVFrame->HasChildWindow( nId ) ? (SvxIMapDlg*) ( pVFrame->GetChildWindow( nId ) ->GetWindow()) : 0; @@ -1276,7 +1287,7 @@ IMPL_LINK(SwBaseShell, GraphicArrivedHdl, SwCrsrShell* , EMPTYARG ) rSh.GetIMapInventor() ) lcl_UpdateContourDlg( rSh, nsSelectionType::SEL_GRF ); - bSetState = TRUE; + bSetState = sal_True; bState = 0 != pDlg; } break; @@ -1287,7 +1298,7 @@ IMPL_LINK(SwBaseShell, GraphicArrivedHdl, SwCrsrShell* , EMPTYARG ) SfxItemSet aSet(GetPool(), RES_SURROUND, RES_SURROUND); rSh.GetFlyFrmAttr(aSet); const SwFmtSurround& rWrap = (const SwFmtSurround&)aSet.Get(RES_SURROUND); - bSetState = TRUE; + bSetState = sal_True; bState = rWrap.IsContour(); } break; @@ -1327,7 +1338,7 @@ void SwBaseShell::GetState( SfxItemSet &rSet ) SwWrtShell &rSh = GetShell(); SfxViewFrame* pVFrame = GetView().GetViewFrame(); SfxWhichIter aIter( rSet ); - USHORT nWhich = aIter.FirstWhich(); + sal_uInt16 nWhich = aIter.FirstWhich(); pGetStateSet = &rSet; while ( nWhich ) { @@ -1341,7 +1352,7 @@ void SwBaseShell::GetState( SfxItemSet &rSet ) break; case SID_GALLERY_ENABLE_ADDCOPY: // #108230# allow copy from gallery in Writer AND Writer/Web! - rSet.Put( SfxBoolItem( SID_GALLERY_ENABLE_ADDCOPY, TRUE ) ); + rSet.Put( SfxBoolItem( SID_GALLERY_ENABLE_ADDCOPY, sal_True ) ); break; case FN_EDIT_REGION: if( !rSh.IsAnySectionInDoc() ) @@ -1355,7 +1366,7 @@ void SwBaseShell::GetState( SfxItemSet &rSet ) break; case FN_CONVERT_TABLE_TO_TEXT: { - USHORT eFrmType = rSh.GetFrmType(0,TRUE); + sal_uInt16 eFrmType = rSh.GetFrmType(0,sal_True); if( (eFrmType & FRMTYPE_FOOTNOTE) || !rSh.GetTableFmt() ) rSet.DisableItem( nWhich ); @@ -1363,7 +1374,7 @@ void SwBaseShell::GetState( SfxItemSet &rSet ) break; case FN_CONVERT_TEXT_TO_TABLE: { - USHORT eFrmType = rSh.GetFrmType(0,TRUE); + sal_uInt16 eFrmType = rSh.GetFrmType(0,sal_True); if( (eFrmType & FRMTYPE_FOOTNOTE) || !rSh.IsTextToTableAvailable() ) rSet.DisableItem( nWhich ); @@ -1371,7 +1382,7 @@ void SwBaseShell::GetState( SfxItemSet &rSet ) break; case FN_CONVERT_TEXT_TABLE: { - USHORT eFrmType = rSh.GetFrmType(0,TRUE); + sal_uInt16 eFrmType = rSh.GetFrmType(0,sal_True); if( (eFrmType & FRMTYPE_FOOTNOTE) || (!rSh.GetTableFmt() && !rSh.IsTextToTableAvailable() ) ) rSet.DisableItem( nWhich ); @@ -1386,11 +1397,11 @@ void SwBaseShell::GetState( SfxItemSet &rSet ) if ( rSh.IsTableMode() ) { SwFrmFmt *pFmt = rSh.GetTableFmt(); - aSet.Put(pFmt->GetFmtAttr( nWhich, TRUE )); + aSet.Put(pFmt->GetFmtAttr( nWhich, sal_True )); } else if( rSh.IsFrmSelected() ) { - SwFlyFrmAttrMgr aMgr( FALSE, &rSh, FRMMGR_TYPE_NONE ); + SwFlyFrmAttrMgr aMgr( sal_False, &rSh, FRMMGR_TYPE_NONE ); aSet.Put( aMgr.GetAttrSet() ); } else @@ -1409,17 +1420,17 @@ void SwBaseShell::GetState( SfxItemSet &rSet ) // --> OD 2006-11-08 #i59688# // improve efficiency: // If selected object is protected, item has to disabled. - const BOOL bProtect = 0 != rSh.IsSelObjProtected(FLYPROTECT_CONTENT|FLYPROTECT_PARENT); + const sal_Bool bProtect = 0 != rSh.IsSelObjProtected(FLYPROTECT_CONTENT|FLYPROTECT_PARENT); if ( bProtect ) { rSet.DisableItem( nWhich ); } else { - const USHORT nId = SvxIMapDlgChildWindow::GetChildWindowId(); - const BOOL bHas = pVFrame->HasChildWindow( nId ); - const BOOL bFrmSel = rSh.IsFrmSelected(); - const BOOL bIsGraphicSelection = + const sal_uInt16 nId = SvxIMapDlgChildWindow::GetChildWindowId(); + const sal_Bool bHas = pVFrame->HasChildWindow( nId ); + const sal_Bool bFrmSel = rSh.IsFrmSelected(); + const sal_Bool bIsGraphicSelection = rSh.GetSelectionType() == nsSelectionType::SEL_GRF; // --> OD 2006-11-08 #i59688# @@ -1428,10 +1439,10 @@ void SwBaseShell::GetState( SfxItemSet &rSet ) //wenn die Grafik ausgeswappt ist, dann muss der //Status asynchron ermittelt werden //bis dahin wird der Slot disabled - if ( bHas && bIsGraphicSelection && rSh.IsGrfSwapOut( TRUE ) ) + if ( bHas && bIsGraphicSelection && rSh.IsGrfSwapOut( sal_True ) ) { if( AddGrfUpdateSlot( nWhich )) - rSh.GetGraphic(FALSE); // start the loading + rSh.GetGraphic(sal_False); // start the loading } else { @@ -1457,17 +1468,17 @@ void SwBaseShell::GetState( SfxItemSet &rSet ) break; case SID_IMAP_EXEC: { - BOOL bDisable = FALSE; + sal_Bool bDisable = sal_False; if( !rSh.IsFrmSelected()) - bDisable = TRUE; - USHORT nId = SvxIMapDlgChildWindow::GetChildWindowId(); + bDisable = sal_True; + sal_uInt16 nId = SvxIMapDlgChildWindow::GetChildWindowId(); if(!bDisable && pVFrame->HasChildWindow( nId )) { if(rSh.GetSelectionType() == nsSelectionType::SEL_GRF - && rSh.IsGrfSwapOut(TRUE)) + && rSh.IsGrfSwapOut(sal_True)) { if( AddGrfUpdateSlot( nWhich )) - rSh.GetGraphic(FALSE); // start the loading + rSh.GetGraphic(sal_False); // start the loading } else { @@ -1486,21 +1497,21 @@ void SwBaseShell::GetState( SfxItemSet &rSet ) break; case SID_CONTOUR_DLG: { - BOOL bParentCntProt = 0 != rSh.IsSelObjProtected(FLYPROTECT_CONTENT|FLYPROTECT_PARENT ); + sal_Bool bParentCntProt = 0 != rSh.IsSelObjProtected(FLYPROTECT_CONTENT|FLYPROTECT_PARENT ); if( bParentCntProt || 0 != (HTMLMODE_ON & ::GetHtmlMode( GetView().GetDocShell() )) ) rSet.DisableItem( nWhich ); else { - USHORT nId = SvxContourDlgChildWindow::GetChildWindowId(); - BOOL bHas = GetView().GetViewFrame()->HasChildWindow( nId ); + sal_uInt16 nId = SvxContourDlgChildWindow::GetChildWindowId(); + sal_Bool bHas = GetView().GetViewFrame()->HasChildWindow( nId ); int nSel = rSh.GetSelectionType(); - BOOL bOk = 0 != (nSel & (nsSelectionType::SEL_GRF|nsSelectionType::SEL_OLE)); + sal_Bool bOk = 0 != (nSel & (nsSelectionType::SEL_GRF|nsSelectionType::SEL_OLE)); - BOOL bDisable = FALSE; + sal_Bool bDisable = sal_False; if( !bHas && !bOk ) - bDisable = TRUE; + bDisable = sal_True; // --> OD 2006-11-08 #i59688# // avoid unnecessary loading of selected graphic. // The graphic is only needed, if the dialog is open. @@ -1508,12 +1519,12 @@ void SwBaseShell::GetState( SfxItemSet &rSet ) // asynchron ermittelt werden bis dahin wird der Slot // disabled else if ( bHas && (nSel & nsSelectionType::SEL_GRF) && - rSh.IsGrfSwapOut(TRUE) ) + rSh.IsGrfSwapOut(sal_True) ) { if( AddGrfUpdateSlot( nWhich )) - rSh.GetGraphic(FALSE); // start the loading + rSh.GetGraphic(sal_False); // start the loading // --> OD 2007-07-04 #i75481# - bDisable = TRUE; + bDisable = sal_True; // <-- } else if( bHas && bOk ) @@ -1539,16 +1550,16 @@ void SwBaseShell::GetState( SfxItemSet &rSet ) break; case SID_CONTOUR_EXEC: { - BOOL bDisable = FALSE; + sal_Bool bDisable = sal_False; int nSel = rSh.GetSelectionType(); if( !(nSel & (nsSelectionType::SEL_GRF|nsSelectionType::SEL_OLE)) ) - bDisable = TRUE; - USHORT nId = SvxContourDlgChildWindow::GetChildWindowId(); + bDisable = sal_True; + sal_uInt16 nId = SvxContourDlgChildWindow::GetChildWindowId(); if( !bDisable && GetView().GetViewFrame()->HasChildWindow( nId )) { SvxContourDlg *pDlg = SWCONTOURDLG(GetView()); if( pDlg->GetEditingObject() != rSh.GetIMapInventor() ) - bDisable = TRUE; + bDisable = sal_True; } rSet.Put(SfxBoolItem(nWhich, bDisable)); } @@ -1561,8 +1572,8 @@ void SwBaseShell::GetState( SfxItemSet &rSet ) case FN_TOOL_ANKER_AT_CHAR: case FN_TOOL_ANKER_FRAME: { - BOOL bObj = 0 != rSh.IsObjSelected(); - BOOL bParentCntProt = rSh.IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT ) != 0; + sal_Bool bObj = 0 != rSh.IsObjSelected(); + sal_Bool bParentCntProt = rSh.IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT ) != 0; if( !bParentCntProt && (bObj || rSh.IsFrmSelected())) { @@ -1572,7 +1583,7 @@ void SwBaseShell::GetState( SfxItemSet &rSet ) else rSh.GetFlyFrmAttr(aSet); RndStdIds eSet = ((SwFmtAnchor&)aSet.Get(RES_ANCHOR)).GetAnchorId(); - const BOOL bSet = + const sal_Bool bSet = ((nWhich == FN_TOOL_ANKER_PAGE) && (eSet == FLY_AT_PAGE)) || ((nWhich == FN_TOOL_ANKER_PARAGRAPH) && @@ -1585,7 +1596,7 @@ void SwBaseShell::GetState( SfxItemSet &rSet ) (eSet == FLY_AS_CHAR)); if(nWhich != FN_TOOL_ANKER) { - USHORT nHtmlMode = ::GetHtmlMode(GetView().GetDocShell()); + sal_uInt16 nHtmlMode = ::GetHtmlMode(GetView().GetDocShell()); if( ( nWhich == FN_TOOL_ANKER_PAGE && ((HTMLMODE_ON & nHtmlMode) && (0 == (nHtmlMode & HTMLMODE_SOME_ABS_POS)))) || ( nWhich == FN_TOOL_ANKER_FRAME && !rSh.IsFlyInFly() ) ) @@ -1595,7 +1606,7 @@ void SwBaseShell::GetState( SfxItemSet &rSet ) } else { - USHORT nSlotId = 0; + sal_uInt16 nSlotId = 0; switch (eSet) { @@ -1634,8 +1645,8 @@ void SwBaseShell::GetState( SfxItemSet &rSet ) case FN_FRAME_WRAP_LEFT: case FN_FRAME_WRAP_RIGHT: { - BOOL bObj = 0 != rSh.IsObjSelected(); - BOOL bParentCntProt = rSh.IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT ) != 0; + sal_Bool bObj = 0 != rSh.IsObjSelected(); + sal_Bool bParentCntProt = rSh.IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT ) != 0; if( !bParentCntProt && (bObj || rSh.IsFrmSelected())) { @@ -1654,9 +1665,9 @@ void SwBaseShell::GetState( SfxItemSet &rSet ) const SwFmtSurround& rWrap = (const SwFmtSurround&)aSet.Get(RES_SURROUND); const SvxOpaqueItem& rOpaque = (const SvxOpaqueItem&)aSet.Get(RES_OPAQUE); - BOOL bOpaque = rOpaque.GetValue(); + sal_Bool bOpaque = rOpaque.GetValue(); SwSurround nSurround = rWrap.GetSurround(); - BOOL bSet = FALSE; + sal_Bool bSet = sal_False; bool bDisable = (nAnchorType == - 1) || (nAnchorType == FLY_AS_CHAR); @@ -1706,10 +1717,10 @@ void SwBaseShell::GetState( SfxItemSet &rSet ) { int nSel = rSh.GetSelectionType(); if( (nSel & nsSelectionType::SEL_GRF) && - rSh.IsGrfSwapOut(TRUE)) + rSh.IsGrfSwapOut(sal_True)) { if( AddGrfUpdateSlot( nWhich )) - rSh.GetGraphic(FALSE); // start the loading + rSh.GetGraphic(sal_False); // start the loading } else if( rSh.IsFrmSelected() ) { @@ -1719,7 +1730,7 @@ void SwBaseShell::GetState( SfxItemSet &rSet ) GRAPHIC_NONE == rSh.GetIMapGraphic().GetType(); } } - bSet = bDisable ? FALSE : rWrap.IsContour(); + bSet = bDisable ? sal_False : rWrap.IsContour(); break; case FN_WRAP_ANCHOR_ONLY: @@ -1775,7 +1786,7 @@ void SwBaseShell::GetState( SfxItemSet &rSet ) void SwBaseShell::StateDisableItems( SfxItemSet &rSet ) { SfxWhichIter aIter(rSet); - USHORT nWhich = aIter.FirstWhich(); + sal_uInt16 nWhich = aIter.FirstWhich(); while (nWhich) { @@ -1789,7 +1800,7 @@ void SwBaseShell::StateDisableItems( SfxItemSet &rSet ) --------------------------------------------------------------------*/ void SwBaseShell::StateStyle( SfxItemSet &rSet ) { - BOOL bParentCntProt = GetShell().IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT ) != 0; + sal_Bool bParentCntProt = GetShell().IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT ) != 0; ShellModes eMode = GetView().GetShellMode(); if ( bParentCntProt || @@ -1800,7 +1811,7 @@ void SwBaseShell::StateStyle( SfxItemSet &rSet ) SHELL_MODE_BEZIER == eMode ) { SfxWhichIter aIter( rSet ); - USHORT nWhich = aIter.FirstWhich(); + sal_uInt16 nWhich = aIter.FirstWhich(); while ( nWhich ) { rSet.DisableItem( nWhich ); @@ -1811,10 +1822,10 @@ void SwBaseShell::StateStyle( SfxItemSet &rSet ) GetView().GetDocShell()->StateStyleSheet(rSet, &GetShell()); } -void SwBaseShell::SetWrapMode( USHORT nSlot ) +void SwBaseShell::SetWrapMode( sal_uInt16 nSlot ) { SwWrtShell &rSh = GetShell(); - BOOL bObj = 0 != rSh.IsObjSelected(); + sal_Bool bObj = 0 != rSh.IsObjSelected(); if( bObj || rSh.IsFrmSelected()) { SfxItemSet aSet(GetPool(), RES_OPAQUE, RES_SURROUND); @@ -1831,7 +1842,7 @@ void SwBaseShell::SetWrapMode( USHORT nSlot ) case FN_FRAME_NOWRAP: nSurround = SURROUND_NONE; if (aWrap.IsContour()) - aWrap.SetContour(FALSE); + aWrap.SetContour(sal_False); break; case FN_FRAME_WRAP_IDEAL: nSurround = SURROUND_IDEAL; @@ -1855,7 +1866,7 @@ void SwBaseShell::SetWrapMode( USHORT nSlot ) break; case FN_FRAME_WRAPTHRU_TRANSP: if (aWrap.IsContour()) - aWrap.SetContour(FALSE); + aWrap.SetContour(sal_False); // kein break!!! case FN_FRAME_WRAPTHRU: nSurround = SURROUND_THROUGHT; @@ -1880,7 +1891,7 @@ void SwBaseShell::SetWrapMode( USHORT nSlot ) if (bObj && nOldSurround != nSurround && (nOldSurround == SURROUND_NONE || nOldSurround == SURROUND_THROUGHT)) { - aWrap.SetContour(TRUE); + aWrap.SetContour(sal_True); } } @@ -1917,7 +1928,7 @@ void SwBaseShell::SetFrmMode(FlyMode eMode, SwWrtShell *pSh ) } else if( eMode == FLY_DRAG_END ) { - static USHORT const aInval[] = + static sal_uInt16 aInval[] = { SID_ATTR_POSITION, SID_ATTR_SIZE, 0 }; @@ -1958,10 +1969,10 @@ void SwBaseShell::ExecTxtCtrl( SfxRequest& rReq ) { SwWrtShell &rSh = GetShell(); SvxScriptSetItem* pSSetItem = 0; - USHORT nSlot = rReq.GetSlot(); + sal_uInt16 nSlot = rReq.GetSlot(); SfxItemPool& rPool = rSh.GetAttrPool(); - USHORT nWhich = rPool.GetWhich( nSlot ); - USHORT nScripts = SCRIPTTYPE_LATIN | SCRIPTTYPE_ASIAN | SCRIPTTYPE_COMPLEX; + sal_uInt16 nWhich = rPool.GetWhich( nSlot ); + sal_uInt16 nScripts = SCRIPTTYPE_LATIN | SCRIPTTYPE_ASIAN | SCRIPTTYPE_COMPLEX; SfxItemSet aHeightSet( GetPool(), RES_CHRATR_FONTSIZE, RES_CHRATR_FONTSIZE, RES_CHRATR_CJK_FONTSIZE, RES_CHRATR_CJK_FONTSIZE, RES_CHRATR_CTL_FONTSIZE, RES_CHRATR_CTL_FONTSIZE, @@ -2003,7 +2014,7 @@ void SwBaseShell::ExecTxtCtrl( SfxRequest& rReq ) LanguageType nInputLang = GetView().GetEditWin().GetInputLanguage(); if(nInputLang != LANGUAGE_DONTKNOW && nInputLang != LANGUAGE_SYSTEM) nScripts = SvtLanguageOptions::GetScriptTypeOfLanguage( nInputLang ); - UINT32 nHeight = static_cast< const SvxFontHeightItem& >(pArgs->Get( nWhich )).GetHeight(); + sal_uInt32 nHeight = static_cast< const SvxFontHeightItem& >(pArgs->Get( nWhich )).GetHeight(); SwStdFontConfig* pStdFont = SW_MOD()->GetStdFontConfig(); SfxItemSet aLangSet( GetPool(), RES_CHRATR_LANGUAGE, RES_CHRATR_LANGUAGE, @@ -2040,9 +2051,9 @@ void SwBaseShell::ExecTxtCtrl( SfxRequest& rReq ) nCTLSize = (sal_Int32) nHeight; break; } - aHeightSet.Put( SvxFontHeightItem( (UINT32)nWesternSize, 100, RES_CHRATR_FONTSIZE )); - aHeightSet.Put( SvxFontHeightItem( (UINT32)nCJKSize, 100, RES_CHRATR_CJK_FONTSIZE )); - aHeightSet.Put( SvxFontHeightItem( (UINT32)nCTLSize, 100, RES_CHRATR_CTL_FONTSIZE )); + aHeightSet.Put( SvxFontHeightItem( (sal_uInt32)nWesternSize, 100, RES_CHRATR_FONTSIZE )); + aHeightSet.Put( SvxFontHeightItem( (sal_uInt32)nCJKSize, 100, RES_CHRATR_CJK_FONTSIZE )); + aHeightSet.Put( SvxFontHeightItem( (sal_uInt32)nCTLSize, 100, RES_CHRATR_CTL_FONTSIZE )); pArgs = &aHeightSet; } } @@ -2071,7 +2082,7 @@ void SwBaseShell::ExecTxtCtrl( SfxRequest& rReq ) delete pSSetItem; } else - GetView().GetViewFrame()->GetDispatcher()->Execute( SID_CHAR_DLG, FALSE); + GetView().GetViewFrame()->GetDispatcher()->Execute( SID_CHAR_DLG, sal_False); rReq.Done(); } @@ -2084,11 +2095,11 @@ void SwBaseShell::GetTxtCtrlState( SfxItemSet& rSet ) void SwBaseShell::GetTxtFontCtrlState( SfxItemSet& rSet ) { SwWrtShell &rSh = GetShell(); - BOOL bFirst = TRUE; + sal_Bool bFirst = sal_True; SfxItemSet* pFntCoreSet = 0; - USHORT nScriptType = SCRIPTTYPE_LATIN; + sal_uInt16 nScriptType = SCRIPTTYPE_LATIN; SfxWhichIter aIter( rSet ); - USHORT nWhich = aIter.FirstWhich(); + sal_uInt16 nWhich = aIter.FirstWhich(); while( nWhich ) { switch( nWhich ) @@ -2121,7 +2132,7 @@ void SwBaseShell::GetTxtFontCtrlState( SfxItemSet& rSet ) } SfxItemPool& rPool = *rSet.GetPool(); SvxScriptSetItem aSetItem( rPool.GetSlotId( nWhich ), rPool ); - aSetItem.GetItemSet().Put( *pFntCoreSet, FALSE ); + aSetItem.GetItemSet().Put( *pFntCoreSet, sal_False ); const SfxPoolItem* pI = aSetItem.GetItemOfScript( nScriptType ); if( pI ) rSet.Put( *pI, nWhich ); @@ -2140,7 +2151,7 @@ void SwBaseShell::GetTxtFontCtrlState( SfxItemSet& rSet ) aFont.SetCharSet(((const SvxFontItem*)pI)->GetCharSet()); } - BOOL bVertical = rSh.IsInVerticalText(); + sal_Bool bVertical = rSh.IsInVerticalText(); aFont.SetOrientation(bVertical ? 2700 : 0); aFont.SetVertical(bVertical); GetView().GetEditWin().SetInputContext( InputContext( aFont, INPUTCONTEXT_TEXT | @@ -2153,7 +2164,7 @@ void SwBaseShell::GetTxtFontCtrlState( SfxItemSet& rSet ) if( bFirst ) { rSh.GetCurAttr( rSet ); - bFirst = FALSE; + bFirst = sal_False; } } nWhich = aIter.NextWhich(); @@ -2165,7 +2176,7 @@ void SwBaseShell::GetBckColState(SfxItemSet &rSet) { SwWrtShell &rSh = GetShell(); SfxWhichIter aIter( rSet ); - USHORT nWhich = aIter.FirstWhich(); + sal_uInt16 nWhich = aIter.FirstWhich(); int nSelType = rSh.GetSelectionType(); if( nSelType & nsSelectionType::SEL_OLE ) @@ -2176,7 +2187,7 @@ void SwBaseShell::GetBckColState(SfxItemSet &rSet) if ( nSelType & nsSelectionType::SEL_FRM ) { - BOOL bParentCntProt = rSh.IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT ) != 0; + sal_Bool bParentCntProt = rSh.IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT ) != 0; if (bParentCntProt) { rSet.DisableItem( SID_BACKGROUND_COLOR ); @@ -2227,7 +2238,7 @@ void SwBaseShell::ExecBckCol(SfxRequest& rReq) } const SfxItemSet* pArgs = rReq.GetArgs(); - USHORT nSlot = rReq.GetSlot(); + sal_uInt16 nSlot = rReq.GetSlot(); if( !pArgs && nSlot != SID_BACKGROUND_COLOR) return ; @@ -2321,8 +2332,8 @@ void SwBaseShell::GetBorderState(SfxItemSet &rSet) { SwWrtShell &rSh = GetShell(); // Tabellenzelle(n) selektiert? - BOOL bPrepare = TRUE; - BOOL bTableMode = rSh.IsTableMode(); + sal_Bool bPrepare = sal_True; + sal_Bool bTableMode = rSh.IsTableMode(); if ( bTableMode ) { SfxItemSet aCoreSet( GetPool(), @@ -2335,9 +2346,9 @@ void SwBaseShell::GetBorderState(SfxItemSet &rSet) } else if ( rSh.IsFrmSelected() ) { - SwFlyFrmAttrMgr aMgr( FALSE, &rSh, FRMMGR_TYPE_NONE ); + SwFlyFrmAttrMgr aMgr( sal_False, &rSh, FRMMGR_TYPE_NONE ); rSet.Put( aMgr.GetAttrSet() ); - bPrepare = FALSE; + bPrepare = sal_False; } else // Umrandungsattribute ganz normal ueber Shell holen @@ -2353,15 +2364,15 @@ void SwBaseShell::ExecDlg(SfxRequest &rReq) SwWrtShell &rSh = GetShell(); Window *pMDI = &GetView().GetViewFrame()->GetWindow(); //Damit aus dem Basic keine Dialoge fuer Hintergrund-Views aufgerufen werden: - BOOL bBackground = (&GetView() != GetActiveView()); + sal_Bool bBackground = (&GetView() != GetActiveView()); const SfxPoolItem* pItem = 0; const SfxItemSet* pArgs = rReq.GetArgs(); - USHORT nSlot = rReq.GetSlot(); + sal_uInt16 nSlot = rReq.GetSlot(); const SfxItemSet* pOutSet = 0; bool bDone = false; if(pArgs) - pArgs->GetItemState( GetPool().GetWhich(nSlot), FALSE, &pItem ); + pArgs->GetItemState( GetPool().GetWhich(nSlot), sal_False, &pItem ); switch ( nSlot ) { @@ -2378,7 +2389,7 @@ void SwBaseShell::ExecDlg(SfxRequest &rReq) { if( !bBackground ) { - const USHORT nCurIdx = rSh.GetCurPageDesc(); + const sal_uInt16 nCurIdx = rSh.GetCurPageDesc(); const SwPageDesc& rPageDesc = rSh.GetPageDesc( nCurIdx ); //temp. View, weil die Shell nach dem Dialog nicht mehr gueltig sein muss //z.B. Kopfzeile ausschalten @@ -2417,7 +2428,7 @@ void SwBaseShell::ExecDlg(SfxRequest &rReq) else if ( rSh.IsFrmSelected() ) { // Umrandungsattribute ueber Frame-Manager setzen - SwFlyFrmAttrMgr aMgr( FALSE, &rSh, FRMMGR_TYPE_NONE ); + SwFlyFrmAttrMgr aMgr( sal_False, &rSh, FRMMGR_TYPE_NONE ); aSet.Put( aMgr.GetAttrSet() ); SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); @@ -2546,11 +2557,11 @@ void SwBaseShell::InsertTable( SfxRequest& _rRequest ) const SfxItemSet* pArgs = _rRequest.GetArgs(); SwWrtShell& rSh = GetShell(); - if ( !( rSh.GetFrmType( 0, TRUE ) & FRMTYPE_FOOTNOTE ) ) + if ( !( rSh.GetFrmType( 0, sal_True ) & FRMTYPE_FOOTNOTE ) ) { SwView &rTempView = GetView(); // Da GetView() nach Shellwechsel nicht mehr geht - BOOL bHTMLMode = 0 != (::GetHtmlMode(rTempView.GetDocShell())&HTMLMODE_ON); - BOOL bCallEndUndo = FALSE; + sal_Bool bHTMLMode = 0 != (::GetHtmlMode(rTempView.GetDocShell())&HTMLMODE_ON); + sal_Bool bCallEndUndo = sal_False; if( !pArgs && rSh.IsSelection() && !rSh.IsInClickToEdit() && !rSh.IsTableMode() ) @@ -2559,9 +2570,9 @@ void SwBaseShell::InsertTable( SfxRequest& _rRequest ) SwInsertTableOptions aInsTblOpts = pModOpt->GetInsTblFlags(bHTMLMode); rSh.StartUndo(UNDO_INSTABLE); - bCallEndUndo = TRUE; + bCallEndUndo = sal_True; - BOOL bInserted = rSh.TextToTable( aInsTblOpts, '\t', text::HoriOrientation::FULL ); + sal_Bool bInserted = rSh.TextToTable( aInsTblOpts, '\t', text::HoriOrientation::FULL ); rSh.EnterStdMode(); if (bInserted) rTempView.AutoCaption(TABLE_CAP); @@ -2569,8 +2580,8 @@ void SwBaseShell::InsertTable( SfxRequest& _rRequest ) } else { - USHORT nCols = 0; - USHORT nRows = 0; + sal_uInt16 nCols = 0; + sal_uInt16 nRows = 0; SwInsertTableOptions aInsTblOpts( tabopts::ALL_TBL_INS_ATTR, 1 ); String aTableName, aAutoName; SwTableAutoFmt* pTAFmt = 0; @@ -2596,7 +2607,7 @@ void SwBaseShell::InsertTable( SfxRequest& _rRequest ) { SwTableAutoFmtTbl aTableTbl; aTableTbl.Load(); - for ( USHORT n=0; n<aTableTbl.Count(); n++ ) + for ( sal_uInt16 n=0; n<aTableTbl.Count(); n++ ) { if ( aTableTbl[n]->GetName() == aAutoName ) { @@ -2608,7 +2619,7 @@ void SwBaseShell::InsertTable( SfxRequest& _rRequest ) } if ( pFlags ) - aInsTblOpts.mnInsMode = (USHORT) pFlags->GetValue(); + aInsTblOpts.mnInsMode = (sal_uInt16) pFlags->GetValue(); else { const SwModuleOptions* pModOpt = SW_MOD()->GetModuleConfig(); @@ -2643,7 +2654,7 @@ void SwBaseShell::InsertTable( SfxRequest& _rRequest ) _rRequest.Done(); rSh.StartUndo(UNDO_INSTABLE); - bCallEndUndo = TRUE; + bCallEndUndo = sal_True; rSh.StartAllAction(); if( rSh.HasSelection() ) @@ -2681,7 +2692,7 @@ void SwBaseShell::GetGalleryState( SfxItemSet &rSet ) { SwWrtShell &rSh = GetShell(); SfxWhichIter aIter( rSet ); - USHORT nWhich = aIter.FirstWhich(); + sal_uInt16 nWhich = aIter.FirstWhich(); switch ( nWhich ) { case SID_GALLERY_BG_BRUSH: @@ -2692,11 +2703,11 @@ void SwBaseShell::GetGalleryState( SfxItemSet &rSet ) nParagraphPos = nGraphicPos = nOlePos = nFramePos = nTablePos = nTableRowPos = nTableCellPos = nPagePos = nHeaderPos = nFooterPos = 0; - BYTE nPos = 1; + sal_uInt8 nPos = 1; pLst->Insert( (void*) new SW_RESSTR( STR_SWBG_PAGE ), pLst->Count() ); nPagePos = nPos++; - USHORT nHtmlMode = ::GetHtmlMode(GetView().GetDocShell()); - BOOL bHtmlMode = 0 != (nHtmlMode & HTMLMODE_ON); + sal_uInt16 nHtmlMode = ::GetHtmlMode(GetView().GetDocShell()); + sal_Bool bHtmlMode = 0 != (nHtmlMode & HTMLMODE_ON); if ( (!bHtmlMode || (nHtmlMode & HTMLMODE_FULL_STYLES)) && (nSel & nsSelectionType::SEL_TXT) ) @@ -2736,7 +2747,7 @@ void SwBaseShell::GetGalleryState( SfxItemSet &rSet ) pLst->Insert( (void*) new SW_RESSTR( STR_SWBG_OLE ), pLst->Count() ); nOlePos = nPos++; } - const USHORT nType = rSh.GetFrmType(0,TRUE); + const sal_uInt16 nType = rSh.GetFrmType(0,sal_True); if ( nType & FRMTYPE_HEADER ) { pLst->Insert( (void*) new SW_RESSTR( STR_SWBG_HEADER ), pLst->Count() ); @@ -2762,7 +2773,7 @@ void SwBaseShell::ExecuteGallery(SfxRequest &rReq) SwWrtShell &rSh = GetShell(); rSh.StartAction(); const SfxItemSet* pArgs = rReq.GetArgs(); - USHORT nSlot = rReq.GetSlot(); + sal_uInt16 nSlot = rReq.GetSlot(); switch(nSlot) { case SID_GALLERY_BG_BRUSH: @@ -2771,7 +2782,7 @@ void SwBaseShell::ExecuteGallery(SfxRequest &rReq) if ( nSel & nsSelectionType::SEL_DRW_TXT ) break; - BYTE nPos = (BYTE)((SfxUInt16Item &)pArgs->Get(SID_GALLERY_BG_POS)).GetValue(); + sal_uInt8 nPos = (sal_uInt8)((SfxUInt16Item &)pArgs->Get(SID_GALLERY_BG_POS)).GetValue(); ++nPos; SvxBrushItem aBrush( (SvxBrushItem&)pArgs->Get(SID_GALLERY_BG_BRUSH)); @@ -2792,7 +2803,7 @@ void SwBaseShell::ExecuteGallery(SfxRequest &rReq) } else if ( nPos == nPagePos || nPos == nHeaderPos || nPos == nFooterPos ) { - USHORT nDesc = rSh.GetCurPageDesc(); + sal_uInt16 nDesc = rSh.GetCurPageDesc(); SwPageDesc aDesc( rSh.GetPageDesc( nDesc ) ); if ( nPos == nPagePos ) aDesc.GetMaster().SetFmtAttr( aBrush ); @@ -2819,7 +2830,7 @@ void SwBaseShell::ExecuteGallery(SfxRequest &rReq) void SwBaseShell::ExecField( SfxRequest& rReq ) { - USHORT nSlot = rReq.GetSlot(); + sal_uInt16 nSlot = rReq.GetSlot(); switch( nSlot ) { case FN_CHANGE_DBFIELD: diff --git a/sw/source/ui/shells/beziersh.cxx b/sw/source/ui/shells/beziersh.cxx index 6e8d7a36e2..dbcd205d73 100644 --- a/sw/source/ui/shells/beziersh.cxx +++ b/sw/source/ui/shells/beziersh.cxx @@ -79,12 +79,12 @@ void SwBezierShell::Execute(SfxRequest &rReq) SwWrtShell *pSh = &GetShell(); SdrView* pSdrView = pSh->GetDrawView(); const SfxItemSet *pArgs = rReq.GetArgs(); - USHORT nSlotId = rReq.GetSlot(); - BOOL bChanged = pSdrView->GetModel()->IsChanged(); - pSdrView->GetModel()->SetChanged(FALSE); + sal_uInt16 nSlotId = rReq.GetSlot(); + sal_Bool bChanged = pSdrView->GetModel()->IsChanged(); + pSdrView->GetModel()->SetChanged(sal_False); const SfxPoolItem* pItem; if(pArgs) - pArgs->GetItemState(nSlotId, FALSE, &pItem); + pArgs->GetItemState(nSlotId, sal_False, &pItem); switch (nSlotId) { @@ -93,7 +93,7 @@ void SwBezierShell::Execute(SfxRequest &rReq) if (pSh->IsObjSelected()) { if (pSdrView->HasMarkedPoints()) - pSh->GetView().GetViewFrame()->GetDispatcher()->Execute(SID_BEZIER_DELETE, FALSE); + pSh->GetView().GetViewFrame()->GetDispatcher()->Execute(SID_BEZIER_DELETE, sal_False); else { pSh->DelSelectedObj(); @@ -130,7 +130,7 @@ void SwBezierShell::Execute(SfxRequest &rReq) case SID_BEZIER_INSERT: { GetView().GetEditWin().SetBezierMode(nSlotId); - static USHORT const aInva[] = + static sal_uInt16 aInva[] = { SID_BEZIER_INSERT, SID_BEZIER_MOVE, @@ -190,7 +190,7 @@ void SwBezierShell::Execute(SfxRequest &rReq) { pSdrView->SetMarkedPointsSmooth(eKind); - static USHORT const aInva[] = + static sal_uInt16 aInva[] = { SID_BEZIER_SMOOTH, SID_BEZIER_EDGE, @@ -226,7 +226,7 @@ void SwBezierShell::Execute(SfxRequest &rReq) if (pSdrView->GetModel()->IsChanged()) GetShell().SetModified(); else if (bChanged) - pSdrView->GetModel()->SetChanged(TRUE); + pSdrView->GetModel()->SetChanged(sal_True); } void SwBezierShell::GetState(SfxItemSet &rSet) @@ -234,7 +234,7 @@ void SwBezierShell::GetState(SfxItemSet &rSet) SdrView* pSdrView = GetShell().GetDrawView(); SfxWhichIter aIter( rSet ); - USHORT nWhich = aIter.FirstWhich(); + sal_uInt16 nWhich = aIter.FirstWhich(); while( nWhich ) { @@ -243,7 +243,7 @@ void SwBezierShell::GetState(SfxItemSet &rSet) case SID_BEZIER_MOVE: case SID_BEZIER_INSERT: { - USHORT nEditMode = GetView().GetEditWin().GetBezierMode(); + sal_uInt16 nEditMode = GetView().GetEditWin().GetBezierMode(); rSet.Put(SfxBoolItem(nWhich, nEditMode == nWhich)); } @@ -274,8 +274,8 @@ void SwBezierShell::GetState(SfxItemSet &rSet) switch (eSegm) { case SDRPATHSEGMENT_DONTCARE: rSet.InvalidateItem(SID_BEZIER_CONVERT); break; - case SDRPATHSEGMENT_LINE : rSet.Put(SfxBoolItem(SID_BEZIER_CONVERT,FALSE)); break; // Button reingedrueckt = Kurve - case SDRPATHSEGMENT_CURVE : rSet.Put(SfxBoolItem(SID_BEZIER_CONVERT,TRUE)); break; + case SDRPATHSEGMENT_LINE : rSet.Put(SfxBoolItem(SID_BEZIER_CONVERT,sal_False)); break; // Button reingedrueckt = Kurve + case SDRPATHSEGMENT_CURVE : rSet.Put(SfxBoolItem(SID_BEZIER_CONVERT,sal_True)); break; default:; //prevent warning } } @@ -289,7 +289,7 @@ void SwBezierShell::GetState(SfxItemSet &rSet) else { SdrPathSmoothKind eSmooth = pSdrView->GetMarkedPointsSmooth(); - BOOL bEnable = FALSE; + sal_Bool bEnable = sal_False; switch (eSmooth) { case SDRPATHSMOOTH_DONTCARE : @@ -319,8 +319,8 @@ void SwBezierShell::GetState(SfxItemSet &rSet) switch (eClose) { case SDROBJCLOSED_DONTCARE: rSet.InvalidateItem(SID_BEZIER_CLOSE); break; - case SDROBJCLOSED_OPEN : rSet.Put(SfxBoolItem(SID_BEZIER_CLOSE,FALSE)); break; - case SDROBJCLOSED_CLOSED : rSet.Put(SfxBoolItem(SID_BEZIER_CLOSE,TRUE)); break; + case SDROBJCLOSED_OPEN : rSet.Put(SfxBoolItem(SID_BEZIER_CLOSE,sal_False)); break; + case SDROBJCLOSED_CLOSED : rSet.Put(SfxBoolItem(SID_BEZIER_CLOSE,sal_True)); break; default:; //prevent warning } } diff --git a/sw/source/ui/shells/drawdlg.cxx b/sw/source/ui/shells/drawdlg.cxx index 021b3a9485..9e82ea68d4 100644 --- a/sw/source/ui/shells/drawdlg.cxx +++ b/sw/source/ui/shells/drawdlg.cxx @@ -54,8 +54,8 @@ void SwDrawShell::ExecDrawDlg(SfxRequest& rReq) SwWrtShell* pSh = &GetShell(); SdrView* pView = pSh->GetDrawView(); SdrModel* pDoc = pView->GetModel(); - BOOL bChanged = pDoc->IsChanged(); - pDoc->SetChanged(FALSE); + sal_Bool bChanged = pDoc->IsChanged(); + pDoc->SetChanged(sal_False); SfxItemSet aNewAttr( pDoc->GetItemPool() ); pView->GetAttributes( aNewAttr ); @@ -70,7 +70,7 @@ void SwDrawShell::ExecDrawDlg(SfxRequest& rReq) if ( pFact ) { SfxAbstractTabDialog *pDlg = pFact->CreateTextTabDialog( NULL, &aNewAttr, pView ); - USHORT nResult = pDlg->Execute(); + sal_uInt16 nResult = pDlg->Execute(); if (nResult == RET_OK) { @@ -90,7 +90,7 @@ void SwDrawShell::ExecDrawDlg(SfxRequest& rReq) case SID_ATTRIBUTES_AREA: { - BOOL bHasMarked = pView->AreObjectsMarked(); + sal_Bool bHasMarked = pView->AreObjectsMarked(); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); OSL_ENSURE(pFact, "Dialogdiet Factory fail!"); @@ -109,10 +109,10 @@ void SwDrawShell::ExecDrawDlg(SfxRequest& rReq) if (bHasMarked) pView->SetAttributes(*pDlg->GetOutputItemSet()); else - pView->SetDefaultAttr(*pDlg->GetOutputItemSet(), FALSE); + pView->SetDefaultAttr(*pDlg->GetOutputItemSet(), sal_False); pSh->EndAction(); - static USHORT const aInval[] = + static sal_uInt16 aInval[] = { SID_ATTR_FILL_STYLE, SID_ATTR_FILL_COLOR, 0 }; @@ -127,7 +127,7 @@ void SwDrawShell::ExecDrawDlg(SfxRequest& rReq) case SID_ATTRIBUTES_LINE: { - BOOL bHasMarked = pView->AreObjectsMarked(); + sal_Bool bHasMarked = pView->AreObjectsMarked(); const SdrObject* pObj = NULL; const SdrMarkList& rMarkList = pView->GetMarkedObjectList(); @@ -146,12 +146,12 @@ void SwDrawShell::ExecDrawDlg(SfxRequest& rReq) { pSh->StartAction(); if(bHasMarked) - pView->SetAttrToMarked(*pDlg->GetOutputItemSet(), FALSE); + pView->SetAttrToMarked(*pDlg->GetOutputItemSet(), sal_False); else - pView->SetDefaultAttr(*pDlg->GetOutputItemSet(), FALSE); + pView->SetDefaultAttr(*pDlg->GetOutputItemSet(), sal_False); pSh->EndAction(); - static USHORT const aInval[] = + static sal_uInt16 aInval[] = { SID_ATTR_LINE_STYLE, SID_ATTR_LINE_WIDTH, SID_ATTR_LINE_COLOR, 0 @@ -172,7 +172,7 @@ void SwDrawShell::ExecDrawDlg(SfxRequest& rReq) GetShell().SetModified(); else if (bChanged) - pDoc->SetChanged(TRUE); + pDoc->SetChanged(sal_True); } void SwDrawShell::ExecDrawAttrArgs(SfxRequest& rReq) @@ -180,17 +180,17 @@ void SwDrawShell::ExecDrawAttrArgs(SfxRequest& rReq) SwWrtShell* pSh = &GetShell(); SdrView* pView = pSh->GetDrawView(); const SfxItemSet* pArgs = rReq.GetArgs(); - BOOL bChanged = pView->GetModel()->IsChanged(); - pView->GetModel()->SetChanged(FALSE); + sal_Bool bChanged = pView->GetModel()->IsChanged(); + pView->GetModel()->SetChanged(sal_False); GetView().NoRotate(); if (pArgs) { if(pView->AreObjectsMarked()) - pView->SetAttrToMarked(*rReq.GetArgs(), FALSE); + pView->SetAttrToMarked(*rReq.GetArgs(), sal_False); else - pView->SetDefaultAttr(*rReq.GetArgs(), FALSE); + pView->SetDefaultAttr(*rReq.GetArgs(), sal_False); } else { @@ -202,13 +202,13 @@ void SwDrawShell::ExecDrawAttrArgs(SfxRequest& rReq) case SID_ATTR_FILL_GRADIENT: case SID_ATTR_FILL_HATCH: case SID_ATTR_FILL_BITMAP: - pDis->Execute(SID_ATTRIBUTES_AREA, FALSE); + pDis->Execute(SID_ATTRIBUTES_AREA, sal_False); break; case SID_ATTR_LINE_STYLE: case SID_ATTR_LINE_DASH: case SID_ATTR_LINE_WIDTH: case SID_ATTR_LINE_COLOR: - pDis->Execute(SID_ATTRIBUTES_LINE, FALSE); + pDis->Execute(SID_ATTRIBUTES_LINE, sal_False); break; } } @@ -216,7 +216,7 @@ void SwDrawShell::ExecDrawAttrArgs(SfxRequest& rReq) GetShell().SetModified(); else if (bChanged) - pView->GetModel()->SetChanged(TRUE); + pView->GetModel()->SetChanged(sal_True); } void SwDrawShell::GetDrawAttrState(SfxItemSet& rSet) @@ -225,7 +225,7 @@ void SwDrawShell::GetDrawAttrState(SfxItemSet& rSet) if (pSdrView->AreObjectsMarked()) { - BOOL bDisable = Disable( rSet ); + sal_Bool bDisable = Disable( rSet ); if( !bDisable ) pSdrView->GetAttributes( rSet ); diff --git a/sw/source/ui/shells/drawsh.cxx b/sw/source/ui/shells/drawsh.cxx index 9744c07df7..6152846ae9 100644 --- a/sw/source/ui/shells/drawsh.cxx +++ b/sw/source/ui/shells/drawsh.cxx @@ -90,16 +90,16 @@ void SwDrawShell::Execute(SfxRequest &rReq) SdrView *pSdrView = rSh.GetDrawView(); const SfxItemSet *pArgs = rReq.GetArgs(); SfxBindings &rBnd = GetView().GetViewFrame()->GetBindings(); - USHORT nSlotId = rReq.GetSlot(); - BOOL bChanged = pSdrView->GetModel()->IsChanged(); + sal_uInt16 nSlotId = rReq.GetSlot(); + sal_Bool bChanged = pSdrView->GetModel()->IsChanged(); - pSdrView->GetModel()->SetChanged(FALSE); + pSdrView->GetModel()->SetChanged(sal_False); const SfxPoolItem* pItem; if(pArgs) - pArgs->GetItemState(nSlotId, FALSE, &pItem); + pArgs->GetItemState(nSlotId, sal_False, &pItem); - BOOL bMirror = TRUE; + sal_Bool bMirror = sal_True; switch (nSlotId) { @@ -169,7 +169,7 @@ void SwDrawShell::Execute(SfxRequest &rReq) break; case FN_FLIP_HORZ_GRAFIC: - bMirror = FALSE; + bMirror = sal_False; /* no break */ case FN_FLIP_VERT_GRAFIC: rSh.MirrorSelection( bMirror ); @@ -178,7 +178,7 @@ void SwDrawShell::Execute(SfxRequest &rReq) case SID_FONTWORK: { FieldUnit eMetric = ::GetDfltMetric(0 != PTR_CAST(SwWebView, &rSh.GetView())); - SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< UINT16 >(eMetric)) ); + SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric)) ); SfxViewFrame* pVFrame = GetView().GetViewFrame(); if (pArgs) { @@ -235,7 +235,7 @@ void SwDrawShell::Execute(SfxRequest &rReq) SwDocStat aCurr; SwDocStat aDocStat( rSh.getIDocumentStatistics()->GetDocStat() ); { - SwWait aWait( *GetView().GetDocShell(), TRUE ); + SwWait aWait( *GetView().GetDocShell(), sal_True ); rSh.StartAction(); rSh.CountWords( aCurr ); rSh.UpdateDocStat( aDocStat ); @@ -291,7 +291,7 @@ void SwDrawShell::Execute(SfxRequest &rReq) if (pSdrView->GetModel()->IsChanged()) rSh.SetModified(); else if (bChanged) - pSdrView->GetModel()->SetChanged(TRUE); + pSdrView->GetModel()->SetChanged(sal_True); } void SwDrawShell::GetState(SfxItemSet& rSet) @@ -299,8 +299,8 @@ void SwDrawShell::GetState(SfxItemSet& rSet) SwWrtShell &rSh = GetShell(); SdrView* pSdrView = rSh.GetDrawViewWithValidMarkList(); SfxWhichIter aIter( rSet ); - USHORT nWhich = aIter.FirstWhich(); - BOOL bProtected = rSh.IsSelObjProtected(FLYPROTECT_CONTENT); + sal_uInt16 nWhich = aIter.FirstWhich(); + sal_Bool bProtected = rSh.IsSelObjProtected(FLYPROTECT_CONTENT); if (!bProtected) // Im Parent nachsehen bProtected |= rSh.IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT ) != 0; @@ -326,7 +326,7 @@ void SwDrawShell::GetState(SfxItemSet& rSet) case SID_OBJECT_ROTATE: { - const BOOL bIsRotate = GetView().IsDrawRotate(); + const sal_Bool bIsRotate = GetView().IsDrawRotate(); if ( (!bIsRotate && !pSdrView->IsRotateAllowed()) || bProtected ) rSet.DisableItem( nWhich ); else @@ -355,7 +355,7 @@ void SwDrawShell::GetState(SfxItemSet& rSet) rSet.DisableItem( nWhich ); else { - const USHORT nId = SvxFontWorkChildWindow::GetChildWindowId(); + const sal_uInt16 nId = SvxFontWorkChildWindow::GetChildWindowId(); rSet.Put(SfxBoolItem( nWhich , GetView().GetViewFrame()->HasChildWindow(nId))); } } @@ -383,8 +383,8 @@ void SwDrawShell::ExecFormText(SfxRequest& rReq) { SwWrtShell &rSh = GetShell(); SdrView* pDrView = rSh.GetDrawView(); - BOOL bChanged = pDrView->GetModel()->IsChanged(); - pDrView->GetModel()->SetChanged(FALSE); + sal_Bool bChanged = pDrView->GetModel()->IsChanged(); + pDrView->GetModel()->SetChanged(sal_False); const SdrMarkList& rMarkList = pDrView->GetMarkedObjectList(); @@ -395,16 +395,16 @@ void SwDrawShell::ExecFormText(SfxRequest& rReq) if ( pDrView->IsTextEdit() ) { - pDrView->SdrEndTextEdit( TRUE ); + pDrView->SdrEndTextEdit( sal_True ); GetView().AttrChangedNotify(&rSh); } - if ( rSet.GetItemState(XATTR_FORMTXTSTDFORM, TRUE, &pItem) == + if ( rSet.GetItemState(XATTR_FORMTXTSTDFORM, sal_True, &pItem) == SFX_ITEM_SET && ((const XFormTextStdFormItem*) pItem)->GetValue() != XFTFORM_NONE ) { - const USHORT nId = SvxFontWorkChildWindow::GetChildWindowId(); + const sal_uInt16 nId = SvxFontWorkChildWindow::GetChildWindowId(); SvxFontWorkDialog* pDlg = (SvxFontWorkDialog*)(GetView().GetViewFrame()-> GetChildWindow(nId)->GetWindow()); @@ -422,7 +422,7 @@ void SwDrawShell::ExecFormText(SfxRequest& rReq) rSh.SetModified(); else if (bChanged) - pDrView->GetModel()->SetChanged(TRUE); + pDrView->GetModel()->SetChanged(sal_True); } /************************************************************************* @@ -438,7 +438,7 @@ void SwDrawShell::GetFormTextState(SfxItemSet& rSet) const SdrObject* pObj = NULL; SvxFontWorkDialog* pDlg = NULL; - const USHORT nId = SvxFontWorkChildWindow::GetChildWindowId(); + const sal_uInt16 nId = SvxFontWorkChildWindow::GetChildWindowId(); SfxViewFrame* pVFrame = GetView().GetViewFrame(); if ( pVFrame->HasChildWindow(nId) ) @@ -451,14 +451,14 @@ void SwDrawShell::GetFormTextState(SfxItemSet& rSet) !((SdrTextObj*) pObj)->HasText() ) { #define XATTR_ANZ 12 - static const USHORT nXAttr[ XATTR_ANZ ] = + static const sal_uInt16 nXAttr[ XATTR_ANZ ] = { XATTR_FORMTXTSTYLE, XATTR_FORMTXTADJUST, XATTR_FORMTXTDISTANCE, XATTR_FORMTXTSTART, XATTR_FORMTXTMIRROR, XATTR_FORMTXTSTDFORM, XATTR_FORMTXTHIDEFORM, XATTR_FORMTXTOUTLINE, XATTR_FORMTXTSHADOW, XATTR_FORMTXTSHDWCOLOR, XATTR_FORMTXTSHDWXVAL, XATTR_FORMTXTSHDWYVAL }; - for( USHORT i = 0; i < XATTR_ANZ; ) + for( sal_uInt16 i = 0; i < XATTR_ANZ; ) rSet.DisableItem( nXAttr[ i++ ] ); } else diff --git a/sw/source/ui/shells/drwbassh.cxx b/sw/source/ui/shells/drwbassh.cxx index be375cf90e..1b0f431fc8 100644 --- a/sw/source/ui/shells/drwbassh.cxx +++ b/sw/source/ui/shells/drwbassh.cxx @@ -89,14 +89,14 @@ TYPEINIT1(SwDrawBaseShell,SwBaseShell) SwDrawBaseShell::SwDrawBaseShell(SwView &_rView): SwBaseShell( _rView ) { - GetShell().NoEdit(TRUE); + GetShell().NoEdit(sal_True); SwEditWin& rWin = GetView().GetEditWin(); rWin.SetBezierMode(SID_BEZIER_MOVE); if ( !_rView.GetDrawFuncPtr() ) - _rView.GetEditWin().StdDrawMode( OBJ_NONE, TRUE ); + _rView.GetEditWin().StdDrawMode( OBJ_NONE, sal_True ); SwTransferable::CreateSelection( GetShell() ); } @@ -113,12 +113,12 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq) SwWrtShell *pSh = &GetShell(); SdrView* pSdrView = pSh->GetDrawView(); const SfxItemSet *pArgs = rReq.GetArgs(); - USHORT nSlotId = rReq.GetSlot(); - BOOL bChanged = pSdrView->GetModel()->IsChanged(); - pSdrView->GetModel()->SetChanged(FALSE); + sal_uInt16 nSlotId = rReq.GetSlot(); + sal_Bool bChanged = pSdrView->GetModel()->IsChanged(); + pSdrView->GetModel()->SetChanged(sal_False); const SfxPoolItem* pItem = 0; if(pArgs) - pArgs->GetItemState(nSlotId, FALSE, &pItem); + pArgs->GetItemState(nSlotId, sal_False, &pItem); //Sonderfall Align per Menue if(pItem && nSlotId == SID_OBJECT_ALIGN) @@ -128,11 +128,11 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq) nSlotId++; } - BOOL bAlignPossible = pSh->IsAlignPossible(); + sal_Bool bAlignPossible = pSh->IsAlignPossible(); - BOOL bTopParam = TRUE, bBottomParam = TRUE; - BOOL bNotify = FALSE; - BOOL bDone = FALSE; + sal_Bool bTopParam = sal_True, bBottomParam = sal_True; + sal_Bool bNotify = sal_False; + sal_Bool bDone = sal_False; SfxBindings& rBind = GetView().GetViewFrame()->GetBindings(); switch (nSlotId) @@ -162,14 +162,14 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq) SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!"); - SfxAbstractDialog* pDlg = pFact->CreateSwWrapDlg( GetView().GetWindow(), aSet, pSh, TRUE, RC_DLG_SWWRAPDLG ); + SfxAbstractDialog* pDlg = pFact->CreateSwWrapDlg( GetView().GetWindow(), aSet, pSh, sal_True, RC_DLG_SWWRAPDLG ); OSL_ENSURE(pDlg, "Dialogdiet fail!"); if (pDlg->Execute() == RET_OK) { const SfxPoolItem* pWrapItem; const SfxItemSet* pOutSet = pDlg->GetOutputItemSet(); - if(SFX_ITEM_SET == pOutSet->GetItemState(FN_DRAW_WRAP_DLG, FALSE, &pWrapItem)) + if(SFX_ITEM_SET == pOutSet->GetItemState(FN_DRAW_WRAP_DLG, sal_False, &pWrapItem)) { short nLayer = ((const SfxInt16Item*)pWrapItem)->GetValue(); if (nLayer == 1) @@ -198,12 +198,12 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq) { SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj(); SfxAbstractTabDialog *pDlg=NULL; - BOOL bCaption = FALSE; + sal_Bool bCaption = sal_False; // Erlaubte Verankerungen: short nAnchor = pSh->GetAnchorId(); - USHORT nAllowedAnchors = SVX_OBJ_AT_CNTNT|SVX_OBJ_IN_CNTNT; - USHORT nHtmlMode = ::GetHtmlMode(pSh->GetView().GetDocShell()); + sal_uInt16 nAllowedAnchors = SVX_OBJ_AT_CNTNT|SVX_OBJ_IN_CNTNT; + sal_uInt16 nHtmlMode = ::GetHtmlMode(pSh->GetView().GetDocShell()); if( !((HTMLMODE_ON & nHtmlMode) && (0 == (nHtmlMode & HTMLMODE_SOME_ABS_POS))) ) nAllowedAnchors |= SVX_OBJ_PAGE; @@ -211,7 +211,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq) nAllowedAnchors |= SVX_OBJ_AT_FLY; if (pObj->GetObjIdentifier() == OBJ_CAPTION ) - bCaption = TRUE; + bCaption = sal_True; if (bCaption) { @@ -240,19 +240,20 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq) } SfxItemSet aNewAttr(pSdrView->GetGeoAttrFromMarked()); - const USHORT* pRange = pDlg->GetInputRanges( *aNewAttr.GetPool() ); + const sal_uInt16* pRange = pDlg->GetInputRanges( *aNewAttr.GetPool() ); SfxItemSet aSet( *aNewAttr.GetPool(), pRange ); FieldUnit eMetric = ::GetDfltMetric(0 != dynamic_cast<SwWebView*>(&GetView())); - SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< UINT16 >(eMetric)) ); + SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric)) ); - aSet.Put( aNewAttr, FALSE ); + aSet.Put( aNewAttr, sal_False ); if (bCaption) pSdrView->GetAttributes( aSet ); aSet.Put(SfxInt16Item(SID_ATTR_TRANSFORM_ANCHOR, nAnchor)); - BOOL bRTL; - aSet.Put(SfxBoolItem(SID_ATTR_TRANSFORM_IN_VERTICAL_TEXT, pSh->IsFrmVertical(TRUE, bRTL))); + sal_Bool bRTL; + sal_Bool bVertL2R; + aSet.Put(SfxBoolItem(SID_ATTR_TRANSFORM_IN_VERTICAL_TEXT, pSh->IsFrmVertical(sal_True, bRTL, bVertL2R))); aSet.Put(SfxBoolItem(SID_ATTR_TRANSFORM_IN_RTL_TEXT, bRTL)); SwFrmFmt* pFrmFmt = FindFrmFmt( pObj ); @@ -280,18 +281,18 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq) pSh->StartAllAction(); // --> OD 2004-07-14 #i30451# - pSh->StartUndo(); + pSh->StartUndo(UNDO_INSFMTATTR); pSdrView->SetGeoAttrToMarked(*pOutSet); if (bCaption) pSdrView->SetAttributes(*pOutSet); - BOOL bPosCorr = + sal_Bool bPosCorr = SFX_ITEM_SET != pOutSet->GetItemState( - SID_ATTR_TRANSFORM_POS_X, FALSE ) && + SID_ATTR_TRANSFORM_POS_X, sal_False ) && SFX_ITEM_SET != pOutSet->GetItemState( - SID_ATTR_TRANSFORM_POS_Y, FALSE ); + SID_ATTR_TRANSFORM_POS_Y, sal_False ); SfxItemSet aFrmAttrSet(GetPool(), RES_FRMATR_BEGIN, RES_FRMATR_END - 1); @@ -299,11 +300,11 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq) const SfxPoolItem* pAnchorItem; if(SFX_ITEM_SET == pOutSet->GetItemState( - SID_ATTR_TRANSFORM_ANCHOR, FALSE, &pAnchorItem)) + SID_ATTR_TRANSFORM_ANCHOR, sal_False, &pAnchorItem)) { if(!bSingleSelection) pSh->ChgAnchor(((const SfxInt16Item*)pAnchorItem) - ->GetValue(), FALSE, bPosCorr ); + ->GetValue(), sal_False, bPosCorr ); else { SwFmtAnchor aAnchor(pFrmFmt->GetAnchor()); @@ -315,10 +316,10 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq) const SfxPoolItem* pHoriRelation = 0; const SfxPoolItem* pHoriPosition = 0; const SfxPoolItem* pHoriMirror = 0; - pOutSet->GetItemState(SID_ATTR_TRANSFORM_HORI_ORIENT, FALSE, &pHoriOrient); - pOutSet->GetItemState(SID_ATTR_TRANSFORM_HORI_RELATION, FALSE, &pHoriRelation); - pOutSet->GetItemState(SID_ATTR_TRANSFORM_HORI_POSITION, FALSE, &pHoriPosition); - pOutSet->GetItemState(SID_ATTR_TRANSFORM_HORI_MIRROR, FALSE, &pHoriMirror); + pOutSet->GetItemState(SID_ATTR_TRANSFORM_HORI_ORIENT, sal_False, &pHoriOrient); + pOutSet->GetItemState(SID_ATTR_TRANSFORM_HORI_RELATION, sal_False, &pHoriRelation); + pOutSet->GetItemState(SID_ATTR_TRANSFORM_HORI_POSITION, sal_False, &pHoriPosition); + pOutSet->GetItemState(SID_ATTR_TRANSFORM_HORI_MIRROR, sal_False, &pHoriMirror); if(pHoriOrient || pHoriRelation || pHoriPosition || pHoriMirror) { if(pHoriOrient) @@ -337,9 +338,9 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq) const SfxPoolItem* pVertOrient = 0; const SfxPoolItem* pVertRelation = 0; const SfxPoolItem* pVertPosition = 0; - pOutSet->GetItemState(SID_ATTR_TRANSFORM_VERT_ORIENT, FALSE, &pVertOrient); - pOutSet->GetItemState(SID_ATTR_TRANSFORM_VERT_RELATION, FALSE, &pVertRelation); - pOutSet->GetItemState(SID_ATTR_TRANSFORM_VERT_POSITION, FALSE, &pVertPosition); + pOutSet->GetItemState(SID_ATTR_TRANSFORM_VERT_ORIENT, sal_False, &pVertOrient); + pOutSet->GetItemState(SID_ATTR_TRANSFORM_VERT_RELATION, sal_False, &pVertRelation); + pOutSet->GetItemState(SID_ATTR_TRANSFORM_VERT_POSITION, sal_False, &pVertPosition); if(pVertOrient || pVertRelation || pVertPosition ) { if(pVertOrient) @@ -353,14 +354,14 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq) aFrmAttrSet.Put( aVOrient ); } const SfxPoolItem* pFollowItem = 0; - pOutSet->GetItemState(RES_FOLLOW_TEXT_FLOW, FALSE, &pFollowItem); + pOutSet->GetItemState(RES_FOLLOW_TEXT_FLOW, sal_False, &pFollowItem); if(pFollowItem) aFrmAttrSet.Put(*pFollowItem); if(aFrmAttrSet.Count()) pSh->SetDrawingAttr(aFrmAttrSet); - rBind.InvalidateAll(FALSE); + rBind.InvalidateAll(sal_False); // --> OD 2004-07-14 #i30451# pSh->EndUndo( UNDO_INSFMTATTR ); @@ -379,7 +380,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq) case FN_BACKSPACE: if (pSh->IsObjSelected() && !pSdrView->IsTextEdit()) { - bDone = TRUE; + bDone = sal_True; if( GetView().IsDrawRotate() ) { @@ -408,7 +409,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq) pSh->LeaveSelFrmMode(); // #105852# FME } - bNotify = TRUE; + bNotify = sal_True; } break; @@ -432,7 +433,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq) if (pSh->IsGroupSelected()) { pSdrView->EnterMarkedGroup(); - rBind.InvalidateAll(FALSE); + rBind.InvalidateAll(sal_False); } break; @@ -458,7 +459,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq) if( rMarkList.GetMarkCount() == 1 && bAlignPossible ) { // Objekte nicht aneinander ausrichten - USHORT nAnchor = pSh->GetAnchorId(); + sal_uInt16 nAnchor = pSh->GetAnchorId(); if (nAnchor == FLY_AS_CHAR) { sal_Int16 nVertOrient = -1; @@ -521,14 +522,14 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq) break; case FN_FRAME_UP: - bTopParam = FALSE; + bTopParam = sal_False; /* no break */ case SID_FRAME_TO_TOP: pSh->SelectionToTop( bTopParam ); break; case FN_FRAME_DOWN: - bBottomParam = FALSE; + bBottomParam = sal_False; /* no break */ case SID_FRAME_TO_BOTTOM: pSh->SelectionToBottom( bBottomParam ); @@ -536,7 +537,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq) case FN_NAME_SHAPE: { - bDone = TRUE; + bDone = sal_True; if(1L == pSdrView->GetMarkedObjectCount()) { @@ -568,7 +569,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq) // #i68101# case FN_TITLE_DESCRIPTION_SHAPE: { - bDone = TRUE; + bDone = sal_True; if(1L == pSdrView->GetMarkedObjectCount()) { @@ -610,7 +611,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq) if (pSdrView->GetModel()->IsChanged()) pSh->SetModified(); else if (bChanged) - pSdrView->GetModel()->SetChanged(TRUE); + pSdrView->GetModel()->SetChanged(sal_True); // 40220: Nach dem Loeschen von DrawObjekten ueber die API GPF durch Selbstzerstoerung if(bNotify) GetView().AttrChangedNotify(pSh); // ggf Shellwechsel... @@ -657,8 +658,8 @@ void SwDrawBaseShell::GetState(SfxItemSet& rSet) SwWrtShell &rSh = GetShell(); SdrView* pSdrView = rSh.GetDrawViewWithValidMarkList(); SfxWhichIter aIter( rSet ); - USHORT nWhich = aIter.FirstWhich(); - BOOL bProtected = rSh.IsSelObjProtected(FLYPROTECT_CONTENT); + sal_uInt16 nWhich = aIter.FirstWhich(); + sal_Bool bProtected = rSh.IsSelObjProtected(FLYPROTECT_CONTENT); if (!bProtected) // Im Parent nachsehen bProtected |= rSh.IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT ) != 0; @@ -744,9 +745,9 @@ void SwDrawBaseShell::GetState(SfxItemSet& rSet) } } -BOOL SwDrawBaseShell::Disable(SfxItemSet& rSet, USHORT nWhich) +sal_Bool SwDrawBaseShell::Disable(SfxItemSet& rSet, sal_uInt16 nWhich) { - BOOL bDisable = GetShell().IsSelObjProtected(FLYPROTECT_CONTENT); + sal_Bool bDisable = GetShell().IsSelObjProtected(FLYPROTECT_CONTENT); if (bDisable) { @@ -798,8 +799,12 @@ IMPL_LINK(SwDrawBaseShell, ValidatePosition, SvxSwFrameValidation*, pValidation pValidation->bFollowTextFlow, pValidation->bMirror, NULL, &pValidation->aPercentSize); - BOOL bRTL; - BOOL bIsInVertical = pSh->IsFrmVertical(TRUE, bRTL); + sal_Bool bIsInVertical( sal_False ); + { + sal_Bool bRTL; + sal_Bool bVertL2R; + bIsInVertical = pSh->IsFrmVertical(sal_True, bRTL, bVertL2R); + } if(bIsInVertical) { Point aPos(aBoundRect.Pos()); diff --git a/sw/source/ui/shells/drwtxtex.cxx b/sw/source/ui/shells/drwtxtex.cxx index a876b071e9..9da8d9f837 100644 --- a/sw/source/ui/shells/drwtxtex.cxx +++ b/sw/source/ui/shells/drwtxtex.cxx @@ -162,7 +162,7 @@ void SwDrawTextShell::Execute( SfxRequest &rReq ) SvxScriptSetItem aSetItem( nSlot, *pPool2 ); // #i78017 establish the same behaviour as in Writer - USHORT nScriptTypes = SCRIPTTYPE_LATIN | SCRIPTTYPE_ASIAN | SCRIPTTYPE_COMPLEX; + sal_uInt16 nScriptTypes = SCRIPTTYPE_LATIN | SCRIPTTYPE_ASIAN | SCRIPTTYPE_COMPLEX; if (nSlot == SID_ATTR_CHAR_FONT) nScriptTypes = pOLV->GetSelectedScriptType(); @@ -277,7 +277,7 @@ void SwDrawTextShell::Execute( SfxRequest &rReq ) SwView* pView = &GetView(); FieldUnit eMetric = ::GetDfltMetric(0 != PTR_CAST(SwWebView, pView)); - SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< UINT16 >(eMetric)) ); + SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric)) ); SfxItemSet aDlgAttr(GetPool(), EE_ITEMS_START, EE_ITEMS_END); // util::Language gibts an der EditEngine nicht! Daher nicht im Set. @@ -290,7 +290,7 @@ void SwDrawTextShell::Execute( SfxRequest &rReq ) SfxAbstractTabDialog* pDlg = pFact->CreateSwCharDlg( pView->GetWindow(), *pView, aDlgAttr, DLG_CHAR,0, sal_True ); OSL_ENSURE(pDlg, "Dialogdiet fail!"); - USHORT nRet = pDlg->Execute(); + sal_uInt16 nRet = pDlg->Execute(); if(RET_OK == nRet ) { rReq.Done( *( pDlg->GetOutputItemSet() ) ); @@ -349,7 +349,7 @@ void SwDrawTextShell::Execute( SfxRequest &rReq ) SwDocStat aCurr; SwDocStat aDocStat( rSh.getIDocumentStatistics()->GetDocStat() ); { - SwWait aWait( *GetView().GetDocShell(), TRUE ); + SwWait aWait( *GetView().GetDocShell(), sal_True ); rSh.StartAction(); rSh.CountWords( aCurr ); rSh.UpdateDocStat( aDocStat ); @@ -372,7 +372,7 @@ void SwDrawTextShell::Execute( SfxRequest &rReq ) { SwView* pView = &GetView(); FieldUnit eMetric = ::GetDfltMetric(0 != PTR_CAST(SwWebView, pView)); - SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< UINT16 >(eMetric)) ); + SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric)) ); SfxItemSet aDlgAttr(GetPool(), EE_ITEMS_START, EE_ITEMS_END, SID_ATTR_PARA_HYPHENZONE, SID_ATTR_PARA_HYPHENZONE, @@ -394,7 +394,7 @@ void SwDrawTextShell::Execute( SfxRequest &rReq ) SfxAbstractTabDialog* pDlg = pFact->CreateSwParaDlg( GetView().GetWindow(), GetView(), aDlgAttr,DLG_STD, DLG_PARA, 0, sal_True ); OSL_ENSURE(pDlg, "Dialogdiet fail!"); - USHORT nRet = pDlg->Execute(); + sal_uInt16 nRet = pDlg->Execute(); if(RET_OK == nRet) { rReq.Done( *( pDlg->GetOutputItemSet() ) ); @@ -488,7 +488,7 @@ void SwDrawTextShell::Execute( SfxRequest &rReq ) sal_Bool bLeftToRight = nSlot == SID_ATTR_PARA_LEFT_TO_RIGHT; const SfxPoolItem* pPoolItem; - if( pNewAttrs && SFX_ITEM_SET == pNewAttrs->GetItemState( nSlot, TRUE, &pPoolItem ) ) + if( pNewAttrs && SFX_ITEM_SET == pNewAttrs->GetItemState( nSlot, sal_True, &pPoolItem ) ) { if( !( (SfxBoolItem*)pPoolItem)->GetValue() ) bLeftToRight = !bLeftToRight; @@ -498,8 +498,8 @@ void SwDrawTextShell::Execute( SfxRequest &rReq ) EE_PARA_WRITINGDIR, EE_PARA_WRITINGDIR, 0 ); - USHORT nAdjust = SVX_ADJUST_LEFT; - if( SFX_ITEM_ON == aEditAttr.GetItemState(EE_PARA_JUST, TRUE, &pPoolItem ) ) + sal_uInt16 nAdjust = SVX_ADJUST_LEFT; + if( SFX_ITEM_ON == aEditAttr.GetItemState(EE_PARA_JUST, sal_True, &pPoolItem ) ) nAdjust = ( (SvxAdjustItem*)pPoolItem)->GetEnumValue(); if( bLeftToRight ) @@ -555,8 +555,8 @@ void SwDrawTextShell::GetState(SfxItemSet& rSet) while(nWhich) { - USHORT nSlotId = GetPool().GetSlotId( nWhich ); - BOOL bFlag = FALSE; + sal_uInt16 nSlotId = GetPool().GetSlotId( nWhich ); + sal_Bool bFlag = sal_False; switch( nSlotId ) { case SID_LANGUAGE_STATUS://20412: @@ -640,7 +640,7 @@ ASK_ESCAPE: // disable "Thesaurus" if the language is not supported const SfxPoolItem &rItem = GetShell().GetDoc()->GetDefault( GetWhichOfScript( RES_CHRATR_LANGUAGE, - GetI18NScriptTypeOfLanguage( (USHORT)GetAppLanguage())) ); + GetI18NScriptTypeOfLanguage( (sal_uInt16)GetAppLanguage())) ); LanguageType nLang = ((const SvxLanguageItem &) rItem).GetLanguage(); uno::Reference< linguistic2::XThesaurus > xThes( ::GetThesaurus() ); @@ -772,11 +772,11 @@ void SwDrawTextShell::GetDrawTxtCtrlState(SfxItemSet& rSet) SfxWhichIter aIter(rSet); sal_uInt16 nWhich = aIter.FirstWhich(); - USHORT nScriptType = pOLV->GetSelectedScriptType(); + sal_uInt16 nScriptType = pOLV->GetSelectedScriptType(); while(nWhich) { sal_uInt16 nEEWhich = 0; - USHORT nSlotId = GetPool().GetSlotId( nWhich ); + sal_uInt16 nSlotId = GetPool().GetSlotId( nWhich ); switch( nSlotId ) { case SID_ATTR_CHAR_FONT: @@ -788,7 +788,7 @@ void SwDrawTextShell::GetDrawTxtCtrlState(SfxItemSet& rSet) if( !pEditPool ) pEditPool = aEditAttr.GetPool(); SvxScriptSetItem aSetItem( nSlotId, *pEditPool ); - aSetItem.GetItemSet().Put( aEditAttr, FALSE ); + aSetItem.GetItemSet().Put( aEditAttr, sal_False ); const SfxPoolItem* pI = aSetItem.GetItemOfScript( nScriptType ); if( pI ) rSet.Put( *pI, nWhich ); diff --git a/sw/source/ui/shells/drwtxtsh.cxx b/sw/source/ui/shells/drwtxtsh.cxx index 7d8499e5d8..6fce73b22e 100644 --- a/sw/source/ui/shells/drwtxtsh.cxx +++ b/sw/source/ui/shells/drwtxtsh.cxx @@ -111,7 +111,7 @@ void SwDrawTextShell::Init() if( !pOutliner ) return ; OutlinerView* pOLV = pSdrView->GetTextEditOutlinerView(); - ULONG nCtrl = pOutliner->GetControlWord(); + sal_uLong nCtrl = pOutliner->GetControlWord(); nCtrl |= EE_CNTRL_AUTOCORRECT; SetUndoManager(&pOutliner->GetUndoManager()); @@ -139,7 +139,7 @@ SwDrawTextShell::SwDrawTextShell(SwView &rV) : Init(); - rSh.NoEdit(TRUE); + rSh.NoEdit(sal_True); SetName(String::CreateFromAscii("ObjectText")); SetHelpId(SW_DRWTXTSHELL); } @@ -161,7 +161,7 @@ SwWrtShell& SwDrawTextShell::GetShell() void SwDrawTextShell::StateDisableItems( SfxItemSet &rSet ) { SfxWhichIter aIter(rSet); - USHORT nWhich = aIter.FirstWhich(); + sal_uInt16 nWhich = aIter.FirstWhich(); while (nWhich) { @@ -188,7 +188,7 @@ void SwDrawTextShell::SetAttrToMarked(const SfxItemSet& rAttr) } } -BOOL SwDrawTextShell::IsTextEdit() +sal_Bool SwDrawTextShell::IsTextEdit() { return pSdrView->IsTextEdit(); } @@ -197,7 +197,7 @@ void SwDrawTextShell::ExecFontWork(SfxRequest& rReq) { SwWrtShell &rSh = GetShell(); FieldUnit eMetric = ::GetDfltMetric(0 != PTR_CAST(SwWebView, &rSh.GetView())); - SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< UINT16 >(eMetric)) ); + SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric)) ); SfxViewFrame* pVFrame = GetView().GetViewFrame(); if ( rReq.GetArgs() ) { @@ -213,7 +213,7 @@ void SwDrawTextShell::ExecFontWork(SfxRequest& rReq) void SwDrawTextShell::StateFontWork(SfxItemSet& rSet) { - const USHORT nId = SvxFontWorkChildWindow::GetChildWindowId(); + const sal_uInt16 nId = SvxFontWorkChildWindow::GetChildWindowId(); rSet.Put(SfxBoolItem(SID_FONTWORK, GetView().GetViewFrame()->HasChildWindow(nId))); } @@ -246,12 +246,12 @@ void SwDrawTextShell::ExecFormText(SfxRequest& rReq) rTempView.AttrChangedNotify(&rSh); } - if ( rSet.GetItemState(XATTR_FORMTXTSTDFORM, TRUE, &pItem) == + if ( rSet.GetItemState(XATTR_FORMTXTSTDFORM, sal_True, &pItem) == SFX_ITEM_SET && ((const XFormTextStdFormItem*) pItem)->GetValue() != XFTFORM_NONE ) { - const USHORT nId = SvxFontWorkChildWindow::GetChildWindowId(); + const sal_uInt16 nId = SvxFontWorkChildWindow::GetChildWindowId(); SvxFontWorkDialog* pDlg = (SvxFontWorkDialog*)( pVFrame->GetChildWindow(nId)->GetWindow()); @@ -279,7 +279,7 @@ void SwDrawTextShell::GetFormTextState(SfxItemSet& rSet) const SdrObject* pObj = NULL; SvxFontWorkDialog* pDlg = NULL; - const USHORT nId = SvxFontWorkChildWindow::GetChildWindowId(); + const sal_uInt16 nId = SvxFontWorkChildWindow::GetChildWindowId(); SfxViewFrame* pVFrame = GetView().GetViewFrame(); if ( pVFrame->HasChildWindow(nId) ) @@ -292,13 +292,13 @@ void SwDrawTextShell::GetFormTextState(SfxItemSet& rSet) !((SdrTextObj*) pObj)->HasText() ) { #define XATTR_ANZ 12 - static const USHORT nXAttr[ XATTR_ANZ ] = + static const sal_uInt16 nXAttr[ XATTR_ANZ ] = { XATTR_FORMTXTSTYLE, XATTR_FORMTXTADJUST, XATTR_FORMTXTDISTANCE, XATTR_FORMTXTSTART, XATTR_FORMTXTMIRROR, XATTR_FORMTXTSTDFORM, XATTR_FORMTXTHIDEFORM, XATTR_FORMTXTOUTLINE, XATTR_FORMTXTSHADOW, XATTR_FORMTXTSHDWCOLOR, XATTR_FORMTXTSHDWXVAL, XATTR_FORMTXTSHDWYVAL }; - for( USHORT i = 0; i < XATTR_ANZ; ) + for( sal_uInt16 i = 0; i < XATTR_ANZ; ) rSet.DisableItem( nXAttr[ i++ ] ); } else @@ -446,7 +446,7 @@ void SwDrawTextShell::ExecDraw(SfxRequest &rReq) const SfxPoolItem* pItem = 0; if(pNewAttrs) { - pNewAttrs->GetItemState(nSlot, FALSE, &pItem ); + pNewAttrs->GetItemState(nSlot, sal_False, &pItem ); pOLV->InsertText(((const SfxStringItem *)pItem)->GetValue()); } break; @@ -457,9 +457,9 @@ void SwDrawTextShell::ExecDraw(SfxRequest &rReq) SdrOutliner * pOutliner = pSdrView->GetTextEditOutliner(); if(pOutliner) { - ULONG nParaCount = pOutliner->GetParagraphCount(); + sal_uLong nParaCount = pOutliner->GetParagraphCount(); if (nParaCount > 0) - pOLV->SelectRange(0L, USHORT(nParaCount) ); + pOLV->SelectRange(0L, sal_uInt16(nParaCount) ); } } break; @@ -467,7 +467,7 @@ void SwDrawTextShell::ExecDraw(SfxRequest &rReq) case FN_FORMAT_RESET: // delete hard text attributes { pOLV->RemoveAttribsKeepLanguages( true ); - pOLV->GetEditView().GetEditEngine()->RemoveFields(TRUE); + pOLV->GetEditView().GetEditEngine()->RemoveFields(sal_True); rReq.Done(); } break; @@ -494,7 +494,7 @@ void SwDrawTextShell::ExecDraw(SfxRequest &rReq) SfxAbstractTabDialog *pDlg = pFact->CreateTextTabDialog( &(GetView().GetViewFrame()->GetWindow()), &aNewAttr, pSdrView ); - USHORT nResult = pDlg->Execute(); + sal_uInt16 nResult = pDlg->Execute(); if (nResult == RET_OK) { @@ -515,7 +515,7 @@ void SwDrawTextShell::ExecDraw(SfxRequest &rReq) return; } - GetView().GetViewFrame()->GetBindings().InvalidateAll(FALSE); + GetView().GetViewFrame()->GetBindings().InvalidateAll(sal_False); if (IsTextEdit() && pOLV->GetOutliner()->IsModified()) rSh.SetModified(); @@ -528,31 +528,31 @@ void SwDrawTextShell::ExecUndo(SfxRequest &rReq) { if( IsTextEdit() ) { - BOOL bCallBase = TRUE; + sal_Bool bCallBase = sal_True; const SfxItemSet* pArgs = rReq.GetArgs(); if( pArgs ) { - USHORT nId = rReq.GetSlot(), nCnt = 1; + sal_uInt16 nId = rReq.GetSlot(), nCnt = 1; const SfxPoolItem* pItem; switch( nId ) { case SID_UNDO: case SID_REDO: - if( SFX_ITEM_SET == pArgs->GetItemState( nId, FALSE, &pItem ) && + if( SFX_ITEM_SET == pArgs->GetItemState( nId, sal_False, &pItem ) && 1 < (nCnt = ((SfxUInt16Item*)pItem)->GetValue()) ) { // then we make by ourself. - SfxUndoManager* pUndoManager = GetUndoManager(); + ::svl::IUndoManager* pUndoManager = GetUndoManager(); if( pUndoManager ) { if( SID_UNDO == nId ) while( nCnt-- ) - pUndoManager->Undo(0); + pUndoManager->Undo(); else while( nCnt-- ) - pUndoManager->Redo(0); + pUndoManager->Redo(); } - bCallBase = FALSE; + bCallBase = sal_False; GetView().GetViewFrame()->GetBindings().InvalidateAll(sal_False); } break; @@ -576,7 +576,7 @@ void SwDrawTextShell::StateUndo(SfxItemSet &rSet) SfxViewFrame *pSfxViewFrame = GetView().GetViewFrame(); SfxWhichIter aIter(rSet); - USHORT nWhich = aIter.FirstWhich(); + sal_uInt16 nWhich = aIter.FirstWhich(); while( nWhich ) { switch ( nWhich ) @@ -584,27 +584,27 @@ void SwDrawTextShell::StateUndo(SfxItemSet &rSet) case SID_GETUNDOSTRINGS: case SID_GETREDOSTRINGS: { - SfxUndoManager* pUndoManager = GetUndoManager(); + ::svl::IUndoManager* pUndoManager = GetUndoManager(); if( pUndoManager ) { - UniString (SfxUndoManager:: *fnGetComment)( USHORT ) const; + UniString (::svl::IUndoManager:: *fnGetComment)( size_t, bool const ) const; sal_uInt16 nCount; if( SID_GETUNDOSTRINGS == nWhich ) { nCount = pUndoManager->GetUndoActionCount(); - fnGetComment = &SfxUndoManager::GetUndoActionComment; + fnGetComment = &::svl::IUndoManager::GetUndoActionComment; } else { nCount = pUndoManager->GetRedoActionCount(); - fnGetComment = &SfxUndoManager::GetRedoActionComment; + fnGetComment = &::svl::IUndoManager::GetRedoActionComment; } if( nCount ) { String sList; for( sal_uInt16 n = 0; n < nCount; ++n ) - ( sList += (pUndoManager->*fnGetComment)( n ) ) + ( sList += (pUndoManager->*fnGetComment)( n, ::svl::IUndoManager::TopLevel ) ) += '\n'; SfxStringListItem aItem( nWhich ); @@ -687,7 +687,7 @@ void SwDrawTextShell::InsertSymbol(SfxRequest& rReq) const SfxItemSet *pArgs = rReq.GetArgs(); const SfxPoolItem* pItem = 0; if( pArgs ) - pArgs->GetItemState(GetPool().GetWhich(SID_CHARMAP), FALSE, &pItem); + pArgs->GetItemState(GetPool().GetWhich(SID_CHARMAP), sal_False, &pItem); String sSym; String sFontName; @@ -695,25 +695,25 @@ void SwDrawTextShell::InsertSymbol(SfxRequest& rReq) { sSym = ((const SfxStringItem*)pItem)->GetValue(); const SfxPoolItem* pFtItem = NULL; - pArgs->GetItemState( GetPool().GetWhich(SID_ATTR_SPECIALCHAR), FALSE, &pFtItem); + pArgs->GetItemState( GetPool().GetWhich(SID_ATTR_SPECIALCHAR), sal_False, &pFtItem); const SfxStringItem* pFontItem = PTR_CAST( SfxStringItem, pFtItem ); if ( pFontItem ) sFontName = pFontItem->GetValue(); } SfxItemSet aSet(pOLV->GetAttribs()); - USHORT nScript = pOLV->GetSelectedScriptType(); + sal_uInt16 nScript = pOLV->GetSelectedScriptType(); SvxFontItem aSetDlgFont( RES_CHRATR_FONT ); { SvxScriptSetItem aSetItem( SID_ATTR_CHAR_FONT, *aSet.GetPool() ); - aSetItem.GetItemSet().Put( aSet, FALSE ); + aSetItem.GetItemSet().Put( aSet, sal_False ); const SfxPoolItem* pI = aSetItem.GetItemOfScript( nScript ); if( pI ) aSetDlgFont = *(SvxFontItem*)pI; else aSetDlgFont = (SvxFontItem&)aSet.Get( GetWhichOfScript( SID_ATTR_CHAR_FONT, - GetI18NScriptTypeOfLanguage( (USHORT)GetAppLanguage() ) )); + GetI18NScriptTypeOfLanguage( (sal_uInt16)GetAppLanguage() ) )); if (!sFontName.Len()) sFontName = aSetDlgFont.GetFamilyName(); } @@ -722,7 +722,7 @@ void SwDrawTextShell::InsertSymbol(SfxRequest& rReq) if(!sSym.Len()) { SfxAllItemSet aAllSet( GetPool() ); - aAllSet.Put( SfxBoolItem( FN_PARAM_1, FALSE ) ); + aAllSet.Put( SfxBoolItem( FN_PARAM_1, sal_False ) ); SwViewOption aOpt(*rView.GetWrtShell().GetViewOptions()); String sSymbolFont = aOpt.GetSymbolFont(); @@ -735,11 +735,11 @@ void SwDrawTextShell::InsertSymbol(SfxRequest& rReq) SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); SfxAbstractDialog* pDlg = pFact->CreateSfxDialog( rView.GetWindow(), aAllSet, rView.GetViewFrame()->GetFrame().GetFrameInterface(), RID_SVXDLG_CHARMAP ); - USHORT nResult = pDlg->Execute(); + sal_uInt16 nResult = pDlg->Execute(); if( nResult == RET_OK ) { - SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pCItem, SfxStringItem, SID_CHARMAP, FALSE ); - SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pFontItem, SvxFontItem, SID_ATTR_CHAR_FONT, FALSE ); + SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pCItem, SfxStringItem, SID_CHARMAP, sal_False ); + SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pFontItem, SvxFontItem, SID_ATTR_CHAR_FONT, sal_False ); if ( pFontItem ) { aFont.SetName( pFontItem->GetFamilyName() ); @@ -764,7 +764,7 @@ void SwDrawTextShell::InsertSymbol(SfxRequest& rReq) // nicht flackern pOLV->HideCursor(); SdrOutliner * pOutliner = pSdrView->GetTextEditOutliner(); - pOutliner->SetUpdateMode(FALSE); + pOutliner->SetUpdateMode(sal_False); SfxItemSet aOldSet( pOLV->GetAttribs() ); SfxItemSet aFontSet( *aOldSet.GetPool(), @@ -802,7 +802,7 @@ void SwDrawTextShell::InsertSymbol(SfxRequest& rReq) pOLV->SetAttribs( aFontSet ); // ab jetzt wieder anzeigen - pOutliner->SetUpdateMode(TRUE); + pOutliner->SetUpdateMode(sal_True); pOLV->ShowCursor(); rReq.AppendItem( SfxStringItem( GetPool().GetWhich(SID_CHARMAP), sSym ) ); @@ -812,7 +812,7 @@ void SwDrawTextShell::InsertSymbol(SfxRequest& rReq) } } -SfxUndoManager* SwDrawTextShell::GetUndoManager() +::svl::IUndoManager* SwDrawTextShell::GetUndoManager() { SwWrtShell &rSh = GetShell(); pSdrView = rSh.GetDrawView(); diff --git a/sw/source/ui/shells/frmsh.cxx b/sw/source/ui/shells/frmsh.cxx index 66f0b0b402..447d46e926 100644 --- a/sw/source/ui/shells/frmsh.cxx +++ b/sw/source/ui/shells/frmsh.cxx @@ -54,7 +54,7 @@ #include <vcl/msgbox.hxx> // <-- - +#include <doc.hxx> #include <fmturl.hxx> #include <fmtclds.hxx> #include <fmtcnct.hxx> @@ -80,6 +80,7 @@ #include <helpid.h> #include <cmdid.h> +#include <cfgitems.hxx> #include <globals.hrc> #include <popup.hrc> #include <shells.hrc> @@ -131,10 +132,10 @@ void SwFrameShell::Execute(SfxRequest &rReq) { //Erstmal die, die keinen FrmMgr benoetigen. SwWrtShell &rSh = GetShell(); - BOOL bMore = FALSE; + sal_Bool bMore = sal_False; const SfxItemSet* pArgs = rReq.GetArgs(); const SfxPoolItem* pItem; - USHORT nSlot = rReq.GetSlot(); + sal_uInt16 nSlot = rReq.GetSlot(); switch ( nSlot ) { @@ -284,11 +285,11 @@ void SwFrameShell::Execute(SfxRequest &rReq) break; case FN_FRAME_UP: - rSh.SelectionToTop( FALSE ); + rSh.SelectionToTop( sal_False ); break; case FN_FRAME_DOWN: - rSh.SelectionToBottom( FALSE ); + rSh.SelectionToBottom( sal_False ); break; case FN_INSERT_FRAME: if (!pArgs) @@ -303,15 +304,15 @@ void SwFrameShell::Execute(SfxRequest &rReq) else { // Rahmen existiert bereits, nur Spaltenanzahl wird geaendert - USHORT nCols = 1; - if(pArgs->GetItemState(SID_ATTR_COLUMNS, FALSE, &pItem) == SFX_ITEM_SET) + sal_uInt16 nCols = 1; + if(pArgs->GetItemState(SID_ATTR_COLUMNS, sal_False, &pItem) == SFX_ITEM_SET) nCols = ((SfxUInt16Item *)pItem)->GetValue(); SfxItemSet aSet(GetPool(),RES_COL,RES_COL); rSh.GetFlyFrmAttr( aSet ); SwFmtCol aCol((const SwFmtCol&)aSet.Get(RES_COL)); // GutterWidth wird nicht immer uebergeben, daher erst besorgen (siehe view2: Execute auf diesen Slot) - USHORT nGutterWidth = aCol.GetGutterWidth(); + sal_uInt16 nGutterWidth = aCol.GetGutterWidth(); if(!nCols ) nCols++; aCol.Init(nCols, nGutterWidth, aCol.GetWishWidth()); @@ -335,7 +336,7 @@ void SwFrameShell::Execute(SfxRequest &rReq) case SID_HYPERLINK_SETLINK: { - if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(SID_HYPERLINK_SETLINK, FALSE, &pItem)) + if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(SID_HYPERLINK_SETLINK, sal_False, &pItem)) { const SvxHyperlinkItem& rHLinkItem = *(const SvxHyperlinkItem *)pItem; const String& rURL = rHLinkItem.GetURL(); @@ -350,7 +351,7 @@ void SwFrameShell::Execute(SfxRequest &rReq) if (sOldName.ToUpperAscii() != sFlyName.ToUpperAscii()) { String sName(sOldName); - USHORT i = 1; + sal_uInt16 i = 1; while (rSh.FindFlyByName(sName)) { sName = sOldName; @@ -359,7 +360,7 @@ void SwFrameShell::Execute(SfxRequest &rReq) } rSh.SetFlyName(sName); } - aURL.SetURL( rURL, FALSE ); + aURL.SetURL( rURL, sal_False ); aURL.SetTargetFrameName(rTarget); aSet.Put( aURL ); @@ -421,7 +422,7 @@ void SwFrameShell::Execute(SfxRequest &rReq) SwDocStat aCurr; SwDocStat aDocStat( rSh.getIDocumentStatistics()->GetDocStat() ); { - SwWait aWait( *GetView().GetDocShell(), TRUE ); + SwWait aWait( *GetView().GetDocShell(), sal_True ); rSh.StartAction(); rSh.CountWords( aCurr ); rSh.UpdateDocStat( aDocStat ); @@ -436,7 +437,7 @@ void SwFrameShell::Execute(SfxRequest &rReq) delete pDialog; } break; - default: bMore = TRUE; + default: bMore = sal_True; } if ( !bMore ) @@ -444,9 +445,9 @@ void SwFrameShell::Execute(SfxRequest &rReq) return; } - SwFlyFrmAttrMgr aMgr( FALSE, &rSh, FRMMGR_TYPE_NONE ); - BOOL bUpdateMgr = TRUE; - BOOL bCopyToFmt = FALSE; + SwFlyFrmAttrMgr aMgr( sal_False, &rSh, FRMMGR_TYPE_NONE ); + sal_Bool bUpdateMgr = sal_True; + sal_Bool bCopyToFmt = sal_False; switch ( nSlot ) { case SID_OBJECT_ALIGN_MIDDLE: @@ -509,18 +510,18 @@ void SwFrameShell::Execute(SfxRequest &rReq) if(pArgs) { aMgr.SetAttrSet( *pArgs ); - bCopyToFmt = TRUE; + bCopyToFmt = sal_True; } } break; case SID_ATTR_ULSPACE: case SID_ATTR_LRSPACE: { - if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(GetPool().GetWhich(nSlot), FALSE, &pItem)) + if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(GetPool().GetWhich(nSlot), sal_False, &pItem)) { aMgr.SetAttrSet( *pArgs ); if(SID_ATTR_ULSPACE == nSlot && SID_ATTR_ULSPACE == nSlot) - bCopyToFmt = TRUE; + bCopyToFmt = sal_True; } } break; @@ -530,7 +531,7 @@ void SwFrameShell::Execute(SfxRequest &rReq) if (nSel & nsSelectionType::SEL_GRF) { rSh.GetView().GetViewFrame()->GetDispatcher()->Execute(FN_FORMAT_GRAFIC_DLG); - bUpdateMgr = FALSE; + bUpdateMgr = sal_False; } else { @@ -547,14 +548,13 @@ void SwFrameShell::Execute(SfxRequest &rReq) SID_HTML_MODE, SID_HTML_MODE, FN_SET_FRM_ALT_NAME, FN_SET_FRM_ALT_NAME, FN_PARAM_CHAIN_PREVIOUS, FN_PARAM_CHAIN_NEXT, + FN_OLE_IS_MATH, FN_OLE_IS_MATH, + FN_MATH_BASELINE_ALIGNMENT, FN_MATH_BASELINE_ALIGNMENT, 0); const SwViewOption* pVOpt = rSh.GetViewOptions(); if(nSel & nsSelectionType::SEL_OLE) - { - aSet.Put(SfxBoolItem(FN_KEEP_ASPECT_RATIO, - pVOpt->IsKeepRatio())); - } + aSet.Put( SfxBoolItem(FN_KEEP_ASPECT_RATIO, pVOpt->IsKeepRatio()) ); aSet.Put(SfxUInt16Item(SID_HTML_MODE, ::GetHtmlMode(GetView().GetDocShell()))); aSet.Put(SfxStringItem(FN_SET_FRM_NAME, rSh.GetFlyName())); if( nSel & nsSelectionType::SEL_OLE ) @@ -583,23 +583,29 @@ void SwFrameShell::Execute(SfxRequest &rReq) if (rSize.GetHeightPercent() && rSize.GetHeightPercent() != 0xff) rSize.SetHeight(rSh.GetAnyCurRect(RECT_FLY_EMBEDDED).Height()); - UINT16 nDefPage = 0; - if(pArgs && pArgs->GetItemState(FN_FORMAT_FRAME_DLG, FALSE, &pItem) == SFX_ITEM_SET) + // disable vertical positioning for Math Objects anchored 'as char' if baseline alignment is activated + aSet.Put( SfxBoolItem( FN_MATH_BASELINE_ALIGNMENT, + rSh.GetDoc()->get( IDocumentSettingAccess::MATH_BASELINE_ALIGNMENT ) ) ); + const uno::Reference < embed::XEmbeddedObject > xObj( rSh.GetOleRef() ); + aSet.Put( SfxBoolItem( FN_OLE_IS_MATH, xObj.is() && SotExchange::IsMath( xObj->getClassID() ) ) ); + + sal_uInt16 nDefPage = 0; + if(pArgs && pArgs->GetItemState(FN_FORMAT_FRAME_DLG, sal_False, &pItem) == SFX_ITEM_SET) nDefPage = ((SfxUInt16Item *)pItem)->GetValue(); aSet.Put(SfxFrameItem( SID_DOCFRAME, &GetView().GetViewFrame()->GetTopFrame())); FieldUnit eMetric = ::GetDfltMetric(0 != PTR_CAST(SwWebView, &GetView())); - SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< UINT16 >(eMetric) )); + SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric) )); SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); OSL_ENSURE(pFact, "Dialogdiet fail!"); SfxAbstractTabDialog* pDlg = pFact->CreateFrmTabDialog( DLG_FRM_STD, GetView().GetViewFrame(), GetView().GetWindow(), - aSet, FALSE, + aSet, sal_False, nSel & nsSelectionType::SEL_GRF ? DLG_FRM_GRF : nSel & nsSelectionType::SEL_OLE ? DLG_FRM_OLE : DLG_FRM_STD, - FALSE, + sal_False, nDefPage); OSL_ENSURE(pDlg, "Dialogdiet fail!"); @@ -610,13 +616,13 @@ void SwFrameShell::Execute(SfxRequest &rReq) { rReq.Done(*pOutSet); if(nSel & nsSelectionType::SEL_OLE && - SFX_ITEM_SET == pOutSet->GetItemState(FN_KEEP_ASPECT_RATIO, TRUE, &pItem)) + SFX_ITEM_SET == pOutSet->GetItemState(FN_KEEP_ASPECT_RATIO, sal_True, &pItem)) { SwViewOption aUsrPref( *pVOpt ); aUsrPref.SetKeepRatio(((const SfxBoolItem*)pItem)->GetValue()); SW_MOD()->ApplyUsrPref(aUsrPref, &GetView()); } - if (SFX_ITEM_SET == pOutSet->GetItemState(FN_SET_FRM_ALT_NAME, TRUE, &pItem)) + if (SFX_ITEM_SET == pOutSet->GetItemState(FN_SET_FRM_ALT_NAME, sal_True, &pItem)) { // #i73249# rSh.SetObjTitle(((const SfxStringItem*)pItem)->GetValue()); @@ -628,7 +634,7 @@ void SwFrameShell::Execute(SfxRequest &rReq) rSh.AutoUpdateFrame(pFmt, *pOutSet); // alles, dass das Format nicht kann, muss hart // gesetzt werden - if(SFX_ITEM_SET == pOutSet->GetItemState(FN_SET_FRM_NAME, FALSE, &pItem)) + if(SFX_ITEM_SET == pOutSet->GetItemState(FN_SET_FRM_NAME, sal_False, &pItem)) rSh.SetFlyName(((SfxStringItem*)pItem)->GetValue()); SfxItemSet aShellSet(GetPool(), RES_FRM_SIZE, RES_FRM_SIZE, RES_SURROUND, RES_SURROUND, @@ -637,7 +643,7 @@ void SwFrameShell::Execute(SfxRequest &rReq) 0); aShellSet.Put(*pOutSet); aMgr.SetAttrSet(aShellSet); - if(SFX_ITEM_SET == pOutSet->GetItemState(FN_SET_FRM_NAME, FALSE, &pItem)) + if(SFX_ITEM_SET == pOutSet->GetItemState(FN_SET_FRM_NAME, sal_False, &pItem)) rSh.SetFlyName(((SfxStringItem*)pItem)->GetValue()); } else @@ -646,7 +652,7 @@ void SwFrameShell::Execute(SfxRequest &rReq) const SwFrmFmt* pCurrFlyFmt = rSh.GetFlyFrmFmt(); if(SFX_ITEM_SET == pOutSet->GetItemState(FN_PARAM_CHAIN_PREVIOUS, - FALSE, &pItem)) + sal_False, &pItem)) { rSh.HideChainMarker(); @@ -680,7 +686,7 @@ void SwFrameShell::Execute(SfxRequest &rReq) rSh.SetChainMarker(); } if(SFX_ITEM_SET == - pOutSet->GetItemState(FN_PARAM_CHAIN_NEXT, FALSE, + pOutSet->GetItemState(FN_PARAM_CHAIN_NEXT, sal_False, &pItem)) { rSh.HideChainMarker(); @@ -717,7 +723,7 @@ void SwFrameShell::Execute(SfxRequest &rReq) } } else - bUpdateMgr = FALSE; + bUpdateMgr = sal_False; delete pDlg; } } @@ -725,19 +731,19 @@ void SwFrameShell::Execute(SfxRequest &rReq) case FN_FRAME_MIRROR_ON_EVEN_PAGES: { SwFmtHoriOrient aHori(aMgr.GetHoriOrient()); - BOOL bMirror = !aHori.IsPosToggle(); + sal_Bool bMirror = !aHori.IsPosToggle(); aHori.SetPosToggle(bMirror); SfxItemSet aSet(GetPool(), RES_HORI_ORIENT, RES_HORI_ORIENT); aSet.Put(aHori); aMgr.SetAttrSet(aSet); - bCopyToFmt = TRUE; + bCopyToFmt = sal_True; rReq.SetReturnValue(SfxBoolItem(nSlot, bMirror)); } break; // --> OD 2009-07-14 #i73249# case FN_TITLE_DESCRIPTION_SHAPE: { - bUpdateMgr = FALSE; + bUpdateMgr = sal_False; SdrView* pSdrView = rSh.GetDrawViewWithValidMarkList(); if ( pSdrView && pSdrView->GetMarkedObjectCount() == 1 ) @@ -788,7 +794,7 @@ void SwFrameShell::Execute(SfxRequest &rReq) void SwFrameShell::GetState(SfxItemSet& rSet) { SwWrtShell &rSh = GetShell(); - BOOL bHtmlMode = 0 != ::GetHtmlMode(rSh.GetView().GetDocShell()); + sal_Bool bHtmlMode = 0 != ::GetHtmlMode(rSh.GetView().GetDocShell()); if (rSh.IsFrmSelected()) { SfxItemSet aSet( rSh.GetAttrPool(), @@ -799,16 +805,16 @@ void SwFrameShell::GetState(SfxItemSet& rSet) 0 ); rSh.GetFlyFrmAttr( aSet ); - BOOL bProtect = rSh.IsSelObjProtected(FLYPROTECT_POS); - BOOL bParentCntProt = rSh.IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT ) != 0; + sal_Bool bProtect = rSh.IsSelObjProtected(FLYPROTECT_POS); + sal_Bool bParentCntProt = rSh.IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT ) != 0; bProtect |= bParentCntProt; - const USHORT eFrmType = rSh.GetFrmType(0,TRUE); - SwFlyFrmAttrMgr aMgr( FALSE, &rSh, FRMMGR_TYPE_NONE ); + const sal_uInt16 eFrmType = rSh.GetFrmType(0,sal_True); + SwFlyFrmAttrMgr aMgr( sal_False, &rSh, FRMMGR_TYPE_NONE ); SfxWhichIter aIter( rSet ); - USHORT nWhich = aIter.FirstWhich(); + sal_uInt16 nWhich = aIter.FirstWhich(); while ( nWhich ) { switch ( nWhich ) @@ -830,7 +836,7 @@ void SwFrameShell::GetState(SfxItemSet& rSet) case RES_PRINT: case RES_SURROUND: { - rSet.Put(aSet.Get(GetPool().GetWhich(nWhich), TRUE )); + rSet.Put(aSet.Get(GetPool().GetWhich(nWhich), sal_True )); } break; case SID_OBJECT_ALIGN_LEFT : @@ -877,7 +883,7 @@ void SwFrameShell::GetState(SfxItemSet& rSet) rSet.DisableItem( nWhich ); else { - USHORT nId = 0; + sal_uInt16 nId = 0; if (eFrmType & FRMTYPE_FLY_INCNT) { switch (nWhich) @@ -942,7 +948,7 @@ void SwFrameShell::GetState(SfxItemSet& rSet) SfxItemSet aURLSet(GetPool(), RES_URL, RES_URL); rSh.GetFlyFrmAttr( aURLSet ); - if(SFX_ITEM_SET == aURLSet.GetItemState(RES_URL, TRUE, &pItem)) + if(SFX_ITEM_SET == aURLSet.GetItemState(RES_URL, sal_True, &pItem)) { const SwFmtURL* pFmtURL = (const SwFmtURL*)pItem; aHLinkItem.SetURL(pFmtURL->GetURL()); @@ -972,7 +978,7 @@ void SwFrameShell::GetState(SfxItemSet& rSet) } else { - BOOL bChainMode = rSh.GetView().GetEditWin().IsChainMode(); + sal_Bool bChainMode = rSh.GetView().GetEditWin().IsChainMode(); rSet.Put( SfxBoolItem( FN_FRAME_CHAIN, bChainMode ) ); } } @@ -1055,7 +1061,7 @@ SwFrameShell::~SwFrameShell() void SwFrameShell::ExecFrameStyle(SfxRequest& rReq) { SwWrtShell &rSh = GetShell(); - BOOL bDefault = FALSE; + sal_Bool bDefault = sal_False; if (!rSh.IsFrmSelected()) return; @@ -1070,7 +1076,7 @@ void SwFrameShell::ExecFrameStyle(SfxRequest& rReq) const SvxBoxItem& rBoxItem = (const SvxBoxItem&)aFrameSet.Get(RES_BOX); if (pPoolBoxItem == &rBoxItem) - bDefault = TRUE; + bDefault = sal_True; SvxBoxItem aBoxItem(rBoxItem); @@ -1083,7 +1089,7 @@ void SwFrameShell::ExecFrameStyle(SfxRequest& rReq) { case SID_ATTR_BORDER: { - if (pArgs->GetItemState(RES_BOX, TRUE, &pItem) == SFX_ITEM_SET) + if (pArgs->GetItemState(RES_BOX, sal_True, &pItem) == SFX_ITEM_SET) { SvxBoxItem aNewBox(*((SvxBoxItem *)pItem)); const SvxBorderLine* pBorderLine; @@ -1127,7 +1133,7 @@ void SwFrameShell::ExecFrameStyle(SfxRequest& rReq) case SID_FRAME_LINESTYLE: { - if (pArgs->GetItemState(SID_FRAME_LINESTYLE, FALSE, &pItem) == SFX_ITEM_SET) + if (pArgs->GetItemState(SID_FRAME_LINESTYLE, sal_False, &pItem) == SFX_ITEM_SET) { const SvxLineItem* pLineItem = (const SvxLineItem*)pItem; @@ -1181,7 +1187,7 @@ void SwFrameShell::ExecFrameStyle(SfxRequest& rReq) case SID_FRAME_LINECOLOR: { - if (pArgs->GetItemState(SID_FRAME_LINECOLOR, FALSE, &pItem) == SFX_ITEM_SET) + if (pArgs->GetItemState(SID_FRAME_LINECOLOR, sal_False, &pItem) == SFX_ITEM_SET) { const Color& rNewColor = ((const SvxColorItem*)pItem)->GetValue(); @@ -1244,7 +1250,7 @@ void lcl_FrmGetMaxLineWidth(const SvxBorderLine* pBorderLine, SvxBorderLine& rBo void SwFrameShell::GetLineStyleState(SfxItemSet &rSet) { SwWrtShell &rSh = GetShell(); - BOOL bParentCntProt = rSh.IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT ) != 0; + sal_Bool bParentCntProt = rSh.IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT ) != 0; if (bParentCntProt) { diff --git a/sw/source/ui/shells/grfsh.cxx b/sw/source/ui/shells/grfsh.cxx index 7464b22b06..2d826fec42 100644 --- a/sw/source/ui/shells/grfsh.cxx +++ b/sw/source/ui/shells/grfsh.cxx @@ -95,7 +95,7 @@ void SwGrfShell::Execute(SfxRequest &rReq) { SwWrtShell &rSh = GetShell(); - USHORT nSlot = rReq.GetSlot(); + sal_uInt16 nSlot = rReq.GetSlot(); switch(nSlot) { case SID_TWAIN_TRANSFER: @@ -130,7 +130,7 @@ void SwGrfShell::Execute(SfxRequest &rReq) case SID_INSERT_GRAPHIC: case FN_FORMAT_GRAFIC_DLG: { - SwFlyFrmAttrMgr aMgr( FALSE, &rSh, rSh.IsFrmSelected() ? + SwFlyFrmAttrMgr aMgr( sal_False, &rSh, rSh.IsFrmSelected() ? FRMMGR_TYPE_NONE : FRMMGR_TYPE_GRF); const SwViewOption* pVOpt = rSh.GetViewOptions(); SwViewOption aUsrPref( *pVOpt ); @@ -152,10 +152,10 @@ void SwGrfShell::Execute(SfxRequest &rReq) FN_SET_FRM_ALT_NAME, FN_SET_FRM_ALT_NAME, 0); - USHORT nHtmlMode = ::GetHtmlMode(GetView().GetDocShell()); + sal_uInt16 nHtmlMode = ::GetHtmlMode(GetView().GetDocShell()); aSet.Put(SfxUInt16Item(SID_HTML_MODE, nHtmlMode)); FieldUnit eMetric = ::GetDfltMetric((0 != (nHtmlMode&HTMLMODE_ON))); - SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< UINT16 >(eMetric)) ); + SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric)) ); const SwRect* pRect = &rSh.GetAnyCurRect(RECT_PAGE); SwFmtFrmSize aFrmSize( ATT_VAR_SIZE, pRect->Width(), pRect->Height()); @@ -242,7 +242,7 @@ void SwGrfShell::Execute(SfxRequest &rReq) SfxAbstractTabDialog* pDlg = pFact->CreateFrmTabDialog( DLG_FRM_GRF, GetView().GetViewFrame(), GetView().GetWindow(), - aSet, FALSE, DLG_FRM_GRF); + aSet, sal_False, DLG_FRM_GRF); OSL_ENSURE(pDlg, "Dialogdiet fail!"); if( pDlg->Execute() ) { @@ -253,7 +253,7 @@ void SwGrfShell::Execute(SfxRequest &rReq) rReq.Done(*pSet); // change the 2 frmsize SizeItems to the correct SwFrmSizeItem if( SFX_ITEM_SET == pSet->GetItemState( - SID_ATTR_GRAF_FRMSIZE, FALSE, &pItem )) + SID_ATTR_GRAF_FRMSIZE, sal_False, &pItem )) { SwFmtFrmSize aSize; const Size& rSz = ((SvxSizeItem*)pItem)->GetSize(); @@ -261,11 +261,11 @@ void SwGrfShell::Execute(SfxRequest &rReq) aSize.SetHeight( rSz.Height() ); if( SFX_ITEM_SET == pSet->GetItemState( - SID_ATTR_GRAF_FRMSIZE_PERCENT, FALSE, &pItem )) + SID_ATTR_GRAF_FRMSIZE_PERCENT, sal_False, &pItem )) { const Size& rRelativeSize = ((SvxSizeItem*)pItem)->GetSize(); - aSize.SetWidthPercent( static_cast< BYTE >( rRelativeSize.Width() ) ); - aSize.SetHeightPercent( static_cast< BYTE >( rRelativeSize.Height() ) ); + aSize.SetWidthPercent( static_cast< sal_uInt8 >( rRelativeSize.Width() ) ); + aSize.SetHeightPercent( static_cast< sal_uInt8 >( rRelativeSize.Height() ) ); } pSet->Put( aSize ); } @@ -289,20 +289,20 @@ void SwGrfShell::Execute(SfxRequest &rReq) } aMgr.UpdateFlyFrm(); - BOOL bApplyUsrPref = FALSE; + sal_Bool bApplyUsrPref = sal_False; if (SFX_ITEM_SET == pSet->GetItemState( - FN_KEEP_ASPECT_RATIO, TRUE, &pItem )) + FN_KEEP_ASPECT_RATIO, sal_True, &pItem )) { aUsrPref.SetKeepRatio( ((const SfxBoolItem*)pItem)->GetValue() ); - bApplyUsrPref = TRUE; + bApplyUsrPref = sal_True; } if( SFX_ITEM_SET == pSet->GetItemState( - SID_ATTR_GRAF_KEEP_ZOOM, TRUE, &pItem )) + SID_ATTR_GRAF_KEEP_ZOOM, sal_True, &pItem )) { aUsrPref.SetGrfKeepZoom( ((const SfxBoolItem*)pItem)->GetValue() ); - bApplyUsrPref = TRUE; + bApplyUsrPref = sal_True; } if( bApplyUsrPref ) @@ -310,7 +310,7 @@ void SwGrfShell::Execute(SfxRequest &rReq) // and now set all the graphic attributes and other stuff if( SFX_ITEM_SET == pSet->GetItemState( - SID_ATTR_GRAF_GRAPHIC, TRUE, &pItem )) + SID_ATTR_GRAF_GRAPHIC, sal_True, &pItem )) { if( ((SvxBrushItem*)pItem)->GetGraphicLink() ) sGrfNm = *((SvxBrushItem*)pItem)->GetGraphicLink(); @@ -325,7 +325,7 @@ void SwGrfShell::Execute(SfxRequest &rReq) if( sGrfNm.Len() ) { SwDocShell* pDocSh = GetView().GetDocShell(); - SwWait aWait( *pDocSh, TRUE ); + SwWait aWait( *pDocSh, sal_True ); SfxMedium* pMedium = pDocSh->GetMedium(); INetURLObject aAbs; if( pMedium ) @@ -337,7 +337,7 @@ void SwGrfShell::Execute(SfxRequest &rReq) } } if ( SFX_ITEM_SET == pSet->GetItemState( - FN_SET_FRM_ALT_NAME, TRUE, &pItem )) + FN_SET_FRM_ALT_NAME, sal_True, &pItem )) { // #i73249# rSh.SetObjTitle( ((const SfxStringItem*)pItem)->GetValue() ); @@ -375,7 +375,7 @@ void SwGrfShell::Execute(SfxRequest &rReq) void SwGrfShell::ExecAttr( SfxRequest &rReq ) { - USHORT nGrfType; + sal_uInt16 nGrfType; if( CNT_GRF == GetShell().GetCntType() && ( GRAPHIC_BITMAP == ( nGrfType = GetShell().GetGraphicType()) || GRAPHIC_GDIMETAFILE == nGrfType )) @@ -384,8 +384,8 @@ void SwGrfShell::ExecAttr( SfxRequest &rReq ) RES_GRFATR_END -1 ); const SfxItemSet *pArgs = rReq.GetArgs(); const SfxPoolItem* pItem; - USHORT nSlot = rReq.GetSlot(); - if( !pArgs || SFX_ITEM_SET != pArgs->GetItemState( nSlot, FALSE, &pItem )) + sal_uInt16 nSlot = rReq.GetSlot(); + if( !pArgs || SFX_ITEM_SET != pArgs->GetItemState( nSlot, sal_False, &pItem )) pItem = 0; switch( nSlot ) @@ -396,7 +396,7 @@ void SwGrfShell::ExecAttr( SfxRequest &rReq ) GetShell().GetCurAttr( aGrfSet ); SwMirrorGrf aMirror( (SwMirrorGrf&)aGrfSet.Get( RES_GRFATR_MIRRORGRF ) ); - USHORT nMirror = aMirror.GetValue(); + sal_uInt16 nMirror = aMirror.GetValue(); if( FN_FLIP_VERT_GRAFIC == nSlot ) switch( nMirror ) { @@ -524,23 +524,23 @@ void SwGrfShell::GetAttrState(SfxItemSet &rSet) SwWrtShell &rSh = GetShell(); SfxItemSet aCoreSet( GetPool(), aNoTxtNodeSetRange ); rSh.GetCurAttr( aCoreSet ); - BOOL bParentCntProt = 0 != rSh.IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT ); - BOOL bIsGrfCntnt = CNT_GRF == GetShell().GetCntType(); + sal_Bool bParentCntProt = 0 != rSh.IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT ); + sal_Bool bIsGrfCntnt = CNT_GRF == GetShell().GetCntType(); SetGetStateSet( &rSet ); SfxWhichIter aIter( rSet ); - USHORT nWhich = aIter.FirstWhich(); + sal_uInt16 nWhich = aIter.FirstWhich(); while( nWhich ) { - BOOL bDisable = bParentCntProt; + sal_Bool bDisable = bParentCntProt; switch( nWhich ) { case SID_INSERT_GRAPHIC: case FN_FORMAT_GRAFIC_DLG: case SID_TWAIN_TRANSFER: if( bParentCntProt || !bIsGrfCntnt ) - bDisable = TRUE; + bDisable = sal_True; break; case FN_SAVE_GRAPHIC: if( rSh.GetGraphicType() == GRAPHIC_NONE ) @@ -556,7 +556,7 @@ void SwGrfShell::GetAttrState(SfxItemSet &rSet) case SID_COLOR_SETTINGS: { if ( bParentCntProt || !bIsGrfCntnt ) - bDisable = TRUE; + bDisable = sal_True; else { svx::ToolboxAccess aToolboxAccess( TOOLBOX_NAME ); @@ -616,7 +616,7 @@ void SwGrfShell::GetAttrState(SfxItemSet &rSet) case SID_ATTR_GRAF_GAMMA: if( !bParentCntProt ) - rSet.Put( SfxUInt32Item( nWhich, static_cast< UINT32 >( + rSet.Put( SfxUInt32Item( nWhich, static_cast< sal_uInt32 >( ( (SwGammaGrf&)aCoreSet.Get( RES_GRFATR_GAMMA ) ).GetValue() * 100 ) ) ); break; case SID_ATTR_GRAF_TRANSPARENCE: @@ -628,7 +628,7 @@ void SwGrfShell::GetAttrState(SfxItemSet &rSet) { if( pGrfObj->IsAnimated() || GRAPHIC_GDIMETAFILE == pGrfObj->GetType() ) - bDisable = TRUE; + bDisable = sal_True; else rSet.Put( SfxUInt16Item( nWhich, ((SwTransparencyGrf&) aCoreSet.Get(RES_GRFATR_TRANSPARENCY)).GetValue() )); @@ -661,18 +661,18 @@ void SwGrfShell::GetAttrState(SfxItemSet &rSet) case SID_GRFFILTER_SOLARIZE: { if( bParentCntProt || !bIsGrfCntnt ) - bDisable = TRUE; + bDisable = sal_True; // #i59688# load graphic only if type is unknown else { - const USHORT eGraphicType( rSh.GetGraphicType() ); + const sal_uInt16 eGraphicType( rSh.GetGraphicType() ); if ( ( eGraphicType == GRAPHIC_NONE || eGraphicType == GRAPHIC_DEFAULT ) && - rSh.IsGrfSwapOut( TRUE ) ) + rSh.IsGrfSwapOut( sal_True ) ) { rSet.DisableItem( nWhich ); if( AddGrfUpdateSlot( nWhich )) - rSh.GetGraphic(FALSE); // start the loading + rSh.GetGraphic(sal_False); // start the loading } else { @@ -684,7 +684,7 @@ void SwGrfShell::GetAttrState(SfxItemSet &rSet) break; default: - bDisable = FALSE; + bDisable = sal_False; } if( bDisable ) diff --git a/sw/source/ui/shells/grfshex.cxx b/sw/source/ui/shells/grfshex.cxx index 4be17b7fa1..2273153881 100644 --- a/sw/source/ui/shells/grfshex.cxx +++ b/sw/source/ui/shells/grfshex.cxx @@ -65,7 +65,6 @@ // -> #111827# #include <SwRewriter.hxx> -#include <undobj.hxx> #include <comcore.hrc> // <- #111827# diff --git a/sw/source/ui/shells/langhelper.cxx b/sw/source/ui/shells/langhelper.cxx index 4385146ec4..cad6681743 100644..100755 --- a/sw/source/ui/shells/langhelper.cxx +++ b/sw/source/ui/shells/langhelper.cxx @@ -68,14 +68,14 @@ using namespace ::com::sun::star; namespace SwLangHelper { - USHORT GetLanguageStatus( OutlinerView* pOLV, SfxItemSet& rSet ) + sal_uInt16 GetLanguageStatus( OutlinerView* pOLV, SfxItemSet& rSet ) { ESelection aSelection = pOLV->GetSelection(); EditView& rEditView=pOLV->GetEditView(); EditEngine* pEditEngine=rEditView.GetEditEngine(); // the value of used script types - const USHORT nScriptType =pOLV->GetSelectedScriptType(); + const sal_uInt16 nScriptType =pOLV->GetSelectedScriptType(); String aScriptTypesInUse( String::CreateFromInt32( nScriptType ) );//pEditEngine->GetScriptType(aSelection) SvtLanguageTable aLangTable; @@ -186,7 +186,7 @@ namespace SwLangHelper if (!bForSelection) // document language to be changed... { rSh.StartAction(); - rSh.LockView( TRUE ); + rSh.LockView( sal_True ); rSh.Push(); // prepare to apply new language to all text in document @@ -206,7 +206,7 @@ namespace SwLangHelper if (bForSelection) { const SwViewOption* pVOpt = rView.GetWrtShellPtr()->GetViewOptions(); - ULONG nCntrl = pEditEngine->GetControlWord(); + sal_uLong nCntrl = pEditEngine->GetControlWord(); // turn off if (!pVOpt->IsOnlineSpell()) nCntrl &= ~EE_CNTRL_ONLINESPELLING; @@ -228,8 +228,8 @@ namespace SwLangHelper if (!bForSelection) { // need to release view and restore selection... - rSh.Pop( FALSE ); - rSh.LockView( FALSE ); + rSh.Pop( sal_False ); + rSh.LockView( sal_False ); rSh.EndAction(); } } @@ -253,13 +253,13 @@ namespace SwLangHelper const LanguageType nLang = SvtLanguageTable().GetType( rLangText ); if (nLang != LANGUAGE_DONTKNOW) { - USHORT nScriptType = SvtLanguageOptions::GetScriptTypeOfLanguage( nLang ); + sal_uInt16 nScriptType = SvtLanguageOptions::GetScriptTypeOfLanguage( nLang ); EditEngine* pEditEngine = pOLV ? pOLV->GetEditView().GetEditEngine() : NULL; OSL_ENSURE( !pOLV || pEditEngine, "OutlinerView without EditEngine???" ); //get ScriptType - USHORT nLangWhichId = 0; + sal_uInt16 nLangWhichId = 0; bool bIsSingleScriptType = true; switch (nScriptType) { @@ -301,11 +301,9 @@ namespace SwLangHelper } rWrtSh.SetDefault( SvxLanguageItem( nLang, nLangWhichId ) ); - // set respective language attribute in text document to default + // #i102191: hard set respective language attribute in text document // (for all text in the document - which should be selected by now...) - SvUShortsSort aAttribs; - aAttribs.Insert( nLangWhichId ); - rWrtSh.ResetAttr( &aAttribs ); + rWrtSh.SetAttr( SvxLanguageItem( nLang, nLangWhichId ) ); } } } @@ -319,7 +317,7 @@ namespace SwLangHelper void SetLanguage_None( SwWrtShell &rWrtSh, OutlinerView* pOLV, ESelection aSelection, bool bIsForSelection, SfxItemSet &rCoreSet ) { // EditEngine IDs - const USHORT aLangWhichId_EE[3] = + const sal_uInt16 aLangWhichId_EE[3] = { EE_CHAR_LANGUAGE, EE_CHAR_LANGUAGE_CJK, @@ -327,7 +325,7 @@ namespace SwLangHelper }; // Writewr IDs - const USHORT aLangWhichId_Writer[3] = + const sal_uInt16 aLangWhichId_Writer[3] = { RES_CHRATR_LANGUAGE, RES_CHRATR_CJK_LANGUAGE, @@ -409,7 +407,7 @@ namespace SwLangHelper /// If there are more than one languages used LANGUAGE_DONTKNOW will be returned. /// @param nLangWhichId : one of /// RES_CHRATR_LANGUAGE, RES_CHRATR_CJK_LANGUAGE, RES_CHRATR_CTL_LANGUAGE, - LanguageType GetLanguage( SwWrtShell &rSh, USHORT nLangWhichId ) + LanguageType GetLanguage( SwWrtShell &rSh, sal_uInt16 nLangWhichId ) { SfxItemSet aSet( rSh.GetAttrPool(), nLangWhichId, nLangWhichId ); rSh.GetCurAttr( aSet ); @@ -417,13 +415,13 @@ namespace SwLangHelper return GetLanguage(aSet,nLangWhichId); } - LanguageType GetLanguage( SfxItemSet aSet, USHORT nLangWhichId ) + LanguageType GetLanguage( SfxItemSet aSet, sal_uInt16 nLangWhichId ) { LanguageType nLang = LANGUAGE_SYSTEM; const SfxPoolItem *pItem = 0; - SfxItemState nState = aSet.GetItemState( nLangWhichId, TRUE, &pItem ); + SfxItemState nState = aSet.GetItemState( nLangWhichId, sal_True, &pItem ); if (nState > SFX_ITEM_DEFAULT && pItem) { // the item is set and can be used @@ -451,10 +449,10 @@ namespace SwLangHelper LanguageType GetCurrentLanguage( SwWrtShell &rSh ) { // get all script types used in current selection - const USHORT nScriptType = rSh.GetScriptType(); + const sal_uInt16 nScriptType = rSh.GetScriptType(); //set language attribute to use according to the script type - USHORT nLangWhichId = 0; + sal_uInt16 nLangWhichId = 0; bool bIsSingleScriptType = true; switch (nScriptType) { @@ -473,7 +471,7 @@ namespace SwLangHelper // check if all script types are set to LANGUAGE_NONE and return // that if this is the case. Otherwise, having multiple script types // in use always means there are several languages in use... - const USHORT aScriptTypes[3] = + const sal_uInt16 aScriptTypes[3] = { RES_CHRATR_LANGUAGE, RES_CHRATR_CJK_LANGUAGE, @@ -499,10 +497,10 @@ namespace SwLangHelper /// 'In use' means the language(s) matching the script type(s) of the /// selected text. Or in other words, the language a spell checker would use. /// If there is more than one language LANGUAGE_DONTKNOW will be returned. - LanguageType GetCurrentLanguage( SfxItemSet aSet, USHORT nScriptType ) + LanguageType GetCurrentLanguage( SfxItemSet aSet, sal_uInt16 nScriptType ) { //set language attribute to use according to the script type - USHORT nLangWhichId = 0; + sal_uInt16 nLangWhichId = 0; bool bIsSingleScriptType = true; switch (nScriptType) { @@ -521,7 +519,7 @@ namespace SwLangHelper // check if all script types are set to LANGUAGE_NONE and return // that if this is the case. Otherwise, having multiple script types // in use always means there are several languages in use... - const USHORT aScriptTypes[3] = + const sal_uInt16 aScriptTypes[3] = { EE_CHAR_LANGUAGE, EE_CHAR_LANGUAGE_CJK, diff --git a/sw/source/ui/shells/listsh.cxx b/sw/source/ui/shells/listsh.cxx index abf89407e4..e9d341ac69 100644 --- a/sw/source/ui/shells/listsh.cxx +++ b/sw/source/ui/shells/listsh.cxx @@ -84,7 +84,7 @@ void lcl_OutlineUpDownWithSubPoints( SwWrtShell& rSh, bool bMove, bool bUp ) if ( nActPos < USHRT_MAX && rSh.IsOutlineMovable( nActPos ) ) { rSh.Push(); - rSh.MakeOutlineSel( nActPos, nActPos, TRUE ); + rSh.MakeOutlineSel( nActPos, nActPos, sal_True ); if ( bMove ) { @@ -148,7 +148,7 @@ void lcl_OutlineUpDownWithSubPoints( SwWrtShell& rSh, bool bMove, bool bUp ) void SwListShell::Execute(SfxRequest &rReq) { const SfxItemSet* pArgs = rReq.GetArgs(); - USHORT nSlot = rReq.GetSlot(); + sal_uInt16 nSlot = rReq.GetSlot(); SwWrtShell& rSh = GetShell(); // #i35572# @@ -165,8 +165,8 @@ void SwListShell::Execute(SfxRequest &rReq) rReq.Done(); rSh.NumUpDown( ( nSlot == FN_NUM_BULLET_DOWN ) - ? TRUE - : FALSE ); + ? sal_True + : sal_False ); pFrame->GetBindings().Invalidate( SID_TABLE_CELL ); // StatusZeile updaten! } break; @@ -185,7 +185,7 @@ void SwListShell::Execute(SfxRequest &rReq) { rReq.Ignore(); SfxRequest aReq( GetView().GetViewFrame(), FN_NUM_BULLET_ON ); - aReq.AppendItem( SfxBoolItem( FN_PARAM_1, FALSE ) ); + aReq.AppendItem( SfxBoolItem( FN_PARAM_1, sal_False ) ); aReq.Done(); rSh.DelNumRules(); break; @@ -195,7 +195,7 @@ void SwListShell::Execute(SfxRequest &rReq) if ( bOutline ) lcl_OutlineUpDownWithSubPoints( rSh, false, false ); else - rSh.MoveNumParas(FALSE, FALSE); + rSh.MoveNumParas(sal_False, sal_False); rReq.Done(); break; @@ -203,7 +203,7 @@ void SwListShell::Execute(SfxRequest &rReq) if ( bOutline ) lcl_OutlineUpDownWithSubPoints( rSh, true, false ); else - rSh.MoveNumParas(TRUE, FALSE); + rSh.MoveNumParas(sal_True, sal_False); rReq.Done(); break; @@ -211,7 +211,7 @@ void SwListShell::Execute(SfxRequest &rReq) if ( bOutline ) lcl_OutlineUpDownWithSubPoints( rSh, true, true ); else - rSh.MoveNumParas(TRUE, TRUE); + rSh.MoveNumParas(sal_True, sal_True); rReq.Done(); break; @@ -219,7 +219,7 @@ void SwListShell::Execute(SfxRequest &rReq) if ( bOutline ) lcl_OutlineUpDownWithSubPoints( rSh, false, true ); else - rSh.MoveNumParas(FALSE, TRUE); + rSh.MoveNumParas(sal_False, sal_True); rReq.Done(); break; @@ -230,8 +230,8 @@ void SwListShell::Execute(SfxRequest &rReq) case FN_NUM_OR_NONUM: { - BOOL bApi = rReq.IsAPI(); - BOOL bDelete = !rSh.IsNoNum(!bApi); + sal_Bool bApi = rReq.IsAPI(); + sal_Bool bDelete = !rSh.IsNoNum(!bApi); if(pArgs ) bDelete = ((SfxBoolItem &)pArgs->Get(rReq.GetSlot())).GetValue(); rSh.NumOrNoNum( bDelete, !bApi ); @@ -249,15 +249,15 @@ void SwListShell::Execute(SfxRequest &rReq) void SwListShell::GetState(SfxItemSet &rSet) { SfxWhichIter aIter( rSet ); - USHORT nWhich = aIter.FirstWhich(); + sal_uInt16 nWhich = aIter.FirstWhich(); SwWrtShell& rSh = GetShell(); - BYTE nCurrentNumLevel = rSh.GetNumLevel(); + sal_uInt8 nCurrentNumLevel = rSh.GetNumLevel(); while ( nWhich ) { switch( nWhich ) { case FN_NUM_OR_NONUM: - rSet.Put(SfxBoolItem(nWhich, GetShell().IsNoNum(FALSE))); + rSet.Put(SfxBoolItem(nWhich, GetShell().IsNoNum(sal_False))); break; case FN_NUM_BULLET_OUTLINE_UP: case FN_NUM_BULLET_UP: diff --git a/sw/source/ui/shells/makefile.mk b/sw/source/ui/shells/makefile.mk deleted file mode 100644 index 26990e7891..0000000000 --- a/sw/source/ui/shells/makefile.mk +++ /dev/null @@ -1,84 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=shells - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -SRS1NAME=$(TARGET) -SRC1FILES = \ - shells.src - -SLOFILES = \ - $(EXCEPTIONSFILES) - -EXCEPTIONSFILES = \ - $(SLO)$/annotsh.obj \ - $(SLO)$/basesh.obj \ - $(SLO)$/beziersh.obj \ - $(SLO)$/drawdlg.obj \ - $(SLO)$/drawsh.obj \ - $(SLO)$/drformsh.obj \ - $(SLO)$/drwbassh.obj \ - $(SLO)$/drwtxtex.obj \ - $(SLO)$/drwtxtsh.obj \ - $(SLO)$/frmsh.obj \ - $(SLO)$/grfsh.obj \ - $(SLO)$/grfshex.obj \ - $(SLO)$/langhelper.obj \ - $(SLO)$/listsh.obj \ - $(SLO)$/navsh.obj \ - $(SLO)$/mediash.obj \ - $(SLO)$/olesh.obj \ - $(SLO)$/slotadd.obj \ - $(SLO)$/tabsh.obj \ - $(SLO)$/textdrw.obj \ - $(SLO)$/textfld.obj \ - $(SLO)$/textglos.obj \ - $(SLO)$/textidx.obj \ - $(SLO)$/textsh.obj \ - $(SLO)$/textsh1.obj \ - $(SLO)$/textsh2.obj \ - $(SLO)$/txtattr.obj \ - $(SLO)$/txtcrsr.obj \ - $(SLO)$/txtnum.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - -$(SRS)$/shells.srs: $(SOLARINCDIR)$/svx$/globlmn.hrc - diff --git a/sw/source/ui/shells/mediash.cxx b/sw/source/ui/shells/mediash.cxx index c086fae370..897300ed18 100644 --- a/sw/source/ui/shells/mediash.cxx +++ b/sw/source/ui/shells/mediash.cxx @@ -95,10 +95,10 @@ void SwMediaShell::ExecMedia(SfxRequest &rReq) if( pSdrView ) { const SfxItemSet* pArgs = rReq.GetArgs(); - USHORT nSlotId = rReq.GetSlot(); - BOOL bChanged = pSdrView->GetModel()->IsChanged(); + sal_uInt16 nSlotId = rReq.GetSlot(); + sal_Bool bChanged = pSdrView->GetModel()->IsChanged(); - pSdrView->GetModel()->SetChanged( FALSE ); + pSdrView->GetModel()->SetChanged( sal_False ); switch( nSlotId ) { @@ -123,7 +123,7 @@ void SwMediaShell::ExecMedia(SfxRequest &rReq) { const SfxPoolItem* pItem; - if( !pArgs || ( SFX_ITEM_SET != pArgs->GetItemState( SID_AVMEDIA_TOOLBOX, FALSE, &pItem ) ) ) + if( !pArgs || ( SFX_ITEM_SET != pArgs->GetItemState( SID_AVMEDIA_TOOLBOX, sal_False, &pItem ) ) ) pItem = NULL; if( pItem ) @@ -154,14 +154,14 @@ void SwMediaShell::ExecMedia(SfxRequest &rReq) if( pSdrView->GetModel()->IsChanged() ) GetShell().SetModified(); else if( bChanged ) - pSdrView->GetModel()->SetChanged(TRUE); + pSdrView->GetModel()->SetChanged(sal_True); } } void SwMediaShell::GetMediaState(SfxItemSet &rSet) { SfxWhichIter aIter( rSet ); - USHORT nWhich = aIter.FirstWhich(); + sal_uInt16 nWhich = aIter.FirstWhich(); while( nWhich ) { diff --git a/sw/source/ui/shells/navsh.cxx b/sw/source/ui/shells/navsh.cxx index 055f8165bc..7c0c338149 100644 --- a/sw/source/ui/shells/navsh.cxx +++ b/sw/source/ui/shells/navsh.cxx @@ -33,7 +33,7 @@ #include "cmdid.h" #include <svx/svdview.hxx> -#include <svx/srchitem.hxx> +#include <svl/srchitem.hxx> #include <svl/eitem.hxx> #include <svl/whiter.hxx> #include <svx/svdopath.hxx> @@ -77,13 +77,13 @@ void SwNavigationShell::Execute(SfxRequest &rReq) SwWrtShell *pSh = &GetShell(); SdrView* pSdrView = pSh->GetDrawView(); const SfxItemSet *pArgs = rReq.GetArgs(); - USHORT nSlotId = rReq.GetSlot(); - BOOL bChanged = pSdrView->GetModel()->IsChanged(); - pSdrView->GetModel()->SetChanged(FALSE); + sal_uInt16 nSlotId = rReq.GetSlot(); + sal_Bool bChanged = pSdrView->GetModel()->IsChanged(); + pSdrView->GetModel()->SetChanged(sal_False); SwNavigationMgr& aSwNavigationMgr = pSh->GetNavigationMgr(); const SfxPoolItem* pItem; if(pArgs) - pArgs->GetItemState(nSlotId, FALSE, &pItem); + pArgs->GetItemState(nSlotId, sal_False, &pItem); switch (nSlotId) { case FN_NAVIGATION_BACK: @@ -99,7 +99,7 @@ void SwNavigationShell::Execute(SfxRequest &rReq) if (pSdrView->GetModel()->IsChanged()) GetShell().SetModified(); else if (bChanged) - pSdrView->GetModel()->SetChanged(TRUE); + pSdrView->GetModel()->SetChanged(sal_True); } /*-------------------------------------------------------------------- @@ -111,7 +111,7 @@ void SwNavigationShell::GetState(SfxItemSet &rSet) { SwWrtShell *pSh = &GetShell(); SfxWhichIter aIter( rSet ); - USHORT nWhich = aIter.FirstWhich(); + sal_uInt16 nWhich = aIter.FirstWhich(); SwNavigationMgr& aNavigationMgr = pSh->GetNavigationMgr(); while( nWhich ) { diff --git a/sw/source/ui/shells/shells.src b/sw/source/ui/shells/shells.src index 9b95ae9853..bf2343c406 100644 --- a/sw/source/ui/shells/shells.src +++ b/sw/source/ui/shells/shells.src @@ -155,880 +155,46 @@ String RID_TEXT_TOOLBOX Text [ en-US ] = "Text Object Bar" ; Text [ x-comment ] = " "; }; -ToolBox RID_TEXT_TOOLBOX -{ - HelpID = HID_TEXT_TOOLBOX ; - Border = TRUE ; - SVLook = TRUE ; - Dockable = TRUE ; - Moveable = TRUE ; - Sizeable = TRUE ; - Closeable = TRUE ; - Zoomable = TRUE ; - HideWhenDeactivate = TRUE ; - LineSpacing = TRUE ; - Customize = TRUE ; - MenuStrings = TRUE ; - Hide = TRUE ; - ItemList = - { - MN_TEMPLATE - MN_FONT - MN_TEXT1(TRUE) - MN_TEXT1_BLOCK - MN_TEXT_LTR_RTL - MN_TEXT_LINESPACE - MN_TEXT2 - MN_TEXT_BACKGROUND - MN_TEXT_DIALOGS(TRUE) - }; - Scroll = TRUE ; -}; String RID_TABLE_TOOLBOX { Text [ en-US ] = "Table Object Bar" ; Text [ x-comment ] = " "; }; -ToolBox RID_TABLE_TOOLBOX -{ - HelpID = HID_TABLE_TOOLBOX ; - Border = TRUE ; - SVLook = TRUE ; - Dockable = TRUE ; - Moveable = TRUE ; - Sizeable = TRUE ; - Closeable = TRUE ; - Zoomable = TRUE ; - LineSpacing = TRUE ; - HideWhenDeactivate = TRUE ; - Customize = TRUE ; - MenuStrings = TRUE ; - Hide = TRUE ; - Scroll = TRUE ; - ItemList = - { - MN_TEMPLATE - MN_FONT - ToolBoxItem - { - Identifier = FN_TABLE_AUTOSUM ; - HelpID = FN_TABLE_AUTOSUM ; - }; - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - Identifier = FN_TABLE_MODE_FIX ; - HelpID = FN_TABLE_MODE_FIX ; - }; - ToolBoxItem - { - Identifier = FN_TABLE_MODE_FIX_PROP ; - HelpID = FN_TABLE_MODE_FIX_PROP ; - }; - ToolBoxItem - { - Identifier = FN_TABLE_MODE_VARIABLE ; - HelpID = FN_TABLE_MODE_VARIABLE ; - }; - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - Identifier = FN_TABLE_MERGE_CELLS ; - HelpID = FN_TABLE_MERGE_CELLS ; - }; - ToolBoxItem - { - Identifier = FN_TABLE_SPLIT_CELLS ; - HelpID = FN_TABLE_SPLIT_CELLS ; - }; - ToolBoxItem - { - DropDown = TRUE ; - Identifier = FN_OPTIMIZE_TABLE ; - HelpID = FN_OPTIMIZE_TABLE ; - }; - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - Identifier = FN_TABLE_INSERT_ROW ; - HelpID = FN_TABLE_INSERT_ROW ; - }; - ToolBoxItem - { - Identifier = FN_TABLE_INSERT_COL ; - HelpID = FN_TABLE_INSERT_COL ; - }; - ToolBoxItem - { - Identifier = FN_TABLE_DELETE_ROW ; - HelpID = FN_TABLE_DELETE_ROW ; - }; - ToolBoxItem - { - Identifier = FN_TABLE_DELETE_COL ; - HelpID = FN_TABLE_DELETE_COL ; - }; - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - Identifier = FN_TABLE_SELECT_ALL; - HelpID = FN_TABLE_SELECT_ALL; - Hide = TRUE; - }; - ToolBoxItem - { - Identifier = FN_TABLE_SELECT_COL; - HelpID = FN_TABLE_SELECT_COL; - Hide = TRUE; - }; - ToolBoxItem - { - Identifier = FN_TABLE_SELECT_ROW; - HelpID = FN_TABLE_SELECT_ROW; - Hide = TRUE; - }; - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - Identifier = FN_TABLE_VERT_NONE; - HelpID = FN_TABLE_VERT_NONE; - RadioCheck = TRUE; - Hide = TRUE; - }; - ToolBoxItem - { - Identifier = FN_TABLE_VERT_CENTER; - HelpID = FN_TABLE_VERT_CENTER; - RadioCheck = TRUE; - Hide = TRUE; - }; - ToolBoxItem - { - Identifier = FN_TABLE_VERT_BOTTOM; - HelpID = FN_TABLE_VERT_BOTTOM; - RadioCheck = TRUE; - Hide = TRUE; - }; - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - ITEM_TOOLBAR_ATTR_BORDER - }; - ToolBoxItem - { - ITEM_TOOLBAR_FRAME_LINESTYLE - }; - ToolBoxItem - { - ITEM_TOOLBAR_FRAME_LINECOLOR - Hide = TRUE; - }; - ToolBoxItem - { - ITEM_TOOLBAR_BACKGROUND_COLOR - }; - }; -}; String RID_FRAME_TOOLBOX { Text [ en-US ] = "Frame Object Bar" ; Text [ x-comment ] = " "; }; -ToolBox RID_FRAME_TOOLBOX -{ - HelpID = HID_FRAME_TOOLBOX ; - Border = TRUE ; - SVLook = TRUE ; - Dockable = TRUE ; - Moveable = TRUE ; - Sizeable = TRUE ; - Closeable = TRUE ; - Zoomable = TRUE ; - LineSpacing = TRUE ; - MenuStrings = TRUE ; - HideWhenDeactivate = TRUE ; - Customize = TRUE ; - Hide = TRUE ; - ItemList = - { - MN_TEMPLATE - MN_FRAME_WRAP - MN_FRAME1 - MN_FRAME2 - MN_FRAME3 - MN_LINESTYLE - MN_BACKGROUND_COLOR - ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; }; - MN_ATTRIBUTES_FRAME - ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; }; - MN_LAYER - ToolBoxItem - { - Identifier = FN_TOOL_ANKER ; - HelpID = FN_TOOL_ANKER ; - DropDown = TRUE ; - }; - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - Identifier = FN_FRAME_CHAIN ; - HelpID = FN_FRAME_CHAIN ; - }; - ToolBoxItem - { - Identifier = FN_FRAME_UNCHAIN ; - HelpID = FN_FRAME_UNCHAIN ; - }; - }; - Scroll = TRUE ; -}; String RID_GRAFIK_TOOLBOX { Text [ en-US ] = "Graphics Object Bar" ; Text [ x-comment ] = " "; }; -ToolBox RID_GRAFIK_TOOLBOX -{ - HelpID = HID_GRAFIK_TOOLBOX ; - Border = TRUE ; - SVLook = TRUE ; - Dockable = TRUE ; - Moveable = TRUE ; - Sizeable = TRUE ; - Closeable = TRUE ; - Zoomable = TRUE ; - LineSpacing = TRUE ; - HideWhenDeactivate = TRUE ; - MenuStrings = TRUE ; - Customize = TRUE ; - Hide = TRUE ; - ItemList = - { - ToolBoxItem - { - Identifier = SID_GRFFILTER; - HelpID = SID_GRFFILTER; - DropDown = TRUE ; - }; - ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; }; - ToolBoxItem - { - Identifier = SID_ATTR_GRAF_MODE; - HelpID = SID_ATTR_GRAF_MODE; - }; - ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; }; - - ToolBoxItem - { - Identifier = SID_ATTR_GRAF_RED; - HelpID = SID_ATTR_GRAF_RED; - }; - ToolBoxItem - { - Identifier = SID_ATTR_GRAF_GREEN; - HelpID = SID_ATTR_GRAF_GREEN; - }; - ToolBoxItem - { - Identifier = SID_ATTR_GRAF_BLUE; - HelpID = SID_ATTR_GRAF_BLUE; - }; - ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; }; - - ToolBoxItem - { - Identifier = SID_ATTR_GRAF_LUMINANCE; - HelpID = SID_ATTR_GRAF_LUMINANCE; - }; - ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; }; - - ToolBoxItem - { - Identifier = SID_ATTR_GRAF_CONTRAST; - HelpID = SID_ATTR_GRAF_CONTRAST; - }; - ToolBoxItem - { - Identifier = SID_ATTR_GRAF_GAMMA; - HelpID = SID_ATTR_GRAF_GAMMA; - }; - ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; }; - ToolBoxItem - { - Identifier = SID_ATTR_GRAF_TRANSPARENCE; - HelpID = SID_ATTR_GRAF_TRANSPARENCE; - }; - ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; }; - ToolBoxItem - { - Identifier = FN_FLIP_VERT_GRAFIC ; - HelpID = FN_FLIP_VERT_GRAFIC ; - }; - ToolBoxItem - { - Identifier = FN_FLIP_HORZ_GRAFIC ; - HelpID = FN_FLIP_HORZ_GRAFIC ; - }; - ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; }; - MN_ATTRIBUTES_GRAFIK - }; - Scroll = TRUE ; -}; String RID_OLE_TOOLBOX { Text [ en-US ] = "Object" ; Text [ x-comment ] = " "; }; -ToolBox RID_OLE_TOOLBOX -{ - HelpID = HID_OLE_TOOLBOX ; - Border = TRUE ; - SVLook = TRUE ; - Dockable = TRUE ; - Moveable = TRUE ; - Sizeable = TRUE ; - Closeable = TRUE ; - Zoomable = TRUE ; - LineSpacing = TRUE ; - HideWhenDeactivate = TRUE ; - Customize = TRUE ; - MenuStrings = TRUE ; - Hide = TRUE ; - Scroll = TRUE ; - ItemList = - { - MN_TEMPLATE - MN_FRAME_WRAP - MN_CONTOUR - MN_FRAME1 - MN_FRAME2 - MN_FRAME3 - MN_LINESTYLE - ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; }; - MN_ATTRIBUTES_OLE - ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; }; - MN_LAYER - ToolBoxItem - { - Identifier = FN_TOOL_ANKER ; - HelpID = FN_TOOL_ANKER ; - DropDown = TRUE ; - }; - }; -}; String RID_DRAW_TOOLBOX { Text [ en-US ] = "Draw Object Bar" ; Text [ x-comment ] = " "; }; -ToolBox RID_DRAW_TOOLBOX -{ - HelpID = HID_DRAW_TOOLBOX ; - Border = TRUE ; - SVLook = TRUE ; - Dockable = TRUE ; - Moveable = TRUE ; - Sizeable = TRUE ; - Closeable = TRUE ; - Zoomable = TRUE ; - LineSpacing = TRUE ; - HideWhenDeactivate = TRUE ; - Customize = TRUE ; - MenuStrings = TRUE ; - Hide = TRUE ; - ItemList = - { - ToolBoxItem - { - Identifier = SID_BEZIER_EDIT ; - HelpID = SID_BEZIER_EDIT ; - }; - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - Identifier = SID_ATTRIBUTES_LINE ; - HelpID = SID_ATTRIBUTES_LINE ; - }; - ToolBoxItem - { - ITEM_TOOLBAR_ATTR_LINEEND_STYLE - }; - ToolBoxItem - { - ITEM_TOOLBAR_ATTR_LINE_STYLE - }; - ToolBoxItem - { - ITEM_TOOLBAR_ATTR_LINE_WIDTH - }; - ToolBoxItem - { - ITEM_TOOLBAR_ATTR_LINE_COLOR - }; - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - Identifier = SID_ATTRIBUTES_AREA ; - HelpID = SID_ATTRIBUTES_AREA ; - }; - ToolBoxItem - { - ITEM_TOOLBAR_ATTR_FILL_STYLE - }; - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - ITEM_TOOLBAR_OBJECT_ROTATE - }; - ToolBoxItem - { - Identifier = FN_TOOL_ANKER ; - HelpID = FN_TOOL_ANKER ; - DropDown = TRUE ; - }; - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - Identifier = FN_FRAME_NOWRAP ; - HelpID = FN_FRAME_NOWRAP ; - RadioCheck = TRUE ; - Hide = TRUE; - }; - ToolBoxItem - { - Identifier = FN_FRAME_WRAP ; - HelpID = FN_FRAME_WRAP ; - RadioCheck = TRUE ; - Hide = TRUE; - }; - ToolBoxItem - { - Identifier = FN_FRAME_WRAP_IDEAL ; - HelpID = FN_FRAME_WRAP_IDEAL ; - RadioCheck = TRUE ; - Hide = TRUE; - }; - ToolBoxItem - { - Identifier = FN_FRAME_WRAP_LEFT ; - HelpID = FN_FRAME_WRAP_LEFT ; - RadioCheck = TRUE ; - Hide = TRUE; - }; - ToolBoxItem - { - Identifier = FN_FRAME_WRAP_RIGHT ; - HelpID = FN_FRAME_WRAP_RIGHT ; - RadioCheck = TRUE ; - Hide = TRUE; - }; - ToolBoxItem - { - Identifier = FN_FRAME_WRAPTHRU ; - HelpID = FN_FRAME_WRAPTHRU ; - RadioCheck = TRUE ; - Hide = TRUE; - }; - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - Identifier = FN_FRAME_WRAP_CONTOUR ; - HelpID = FN_FRAME_WRAP_CONTOUR ; - Hide = TRUE ; - }; - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - Identifier = SID_OBJECT_HEAVEN ; - HelpID = SID_OBJECT_HEAVEN ; - }; - ToolBoxItem - { - Identifier = SID_OBJECT_HELL ; - HelpID = SID_OBJECT_HELL ; - }; - MN_LAYER - MN_GRID( HIDE=TRUE ) - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - Identifier = SID_OBJECT_ALIGN ; - HelpID = SID_OBJECT_ALIGN ; - DropDown = TRUE ; - }; - }; - Scroll = TRUE ; -}; String RID_BEZIER_TOOLBOX { Text [ en-US ] = "Bézier Object Bar" ; Text [ x-comment ] = " "; }; -ToolBox RID_BEZIER_TOOLBOX -{ - HelpID = HID_BEZIER_TOOLBOX ; - Border = TRUE ; - SVLook = TRUE ; - Dockable = TRUE ; - Moveable = TRUE ; - Sizeable = TRUE ; - Closeable = TRUE ; - Zoomable = TRUE ; - LineSpacing = TRUE ; - HideWhenDeactivate = TRUE ; - Customize = TRUE ; - MenuStrings = TRUE ; - Hide = TRUE ; - ItemList = - { - ToolBoxItem - { - Identifier = SID_BEZIER_EDIT ; - HelpID = SID_BEZIER_EDIT ; - }; - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - Identifier = SID_BEZIER_MOVE ; - HelpID = SID_BEZIER_MOVE ; - RadioCheck = TRUE ; - }; - ToolBoxItem - { - Identifier = SID_BEZIER_INSERT ; - HelpID = SID_BEZIER_INSERT ; - RadioCheck = TRUE ; - }; - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - Identifier = SID_BEZIER_DELETE ; - HelpID = SID_BEZIER_DELETE ; - }; - ToolBoxItem - { - Identifier = SID_BEZIER_CUTLINE ; - HelpID = SID_BEZIER_CUTLINE ; - }; - ToolBoxItem - { - Identifier = SID_BEZIER_CONVERT ; - HelpID = SID_BEZIER_CONVERT ; - }; - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - Identifier = SID_BEZIER_EDGE ; - HelpID = SID_BEZIER_EDGE ; - RadioCheck = TRUE ; - }; - ToolBoxItem - { - Identifier = SID_BEZIER_SMOOTH ; - HelpID = SID_BEZIER_SMOOTH ; - RadioCheck = TRUE ; - }; - ToolBoxItem - { - Identifier = SID_BEZIER_SYMMTR ; - HelpID = SID_BEZIER_SYMMTR ; - RadioCheck = TRUE ; - }; - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - Identifier = SID_BEZIER_CLOSE ; - HelpID = SID_BEZIER_CLOSE ; - }; - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - Identifier = SID_BEZIER_ELIMINATE_POINTS ; - HelpID = SID_BEZIER_ELIMINATE_POINTS ; - }; - }; - Scroll = TRUE ; -}; String RID_DRAW_TEXT_TOOLBOX { Text [ en-US ] = "Text Object Bar/Graphics" ; Text [ x-comment ] = " "; }; -ToolBox RID_DRAW_TEXT_TOOLBOX -{ - HelpID = HID_DRAW_TEXT_TOOLBOX ; - Border = TRUE ; - Customize = TRUE ; - SVLook = TRUE ; - Dockable = TRUE ; - Moveable = TRUE ; - Sizeable = TRUE ; - Closeable = TRUE ; - Zoomable = TRUE ; - LineSpacing = TRUE ; - HideWhenDeactivate = TRUE ; - MenuStrings = TRUE ; - Hide = TRUE ; - ItemList = - { - MN_FONT - MN_TEXT1(FALSE) - MN_TEXT1_BLOCK - MN_TEXT_LINESPACE - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - ITEM_TOOLBAR_ATTR_CHAR_COLOR - Hide = TRUE; - }; - MN_TEXT_LTR_RTL - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - Identifier = SID_TEXTDIRECTION_LEFT_TO_RIGHT ; - HelpID = SID_TEXTDIRECTION_LEFT_TO_RIGHT ; - }; - ToolBoxItem - { - Identifier = SID_TEXTDIRECTION_TOP_TO_BOTTOM ; - HelpID = SID_TEXTDIRECTION_TOP_TO_BOTTOM ; - }; - - MN_TEXT_DIALOGS(FALSE) - }; - ItemList[ ar ] = - { - MN_FONT - MN_TEXT1_RTL(FALSE) - MN_TEXT1_BLOCK - MN_TEXT_LINESPACE - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - ITEM_TOOLBAR_ATTR_CHAR_COLOR - Hide = TRUE; - }; - MN_TEXT_RTL_LTR - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - Identifier = SID_TEXTDIRECTION_LEFT_TO_RIGHT ; - HelpID = SID_TEXTDIRECTION_LEFT_TO_RIGHT ; - }; - ToolBoxItem - { - Identifier = SID_TEXTDIRECTION_TOP_TO_BOTTOM ; - HelpID = SID_TEXTDIRECTION_TOP_TO_BOTTOM ; - }; - - MN_TEXT_DIALOGS(FALSE) - }; - ItemList[ he ] = - { - MN_FONT - MN_TEXT1_RTL(FALSE) - MN_TEXT1_BLOCK - MN_TEXT_LINESPACE - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - ITEM_TOOLBAR_ATTR_CHAR_COLOR - Hide = TRUE; - }; - MN_TEXT_RTL_LTR - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - Identifier = SID_TEXTDIRECTION_LEFT_TO_RIGHT ; - HelpID = SID_TEXTDIRECTION_LEFT_TO_RIGHT ; - }; - ToolBoxItem - { - Identifier = SID_TEXTDIRECTION_TOP_TO_BOTTOM ; - HelpID = SID_TEXTDIRECTION_TOP_TO_BOTTOM ; - }; - - MN_TEXT_DIALOGS(FALSE) - }; - Scroll = TRUE ; -}; String RID_NUM_TOOLBOX { Text [ en-US ] = "Numbering Object Bar" ; Text [ x-comment ] = " "; }; -ToolBox RID_NUM_TOOLBOX -{ - HelpID = HID_NUM_TOOLBOX ; - Border = TRUE ; - SVLook = TRUE ; - Dockable = TRUE ; - Moveable = TRUE ; - Sizeable = TRUE ; - Closeable = TRUE ; - Zoomable = TRUE ; - LineSpacing = TRUE ; - HideWhenDeactivate = TRUE ; - Customize = TRUE ; - MenuStrings = TRUE ; - Hide = TRUE ; - ItemList = - { - MN_TEMPLATE - MN_FONT - ToolBoxItem - { - Identifier = FN_NUM_BULLET_OFF ; - HelpID = FN_NUM_BULLET_OFF ; - }; - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - Identifier = FN_NUM_BULLET_UP ; - HelpID = FN_NUM_BULLET_UP ; - }; - ToolBoxItem - { - Identifier = FN_NUM_BULLET_DOWN ; - HelpID = FN_NUM_BULLET_DOWN ; - }; - ToolBoxItem - { - Identifier = FN_NUM_BULLET_OUTLINE_UP ; - HelpID = FN_NUM_BULLET_OUTLINE_UP ; - }; - ToolBoxItem - { - Identifier = FN_NUM_BULLET_OUTLINE_DOWN ; - }; - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - Identifier = FN_NUM_BULLET_NONUM ; - HelpID = FN_NUM_BULLET_NONUM ; - }; - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - Identifier = FN_NUM_BULLET_MOVEUP ; - HelpID = FN_NUM_BULLET_MOVEUP ; - }; - ToolBoxItem - { - Identifier = FN_NUM_BULLET_MOVEDOWN ; - HelpID = FN_NUM_BULLET_MOVEDOWN ; - }; - ToolBoxItem - { - Identifier = FN_NUM_BULLET_OUTLINE_MOVEUP ; - HelpID = FN_NUM_BULLET_OUTLINE_MOVEUP ; - }; - ToolBoxItem - { - Identifier = FN_NUM_BULLET_OUTLINE_MOVEDOWN ; - HelpID = FN_NUM_BULLET_OUTLINE_MOVEDOWN ; - }; - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - Identifier = FN_NUMBER_NEWSTART ; - HelpID = FN_NUMBER_NEWSTART ; - }; - ToolBoxItem - { - Identifier = FN_NUMBER_BULLETS ; - HelpID = FN_NUMBER_BULLETS ; - }; - }; - Scroll = TRUE ; -}; String STR_SHELLNAME_TEXT { Text [ en-US ] = "Text" ; diff --git a/sw/source/ui/shells/tabsh.cxx b/sw/source/ui/shells/tabsh.cxx index c9e4af60a7..6390291c93 100644 --- a/sw/source/ui/shells/tabsh.cxx +++ b/sw/source/ui/shells/tabsh.cxx @@ -119,7 +119,7 @@ SFX_IMPL_INTERFACE(SwTableShell, SwBaseShell, SW_RES(STR_SHELLNAME_TABLE)) TYPEINIT1(SwTableShell,SwBaseShell) -const USHORT aUITableAttrRange[] = +const sal_uInt16 aUITableAttrRange[] = { FN_PARAM_TABLE_NAME, FN_PARAM_TABLE_NAME, FN_PARAM_TABLE_HEADLINE, FN_PARAM_TABLE_HEADLINE, @@ -146,7 +146,7 @@ const USHORT aUITableAttrRange[] = 0 }; -const USHORT* SwuiGetUITableAttrRange() +const sal_uInt16* SwuiGetUITableAttrRange() { return aUITableAttrRange; } @@ -174,7 +174,7 @@ static SwTableRep* lcl_TableParamToItemSet( SfxItemSet& rSet, SwWrtShell &rSh ) SvxULSpaceItem aULSpace( pFmt->GetULSpace() ); rSet.Put( aULSpace ); - USHORT nBackgroundDestination = rSh.GetViewOptions()->GetTblDest(); + sal_uInt16 nBackgroundDestination = rSh.GetViewOptions()->GetTblDest(); rSet.Put(SwBackgroundDestinationItem(SID_BACKGRND_DESTINATION, nBackgroundDestination )); SvxBrushItem aBrush( RES_BACKGROUND ); if(rSh.GetRowBackground(aBrush)) @@ -189,12 +189,12 @@ static SwTableRep* lcl_TableParamToItemSet( SfxItemSet& rSet, SwWrtShell &rSh ) if(rSh.GetBoxDirection( aBoxDirection )) rSet.Put(aBoxDirection, FN_TABLE_BOX_TEXTDIRECTION); - BOOL bTableSel = rSh.IsTableMode(); + sal_Bool bTableSel = rSh.IsTableMode(); if(!bTableSel) { rSh.StartAllAction(); rSh.Push(); - rSh.GetView().GetViewFrame()->GetDispatcher()->Execute( FN_TABLE_SELECT_ALL, FALSE ); + rSh.GetView().GetViewFrame()->GetDispatcher()->Execute( FN_TABLE_SELECT_ALL, sal_False ); } SvxBoxInfoItem aBoxInfo( SID_ATTR_BORDER_INNER ); @@ -203,7 +203,7 @@ static SwTableRep* lcl_TableParamToItemSet( SfxItemSet& rSet, SwWrtShell &rSh ) aBoxInfo.SetTable ((rSh.IsTableMode() && rSh.GetCrsrCnt() > 1) || !bTableSel); // Abstandsfeld immer anzeigen - aBoxInfo.SetDist ((BOOL) TRUE); + aBoxInfo.SetDist ((sal_Bool) sal_True); // Minimalgroesse in Tabellen und Absaetzen setzen aBoxInfo.SetMinDist( !bTableSel || rSh.IsTableMode() || rSh.GetSelectionType() & @@ -228,7 +228,7 @@ static SwTableRep* lcl_TableParamToItemSet( SfxItemSet& rSet, SwWrtShell &rSh ) if(!bTableSel) { rSh.ClearMark(); - rSh.Pop(FALSE); + rSh.Pop(sal_False); rSh.EndAllAction(); } @@ -241,12 +241,12 @@ static SwTableRep* lcl_TableParamToItemSet( SfxItemSet& rSet, SwWrtShell &rSh ) SwTableRep* pRep = new SwTableRep( aTabCols, rSh.IsTblComplex()); pRep->SetSpace(aCols.GetRightMax()); - USHORT nPercent = 0; + sal_uInt16 nPercent = 0; long nWidth = ::GetTableWidth(pFmt, aCols, &nPercent, &rSh ); // Die Tabellenbreite ist fuer relative Angaben nicht korrekt if(nPercent) nWidth = pRep->GetSpace() * nPercent / 100; - USHORT nAlign = pFmt->GetHoriOrient().GetHoriOrient(); + sal_uInt16 nAlign = pFmt->GetHoriOrient().GetHoriOrient(); pRep->SetAlign(nAlign); SvxLRSpaceItem aLRSpace( pFmt->GetLRSpace() ); SwTwips nLeft = aLRSpace.GetLeft(); @@ -291,24 +291,24 @@ void ItemSetToTableParam( const SfxItemSet& rSet, const SfxPoolItem* pItem = 0; SwViewOption aUsrPref( *rSh.GetViewOptions() ); - USHORT nBackgroundDestination = aUsrPref.GetTblDest(); - if(SFX_ITEM_SET == rSet.GetItemState(SID_BACKGRND_DESTINATION, FALSE, &pItem)) + sal_uInt16 nBackgroundDestination = aUsrPref.GetTblDest(); + if(SFX_ITEM_SET == rSet.GetItemState(SID_BACKGRND_DESTINATION, sal_False, &pItem)) { nBackgroundDestination = ((SfxUInt16Item*)pItem)->GetValue(); - aUsrPref.SetTblDest((BYTE)nBackgroundDestination); + aUsrPref.SetTblDest((sal_uInt8)nBackgroundDestination); SW_MOD()->ApplyUsrPref(aUsrPref, &rSh.GetView()); } - BOOL bBorder = ( SFX_ITEM_SET == rSet.GetItemState( RES_BOX ) || + sal_Bool bBorder = ( SFX_ITEM_SET == rSet.GetItemState( RES_BOX ) || SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_BORDER_INNER ) ); pItem = 0; - BOOL bBackground = SFX_ITEM_SET == rSet.GetItemState( RES_BACKGROUND, FALSE, &pItem ); + sal_Bool bBackground = SFX_ITEM_SET == rSet.GetItemState( RES_BACKGROUND, sal_False, &pItem ); const SfxPoolItem* pRowItem = 0, *pTableItem = 0; - bBackground |= SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_BRUSH_ROW, FALSE, &pRowItem ); - bBackground |= SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_BRUSH_TABLE, FALSE, &pTableItem ); + bBackground |= SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_BRUSH_ROW, sal_False, &pRowItem ); + bBackground |= SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_BRUSH_TABLE, sal_False, &pTableItem ); const SfxPoolItem* pSplit = 0; - BOOL bRowSplit = SFX_ITEM_SET == rSet.GetItemState( RES_ROW_SPLIT, FALSE, &pSplit ); + sal_Bool bRowSplit = SFX_ITEM_SET == rSet.GetItemState( RES_ROW_SPLIT, sal_False, &pSplit ); const SfxPoolItem* pBoxDirection = 0; - BOOL bBoxDirection = SFX_ITEM_SET == rSet.GetItemState( FN_TABLE_BOX_TEXTDIRECTION, FALSE, &pBoxDirection ); + sal_Bool bBoxDirection = SFX_ITEM_SET == rSet.GetItemState( FN_TABLE_BOX_TEXTDIRECTION, sal_False, &pBoxDirection ); if( bBackground || bBorder || bRowSplit || bBoxDirection) { /* @@ -317,7 +317,7 @@ void ItemSetToTableParam( const SfxItemSet& rSet, Der Hintergrund wird immer auf den aktuellen Zustand angewendet. */ - BOOL bTableSel = rSh.IsTableMode(); + sal_Bool bTableSel = rSh.IsTableMode(); rSh.StartAllAction(); if(bBackground) @@ -364,19 +364,19 @@ void ItemSetToTableParam( const SfxItemSet& rSet, { rSh.ClearMark(); } - rSh.Pop(FALSE); + rSh.Pop(sal_False); } rSh.EndAllAction(); } SwTabCols aTabCols; - BOOL bTabCols = FALSE; - BOOL bSingleLine = FALSE; + sal_Bool bTabCols = sal_False; + sal_Bool bSingleLine = sal_False; SwTableRep* pRep = 0; SwFrmFmt *pFmt = rSh.GetTableFmt(); SfxItemSet aSet( rSh.GetAttrPool(), RES_FRMATR_BEGIN, RES_FRMATR_END-1 ); - if(SFX_ITEM_SET == rSet.GetItemState( FN_TABLE_REP, FALSE, &pItem )) + if(SFX_ITEM_SET == rSet.GetItemState( FN_TABLE_REP, sal_False, &pItem )) { pRep = (SwTableRep*)((const SwPtrItem*)pItem)->GetValue(); @@ -392,7 +392,7 @@ void ItemSetToTableParam( const SfxItemSet& rSet, SwFmtFrmSize aSz( ATT_VAR_SIZE, nWidth ); if(pRep->GetWidthPercent()) { - aSz.SetWidthPercent( (BYTE)pRep->GetWidthPercent() ); + aSz.SetWidthPercent( (sal_uInt8)pRep->GetWidthPercent() ); } aSet.Put(aSz); } @@ -413,22 +413,22 @@ void ItemSetToTableParam( const SfxItemSet& rSet, if(pRep->HasColsChanged()) { - bTabCols = TRUE; + bTabCols = sal_True; } } - if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_TABLE_HEADLINE, FALSE, &pItem)) + if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_TABLE_HEADLINE, sal_False, &pItem)) rSh.SetRowsToRepeat( ((SfxUInt16Item*)pItem)->GetValue() ); - if( SFX_ITEM_SET == rSet.GetItemState( FN_TABLE_SET_VERT_ALIGN, FALSE, &pItem)) + if( SFX_ITEM_SET == rSet.GetItemState( FN_TABLE_SET_VERT_ALIGN, sal_False, &pItem)) rSh.SetBoxAlign(((SfxUInt16Item*)(pItem))->GetValue()); - if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_TABLE_NAME, FALSE, &pItem )) + if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_TABLE_NAME, sal_False, &pItem )) rSh.SetTableName( *pFmt, ((const SfxStringItem*)pItem)->GetValue() ); // kopiere die ausgesuchten Attribute in den ItemSet - static USHORT const aIds[] = + static sal_uInt16 aIds[] = { RES_PAGEDESC, RES_BREAK, @@ -442,8 +442,8 @@ void ItemSetToTableParam( const SfxItemSet& rSet, // <-- collapsing borders 0 }; - for( const USHORT* pIds = aIds; *pIds; ++pIds ) - if( SFX_ITEM_SET == rSet.GetItemState( *pIds, FALSE, &pItem)) + for( const sal_uInt16* pIds = aIds; *pIds; ++pIds ) + if( SFX_ITEM_SET == rSet.GetItemState( *pIds, sal_False, &pItem)) aSet.Put( *pItem ); if( aSet.Count() ) @@ -476,17 +476,17 @@ static void lcl_TabGetMaxLineWidth(const SvxBorderLine* pBorderLine, SvxBorderLi void SwTableShell::Execute(SfxRequest &rReq) { - BOOL bUseDialog = TRUE; + sal_Bool bUseDialog = sal_True; const SfxItemSet* pArgs = rReq.GetArgs(); SwWrtShell &rSh = GetShell(); //Erstmal die Slots, die keinen FrmMgr benoetigen. - BOOL bMore = FALSE; + sal_Bool bMore = sal_False; const SfxPoolItem* pItem = 0; - USHORT nSlot = rReq.GetSlot(); + sal_uInt16 nSlot = rReq.GetSlot(); if(pArgs) - pArgs->GetItemState(GetPool().GetWhich(nSlot), FALSE, &pItem); - BOOL bCallDone = FALSE; + pArgs->GetItemState(GetPool().GetWhich(nSlot), sal_False, &pItem); + sal_Bool bCallDone = sal_False; switch ( nSlot ) { case SID_ATTR_BORDER: @@ -505,29 +505,29 @@ void SwTableShell::Execute(SfxRequest &rReq) const SvxBoxItem& rCoreBox = (const SvxBoxItem&) aCoreSet.Get(RES_BOX); const SfxPoolItem *pBoxItem = 0; - if ( pArgs->GetItemState(RES_BOX, TRUE, &pBoxItem) == SFX_ITEM_SET ) + if ( pArgs->GetItemState(RES_BOX, sal_True, &pBoxItem) == SFX_ITEM_SET ) { aBox = *(SvxBoxItem*)pBoxItem; if ( !rReq.IsAPI() ) - aBox.SetDistance( Max(rCoreBox.GetDistance(),USHORT(55)) ); + aBox.SetDistance( Max(rCoreBox.GetDistance(),sal_uInt16(55)) ); else if ( aBox.GetDistance() < MIN_BORDER_DIST ) - aBox.SetDistance( Max(rCoreBox.GetDistance(),(USHORT)MIN_BORDER_DIST) ); + aBox.SetDistance( Max(rCoreBox.GetDistance(),(sal_uInt16)MIN_BORDER_DIST) ); } else OSL_ENSURE( !this, "where is BoxItem?" ); //since the drawing layer also supports borders the which id might be a different one SvxBoxInfoItem aInfo( SID_ATTR_BORDER_INNER ); - if (pArgs->GetItemState(SID_ATTR_BORDER_INNER, TRUE, &pBoxItem) == SFX_ITEM_SET) + if (pArgs->GetItemState(SID_ATTR_BORDER_INNER, sal_True, &pBoxItem) == SFX_ITEM_SET) aInfo = *(SvxBoxInfoItem*)pBoxItem; - else if( pArgs->GetItemState(SDRATTR_TABLE_BORDER_INNER, TRUE, &pBoxItem) == SFX_ITEM_SET ) + else if( pArgs->GetItemState(SDRATTR_TABLE_BORDER_INNER, sal_True, &pBoxItem) == SFX_ITEM_SET ) { aInfo = *(SvxBoxInfoItem*)pBoxItem; aInfo.SetWhich(SID_ATTR_BORDER_INNER); } - aInfo.SetTable( TRUE ); - aInfo.SetValid( VALID_DISABLE, FALSE ); + aInfo.SetTable( sal_True ); + aInfo.SetValid( VALID_DISABLE, sal_False ); // Die Attribute aller Linien werden gelesen und das staerkste gewinnt @@ -552,19 +552,19 @@ void SwTableShell::Execute(SfxRequest &rReq) aBorderLine.SetOutWidth(DEF_LINE_WIDTH_0); } - BOOL bLine = FALSE; + sal_Bool bLine = sal_False; if ( (pBorderLine = aBox.GetTop()) != NULL) - aBox.SetLine(&aBorderLine, BOX_LINE_TOP), bLine |= TRUE; + aBox.SetLine(&aBorderLine, BOX_LINE_TOP), bLine |= sal_True; if ((pBorderLine = aBox.GetBottom()) != NULL) - aBox.SetLine(&aBorderLine, BOX_LINE_BOTTOM), bLine |= TRUE; + aBox.SetLine(&aBorderLine, BOX_LINE_BOTTOM), bLine |= sal_True; if ((pBorderLine = aBox.GetLeft()) != NULL) - aBox.SetLine(&aBorderLine, BOX_LINE_LEFT), bLine |= TRUE; + aBox.SetLine(&aBorderLine, BOX_LINE_LEFT), bLine |= sal_True; if ((pBorderLine = aBox.GetRight()) != NULL) - aBox.SetLine(&aBorderLine, BOX_LINE_RIGHT), bLine |= TRUE; + aBox.SetLine(&aBorderLine, BOX_LINE_RIGHT), bLine |= sal_True; if ((pBorderLine = aInfo.GetHori()) != NULL) - aInfo.SetLine(&aBorderLine, BOXINFO_LINE_HORI), bLine |= TRUE; + aInfo.SetLine(&aBorderLine, BOXINFO_LINE_HORI), bLine |= sal_True; if ((pBorderLine = aInfo.GetVert()) != NULL) - aInfo.SetLine(&aBorderLine, BOXINFO_LINE_VERT), bLine |= TRUE; + aInfo.SetLine(&aBorderLine, BOXINFO_LINE_VERT), bLine |= sal_True; aCoreSet.Put( aBox ); aCoreSet.Put( aInfo ); @@ -575,7 +575,7 @@ void SwTableShell::Execute(SfxRequest &rReq) // the SvxBoxItem rReq.AppendItem( aBox ); rReq.AppendItem( aInfo ); - bCallDone = TRUE; + bCallDone = sal_True; } break; @@ -590,7 +590,7 @@ void SwTableShell::Execute(SfxRequest &rReq) SfxItemSet aCoreSet( GetPool(), aUITableAttrRange); FieldUnit eMetric = ::GetDfltMetric(0 != PTR_CAST(SwWebView, &rSh.GetView())); - SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< UINT16 >(eMetric))); + SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric))); SwTableRep* pTblRep = ::lcl_TableParamToItemSet( aCoreSet, rSh ); SfxAbstractTabDialog * pDlg = NULL; if ( bUseDialog ) @@ -642,7 +642,7 @@ void SwTableShell::Execute(SfxRequest &rReq) if(pView) { FieldUnit eMetric = ::GetDfltMetric(0 != PTR_CAST(SwWebView, pView)); - SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< UINT16 >(eMetric))); + SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric))); SvNumberFormatter* pFormatter = rSh.GetNumberFormatter(); SfxItemSet aCoreSet( GetPool(), SID_ATTR_NUMBERFORMAT_VALUE, SID_ATTR_NUMBERFORMAT_VALUE, @@ -690,13 +690,13 @@ void SwTableShell::Execute(SfxRequest &rReq) const sal_uInt32* pDelArr = ((SvxNumberInfoItem*) pNumberFormatItem)->GetDelArray(); - for ( USHORT i = 0; i < ((SvxNumberInfoItem*)pNumberFormatItem)->GetDelCount(); i++ ) + for ( sal_uInt16 i = 0; i < ((SvxNumberInfoItem*)pNumberFormatItem)->GetDelCount(); i++ ) ((SvxNumberInfoItem*)pNumberFormatItem)-> GetNumberFormatter()->DeleteEntry( pDelArr[i] ); } if( SFX_ITEM_SET == pDlg->GetOutputItemSet()->GetItemState( - SID_ATTR_NUMBERFORMAT_VALUE, FALSE, &pNumberFormatItem )) + SID_ATTR_NUMBERFORMAT_VALUE, sal_False, &pNumberFormatItem )) { SfxItemSet aBoxFormatSet( *aCoreSet.GetPool(), RES_BOXATR_FORMAT, RES_BOXATR_FORMAT ); @@ -712,53 +712,53 @@ void SwTableShell::Execute(SfxRequest &rReq) break; case FN_CALC_TABLE: rSh.UpdateTable(); - bCallDone = TRUE; + bCallDone = sal_True; break; case FN_TABLE_OPTIMAL_HEIGHT: { const SwFmtFrmSize aSz; rSh.SetRowHeight( aSz ); - bCallDone = TRUE; + bCallDone = sal_True; } break; case FN_TABLE_DELETE_COL: if ( rSh.DeleteCol() && rSh.HasSelection() ) rSh.EnterStdMode(); - bCallDone = TRUE; + bCallDone = sal_True; break; case FN_END_TABLE: rSh.MoveTable( fnTableCurr, fnTableEnd ); - bCallDone = TRUE; + bCallDone = sal_True; break; case FN_START_TABLE: rSh.MoveTable( fnTableCurr, fnTableStart ); - bCallDone = TRUE; + bCallDone = sal_True; break; case FN_GOTO_NEXT_CELL: { - BOOL bAppendLine = TRUE; + sal_Bool bAppendLine = sal_True; if( pItem ) bAppendLine = ((SfxBoolItem*)pItem)->GetValue(); rReq.SetReturnValue( SfxBoolItem( nSlot, rSh.GoNextCell( bAppendLine ) ) ); - bCallDone = TRUE; + bCallDone = sal_True; } break; case FN_GOTO_PREV_CELL: rReq.SetReturnValue( SfxBoolItem( nSlot, rSh.GoPrevCell() ) ); - bCallDone = TRUE; + bCallDone = sal_True; break; case FN_TABLE_DELETE_ROW: if ( rSh.DeleteRow() && rSh.HasSelection() ) rSh.EnterStdMode(); - bCallDone = TRUE; + bCallDone = sal_True; break; case FN_TABLE_MERGE_CELLS: if ( rSh.IsTableMode() ) switch ( rSh.MergeTab() ) { case TBLMERGE_OK: - bCallDone = TRUE; + bCallDone = sal_True; //no break; case TBLMERGE_NOSELECTION: break; case TBLMERGE_TOOCOMPLEX: @@ -774,7 +774,7 @@ void SwTableShell::Execute(SfxRequest &rReq) case FN_TABLE_ADJUST_CELLS: case FN_TABLE_BALANCE_CELLS: { - BOOL bBalance = (FN_TABLE_BALANCE_CELLS == nSlot); + sal_Bool bBalance = (FN_TABLE_BALANCE_CELLS == nSlot); if ( rSh.IsAdjustCellWidthAllowed(bBalance) ) { { @@ -783,13 +783,13 @@ void SwTableShell::Execute(SfxRequest &rReq) } rSh.AdjustCellWidth(bBalance); } - bCallDone = TRUE; + bCallDone = sal_True; } break; case FN_TABLE_BALANCE_ROWS: - if ( rSh.BalanceRowHeight(TRUE) ) - rSh.BalanceRowHeight(FALSE); - bCallDone = TRUE; + if ( rSh.BalanceRowHeight(sal_True) ) + rSh.BalanceRowHeight(sal_False); + bCallDone = sal_True; break; case FN_TABLE_SELECT_ALL: rSh.EnterStdMode(); @@ -797,26 +797,26 @@ void SwTableShell::Execute(SfxRequest &rReq) rSh.SttSelect(); rSh.MoveTable( fnTableCurr, fnTableEnd ); rSh.EndSelect(); - bCallDone = TRUE; + bCallDone = sal_True; break; case FN_TABLE_SELECT_COL: rSh.EnterStdMode(); rSh.SelectTableCol(); - bCallDone = TRUE; + bCallDone = sal_True; break; case FN_TABLE_SELECT_ROW: rSh.EnterStdMode(); rSh.SelectTableRow(); - bCallDone = TRUE; + bCallDone = sal_True; break; case FN_TABLE_SET_READ_ONLY_CELLS: rSh.ProtectCells(); - rSh.ResetSelect( 0, FALSE ); - bCallDone = TRUE; + rSh.ResetSelect( 0, sal_False ); + bCallDone = sal_True; break; case FN_TABLE_UNSET_READ_ONLY_CELLS: rSh.UnProtectCells(); - bCallDone = TRUE; + bCallDone = sal_True; break; case SID_AUTOFORMAT: { @@ -848,13 +848,13 @@ void SwTableShell::Execute(SfxRequest &rReq) case FN_TABLE_INSERT_COL: case FN_TABLE_INSERT_ROW: { - BOOL bColumn = rReq.GetSlot() == FN_TABLE_INSERT_COL; - USHORT nCount = 0; - BOOL bAfter = TRUE; + sal_Bool bColumn = rReq.GetSlot() == FN_TABLE_INSERT_COL; + sal_uInt16 nCount = 0; + sal_Bool bAfter = sal_True; if (pItem) { nCount = ((const SfxInt16Item* )pItem)->GetValue(); - if(SFX_ITEM_SET == pArgs->GetItemState(FN_PARAM_INSERT_AFTER, TRUE, &pItem)) + if(SFX_ITEM_SET == pArgs->GetItemState(FN_PARAM_INSERT_AFTER, sal_True, &pItem)) bAfter = ((const SfxBoolItem* )pItem)->GetValue(); } else if( !rReq.IsAPI() ) @@ -898,7 +898,7 @@ void SwTableShell::Execute(SfxRequest &rReq) } // <-- - bCallDone = TRUE; + bCallDone = sal_True; break; } @@ -908,15 +908,16 @@ void SwTableShell::Execute(SfxRequest &rReq) case FN_TABLE_INSERT_COL_DLG: case FN_TABLE_INSERT_ROW_DLG: { + const SfxSlot* pSlot = GetStaticInterface()->GetSlot(nSlot); if ( FN_TABLE_INSERT_ROW_DLG != nSlot || !rSh.IsInRepeatedHeadline()) { SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - ::std::auto_ptr<SvxAbstractInsRowColDlg> pDlg( pFact ? pFact->CreateSvxInsRowColDlg( GetView().GetWindow(), nSlot == FN_TABLE_INSERT_COL_DLG, nSlot) : 0); + ::std::auto_ptr<SvxAbstractInsRowColDlg> pDlg( pFact ? pFact->CreateSvxInsRowColDlg( GetView().GetWindow(), nSlot == FN_TABLE_INSERT_COL_DLG, pSlot->GetCommand() ) : 0); if( pDlg.get() && (pDlg->Execute() == 1) ) { - USHORT nDispatchSlot = (nSlot == FN_TABLE_INSERT_COL_DLG) ? FN_TABLE_INSERT_COL : FN_TABLE_INSERT_ROW; - SfxUInt16Item aCountItem( nDispatchSlot, static_cast< UINT16 >(pDlg->getInsertCount()) ); + sal_uInt16 nDispatchSlot = (nSlot == FN_TABLE_INSERT_COL_DLG) ? FN_TABLE_INSERT_COL : FN_TABLE_INSERT_ROW; + SfxUInt16Item aCountItem( nDispatchSlot, static_cast< sal_uInt16 >(pDlg->getInsertCount()) ); SfxBoolItem aAfter( FN_PARAM_INSERT_AFTER, !pDlg->isInsertBefore() ); SfxViewFrame* pVFrame = GetView().GetViewFrame(); if( pVFrame ) @@ -928,8 +929,8 @@ void SwTableShell::Execute(SfxRequest &rReq) case FN_TABLE_SPLIT_CELLS: { long nCount=0; - BOOL bHorizontal=TRUE; - BOOL bProportional = FALSE; + sal_Bool bHorizontal=sal_True; + sal_Bool bProportional = sal_False; SFX_REQUEST_ARG( rReq, pSplit, SfxInt32Item, FN_TABLE_SPLIT_CELLS, sal_False ); SFX_REQUEST_ARG( rReq, pHor, SfxBoolItem, FN_PARAM_1, sal_False ); SFX_REQUEST_ARG( rReq, pProp, SfxBoolItem, FN_PARAM_2, sal_False ); @@ -963,8 +964,8 @@ void SwTableShell::Execute(SfxRequest &rReq) if ( nCount>1 ) { - rSh.SplitTab(!bHorizontal, static_cast< USHORT >( nCount-1 ), bProportional ); - bCallDone = TRUE; + rSh.SplitTab(!bHorizontal, static_cast< sal_uInt16 >( nCount-1 ), bProportional ); + bCallDone = sal_True; } else rReq.Ignore(); @@ -1004,8 +1005,8 @@ void SwTableShell::Execute(SfxRequest &rReq) case FN_TABLE_MERGE_TABLE: { - BOOL bPrev = rSh.CanMergeTable( TRUE ); - BOOL bNext = rSh.CanMergeTable( FALSE ); + sal_Bool bPrev = rSh.CanMergeTable( sal_True ); + sal_Bool bNext = rSh.CanMergeTable( sal_False ); if( bPrev && bNext ) { @@ -1014,7 +1015,7 @@ void SwTableShell::Execute(SfxRequest &rReq) VclAbstractDialog* pDlg = pFact->CreateSwVclDialog( DLG_MERGE_TABLE, GetView().GetWindow(), bPrev ); OSL_ENSURE(pDlg, "dialogdiet pDlg fail!"); if( RET_OK != pDlg->Execute()) - bPrev = bNext = FALSE; + bPrev = bNext = sal_False; delete pDlg; } @@ -1033,21 +1034,21 @@ void SwTableShell::Execute(SfxRequest &rReq) : TBLVAR_CHGABS ) ); SfxBindings& rBind = GetView().GetViewFrame()->GetBindings(); - static USHORT const aInva[] = + static sal_uInt16 aInva[] = { FN_TABLE_MODE_FIX, FN_TABLE_MODE_FIX_PROP, FN_TABLE_MODE_VARIABLE, 0 }; rBind.Invalidate( aInva ); - bCallDone = TRUE; + bCallDone = sal_True; } break; case FN_TABLE_AUTOSUM: { SfxViewFrame* pVFrame = GetView().GetViewFrame(); pVFrame->GetDispatcher()->Execute(FN_EDIT_FORMULA, SFX_CALLMODE_SYNCHRON); - const USHORT nId = SwInputChild::GetChildWindowId(); + const sal_uInt16 nId = SwInputChild::GetChildWindowId(); SwInputChild* pChildWin = (SwInputChild*)pVFrame-> GetChildWindow( nId ); String sSum; @@ -1079,7 +1080,7 @@ void SwTableShell::Execute(SfxRequest &rReq) return; //break; default: - bMore = TRUE; + bMore = sal_True; } if ( !bMore ) @@ -1089,7 +1090,7 @@ void SwTableShell::Execute(SfxRequest &rReq) return; } else - bMore = FALSE; + bMore = sal_False; //Jetzt die Slots, die direkt auf dem TableFmt arbeiten. SwFrmFmt *pFmt = rSh.GetTableFmt(); switch ( nSlot ) @@ -1124,7 +1125,7 @@ void SwTableShell::Execute(SfxRequest &rReq) // der letzte case-Zweig der noch einen TabellenManager braucht!! case FN_TABLE_SET_COL_WIDTH: { - SwTableFUNC aMgr( &rSh, FALSE); + SwTableFUNC aMgr( &rSh, sal_False); aMgr.ColWidthDlg(GetView().GetWindow()); } break; @@ -1132,12 +1133,12 @@ void SwTableShell::Execute(SfxRequest &rReq) case FN_TABLE_VERT_CENTER: case FN_TABLE_VERT_BOTTOM: { - USHORT nAlign = nSlot == FN_TABLE_VERT_NONE ? + sal_uInt16 nAlign = nSlot == FN_TABLE_VERT_NONE ? text::VertOrientation::NONE : nSlot == FN_TABLE_VERT_CENTER ? text::VertOrientation::CENTER : text::VertOrientation::BOTTOM; rSh.SetBoxAlign(nAlign); - bCallDone = TRUE; + bCallDone = sal_True; } break; @@ -1171,7 +1172,7 @@ void SwTableShell::Execute(SfxRequest &rReq) if(pSplit) pSplit->SetValue(!pSplit->GetValue()); else - pSplit = new SwFmtRowSplit(TRUE); + pSplit = new SwFmtRowSplit(sal_True); } else { @@ -1198,7 +1199,7 @@ void SwTableShell::GetState(SfxItemSet &rSet) // os #124829# crash report: in case of an invalid shell selection return immediately if(!pFmt) return; - USHORT nSlot = aIter.FirstWhich(); + sal_uInt16 nSlot = aIter.FirstWhich(); while ( nSlot ) { switch ( nSlot ) @@ -1213,19 +1214,19 @@ void SwTableShell::GetState(SfxItemSet &rSet) break; case FN_TABLE_BALANCE_CELLS: - if ( !rSh.IsAdjustCellWidthAllowed(TRUE) ) + if ( !rSh.IsAdjustCellWidthAllowed(sal_True) ) rSet.DisableItem(FN_TABLE_BALANCE_CELLS); break; case FN_TABLE_BALANCE_ROWS: - if ( !rSh.BalanceRowHeight(TRUE) ) + if ( !rSh.BalanceRowHeight(sal_True) ) rSet.DisableItem(FN_TABLE_BALANCE_ROWS); break; case FN_OPTIMIZE_TABLE: if ( !rSh.IsTableMode() && !rSh.IsAdjustCellWidthAllowed() && - !rSh.IsAdjustCellWidthAllowed(TRUE) && - !rSh.BalanceRowHeight(TRUE) ) + !rSh.IsAdjustCellWidthAllowed(sal_True) && + !rSh.BalanceRowHeight(sal_True) ) rSet.DisableItem(FN_OPTIMIZE_TABLE); break; case SID_INSERT_DIAGRAM: @@ -1271,8 +1272,8 @@ void SwTableShell::GetState(SfxItemSet &rSet) case FN_TABLE_VERT_CENTER: case FN_TABLE_VERT_BOTTOM: { - USHORT nAlign = rSh.GetBoxAlign(); - BOOL bSet = (nSlot == FN_TABLE_VERT_NONE && nAlign == text::VertOrientation::NONE) || + sal_uInt16 nAlign = rSh.GetBoxAlign(); + sal_Bool bSet = (nSlot == FN_TABLE_VERT_NONE && nAlign == text::VertOrientation::NONE) || (nSlot == FN_TABLE_VERT_CENTER && nAlign == text::VertOrientation::CENTER) || (nSlot == FN_TABLE_VERT_BOTTOM && nAlign == text::VertOrientation::BOTTOM); rSet.Put(SfxBoolItem(nSlot, bSet)); @@ -1284,9 +1285,9 @@ void SwTableShell::GetState(SfxItemSet &rSet) case FN_TABLE_MODE_VARIABLE : { TblChgMode nMode = rSh.GetTblChgMode(); - BOOL bSet = (nSlot == FN_TABLE_MODE_FIX && nMode == TBLFIX_CHGABS) || - (nSlot == FN_TABLE_MODE_FIX_PROP && nMode == TBLFIX_CHGPROP) || - (nSlot == FN_TABLE_MODE_VARIABLE && nMode == TBLVAR_CHGABS); + sal_Bool bSet = (nSlot == FN_TABLE_MODE_FIX && nMode == TBLFIX_CHGABS) || + (nSlot == FN_TABLE_MODE_FIX_PROP && nMode == TBLFIX_CHGPROP) || + (nSlot == FN_TABLE_MODE_VARIABLE && nMode == TBLVAR_CHGABS); rSet.Put(SfxBoolItem(nSlot, bSet)); } break; @@ -1306,8 +1307,8 @@ void SwTableShell::GetState(SfxItemSet &rSet) break; case FN_TABLE_MERGE_TABLE: { - BOOL bAsk; - if( !rSh.CanMergeTable( TRUE, &bAsk )) + sal_Bool bAsk; + if( !rSh.CanMergeTable( sal_True, &bAsk )) rSet.DisableItem( nSlot ); } break; @@ -1403,7 +1404,7 @@ void SwTableShell::ExecTableStyle(SfxRequest& rReq) const SvxLineItem &rLineItem = (const SvxLineItem&)pArgs-> Get( SID_FRAME_LINESTYLE ); const SvxBorderLine* pBorderLine = rLineItem.GetLine(); - rSh.SetTabLineStyle( 0, TRUE, pBorderLine); + rSh.SetTabLineStyle( 0, sal_True, pBorderLine); } else { @@ -1444,15 +1445,15 @@ void SwTableShell::ExecNumberFormat(SfxRequest& rReq) //Erstmal die Slots, die keinen FrmMgr benoetigen. const SfxPoolItem* pItem = 0; - USHORT nSlot = rReq.GetSlot(); + sal_uInt16 nSlot = rReq.GetSlot(); if(pArgs) - pArgs->GetItemState(GetPool().GetWhich(nSlot), FALSE, &pItem); + pArgs->GetItemState(GetPool().GetWhich(nSlot), sal_False, &pItem); // Sprache immer von Cursorposition besorgen LanguageType eLang = rSh.GetCurLang(); SvNumberFormatter* pFormatter = rSh.GetNumberFormatter(); sal_uInt32 nNumberFormat = NUMBERFORMAT_ENTRY_NOT_FOUND; - USHORT nFmtType = 0, nOffset = 0; + sal_uInt16 nFmtType = 0, nOffset = 0; switch ( nSlot ) { diff --git a/sw/source/ui/shells/textdrw.cxx b/sw/source/ui/shells/textdrw.cxx index 9aba16d9b3..16e47464ad 100644 --- a/sw/source/ui/shells/textdrw.cxx +++ b/sw/source/ui/shells/textdrw.cxx @@ -64,7 +64,7 @@ void SwBaseShell::InsertURLButton(const String& rURL, const String& rTarget, con SdrView *pSdrView = rSh.GetDrawView(); // OBJ_FM_BUTTON - pSdrView->SetDesignMode(TRUE); + pSdrView->SetDesignMode(sal_True); pSdrView->SetCurrentObj(OBJ_FM_BUTTON); pSdrView->SetEditMode(sal_False); diff --git a/sw/source/ui/shells/textfld.cxx b/sw/source/ui/shells/textfld.cxx index 37b4529244..ead452771e 100644 --- a/sw/source/ui/shells/textfld.cxx +++ b/sw/source/ui/shells/textfld.cxx @@ -83,11 +83,11 @@ using namespace nsSwDocInfoSubType; -extern BOOL bNoInterrupt; // in mainwn.cxx +extern sal_Bool bNoInterrupt; // in mainwn.cxx -String& lcl_AppendRedlineStr( String& rStr, USHORT nRedlId ) +String& lcl_AppendRedlineStr( String& rStr, sal_uInt16 nRedlId ) { - USHORT nResId = 0; + sal_uInt16 nResId = 0; switch( nRedlId ) { case nsRedlineType_t::REDLINE_INSERT: nResId = STR_REDLINE_INSERTED; break; @@ -107,17 +107,17 @@ void SwTextShell::ExecField(SfxRequest &rReq) SwWrtShell& rSh = GetShell(); const SfxPoolItem* pItem = 0; - USHORT nSlot = rReq.GetSlot(); + sal_uInt16 nSlot = rReq.GetSlot(); const SfxItemSet* pArgs = rReq.GetArgs(); if(pArgs) - pArgs->GetItemState(GetPool().GetWhich(nSlot), FALSE, &pItem); + pArgs->GetItemState(GetPool().GetWhich(nSlot), sal_False, &pItem); Window *pMDI = &GetView().GetViewFrame()->GetWindow(); - BOOL bMore = FALSE; - BOOL bIsText = TRUE; - USHORT nInsertType = 0; - USHORT nInsertSubType = 0; - ULONG nInsertFormat = 0; + sal_Bool bMore = sal_False; + sal_Bool bIsText = sal_True; + sal_uInt16 nInsertType = 0; + sal_uInt16 nInsertSubType = 0; + sal_uLong nInsertFormat = 0; switch(nSlot) { @@ -135,7 +135,7 @@ void SwTextShell::ExecField(SfxRequest &rReq) if(rLink.IsVisible()) { SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - SfxAbstractLinksDialog* pDlg = pFact->CreateLinksDialog( pMDI, &rSh.GetLinkManager(), FALSE, &rLink ); + SfxAbstractLinksDialog* pDlg = pFact->CreateLinksDialog( pMDI, &rSh.GetLinkManager(), sal_False, &rLink ); if ( pDlg ) { pDlg->Execute(); @@ -165,7 +165,7 @@ void SwTextShell::ExecField(SfxRequest &rReq) { const String& rMacro = ((SwMacroField*)pFld)->GetMacro(); - USHORT nPos = rMacro.Search('.', 0); + sal_uInt16 nPos = rMacro.Search('.', 0); if(nPos != STRING_NOTFOUND) { SvxMacro aMacro( rMacro.Copy(nPos + 1), rMacro.Copy(0,nPos), STARBASIC ); @@ -178,14 +178,14 @@ void SwTextShell::ExecField(SfxRequest &rReq) case FN_GOTO_NEXT_INPUTFLD: case FN_GOTO_PREV_INPUTFLD: { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; SwFieldType* pFld = rSh.GetFldType( 0, RES_INPUTFLD ); if( pFld && rSh.MoveFldType( pFld, FN_GOTO_NEXT_INPUTFLD == nSlot )) { rSh.ClearMark(); - rSh.StartInputFldDlg( rSh.GetCurFld(), FALSE ); - bRet = TRUE; + rSh.StartInputFldDlg( rSh.GetCurFld(), sal_False ); + bRet = sal_True; } rReq.SetReturnValue( SfxBoolItem( nSlot, bRet )); @@ -193,7 +193,7 @@ void SwTextShell::ExecField(SfxRequest &rReq) break; default: - bMore = TRUE; + bMore = sal_True; } if(bMore) { @@ -203,40 +203,40 @@ void SwTextShell::ExecField(SfxRequest &rReq) { case FN_INSERT_DBFIELD: { - BOOL bRes = FALSE; + sal_Bool bRes = sal_False; if( pItem ) { - ULONG nFormat = 0; - USHORT nType = 0; + sal_uLong nFormat = 0; + sal_uInt16 nType = 0; String aPar1 = ((SfxStringItem *)pItem)->GetValue(); String aPar2; sal_Int32 nCommand = 0; if( SFX_ITEM_SET == pArgs->GetItemState( FN_PARAM_FIELD_TYPE, - FALSE, &pItem )) + sal_False, &pItem )) nType = ((SfxUInt16Item *)pItem)->GetValue(); aPar1 += DB_DELIM; if( SFX_ITEM_SET == pArgs->GetItemState( - FN_PARAM_1, FALSE, &pItem )) + FN_PARAM_1, sal_False, &pItem )) { aPar1 += ((SfxStringItem *)pItem)->GetValue(); } if( SFX_ITEM_SET == pArgs->GetItemState( - FN_PARAM_3, FALSE, &pItem )) + FN_PARAM_3, sal_False, &pItem )) nCommand = ((SfxInt32Item*)pItem)->GetValue(); aPar1 += DB_DELIM; aPar1 += String::CreateFromInt32(nCommand); aPar1 += DB_DELIM; if( SFX_ITEM_SET == pArgs->GetItemState( - FN_PARAM_2, FALSE, &pItem )) + FN_PARAM_2, sal_False, &pItem )) { aPar1 += ((SfxStringItem *)pItem)->GetValue(); } if( SFX_ITEM_SET == pArgs->GetItemState( - FN_PARAM_FIELD_CONTENT, FALSE, &pItem )) + FN_PARAM_FIELD_CONTENT, sal_False, &pItem )) aPar2 = ((SfxStringItem *)pItem)->GetValue(); if( SFX_ITEM_SET == pArgs->GetItemState( - FN_PARAM_FIELD_FORMAT, FALSE, &pItem )) + FN_PARAM_FIELD_FORMAT, sal_False, &pItem )) nFormat = ((SfxUInt32Item *)pItem)->GetValue(); OSL_ENSURE(false, "Command is not yet used"); sal_Unicode cSeparator = ' '; @@ -249,30 +249,30 @@ void SwTextShell::ExecField(SfxRequest &rReq) case FN_INSERT_FIELD_CTRL: case FN_INSERT_FIELD: { - BOOL bRes = FALSE; + sal_Bool bRes = sal_False; if( pItem && nSlot != FN_INSERT_FIELD_CTRL) { - ULONG nFormat = 0; - USHORT nType = 0; - USHORT nSubType = 0; + sal_uLong nFormat = 0; + sal_uInt16 nType = 0; + sal_uInt16 nSubType = 0; String aPar1 = ((SfxStringItem *)pItem)->GetValue(); String aPar2; sal_Unicode cSeparator = ' '; if( SFX_ITEM_SET == pArgs->GetItemState( FN_PARAM_FIELD_TYPE, - FALSE, &pItem )) + sal_False, &pItem )) nType = ((SfxUInt16Item *)pItem)->GetValue(); if( SFX_ITEM_SET == pArgs->GetItemState( FN_PARAM_FIELD_SUBTYPE, - FALSE, &pItem )) + sal_False, &pItem )) nSubType = ((SfxUInt16Item *)pItem)->GetValue(); if( SFX_ITEM_SET == pArgs->GetItemState( - FN_PARAM_FIELD_CONTENT, FALSE, &pItem )) + FN_PARAM_FIELD_CONTENT, sal_False, &pItem )) aPar2 = ((SfxStringItem *)pItem)->GetValue(); if( SFX_ITEM_SET == pArgs->GetItemState( - FN_PARAM_FIELD_FORMAT, FALSE, &pItem )) + FN_PARAM_FIELD_FORMAT, sal_False, &pItem )) nFormat = ((SfxUInt32Item *)pItem)->GetValue(); if( SFX_ITEM_SET == pArgs->GetItemState( - FN_PARAM_3, FALSE, &pItem )) + FN_PARAM_3, sal_False, &pItem )) { String sTmp = ((SfxStringItem *)pItem)->GetValue(); if(sTmp.Len()) @@ -303,14 +303,14 @@ void SwTextShell::ExecField(SfxRequest &rReq) pVFrame->ToggleChildWindow(FN_INSERT_FIELD); // Dialog anzeigen // Flddlg auf neue TabPage umschalten - USHORT nId = SwFldDlgWrapper::GetChildWindowId(); + sal_uInt16 nId = SwFldDlgWrapper::GetChildWindowId(); SwFldDlgWrapper *pWrp = (SwFldDlgWrapper*)pVFrame->GetChildWindow(nId); if (pWrp) pWrp->ShowPage(); rReq.Ignore(); } break; - case FN_DELETE_NOTE: + case FN_DELETE_COMMENT: if ( GetView().GetPostItMgr() && GetView().GetPostItMgr()->HasActiveSidebarWin() ) { @@ -323,7 +323,7 @@ void SwTextShell::ExecField(SfxRequest &rReq) break; case FN_DELETE_NOTE_AUTHOR: { - SFX_REQUEST_ARG( rReq, pNoteItem, SfxStringItem, nSlot, FALSE); + SFX_REQUEST_ARG( rReq, pNoteItem, SfxStringItem, nSlot, sal_False); if ( pNoteItem && GetView().GetPostItMgr() ) GetView().GetPostItMgr()->Delete( pNoteItem->GetValue() ); } @@ -341,7 +341,7 @@ void SwTextShell::ExecField(SfxRequest &rReq) break; case FN_HIDE_NOTE_AUTHOR: { - SFX_REQUEST_ARG( rReq, pNoteItem, SfxStringItem, nSlot, FALSE); + SFX_REQUEST_ARG( rReq, pNoteItem, SfxStringItem, nSlot, sal_False); if ( pNoteItem && GetView().GetPostItMgr() ) GetView().GetPostItMgr()->Hide( pNoteItem->GetValue() ); } @@ -349,7 +349,7 @@ void SwTextShell::ExecField(SfxRequest &rReq) case FN_POSTIT: { SwPostItField* pPostIt = (SwPostItField*)aFldMgr.GetCurFld(); - BOOL bNew = !(pPostIt && pPostIt->GetTyp()->Which() == RES_POSTITFLD); + sal_Bool bNew = !(pPostIt && pPostIt->GetTyp()->Which() == RES_POSTITFLD); if (bNew || GetView().GetPostItMgr()->IsAnswer()) { SvtUserOptions aUserOpt; @@ -366,9 +366,9 @@ void SwTextShell::ExecField(SfxRequest &rReq) SwInsertFld_Data aData(TYP_POSTITFLD, 0, sAuthor, aEmptyStr, 0); aFldMgr.InsertFld(aData); rSh.Push(); - rSh.SwCrsrShell::Left(1, CRSR_SKIP_CHARS, FALSE); + rSh.SwCrsrShell::Left(1, CRSR_SKIP_CHARS, sal_False); pPostIt = (SwPostItField*)aFldMgr.GetCurFld(); - rSh.Pop(FALSE); // Cursorpos restaurieren + rSh.Pop(sal_False); // Cursorpos restaurieren } if (pPostIt) @@ -413,7 +413,7 @@ void SwTextShell::ExecField(SfxRequest &rReq) sComment = pRedline->GetComment(); - BOOL bTravel = FALSE; + sal_Bool bTravel = sal_False; SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); OSL_ENSURE(pFact, "Dialogdiet fail!"); @@ -440,8 +440,8 @@ void SwTextShell::ExecField(SfxRequest &rReq) pActRed = rSh.SelPrevRedline(); } - BOOL bPrev = pActRed != 0; - rSh.Pop(FALSE); + sal_Bool bPrev = pActRed != 0; + rSh.Pop(sal_False); rSh.EndAction(); rSh.ClearMark(); @@ -450,8 +450,8 @@ void SwTextShell::ExecField(SfxRequest &rReq) rSh.StartAction(); rSh.Push(); pActRed = rSh.SelNextRedline(); - BOOL bNext = pActRed != 0; - rSh.Pop(FALSE); // Cursorpos restaurieren + sal_Bool bNext = pActRed != 0; + rSh.Pop(sal_False); // Cursorpos restaurieren if( rSh.IsCrsrPtAtEnd() ) rSh.SwapPam(); @@ -462,7 +462,7 @@ void SwTextShell::ExecField(SfxRequest &rReq) SvxAbstractDialogFactory* pFact2 = SvxAbstractDialogFactory::Create(); OSL_ENSURE(pFact2, "Dialogdiet fail!"); - AbstractSvxPostItDialog* pDlg = pFact2->CreateSvxPostItDialog( pMDI, aSet, bTravel, TRUE ); + AbstractSvxPostItDialog* pDlg = pFact2->CreateSvxPostItDialog( pMDI, aSet, bTravel, sal_True ); OSL_ENSURE(pDlg, "Dialogdiet fail!"); pDlg->HideAuthor(); @@ -479,7 +479,7 @@ void SwTextShell::ExecField(SfxRequest &rReq) } rSh.SetCareWin(pDlg->GetWindow()); - bNoInterrupt = TRUE; + bNoInterrupt = sal_True; if ( pDlg->Execute() == RET_OK ) { @@ -492,7 +492,7 @@ void SwTextShell::ExecField(SfxRequest &rReq) delete pDlg; rSh.SetCareWin(NULL); - bNoInterrupt = FALSE; + bNoInterrupt = sal_False; rSh.ClearMark(); GetView().AttrChangedNotify(GetShellPtr()); } @@ -502,8 +502,8 @@ void SwTextShell::ExecField(SfxRequest &rReq) case FN_JAVAEDIT: { String aType, aText; - BOOL bIsUrl=FALSE; - BOOL bNew=FALSE, bUpdate=FALSE; + sal_Bool bIsUrl=sal_False; + sal_Bool bNew=sal_False, bUpdate=sal_False; SwFldMgr* pMgr = new SwFldMgr; if ( pItem ) { @@ -560,21 +560,21 @@ void SwTextShell::ExecField(SfxRequest &rReq) case FN_INSERT_FLD_DATE : nInsertType = TYP_DATEFLD; - bIsText = FALSE; + bIsText = sal_False; goto FIELD_INSERT; case FN_INSERT_FLD_TIME : nInsertType = TYP_TIMEFLD; - bIsText = FALSE; + bIsText = sal_False; goto FIELD_INSERT; case FN_INSERT_FLD_PGNUMBER: nInsertType = TYP_PAGENUMBERFLD; nInsertFormat = SVX_NUM_PAGEDESC; // wie Seitenvorlage - bIsText = FALSE; + bIsText = sal_False; goto FIELD_INSERT; case FN_INSERT_FLD_PGCOUNT : nInsertType = TYP_DOCSTATFLD; nInsertSubType = 0; - bIsText = FALSE; + bIsText = sal_False; nInsertFormat = SVX_NUM_PAGEDESC; goto FIELD_INSERT; case FN_INSERT_FLD_TOPIC : @@ -612,14 +612,14 @@ void SwTextShell::StateField( SfxItemSet &rSet ) SwWrtShell& rSh = GetShell(); SfxWhichIter aIter( rSet ); const SwField* pField = 0; - int bGetField = FALSE; - USHORT nWhich = aIter.FirstWhich(); + int bGetField = sal_False; + sal_uInt16 nWhich = aIter.FirstWhich(); while (nWhich) { switch (nWhich) { - case FN_DELETE_NOTE: + case FN_DELETE_COMMENT: case FN_DELETE_NOTE_AUTHOR: case FN_DELETE_ALL_NOTES: case FN_HIDE_NOTE: @@ -631,7 +631,7 @@ void SwTextShell::StateField( SfxItemSet &rSet ) rSet.InvalidateItem( nWhich ); else if ( !pPostItMgr->HasActiveSidebarWin() ) { - rSet.InvalidateItem( FN_DELETE_NOTE ); + rSet.InvalidateItem( FN_DELETE_COMMENT ); rSet.InvalidateItem( FN_HIDE_NOTE ); } } @@ -642,10 +642,10 @@ void SwTextShell::StateField( SfxItemSet &rSet ) if( !bGetField ) { pField = rSh.GetCurFld(); - bGetField = TRUE; + bGetField = sal_True; } - USHORT nTempWhich = pField ? pField->GetTyp()->Which() : USHRT_MAX; + sal_uInt16 nTempWhich = pField ? pField->GetTyp()->Which() : USHRT_MAX; if( USHRT_MAX == nTempWhich || RES_POSTITFLD == nTempWhich || RES_SCRIPTFLD == nTempWhich || @@ -664,7 +664,7 @@ void SwTextShell::StateField( SfxItemSet &rSet ) if(!bGetField) { pField = rSh.GetCurFld(); - bGetField = TRUE; + bGetField = sal_True; } if(!pField || pField->GetTyp()->Which() != RES_MACROFLD) rSet.DisableItem(nWhich); @@ -698,7 +698,7 @@ void SwTextShell::StateField( SfxItemSet &rSet ) break; case FN_POSTIT : case FN_JAVAEDIT : - BOOL bCurField = FALSE; + sal_Bool bCurField = sal_False; pField = rSh.GetCurFld(); if(nWhich == FN_POSTIT) bCurField = pField && pField->GetTyp()->Which() == RES_POSTITFLD; @@ -718,7 +718,7 @@ void SwTextShell::InsertHyperlink(const SvxHyperlinkItem& rHlnkItem) const String& rName = rHlnkItem.GetName(); const String& rURL = rHlnkItem.GetURL(); const String& rTarget = rHlnkItem.GetTargetFrame(); - USHORT nType = (USHORT)rHlnkItem.GetInsertMode(); + sal_uInt16 nType = (sal_uInt16)rHlnkItem.GetInsertMode(); nType &= ~HLINK_HTMLMODE; const SvxMacroTableDtor* pMacroTbl = rHlnkItem.GetMacroTbl(); @@ -731,10 +731,10 @@ void SwTextShell::InsertHyperlink(const SvxHyperlinkItem& rHlnkItem) rSh.GetCurAttr( aSet ); const SfxPoolItem* pItem; - if(SFX_ITEM_SET == aSet.GetItemState(RES_TXTATR_INETFMT, FALSE, &pItem)) + if(SFX_ITEM_SET == aSet.GetItemState(RES_TXTATR_INETFMT, sal_False, &pItem)) { // Links selektieren - rSh.SwCrsrShell::SelectTxtAttr(RES_TXTATR_INETFMT, FALSE); + rSh.SwCrsrShell::SelectTxtAttr(RES_TXTATR_INETFMT, sal_False); } switch (nType) { @@ -756,13 +756,13 @@ void SwTextShell::InsertHyperlink(const SvxHyperlinkItem& rHlnkItem) aINetFmt.SetMacro(SFX_EVENT_MOUSEOUT_OBJECT, *pMacro); } rSh.SttSelect(); - rSh.InsertURL( aINetFmt, rName, TRUE ); + rSh.InsertURL( aINetFmt, rName, sal_True ); rSh.EndSelect(); } break; case HLINK_BUTTON: - BOOL bSel = rSh.HasSelection(); + sal_Bool bSel = rSh.HasSelection(); if(bSel) rSh.DelRight(); InsertURLButton( rURL, rTarget, rName ); @@ -795,18 +795,18 @@ IMPL_LINK( SwTextShell, RedlineNextHdl, AbstractSvxPostItDialog *, pBtn ) const SwRedline *pActRed = pSh->SelNextRedline(); pSh->Pop(pActRed != 0); - BOOL bEnable = FALSE; + sal_Bool bEnable = sal_False; if (pActRed) { pSh->StartAction(); pSh->Push(); bEnable = pSh->SelNextRedline() != 0; - pSh->Pop(FALSE); + pSh->Pop(sal_False); pSh->EndAction(); } - pDlg->EnableTravel(bEnable, TRUE); + pDlg->EnableTravel(bEnable, sal_True); if( pSh->IsCrsrPtAtEnd() ) pSh->SwapPam(); @@ -847,18 +847,18 @@ IMPL_LINK( SwTextShell, RedlinePrevHdl, AbstractSvxPostItDialog *, pBtn ) const SwRedline *pActRed = pSh->SelPrevRedline(); pSh->Pop(pActRed != 0); - BOOL bEnable = FALSE; + sal_Bool bEnable = sal_False; if (pActRed) { pSh->StartAction(); pSh->Push(); bEnable = pSh->SelPrevRedline() != 0; - pSh->Pop(FALSE); + pSh->Pop(sal_False); pSh->EndAction(); } - pDlg->EnableTravel(TRUE, bEnable); + pDlg->EnableTravel(sal_True, bEnable); pRedline = pSh->GetCurrRedline(); sComment = pRedline->GetComment(); diff --git a/sw/source/ui/shells/textglos.cxx b/sw/source/ui/shells/textglos.cxx index c21533d83b..60db5a8c10 100644 --- a/sw/source/ui/shells/textglos.cxx +++ b/sw/source/ui/shells/textglos.cxx @@ -47,28 +47,28 @@ // STATIC DATA ----------------------------------------------------------- void SwTextShell::ExecGlossary(SfxRequest &rReq) { - USHORT nSlot = rReq.GetSlot(); + sal_uInt16 nSlot = rReq.GetSlot(); ::GetGlossaries()->UpdateGlosPath(!rReq.IsAPI() || FN_GLOSSARY_DLG == nSlot ); SwGlossaryHdl* pGlosHdl = GetView().GetGlosHdl(); // SwGlossaryList updaten? - BOOL bUpdateList = FALSE; + sal_Bool bUpdateList = sal_False; const SfxItemSet *pArgs = rReq.GetArgs(); const SfxPoolItem* pItem = 0; if(pArgs) - pArgs->GetItemState(nSlot, FALSE, &pItem ); + pArgs->GetItemState(nSlot, sal_False, &pItem ); switch( nSlot ) { case FN_GLOSSARY_DLG: pGlosHdl->GlossaryDlg(); - bUpdateList = TRUE; + bUpdateList = sal_True; rReq.Ignore(); break; case FN_EXPAND_GLOSSARY: { - BOOL bReturn; + sal_Bool bReturn; bReturn = pGlosHdl->ExpandGlossary(); rReq.SetReturnValue( SfxBoolItem( nSlot, bReturn ) ); rReq.Done(); @@ -79,10 +79,10 @@ void SwTextShell::ExecGlossary(SfxRequest &rReq) { String aGroup = (( const SfxStringItem *)pItem)->GetValue(); String aName; - if(SFX_ITEM_SET == pArgs->GetItemState(FN_PARAM_1, FALSE, &pItem )) + if(SFX_ITEM_SET == pArgs->GetItemState(FN_PARAM_1, sal_False, &pItem )) aName = (( const SfxStringItem *)pItem)->GetValue(); String aShortName; - if(SFX_ITEM_SET == pArgs->GetItemState(FN_PARAM_2, FALSE, &pItem )) + if(SFX_ITEM_SET == pArgs->GetItemState(FN_PARAM_2, sal_False, &pItem )) aShortName = (( const SfxStringItem *)pItem)->GetValue(); SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); @@ -90,12 +90,12 @@ void SwTextShell::ExecGlossary(SfxRequest &rReq) ::GlossarySetActGroup fnSetActGroup = pFact->SetGlossaryActGroupFunc( DLG_RENAME_GLOS ); if ( fnSetActGroup ) (*fnSetActGroup)( aGroup ); - pGlosHdl->SetCurGroup(aGroup, TRUE); + pGlosHdl->SetCurGroup(aGroup, sal_True); //eingestellte Gruppe muss in NewGlossary ggf. erzeugt werden! - pGlosHdl->NewGlossary( aName, aShortName, TRUE ); + pGlosHdl->NewGlossary( aName, aShortName, sal_True ); rReq.Done(); } - bUpdateList = TRUE; + bUpdateList = sal_True; break; case FN_SET_ACT_GLOSSARY: if(pItem) @@ -115,14 +115,14 @@ void SwTextShell::ExecGlossary(SfxRequest &rReq) { String aGroup = (( const SfxStringItem *)pItem)->GetValue(); String aName; - if(SFX_ITEM_SET == pArgs->GetItemState(FN_PARAM_1, FALSE, &pItem )) + if(SFX_ITEM_SET == pArgs->GetItemState(FN_PARAM_1, sal_False, &pItem )) aName = (( const SfxStringItem *)pItem)->GetValue(); SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); OSL_ENSURE(pFact, "Dialogdiet fail!"); ::GlossarySetActGroup fnSetActGroup = pFact->SetGlossaryActGroupFunc( DLG_RENAME_GLOS ); if ( fnSetActGroup ) (*fnSetActGroup)( aGroup ); - pGlosHdl->SetCurGroup(aGroup, TRUE); + pGlosHdl->SetCurGroup(aGroup, sal_True); rReq.SetReturnValue(SfxBoolItem(nSlot, pGlosHdl->InsertGlossary( aName ))); rReq.Done(); } diff --git a/sw/source/ui/shells/textidx.cxx b/sw/source/ui/shells/textidx.cxx index 7f307e9f82..123059e4e1 100644 --- a/sw/source/ui/shells/textidx.cxx +++ b/sw/source/ui/shells/textidx.cxx @@ -57,9 +57,9 @@ void SwTextShell::ExecIdx(SfxRequest &rReq) { const SfxItemSet *pArgs = rReq.GetArgs(); const SfxPoolItem* pItem = 0; - USHORT nSlot = rReq.GetSlot(); + sal_uInt16 nSlot = rReq.GetSlot(); if(pArgs) - pArgs->GetItemState(nSlot, FALSE, &pItem ); + pArgs->GetItemState(nSlot, sal_False, &pItem ); SfxViewFrame* pVFrame = GetView().GetViewFrame(); Window *pMDI = &pVFrame->GetWindow(); @@ -92,7 +92,7 @@ void SwTextShell::ExecIdx(SfxRequest &rReq) case FN_EDIT_IDX_ENTRY_DLG: { SwTOXMgr aMgr(GetShellPtr()); - USHORT nRet = RET_OK; + sal_uInt16 nRet = RET_OK; if(aMgr.GetTOXMarkCount() > 1) { // Mehrere Marken, welche solls denn sein ? // @@ -139,11 +139,11 @@ void SwTextShell::ExecIdx(SfxRequest &rReq) // Hoehe=Breite fuer konsistentere Vorschau (analog zu Bereich bearbeiten) aSet.Put(SvxSizeItem(SID_ATTR_PAGE_SIZE, Size(nWidth, nWidth))); const SwTOXBase* pCurTOX = 0; - BOOL bGlobal = FALSE; + sal_Bool bGlobal = sal_False; if(pItem) { pCurTOX = (const SwTOXBase* )((SwPtrItem*)pItem)->GetValue(); - bGlobal = TRUE; + bGlobal = sal_True; } else pCurTOX = rSh.GetCurTOX(); @@ -169,7 +169,7 @@ void SwTextShell::ExecIdx(SfxRequest &rReq) const SwTOXBase* pBase = rSh.GetCurTOX(); OSL_ENSURE(pBase, "no TOXBase to remove"); if( pBase ) - rSh.DeleteTOX(*pBase, TRUE); + rSh.DeleteTOX(*pBase, sal_True); } break; default: @@ -187,7 +187,7 @@ void SwTextShell::GetIdxState(SfxItemSet &rSet) SfxChildWindow* pAuthMark = pVFrame->GetChildWindow(FN_INSERT_AUTH_ENTRY_DLG); - const BOOL bHtmlMode = 0 != ::GetHtmlMode( GetView().GetDocShell() ); + const sal_Bool bHtmlMode = 0 != ::GetHtmlMode( GetView().GetDocShell() ); const SwTOXBase* pBase = 0; if( bHtmlMode || 0 != ( pBase = rSh.GetCurTOX()) ) { @@ -205,27 +205,27 @@ void SwTextShell::GetIdxState(SfxItemSet &rSet) if(!pIdxMrk) rSet.DisableItem( FN_INSERT_IDX_ENTRY_DLG ); else - rSet.Put(SfxBoolItem(FN_INSERT_IDX_ENTRY_DLG, TRUE)); + rSet.Put(SfxBoolItem(FN_INSERT_IDX_ENTRY_DLG, sal_True)); if(!pAuthMark) rSet.DisableItem( FN_INSERT_AUTH_ENTRY_DLG ); else - rSet.Put(SfxBoolItem(FN_INSERT_AUTH_ENTRY_DLG, TRUE)); + rSet.Put(SfxBoolItem(FN_INSERT_AUTH_ENTRY_DLG, sal_True)); } else { - BOOL bEnableEdit = TRUE; - BOOL bInReadonly = rSh.HasReadonlySel(); + sal_Bool bEnableEdit = sal_True; + sal_Bool bInReadonly = rSh.HasReadonlySel(); if( rSh.HasSelection() || bInReadonly) - bEnableEdit = FALSE; + bEnableEdit = sal_False; else { SwTOXMarks aArr; rSh.GetCurTOXMarks( aArr ); if( !aArr.Count()) - bEnableEdit = FALSE; + bEnableEdit = sal_False; } if(!bEnableEdit) diff --git a/sw/source/ui/shells/textsh.cxx b/sw/source/ui/shells/textsh.cxx index d768df8166..93c297dd8d 100644 --- a/sw/source/ui/shells/textsh.cxx +++ b/sw/source/ui/shells/textsh.cxx @@ -115,7 +115,6 @@ #include <sfx2/msg.hxx> #include <swslots.hxx> #include <SwRewriter.hxx> -#include <undobj.hxx> #include <comcore.hrc> using namespace ::com::sun::star; @@ -151,9 +150,9 @@ void SwTextShell::ExecInsert(SfxRequest &rReq) const SfxItemSet *pArgs = rReq.GetArgs(); const SfxPoolItem* pItem = 0; - USHORT nSlot = rReq.GetSlot(); + sal_uInt16 nSlot = rReq.GetSlot(); if(pArgs) - pArgs->GetItemState(nSlot, FALSE, &pItem ); + pArgs->GetItemState(nSlot, sal_False, &pItem ); switch( nSlot ) { @@ -162,8 +161,8 @@ void SwTextShell::ExecInsert(SfxRequest &rReq) rSh.InsertByWord(((const SfxStringItem *)pItem)->GetValue()); break; case FN_INSERT_SOFT_HYPHEN: - if( CHAR_SOFTHYPHEN != rSh.SwCrsrShell::GetChar( TRUE, 0 ) && - CHAR_SOFTHYPHEN != rSh.SwCrsrShell::GetChar( TRUE, -1 )) + if( CHAR_SOFTHYPHEN != rSh.SwCrsrShell::GetChar( sal_True, 0 ) && + CHAR_SOFTHYPHEN != rSh.SwCrsrShell::GetChar( sal_True, -1 )) rSh.Insert( String( CHAR_SOFTHYPHEN ) ); break; @@ -258,14 +257,13 @@ void SwTextShell::ExecInsert(SfxRequest &rReq) } } - rSh.InsertObject( xObj, 0, TRUE, nSlot); + rSh.InsertObject( xObj, 0, sal_True, nSlot); } } } break; case SID_INSERT_OBJECT: case SID_INSERT_PLUGIN: - case SID_INSERT_APPLET: { SFX_REQUEST_ARG( rReq, pNameItem, SfxGlobalNameItem, SID_INSERT_OBJECT, sal_False ); SvGlobalName *pName = NULL; @@ -276,58 +274,23 @@ void SwTextShell::ExecInsert(SfxRequest &rReq) pName = &aName; } - SFX_REQUEST_ARG( rReq, pClassItem, SfxStringItem, FN_PARAM_1, sal_False ); SFX_REQUEST_ARG( rReq, pClassLocationItem, SfxStringItem, FN_PARAM_2, sal_False ); SFX_REQUEST_ARG( rReq, pCommandsItem, SfxStringItem, FN_PARAM_3, sal_False ); //TODO/LATER: recording currently not working, need code for Commandlist svt::EmbeddedObjectRef xObj; - if((SID_INSERT_APPLET == nSlot || SID_INSERT_PLUGIN) - && (pClassItem || pClassLocationItem || pCommandsItem)) + if( nSlot == SID_INSERT_PLUGIN && ( pClassLocationItem || pCommandsItem ) ) { - String sClass; String sClassLocation; - if(pClassItem) - sClass = pClassItem->GetValue(); if(pClassLocationItem) sClassLocation = pClassLocationItem->GetValue(); SvCommandList aCommandList; if(pCommandsItem) { - USHORT nTemp; + sal_uInt16 nTemp; aCommandList.AppendCommands( pCommandsItem->GetValue(), &nTemp ); } - if(SID_INSERT_APPLET == nSlot) - { - SwApplet_Impl aApplImpl( rSh.GetAttrPool(), - RES_FRMATR_BEGIN, RES_FRMATR_END-1 ); - String sBaseURL; - SfxMedium* pMedium = GetView().GetDocShell()->GetMedium(); - if(pMedium) - sBaseURL = pMedium->GetURLObject().GetMainURL(INetURLObject::NO_DECODE); - - aApplImpl.CreateApplet(sClass, aEmptyStr, FALSE, sClassLocation, sBaseURL ); - aApplImpl.FinishApplet(); - xObj.Assign( aApplImpl.GetApplet(), embed::Aspects::MSOLE_CONTENT ); - if( aCommandList.Count() ) - { - uno::Reference < beans::XPropertySet > xSet( xObj->getComponent(), uno::UNO_QUERY ); - if ( xSet.is() ) - { - uno::Sequence < beans::PropertyValue > aSeq; - aCommandList.FillSequence( aSeq ); - try - { - xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AppletCommands")), uno::makeAny( aSeq ) ); - } - catch ( uno::Exception& ) - { - } - } - } - } - else { comphelper::EmbeddedObjectContainer aCnt; ::rtl::OUString sName; @@ -365,7 +328,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq) else { OSL_ENSURE( !pNameItem || nSlot == SID_INSERT_OBJECT, "Superfluous argument!" ); - rSh.InsertObject( xObj, pName, TRUE, nSlot); + rSh.InsertObject( xObj, pName, sal_True, nSlot); rReq.Done(); } break; @@ -433,7 +396,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq) } else { - rSh.InsertObject( xObj, 0, TRUE, nSlot); + rSh.InsertObject( xObj, 0, sal_True, nSlot); rReq.Done(); } } @@ -467,7 +430,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq) else bFillWithData = sal_False; // will create chart with only it's default image - SwTableFUNC( &rSh, FALSE ).InsertChart( xDataProvider, bFillWithData, aRangeString ); + SwTableFUNC( &rSh, sal_False ).InsertChart( xDataProvider, bFillWithData, aRangeString ); rSh.LaunchOLEObj(); svt::EmbeddedObjectRef& xObj = rSh.GetOLEObject(); @@ -495,7 +458,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq) // the suggestion has to be removed before GetView().GetEditWin().StopQuickHelp(); SvGlobalName aGlobalName( SO3_SM_CLASSID ); - rSh.InsertObject( svt::EmbeddedObjectRef(), &aGlobalName, TRUE, 0 ); + rSh.InsertObject( svt::EmbeddedObjectRef(), &aGlobalName, sal_True, 0 ); } break; @@ -506,14 +469,14 @@ void SwTextShell::ExecInsert(SfxRequest &rReq) case FN_INSERT_FRAME_INTERACT_NOCOL: case FN_INSERT_FRAME_INTERACT: { - USHORT nCols = 1; - BOOL bModifier1 = rReq.GetModifier() == KEY_MOD1; + sal_uInt16 nCols = 1; + sal_Bool bModifier1 = rReq.GetModifier() == KEY_MOD1; if(pArgs) { if(FN_INSERT_FRAME_INTERACT_NOCOL != nSlot && - pArgs->GetItemState(SID_ATTR_COLUMNS, FALSE, &pItem) == SFX_ITEM_SET) + pArgs->GetItemState(SID_ATTR_COLUMNS, sal_False, &pItem) == SFX_ITEM_SET) nCols = ((SfxUInt16Item *)pItem)->GetValue(); - if(pArgs->GetItemState(SID_MODIFIER, FALSE, &pItem) == SFX_ITEM_SET) + if(pArgs->GetItemState(SID_MODIFIER, sal_False, &pItem) == SFX_ITEM_SET) bModifier1 |= KEY_MOD1 == ((SfxUInt16Item *)pItem)->GetValue(); } if(bModifier1 ) @@ -527,7 +490,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq) Size aSize(16 * MM50, 8 * MM50); GetShell().LockPaint(); GetShell().StartAllAction(); - SwFlyFrmAttrMgr aMgr( TRUE, GetShellPtr(), FRMMGR_TYPE_TEXT ); + SwFlyFrmAttrMgr aMgr( sal_True, GetShellPtr(), FRMMGR_TYPE_TEXT ); if(nCols > 1) { SwFmtCol aCol; @@ -547,37 +510,37 @@ void SwTextShell::ExecInsert(SfxRequest &rReq) break; case FN_INSERT_FRAME: { - BOOL bSingleCol = FALSE; + sal_Bool bSingleCol = sal_False; if( 0!= dynamic_cast< SwWebDocShell*>( GetView().GetDocShell()) ) { SvxHtmlOptions* pHtmlOpt = SvxHtmlOptions::Get(); - USHORT nExport = pHtmlOpt->GetExportMode(); + sal_uInt16 nExport = pHtmlOpt->GetExportMode(); if( HTML_CFG_MSIE == nExport || HTML_CFG_HTML32 == nExport || HTML_CFG_MSIE_40 == nExport || HTML_CFG_HTML32 == nExport ) { - bSingleCol = TRUE; + bSingleCol = sal_True; } } // Rahmen neu anlegen - SwFlyFrmAttrMgr aMgr( TRUE, GetShellPtr(), FRMMGR_TYPE_TEXT ); + SwFlyFrmAttrMgr aMgr( sal_True, GetShellPtr(), FRMMGR_TYPE_TEXT ); if(pArgs) { Size aSize(aMgr.GetSize()); aSize.Width() = GetShell().GetAnyCurRect(RECT_PAGE_PRT).Width(); Point aPos = aMgr.GetPos(); RndStdIds eAnchor = FLY_AT_PARA; - if(pArgs->GetItemState(nSlot, FALSE, &pItem) == SFX_ITEM_SET) + if(pArgs->GetItemState(nSlot, sal_False, &pItem) == SFX_ITEM_SET) eAnchor = (RndStdIds)((SfxUInt16Item *)pItem)->GetValue(); - if(pArgs->GetItemState(FN_PARAM_1, FALSE, &pItem) == SFX_ITEM_SET) + if(pArgs->GetItemState(FN_PARAM_1, sal_False, &pItem) == SFX_ITEM_SET) aPos = ((SfxPointItem *)pItem)->GetValue(); - if(pArgs->GetItemState(FN_PARAM_2, FALSE, &pItem) == SFX_ITEM_SET) + if(pArgs->GetItemState(FN_PARAM_2, sal_False, &pItem) == SFX_ITEM_SET) aSize = ((SvxSizeItem *)pItem)->GetSize(); - if(pArgs->GetItemState(SID_ATTR_COLUMNS, FALSE, &pItem) == SFX_ITEM_SET) + if(pArgs->GetItemState(SID_ATTR_COLUMNS, sal_False, &pItem) == SFX_ITEM_SET) { - USHORT nCols = ((SfxUInt16Item *)pItem)->GetValue(); + sal_uInt16 nCols = ((SfxUInt16Item *)pItem)->GetValue(); if( !bSingleCol && 1 < nCols ) { SwFmtCol aFmtCol; @@ -597,7 +560,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq) } else { - static USHORT const aFrmAttrRange[] = + static sal_uInt16 aFrmAttrRange[] = { RES_FRMATR_BEGIN, RES_FRMATR_END-1, SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER, @@ -626,29 +589,31 @@ void SwTextShell::ExecInsert(SfxRequest &rReq) // Minimalgroesse in Spalten loeschen SvxBoxInfoItem aBoxInfo((SvxBoxInfoItem &)aSet.Get(SID_ATTR_BORDER_INNER)); const SvxBoxItem& rBox = (const SvxBoxItem&)aSet.Get(RES_BOX); - aBoxInfo.SetMinDist(FALSE); + aBoxInfo.SetMinDist(sal_False); aBoxInfo.SetDefDist(rBox.GetDistance(BOX_LINE_LEFT)); aSet.Put(aBoxInfo); FieldUnit eMetric = ::GetDfltMetric(0 != PTR_CAST(SwWebDocShell, GetView().GetDocShell())); - SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< UINT16 >(eMetric))); + SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric))); SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); OSL_ENSURE(pFact, "Dialogdiet fail!"); SfxAbstractTabDialog* pDlg = pFact->CreateFrmTabDialog( DLG_FRM_STD, - GetView().GetViewFrame(), &GetView().GetViewFrame()->GetWindow(), aSet, TRUE); + GetView().GetViewFrame(), &GetView().GetViewFrame()->GetWindow(), aSet, sal_True); OSL_ENSURE(pDlg, "Dialogdiet fail!"); if(pDlg->Execute() && pDlg->GetOutputItemSet()) { - GetShell().LockPaint(); - GetShell().StartAllAction(); - GetShell().StartUndo(UNDO_INSERT); + //local variable necessary at least after call of .AutoCaption() because this could be deleted at this point + SwWrtShell& rShell = GetShell(); + rShell.LockPaint(); + rShell.StartAllAction(); + rShell.StartUndo(UNDO_INSERT); const SfxItemSet* pOutSet = pDlg->GetOutputItemSet(); aMgr.SetAttrSet(*pOutSet); // beim ClickToEditFeld erst die Selektion loeschen - if( GetShell().IsInClickToEdit() ) - GetShell().DelRight(); + if( rShell.IsInClickToEdit() ) + rShell.DelRight(); aMgr.InsertFlyFrm(); @@ -657,10 +622,10 @@ void SwTextShell::ExecInsert(SfxRequest &rReq) if ( xRecorder.is() ) { //FN_INSERT_FRAME - USHORT nAnchor = (USHORT)aMgr.GetAnchor(); + sal_uInt16 nAnchor = (sal_uInt16)aMgr.GetAnchor(); rReq.AppendItem(SfxUInt16Item(nSlot, nAnchor)); - rReq.AppendItem(SfxPointItem(FN_PARAM_1, GetShell().GetObjAbsPos())); - rReq.AppendItem(SvxSizeItem(FN_PARAM_2, GetShell().GetObjSize())); + rReq.AppendItem(SfxPointItem(FN_PARAM_1, rShell.GetObjAbsPos())); + rReq.AppendItem(SvxSizeItem(FN_PARAM_2, rShell.GetObjSize())); rReq.Done(); } @@ -671,10 +636,10 @@ void SwTextShell::ExecInsert(SfxRequest &rReq) aRewriter.AddRule(UNDO_ARG1, SW_RES(STR_FRAME)); - GetShell().EndUndo(UNDO_INSERT, &aRewriter); + rShell.EndUndo(UNDO_INSERT, &aRewriter); } - GetShell().EndAllAction(); - GetShell().UnlockPaint(); + rShell.EndAllAction(); + rShell.UnlockPaint(); } DELETEZ(pDlg); @@ -684,8 +649,8 @@ void SwTextShell::ExecInsert(SfxRequest &rReq) case FN_INSERT_HRULER: { String sPath; - BOOL bSimpleLine = FALSE; - BOOL bRet = FALSE; + sal_Bool bSimpleLine = sal_False; + sal_Bool bRet = sal_False; Window* pParent = GetView().GetWindow(); if ( pItem ) { @@ -720,28 +685,28 @@ void SwTextShell::ExecInsert(SfxRequest &rReq) if(bSimpleLine) { if(!(rSh.IsSttOfPara() && rSh.IsEndOfPara())) // kein leerer Absatz? - rSh.SplitNode( FALSE, FALSE ); // dann Platz schaffen - rSh.SplitNode( FALSE, FALSE ); - rSh.Left(CRSR_SKIP_CHARS, FALSE, 1, FALSE ); + rSh.SplitNode( sal_False, sal_False ); // dann Platz schaffen + rSh.SplitNode( sal_False, sal_False ); + rSh.Left(CRSR_SKIP_CHARS, sal_False, 1, sal_False ); rSh.SetTxtFmtColl( rSh.GetTxtCollFromPool( RES_POOLCOLL_HTML_HR )); - rSh.Right(CRSR_SKIP_CHARS, FALSE, 1, FALSE ); - bRet = TRUE; + rSh.Right(CRSR_SKIP_CHARS, sal_False, 1, sal_False ); + bRet = sal_True; } else if(sPath.Len()) { - SwFlyFrmAttrMgr aFrmMgr( TRUE, &rSh, FRMMGR_TYPE_GRF ); + SwFlyFrmAttrMgr aFrmMgr( sal_True, &rSh, FRMMGR_TYPE_GRF ); // am FrmMgr muessen die richtigen Parameter eingestellt werden aFrmMgr.SetAnchor(FLY_AS_CHAR); - rSh.SplitNode( FALSE, FALSE ); - rSh.SplitNode( FALSE, FALSE ); - rSh.Left(CRSR_SKIP_CHARS, FALSE, 1, FALSE ); + rSh.SplitNode( sal_False, sal_False ); + rSh.SplitNode( sal_False, sal_False ); + rSh.Left(CRSR_SKIP_CHARS, sal_False, 1, sal_False ); rSh.SetAttr(SvxAdjustItem(SVX_ADJUST_CENTER,RES_PARATR_ADJUST )); - if(GRFILTER_OK == GetView().InsertGraphic(sPath, aEmptyStr, TRUE, 0, 0 )) - bRet = TRUE; + if(GRFILTER_OK == GetView().InsertGraphic(sPath, aEmptyStr, sal_True, 0, 0 )) + bRet = sal_True; rSh.EnterStdMode(); - rSh.Right(CRSR_SKIP_CHARS, FALSE, 1, FALSE ); + rSh.Right(CRSR_SKIP_CHARS, sal_False, 1, sal_False ); } rSh.EndAllAction(); rSh.EndUndo(UNDO_UI_INSERT_RULER); @@ -776,18 +741,18 @@ bool lcl_IsMarkInSameSection( SwWrtShell& rWrtSh, const SwSection* pSect ) void SwTextShell::StateInsert( SfxItemSet &rSet ) { - USHORT nHtmlMode = ::GetHtmlMode(GetView().GetDocShell()); + sal_uInt16 nHtmlMode = ::GetHtmlMode(GetView().GetDocShell()); SfxWhichIter aIter( rSet ); SwWrtShell &rSh = GetShell(); - USHORT nWhich = aIter.FirstWhich(); + sal_uInt16 nWhich = aIter.FirstWhich(); SvtModuleOptions aMOpt; SfxObjectCreateMode eCreateMode = GetView().GetDocShell()->GetCreateMode(); rSh.Push(); - const BOOL bCrsrInHidden = rSh.SelectHiddenRange(); + const sal_Bool bCrsrInHidden = rSh.SelectHiddenRange(); // --> OD 2009-08-05 #i103839#, #b6855246# - // Do not call method <SwCrsrShell::Pop(..)> with 1st parameter = <FALSE> + // Do not call method <SwCrsrShell::Pop(..)> with 1st parameter = <sal_False> // in order to avoid that the view jumps to the visible cursor. rSh.Pop(); // <-- @@ -826,13 +791,8 @@ void SwTextShell::StateInsert( SfxItemSet &rSet ) case SID_INSERT_FLOATINGFRAME: case SID_INSERT_OBJECT: case SID_INSERT_PLUGIN: - case SID_INSERT_APPLET: { - if( -#ifndef SOLAR_JAVA - nWhich == SID_INSERT_APPLET || -#endif - eCreateMode == SFX_CREATE_MODE_EMBEDDED || bCrsrInHidden ) + if( eCreateMode == SFX_CREATE_MODE_EMBEDDED || bCrsrInHidden ) { rSet.DisableItem( nWhich ); } @@ -841,7 +801,7 @@ void SwTextShell::StateInsert( SfxItemSet &rSet ) else if(SID_INSERT_FLOATINGFRAME == nWhich && nHtmlMode&HTMLMODE_ON) { SvxHtmlOptions* pHtmlOpt = SvxHtmlOptions::Get(); - USHORT nExport = pHtmlOpt->GetExportMode(); + sal_uInt16 nExport = pHtmlOpt->GetExportMode(); if(HTML_CFG_MSIE_40 != nExport && HTML_CFG_WRITER != nExport ) rSet.DisableItem(nWhich); } @@ -862,7 +822,7 @@ void SwTextShell::StateInsert( SfxItemSet &rSet ) SvxHyperlinkItem aHLinkItem; const SfxPoolItem* pItem; - if(SFX_ITEM_SET == aSet.GetItemState(RES_TXTATR_INETFMT, FALSE, &pItem)) + if(SFX_ITEM_SET == aSet.GetItemState(RES_TXTATR_INETFMT, sal_False, &pItem)) { const SwFmtINetFmt* pINetFmt = (const SwFmtINetFmt*)pItem; aHLinkItem.SetURL(pINetFmt->GetValue()); @@ -883,7 +843,7 @@ void SwTextShell::StateInsert( SfxItemSet &rSet ) // Text des Links besorgen rSh.StartAction(); rSh.CreateCrsr(); - rSh.SwCrsrShell::SelectTxtAttr(RES_TXTATR_INETFMT,TRUE); + rSh.SwCrsrShell::SelectTxtAttr(RES_TXTATR_INETFMT,sal_True); String sLinkName = rSh.GetSelTxt(); aHLinkItem.SetName(sLinkName); aHLinkItem.SetInsertMode(HLINK_FIELD); @@ -928,7 +888,7 @@ void SwTextShell::StateInsert( SfxItemSet &rSet ) if( bDisable ) { const SwSection* pCurrSection = rSh.GetCurrSection(); - USHORT nFullSectCnt = rSh.GetFullSelectedSectionCount(); + sal_uInt16 nFullSectCnt = rSh.GetFullSelectedSectionCount(); if( pCurrSection && ( !rSh.HasSelection() || 0 != nFullSectCnt )) bDisable = false; else if( @@ -1054,14 +1014,14 @@ void SwTextShell::InsertSymbol( SfxRequest& rReq ) const SfxItemSet *pArgs = rReq.GetArgs(); const SfxPoolItem* pItem = 0; if( pArgs ) - pArgs->GetItemState(GetPool().GetWhich(SID_CHARMAP), FALSE, &pItem); + pArgs->GetItemState(GetPool().GetWhich(SID_CHARMAP), sal_False, &pItem); String aChars, aFontName; if ( pItem ) { aChars = ((const SfxStringItem*)pItem)->GetValue(); const SfxPoolItem* pFtItem = NULL; - pArgs->GetItemState( GetPool().GetWhich(SID_ATTR_SPECIALCHAR), FALSE, &pFtItem); + pArgs->GetItemState( GetPool().GetWhich(SID_ATTR_SPECIALCHAR), sal_False, &pFtItem); const SfxStringItem* pFontItem = PTR_CAST( SfxStringItem, pFtItem ); if ( pFontItem ) aFontName = pFontItem->GetValue(); @@ -1073,19 +1033,19 @@ void SwTextShell::InsertSymbol( SfxRequest& rReq ) RES_CHRATR_CTL_FONT, RES_CHRATR_CTL_FONT, 0 ); rSh.GetCurAttr( aSet ); - USHORT nScript = rSh.GetScriptType(); + sal_uInt16 nScript = rSh.GetScriptType(); SvxFontItem aFont( RES_CHRATR_FONT ); { SvxScriptSetItem aSetItem( SID_ATTR_CHAR_FONT, *aSet.GetPool() ); - aSetItem.GetItemSet().Put( aSet, FALSE ); + aSetItem.GetItemSet().Put( aSet, sal_False ); const SfxPoolItem* pI = aSetItem.GetItemOfScript( nScript ); if( pI ) aFont = *(SvxFontItem*)pI; else aFont = (SvxFontItem&)aSet.Get( GetWhichOfScript( RES_CHRATR_FONT, - GetI18NScriptTypeOfLanguage( (USHORT)GetAppLanguage() ) )); + GetI18NScriptTypeOfLanguage( (sal_uInt16)GetAppLanguage() ) )); if (!aFontName.Len()) aFontName = aFont.GetFamilyName(); } @@ -1095,7 +1055,7 @@ void SwTextShell::InsertSymbol( SfxRequest& rReq ) { // Eingestellten Font als Default SfxAllItemSet aAllSet( rSh.GetAttrPool() ); - aAllSet.Put( SfxBoolItem( FN_PARAM_1, FALSE ) ); + aAllSet.Put( SfxBoolItem( FN_PARAM_1, sal_False ) ); SwViewOption aOpt(*GetShell().GetViewOptions()); String sSymbolFont = aOpt.GetSymbolFont(); @@ -1109,8 +1069,8 @@ void SwTextShell::InsertSymbol( SfxRequest& rReq ) GetView().GetViewFrame()->GetFrame().GetFrameInterface(), RID_SVXDLG_CHARMAP ); if( RET_OK == pDlg->Execute() ) { - SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pCItem, SfxStringItem, SID_CHARMAP, FALSE ); - SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pFontItem, SvxFontItem, SID_ATTR_CHAR_FONT, FALSE ); + SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pCItem, SfxStringItem, SID_CHARMAP, sal_False ); + SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pFontItem, SvxFontItem, SID_ATTR_CHAR_FONT, sal_False ); if ( pFontItem ) { aNewFont.SetName( pFontItem->GetFamilyName() ); @@ -1146,14 +1106,14 @@ void SwTextShell::InsertSymbol( SfxRequest& rReq ) rSh.GetCurAttr( aSet ); SvxScriptSetItem aSetItem( SID_ATTR_CHAR_FONT, *aSet.GetPool() ); - aSetItem.GetItemSet().Put( aSet, FALSE ); + aSetItem.GetItemSet().Put( aSet, sal_False ); const SfxPoolItem* pI = aSetItem.GetItemOfScript( nScript ); if( pI ) aFont = *(SvxFontItem*)pI; else aFont = (SvxFontItem&)aSet.Get( GetWhichOfScript( RES_CHRATR_FONT, - GetI18NScriptTypeOfLanguage( (USHORT)GetAppLanguage() ) )); + GetI18NScriptTypeOfLanguage( (sal_uInt16)GetAppLanguage() ) )); } // Zeichen einfuegen @@ -1175,22 +1135,22 @@ void SwTextShell::InsertSymbol( SfxRequest& rReq ) nScript = pBreakIt->GetAllScriptsOfText( aChars ); if( SCRIPTTYPE_LATIN & nScript ) { - aRestoreSet.Put( aSet.Get( RES_CHRATR_FONT, TRUE ) ); + aRestoreSet.Put( aSet.Get( RES_CHRATR_FONT, sal_True ) ); aSet.Put( aNewFontItem, RES_CHRATR_FONT); } if( SCRIPTTYPE_ASIAN & nScript ) { - aRestoreSet.Put( aSet.Get( RES_CHRATR_CJK_FONT, TRUE ) ); + aRestoreSet.Put( aSet.Get( RES_CHRATR_CJK_FONT, sal_True ) ); aSet.Put( aNewFontItem, RES_CHRATR_CJK_FONT ); } if( SCRIPTTYPE_COMPLEX & nScript ) { - aRestoreSet.Put( aSet.Get( RES_CHRATR_CTL_FONT, TRUE ) ); + aRestoreSet.Put( aSet.Get( RES_CHRATR_CTL_FONT, sal_True ) ); aSet.Put( aNewFontItem, RES_CHRATR_CTL_FONT ); } rSh.SetMark(); - rSh.ExtendSelection( FALSE, aChars.Len() ); + rSh.ExtendSelection( sal_False, aChars.Len() ); rSh.SetAttr( aSet, nsSetAttrMode::SETATTR_DONTEXPAND | nsSetAttrMode::SETATTR_NOFORMATATTR ); if( !rSh.IsCrsrPtAtEnd() ) rSh.SwapPam(); @@ -1210,7 +1170,7 @@ void SwTextShell::InsertSymbol( SfxRequest& rReq ) } rSh.EndAllAction(); - rSh.EndUndo( UNDO_INSERT ); + rSh.EndUndo(); if ( aChars.Len() ) { diff --git a/sw/source/ui/shells/textsh1.cxx b/sw/source/ui/shells/textsh1.cxx index a968114c12..a1cce6c575 100644 --- a/sw/source/ui/shells/textsh1.cxx +++ b/sw/source/ui/shells/textsh1.cxx @@ -126,15 +126,15 @@ #include <view.hxx> #include <ndtxt.hxx> #include <pam.hxx> - +#include <sfx2/objface.hxx> #include <langhelper.hxx> using namespace ::com::sun::star; -void lcl_CharDialog( SwWrtShell &rWrtSh, BOOL bUseDialog, USHORT nSlot,const SfxItemSet *pArgs, SfxRequest *pReq ) +void lcl_CharDialog( SwWrtShell &rWrtSh, sal_Bool bUseDialog, sal_uInt16 nSlot,const SfxItemSet *pArgs, SfxRequest *pReq ) { FieldUnit eMetric = ::GetDfltMetric(0 != PTR_CAST(SwWebView, &rWrtSh.GetView())); - SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< UINT16 >(eMetric))); + SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric))); SfxItemSet aCoreSet( rWrtSh.GetView().GetPool(), RES_CHRATR_BEGIN, RES_CHRATR_END-1, RES_TXTATR_INETFMT, RES_TXTATR_INETFMT, @@ -144,8 +144,8 @@ void lcl_CharDialog( SwWrtShell &rWrtSh, BOOL bUseDialog, USHORT nSlot,const Sfx SID_ATTR_CHAR_WIDTH_FIT_TO_LINE, SID_ATTR_CHAR_WIDTH_FIT_TO_LINE, 0 ); rWrtSh.GetCurAttr( aCoreSet ); - BOOL bSel = rWrtSh.HasSelection(); - BOOL bSelectionPut = FALSE; + sal_Bool bSel = rWrtSh.HasSelection(); + sal_Bool bSelectionPut = sal_False; if(bSel || rWrtSh.IsInWord()) { if(!bSel) @@ -156,10 +156,10 @@ void lcl_CharDialog( SwWrtShell &rWrtSh, BOOL bUseDialog, USHORT nSlot,const Sfx rWrtSh.SelWrd(); } aCoreSet.Put(SfxStringItem(FN_PARAM_SELECTION, rWrtSh.GetSelTxt())); - bSelectionPut = TRUE; + bSelectionPut = sal_True; if(!bSel) { - rWrtSh.Pop(FALSE); + rWrtSh.Pop(sal_False); rWrtSh.EndAction(); } } @@ -168,7 +168,7 @@ void lcl_CharDialog( SwWrtShell &rWrtSh, BOOL bUseDialog, USHORT nSlot,const Sfx // Das CHRATR_BACKGROUND-Attribut wird fuer den Dialog in // ein RES_BACKGROUND verwandelt und wieder zurueck ... const SfxPoolItem *pTmpBrush; - if( SFX_ITEM_SET == aCoreSet.GetItemState( RES_CHRATR_BACKGROUND, TRUE, &pTmpBrush ) ) + if( SFX_ITEM_SET == aCoreSet.GetItemState( RES_CHRATR_BACKGROUND, sal_True, &pTmpBrush ) ) { SvxBrushItem aTmpBrush( *((SvxBrushItem*)pTmpBrush) ); aTmpBrush.SetWhich( RES_BACKGROUND ); @@ -199,7 +199,7 @@ void lcl_CharDialog( SwWrtShell &rWrtSh, BOOL bUseDialog, USHORT nSlot,const Sfx if ( pSet) { SfxItemSet aTmpSet( *pSet ); - if( SFX_ITEM_SET == aTmpSet.GetItemState( RES_BACKGROUND, FALSE, &pTmpBrush ) ) + if( SFX_ITEM_SET == aTmpSet.GetItemState( RES_BACKGROUND, sal_False, &pTmpBrush ) ) { SvxBrushItem aTmpBrush( *((SvxBrushItem*)pTmpBrush) ); aTmpBrush.SetWhich( RES_CHRATR_BACKGROUND ); @@ -209,11 +209,11 @@ void lcl_CharDialog( SwWrtShell &rWrtSh, BOOL bUseDialog, USHORT nSlot,const Sfx aTmpSet.ClearItem( RES_BACKGROUND ); const SfxPoolItem* pSelectionItem; - BOOL bInsert = FALSE; + sal_Bool bInsert = sal_False; xub_StrLen nInsert = 0; // aus ungeklaerter Ursache ist das alte Item wieder im Set - if( !bSelectionPut && SFX_ITEM_SET == aTmpSet.GetItemState(FN_PARAM_SELECTION, FALSE, &pSelectionItem) ) + if( !bSelectionPut && SFX_ITEM_SET == aTmpSet.GetItemState(FN_PARAM_SELECTION, sal_False, &pSelectionItem) ) { String sInsert = ((const SfxStringItem*)pSelectionItem)->GetValue(); bInsert = sInsert.Len() != 0; @@ -223,13 +223,13 @@ void lcl_CharDialog( SwWrtShell &rWrtSh, BOOL bUseDialog, USHORT nSlot,const Sfx rWrtSh.StartAction(); rWrtSh.Insert( sInsert ); rWrtSh.SetMark(); - rWrtSh.ExtendSelection(FALSE, sInsert.Len()); + rWrtSh.ExtendSelection(sal_False, sInsert.Len()); SfxRequest aReq( rWrtSh.GetView().GetViewFrame(), FN_INSERT_STRING ); aReq.AppendItem( SfxStringItem( FN_INSERT_STRING, sInsert ) ); aReq.Done(); SfxRequest aReq1( rWrtSh.GetView().GetViewFrame(), FN_CHAR_LEFT ); aReq1.AppendItem( SfxInt16Item(FN_PARAM_MOVE_COUNT, nInsert) ); - aReq1.AppendItem( SfxBoolItem(FN_PARAM_MOVE_SELECTION, TRUE) ); + aReq1.AppendItem( SfxBoolItem(FN_PARAM_MOVE_SELECTION, sal_True) ); aReq1.Done(); } } @@ -248,7 +248,7 @@ void lcl_CharDialog( SwWrtShell &rWrtSh, BOOL bUseDialog, USHORT nSlot,const Sfx { SfxRequest aReq1( rWrtSh.GetView().GetViewFrame(), FN_CHAR_RIGHT ); aReq1.AppendItem( SfxInt16Item(FN_PARAM_MOVE_COUNT, nInsert) ); - aReq1.AppendItem( SfxBoolItem(FN_PARAM_MOVE_SELECTION, FALSE) ); + aReq1.AppendItem( SfxBoolItem(FN_PARAM_MOVE_SELECTION, sal_False) ); aReq1.Done(); rWrtSh.SwapPam(); rWrtSh.ClearMark(); @@ -266,7 +266,7 @@ short lcl_AskRedlineMode(Window *pWin) String( SW_RES( STR_REDLINE_TITLE ) ), String( SW_RES( STR_REDLINE_MSG ) ) ); aQBox.SetImage( QueryBox::GetStandardImage() ); - USHORT nBtnFlags = BUTTONDIALOG_DEFBUTTON | + sal_uInt16 nBtnFlags = BUTTONDIALOG_DEFBUTTON | BUTTONDIALOG_OKBUTTON | BUTTONDIALOG_FOCUSBUTTON; @@ -283,13 +283,13 @@ short lcl_AskRedlineMode(Window *pWin) void SwTextShell::Execute(SfxRequest &rReq) { - BOOL bUseDialog = TRUE; + sal_Bool bUseDialog = sal_True; const SfxItemSet *pArgs = rReq.GetArgs(); SwWrtShell& rWrtSh = GetShell(); const SfxPoolItem* pItem = 0; - USHORT nSlot = rReq.GetSlot(); + sal_uInt16 nSlot = rReq.GetSlot(); if(pArgs) - pArgs->GetItemState(GetPool().GetWhich(nSlot), FALSE, &pItem); + pArgs->GetItemState(GetPool().GetWhich(nSlot), sal_False, &pItem); switch( nSlot ) { case SID_LANGUAGE_STATUS: @@ -324,7 +324,7 @@ void SwTextShell::Execute(SfxRequest &rReq) //!! due to the selection changes coming below. rWrtSh.StartAction(); // prevent view from jumping because of (temporary) selection changes - rWrtSh.LockView( TRUE ); + rWrtSh.LockView( sal_True ); // save selection for later restoration rWrtSh.Push(); @@ -383,9 +383,9 @@ void SwTextShell::Execute(SfxRequest &rReq) } // restore selection... - rWrtSh.Pop( FALSE ); + rWrtSh.Pop( sal_False ); - rWrtSh.LockView( FALSE ); + rWrtSh.LockView( sal_False ); rWrtSh.EndAction(); } @@ -426,19 +426,19 @@ void SwTextShell::Execute(SfxRequest &rReq) SFX_REQUEST_ARG( rReq, pNameItem, SfxStringItem, nSlot , sal_False ); if ( pNameItem ) aStr = pNameItem->GetValue(); - BOOL bFont = pFont && pFont->GetValue().Len(); + sal_Bool bFont = pFont && pFont->GetValue().Len(); rWrtSh.StartUndo( UNDO_UI_INSERT_FOOTNOTE ); rWrtSh.InsertFootnote( aStr, nSlot == FN_INSERT_ENDNOTE, !bFont ); if ( bFont ) { - rWrtSh.Left( CRSR_SKIP_CHARS, TRUE, 1, FALSE ); + rWrtSh.Left( CRSR_SKIP_CHARS, sal_True, 1, sal_False ); SfxItemSet aSet( rWrtSh.GetAttrPool(), RES_CHRATR_FONT, RES_CHRATR_FONT ); rWrtSh.GetCurAttr( aSet ); SvxFontItem &rFont = (SvxFontItem &) aSet.Get( RES_CHRATR_FONT ); SvxFontItem aFont( rFont.GetFamily(), pFont->GetValue(), rFont.GetStyleName(), rFont.GetPitch(), RTL_TEXTENCODING_DONTKNOW, RES_CHRATR_FONT ); rWrtSh.SetAttr( aSet, nsSetAttrMode::SETATTR_DONTEXPAND ); - rWrtSh.ResetSelect(0, FALSE); + rWrtSh.ResetSelect(0, sal_False); rWrtSh.EndSelect(); rWrtSh.GotoFtnTxt(); } @@ -451,12 +451,12 @@ void SwTextShell::Execute(SfxRequest &rReq) SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); OSL_ENSURE(pFact, "Dialogdiet fail!"); AbstractInsFootNoteDlg* pDlg = pFact->CreateInsFootNoteDlg( DLG_INS_FOOTNOTE, - GetView().GetWindow(), rWrtSh, FALSE ); + GetView().GetWindow(), rWrtSh, sal_False ); OSL_ENSURE(pDlg, "Dialogdiet fail!"); - pDlg->SetHelpId(nSlot); + pDlg->SetHelpId(GetStaticInterface()->GetSlot(nSlot)->GetCommand()); if ( pDlg->Execute() == RET_OK ) { - USHORT nId = pDlg->IsEndNote() ? FN_INSERT_ENDNOTE : FN_INSERT_FOOTNOTE; + sal_uInt16 nId = pDlg->IsEndNote() ? FN_INSERT_ENDNOTE : FN_INSERT_FOOTNOTE; SfxRequest aReq( GetView().GetViewFrame(), nId ); if ( pDlg->GetStr().Len() ) aReq.AppendItem( SfxStringItem( nId, pDlg->GetStr() ) ); @@ -492,7 +492,7 @@ void SwTextShell::Execute(SfxRequest &rReq) // remove the languages from that) SvUShortsSort aAttribs; - USHORT aResetableSetRange[] = { + sal_uInt16 aResetableSetRange[] = { RES_FRMATR_BEGIN, RES_FRMATR_END-1, RES_CHRATR_BEGIN, RES_CHRATR_LANGUAGE - 1, RES_CHRATR_LANGUAGE + 1, RES_CHRATR_CJK_LANGUAGE - 1, @@ -504,12 +504,12 @@ void SwTextShell::Execute(SfxRequest &rReq) RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END-1, 0 }; - USHORT *pUShorts = aResetableSetRange; + sal_uInt16 *pUShorts = aResetableSetRange; while (*pUShorts) { - USHORT nL = pUShorts[1] - pUShorts[0] + 1; - USHORT nE = pUShorts[0]; - for (USHORT i = 0; i < nL; ++i) + sal_uInt16 nL = pUShorts[1] - pUShorts[0] + 1; + sal_uInt16 nE = pUShorts[0]; + for (sal_uInt16 i = 0; i < nL; ++i) aAttribs.Insert( nE++ ); pUShorts += 2; } @@ -520,7 +520,7 @@ void SwTextShell::Execute(SfxRequest &rReq) } case FN_INSERT_BREAK_DLG: { - USHORT nKind=0, nPageNumber=0; + sal_uInt16 nKind=0, nPageNumber=0; String aTemplateName; if ( pItem ) { @@ -605,11 +605,11 @@ void SwTextShell::Execute(SfxRequest &rReq) case FN_AUTOFORMAT_REDLINE_APPLY: { SvxSwAutoFmtFlags aFlags(SvxAutoCorrCfg::Get()->GetAutoCorrect()->GetSwFlags()); - // das muss fuer die Nachbearbeitung immer FALSE sein - aFlags.bAFmtByInput = FALSE; - aFlags.bWithRedlining = TRUE; + // das muss fuer die Nachbearbeitung immer sal_False sein + aFlags.bAFmtByInput = sal_False; + aFlags.bWithRedlining = sal_True; rWrtSh.AutoFormat( &aFlags ); - aFlags.bWithRedlining = FALSE; + aFlags.bWithRedlining = sal_False; SfxViewFrame* pVFrame = GetView().GetViewFrame(); if (pVFrame->HasChildWindow(FN_REDLINE_ACCEPT)) @@ -625,7 +625,7 @@ void SwTextShell::Execute(SfxRequest &rReq) { case RET_OK: { - pDlg->AcceptAll(TRUE); + pDlg->AcceptAll(sal_True); SfxRequest aReq( pVFrame, FN_AUTOFORMAT_APPLY ); aReq.Done(); rReq.Ignore(); @@ -633,7 +633,7 @@ void SwTextShell::Execute(SfxRequest &rReq) } case RET_CANCEL: - pDlg->AcceptAll(FALSE); + pDlg->AcceptAll(sal_False); rReq.Ignore(); break; @@ -649,8 +649,8 @@ void SwTextShell::Execute(SfxRequest &rReq) case FN_AUTOFORMAT_APPLY: { SvxSwAutoFmtFlags aFlags(SvxAutoCorrCfg::Get()->GetAutoCorrect()->GetSwFlags()); - // das muss fuer die Nachbearbeitung immer FALSE sein - aFlags.bAFmtByInput = FALSE; + // das muss fuer die Nachbearbeitung immer sal_False sein + aFlags.bAFmtByInput = sal_False; rWrtSh.AutoFormat( &aFlags ); rReq.Done(); } @@ -658,7 +658,7 @@ void SwTextShell::Execute(SfxRequest &rReq) case FN_AUTOFORMAT_AUTO: { SvxAutoCorrCfg* pACfg = SvxAutoCorrCfg::Get(); - BOOL bSet = pItem ? ((const SfxBoolItem*)pItem)->GetValue() : !pACfg->IsAutoFmtByInput(); + sal_Bool bSet = pItem ? ((const SfxBoolItem*)pItem)->GetValue() : !pACfg->IsAutoFmtByInput(); if( bSet != pACfg->IsAutoFmtByInput() ) { pACfg->SetAutoFmtByInput( bSet ); @@ -729,7 +729,7 @@ void SwTextShell::Execute(SfxRequest &rReq) break; case FN_EDIT_FORMULA: { - const USHORT nId = SwInputChild::GetChildWindowId(); + const sal_uInt16 nId = SwInputChild::GetChildWindowId(); SfxViewFrame* pVFrame = GetView().GetViewFrame(); if(pItem) { @@ -737,13 +737,13 @@ void SwTextShell::Execute(SfxRequest &rReq) if( pVFrame->HasChildWindow( nId ) ) { pVFrame->ToggleChildWindow( nId ); - pVFrame->GetBindings().InvalidateAll( TRUE ); + pVFrame->GetBindings().InvalidateAll( sal_True ); } String sFormula(((const SfxStringItem*)pItem)->GetValue()); SwFldMgr aFldMgr; rWrtSh.StartAllAction(); - BOOL bDelSel; + sal_Bool bDelSel; if( 0 != (bDelSel = rWrtSh.HasSelection()) ) { rWrtSh.StartUndo( UNDO_START ); @@ -768,7 +768,7 @@ void SwTextShell::Execute(SfxRequest &rReq) else { SvNumberFormatter* pFormatter = rWrtSh.GetNumberFormatter(); - ULONG nSysNumFmt = pFormatter->GetFormatIndex( NF_NUMBER_STANDARD, LANGUAGE_SYSTEM); + sal_uLong nSysNumFmt = pFormatter->GetFormatIndex( NF_NUMBER_STANDARD, LANGUAGE_SYSTEM); SwInsertFld_Data aData(TYP_FORMELFLD, nsSwGetSetExpType::GSE_FORMULA, aEmptyStr, sFormula, nSysNumFmt); aFldMgr.InsertFld(aData); } @@ -784,7 +784,7 @@ void SwTextShell::Execute(SfxRequest &rReq) rWrtSh.EndAllTblBoxEdit(); pVFrame->ToggleChildWindow( nId ); if( !pVFrame->HasChildWindow( nId ) ) - pVFrame->GetBindings().InvalidateAll( TRUE ); + pVFrame->GetBindings().InvalidateAll( sal_True ); rReq.Ignore(); } } @@ -800,7 +800,7 @@ void SwTextShell::Execute(SfxRequest &rReq) break; case FN_REMOVE_HYPERLINK: { - BOOL bSel = rWrtSh.HasSelection(); + sal_Bool bSel = rWrtSh.HasSelection(); if(!bSel) { rWrtSh.StartAction(); @@ -814,7 +814,7 @@ void SwTextShell::Execute(SfxRequest &rReq) rWrtSh.ResetAttr( &aAttribs ); if(!bSel) { - rWrtSh.Pop(FALSE); + rWrtSh.Pop(sal_False); rWrtSh.EndAction(); } } @@ -825,9 +825,9 @@ void SwTextShell::Execute(SfxRequest &rReq) case FN_TXTATR_INET : case FN_INSERT_HYPERLINK: { - USHORT nWhich = GetPool().GetWhich( nSlot ); + sal_uInt16 nWhich = GetPool().GetWhich( nSlot ); if ( pArgs && pArgs->GetItemState( nWhich ) == SFX_ITEM_SET ) - bUseDialog = FALSE; + bUseDialog = sal_False; // intentionally no break } case SID_CHAR_DLG: @@ -840,7 +840,7 @@ void SwTextShell::Execute(SfxRequest &rReq) rWrtSh.Push(); //save current cursor SwLangHelper::SelectCurrentPara( rWrtSh ); lcl_CharDialog( rWrtSh, bUseDialog, nSlot, pArgs, &rReq ); - rWrtSh.Pop( FALSE ); //restore old cursor + rWrtSh.Pop( sal_False ); //restore old cursor } break; case SID_ATTR_LRSPACE : @@ -856,18 +856,18 @@ void SwTextShell::Execute(SfxRequest &rReq) case FN_FORMAT_DROPCAPS : case FN_DROP_TEXT: { - USHORT nWhich = GetPool().GetWhich( nSlot ); + sal_uInt16 nWhich = GetPool().GetWhich( nSlot ); if ( pArgs && pArgs->GetItemState( nWhich ) == SFX_ITEM_SET ) - bUseDialog = FALSE; + bUseDialog = sal_False; // intentionally no break } case SID_PARA_DLG: { FieldUnit eMetric = ::GetDfltMetric(0 != PTR_CAST(SwWebView, &GetView())); - SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< UINT16 >(eMetric))); + SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric))); - BOOL bApplyCharUnit = ::HasCharUnit(0 != PTR_CAST(SwWebView, &GetView())); + sal_Bool bApplyCharUnit = ::HasCharUnit(0 != PTR_CAST(SwWebView, &GetView())); SW_MOD()->PutItem(SfxBoolItem(SID_ATTR_APPLYCHARUNIT, bApplyCharUnit)); SfxItemSet aCoreSet( GetPool(), @@ -894,7 +894,7 @@ void SwTextShell::Execute(SfxRequest &rReq) const SvxTabStopItem& rDefTabs = (const SvxTabStopItem&) GetPool().GetDefaultItem(RES_PARATR_TABSTOP); - USHORT nDefDist = ::GetTabDist( rDefTabs ); + sal_uInt16 nDefDist = ::GetTabDist( rDefTabs ); SfxUInt16Item aDefDistItem( SID_ATTR_TABSTOP_DEFAULTS, nDefDist ); aCoreSet.Put( aDefDistItem ); @@ -915,7 +915,7 @@ void SwTextShell::Execute(SfxRequest &rReq) //aktuelles Seitenformat ::SwToSfxPageDescAttr( aCoreSet ); - UINT16 nDefPage = 0; + sal_uInt16 nDefPage = 0; if( pItem ) nDefPage = ((SfxUInt16Item *)pItem)->GetValue(); @@ -935,7 +935,7 @@ void SwTextShell::Execute(SfxRequest &rReq) SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!"); - pDlg = pFact->CreateSwParaDlg( GetView().GetWindow(),GetView(), aCoreSet,DLG_STD, DLG_PARA,NULL, FALSE, nDefPage ); + pDlg = pFact->CreateSwParaDlg( GetView().GetWindow(),GetView(), aCoreSet,DLG_STD, DLG_PARA,NULL, sal_False, nDefPage ); OSL_ENSURE(pDlg, "Dialogdiet fail!"); } SfxItemSet* pSet = NULL; @@ -948,8 +948,8 @@ void SwTextShell::Execute(SfxRequest &rReq) { // Defaults evtl umsetzen pSet = (SfxItemSet*)pDlg->GetOutputItemSet(); - USHORT nNewDist; - if( SFX_ITEM_SET == pSet->GetItemState( SID_ATTR_TABSTOP_DEFAULTS, FALSE, &pItem ) && + sal_uInt16 nNewDist; + if( SFX_ITEM_SET == pSet->GetItemState( SID_ATTR_TABSTOP_DEFAULTS, sal_False, &pItem ) && nDefDist != (nNewDist = ((SfxUInt16Item*)pItem)->GetValue()) ) { SvxTabStopItem aDefTabs( 0, 0, SVX_TAB_ADJUST_DEFAULT, RES_PARATR_TABSTOP ); @@ -958,13 +958,13 @@ void SwTextShell::Execute(SfxRequest &rReq) pSet->ClearItem( SID_ATTR_TABSTOP_DEFAULTS ); } - if ( SFX_ITEM_SET == pSet->GetItemState(FN_PARAM_1,FALSE,&pItem) ) + if ( SFX_ITEM_SET == pSet->GetItemState(FN_PARAM_1,sal_False,&pItem) ) { pSet->Put(SfxStringItem(FN_DROP_TEXT, ((const SfxStringItem*)pItem)->GetValue())); pSet->ClearItem(FN_PARAM_1); } - if( SFX_ITEM_SET == pSet->GetItemState( RES_PARATR_DROP, FALSE, &pItem )) + if( SFX_ITEM_SET == pSet->GetItemState( RES_PARATR_DROP, sal_False, &pItem )) { String sCharStyleName; if(((const SwFmtDrop*)pItem)->GetCharFmt()) @@ -991,7 +991,7 @@ void SwTextShell::Execute(SfxRequest &rReq) if( pSet->Count() ) { rWrtSh.StartAction(); - if ( SFX_ITEM_SET == pSet->GetItemState(FN_DROP_TEXT, FALSE, &pItem) ) + if ( SFX_ITEM_SET == pSet->GetItemState(FN_DROP_TEXT, sal_False, &pItem) ) { if ( ((SfxStringItem*)pItem)->GetValue().Len() ) rWrtSh.ReplaceDropTxt(((SfxStringItem*)pItem)->GetValue()); @@ -1007,17 +1007,17 @@ void SwTextShell::Execute(SfxRequest &rReq) if( SFX_ITEM_SET == pSet->GetItemState(FN_NUMBER_NEWSTART) ) { - //SetNumRuleStart(TRUE) restarts the numbering at the value + //SetNumRuleStart(sal_True) restarts the numbering at the value //that is defined at the starting point of the numbering level //otherwise the SetNodeNumStart() value determines the start //if it's set to something different than USHRT_MAX - BOOL bStart = ((SfxBoolItem&)pSet->Get(FN_NUMBER_NEWSTART)).GetValue(); + sal_Bool bStart = ((SfxBoolItem&)pSet->Get(FN_NUMBER_NEWSTART)).GetValue(); // --> OD 2007-06-11 #b6560525# // Default value for restart value has to be USHRT_MAX // in order to indicate that the restart value of the list // style has to be used on restart. - USHORT nNumStart = USHRT_MAX; + sal_uInt16 nNumStart = USHRT_MAX; // <-- if( SFX_ITEM_SET == pSet->GetItemState(FN_NUMBER_NEWSTART_AT) ) { @@ -1028,9 +1028,9 @@ void SwTextShell::Execute(SfxRequest &rReq) } else if( SFX_ITEM_SET == pSet->GetItemState(FN_NUMBER_NEWSTART_AT) ) { - USHORT nNumStart = ((SfxUInt16Item&)pSet->Get(FN_NUMBER_NEWSTART_AT)).GetValue(); + sal_uInt16 nNumStart = ((SfxUInt16Item&)pSet->Get(FN_NUMBER_NEWSTART_AT)).GetValue(); rWrtSh.SetNodeNumStart(nNumStart); - rWrtSh.SetNumRuleStart(FALSE); + rWrtSh.SetNumRuleStart(sal_False); } // --> OD 2006-12-06 #i56253# if ( bUndoNeeded ) @@ -1064,10 +1064,10 @@ void SwTextShell::Execute(SfxRequest &rReq) case FN_SELECT_PARA: { if(!rWrtSh.IsSttOfPara()) - rWrtSh.SttPara(FALSE); + rWrtSh.SttPara(sal_False); else rWrtSh.EnterStdMode(); - rWrtSh.EndPara(TRUE); + rWrtSh.EndPara(sal_True); } break; @@ -1139,7 +1139,7 @@ void SwTextShell::Execute(SfxRequest &rReq) SwEditWin& rEdtWin = GetView().GetEditWin(); SwApplyTemplate* pApply = rEdtWin.GetApplyTemplate(); SwApplyTemplate aTempl; - BOOL bSelection = rWrtSh.HasSelection(); + sal_Bool bSelection = rWrtSh.HasSelection(); if(bSelection) { @@ -1189,8 +1189,8 @@ void SwTextShell::Execute(SfxRequest &rReq) String sStyleName; if(pItem) sStyleName = ((const SfxStringItem*)pItem)->GetValue(); - BOOL bOn = TRUE; - if( SFX_ITEM_SET == pArgs->GetItemState(FN_PARAM_1, FALSE, &pItem)) + sal_Bool bOn = sal_True; + if( SFX_ITEM_SET == pArgs->GetItemState(FN_PARAM_1, sal_False, &pItem)) bOn = ((const SfxBoolItem*)pItem)->GetValue(); ChangeHeaderOrFooter(sStyleName, FN_INSERT_PAGEHEADER == nSlot, bOn, !rReq.IsAPI()); rReq.Done(); @@ -1208,7 +1208,7 @@ void SwTextShell::Execute(SfxRequest &rReq) case FN_SELECTION_MODE_BLOCK : { bool bSetBlockMode = !rWrtSh.IsBlockMode(); - if( pArgs && SFX_ITEM_SET == pArgs->GetItemState(nSlot, FALSE, &pItem)) + if( pArgs && SFX_ITEM_SET == pArgs->GetItemState(nSlot, sal_False, &pItem)) bSetBlockMode = ((const SfxBoolItem*)pItem)->GetValue(); if( ( nSlot == FN_SELECTION_MODE_DEFAULT ) ^ bSetBlockMode ) rWrtSh.EnterBlockMode(); @@ -1226,9 +1226,9 @@ void SwTextShell::Execute(SfxRequest &rReq) RES_TXTATR_INETFMT, RES_TXTATR_INETFMT); rWrtSh.GetCurAttr(aSet); - if(SFX_ITEM_SET <= aSet.GetItemState( RES_TXTATR_INETFMT, TRUE )) + if(SFX_ITEM_SET <= aSet.GetItemState( RES_TXTATR_INETFMT, sal_True )) { - const SwFmtINetFmt& rINetFmt = dynamic_cast<const SwFmtINetFmt&>( aSet.Get(RES_TXTATR_INETFMT, TRUE) ); + const SwFmtINetFmt& rINetFmt = dynamic_cast<const SwFmtINetFmt&>( aSet.Get(RES_TXTATR_INETFMT, sal_True) ); if( nSlot == FN_COPY_HYPERLINK_LOCATION ) { ::uno::Reference< datatransfer::clipboard::XClipboard > xClipboard = GetView().GetEditWin().GetClipboard(); @@ -1283,7 +1283,7 @@ void SwTextShell::Execute(SfxRequest &rReq) SwDocStat aCurr; SwDocStat aDocStat( rSh.getIDocumentStatistics()->GetDocStat() ); { - SwWait aWait( *GetView().GetDocShell(), TRUE ); + SwWait aWait( *GetView().GetDocShell(), sal_True ); rSh.StartAction(); rSh.CountWords( aCurr ); rSh.UpdateDocStat( aDocStat ); @@ -1308,7 +1308,7 @@ void SwTextShell::GetState( SfxItemSet &rSet ) { SwWrtShell &rSh = GetShell(); SfxWhichIter aIter( rSet ); - USHORT nWhich = aIter.FirstWhich(); + sal_uInt16 nWhich = aIter.FirstWhich(); while ( nWhich ) { switch ( nWhich ) @@ -1403,15 +1403,15 @@ void SwTextShell::GetState( SfxItemSet &rSet ) case FN_INSERT_FOOTNOTE: case FN_INSERT_FOOTNOTE_DLG: { - const USHORT nNoType = FRMTYPE_FLY_ANY | FRMTYPE_HEADER | + const sal_uInt16 nNoType = FRMTYPE_FLY_ANY | FRMTYPE_HEADER | FRMTYPE_FOOTER | FRMTYPE_FOOTNOTE; - if ( (rSh.GetFrmType(0,TRUE) & nNoType) ) + if ( (rSh.GetFrmType(0,sal_True) & nNoType) ) rSet.DisableItem(nWhich); } break; case FN_INSERT_TABLE: if ( rSh.GetTableFmt() || - (rSh.GetFrmType(0,TRUE) & FRMTYPE_FOOTNOTE) ) + (rSh.GetFrmType(0,sal_True) & FRMTYPE_FOOTNOTE) ) rSet.DisableItem( nWhich ); break; @@ -1433,17 +1433,17 @@ void SwTextShell::GetState( SfxItemSet &rSet ) break; case FN_GLOSSARY_DLG: { - rSet.Put(SfxBoolItem(nWhich), TRUE); + rSet.Put(SfxBoolItem(nWhich), sal_True); } break; case SID_DEC_INDENT: case SID_INC_INDENT: { - USHORT nHtmlMode = ::GetHtmlMode(GetView().GetDocShell()); + sal_uInt16 nHtmlMode = ::GetHtmlMode(GetView().GetDocShell()); nHtmlMode &= HTMLMODE_ON|HTMLMODE_SOME_STYLES; if( (nHtmlMode == HTMLMODE_ON) || !rSh.IsMoveLeftMargin( - SID_INC_INDENT == nWhich, TRUE )) + SID_INC_INDENT == nWhich, sal_True )) rSet.DisableItem( nWhich ); } break; @@ -1451,11 +1451,11 @@ void SwTextShell::GetState( SfxItemSet &rSet ) case FN_DEC_INDENT_OFFSET: case FN_INC_INDENT_OFFSET: { - USHORT nHtmlMode = ::GetHtmlMode(GetView().GetDocShell()); + sal_uInt16 nHtmlMode = ::GetHtmlMode(GetView().GetDocShell()); nHtmlMode &= HTMLMODE_ON|HTMLMODE_SOME_STYLES; if( (nHtmlMode == HTMLMODE_ON) || !rSh.IsMoveLeftMargin( FN_INC_INDENT_OFFSET == nWhich, - FALSE )) + sal_False )) rSet.DisableItem( nWhich ); } break; @@ -1493,8 +1493,8 @@ void SwTextShell::GetState( SfxItemSet &rSet ) rSet.Put( SfxObjectShellItem( nWhich, GetView().GetDocShell() )); #else // Seitenvorlagen besorgen - BOOL bFound = FALSE; - USHORT n, nCnt = rSh.GetPageDescCnt(); + sal_Bool bFound = sal_False; + sal_uInt16 n, nCnt = rSh.GetPageDescCnt(); for( n = 0; n < nCnt; ++n ) { const SwPageDesc& rDesc = rSh.GetPageDesc( n ); @@ -1502,7 +1502,7 @@ void SwTextShell::GetState( SfxItemSet &rSet ) ? !rDesc.GetMaster().GetHeader().IsActive() : !rDesc.GetMaster().GetFooter().IsActive() ) { - bFound = TRUE; + bFound = sal_True; break; } } @@ -1549,7 +1549,7 @@ void SwTextShell::GetState( SfxItemSet &rSet ) RES_TXTATR_INETFMT, RES_TXTATR_INETFMT); rSh.GetCurAttr(aSet); - if(SFX_ITEM_SET > aSet.GetItemState( RES_TXTATR_INETFMT, TRUE ) || rSh.HasReadonlySel()) + if(SFX_ITEM_SET > aSet.GetItemState( RES_TXTATR_INETFMT, sal_True ) || rSh.HasReadonlySel()) { rSet.DisableItem(nWhich); } @@ -1563,7 +1563,7 @@ void SwTextShell::GetState( SfxItemSet &rSet ) rSh.GetCurAttr(aSet); // If a hyperlink is selected, either alone or along with other text... - if( ((SFX_ITEM_DONTCARE & aSet.GetItemState( RES_TXTATR_INETFMT, TRUE )) == 0) || rSh.HasReadonlySel()) + if( ((SFX_ITEM_DONTCARE & aSet.GetItemState( RES_TXTATR_INETFMT, sal_True )) == 0) || rSh.HasReadonlySel()) { rSet.DisableItem(nWhich); } @@ -1602,7 +1602,7 @@ void SwTextShell::GetState( SfxItemSet &rSet ) RES_TXTATR_INETFMT, RES_TXTATR_INETFMT); rSh.GetCurAttr(aSet); - if(SFX_ITEM_SET > aSet.GetItemState( RES_TXTATR_INETFMT, FALSE )) + if(SFX_ITEM_SET > aSet.GetItemState( RES_TXTATR_INETFMT, sal_False )) rSet.DisableItem(nWhich); } break; @@ -1685,18 +1685,18 @@ void SwTextShell::GetState( SfxItemSet &rSet ) given all styles are changed ---------------------------------------------------------------------------*/ void SwTextShell::ChangeHeaderOrFooter( - const String& rStyleName, BOOL bHeader, BOOL bOn, BOOL bShowWarning) + const String& rStyleName, sal_Bool bHeader, sal_Bool bOn, sal_Bool bShowWarning) { SwWrtShell& rSh = GetShell(); rSh.addCurrentPosition(); rSh.StartAllAction(); rSh.StartUndo( UNDO_HEADER_FOOTER ); // #i7983# - BOOL bExecute = TRUE; - BOOL bCrsrSet = FALSE; - for( USHORT nFrom = 0, nTo = rSh.GetPageDescCnt(); + sal_Bool bExecute = sal_True; + sal_Bool bCrsrSet = sal_False; + for( sal_uInt16 nFrom = 0, nTo = rSh.GetPageDescCnt(); nFrom < nTo; ++nFrom ) { - int bChgd = FALSE; + int bChgd = sal_False; SwPageDesc aDesc( rSh.GetPageDesc( nFrom )); String sTmp(aDesc.GetName()); if( !rStyleName.Len() || rStyleName == sTmp ) @@ -1705,19 +1705,19 @@ void SwTextShell::ChangeHeaderOrFooter( (bHeader && aDesc.GetMaster().GetHeader().IsActive())) || (!bHeader && aDesc.GetMaster().GetFooter().IsActive())) { - bShowWarning = FALSE; + bShowWarning = sal_False; //Actions have to be closed while the dialog is showing rSh.EndAllAction(); Window* pParent = &GetView().GetViewFrame()->GetWindow(); - BOOL bRet = RET_YES == QueryBox( pParent, ResId( RID_SVXQBX_DELETE_HEADFOOT, + sal_Bool bRet = RET_YES == QueryBox( pParent, ResId( RID_SVXQBX_DELETE_HEADFOOT, DIALOG_MGR() ) ).Execute(); bExecute = bRet; rSh.StartAllAction(); } if( bExecute ) { - bChgd = TRUE; + bChgd = sal_True; SwFrmFmt &rMaster = aDesc.GetMaster(); if(bHeader) rMaster.SetFmtAttr( SwFmtHeader( bOn )); diff --git a/sw/source/ui/shells/textsh2.cxx b/sw/source/ui/shells/textsh2.cxx index fb26410025..c7b6821b07 100644 --- a/sw/source/ui/shells/textsh2.cxx +++ b/sw/source/ui/shells/textsh2.cxx @@ -101,7 +101,7 @@ void SwTextShell::ExecDB(SfxRequest &rReq) { const SfxItemSet *pArgs = rReq.GetArgs(); SwNewDBMgr* pNewDBMgr = GetShell().GetNewDBMgr(); - USHORT nSlot = rReq.GetSlot(); + sal_uInt16 nSlot = rReq.GetSlot(); ::rtl::OUString sSourceArg, sCommandArg; sal_Int32 nCommandTypeArg = 0; @@ -113,29 +113,29 @@ void SwTextShell::ExecDB(SfxRequest &rReq) const SfxPoolItem* pSelectionItem = 0; // first get the selection of rows to be inserted - pArgs->GetItemState(FN_DB_DATA_SELECTION_ANY, FALSE, &pSelectionItem); + pArgs->GetItemState(FN_DB_DATA_SELECTION_ANY, sal_False, &pSelectionItem); Sequence<Any> aSelection; if(pSelectionItem) ((SfxUsrAnyItem*)pSelectionItem)->GetValue() >>= aSelection; // get the data source name - pArgs->GetItemState(FN_DB_DATA_SOURCE_ANY, FALSE, &pSourceItem); + pArgs->GetItemState(FN_DB_DATA_SOURCE_ANY, sal_False, &pSourceItem); if(pSourceItem) ((const SfxUsrAnyItem*)pSourceItem)->GetValue() >>= sSourceArg; // get the command - pArgs->GetItemState(FN_DB_DATA_COMMAND_ANY, FALSE, &pCommandItem); + pArgs->GetItemState(FN_DB_DATA_COMMAND_ANY, sal_False, &pCommandItem); if(pCommandItem) ((const SfxUsrAnyItem*)pCommandItem)->GetValue() >>= sCommandArg; // get the command type - pArgs->GetItemState(FN_DB_DATA_COMMAND_TYPE_ANY, FALSE, &pCommandTypeItem); + pArgs->GetItemState(FN_DB_DATA_COMMAND_TYPE_ANY, sal_False, &pCommandTypeItem); if(pCommandTypeItem) ((const SfxUsrAnyItem*)pCommandTypeItem)->GetValue() >>= nCommandTypeArg; Reference<XConnection> xConnection; - pArgs->GetItemState(FN_DB_CONNECTION_ANY, FALSE, &pConnectionItem); + pArgs->GetItemState(FN_DB_CONNECTION_ANY, sal_False, &pConnectionItem); if ( pConnectionItem ) ((const SfxUsrAnyItem*)pConnectionItem)->GetValue() >>= xConnection; // may be we even get no connection @@ -149,7 +149,7 @@ void SwTextShell::ExecDB(SfxRequest &rReq) // get the cursor, we use to travel, may be NULL Reference<XResultSet> xCursor; - pArgs->GetItemState(FN_DB_DATA_CURSOR_ANY, FALSE, &pCursorItem); + pArgs->GetItemState(FN_DB_DATA_CURSOR_ANY, sal_False, &pCursorItem); if ( pCursorItem ) ((const SfxUsrAnyItem*)pCursorItem)->GetValue() >>= xCursor; @@ -179,7 +179,7 @@ void SwTextShell::ExecDB(SfxRequest &rReq) case FN_QRY_MERGE_FIELD: { // we don't get any cursor, so we must create our own - BOOL bDisposeResultSet = FALSE; + sal_Bool bDisposeResultSet = sal_False; if ( !xCursor.is() ) { xCursor = SwNewDBMgr::createCursor(sSourceArg,sCommandArg,nCommandTypeArg,xConnection); @@ -206,8 +206,8 @@ void SwTextShell::ExecDB(SfxRequest &rReq) const SfxPoolItem* pColumnItem = 0; const SfxPoolItem* pColumnNameItem = 0; - pArgs->GetItemState(FN_DB_COLUMN_ANY, FALSE, &pColumnItem); - pArgs->GetItemState(FN_DB_DATA_COLUMN_NAME_ANY, FALSE, &pColumnNameItem); + pArgs->GetItemState(FN_DB_COLUMN_ANY, sal_False, &pColumnItem); + pArgs->GetItemState(FN_DB_DATA_COLUMN_NAME_ANY, sal_False, &pColumnNameItem); ::rtl::OUString sColumnName; if(pColumnNameItem) @@ -221,7 +221,7 @@ void SwTextShell::ExecDB(SfxRequest &rReq) sDBName += (String)sColumnName; SwFldMgr aFldMgr(GetShellPtr()); - SwInsertFld_Data aData(TYP_DBFLD, 0, sDBName, aEmptyStr, 0, FALSE, TRUE); + SwInsertFld_Data aData(TYP_DBFLD, 0, sDBName, aEmptyStr, 0, sal_False, sal_True); if(pConnectionItem) aData.aDBConnection = ((SfxUsrAnyItem*)pConnectionItem)->GetValue(); if(pColumnItem) diff --git a/sw/source/ui/shells/txtattr.cxx b/sw/source/ui/shells/txtattr.cxx index 4b23b0046b..35bfcc587e 100644 --- a/sw/source/ui/shells/txtattr.cxx +++ b/sw/source/ui/shells/txtattr.cxx @@ -78,12 +78,12 @@ void SwTextShell::ExecCharAttr(SfxRequest &rReq) SwWrtShell &rSh = GetShell(); const SfxItemSet *pArgs = rReq.GetArgs(); int eState = STATE_TOGGLE; - USHORT nWhich = rReq.GetSlot(); + sal_uInt16 nWhich = rReq.GetSlot(); if(pArgs ) { const SfxPoolItem* pItem; - pArgs->GetItemState(nWhich, FALSE, &pItem); + pArgs->GetItemState(nWhich, sal_False, &pItem); eState = ((const SfxBoolItem &) pArgs-> Get( nWhich )).GetValue() ? STATE_ON : STATE_OFF; } @@ -115,10 +115,10 @@ void SwTextShell::ExecCharAttr(SfxRequest &rReq) SfxBindings& rBind = GetView().GetViewFrame()->GetBindings(); if( nWhich == FN_SET_SUB_SCRIPT ) rBind.SetState( SfxBoolItem( FN_SET_SUPER_SCRIPT, - FALSE ) ); + sal_False ) ); else rBind.SetState( SfxBoolItem( FN_SET_SUB_SCRIPT, - FALSE ) ); + sal_False ) ); } break; @@ -188,10 +188,10 @@ void SwTextShell::ExecCharAttr(SfxRequest &rReq) void SwTextShell::ExecCharAttrArgs(SfxRequest &rReq) { - USHORT nSlot = rReq.GetSlot(); + sal_uInt16 nSlot = rReq.GetSlot(); const SfxItemSet* pArgs = rReq.GetArgs(); - BOOL bArgs = pArgs != 0 && pArgs->Count() > 0; - int bGrow = FALSE; + sal_Bool bArgs = pArgs != 0 && pArgs->Count() > 0; + int bGrow = sal_False; SwWrtShell& rWrtSh = GetShell(); SwTxtFmtColl* pColl = 0; @@ -203,7 +203,7 @@ void SwTextShell::ExecCharAttrArgs(SfxRequest &rReq) pColl = 0; } SfxItemPool& rPool = GetPool(); - USHORT nWhich = rPool.GetWhich(nSlot); + sal_uInt16 nWhich = rPool.GetWhich(nSlot); switch ( nSlot ) { case FN_TXTATR_INET: @@ -232,7 +232,7 @@ void SwTextShell::ExecCharAttrArgs(SfxRequest &rReq) break; case FN_GROW_FONT_SIZE: - bGrow = TRUE; + bGrow = sal_True; // kein break !! case FN_SHRINK_FONT_SIZE: { @@ -241,10 +241,10 @@ void SwTextShell::ExecCharAttrArgs(SfxRequest &rReq) SfxItemSet aAttrSet( rPool, aSetItem.GetItemSet().GetRanges() ); const SfxPoolItem* pI; - static const USHORT aScrTypes[] = { + static const sal_uInt16 aScrTypes[] = { SCRIPTTYPE_LATIN, SCRIPTTYPE_ASIAN, SCRIPTTYPE_COMPLEX, 0 }; - USHORT nScriptType = rWrtSh.GetScriptType(); - for( const USHORT* pScrpTyp = aScrTypes; *pScrpTyp; ++pScrpTyp ) + sal_uInt16 nScriptType = rWrtSh.GetScriptType(); + for( const sal_uInt16* pScrpTyp = aScrTypes; *pScrpTyp; ++pScrpTyp ) if( ( nScriptType & *pScrpTyp ) && 0 != ( pI = aSetItem.GetItemOfScript( *pScrpTyp ))) { @@ -288,7 +288,7 @@ void SwTextShell::ExecCharAttrArgs(SfxRequest &rReq) void SwTextShell::ExecParaAttr(SfxRequest &rReq) { SvxAdjust eAdjst; - BYTE ePropL; + sal_uInt8 ePropL; const SfxItemSet* pArgs = rReq.GetArgs(); // gleich beide Attribute holen, ist nicht teuerer !! @@ -297,7 +297,7 @@ void SwTextShell::ExecParaAttr(SfxRequest &rReq) RES_FRAMEDIR, RES_FRAMEDIR, 0 ); - USHORT nSlot = rReq.GetSlot(); + sal_uInt16 nSlot = rReq.GetSlot(); switch (nSlot) { case SID_ATTR_PARA_ADJUST: @@ -323,7 +323,7 @@ void SwTextShell::ExecParaAttr(SfxRequest &rReq) SET_ADJUST: { aSet.Put(SvxAdjustItem(eAdjst,RES_PARATR_ADJUST)); - rReq.AppendItem( SfxBoolItem( GetPool().GetWhich(nSlot), TRUE ) ); + rReq.AppendItem( SfxBoolItem( GetPool().GetWhich(nSlot), sal_True ) ); } break; @@ -355,7 +355,7 @@ SET_LINESPACE: case SID_ATTR_PARA_LEFT_TO_RIGHT : case SID_ATTR_PARA_RIGHT_TO_LEFT : { - BOOL bSet = TRUE; + sal_Bool bSet = sal_True; int eState = pArgs ? pArgs->GetItemState(nSlot) : SFX_ITEM_DISABLED; if (pArgs && SFX_ITEM_SET == eState) bSet = ((const SfxBoolItem&)pArgs->Get(nSlot)).GetValue(); @@ -363,8 +363,8 @@ SET_LINESPACE: SfxItemSet aAdjustSet( GetPool(), RES_PARATR_ADJUST, RES_PARATR_ADJUST ); GetShell().GetCurAttr(aAdjustSet); - BOOL bChgAdjust = FALSE; - SfxItemState eAdjustState = aAdjustSet.GetItemState(RES_PARATR_ADJUST, FALSE); + sal_Bool bChgAdjust = sal_False; + SfxItemState eAdjustState = aAdjustSet.GetItemState(RES_PARATR_ADJUST, sal_False); if(eAdjustState >= SFX_ITEM_DEFAULT) { int eAdjust = (int)(( const SvxAdjustItem& ) @@ -373,7 +373,7 @@ SET_LINESPACE: (SVX_ADJUST_RIGHT == eAdjust && SID_ATTR_PARA_LEFT_TO_RIGHT == nSlot); } else - bChgAdjust = TRUE; + bChgAdjust = sal_True; SvxFrameDirection eFrmDirection = (SID_ATTR_PARA_LEFT_TO_RIGHT == nSlot) ? @@ -394,7 +394,7 @@ SET_LINESPACE: { SvxNumRule aRule = pCurRule->MakeSvxNumRule(); - for(USHORT i = 0; i < aRule.GetLevelCount(); i++) + for(sal_uInt16 i = 0; i < aRule.GetLevelCount(); i++) { SvxNumberFormat aFmt(aRule.GetLevel(i)); if(SVX_ADJUST_LEFT == aFmt.GetNumAdjust()) @@ -408,7 +408,7 @@ SET_LINESPACE: SwNumRule aSetRule( pCurRule->GetName(), pCurRule->Get( 0 ).GetPositionAndSpaceMode() ); aSetRule.SetSvxRule( aRule, GetShell().GetDoc()); - aSetRule.SetAutoRule( TRUE ); + aSetRule.SetAutoRule( sal_True ); // no start or continuation of a list - list style is only changed GetShell().SetCurNumRule( aSetRule, false ); } @@ -437,9 +437,9 @@ void SwTextShell::ExecParaAttrArgs(SfxRequest &rReq) const SfxItemSet *pArgs = rReq.GetArgs(); const SfxPoolItem *pItem = 0; - USHORT nSlot = rReq.GetSlot(); + sal_uInt16 nSlot = rReq.GetSlot(); if(pArgs) - pArgs->GetItemState(GetPool().GetWhich(nSlot), FALSE, &pItem); + pArgs->GetItemState(GetPool().GetWhich(nSlot), sal_False, &pItem); switch ( nSlot ) { case FN_DROP_CHAR_STYLE_NAME: @@ -479,7 +479,7 @@ void SwTextShell::ExecParaAttrArgs(SfxRequest &rReq) { rSh.StartAction(); rSh.StartUndo( UNDO_START ); - if ( SFX_ITEM_SET == aSet.GetItemState(HINT_END,FALSE,&pItem) ) + if ( SFX_ITEM_SET == aSet.GetItemState(HINT_END,sal_False,&pItem) ) { if ( ((SfxStringItem*)pItem)->GetValue().Len() ) rSh.ReplaceDropTxt(((SfxStringItem*)pItem)->GetValue()); @@ -531,12 +531,12 @@ void SwTextShell::GetAttrState(SfxItemSet &rSet) rSh.GetCurAttr(aCoreSet); // *alle* Textattribute von der Core erfragen SfxWhichIter aIter(rSet); - USHORT nSlot = aIter.FirstWhich(); + sal_uInt16 nSlot = aIter.FirstWhich(); sal_Bool bFlag = sal_False; SfxBoolItem aFlagItem; const SfxPoolItem* pItem = 0; int eAdjust = -1; // Illegaler Wert, um DONTCARE zu erkennen - SfxItemState eState = aCoreSet.GetItemState(RES_PARATR_ADJUST, FALSE, &pItem); + SfxItemState eState = aCoreSet.GetItemState(RES_PARATR_ADJUST, sal_False, &pItem); if( SFX_ITEM_DEFAULT == eState ) pItem = &rPool.GetDefaultItem(RES_PARATR_ADJUST); @@ -544,14 +544,14 @@ void SwTextShell::GetAttrState(SfxItemSet &rSet) eAdjust = (int)(( SvxAdjustItem* ) pItem)->GetAdjust(); short nEsc = 0; - eState = aCoreSet.GetItemState(RES_CHRATR_ESCAPEMENT, FALSE, &pItem); + eState = aCoreSet.GetItemState(RES_CHRATR_ESCAPEMENT, sal_False, &pItem); if( SFX_ITEM_DEFAULT == eState ) pItem = &rPool.GetDefaultItem(RES_CHRATR_ESCAPEMENT); if( eState >= SFX_ITEM_DEFAULT ) nEsc = ((SvxEscapementItem* )pItem)->GetEsc(); - USHORT nLineSpace = 0; - eState = aCoreSet.GetItemState(RES_PARATR_LINESPACING, FALSE, &pItem); + sal_uInt16 nLineSpace = 0; + eState = aCoreSet.GetItemState(RES_PARATR_LINESPACING, sal_False, &pItem); if( SFX_ITEM_DEFAULT == eState ) pItem = &rPool.GetDefaultItem(RES_PARATR_LINESPACING); if( SFX_ITEM_DEFAULT <= eState && @@ -611,7 +611,7 @@ void SwTextShell::GetAttrState(SfxItemSet &rSet) else { bFlag = SVX_ADJUST_BLOCK == eAdjust; - USHORT nHtmlMode = GetHtmlMode(rSh.GetView().GetDocShell()); + sal_uInt16 nHtmlMode = GetHtmlMode(rSh.GetView().GetDocShell()); if((nHtmlMode & HTMLMODE_ON) && !(nHtmlMode & (HTMLMODE_FULL_STYLES|HTMLMODE_FIRSTLINE) )) { rSet.DisableItem( nSlot ); @@ -634,7 +634,7 @@ void SwTextShell::GetAttrState(SfxItemSet &rSet) { SvxScriptSetItem aSetItem( SID_ATTR_CHAR_FONTHEIGHT, *rSet.GetPool() ); - aSetItem.GetItemSet().Put( aCoreSet, FALSE ); + aSetItem.GetItemSet().Put( aCoreSet, sal_False ); if( !aSetItem.GetItemOfScript( rSh.GetScriptType() )) rSet.DisableItem( nSlot ); nSlot = 0; @@ -673,9 +673,9 @@ void SwTextShell::GetAttrState(SfxItemSet &rSet) else { // is the item set? - USHORT nHtmlMode = GetHtmlMode(rSh.GetView().GetDocShell()); + sal_uInt16 nHtmlMode = GetHtmlMode(rSh.GetView().GetDocShell()); if((!(nHtmlMode & HTMLMODE_ON) || (0 != (nHtmlMode & HTMLMODE_SOME_STYLES))) && - aCoreSet.GetItemState( RES_FRAMEDIR, FALSE ) >= SFX_ITEM_DEFAULT) + aCoreSet.GetItemState( RES_FRAMEDIR, sal_False ) >= SFX_ITEM_DEFAULT) { SvxFrameDirection eFrmDir = (SvxFrameDirection) ((const SvxFrameDirectionItem& )aCoreSet.Get(RES_FRAMEDIR)).GetValue(); @@ -703,10 +703,10 @@ void SwTextShell::GetAttrState(SfxItemSet &rSet) case RES_PARATR_DROP: { #if OSL_DEBUG_LEVEL > 1 - const SfxPoolItem& rItem = aCoreSet.Get(GetPool().GetWhich(nSlot), TRUE); + const SfxPoolItem& rItem = aCoreSet.Get(GetPool().GetWhich(nSlot), sal_True); rSet.Put(rItem); #else - rSet.Put(aCoreSet.Get( GetPool().GetWhich(nSlot), TRUE)); + rSet.Put(aCoreSet.Get( GetPool().GetWhich(nSlot), sal_True)); #endif nSlot = 0; } @@ -728,10 +728,10 @@ void SwTextShell::GetAttrState(SfxItemSet &rSet) SfxItemSet aSet(GetPool(), RES_TXTATR_INETFMT, RES_TXTATR_INETFMT); rSh.GetCurAttr(aSet); #if OSL_DEBUG_LEVEL > 1 - const SfxPoolItem& rItem = aSet.Get(RES_TXTATR_INETFMT, TRUE); + const SfxPoolItem& rItem = aSet.Get(RES_TXTATR_INETFMT, sal_True); rSet.Put(rItem); #else - rSet.Put(aSet.Get( RES_TXTATR_INETFMT, TRUE)); + rSet.Put(aSet.Get( RES_TXTATR_INETFMT, sal_True)); #endif nSlot = 0; } @@ -752,7 +752,7 @@ void SwTextShell::GetAttrState(SfxItemSet &rSet) nSlot = aIter.NextWhich(); } - rSet.Put(aCoreSet,FALSE); + rSet.Put(aCoreSet,sal_False); } diff --git a/sw/source/ui/shells/txtcrsr.cxx b/sw/source/ui/shells/txtcrsr.cxx index 6f9c962f46..54a509058e 100644 --- a/sw/source/ui/shells/txtcrsr.cxx +++ b/sw/source/ui/shells/txtcrsr.cxx @@ -60,22 +60,22 @@ void SwTextShell::ExecBasicMove(SfxRequest &rReq) SwWrtShell &rSh = GetShell(); GetView().GetEditWin().FlushInBuffer(); const SfxItemSet *pArgs = rReq.GetArgs(); - BOOL bSelect = FALSE; - USHORT nCount = 1; + sal_Bool bSelect = sal_False; + sal_uInt16 nCount = 1; if(pArgs) { const SfxPoolItem *pItem; - if(SFX_ITEM_SET == pArgs->GetItemState(FN_PARAM_MOVE_COUNT, TRUE, &pItem)) + if(SFX_ITEM_SET == pArgs->GetItemState(FN_PARAM_MOVE_COUNT, sal_True, &pItem)) nCount = ((const SfxInt16Item *)pItem)->GetValue(); - if(SFX_ITEM_SET == pArgs->GetItemState(FN_PARAM_MOVE_SELECTION, TRUE, &pItem)) + if(SFX_ITEM_SET == pArgs->GetItemState(FN_PARAM_MOVE_SELECTION, sal_True, &pItem)) bSelect = ((const SfxBoolItem *)pItem)->GetValue(); } switch(rReq.GetSlot()) { - case FN_CHAR_LEFT_SEL: rReq.SetSlot( FN_CHAR_LEFT ); bSelect = TRUE; break; - case FN_CHAR_RIGHT_SEL: rReq.SetSlot( FN_CHAR_RIGHT ); bSelect = TRUE; break; - case FN_LINE_UP_SEL: rReq.SetSlot( FN_LINE_UP ); bSelect = TRUE; break; - case FN_LINE_DOWN_SEL: rReq.SetSlot( FN_LINE_DOWN ); bSelect = TRUE; break; + case FN_CHAR_LEFT_SEL: rReq.SetSlot( FN_CHAR_LEFT ); bSelect = sal_True; break; + case FN_CHAR_RIGHT_SEL: rReq.SetSlot( FN_CHAR_RIGHT ); bSelect = sal_True; break; + case FN_LINE_UP_SEL: rReq.SetSlot( FN_LINE_UP ); bSelect = sal_True; break; + case FN_LINE_DOWN_SEL: rReq.SetSlot( FN_LINE_DOWN ); bSelect = sal_True; break; } uno::Reference< frame::XDispatchRecorder > xRecorder = @@ -85,16 +85,16 @@ void SwTextShell::ExecBasicMove(SfxRequest &rReq) rReq.AppendItem( SfxInt16Item(FN_PARAM_MOVE_COUNT, nCount) ); rReq.AppendItem( SfxBoolItem(FN_PARAM_MOVE_SELECTION, bSelect) ); } - USHORT nSlot = rReq.GetSlot(); + sal_uInt16 nSlot = rReq.GetSlot(); rReq.Done(); // Get EditWin before calling the move functions (shell change may occur!) SwEditWin& rTmpEditWin = GetView().GetEditWin(); - for( USHORT i = 0; i < nCount; i++ ) + for( sal_uInt16 i = 0; i < nCount; i++ ) { switch(nSlot) { - case FN_CHAR_LEFT: rSh.Left( CRSR_SKIP_CELLS, bSelect, 1, FALSE, TRUE ); break; - case FN_CHAR_RIGHT: rSh.Right( CRSR_SKIP_CELLS, bSelect, 1, FALSE, TRUE ); break; + case FN_CHAR_LEFT: rSh.Left( CRSR_SKIP_CELLS, bSelect, 1, sal_False, sal_True ); break; + case FN_CHAR_RIGHT: rSh.Right( CRSR_SKIP_CELLS, bSelect, 1, sal_False, sal_True ); break; case FN_LINE_UP: rSh.Up ( bSelect, 1 ); break; case FN_LINE_DOWN: rSh.Down ( bSelect, 1 ); break; default: OSL_ENSURE(false, "wrong Dispatcher"); return; @@ -111,16 +111,16 @@ void SwTextShell::ExecMove(SfxRequest &rReq) SwEditWin& rTmpEditWin = GetView().GetEditWin(); rTmpEditWin.FlushInBuffer(); - USHORT nSlot = rReq.GetSlot(); - BOOL bRet = FALSE; + sal_uInt16 nSlot = rReq.GetSlot(); + sal_Bool bRet = sal_False; switch ( nSlot ) { case FN_START_OF_LINE_SEL: - case FN_START_OF_LINE: bRet = rSh.LeftMargin ( FN_START_OF_LINE_SEL == nSlot, FALSE ); + case FN_START_OF_LINE: bRet = rSh.LeftMargin ( FN_START_OF_LINE_SEL == nSlot, sal_False ); break; case FN_END_OF_LINE_SEL: - case FN_END_OF_LINE: bRet = rSh.RightMargin( FN_END_OF_LINE_SEL == nSlot, FALSE ); + case FN_END_OF_LINE: bRet = rSh.RightMargin( FN_END_OF_LINE_SEL == nSlot, sal_False ); break; case FN_START_OF_DOCUMENT_SEL: @@ -151,7 +151,7 @@ void SwTextShell::ExecMovePage(SfxRequest &rReq) SwWrtShell &rSh = GetShell(); GetView().GetEditWin().FlushInBuffer(); - USHORT nSlot = rReq.GetSlot(); + sal_uInt16 nSlot = rReq.GetSlot(); switch( nSlot ) { case FN_START_OF_NEXT_PAGE_SEL : @@ -182,12 +182,12 @@ void SwTextShell::ExecMoveCol(SfxRequest &rReq) SwWrtShell &rSh = GetShell(); switch ( rReq.GetSlot() ) { - case FN_START_OF_COLUMN: rSh.StartOfColumn ( FALSE ); break; - case FN_END_OF_COLUMN: rSh.EndOfColumn ( FALSE ); break; - case FN_START_OF_NEXT_COLUMN: rSh.StartOfNextColumn( FALSE ) ; break; - case FN_END_OF_NEXT_COLUMN: rSh.EndOfNextColumn ( FALSE ); break; - case FN_START_OF_PREV_COLUMN: rSh.StartOfPrevColumn( FALSE ); break; - case FN_END_OF_PREV_COLUMN: rSh.EndOfPrevColumn ( FALSE ); break; + case FN_START_OF_COLUMN: rSh.StartOfColumn ( sal_False ); break; + case FN_END_OF_COLUMN: rSh.EndOfColumn ( sal_False ); break; + case FN_START_OF_NEXT_COLUMN: rSh.StartOfNextColumn( sal_False ) ; break; + case FN_END_OF_NEXT_COLUMN: rSh.EndOfNextColumn ( sal_False ); break; + case FN_START_OF_PREV_COLUMN: rSh.StartOfPrevColumn( sal_False ); break; + case FN_END_OF_PREV_COLUMN: rSh.EndOfPrevColumn ( sal_False ); break; default: OSL_ENSURE(false, "wrong dispatcher"); return; } rReq.Done(); @@ -198,7 +198,7 @@ void SwTextShell::ExecMoveLingu(SfxRequest &rReq) SwWrtShell &rSh = GetShell(); GetView().GetEditWin().FlushInBuffer(); - USHORT nSlot = rReq.GetSlot(); + sal_uInt16 nSlot = rReq.GetSlot(); switch ( nSlot ) { case FN_NEXT_WORD_SEL: @@ -225,10 +225,10 @@ void SwTextShell::ExecMoveLingu(SfxRequest &rReq) case FN_PREV_SENT: rSh.BwdSentence( FN_PREV_SENT_SEL == nSlot ); break; - case FN_NEXT_PARA: rSh.FwdPara ( FALSE ); + case FN_NEXT_PARA: rSh.FwdPara ( sal_False ); break; - case FN_PREV_PARA: rSh.BwdPara ( FALSE ); + case FN_PREV_PARA: rSh.BwdPara ( sal_False ); break; default: OSL_ENSURE(false, "wrong dispatcher"); return; } @@ -238,8 +238,8 @@ void SwTextShell::ExecMoveLingu(SfxRequest &rReq) void SwTextShell::ExecMoveMisc(SfxRequest &rReq) { SwWrtShell &rSh = GetShell(); - USHORT nSlot = rReq.GetSlot(); - BOOL bSetRetVal = TRUE, bRet = TRUE; + sal_uInt16 nSlot = rReq.GetSlot(); + sal_Bool bSetRetVal = sal_True, bRet = sal_True; switch ( nSlot ) { case SID_FM_TOGGLECONTROLFOCUS: @@ -260,7 +260,7 @@ void SwTextShell::ExecMoveMisc(SfxRequest &rReq) if ( !pFilter.get() ) break; - const SdrObject* pNearestControl = rSh.GetBestObject( TRUE, GOTOOBJ_DRAW_CONTROL, FALSE, pFilter.get() ); + const SdrObject* pNearestControl = rSh.GetBestObject( sal_True, GOTOOBJ_DRAW_CONTROL, sal_False, pFilter.get() ); if ( !pNearestControl ) break; @@ -273,7 +273,7 @@ void SwTextShell::ExecMoveMisc(SfxRequest &rReq) } break; case FN_CNTNT_TO_NEXT_FRAME: - bRet = rSh.GotoObj(TRUE, GOTOOBJ_GOTO_ANY); + bRet = rSh.GotoObj(sal_True, GOTOOBJ_GOTO_ANY); if(bRet) { rSh.HideCrsr(); @@ -290,27 +290,27 @@ void SwTextShell::ExecMoveMisc(SfxRequest &rReq) break; case FN_TO_HEADER: rSh.MoveCrsr(); - if ( FRMTYPE_HEADER & rSh.GetFrmType(0,FALSE) ) + if ( FRMTYPE_HEADER & rSh.GetFrmType(0,sal_False) ) rSh.SttPg(); else rSh.GotoHeaderTxt(); - bSetRetVal = FALSE; + bSetRetVal = sal_False; break; case FN_TO_FOOTER: rSh.MoveCrsr(); - if ( FRMTYPE_FOOTER & rSh.GetFrmType(0,FALSE) ) + if ( FRMTYPE_FOOTER & rSh.GetFrmType(0,sal_False) ) rSh.EndPg(); else rSh.GotoFooterTxt(); - bSetRetVal = FALSE; + bSetRetVal = sal_False; break; case FN_FOOTNOTE_TO_ANCHOR: rSh.MoveCrsr(); - if ( FRMTYPE_FOOTNOTE & rSh.GetFrmType(0,FALSE) ) + if ( FRMTYPE_FOOTNOTE & rSh.GetFrmType(0,sal_False) ) rSh.GotoFtnAnchor(); else rSh.GotoFtnTxt(); - bSetRetVal = FALSE; + bSetRetVal = sal_False; break; case FN_TO_FOOTNOTE_AREA : rSh.GotoFtnTxt(); @@ -329,22 +329,22 @@ void SwTextShell::ExecMoveMisc(SfxRequest &rReq) break; case FN_NEXT_TOXMARK: - bRet = rSh.GotoNxtPrvTOXMark( TRUE ); + bRet = rSh.GotoNxtPrvTOXMark( sal_True ); break; case FN_PREV_TOXMARK: - bRet = rSh.GotoNxtPrvTOXMark( FALSE ); + bRet = rSh.GotoNxtPrvTOXMark( sal_False ); break; case FN_NEXT_TBLFML: - bRet = rSh.GotoNxtPrvTblFormula( TRUE, FALSE ); + bRet = rSh.GotoNxtPrvTblFormula( sal_True, sal_False ); break; case FN_PREV_TBLFML: - bRet = rSh.GotoNxtPrvTblFormula( FALSE, FALSE ); + bRet = rSh.GotoNxtPrvTblFormula( sal_False, sal_False ); break; case FN_NEXT_TBLFML_ERR: - bRet = rSh.GotoNxtPrvTblFormula( TRUE, TRUE ); + bRet = rSh.GotoNxtPrvTblFormula( sal_True, sal_True ); break; case FN_PREV_TBLFML_ERR: - bRet = rSh.GotoNxtPrvTblFormula( FALSE, TRUE ); + bRet = rSh.GotoNxtPrvTblFormula( sal_False, sal_True ); break; default: diff --git a/sw/source/ui/shells/txtnum.cxx b/sw/source/ui/shells/txtnum.cxx index fb62953856..6604eed53a 100644 --- a/sw/source/ui/shells/txtnum.cxx +++ b/sw/source/ui/shells/txtnum.cxx @@ -58,7 +58,7 @@ void SwTextShell::ExecEnterNum(SfxRequest &rReq) case FN_NUM_NUMBERING_ON: { SFX_REQUEST_ARG( rReq, pItem, SfxBoolItem, FN_PARAM_1 , sal_False ); - BOOL bMode = !GetShell().HasNumber(); // #i29560# + sal_Bool bMode = !GetShell().HasNumber(); // #i29560# if ( pItem ) bMode = pItem->GetValue(); else @@ -77,7 +77,7 @@ void SwTextShell::ExecEnterNum(SfxRequest &rReq) case FN_NUM_BULLET_ON: { SFX_REQUEST_ARG( rReq, pItem, SfxBoolItem, FN_PARAM_1 , sal_False ); - BOOL bMode = !GetShell().HasBullet(); // #i29560# + sal_Bool bMode = !GetShell().HasBullet(); // #i29560# if ( pItem ) bMode = pItem->GetValue(); else @@ -100,14 +100,14 @@ void SwTextShell::ExecEnterNum(SfxRequest &rReq) SID_ATTR_NUMBERING_RULE, SID_PARAM_CUR_NUM_LEVEL, 0 ); SwDocShell* pDocSh = GetView().GetDocShell(); - BOOL bHtml = 0 != PTR_CAST(SwWebDocShell, pDocSh); + sal_Bool bHtml = 0 != PTR_CAST(SwWebDocShell, pDocSh); const SwNumRule* pCurRule = GetShell().GetCurNumRule(); if( pCurRule ) { SvxNumRule aRule = pCurRule->MakeSvxNumRule(); //convert type of linked bitmaps from SVX_NUM_BITMAP to (SVX_NUM_BITMAP|LINK_TOKEN) - for(USHORT i = 0; i < aRule.GetLevelCount(); i++) + for(sal_uInt16 i = 0; i < aRule.GetLevelCount(); i++) { SvxNumberFormat aFmt(aRule.GetLevel(i)); if(SVX_NUM_BITMAP == aFmt.GetNumberingType()) @@ -122,12 +122,12 @@ void SwTextShell::ExecEnterNum(SfxRequest &rReq) } } if(bHtml) - aRule.SetFeatureFlag(NUM_ENABLE_EMBEDDED_BMP, FALSE); + aRule.SetFeatureFlag(NUM_ENABLE_EMBEDDED_BMP, sal_False); aSet.Put(SvxNumBulletItem(aRule)); OSL_ENSURE( GetShell().GetNumLevel() < MAXLEVEL, "<SwTextShell::ExecEnterNum()> - numbered node without valid list level. Serious defect -> please inform OD." ); - USHORT nLevel = GetShell().GetNumLevel(); + sal_uInt16 nLevel = GetShell().GetNumLevel(); if( nLevel < MAXLEVEL ) { nLevel = 1<<nLevel; @@ -145,7 +145,7 @@ void SwTextShell::ExecEnterNum(SfxRequest &rReq) if( bHtml || bRightToLeft ) { - for( BYTE n = 0; n < MAXLEVEL; ++n ) + for( sal_uInt8 n = 0; n < MAXLEVEL; ++n ) { SvxNumberFormat aFmt( aSvxRule.GetLevel( n ) ); if ( n && bHtml ) @@ -161,14 +161,14 @@ void SwTextShell::ExecEnterNum(SfxRequest &rReq) aFmt.SetNumAdjust( SVX_ADJUST_RIGHT ); } // <-- - aSvxRule.SetLevel( n, aFmt, FALSE ); + aSvxRule.SetLevel( n, aFmt, sal_False ); } - aSvxRule.SetFeatureFlag(NUM_ENABLE_EMBEDDED_BMP, FALSE); + aSvxRule.SetFeatureFlag(NUM_ENABLE_EMBEDDED_BMP, sal_False); } aSet.Put(SvxNumBulletItem(aSvxRule)); } - aSet.Put( SfxBoolItem( SID_PARAM_NUM_PRESET,FALSE )); + aSet.Put( SfxBoolItem( SID_PARAM_NUM_PRESET,sal_False )); // vor dem Dialog wird der HtmlMode an der DocShell versenkt pDocSh->PutItem(SfxUInt16Item(SID_HTML_MODE, ::GetHtmlMode(pDocSh))); @@ -178,11 +178,11 @@ void SwTextShell::ExecEnterNum(SfxRequest &rReq) SfxAbstractTabDialog* pDlg = pFact->CreateSwTabDialog( DLG_SVXTEST_NUM_BULLET, GetView().GetWindow(), &aSet, GetShell()); OSL_ENSURE(pDlg, "Dialogdiet fail!"); - USHORT nRet = pDlg->Execute(); + sal_uInt16 nRet = pDlg->Execute(); const SfxPoolItem* pItem; if( RET_OK == nRet ) { - if( SFX_ITEM_SET == pDlg->GetOutputItemSet()->GetItemState( SID_ATTR_NUMBERING_RULE, FALSE, &pItem )) + if( SFX_ITEM_SET == pDlg->GetOutputItemSet()->GetItemState( SID_ATTR_NUMBERING_RULE, sal_False, &pItem )) { rReq.AppendItem(*pItem); rReq.Done(); @@ -195,7 +195,7 @@ void SwTextShell::ExecEnterNum(SfxRequest &rReq) numfunc::GetDefaultPositionAndSpaceMode() ); // <-- aSetRule.SetSvxRule( *pSetRule, GetShell().GetDoc()); - aSetRule.SetAutoRule( TRUE ); + aSetRule.SetAutoRule( sal_True ); // No start of new list, if an existing list style is edited. // Otherwise start a new list. const bool bCreateList = (pCurRule == 0); @@ -204,7 +204,7 @@ void SwTextShell::ExecEnterNum(SfxRequest &rReq) // wenn der Dialog mit OK verlassen wurde, aber nichts ausgewaehlt // wurde dann muss die Numerierung zumindest eingeschaltet werden, // wenn sie das noch nicht ist - else if( !pCurRule && SFX_ITEM_SET == aSet.GetItemState( SID_ATTR_NUMBERING_RULE, FALSE, &pItem )) + else if( !pCurRule && SFX_ITEM_SET == aSet.GetItemState( SID_ATTR_NUMBERING_RULE, sal_False, &pItem )) { rReq.AppendItem( *pItem ); rReq.Done(); @@ -214,7 +214,7 @@ void SwTextShell::ExecEnterNum(SfxRequest &rReq) numfunc::GetDefaultPositionAndSpaceMode() ); // <-- aSetRule.SetSvxRule(*pSetRule, GetShell().GetDoc()); - aSetRule.SetAutoRule( TRUE ); + aSetRule.SetAutoRule( sal_True ); // start new list GetShell().SetCurNumRule( aSetRule, true ); } diff --git a/sw/source/ui/smartmenu/makefile.mk b/sw/source/ui/smartmenu/makefile.mk deleted file mode 100644 index 1950430cf3..0000000000 --- a/sw/source/ui/smartmenu/makefile.mk +++ /dev/null @@ -1,53 +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=smartmenu - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -EXCEPTIONSFILES = \ - $(SLO)$/stmenu.obj - -SLOFILES = \ - $(SLO)$/stmenu.obj - -SRS1NAME=$(TARGET) -SRC1FILES = \ - stmenu.src - -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/ui/smartmenu/stmenu.cxx b/sw/source/ui/smartmenu/stmenu.cxx index aa1ba7d53c..88319f0d66 100644 --- a/sw/source/ui/smartmenu/stmenu.cxx +++ b/sw/source/ui/smartmenu/stmenu.cxx @@ -57,10 +57,10 @@ SwSmartTagPopup::SwSmartTagPopup( SwView* pSwView, Reference <frame::XController> xController = mpSwView->GetController(); const lang::Locale aLocale( SW_BREAKITER()->GetLocale( (LanguageType)GetAppLanguage() ) ); - USHORT nMenuPos = 0; - USHORT nSubMenuPos = 0; - USHORT nMenuId = 1; - USHORT nSubMenuId = MN_ST_INSERT_START; + sal_uInt16 nMenuPos = 0; + sal_uInt16 nSubMenuPos = 0; + sal_uInt16 nMenuId = 1; + sal_uInt16 nSubMenuId = MN_ST_INSERT_START; const rtl::OUString aRangeText = mxTextRange->getString(); @@ -76,7 +76,7 @@ SwSmartTagPopup::SwSmartTagPopup( SwView* pSwView, InsertSeparator(0); - for ( USHORT j = 0; j < aActionComponentsSequence.getLength(); ++j ) + for ( sal_uInt16 j = 0; j < aActionComponentsSequence.getLength(); ++j ) { Reference< container::XStringKeyMap > xSmartTagProperties = rStringKeyMaps[j]; @@ -113,7 +113,7 @@ SwSmartTagPopup::SwSmartTagPopup( SwView* pSwView, pSbMenu->InsertSeparator( nSubMenuPos++ ); // Add subitem for every action reference for the current smart tag type: - for ( USHORT i = 0; i < rActionComponents.getLength(); ++i ) + for ( sal_uInt16 i = 0; i < rActionComponents.getLength(); ++i ) { xAction = rActionComponents[i]; @@ -149,7 +149,7 @@ sal_uInt16 SwSmartTagPopup::Execute( const Rectangle& rWordPos, Window* pWin ) if ( nId == MN_SMARTTAG_OPTIONS ) { - SfxBoolItem aBool(SID_OPEN_SMARTTAGOPTIONS, TRUE); + SfxBoolItem aBool(SID_OPEN_SMARTTAGOPTIONS, sal_True); mpSwView->GetViewFrame()->GetDispatcher()->Execute( SID_AUTO_CORRECT_DLG, SFX_CALLMODE_ASYNCHRON, &aBool, 0L ); } diff --git a/sw/source/ui/table/chartins.cxx b/sw/source/ui/table/chartins.cxx index fe911e7d9c..8225a9bff1 100644 --- a/sw/source/ui/table/chartins.cxx +++ b/sw/source/ui/table/chartins.cxx @@ -93,7 +93,7 @@ Point SwGetChartDialogPos( const Window *pParentWin, const Size& rDialogSize, co Rectangle aDesktop = pParentWin->GetDesktopRectPixel(); Size aSpace = pParentWin->LogicToPixel( Size( 8, 12 ), MAP_APPFONT ); - BOOL bLayoutRTL = ::GetActiveView()->GetWrtShell().IsTableRightToLeft(); + sal_Bool bLayoutRTL = ::GetActiveView()->GetWrtShell().IsTableRightToLeft(); bool bCenterHor = false; if ( aDesktop.Bottom() - aObjAbs.Bottom() >= rDialogSize.Height() + aSpace.Height() ) @@ -183,7 +183,7 @@ void SwInsertChart(Window* pParent, SfxBindings* pBindings ) } SwFlyFrmFmt *pFlyFrmFmt = 0; - xChartModel.set( SwTableFUNC( &rWrtShell, FALSE ).InsertChart( xDataProvider, (sal_True == xDataProvider.is()), aRangeString, &pFlyFrmFmt )); + xChartModel.set( SwTableFUNC( &rWrtShell, sal_False ).InsertChart( xDataProvider, (sal_True == xDataProvider.is()), aRangeString, &pFlyFrmFmt )); //open wizard //@todo get context from writer if that has one @@ -250,7 +250,7 @@ void SwInsertChart(Window* pParent, SfxBindings* pBindings ) if( nDialogRet == ui::dialogs::ExecutableDialogResults::CANCEL ) { rWrtShell.Undo(); - rWrtShell.getIDocumentUndoRedoAccess()->ClearRedo(); + rWrtShell.GetIDocumentUndoRedo().ClearRedo(); } else { @@ -268,7 +268,7 @@ void SwInsertChart(Window* pParent, SfxBindings* pBindings ) void AutoEdit::KeyInput( const KeyEvent& rEvt ) { - USHORT nCode = rEvt.GetKeyCode().GetCode(); + sal_uInt16 nCode = rEvt.GetKeyCode().GetCode(); if( nCode != KEY_SPACE ) Edit::KeyInput( rEvt ); } diff --git a/sw/source/ui/table/chartins.src b/sw/source/ui/table/chartins.src index d018b1f3d9..1a05d64f44 100644 --- a/sw/source/ui/table/chartins.src +++ b/sw/source/ui/table/chartins.src @@ -50,12 +50,14 @@ ModelessDialog DLG_INSERT_CHART }; Edit ED_RANGE { + HelpID = "sw:Edit:DLG_INSERT_CHART:ED_RANGE"; Border = TRUE ; Pos = MAP_APPFONT ( 56 , 14 ) ; Size = MAP_APPFONT ( 229 , 12 ) ; }; CheckBox CB_FIRST_ROW { + HelpID = "sw:CheckBox:DLG_INSERT_CHART:CB_FIRST_ROW"; Pos = MAP_APPFONT ( 12 , 32 ) ; Size = MAP_APPFONT ( 150 , 10 ) ; TabStop = TRUE ; @@ -64,6 +66,7 @@ ModelessDialog DLG_INSERT_CHART }; CheckBox CB_FIRST_COL { + HelpID = "sw:CheckBox:DLG_INSERT_CHART:CB_FIRST_COL"; Pos = MAP_APPFONT ( 12 , 46 ) ; Size = MAP_APPFONT ( 150 , 10 ) ; TabStop = TRUE ; @@ -96,6 +99,7 @@ ModelessDialog DLG_INSERT_CHART }; PushButton BT_PREV { + HelpID = "sw:PushButton:DLG_INSERT_CHART:BT_PREV"; Pos = MAP_APPFONT ( 130 , 151 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; TabStop = TRUE ; @@ -104,6 +108,7 @@ ModelessDialog DLG_INSERT_CHART }; PushButton BT_NEXT { + HelpID = "sw:PushButton:DLG_INSERT_CHART:BT_NEXT"; Pos = MAP_APPFONT ( 185 , 151 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Disable = TRUE ; @@ -112,6 +117,7 @@ ModelessDialog DLG_INSERT_CHART }; PushButton BT_FINISH { + HelpID = "sw:PushButton:DLG_INSERT_CHART:BT_FINISH"; Pos = MAP_APPFONT ( 240 , 151 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; TabStop = TRUE ; diff --git a/sw/source/ui/table/colwd.cxx b/sw/source/ui/table/colwd.cxx index a67f78102f..7c90ca6968 100644 --- a/sw/source/ui/table/colwd.cxx +++ b/sw/source/ui/table/colwd.cxx @@ -52,7 +52,7 @@ IMPL_LINK_INLINE_START( SwTableWidthDlg, LoseFocusHdl, Edit *, EMPTYARG ) { - USHORT nId = (USHORT)aColEdit.GetValue()-1; + sal_uInt16 nId = (sal_uInt16)aColEdit.GetValue()-1; const SwTwips lWidth = rFnc.GetColWidth(nId); aWidthEdit.SetValue(aWidthEdit.Normalize(lWidth), FUNIT_TWIP); aWidthEdit.SetMax(aWidthEdit.Normalize(rFnc.GetMaxColWidth(nId)), FUNIT_TWIP); @@ -65,12 +65,12 @@ IMPL_LINK_INLINE_END( SwTableWidthDlg, LoseFocusHdl, Edit *, EMPTYARG ) SwTableWidthDlg::SwTableWidthDlg(Window *pParent, SwTableFUNC &rTableFnc ) : SvxStandardDialog( pParent, SW_RES(DLG_COL_WIDTH) ), + aWidthFL(this, SW_RES(FL_WIDTH)), aColFT(this, SW_RES(FT_COL)), aColEdit(this, SW_RES(ED_COL)), aWidthFT(this, SW_RES(FT_WIDTH)), aWidthEdit(this, SW_RES(ED_WIDTH)), - aWidthFL(this, SW_RES(FL_WIDTH)), aOKBtn(this, SW_RES(BT_OK)), aCancelBtn(this, SW_RES(BT_CANCEL)), aHelpBtn(this, SW_RES(BT_HELP)), @@ -78,10 +78,10 @@ SwTableWidthDlg::SwTableWidthDlg(Window *pParent, SwTableFUNC &rTableFnc ) : { FreeResource(); - BOOL bIsWeb = rTableFnc.GetShell() - ? static_cast< BOOL >(0 != PTR_CAST( SwWebDocShell, + sal_Bool bIsWeb = rTableFnc.GetShell() + ? static_cast< sal_Bool >(0 != PTR_CAST( SwWebDocShell, rTableFnc.GetShell()->GetView().GetDocShell()) ) - : FALSE; + : sal_False; FieldUnit eFieldUnit = SW_MOD()->GetUsrPref( bIsWeb )->GetMetric(); ::SetFieldUnit(aWidthEdit, eFieldUnit ); @@ -103,8 +103,8 @@ void SwTableWidthDlg::Apply() { rFnc.InitTabCols(); rFnc.SetColWidth( - static_cast< USHORT >(aColEdit.GetValue() - 1), - static_cast< USHORT >(aWidthEdit.Denormalize(aWidthEdit.GetValue(FUNIT_TWIP)))); + static_cast< sal_uInt16 >(aColEdit.GetValue() - 1), + static_cast< sal_uInt16 >(aWidthEdit.Denormalize(aWidthEdit.GetValue(FUNIT_TWIP)))); } diff --git a/sw/source/ui/table/colwd.src b/sw/source/ui/table/colwd.src index cd34b41bd5..1df5fe2cfc 100644 --- a/sw/source/ui/table/colwd.src +++ b/sw/source/ui/table/colwd.src @@ -32,7 +32,7 @@ // #define DLG_COL_WIDTH 256 ModalDialog DLG_COL_WIDTH { - HelpID = FN_TABLE_SET_COL_WIDTH ; + HelpID = CMD_FN_TABLE_SET_COL_WIDTH ; OutputSize = TRUE ; SVLook = TRUE ; Size = MAP_APPFONT ( 159 , 60 ) ; @@ -66,6 +66,7 @@ ModalDialog DLG_COL_WIDTH }; MetricField ED_WIDTH { + HelpID = "sw:MetricField:DLG_COL_WIDTH:ED_WIDTH"; Border = TRUE ; Pos = MAP_APPFONT ( 51 , 30 ) ; Size = MAP_APPFONT ( 38 , 12 ) ; @@ -97,6 +98,7 @@ ModalDialog DLG_COL_WIDTH }; NumericField ED_COL { + HelpID = "sw:NumericField:DLG_COL_WIDTH:ED_COL"; Border = TRUE ; Pos = MAP_APPFONT ( 51 , 14 ) ; Size = MAP_APPFONT ( 38 , 12 ) ; diff --git a/sw/source/ui/table/convert.cxx b/sw/source/ui/table/convert.cxx index 9e3d7235af..fc70f5f79b 100644 --- a/sw/source/ui/table/convert.cxx +++ b/sw/source/ui/table/convert.cxx @@ -97,13 +97,13 @@ void SwConvertTableDlg::GetValues( sal_Unicode& rDelim, } - USHORT nInsMode = 0; + sal_uInt16 nInsMode = 0; if (aBorderCB.IsChecked()) nInsMode |= tabopts::DEFAULT_BORDER; if (aHeaderCB.IsChecked()) nInsMode |= tabopts::HEADLINE; if (aRepeatHeaderCB.IsEnabled() && aRepeatHeaderCB.IsChecked()) - rInsTblOpts.mnRowsToRepeat = USHORT( aRepeatHeaderNF.GetValue() ); + rInsTblOpts.mnRowsToRepeat = sal_uInt16( aRepeatHeaderNF.GetValue() ); else rInsTblOpts.mnRowsToRepeat = 0; if (!aDontSplitCB.IsChecked()) @@ -154,6 +154,8 @@ SwConvertTableDlg::SwConvertTableDlg( SwView& rView, bool bToTable ) pTAutoFmt( 0 ), pShell( &rView.GetWrtShell() ) { + aOtherEd.SetAccessibleName(String(SW_RES(STR_SYMBOL))); + aOtherEd.SetAccessibleRelationLabeledBy(&aOtherBtn); FreeResource(); if(nSaveButtonState > -1) { @@ -185,12 +187,12 @@ SwConvertTableDlg::SwConvertTableDlg( SwView& rView, bool bToTable ) else { //Einfuege-Optionen verstecken - aHeaderCB .Show(FALSE); - aRepeatHeaderCB .Show(FALSE); - aDontSplitCB .Show(FALSE); - aBorderCB .Show(FALSE); - aOptionsFL .Show(FALSE); - aRepeatHeaderCombo.Show(FALSE); + aHeaderCB .Show(sal_False); + aRepeatHeaderCB .Show(sal_False); + aDontSplitCB .Show(sal_False); + aBorderCB .Show(sal_False); + aOptionsFL .Show(sal_False); + aRepeatHeaderCombo.Show(sal_False); //Groesse anpassen Size aSize(GetSizePixel()); @@ -208,10 +210,10 @@ SwConvertTableDlg::SwConvertTableDlg( SwView& rView, bool bToTable ) const SwModuleOptions* pModOpt = SW_MOD()->GetModuleConfig(); - BOOL bHTMLMode = 0 != (::GetHtmlMode(rView.GetDocShell())&HTMLMODE_ON); + sal_Bool bHTMLMode = 0 != (::GetHtmlMode(rView.GetDocShell())&HTMLMODE_ON); SwInsertTableOptions aInsOpts = pModOpt->GetInsTblFlags(bHTMLMode); - USHORT nInsTblFlags = aInsOpts.mnInsMode; + sal_uInt16 nInsTblFlags = aInsOpts.mnInsMode; aHeaderCB.Check( 0 != (nInsTblFlags & tabopts::HEADLINE) ); aRepeatHeaderCB.Check(aInsOpts.mnRowsToRepeat > 0); @@ -234,7 +236,7 @@ IMPL_LINK( SwConvertTableDlg, AutoFmtHdl, PushButton*, pButton ) SwAbstractDialogFactory* pFact = swui::GetFactory(); OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!"); - AbstractSwAutoFormatDlg* pDlg = pFact->CreateSwAutoFormatDlg(pButton, pShell, DLG_AUTOFMT_TABLE, FALSE, pTAutoFmt); + AbstractSwAutoFormatDlg* pDlg = pFact->CreateSwAutoFormatDlg(pButton, pShell, DLG_AUTOFMT_TABLE, sal_False, pTAutoFmt); OSL_ENSURE(pDlg, "Dialogdiet fail!"); if( RET_OK == pDlg->Execute()) pDlg->FillAutoFmtOfIndex( pTAutoFmt ); @@ -250,7 +252,7 @@ IMPL_LINK( SwConvertTableDlg, BtnHdl, Button*, pButton ) { if( aKeepColumn.IsEnabled() ) aKeepColumn.SaveValue(); - aKeepColumn.Check( TRUE ); + aKeepColumn.Check( sal_True ); } aKeepColumn.Enable( aTabBtn.IsChecked() ); aOtherEd.Enable( aOtherBtn.IsChecked() ); diff --git a/sw/source/ui/table/convert.hrc b/sw/source/ui/table/convert.hrc index e86906dd20..34e152c489 100644 --- a/sw/source/ui/table/convert.hrc +++ b/sw/source/ui/table/convert.hrc @@ -45,3 +45,6 @@ #define BT_AUTOFORMAT 102 #define BT_HELP 103 #define WIN_REPEAT_HEADER 104 +//IAccessibility2 Implementation 2009----- +#define STR_SYMBOL 105 +//-----IAccessibility2 Implementation 2009 diff --git a/sw/source/ui/table/convert.src b/sw/source/ui/table/convert.src index 50baa2bb9a..56f8d098a1 100644 --- a/sw/source/ui/table/convert.src +++ b/sw/source/ui/table/convert.src @@ -31,7 +31,7 @@ #include "helpid.h" ModalDialog DLG_CONV_TEXT_TABLE { - HelpID = FN_CONVERT_TEXT_TABLE ; + HelpID = CMD_FN_CONVERT_TEXT_TABLE ; OUTPUTSIZE = TRUE ; Size = MAP_APPFONT ( 203 , 169 ) ; Text [ en-US ] = "Convert Table to Text" ; @@ -39,6 +39,7 @@ ModalDialog DLG_CONV_TEXT_TABLE SVLOOK = TRUE ; RadioButton CB_TAB { + HelpID = "sw:RadioButton:DLG_CONV_TEXT_TABLE:CB_TAB"; Pos = MAP_APPFONT ( 12 , 17 ) ; Size = MAP_APPFONT ( 60 , 10 ) ; Text [ en-US ] = "~Tabs" ; @@ -48,6 +49,7 @@ ModalDialog DLG_CONV_TEXT_TABLE }; RadioButton CB_SEMI { + HelpID = "sw:RadioButton:DLG_CONV_TEXT_TABLE:CB_SEMI"; Pos = MAP_APPFONT ( 75 , 17 ) ; Size = MAP_APPFONT ( 60 , 10 ) ; Text [ en-US ] = "~Semicolons" ; @@ -55,6 +57,7 @@ ModalDialog DLG_CONV_TEXT_TABLE }; RadioButton CB_PARA { + HelpID = "sw:RadioButton:DLG_CONV_TEXT_TABLE:CB_PARA"; Pos = MAP_APPFONT ( 12 , 33 ) ; Size = MAP_APPFONT ( 60 , 10 ) ; Text [ en-US ] = "~Paragraph" ; @@ -62,12 +65,14 @@ ModalDialog DLG_CONV_TEXT_TABLE }; RadioButton RB_OTHER { + HelpID = "sw:RadioButton:DLG_CONV_TEXT_TABLE:RB_OTHER"; Pos = MAP_APPFONT ( 75 , 33 ) ; Size = MAP_APPFONT ( 45 , 10 ) ; Text [ en-US ] = "~Other: " ; }; Edit ED_OTHER { + HelpID = "sw:Edit:DLG_CONV_TEXT_TABLE:ED_OTHER"; Border = TRUE ; Left = TRUE ; Pos = MAP_APPFONT ( 123 , 32 ) ; @@ -77,6 +82,7 @@ ModalDialog DLG_CONV_TEXT_TABLE }; CheckBox CB_KEEPCOLUMN { + HelpID = "sw:CheckBox:DLG_CONV_TEXT_TABLE:CB_KEEPCOLUMN"; Pos = MAP_APPFONT ( 12 , 49 ) ; Size = MAP_APPFONT ( 128 , 10 ) ; Check = TRUE; @@ -92,6 +98,7 @@ ModalDialog DLG_CONV_TEXT_TABLE }; CheckBox CB_HEADER { + HelpID = "sw:CheckBox:DLG_CONV_TEXT_TABLE:CB_HEADER"; Pos = MAP_APPFONT ( 12 , 84 ) ; Size = MAP_APPFONT ( 123 , 10 ) ; TabStop = TRUE ; @@ -99,6 +106,7 @@ ModalDialog DLG_CONV_TEXT_TABLE }; CheckBox CB_REPEAT_HEADER { + HelpID = "sw:CheckBox:DLG_CONV_TEXT_TABLE:CB_REPEAT_HEADER"; Pos = MAP_APPFONT ( 22 , 97 ) ; Size = MAP_APPFONT ( 113 , 10 ) ; Text [ en-US ] = "Repeat heading"; @@ -112,6 +120,7 @@ ModalDialog DLG_CONV_TEXT_TABLE }; NumericField NF_REPEAT_HEADER { + HelpID = "sw:NumericField:DLG_CONV_TEXT_TABLE:NF_REPEAT_HEADER"; Border = TRUE ; Pos = MAP_APPFONT ( 191 , 112 ) ; Size = MAP_APPFONT ( 28 , 12 ) ; @@ -130,6 +139,7 @@ ModalDialog DLG_CONV_TEXT_TABLE }; CheckBox CB_DONT_SPLIT { + HelpID = "sw:CheckBox:DLG_CONV_TEXT_TABLE:CB_DONT_SPLIT"; Pos = MAP_APPFONT ( 12 , 126 ) ; Size = MAP_APPFONT ( 123 , 10 ) ; TabStop = TRUE ; @@ -137,6 +147,7 @@ ModalDialog DLG_CONV_TEXT_TABLE }; CheckBox CB_BORDER { + HelpID = "sw:CheckBox:DLG_CONV_TEXT_TABLE:CB_BORDER"; Pos = MAP_APPFONT ( 12 , 139 ) ; Size = MAP_APPFONT ( 123 , 10 ) ; TabStop = TRUE ; @@ -173,12 +184,19 @@ ModalDialog DLG_CONV_TEXT_TABLE }; PushButton BT_AUTOFORMAT { + HelpID = "sw:PushButton:DLG_CONV_TEXT_TABLE:BT_AUTOFORMAT"; Pos = MAP_APPFONT ( 12 , 152 ) ; Size = MAP_APPFONT ( 86 , 14 ) ; TabStop = TRUE ; Hide = TRUE ; Text [ en-US ] = "Auto~Format..." ; }; + /*IAccessibility2 Implementation 2009-----*/ + String STR_SYMBOL + { + Text [ en-US ] = "Symbol" ; + }; + /*-----IAccessibility2 Implementation 2009*/ }; diff --git a/sw/source/ui/table/instable.cxx b/sw/source/ui/table/instable.cxx index 7f9d1dea25..1bb8d76d9c 100644 --- a/sw/source/ui/table/instable.cxx +++ b/sw/source/ui/table/instable.cxx @@ -58,21 +58,21 @@ namespace swui #define ROW_COL_PROD 16384 -void SwInsTableDlg::GetValues( String& rName, USHORT& rRow, USHORT& rCol, +void SwInsTableDlg::GetValues( String& rName, sal_uInt16& rRow, sal_uInt16& rCol, SwInsertTableOptions& rInsTblOpts, String& rAutoName, SwTableAutoFmt *& prTAFmt ) { - USHORT nInsMode = 0; + sal_uInt16 nInsMode = 0; rName = aNameEdit.GetText(); - rRow = (USHORT)aRowEdit.GetValue(); - rCol = (USHORT)aColEdit.GetValue(); + rRow = (sal_uInt16)aRowEdit.GetValue(); + rCol = (sal_uInt16)aColEdit.GetValue(); if (aBorderCB.IsChecked()) nInsMode |= tabopts::DEFAULT_BORDER; if (aHeaderCB.IsChecked()) nInsMode |= tabopts::HEADLINE; if (aRepeatHeaderCB.IsEnabled() && aRepeatHeaderCB.IsChecked()) - rInsTblOpts.mnRowsToRepeat = USHORT( aRepeatHeaderNF.GetValue() ); + rInsTblOpts.mnRowsToRepeat = sal_uInt16( aRepeatHeaderNF.GetValue() ); else rInsTblOpts.mnRowsToRepeat = 0; if (!aDontSplitCB.IsChecked()) @@ -131,11 +131,11 @@ SwInsTableDlg::SwInsTableDlg( SwView& rView ) aColEdit.SetMax(ROW_COL_PROD/aRowEdit.GetValue()); aAutoFmtBtn.SetClickHdl(LINK(this, SwInsTableDlg, AutoFmtHdl)); - BOOL bHTMLMode = 0 != (::GetHtmlMode(rView.GetDocShell())&HTMLMODE_ON); + sal_Bool bHTMLMode = 0 != (::GetHtmlMode(rView.GetDocShell())&HTMLMODE_ON); const SwModuleOptions* pModOpt = SW_MOD()->GetModuleConfig(); SwInsertTableOptions aInsOpts = pModOpt->GetInsTblFlags(bHTMLMode); - USHORT nInsTblFlags = aInsOpts.mnInsMode; + sal_uInt16 nInsTblFlags = aInsOpts.mnInsMode; aHeaderCB.Check( 0 != (nInsTblFlags & tabopts::HEADLINE) ); aRepeatHeaderCB.Check(aInsOpts.mnRowsToRepeat > 0); @@ -220,7 +220,7 @@ IMPL_LINK( SwInsTableDlg, AutoFmtHdl, PushButton*, pButton ) SwAbstractDialogFactory* pFact = swui::GetFactory(); OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!"); - AbstractSwAutoFormatDlg* pDlg = pFact->CreateSwAutoFormatDlg(pButton,pShell, DLG_AUTOFMT_TABLE, FALSE, pTAutoFmt ); + AbstractSwAutoFormatDlg* pDlg = pFact->CreateSwAutoFormatDlg(pButton,pShell, DLG_AUTOFMT_TABLE, sal_False, pTAutoFmt ); OSL_ENSURE(pDlg, "Dialogdiet fail!"); if( RET_OK == pDlg->Execute()) pDlg->FillAutoFmtOfIndex( pTAutoFmt ); diff --git a/sw/source/ui/table/instable.src b/sw/source/ui/table/instable.src index 3930bb36ab..e5a636d3b8 100644 --- a/sw/source/ui/table/instable.src +++ b/sw/source/ui/table/instable.src @@ -32,7 +32,7 @@ // #define DLG_INSERT_TABLE 256 ModalDialog DLG_INSERT_TABLE { - HelpID = FN_INSERT_TABLE ; + HelpID = CMD_FN_INSERT_TABLE ; OutputSize = TRUE ; SVLook = TRUE ; Size = MAP_APPFONT ( 280 , 166 ) ; @@ -40,6 +40,7 @@ ModalDialog DLG_INSERT_TABLE Moveable = TRUE ; Edit ED_NAME { + HelpID = "sw:Edit:DLG_INSERT_TABLE:ED_NAME"; Border = TRUE ; Pos = MAP_APPFONT ( 53 , 6 ) ; Size = MAP_APPFONT ( 158, 12 ) ; @@ -60,6 +61,7 @@ ModalDialog DLG_INSERT_TABLE }; NumericField ED_COL { + HelpID = "sw:NumericField:DLG_INSERT_TABLE:ED_COL"; Border = TRUE ; Pos = MAP_APPFONT ( 53 , 32 ) ; Size = MAP_APPFONT ( 28 , 12 ) ; @@ -82,6 +84,7 @@ ModalDialog DLG_INSERT_TABLE }; NumericField ED_ROW { + HelpID = "sw:NumericField:DLG_INSERT_TABLE:ED_ROW"; Border = TRUE ; Pos = MAP_APPFONT ( 53 , 48 ) ; Size = MAP_APPFONT ( 28 , 12 ) ; @@ -103,6 +106,7 @@ ModalDialog DLG_INSERT_TABLE }; CheckBox CB_HEADER { + HelpID = "sw:CheckBox:DLG_INSERT_TABLE:CB_HEADER"; Pos = MAP_APPFONT ( 12 , 74 ) ; Size = MAP_APPFONT (113 , 10 ) ; TabStop = TRUE ; @@ -110,6 +114,7 @@ ModalDialog DLG_INSERT_TABLE }; CheckBox CB_REPEAT_HEADER { + HelpID = "sw:CheckBox:DLG_INSERT_TABLE:CB_REPEAT_HEADER"; Pos = MAP_APPFONT ( 21 , 88 ) ; Size = MAP_APPFONT ( 104 , 10 ) ; TabStop = TRUE ; @@ -123,6 +128,7 @@ ModalDialog DLG_INSERT_TABLE }; NumericField NF_REPEAT_HEADER { + HelpID = "sw:NumericField:DLG_INSERT_TABLE:NF_REPEAT_HEADER"; Border = TRUE ; Pos = MAP_APPFONT ( 130 , 104 ) ; Size = MAP_APPFONT ( 28 , 12 ) ; @@ -141,6 +147,7 @@ ModalDialog DLG_INSERT_TABLE }; CheckBox CB_DONT_SPLIT { + HelpID = "sw:CheckBox:DLG_INSERT_TABLE:CB_DONT_SPLIT"; Pos = MAP_APPFONT ( 12 , 118 ) ; Size = MAP_APPFONT ( 113 , 10 ) ; Text [ en-US ] = "Don't split table"; @@ -148,6 +155,7 @@ ModalDialog DLG_INSERT_TABLE }; CheckBox CB_BORDER { + HelpID = "sw:CheckBox:DLG_INSERT_TABLE:CB_BORDER"; Pos = MAP_APPFONT ( 12 , 132 ) ; Size = MAP_APPFONT ( 113 , 10 ) ; TabStop = TRUE ; @@ -155,6 +163,7 @@ ModalDialog DLG_INSERT_TABLE }; PushButton BT_AUTOFORMAT { + HelpID = "sw:PushButton:DLG_INSERT_TABLE:BT_AUTOFORMAT"; Pos = MAP_APPFONT ( 12 , 146 ) ; Size = MAP_APPFONT ( 86 , 14 ) ; TabStop = TRUE ; diff --git a/sw/source/ui/table/makefile.mk b/sw/source/ui/table/makefile.mk deleted file mode 100644 index 7897bf9ad9..0000000000 --- a/sw/source/ui/table/makefile.mk +++ /dev/null @@ -1,81 +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=table -LIBTARGET=no -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -SRS1NAME=$(TARGET) -SRC1FILES = \ - colwd.src \ - convert.src \ - chartins.src \ - instable.src \ - mergetbl.src \ - rowht.src \ - splittbl.src \ - table.src \ - tabledlg.src \ - tautofmt.src - -EXCEPTIONSFILES= \ - $(SLO)$/chartins.obj \ - $(SLO)$/colwd.obj \ - $(SLO)$/convert.obj \ - $(SLO)$/instable.obj \ - $(SLO)$/mergetbl.obj \ - $(SLO)$/rowht.obj \ - $(SLO)$/splittbl.obj \ - $(SLO)$/swtablerep.obj \ - $(SLO)$/tabledlg.obj \ - $(SLO)$/tablemgr.obj \ - $(SLO)$/tautofmt.obj - -SLOFILES = \ - $(EXCEPTIONSFILES) - -LIB1TARGET = $(SLB)$/$(TARGET).lib - -LIB1OBJFILES = \ - $(SLO)$/chartins.obj \ - $(SLO)$/swtablerep.obj \ - $(SLO)$/tablemgr.obj - - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/ui/table/mergetbl.cxx b/sw/source/ui/table/mergetbl.cxx index 3bf417c63f..98b6905503 100644 --- a/sw/source/ui/table/mergetbl.cxx +++ b/sw/source/ui/table/mergetbl.cxx @@ -40,7 +40,7 @@ #include <table.hrc> -SwMergeTblDlg::SwMergeTblDlg( Window *pParent, BOOL& rWithPrev ) +SwMergeTblDlg::SwMergeTblDlg( Window *pParent, sal_Bool& rWithPrev ) : SvxStandardDialog(pParent, SW_RES(DLG_MERGE_TABLE)), aOKPB( this, SW_RES(PB_OK )), aCancelPB( this, SW_RES(PB_CANCEL )), diff --git a/sw/source/ui/table/mergetbl.src b/sw/source/ui/table/mergetbl.src index 97ef9cb2cd..de6fa33159 100644 --- a/sw/source/ui/table/mergetbl.src +++ b/sw/source/ui/table/mergetbl.src @@ -31,7 +31,7 @@ #include "helpid.h" ModalDialog DLG_MERGE_TABLE { - HelpID = FN_TABLE_MERGE_TABLE ; + HelpID = CMD_FN_TABLE_MERGE_TABLE ; OutputSize = TRUE ; SVLook = TRUE ; Size = MAP_APPFONT ( 207 , 57 ) ; @@ -63,6 +63,7 @@ ModalDialog DLG_MERGE_TABLE }; RadioButton RB_MERGE_PREV { + HelpID = "sw:RadioButton:DLG_MERGE_TABLE:RB_MERGE_PREV"; Pos = MAP_APPFONT ( 12 , 15 ) ; Size = MAP_APPFONT ( 130 , 10 ) ; Check = TRUE ; @@ -71,6 +72,7 @@ ModalDialog DLG_MERGE_TABLE }; RadioButton RB_MERGE_NEXT { + HelpID = "sw:RadioButton:DLG_MERGE_TABLE:RB_MERGE_NEXT"; Pos = MAP_APPFONT ( 12 , 30 ) ; Size = MAP_APPFONT ( 130 , 10 ) ; Text [ en-US ] = "Join with ~next table"; diff --git a/sw/source/ui/table/rowht.cxx b/sw/source/ui/table/rowht.cxx index 03c4281210..19922e0da2 100644 --- a/sw/source/ui/table/rowht.cxx +++ b/sw/source/ui/table/rowht.cxx @@ -77,10 +77,10 @@ void SwTableHeightDlg::Apply() SwTableHeightDlg::SwTableHeightDlg( Window *pParent, SwWrtShell &rS ) : SvxStandardDialog(pParent, SW_RES(DLG_ROW_HEIGHT)), + aHeightFL(this, SW_RES(FL_HEIGHT)), aHeightEdit(this, SW_RES(ED_HEIGHT)), aAutoHeightCB(this, SW_RES(CB_AUTOHEIGHT)), - aHeightFL(this, SW_RES(FL_HEIGHT)), aOKBtn(this, SW_RES(BT_OK)), aCancelBtn(this, SW_RES(BT_CANCEL)), aHelpBtn( this, SW_RES( BT_HELP ) ), diff --git a/sw/source/ui/table/rowht.src b/sw/source/ui/table/rowht.src index 5679ebf6da..e7422e1626 100644 --- a/sw/source/ui/table/rowht.src +++ b/sw/source/ui/table/rowht.src @@ -31,7 +31,7 @@ #include "helpid.h" ModalDialog DLG_ROW_HEIGHT { - HelpID = FN_TABLE_SET_ROW_HEIGHT ; + HelpID = CMD_FN_TABLE_SET_ROW_HEIGHT ; OutputSize = TRUE ; SVLook = TRUE ; Size = MAP_APPFONT ( 157 , 60 ) ; @@ -58,6 +58,7 @@ ModalDialog DLG_ROW_HEIGHT }; MetricField ED_HEIGHT { + HelpID = "sw:MetricField:DLG_ROW_HEIGHT:ED_HEIGHT"; Border = TRUE ; Pos = MAP_APPFONT ( 12 , 16 ) ; Size = MAP_APPFONT ( 38 , 12 ) ; @@ -75,6 +76,7 @@ ModalDialog DLG_ROW_HEIGHT }; CheckBox CB_AUTOHEIGHT { + HelpID = "sw:CheckBox:DLG_ROW_HEIGHT:CB_AUTOHEIGHT"; Pos = MAP_APPFONT ( 12 , 34 ) ; Size = MAP_APPFONT ( 80 , 10 ) ; TabStop = TRUE ; diff --git a/sw/source/ui/table/splittbl.src b/sw/source/ui/table/splittbl.src index e58d64ab96..d785f9ea06 100644 --- a/sw/source/ui/table/splittbl.src +++ b/sw/source/ui/table/splittbl.src @@ -31,7 +31,7 @@ #include "helpid.h" ModalDialog DLG_SPLIT_TABLE { - HelpID = FN_TABLE_SPLIT_TABLE ; + HelpID = CMD_FN_TABLE_SPLIT_TABLE ; OutputSize = TRUE ; SVLook = TRUE ; Size = MAP_APPFONT ( 207 , 76 ) ; @@ -63,6 +63,7 @@ ModalDialog DLG_SPLIT_TABLE }; RadioButton RB_CNTNT { + HelpID = "sw:RadioButton:DLG_SPLIT_TABLE:RB_CNTNT"; Pos = MAP_APPFONT ( 12 , 15 ) ; Size = MAP_APPFONT ( 130 , 10 ) ; Check = TRUE ; @@ -71,18 +72,21 @@ ModalDialog DLG_SPLIT_TABLE }; RadioButton RB_BOX_PARA { + HelpID = "sw:RadioButton:DLG_SPLIT_TABLE:RB_BOX_PARA"; Pos = MAP_APPFONT ( 12 , 30 ) ; Size = MAP_APPFONT ( 130 , 10 ) ; Text [ en-US ] = "C~ustom heading (apply Style)" ; }; RadioButton RB_BOX_NOPARA { + HelpID = "sw:RadioButton:DLG_SPLIT_TABLE:RB_BOX_NOPARA"; Pos = MAP_APPFONT ( 12 , 45 ) ; Size = MAP_APPFONT ( 130 , 10 ) ; Text [ en-US ] = "Cu~stom heading" ; }; RadioButton RB_BORDER { + HelpID = "sw:RadioButton:DLG_SPLIT_TABLE:RB_BORDER"; Pos = MAP_APPFONT ( 12 , 60 ) ; Size = MAP_APPFONT ( 130 , 10 ) ; Text [ en-US ] = "~No heading" ; diff --git a/sw/source/ui/table/swtablerep.cxx b/sw/source/ui/table/swtablerep.cxx index 1f7456f667..13480e3561 100644 --- a/sw/source/ui/table/swtablerep.cxx +++ b/sw/source/ui/table/swtablerep.cxx @@ -66,7 +66,7 @@ #include "swtablerep.hxx" -SwTableRep::SwTableRep( const SwTabCols& rTabCol, BOOL bCplx ) +SwTableRep::SwTableRep( const SwTabCols& rTabCol, sal_Bool bCplx ) : nTblWidth(0), nSpace(0), @@ -75,15 +75,15 @@ SwTableRep::SwTableRep( const SwTabCols& rTabCol, BOOL bCplx ) nAlign(0), nWidthPercent(0), bComplex(bCplx), - bLineSelected(FALSE), - bWidthChanged(FALSE), - bColsChanged(FALSE) + bLineSelected(sal_False), + bWidthChanged(sal_False), + bColsChanged(sal_False) { nAllCols = nColCount = rTabCol.Count(); pTColumns = new TColumn[ nColCount + 1 ]; SwTwips nStart = 0, nEnd; - for( USHORT i = 0; i < nAllCols; ++i ) + for( sal_uInt16 i = 0; i < nAllCols; ++i ) { nEnd = rTabCol[ i ] - rTabCol.GetLeft(); pTColumns[ i ].nWidth = nEnd - nStart; @@ -93,7 +93,7 @@ SwTableRep::SwTableRep( const SwTabCols& rTabCol, BOOL bCplx ) nStart = nEnd; } pTColumns[ nAllCols ].nWidth = rTabCol.GetRight() - rTabCol.GetLeft() - nStart; - pTColumns[ nAllCols ].bVisible = TRUE; + pTColumns[ nAllCols ].bVisible = sal_True; nColCount++; nAllCols++; } @@ -103,18 +103,18 @@ SwTableRep::~SwTableRep() delete[] pTColumns; } -BOOL SwTableRep::FillTabCols( SwTabCols& rTabCols ) const +sal_Bool SwTableRep::FillTabCols( SwTabCols& rTabCols ) const { long nOldLeft = rTabCols.GetLeft(), nOldRight = rTabCols.GetRight(); - BOOL bSingleLine = FALSE; - USHORT i; + sal_Bool bSingleLine = sal_False; + sal_uInt16 i; for ( i = 0; i < rTabCols.Count(); ++i ) if(!pTColumns[i].bVisible) { - bSingleLine = TRUE; + bSingleLine = sal_True; break; } @@ -136,14 +136,14 @@ BOOL SwTableRep::FillTabCols( SwTabCols& rTabCols ) const nStart = nEnd; } pOldTColumns[nAllCols - 1].nWidth = rTabCols.GetRight() - rTabCols.GetLeft() - nStart; - pOldTColumns[nAllCols - 1].bVisible = TRUE; + pOldTColumns[nAllCols - 1].bVisible = sal_True; - USHORT nOldPos = 0; - USHORT nNewPos = 0; + sal_uInt16 nOldPos = 0; + sal_uInt16 nNewPos = 0; SwTwips nOld = 0; SwTwips nNew = 0; - BOOL bOld = FALSE; - BOOL bFirst = TRUE; + sal_Bool bOld = sal_False; + sal_Bool bFirst = sal_True; i = 0; while ( i < nAllCols -1 ) @@ -162,10 +162,10 @@ BOOL SwTableRep::FillTabCols( SwTabCols& rTabCols ) const if(pOldTColumns[nNewPos - 1].bVisible) break; } - bFirst = FALSE; + bFirst = sal_False; // sie muessen sortiert eingefuegt werden bOld = nOld < nNew; - nPos = USHORT(bOld ? nOld : nNew); + nPos = sal_uInt16(bOld ? nOld : nNew); rTabCols[i] = nPos + nLeft; rTabCols.SetHidden( i, bOld ); i++; diff --git a/sw/source/ui/table/tabledlg.cxx b/sw/source/ui/table/tabledlg.cxx index 1a6d2d12ad..dcbe73c1cd 100644 --- a/sw/source/ui/table/tabledlg.cxx +++ b/sw/source/ui/table/tabledlg.cxx @@ -51,6 +51,8 @@ #include <fmtrowsplt.hxx> #include <svx/htmlmode.hxx> +#include "access.hrc" + #include <docsh.hxx> #include <wrtsh.hxx> #include <view.hxx> @@ -110,7 +112,7 @@ SwFormatTablePage::SwFormatTablePage( Window* pParent, const SfxItemSet& rSet ) pTblData(0), nSaveWidth(0), nMinTableWidth(MINLAY), - bModified(FALSE), + bModified(sal_False), bFull(0), bHtmlMode(sal_False) { @@ -118,7 +120,7 @@ SwFormatTablePage::SwFormatTablePage( Window* pParent, const SfxItemSet& rSet ) SetExchangeSupport(); const SfxPoolItem* pItem; - if(SFX_ITEM_SET == rSet.GetItemState(SID_HTML_MODE, FALSE, &pItem)) + if(SFX_ITEM_SET == rSet.GetItemState(SID_HTML_MODE, sal_False, &pItem)) bHtmlMode = 0 != (((const SfxUInt16Item*)pItem)->GetValue() & HTMLMODE_ON); sal_Bool bCTL = SW_MOD()->GetCTLOptions().IsCTLFontEnabled(); @@ -175,7 +177,7 @@ void SwFormatTablePage::Init() IMPL_LINK( SwFormatTablePage, RelWidthClickHdl, CheckBox *, pBtn ) { OSL_ENSURE(pTblData, "table data not available?"); - BOOL bIsChecked = pBtn->IsChecked(); + sal_Bool bIsChecked = pBtn->IsChecked(); sal_Int64 nLeft = aLeftMF.DenormalizePercent(aLeftMF.GetValue(FUNIT_TWIP )); sal_Int64 nRight = aRightMF.DenormalizePercent(aRightMF.GetValue(FUNIT_TWIP )); aWidthMF.ShowPercent(bIsChecked); @@ -199,11 +201,11 @@ IMPL_LINK( SwFormatTablePage, RelWidthClickHdl, CheckBox *, pBtn ) if(aFreeBtn.IsChecked()) { - BOOL bEnable = !pBtn->IsChecked(); + sal_Bool bEnable = !pBtn->IsChecked(); aRightMF.Enable(bEnable); aRightFT.Enable(bEnable); } - bModified = TRUE; + bModified = sal_True; return 0; } @@ -212,45 +214,45 @@ IMPL_LINK( SwFormatTablePage, RelWidthClickHdl, CheckBox *, pBtn ) ------------------------------------------------------------------------*/ IMPL_LINK( SwFormatTablePage, AutoClickHdl, CheckBox *, pBox ) { - BOOL bRestore = TRUE, - bLeftEnable = FALSE, - bRightEnable= FALSE, - bWidthEnable= FALSE, - bOthers = TRUE; + sal_Bool bRestore = sal_True, + bLeftEnable = sal_False, + bRightEnable= sal_False, + bWidthEnable= sal_False, + bOthers = sal_True; if( (RadioButton *) pBox == &aFullBtn ) { aLeftMF.SetPrcntValue(0); aRightMF.SetPrcntValue(0); nSaveWidth = static_cast< SwTwips >(aWidthMF.DenormalizePercent(aWidthMF.GetValue(FUNIT_TWIP ))); aWidthMF.SetPrcntValue(aWidthMF.NormalizePercent(pTblData->GetSpace() ), FUNIT_TWIP ); - bFull = TRUE; - bRestore = FALSE; + bFull = sal_True; + bRestore = sal_False; } else if( (RadioButton *) pBox == &aLeftBtn ) { - bRightEnable = bWidthEnable = TRUE; + bRightEnable = bWidthEnable = sal_True; aLeftMF.SetPrcntValue(0); } else if( (RadioButton *) pBox == &aFromLeftBtn ) { - bLeftEnable = bWidthEnable = TRUE; + bLeftEnable = bWidthEnable = sal_True; aRightMF.SetPrcntValue(0); } else if( (RadioButton *) pBox == &aRightBtn ) { - bLeftEnable = bWidthEnable = TRUE; + bLeftEnable = bWidthEnable = sal_True; aRightMF.SetPrcntValue(0); } else if( ( RadioButton * ) pBox == &aCenterBtn ) { - bLeftEnable = bWidthEnable = TRUE; + bLeftEnable = bWidthEnable = sal_True; } else if( ( RadioButton * ) pBox == &aFreeBtn ) { RightModifyHdl(&aRightMF); - bLeftEnable = TRUE; - bWidthEnable = TRUE; - bOthers = FALSE; + bLeftEnable = sal_True; + bWidthEnable = sal_True; + bOthers = sal_False; } aLeftMF.Enable(bLeftEnable); aLeftFT.Enable(bLeftEnable); @@ -267,11 +269,11 @@ IMPL_LINK( SwFormatTablePage, AutoClickHdl, CheckBox *, pBox ) { // nachdem auf autom. geschaltet wurde, wurde die Breite gemerkt, // um sie beim Zurueckschalten restaurieren zu koennen - bFull = FALSE; + bFull = sal_False; aWidthMF.SetPrcntValue(aWidthMF.NormalizePercent(nSaveWidth ), FUNIT_TWIP ); } ModifyHdl(&aWidthMF); - bModified = TRUE; + bModified = sal_True; return 0; } @@ -280,11 +282,11 @@ IMPL_LINK( SwFormatTablePage, RightModifyHdl, MetricField *, EMPTYARG ) { if(aFreeBtn.IsChecked()) { - BOOL bEnable = aRightMF.GetValue() == 0; + sal_Bool bEnable = aRightMF.GetValue() == 0; aRelWidthCB.Enable(bEnable); if ( !bEnable ) { - aRelWidthCB.Check(FALSE); + aRelWidthCB.Check(sal_False); RelWidthClickHdl(&aRelWidthCB); } bEnable = aRelWidthCB.IsChecked(); @@ -379,7 +381,7 @@ void SwFormatTablePage::ModifyHdl( Edit* pEdit ) { if(!aFromLeftBtn.IsChecked()) { - BOOL bCenter = aCenterBtn.IsChecked(); + sal_Bool bCenter = aCenterBtn.IsChecked(); if( bCenter ) nRight = nLeft; if(nRight + nLeft > pTblData->GetSpace() - MINLAY ) @@ -404,7 +406,7 @@ void SwFormatTablePage::ModifyHdl( Edit* pEdit ) aWidthMF.SetPrcntValue( aWidthMF.NormalizePercent( nCurWidth ), FUNIT_TWIP ); aRightMF.SetPrcntValue( aRightMF.NormalizePercent( nRight ), FUNIT_TWIP ); aLeftMF.SetPrcntValue( aLeftMF.NormalizePercent( nLeft ), FUNIT_TWIP ); - bModified = TRUE; + bModified = sal_True; } /*------------------------------------------------------------------------ @@ -417,7 +419,7 @@ SfxTabPage* SwFormatTablePage::Create( Window* pParent, /*------------------------------------------------------------------------ -------------------------------------------------------------------------*/ -BOOL SwFormatTablePage::FillItemSet( SfxItemSet& rCoreSet ) +sal_Bool SwFormatTablePage::FillItemSet( SfxItemSet& rCoreSet ) { // Testen, ob eins der Control noch den Focus hat if(aWidthMF.HasFocus()) @@ -437,9 +439,9 @@ BOOL SwFormatTablePage::FillItemSet( SfxItemSet& rCoreSet ) aTopMF.GetText() != aTopMF.GetSavedValue() ) { SvxULSpaceItem aULSpace(RES_UL_SPACE); - aULSpace.SetUpper( (USHORT) aTopMF.Denormalize( + aULSpace.SetUpper( (sal_uInt16) aTopMF.Denormalize( aTopMF.GetValue( FUNIT_TWIP ))); - aULSpace.SetLower( (USHORT) aBottomMF.Denormalize( + aULSpace.SetLower( (sal_uInt16) aBottomMF.Denormalize( aBottomMF.GetValue( FUNIT_TWIP ))); rCoreSet.Put(aULSpace); } @@ -448,17 +450,17 @@ BOOL SwFormatTablePage::FillItemSet( SfxItemSet& rCoreSet ) if(aNameED.GetText() != aNameED.GetSavedValue()) { rCoreSet.Put(SfxStringItem( FN_PARAM_TABLE_NAME, aNameED.GetText())); - bModified = TRUE; + bModified = sal_True; } - USHORT nPos; + sal_uInt16 nPos; if( aTextDirectionLB.IsVisible() && ( nPos = aTextDirectionLB.GetSelectEntryPos() ) != aTextDirectionLB.GetSavedValue() ) { sal_uInt32 nDirection = (sal_uInt32)(sal_uIntPtr)aTextDirectionLB.GetEntryData( nPos ); rCoreSet.Put( SvxFrameDirectionItem( (SvxFrameDirection)nDirection, RES_FRAMEDIR)); - bModified = TRUE; + bModified = sal_True; } return bModified; @@ -478,7 +480,7 @@ void SwFormatTablePage::Reset( const SfxItemSet& ) aTopMF .Hide(); aBottomFT.Hide(); aBottomMF.Hide(); - aFreeBtn.Enable(FALSE); + aFreeBtn.Enable(sal_False); } FieldUnit aMetric = ::GetDfltMetric(bHtmlMode); SetMetric( aWidthMF, aMetric ); @@ -488,20 +490,20 @@ void SwFormatTablePage::Reset( const SfxItemSet& ) SetMetric( aBottomMF, aMetric ); //Name - if(SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_TABLE_NAME, FALSE, &pItem )) + if(SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_TABLE_NAME, sal_False, &pItem )) { aNameED.SetText(((const SfxStringItem*)pItem)->GetValue()); aNameED.SaveValue(); } - if(SFX_ITEM_SET == rSet.GetItemState( FN_TABLE_REP, FALSE, &pItem )) + if(SFX_ITEM_SET == rSet.GetItemState( FN_TABLE_REP, sal_False, &pItem )) { pTblData = (SwTableRep*)((const SwPtrItem*) pItem)->GetValue(); nMinTableWidth = pTblData->GetColCount() * MINLAY; if(pTblData->GetWidthPercent()) { - aRelWidthCB.Check(TRUE); + aRelWidthCB.Check(sal_True); RelWidthClickHdl(&aRelWidthCB); aWidthMF.SetPrcntValue(pTblData->GetWidthPercent(), FUNIT_CUSTOM); @@ -531,45 +533,45 @@ void SwFormatTablePage::Reset( const SfxItemSet& ) nOldAlign = pTblData->GetAlign(); - BOOL bSetRight = FALSE, bRightEnable = FALSE, - bSetLeft = FALSE, bLeftEnable = FALSE; + sal_Bool bSetRight = sal_False, bRightEnable = sal_False, + bSetLeft = sal_False, bLeftEnable = sal_False; switch( nOldAlign ) { case text::HoriOrientation::NONE: aFreeBtn.Check(); if(aRelWidthCB.IsChecked()) - bSetRight = TRUE; + bSetRight = sal_True; break; case text::HoriOrientation::FULL: { - bSetRight = bSetLeft = TRUE; + bSetRight = bSetLeft = sal_True; aFullBtn.Check(); - aWidthMF.Enable(FALSE); - aRelWidthCB.Enable(FALSE); - aWidthFT.Enable(FALSE); + aWidthMF.Enable(sal_False); + aRelWidthCB.Enable(sal_False); + aWidthFT.Enable(sal_False); } break; case text::HoriOrientation::LEFT: { - bSetLeft = TRUE; + bSetLeft = sal_True; aLeftBtn.Check(); } break; case text::HoriOrientation::LEFT_AND_WIDTH : { - bSetRight = TRUE; + bSetRight = sal_True; aFromLeftBtn.Check(); } break; case text::HoriOrientation::RIGHT: { - bSetRight = TRUE; + bSetRight = sal_True; aRightBtn.Check(); } break; case text::HoriOrientation::CENTER: { - bSetRight = TRUE; + bSetRight = sal_True; aCenterBtn.Check(); } break; @@ -588,7 +590,7 @@ void SwFormatTablePage::Reset( const SfxItemSet& ) } //Raender - if(SFX_ITEM_SET == rSet.GetItemState( RES_UL_SPACE, FALSE,&pItem )) + if(SFX_ITEM_SET == rSet.GetItemState( RES_UL_SPACE, sal_False,&pItem )) { aTopMF.SetValue(aTopMF.Normalize( ((const SvxULSpaceItem*)pItem)->GetUpper()), FUNIT_TWIP); @@ -599,10 +601,10 @@ void SwFormatTablePage::Reset( const SfxItemSet& ) } //text direction - if( SFX_ITEM_SET == rSet.GetItemState( RES_FRAMEDIR, TRUE, &pItem ) ) + if( SFX_ITEM_SET == rSet.GetItemState( RES_FRAMEDIR, sal_True, &pItem ) ) { sal_uIntPtr nVal = ((SvxFrameDirectionItem*)pItem)->GetValue(); - USHORT nPos = aTextDirectionLB.GetEntryPos( (void*) nVal ); + sal_uInt16 nPos = aTextDirectionLB.GetEntryPos( (void*) nVal ); aTextDirectionLB.SelectEntryPos( nPos ); aTextDirectionLB.SaveValue(); } @@ -677,7 +679,7 @@ int SwFormatTablePage::DeactivatePage( SfxItemSet* _pSet ) if (aRelWidthCB.IsChecked() && aRelWidthCB.IsEnabled()) { lWidth = pTblData->GetSpace() - lRight - lLeft; - USHORT nPercentWidth = (USHORT)aWidthMF.GetValue(FUNIT_CUSTOM); + sal_uInt16 nPercentWidth = (sal_uInt16)aWidthMF.GetValue(FUNIT_CUSTOM); if(pTblData->GetWidthPercent() != nPercentWidth) { pTblData->SetWidthPercent(nPercentWidth); @@ -692,7 +694,7 @@ int SwFormatTablePage::DeactivatePage( SfxItemSet* _pSet ) pTblData->SetWidth(lWidth); SwTwips nColSum = 0; - USHORT i; + sal_uInt16 i; for( i = 0; i < pTblData->GetColCount(); i++) { @@ -756,7 +758,7 @@ int SwFormatTablePage::DeactivatePage( SfxItemSet* _pSet ) _pSet->Put(SwPtrItem(FN_TABLE_REP, pTblData)); } } - return TRUE; + return sal_True; } /*------------------------------------------------------------------------ Beschreibung: Seite Spaltenkonfiguration @@ -768,7 +770,8 @@ SwTableColumnPage::SwTableColumnPage( Window* pParent, aProportionalCB(this, SW_RES(CB_PROP)), aSpaceFT(this, SW_RES(FT_SPACE)), aSpaceED(this, SW_RES(ED_SPACE)), - + + aColFL(this, SW_RES(COL_FL_LAYOUT)), aUpBtn(this, SW_RES(COL_BTN_UP)), aFT1(this, SW_RES(COL_FT_1)), aMF1(this, SW_RES(COL_MF_1)), @@ -783,19 +786,21 @@ SwTableColumnPage::SwTableColumnPage( Window* pParent, aFT6(this, SW_RES(COL_FT_6)), aMF6(this, SW_RES(COL_MF_6)), aDownBtn(this, SW_RES(COL_BTN_DOWN)), - aColFL(this, SW_RES(COL_FL_LAYOUT)), nTableWidth(0), nMinWidth( MINLAY ), nNoOfCols( 0 ), nNoOfVisibleCols( 0 ), - bModified(FALSE), - bModifyTbl(FALSE), - bPercentMode(FALSE) + bModified(sal_False), + bModifyTbl(sal_False), + bPercentMode(sal_False) { FreeResource(); SetExchangeSupport(); + aDownBtn.SetAccessibleRelationMemberOf(&aColFL); + aUpBtn.SetAccessibleRelationMemberOf(&aColFL); + pFieldArr[0] = &aMF1; pFieldArr[1] = &aMF2; pFieldArr[2] = &aMF3; @@ -811,7 +816,7 @@ SwTableColumnPage::SwTableColumnPage( Window* pParent, pTextArr[5] = &aFT6; const SfxPoolItem* pItem; - Init((SFX_ITEM_SET == rSet.GetItemState( SID_HTML_MODE, FALSE,&pItem ) + Init((SFX_ITEM_SET == rSet.GetItemState( SID_HTML_MODE, sal_False,&pItem ) && ((const SfxUInt16Item*)pItem)->GetValue() & HTMLMODE_ON)); }; @@ -837,7 +842,7 @@ void SwTableColumnPage::Reset( const SfxItemSet& ) const SfxItemSet& rSet = GetItemSet(); const SfxPoolItem* pItem; - if(SFX_ITEM_SET == rSet.GetItemState( FN_TABLE_REP, FALSE, &pItem )) + if(SFX_ITEM_SET == rSet.GetItemState( FN_TABLE_REP, sal_False, &pItem )) { pTblData = (SwTableRep*)((const SwPtrItem*) pItem)->GetValue(); nNoOfVisibleCols = pTblData->GetColCount(); @@ -846,7 +851,7 @@ void SwTableColumnPage::Reset( const SfxItemSet& ) pTblData->GetAlign() != text::HoriOrientation::LEFT_AND_WIDTH? pTblData->GetWidth() : pTblData->GetSpace(); - USHORT i; + sal_uInt16 i; for( i = 0; i < nNoOfCols; i++ ) { if( pTblData->GetColumns()[i].nWidth < nMinWidth ) @@ -880,13 +885,13 @@ void SwTableColumnPage::Reset( const SfxItemSet& ) /*------------------------------------------------------------------------ ------------------------------------------------------------------------*/ -void SwTableColumnPage::Init(BOOL bWeb) +void SwTableColumnPage::Init(sal_Bool bWeb) { FieldUnit aMetric = ::GetDfltMetric(bWeb); Link aLkUp = LINK( this, SwTableColumnPage, UpHdl ); Link aLkDown = LINK( this, SwTableColumnPage, DownHdl ); Link aLkLF = LINK( this, SwTableColumnPage, LoseFocusHdl ); - for( USHORT i = 0; i < MET_FIELDS; i++ ) + for( sal_uInt16 i = 0; i < MET_FIELDS; i++ ) { aValueTbl[i] = i; SetMetric(*pFieldArr[i], aMetric); @@ -915,7 +920,7 @@ IMPL_LINK( SwTableColumnPage, AutoClickHdl, CheckBox *, pBox ) { if(aValueTbl[0] > 0) { - for( USHORT i=0; i < MET_FIELDS; i++ ) + for( sal_uInt16 i=0; i < MET_FIELDS; i++ ) aValueTbl[i] -= 1; } } @@ -923,15 +928,23 @@ IMPL_LINK( SwTableColumnPage, AutoClickHdl, CheckBox *, pBox ) { if( aValueTbl[ MET_FIELDS -1 ] < nNoOfVisibleCols -1 ) { - for(USHORT i=0;i < MET_FIELDS;i++) + for(sal_uInt16 i=0;i < MET_FIELDS;i++) aValueTbl[i] += 1; } } - for( USHORT i = 0; (i < nNoOfVisibleCols ) && ( i < MET_FIELDS); i++ ) + for( sal_uInt16 i = 0; (i < nNoOfVisibleCols ) && ( i < MET_FIELDS); i++ ) { String sEntry('~'); - sEntry += String::CreateFromInt32( aValueTbl[i] + 1 ); + String sIndex = String::CreateFromInt32( aValueTbl[i] + 1 ); + sEntry += sIndex; pTextArr[i]->SetText( sEntry ); +//IAccessibility2 Impplementaton 2009----- + //added by menghu for SODC_5143,12/12/2006 + String sColumnWidth = SW_RESSTR( STR_ACCESS_COLUMN_WIDTH); + sColumnWidth.SearchAndReplace( DEFINE_CONST_UNICODE("%1"), sIndex ); + pFieldArr[i]->SetAccessibleName( sColumnWidth ); + //end of SODC_5143 +//-----IAccessibility2 Impplementaton 2009 } aDownBtn.Enable(aValueTbl[0] > 0); @@ -944,7 +957,7 @@ IMPL_LINK( SwTableColumnPage, AutoClickHdl, CheckBox *, pBox ) ------------------------------------------------------------------------*/ IMPL_LINK_INLINE_START( SwTableColumnPage, UpHdl, PercentField *, pEdit ) { - bModified = TRUE; + bModified = sal_True; ModifyHdl( pEdit ); return 0; }; @@ -954,7 +967,7 @@ IMPL_LINK_INLINE_END( SwTableColumnPage, UpHdl, PercentField *, pEdit ) ------------------------------------------------------------------------*/ IMPL_LINK_INLINE_START( SwTableColumnPage, DownHdl, PercentField *, pEdit ) { - bModified = TRUE; + bModified = sal_True; ModifyHdl( pEdit ); return 0; }; @@ -966,7 +979,7 @@ IMPL_LINK_INLINE_START( SwTableColumnPage, LoseFocusHdl, PercentField *, pEdit ) { if(pEdit->IsModified()) { - bModified = TRUE; + bModified = sal_True; ModifyHdl( pEdit ); } return 0; @@ -977,7 +990,7 @@ IMPL_LINK_INLINE_END( SwTableColumnPage, LoseFocusHdl, PercentField *, pEdit ) ------------------------------------------------------------------------*/ IMPL_LINK( SwTableColumnPage, ModeHdl, CheckBox*, pBox ) { - BOOL bCheck = pBox->IsChecked(); + sal_Bool bCheck = pBox->IsChecked(); if(pBox == &aProportionalCB) { if(bCheck) @@ -989,9 +1002,9 @@ IMPL_LINK( SwTableColumnPage, ModeHdl, CheckBox*, pBox ) /*------------------------------------------------------------------------ ------------------------------------------------------------------------*/ -BOOL SwTableColumnPage::FillItemSet( SfxItemSet& ) +sal_Bool SwTableColumnPage::FillItemSet( SfxItemSet& ) { - for( USHORT i = 0; i < MET_FIELDS; i++ ) + for( sal_uInt16 i = 0; i < MET_FIELDS; i++ ) { if(pFieldArr[i]->HasFocus()) { @@ -1011,8 +1024,8 @@ BOOL SwTableColumnPage::FillItemSet( SfxItemSet& ) ------------------------------------------------------------------------*/ void SwTableColumnPage::ModifyHdl( PercentField* pEdit ) { - USHORT nAktPos; - USHORT i; + sal_uInt16 nAktPos; + sal_uInt16 i; for( i = 0; i < MET_FIELDS; i++) if(pEdit == pFieldArr[i]) @@ -1026,10 +1039,10 @@ void SwTableColumnPage::ModifyHdl( PercentField* pEdit ) /*------------------------------------------------------------------------ ------------------------------------------------------------------------*/ -void SwTableColumnPage::UpdateCols( USHORT nAktPos ) +void SwTableColumnPage::UpdateCols( sal_uInt16 nAktPos ) { SwTwips nSum = 0; - USHORT i; + sal_uInt16 i; for( i = 0; i < nNoOfCols; i++ ) { @@ -1037,8 +1050,8 @@ void SwTableColumnPage::UpdateCols( USHORT nAktPos ) } SwTwips nDiff = nSum - nTableWidth; - BOOL bModifyTable = aModifyTableCB.IsChecked(); - BOOL bProp = aProportionalCB.IsChecked(); + sal_Bool bModifyTable = aModifyTableCB.IsChecked(); + sal_Bool bProp = aProportionalCB.IsChecked(); if(!bModifyTable && !bProp ) { @@ -1140,13 +1153,13 @@ void SwTableColumnPage::UpdateCols( USHORT nAktPos ) void SwTableColumnPage::ActivatePage( const SfxItemSet& ) { bPercentMode = pTblData->GetWidthPercent() != 0; - for( USHORT i = 0; (i < MET_FIELDS) && (i < nNoOfVisibleCols); i++ ) + for( sal_uInt16 i = 0; (i < MET_FIELDS) && (i < nNoOfVisibleCols); i++ ) { pFieldArr[i]->SetRefValue(pTblData->GetWidth()); pFieldArr[i]->ShowPercent( bPercentMode ); } - USHORT nTblAlign = pTblData->GetAlign(); + sal_uInt16 nTblAlign = pTblData->GetAlign(); if((text::HoriOrientation::FULL != nTblAlign && nTableWidth != pTblData->GetWidth()) || (text::HoriOrientation::FULL == nTblAlign && nTableWidth != pTblData->GetSpace())) { @@ -1155,20 +1168,20 @@ void SwTableColumnPage::ActivatePage( const SfxItemSet& ) pTblData->GetWidth(); UpdateCols(0); } - bModifyTbl = TRUE; + bModifyTbl = sal_True; if(pTblData->GetWidthPercent() || text::HoriOrientation::FULL == nTblAlign || pTblData->IsLineSelected() ) - bModifyTbl = FALSE; + bModifyTbl = sal_False; if(bPercentMode) { - aModifyTableCB .Check(FALSE); - aProportionalCB .Check(FALSE); + aModifyTableCB .Check(sal_False); + aProportionalCB .Check(sal_False); } else if( !bModifyTbl ) { - aProportionalCB.Check(FALSE); - aModifyTableCB.Check(FALSE); + aProportionalCB.Check(sal_False); + aModifyTableCB.Check(sal_False); } aSpaceFT.Enable(!bPercentMode); aSpaceED.Enable(!bPercentMode); @@ -1241,14 +1254,14 @@ int SwTableColumnPage::DeactivatePage( SfxItemSet* _pSet ) } _pSet->Put(SwPtrItem( FN_TABLE_REP, pTblData )); } - return TRUE; + return sal_True; } /*------------------------------------------------------------------------ ------------------------------------------------------------------------*/ -SwTwips SwTableColumnPage::GetVisibleWidth(USHORT nPos) +SwTwips SwTableColumnPage::GetVisibleWidth(sal_uInt16 nPos) { - USHORT i=0; + sal_uInt16 i=0; while( nPos ) { @@ -1266,9 +1279,9 @@ SwTwips SwTableColumnPage::GetVisibleWidth(USHORT nPos) /*------------------------------------------------------------------------ ------------------------------------------------------------------------*/ -void SwTableColumnPage::SetVisibleWidth(USHORT nPos, SwTwips nNewWidth) +void SwTableColumnPage::SetVisibleWidth(sal_uInt16 nPos, SwTwips nNewWidth) { - USHORT i=0; + sal_uInt16 i=0; while( nPos ) { if(pTblData->GetColumns()[i].bVisible && nPos) @@ -1303,7 +1316,7 @@ SwTableTabDlg::SwTableTabDlg(Window* pParent, SfxItemPool& , /*------------------------------------------------------------------------ ------------------------------------------------------------------------*/ -void SwTableTabDlg::PageCreated(USHORT nId, SfxTabPage& rPage) +void SwTableTabDlg::PageCreated(sal_uInt16 nId, SfxTabPage& rPage) { SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool())); if( TP_BACKGROUND == nId ) @@ -1323,7 +1336,7 @@ void SwTableTabDlg::PageCreated(USHORT nId, SfxTabPage& rPage) else if(TP_TABLE_TEXTFLOW == nId) { ((SwTextFlowPage&)rPage).SetShell(pShell); - const USHORT eType = pShell->GetFrmType(0,TRUE); + const sal_uInt16 eType = pShell->GetFrmType(0,sal_True); if( !(FRMTYPE_BODY & eType) ) ((SwTextFlowPage&)rPage).DisablePageBreak(); } @@ -1360,11 +1373,18 @@ SwTextFlowPage::SwTextFlowPage( Window* pParent, pShell(0), - bPageBreak(TRUE), - bHtmlMode(FALSE) + bPageBreak(sal_True), + bHtmlMode(sal_False) { FreeResource(); + aPgBrkRB.SetAccessibleRelationMemberOf(&aPgBrkCB); + aColBrkRB.SetAccessibleRelationMemberOf(&aPgBrkCB); + aPgBrkBeforeRB.SetAccessibleRelationMemberOf(&aPgBrkCB); + aPgBrkAfterRB.SetAccessibleRelationMemberOf(&aPgBrkCB); + aPageCollLB.SetAccessibleRelationLabeledBy(&aPageCollCB); + aPageCollLB.SetAccessibleName(aPageCollCB.GetText()); + aPgBrkCB.SetClickHdl(LINK(this, SwTextFlowPage, PageBreakHdl_Impl)); aPgBrkBeforeRB.SetClickHdl( LINK( this, SwTextFlowPage, PageBreakPosHdl_Impl ) ); @@ -1384,7 +1404,7 @@ SwTextFlowPage::SwTextFlowPage( Window* pParent, #ifndef SW_FILEFORMAT_40 const SfxPoolItem *pItem; - if(SFX_ITEM_SET == rSet.GetItemState( SID_HTML_MODE, FALSE,&pItem ) + if(SFX_ITEM_SET == rSet.GetItemState( SID_HTML_MODE, sal_False,&pItem ) && ((const SfxUInt16Item*)pItem)->GetValue() & HTMLMODE_ON) #endif { @@ -1408,16 +1428,16 @@ SfxTabPage* SwTextFlowPage::Create( Window* pParent, return new SwTextFlowPage(pParent, rAttrSet); } -BOOL SwTextFlowPage::FillItemSet( SfxItemSet& rSet ) +sal_Bool SwTextFlowPage::FillItemSet( SfxItemSet& rSet ) { - BOOL bModified = FALSE; + sal_Bool bModified = sal_False; //Ueberschrift wiederholen if(aHeadLineCB.IsChecked() != aHeadLineCB.GetSavedValue() || - String::CreateFromInt32( static_cast< INT32 >(aRepeatHeaderNF.GetValue()) ) != aRepeatHeaderNF.GetSavedValue() ) + String::CreateFromInt32( static_cast< sal_Int32 >(aRepeatHeaderNF.GetValue()) ) != aRepeatHeaderNF.GetSavedValue() ) { bModified |= 0 != rSet.Put( - SfxUInt16Item(FN_PARAM_TABLE_HEADLINE, aHeadLineCB.IsChecked()? USHORT(aRepeatHeaderNF.GetValue()) : 0 )); + SfxUInt16Item(FN_PARAM_TABLE_HEADLINE, aHeadLineCB.IsChecked()? sal_uInt16(aRepeatHeaderNF.GetValue()) : 0 )); } if(aKeepCB.IsChecked() != aKeepCB.GetSavedValue()) bModified |= 0 != rSet.Put( SvxFmtKeepItem( aKeepCB.IsChecked(), RES_KEEP)); @@ -1433,10 +1453,10 @@ BOOL SwTextFlowPage::FillItemSet( SfxItemSet& rSet ) const SwFmtPageDesc* pDesc = (const SwFmtPageDesc*) GetOldItem( rSet, RES_PAGEDESC ); - BOOL bState = aPageCollCB.IsChecked(); + sal_Bool bState = aPageCollCB.IsChecked(); //Wenn Seitenvorlage, dann kein Break - BOOL bPageItemPut = FALSE; + sal_Bool bPageItemPut = sal_False; if ( bState != aPageCollCB.GetSavedValue() || ( bState && aPageCollLB.GetSelectEntryPos() != aPageCollLB.GetSavedValue() ) @@ -1448,18 +1468,18 @@ BOOL SwTextFlowPage::FillItemSet( SfxItemSet& rSet ) { sPage = aPageCollLB.GetSelectEntry(); } - USHORT nPgNum = static_cast< USHORT >(aPageNoNF.GetValue()); + sal_uInt16 nPgNum = static_cast< sal_uInt16 >(aPageNoNF.GetValue()); if ( !pDesc || !pDesc->GetPageDesc() || ( pDesc->GetPageDesc() && ((pDesc->GetPageDesc()->GetName() != sPage) || aPageNoNF.GetSavedValue() != (String)nPgNum))) { - SwFmtPageDesc aFmt( pShell->FindPageDescByName( sPage, TRUE ) ); + SwFmtPageDesc aFmt( pShell->FindPageDescByName( sPage, sal_True ) ); aFmt.SetNumOffset(bState ? nPgNum : 0); bModified |= 0 != rSet.Put( aFmt ); bPageItemPut = bState; } } - BOOL bIsChecked = aPgBrkCB.IsChecked(); + sal_Bool bIsChecked = aPgBrkCB.IsChecked(); if ( !bPageItemPut && ( bState != aPageCollCB.GetSavedValue() || bIsChecked != aPgBrkCB.GetSavedValue() || @@ -1471,7 +1491,7 @@ BOOL SwTextFlowPage::FillItemSet( SfxItemSet& rSet ) if(bIsChecked) { - BOOL bBefore = aPgBrkBeforeRB.IsChecked(); + sal_Bool bBefore = aPgBrkBeforeRB.IsChecked(); if ( aPgBrkRB.IsChecked() ) { @@ -1503,13 +1523,13 @@ BOOL SwTextFlowPage::FillItemSet( SfxItemSet& rSet ) { bModified |= 0 != rSet.Put( SvxFrameDirectionItem( - (SvxFrameDirection)(ULONG)aTextDirectionLB.GetEntryData(aTextDirectionLB.GetSelectEntryPos()) + (SvxFrameDirection)(sal_uLong)aTextDirectionLB.GetEntryData(aTextDirectionLB.GetSelectEntryPos()) , FN_TABLE_BOX_TEXTDIRECTION)); } if(aVertOrientLB.GetSelectEntryPos() != aVertOrientLB.GetSavedValue()) { - USHORT nOrient = USHRT_MAX; + sal_uInt16 nOrient = USHRT_MAX; switch(aVertOrientLB.GetSelectEntryPos()) { case 0 : nOrient = text::VertOrientation::NONE; break; @@ -1528,12 +1548,12 @@ void SwTextFlowPage::Reset( const SfxItemSet& rSet ) { const SfxPoolItem* pItem; SvxHtmlOptions* pHtmlOpt = SvxHtmlOptions::Get(); - BOOL bFlowAllowed = !bHtmlMode || pHtmlOpt->IsPrintLayoutExtension(); + sal_Bool bFlowAllowed = !bHtmlMode || pHtmlOpt->IsPrintLayoutExtension(); if(bFlowAllowed) { // Einfuegen der vorhandenen Seitenvorlagen in die Listbox - const USHORT nCount = pShell->GetPageDescCnt(); - USHORT i; + const sal_uInt16 nCount = pShell->GetPageDescCnt(); + sal_uInt16 i; for( i = 0; i < nCount; ++i) { @@ -1542,17 +1562,17 @@ void SwTextFlowPage::Reset( const SfxItemSet& rSet ) } String aFmtName; - for(i = RES_POOLPAGE_BEGIN; i <= RES_POOLPAGE_REGISTER; ++i) + for(i = RES_POOLPAGE_BEGIN; i < RES_POOLPAGE_END; ++i) if( LISTBOX_ENTRY_NOTFOUND == aPageCollLB.GetEntryPos( aFmtName = SwStyleNameMapper::GetUIName( i, aFmtName ) )) aPageCollLB.InsertEntry( aFmtName ); - if(SFX_ITEM_SET == rSet.GetItemState( RES_KEEP, FALSE, &pItem )) + if(SFX_ITEM_SET == rSet.GetItemState( RES_KEEP, sal_False, &pItem )) { aKeepCB.Check( ((const SvxFmtKeepItem*)pItem)->GetValue() ); aKeepCB.SaveValue(); } - if(SFX_ITEM_SET == rSet.GetItemState( RES_LAYOUT_SPLIT, FALSE, &pItem )) + if(SFX_ITEM_SET == rSet.GetItemState( RES_LAYOUT_SPLIT, sal_False, &pItem )) { aSplitCB.Check( ((const SwFmtLayoutSplit*)pItem)->GetValue() ); } @@ -1562,7 +1582,7 @@ void SwTextFlowPage::Reset( const SfxItemSet& rSet ) aSplitCB.SaveValue(); SplitHdl_Impl(&aSplitCB); - if(SFX_ITEM_SET == rSet.GetItemState( RES_ROW_SPLIT, FALSE, &pItem )) + if(SFX_ITEM_SET == rSet.GetItemState( RES_ROW_SPLIT, sal_False, &pItem )) { aSplitRowCB.Check( ((const SwFmtRowSplit*)pItem)->GetValue() ); } @@ -1572,7 +1592,7 @@ void SwTextFlowPage::Reset( const SfxItemSet& rSet ) if(bPageBreak) { - if(SFX_ITEM_SET == rSet.GetItemState( RES_PAGEDESC, FALSE, &pItem )) + if(SFX_ITEM_SET == rSet.GetItemState( RES_PAGEDESC, sal_False, &pItem )) { String sPageDesc; const SwPageDesc* pDesc = ((const SwFmtPageDesc*)pItem)->GetPageDesc(); @@ -1593,19 +1613,19 @@ void SwTextFlowPage::Reset( const SfxItemSet& rSet ) aPageCollCB.Enable(); aPgBrkCB.Check(); - aPgBrkCB.Check( TRUE ); - aColBrkRB.Check( FALSE ); - aPgBrkBeforeRB.Check( TRUE ); - aPgBrkAfterRB.Check( FALSE ); + aPgBrkCB.Check( sal_True ); + aColBrkRB.Check( sal_False ); + aPgBrkBeforeRB.Check( sal_True ); + aPgBrkAfterRB.Check( sal_False ); } else { aPageCollLB.SetNoSelection(); - aPageCollCB.Check(FALSE); + aPageCollCB.Check(sal_False); } } - if(SFX_ITEM_SET == rSet.GetItemState( RES_BREAK, FALSE, &pItem )) + if(SFX_ITEM_SET == rSet.GetItemState( RES_BREAK, sal_False, &pItem )) { const SvxFmtBreakItem* pPageBreak = (const SvxFmtBreakItem*)pItem; SvxBreak eBreak = (SvxBreak)pPageBreak->GetValue(); @@ -1613,36 +1633,36 @@ void SwTextFlowPage::Reset( const SfxItemSet& rSet ) if ( eBreak != SVX_BREAK_NONE ) { aPgBrkCB.Check(); - aPageCollCB.Enable(FALSE); - aPageCollLB.Enable(FALSE); - aPageNoFT.Enable(FALSE); - aPageNoNF.Enable(FALSE); + aPageCollCB.Enable(sal_False); + aPageCollLB.Enable(sal_False); + aPageNoFT.Enable(sal_False); + aPageNoNF.Enable(sal_False); } switch ( eBreak ) { case SVX_BREAK_PAGE_BEFORE: - aPgBrkRB.Check( TRUE ); - aColBrkRB.Check( FALSE ); - aPgBrkBeforeRB.Check( TRUE ); - aPgBrkAfterRB.Check( FALSE ); + aPgBrkRB.Check( sal_True ); + aColBrkRB.Check( sal_False ); + aPgBrkBeforeRB.Check( sal_True ); + aPgBrkAfterRB.Check( sal_False ); break; case SVX_BREAK_PAGE_AFTER: - aPgBrkRB.Check( TRUE ); - aColBrkRB.Check( FALSE ); - aPgBrkBeforeRB.Check( FALSE ); - aPgBrkAfterRB.Check( TRUE ); + aPgBrkRB.Check( sal_True ); + aColBrkRB.Check( sal_False ); + aPgBrkBeforeRB.Check( sal_False ); + aPgBrkAfterRB.Check( sal_True ); break; case SVX_BREAK_COLUMN_BEFORE: - aPgBrkRB.Check( FALSE ); - aColBrkRB.Check( TRUE ); - aPgBrkBeforeRB.Check( TRUE ); - aPgBrkAfterRB.Check( FALSE ); + aPgBrkRB.Check( sal_False ); + aColBrkRB.Check( sal_True ); + aPgBrkBeforeRB.Check( sal_True ); + aPgBrkAfterRB.Check( sal_False ); break; case SVX_BREAK_COLUMN_AFTER: - aPgBrkRB.Check( FALSE ); - aColBrkRB.Check( TRUE ); - aPgBrkBeforeRB.Check( FALSE ); - aPgBrkAfterRB.Check( TRUE ); + aPgBrkRB.Check( sal_False ); + aColBrkRB.Check( sal_True ); + aPgBrkBeforeRB.Check( sal_False ); + aPgBrkAfterRB.Check( sal_True ); break; default:; //prevent warning } @@ -1657,20 +1677,20 @@ void SwTextFlowPage::Reset( const SfxItemSet& rSet ) } else { - aPgBrkRB.Enable(FALSE); - aColBrkRB.Enable(FALSE); - aPgBrkBeforeRB.Enable(FALSE); - aPgBrkAfterRB.Enable(FALSE); - aKeepCB .Enable(FALSE); - aSplitCB.Enable(FALSE); - aPgBrkCB.Enable(FALSE); - aPageCollCB.Enable(FALSE); - aPageCollLB.Enable(FALSE); + aPgBrkRB.Enable(sal_False); + aColBrkRB.Enable(sal_False); + aPgBrkBeforeRB.Enable(sal_False); + aPgBrkAfterRB.Enable(sal_False); + aKeepCB .Enable(sal_False); + aSplitCB.Enable(sal_False); + aPgBrkCB.Enable(sal_False); + aPageCollCB.Enable(sal_False); + aPageCollLB.Enable(sal_False); } - if(SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_TABLE_HEADLINE, FALSE, &pItem )) + if(SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_TABLE_HEADLINE, sal_False, &pItem )) { - USHORT nRep = ((const SfxUInt16Item*)pItem)->GetValue(); + sal_uInt16 nRep = ((const SfxUInt16Item*)pItem)->GetValue(); aHeadLineCB.Check( nRep > 0 ); aHeadLineCB.SaveValue(); aRepeatHeaderNF.SetValue( nRep ); @@ -1678,14 +1698,14 @@ void SwTextFlowPage::Reset( const SfxItemSet& rSet ) } if ( rSet.GetItemState(FN_TABLE_BOX_TEXTDIRECTION) > SFX_ITEM_AVAILABLE ) { - ULONG nDirection = ((const SvxFrameDirectionItem&)rSet.Get(FN_TABLE_BOX_TEXTDIRECTION)).GetValue(); + sal_uLong nDirection = ((const SvxFrameDirectionItem&)rSet.Get(FN_TABLE_BOX_TEXTDIRECTION)).GetValue(); aTextDirectionLB.SelectEntryPos(aTextDirectionLB.GetEntryPos( (const void*)nDirection )); } if ( rSet.GetItemState(FN_TABLE_SET_VERT_ALIGN) > SFX_ITEM_AVAILABLE ) { - USHORT nVert = ((const SfxUInt16Item&)rSet.Get(FN_TABLE_SET_VERT_ALIGN)).GetValue(); - USHORT nPos = 0; + sal_uInt16 nVert = ((const SfxUInt16Item&)rSet.Get(FN_TABLE_SET_VERT_ALIGN)).GetValue(); + sal_uInt16 nPos = 0; switch(nVert) { case text::VertOrientation::NONE: nPos = 0; break; @@ -1715,8 +1735,8 @@ void SwTextFlowPage::SetShell(SwWrtShell* pSh) bHtmlMode = 0 != (::GetHtmlMode(pShell->GetView().GetDocShell()) & HTMLMODE_ON); if(bHtmlMode) { - aPageNoNF.Enable(FALSE); - aPageNoFT.Enable(FALSE); + aPageNoNF.Enable(sal_False); + aPageNoFT.Enable(sal_False); } } @@ -1733,7 +1753,7 @@ IMPL_LINK( SwTextFlowPage, PageBreakHdl_Impl, CheckBox*, EMPTYARG ) { aPageCollCB.Enable(); - BOOL bEnable = aPageCollCB.IsChecked() && + sal_Bool bEnable = aPageCollCB.IsChecked() && aPageCollLB.GetEntryCount(); aPageCollLB.Enable(bEnable); if(!bHtmlMode) @@ -1745,26 +1765,26 @@ IMPL_LINK( SwTextFlowPage, PageBreakHdl_Impl, CheckBox*, EMPTYARG ) } else { - aPageCollCB.Check( FALSE ); - aPageCollCB.Enable(FALSE); - aPageCollLB.Enable(FALSE); - aPageNoFT.Enable(FALSE); - aPageNoNF.Enable(FALSE); - aPgBrkRB. Enable(FALSE); - aColBrkRB. Enable(FALSE); - aPgBrkBeforeRB. Enable(FALSE); - aPgBrkAfterRB. Enable(FALSE); + aPageCollCB.Check( sal_False ); + aPageCollCB.Enable(sal_False); + aPageCollLB.Enable(sal_False); + aPageNoFT.Enable(sal_False); + aPageNoNF.Enable(sal_False); + aPgBrkRB. Enable(sal_False); + aColBrkRB. Enable(sal_False); + aPgBrkBeforeRB. Enable(sal_False); + aPgBrkAfterRB. Enable(sal_False); } return 0; } IMPL_LINK( SwTextFlowPage, ApplyCollClickHdl_Impl, CheckBox*, EMPTYARG ) { - BOOL bEnable = FALSE; + sal_Bool bEnable = sal_False; if ( aPageCollCB.IsChecked() && aPageCollLB.GetEntryCount() ) { - bEnable = TRUE; + bEnable = sal_True; aPageCollLB.SelectEntryPos( 0 ); } else @@ -1788,7 +1808,7 @@ IMPL_LINK( SwTextFlowPage, PageBreakPosHdl_Impl, RadioButton*, pBtn ) { aPageCollCB.Enable(); - BOOL bEnable = aPageCollCB.IsChecked() && + sal_Bool bEnable = aPageCollCB.IsChecked() && aPageCollLB.GetEntryCount(); aPageCollLB.Enable(bEnable); @@ -1800,11 +1820,11 @@ IMPL_LINK( SwTextFlowPage, PageBreakPosHdl_Impl, RadioButton*, pBtn ) } else if ( pBtn == &aPgBrkAfterRB ) { - aPageCollCB .Check( FALSE ); - aPageCollCB .Enable(FALSE); - aPageCollLB .Enable(FALSE); - aPageNoFT .Enable(FALSE); - aPageNoNF .Enable(FALSE); + aPageCollCB .Check( sal_False ); + aPageCollCB .Enable(sal_False); + aPageCollLB .Enable(sal_False); + aPageNoFT .Enable(sal_False); + aPageNoNF .Enable(sal_False); } } return 0; @@ -1814,11 +1834,11 @@ IMPL_LINK( SwTextFlowPage, PageBreakTypeHdl_Impl, RadioButton*, pBtn ) { if ( pBtn == &aColBrkRB || aPgBrkAfterRB.IsChecked() ) { - aPageCollCB .Check(FALSE); - aPageCollCB .Enable(FALSE); - aPageCollLB .Enable(FALSE); - aPageNoFT .Enable(FALSE); - aPageNoNF .Enable(FALSE); + aPageCollCB .Check(sal_False); + aPageCollCB .Enable(sal_False); + aPageCollLB .Enable(sal_False); + aPageNoFT .Enable(sal_False); + aPageNoNF .Enable(sal_False); } else if ( aPgBrkBeforeRB.IsChecked() ) PageBreakPosHdl_Impl( &aPgBrkBeforeRB ); @@ -1833,7 +1853,7 @@ IMPL_LINK( SwTextFlowPage, SplitHdl_Impl, CheckBox*, pBox ) IMPL_LINK( SwTextFlowPage, SplitRowHdl_Impl, TriStateBox*, pBox ) { - pBox->EnableTriState(FALSE); + pBox->EnableTriState(sal_False); return 0; } @@ -1846,7 +1866,7 @@ IMPL_LINK( SwTextFlowPage, HeadLineCBClickHdl, void*, EMPTYARG ) void SwTextFlowPage::DisablePageBreak() { - bPageBreak = FALSE; + bPageBreak = sal_False; aPgBrkCB .Disable(); aPgBrkRB .Disable(); aColBrkRB .Disable(); diff --git a/sw/source/ui/table/tabledlg.hrc b/sw/source/ui/table/tabledlg.hrc index 1640c623d9..395613dac4 100644 --- a/sw/source/ui/table/tabledlg.hrc +++ b/sw/source/ui/table/tabledlg.hrc @@ -108,3 +108,4 @@ #define FT_VERTORIENT 150 #define LB_VERTORIENT 151 + diff --git a/sw/source/ui/table/tabledlg.src b/sw/source/ui/table/tabledlg.src index f35776ed7b..b1c2f2d846 100644 --- a/sw/source/ui/table/tabledlg.src +++ b/sw/source/ui/table/tabledlg.src @@ -98,6 +98,7 @@ TabPage TP_FORMAT_TABLE }; Edit ED_NAME { + HelpID = "sw:Edit:TP_FORMAT_TABLE:ED_NAME"; Border = TRUE ; Pos = MAP_APPFONT ( 75 , 14 ) ; Size = MAP_APPFONT ( 112 , 12 ) ; @@ -111,6 +112,7 @@ TabPage TP_FORMAT_TABLE }; MetricField ED_WIDTH { + HelpID = "sw:MetricField:TP_FORMAT_TABLE:ED_WIDTH"; Border = TRUE ; Pos = MAP_APPFONT ( 75 , 30 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -129,6 +131,7 @@ TabPage TP_FORMAT_TABLE }; CheckBox CB_REL_WIDTH { + HelpID = "sw:CheckBox:TP_FORMAT_TABLE:CB_REL_WIDTH"; Pos = MAP_APPFONT ( 118 , 32 ) ; Size = MAP_APPFONT ( 69 , 10 ) ; TabStop = TRUE ; @@ -142,6 +145,7 @@ TabPage TP_FORMAT_TABLE }; RadioButton RB_FULL { + HelpID = "sw:RadioButton:TP_FORMAT_TABLE:RB_FULL"; Pos = MAP_APPFONT ( 202 , 14 ) ; Size = MAP_APPFONT ( 50 , 10 ) ; TabStop = TRUE ; @@ -149,6 +153,7 @@ TabPage TP_FORMAT_TABLE }; RadioButton RB_LEFT { + HelpID = "sw:RadioButton:TP_FORMAT_TABLE:RB_LEFT"; Pos = MAP_APPFONT ( 202 , 28 ) ; Size = MAP_APPFONT ( 50 , 10 ) ; Text [ en-US ] = "~Left" ; @@ -156,6 +161,7 @@ TabPage TP_FORMAT_TABLE }; RadioButton RB_FROM_LEFT { + HelpID = "sw:RadioButton:TP_FORMAT_TABLE:RB_FROM_LEFT"; Pos = MAP_APPFONT ( 202 , 42 ) ; Size = MAP_APPFONT ( 50 , 10 ) ; TabStop = TRUE ; @@ -163,6 +169,7 @@ TabPage TP_FORMAT_TABLE }; RadioButton RB_RIGHT { + HelpID = "sw:RadioButton:TP_FORMAT_TABLE:RB_RIGHT"; Pos = MAP_APPFONT ( 202 , 56 ) ; Size = MAP_APPFONT ( 50 , 10 ) ; Text [ en-US ] = "R~ight" ; @@ -170,6 +177,7 @@ TabPage TP_FORMAT_TABLE }; RadioButton RB_CENTER { + HelpID = "sw:RadioButton:TP_FORMAT_TABLE:RB_CENTER"; Pos = MAP_APPFONT ( 202 , 70 ) ; Size = MAP_APPFONT ( 50 , 10 ) ; Text [ en-US ] = "~Center" ; @@ -177,6 +185,7 @@ TabPage TP_FORMAT_TABLE }; RadioButton RB_FREE { + HelpID = "sw:RadioButton:TP_FORMAT_TABLE:RB_FREE"; Pos = MAP_APPFONT ( 202 , 84 ) ; Size = MAP_APPFONT ( 50 , 10 ) ; TabStop = TRUE ; @@ -202,6 +211,7 @@ TabPage TP_FORMAT_TABLE }; MetricField ED_LEFT_DIST { + HelpID = "sw:MetricField:TP_FORMAT_TABLE:ED_LEFT_DIST"; Pos = MAP_APPFONT ( 147 , 59 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; Border = TRUE ; @@ -226,6 +236,7 @@ TabPage TP_FORMAT_TABLE MetricField ED_RIGHT_DIST { + HelpID = "sw:MetricField:TP_FORMAT_TABLE:ED_RIGHT_DIST"; Pos = MAP_APPFONT ( 147 , 75 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; Border = TRUE ; @@ -249,6 +260,7 @@ TabPage TP_FORMAT_TABLE }; MetricField ED_TOP_DIST { + HelpID = "sw:MetricField:TP_FORMAT_TABLE:ED_TOP_DIST"; Pos = MAP_APPFONT ( 147 , 91 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; Border = TRUE ; @@ -272,6 +284,7 @@ TabPage TP_FORMAT_TABLE }; MetricField ED_BOTTOM_DIST { + HelpID = "sw:MetricField:TP_FORMAT_TABLE:ED_BOTTOM_DIST"; Border = TRUE ; Pos = MAP_APPFONT ( 147 , 107 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -303,6 +316,7 @@ TabPage TP_FORMAT_TABLE }; ListBox LB_TEXTDIRECTION { + HelpID = "sw:ListBox:TP_FORMAT_TABLE:LB_TEXTDIRECTION"; Border = TRUE ; Pos = MAP_APPFONT ( 75 , 136 ) ; Size = MAP_APPFONT ( 176 , 50 ) ; @@ -329,6 +343,7 @@ TabPage TP_TABLE_COLUMN Hide = TRUE; CheckBox CB_MOD_TBL { + HelpID = "sw:CheckBox:TP_TABLE_COLUMN:CB_MOD_TBL"; Pos = MAP_APPFONT ( 6 , 6 ) ; Size = MAP_APPFONT ( 180 , 10 ) ; TabStop = TRUE ; @@ -336,6 +351,7 @@ TabPage TP_TABLE_COLUMN }; CheckBox CB_PROP { + HelpID = "sw:CheckBox:TP_TABLE_COLUMN:CB_PROP"; Pos = MAP_APPFONT ( 6 , 20 ) ; Size = MAP_APPFONT ( 180 , 10 ) ; TabStop = TRUE ; @@ -349,6 +365,7 @@ TabPage TP_TABLE_COLUMN }; MetricField ED_SPACE { + HelpID = "sw:MetricField:TP_TABLE_COLUMN:ED_SPACE"; ReadOnly = TRUE ; Border = TRUE ; Pos = MAP_APPFONT ( 95 , 34 ) ; @@ -365,6 +382,7 @@ TabPage TP_TABLE_COLUMN }; ImageButton COL_BTN_DOWN { + HelpID = "sw:ImageButton:TP_TABLE_COLUMN:COL_BTN_DOWN"; Disable = TRUE ; Pos = MAP_APPFONT ( 12 , 65 ) ; Size = MAP_APPFONT ( 10 , 10 ) ; @@ -373,6 +391,7 @@ TabPage TP_TABLE_COLUMN }; ImageButton COL_BTN_UP { + HelpID = "sw:ImageButton:TP_TABLE_COLUMN:COL_BTN_UP"; Disable = TRUE ; Pos = MAP_APPFONT ( 234 , 65 ) ; Size = MAP_APPFONT ( 10 , 10 ) ; @@ -391,6 +410,7 @@ TabPage TP_TABLE_COLUMN }; MetricField COL_MF_1 { + HelpID = "sw:MetricField:TP_TABLE_COLUMN:COL_MF_1"; Disable = TRUE ; Border = TRUE ; Pos = MAP_APPFONT ( 13 , 81 ) ; @@ -418,6 +438,7 @@ TabPage TP_TABLE_COLUMN }; MetricField COL_MF_2 { + HelpID = "sw:MetricField:TP_TABLE_COLUMN:COL_MF_2"; Disable = TRUE ; Border = TRUE ; Pos = MAP_APPFONT ( 52 , 81 ) ; @@ -445,6 +466,7 @@ TabPage TP_TABLE_COLUMN }; MetricField COL_MF_3 { + HelpID = "sw:MetricField:TP_TABLE_COLUMN:COL_MF_3"; Disable = TRUE ; Border = TRUE ; Pos = MAP_APPFONT ( 91 , 81 ) ; @@ -472,6 +494,7 @@ TabPage TP_TABLE_COLUMN }; MetricField COL_MF_4 { + HelpID = "sw:MetricField:TP_TABLE_COLUMN:COL_MF_4"; Disable = TRUE ; Border = TRUE ; Pos = MAP_APPFONT ( 130 , 81 ) ; @@ -499,6 +522,7 @@ TabPage TP_TABLE_COLUMN }; MetricField COL_MF_5 { + HelpID = "sw:MetricField:TP_TABLE_COLUMN:COL_MF_5"; Disable = TRUE ; Border = TRUE ; Pos = MAP_APPFONT ( 169 , 81 ) ; @@ -526,6 +550,7 @@ TabPage TP_TABLE_COLUMN }; MetricField COL_MF_6 { + HelpID = "sw:MetricField:TP_TABLE_COLUMN:COL_MF_6"; Disable = TRUE ; Border = TRUE ; Pos = MAP_APPFONT ( 208 , 81 ) ; @@ -568,6 +593,7 @@ TabPage TP_TABLE_TEXTFLOW }; CheckBox CB_PAGEBREAK { + HelpID = "sw:CheckBox:TP_TABLE_TEXTFLOW:CB_PAGEBREAK"; // Disable = TRUE; Pos = MAP_APPFONT ( 12 , 14 ) ; Size = MAP_APPFONT ( 90 , 8 ) ; @@ -577,6 +603,7 @@ TabPage TP_TABLE_TEXTFLOW }; RadioButton RB_BREAKPAGE { + HelpID = "sw:RadioButton:TP_TABLE_TEXTFLOW:RB_BREAKPAGE"; Pos = MAP_APPFONT ( 105 , 14 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; Text [ en-US ] = "~Page" ; @@ -585,6 +612,7 @@ TabPage TP_TABLE_TEXTFLOW }; RadioButton RB_BREAKCOLUMN { + HelpID = "sw:RadioButton:TP_TABLE_TEXTFLOW:RB_BREAKCOLUMN"; // Disable = TRUE; Pos = MAP_APPFONT ( 178 , 14 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; @@ -592,6 +620,7 @@ TabPage TP_TABLE_TEXTFLOW }; RadioButton RB_PAGEBREAKBEFORE { + HelpID = "sw:RadioButton:TP_TABLE_TEXTFLOW:RB_PAGEBREAKBEFORE"; // Disable = TRUE; Pos = MAP_APPFONT ( 105 , 28 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; @@ -601,6 +630,7 @@ TabPage TP_TABLE_TEXTFLOW }; RadioButton RB_PAGEBREAKAFTER { + HelpID = "sw:RadioButton:TP_TABLE_TEXTFLOW:RB_PAGEBREAKAFTER"; // Disable = TRUE; Pos = MAP_APPFONT ( 178 , 28 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; @@ -608,6 +638,7 @@ TabPage TP_TABLE_TEXTFLOW }; CheckBox CB_PAGECOLL { + HelpID = "sw:CheckBox:TP_TABLE_TEXTFLOW:CB_PAGECOLL"; // Disable = TRUE; Pos = MAP_APPFONT ( 12 , 44 ) ; Size = MAP_APPFONT ( 90 , 10 ) ; @@ -617,6 +648,7 @@ TabPage TP_TABLE_TEXTFLOW }; ListBox LB_PAGECOLL { + HelpID = "sw:ListBox:TP_TABLE_TEXTFLOW:LB_PAGECOLL"; Pos = MAP_APPFONT ( 105 , 42 ) ; Size = MAP_APPFONT ( 61 , 50 ) ; TabStop = TRUE ; @@ -630,6 +662,7 @@ TabPage TP_TABLE_TEXTFLOW }; NumericField NF_PAGENUM { + HelpID = "sw:NumericField:TP_TABLE_TEXTFLOW:NF_PAGENUM"; Border = TRUE ; Pos = MAP_APPFONT ( 222 , 42 ) ; Size = MAP_APPFONT ( 26 , 12 ) ; @@ -645,6 +678,7 @@ TabPage TP_TABLE_TEXTFLOW }; CheckBox CB_SPLIT { + HelpID = "sw:CheckBox:TP_TABLE_TEXTFLOW:CB_SPLIT"; Pos = MAP_APPFONT ( 12 , 58 ) ; Size = MAP_APPFONT ( 236 , 10 ) ; TabStop = TRUE ; @@ -652,6 +686,7 @@ TabPage TP_TABLE_TEXTFLOW }; TriStateBox CB_SPLIT_ROW { + HelpID = "sw:TriStateBox:TP_TABLE_TEXTFLOW:CB_SPLIT_ROW"; Pos = MAP_APPFONT ( 21 , 71 ) ; Size = MAP_APPFONT ( 227 , 10 ) ; TabStop = TRUE ; @@ -659,6 +694,7 @@ TabPage TP_TABLE_TEXTFLOW }; CheckBox CB_KEEP { + HelpID = "sw:CheckBox:TP_TABLE_TEXTFLOW:CB_KEEP"; Pos = MAP_APPFONT ( 12 , 85 ) ; Size = MAP_APPFONT ( 236 , 10 ) ; Text [ en-US ] = "~Keep with next paragraph" ; @@ -666,6 +702,7 @@ TabPage TP_TABLE_TEXTFLOW }; CheckBox CB_HEADLINE { + HelpID = "sw:CheckBox:TP_TABLE_TEXTFLOW:CB_HEADLINE"; Pos = MAP_APPFONT ( 12 , 99 ) ; Size = MAP_APPFONT ( 236 , 10 ) ; TabStop = TRUE ; @@ -679,6 +716,7 @@ TabPage TP_TABLE_TEXTFLOW }; NumericField NF_REPEAT_HEADER { + HelpID = "sw:NumericField:TP_TABLE_TEXTFLOW:NF_REPEAT_HEADER"; Border = TRUE ; Pos = MAP_APPFONT ( 131 , 113 ) ; Size = MAP_APPFONT ( 28 , 12 ) ; @@ -703,6 +741,7 @@ TabPage TP_TABLE_TEXTFLOW }; ListBox LB_TEXTDIRECTION { + HelpID = "sw:ListBox:TP_TABLE_TEXTFLOW:LB_TEXTDIRECTION"; Pos = MAP_APPFONT ( 85 , 130 ) ; Size = MAP_APPFONT ( 163 , 50 ) ; DropDown = TRUE; @@ -729,6 +768,7 @@ TabPage TP_TABLE_TEXTFLOW }; ListBox LB_VERTORIENT { + HelpID = "sw:ListBox:TP_TABLE_TEXTFLOW:LB_VERTORIENT"; Pos = MAP_APPFONT ( 85 , 162 ) ; Size = MAP_APPFONT ( 61 , 50 ) ; DropDown = TRUE; @@ -745,4 +785,3 @@ InfoBox MSG_WRONG_TABLENAME { Message [ en-US ] = "The name of the table must not contain spaces." ; }; - diff --git a/sw/source/ui/table/tablemgr.cxx b/sw/source/ui/table/tablemgr.cxx index adb8d42707..6991074cf4 100644 --- a/sw/source/ui/table/tablemgr.cxx +++ b/sw/source/ui/table/tablemgr.cxx @@ -79,7 +79,7 @@ void SwTableFUNC::ColWidthDlg( Window *pParent ) --------------------------------------------------------------------*/ -SwTwips SwTableFUNC::GetColWidth(USHORT nNum) const +SwTwips SwTableFUNC::GetColWidth(sal_uInt16 nNum) const { SwTwips nWidth = 0; @@ -95,10 +95,10 @@ SwTwips SwTableFUNC::GetColWidth(USHORT nNum) const else { SwTwips nRValid = nNum < GetColCount() ? - aCols[(USHORT)GetRightSeparator((int)nNum)]: + aCols[(sal_uInt16)GetRightSeparator((int)nNum)]: aCols.GetRight(); SwTwips nLValid = nNum ? - aCols[(USHORT)GetRightSeparator((int)nNum - 1)]: + aCols[(sal_uInt16)GetRightSeparator((int)nNum - 1)]: aCols.GetLeft(); nWidth = nRValid - nLValid; } @@ -111,7 +111,7 @@ SwTwips SwTableFUNC::GetColWidth(USHORT nNum) const -SwTwips SwTableFUNC::GetMaxColWidth( USHORT nNum ) const +SwTwips SwTableFUNC::GetMaxColWidth( sal_uInt16 nNum ) const { OSL_ENSURE(nNum <= aCols.Count(), "Index out of Area"); @@ -133,34 +133,34 @@ SwTwips SwTableFUNC::GetMaxColWidth( USHORT nNum ) const -void SwTableFUNC::SetColWidth(USHORT nNum, SwTwips nNewWidth ) +void SwTableFUNC::SetColWidth(sal_uInt16 nNum, SwTwips nNewWidth ) { // aktuelle Breite setzen // alle folgenden Verschieben - BOOL bCurrentOnly = FALSE; + sal_Bool bCurrentOnly = sal_False; if ( aCols.Count() > 0 ) { if(aCols.Count() != GetColCount()) - bCurrentOnly = TRUE; + bCurrentOnly = sal_True; SwTwips nWidth = GetColWidth(nNum); int nDiff = (int)(nNewWidth - nWidth); if( !nNum ) - aCols[ static_cast< USHORT >(GetRightSeparator(0)) ] += nDiff; + aCols[ static_cast< sal_uInt16 >(GetRightSeparator(0)) ] += nDiff; else if( nNum < GetColCount() ) { if(nDiff < GetColWidth(nNum + 1) - MINLAY) - aCols[ static_cast< USHORT >(GetRightSeparator(nNum)) ] += nDiff; + aCols[ static_cast< sal_uInt16 >(GetRightSeparator(nNum)) ] += nDiff; else { int nDiffLeft = nDiff - (int)GetColWidth(nNum + 1) + (int)MINLAY; - aCols[ static_cast< USHORT >(GetRightSeparator(nNum)) ] += (nDiff - nDiffLeft); - aCols[ static_cast< USHORT >(GetRightSeparator(nNum - 1)) ] -= nDiffLeft; + aCols[ static_cast< sal_uInt16 >(GetRightSeparator(nNum)) ] += (nDiff - nDiffLeft); + aCols[ static_cast< sal_uInt16 >(GetRightSeparator(nNum - 1)) ] -= nDiffLeft; } } else - aCols[ static_cast< USHORT >(GetRightSeparator(nNum-1)) ] -= nDiff; + aCols[ static_cast< sal_uInt16 >(GetRightSeparator(nNum-1)) ] -= nDiff; } else aCols.SetRight( Min( nNewWidth, aCols.GetRightMax()) ); @@ -182,7 +182,7 @@ void SwTableFUNC::InitTabCols() -SwTableFUNC::SwTableFUNC(SwWrtShell *pShell, BOOL bCopyFmt) +SwTableFUNC::SwTableFUNC(SwWrtShell *pShell, sal_Bool bCopyFmt) : pFmt(pShell->GetTableFmt()), pSh(pShell), bCopy(bCopyFmt) @@ -229,11 +229,11 @@ uno::Reference< frame::XModel > SwTableFUNC::InsertChart( aName = pSh->GetTableFmt()->GetName(); // insert node before table pSh->MoveTable( fnTableCurr, fnTableStart ); - pSh->Up( FALSE, 1, FALSE ); + pSh->Up( sal_False, 1, sal_False ); if ( pSh->IsCrsrInTbl() ) { if ( aName != pSh->GetTableFmt()->GetName() ) - pSh->Down( FALSE, 1, FALSE ); // two adjacent tables + pSh->Down( sal_False, 1, sal_False ); // two adjacent tables } pSh->SplitNode(); } @@ -274,7 +274,7 @@ uno::Reference< frame::XModel > SwTableFUNC::InsertChart( if ( !pClient ) { pClient = new SwOleClient( &pSh->GetView(), &pSh->GetView().GetEditWin(), aEmbObjRef ); - pSh->SetCheckForOLEInCaption( TRUE ); + pSh->SetCheckForOLEInCaption( sal_True ); } pSh->CalcAndSetScale( aEmbObjRef ); //#50270# Error brauchen wir nicht handeln, das erledigt das @@ -340,11 +340,11 @@ uno::Reference< frame::XModel > SwTableFUNC::InsertChart( return xChartModel; } -USHORT SwTableFUNC::GetCurColNum() const +sal_uInt16 SwTableFUNC::GetCurColNum() const { - USHORT nPos = pSh->GetCurTabColNum(); - USHORT nCount = 0; - for(USHORT i = 0; i < nPos; i++ ) + sal_uInt16 nPos = pSh->GetCurTabColNum(); + sal_uInt16 nCount = 0; + for(sal_uInt16 i = 0; i < nPos; i++ ) if(aCols.IsHidden(i)) nCount ++; return nPos - nCount; @@ -353,10 +353,10 @@ USHORT SwTableFUNC::GetCurColNum() const -USHORT SwTableFUNC::GetColCount() const +sal_uInt16 SwTableFUNC::GetColCount() const { - USHORT nCount = 0; - for(USHORT i = 0; i < aCols.Count(); i++ ) + sal_uInt16 nCount = 0; + for(sal_uInt16 i = 0; i < aCols.Count(); i++ ) if(aCols.IsHidden(i)) nCount ++; return aCols.Count() - nCount; @@ -370,7 +370,7 @@ int SwTableFUNC::GetRightSeparator(int nNum) const int i = 0; while( nNum >= 0 ) { - if( !aCols.IsHidden( static_cast< USHORT >(i)) ) + if( !aCols.IsHidden( static_cast< sal_uInt16 >(i)) ) nNum--; i++; } diff --git a/sw/source/ui/table/tablepg.hxx b/sw/source/ui/table/tablepg.hxx index 7a9c39bd67..90d528fae1 100644 --- a/sw/source/ui/table/tablepg.hxx +++ b/sw/source/ui/table/tablepg.hxx @@ -29,7 +29,7 @@ #define _SWTABLEPG_HXX #include <sfx2/tabdlg.hxx> #include <vcl/fixed.hxx> -#include <vcl/imagebtn.hxx> +#include <vcl/button.hxx> #include <vcl/lstbox.hxx> #include <actctrl.hxx> #include "prcntfld.hxx" @@ -42,7 +42,7 @@ class SwTableRep; struct TColumn { SwTwips nWidth; - BOOL bVisible; + sal_Bool bVisible; }; class SwFormatTablePage : public SfxTabPage @@ -79,10 +79,10 @@ class SwFormatTablePage : public SfxTabPage SwTableRep* pTblData; SwTwips nSaveWidth; SwTwips nMinTableWidth; - USHORT nOldAlign; - BOOL bModified; - BOOL bFull:1; - BOOL bHtmlMode : 1; + sal_uInt16 nOldAlign; + sal_Bool bModified; + sal_Bool bFull:1; + sal_Bool bHtmlMode : 1; void Init(); void ModifyHdl( Edit* pEdit ); @@ -99,7 +99,7 @@ public: SwFormatTablePage( Window* pParent, const SfxItemSet& rSet ); static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet); - virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual sal_Bool FillItemSet( SfxItemSet& rSet ); virtual void Reset( const SfxItemSet& rSet ); virtual void ActivatePage( const SfxItemSet& rSet ); virtual int DeactivatePage( SfxItemSet* pSet = 0 ); @@ -116,7 +116,7 @@ class SwTableColumnPage : public SfxTabPage CheckBox aProportionalCB; FixedText aSpaceFT; MetricField aSpaceED; - + FixedLine aColFL; ImageButton aUpBtn; FixedText aFT1; PercentField aMF1; @@ -131,31 +131,30 @@ class SwTableColumnPage : public SfxTabPage FixedText aFT6; PercentField aMF6; ImageButton aDownBtn; - FixedLine aColFL; SwTableRep* pTblData; PercentField* pFieldArr[MET_FIELDS]; FixedText* pTextArr[MET_FIELDS]; SwTwips nTableWidth; SwTwips nMinWidth; - USHORT nNoOfCols; - USHORT nNoOfVisibleCols; + sal_uInt16 nNoOfCols; + sal_uInt16 nNoOfVisibleCols; //Breite merken, wenn auf autom. Ausrichtung gestellt wird - USHORT aValueTbl[MET_FIELDS];//primaere Zuordnung der MetricFields - BOOL bModified:1; - BOOL bModifyTbl:1; - BOOL bPercentMode:1; + sal_uInt16 aValueTbl[MET_FIELDS];//primaere Zuordnung der MetricFields + sal_Bool bModified:1; + sal_Bool bModifyTbl:1; + sal_Bool bPercentMode:1; - void Init(BOOL bWeb); + void Init(sal_Bool bWeb); DECL_LINK( AutoClickHdl, CheckBox * ); void ModifyHdl( PercentField* pEdit ); DECL_LINK( UpHdl, PercentField * ); DECL_LINK( DownHdl, PercentField * ); DECL_LINK( LoseFocusHdl, PercentField * ); DECL_LINK( ModeHdl, CheckBox * ); - void UpdateCols( USHORT nAktPos ); - SwTwips GetVisibleWidth(USHORT nPos); - void SetVisibleWidth(USHORT nPos, SwTwips nNewWidth); + void UpdateCols( sal_uInt16 nAktPos ); + SwTwips GetVisibleWidth(sal_uInt16 nPos); + void SetVisibleWidth(sal_uInt16 nPos, SwTwips nNewWidth); using TabPage::ActivatePage; using TabPage::DeactivatePage; @@ -165,7 +164,7 @@ public: ~SwTableColumnPage(); static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet); - virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual sal_Bool FillItemSet( SfxItemSet& rSet ); virtual void Reset( const SfxItemSet& rSet ); virtual void ActivatePage( const SfxItemSet& rSet ); virtual int DeactivatePage( SfxItemSet* pSet = 0 ); @@ -205,8 +204,8 @@ class SwTextFlowPage : public SfxTabPage SwWrtShell* pShell; - BOOL bPageBreak; - BOOL bHtmlMode; + sal_Bool bPageBreak; + sal_Bool bHtmlMode; DECL_LINK( PageBreakHdl_Impl, CheckBox* ); @@ -223,7 +222,7 @@ class SwTextFlowPage : public SfxTabPage public: static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet); - virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual sal_Bool FillItemSet( SfxItemSet& rSet ); virtual void Reset( const SfxItemSet& rSet ); void SetShell(SwWrtShell* pSh); diff --git a/sw/source/ui/table/tautofmt.cxx b/sw/source/ui/table/tautofmt.cxx index 43c6afb09d..bf7fb8de2d 100644 --- a/sw/source/ui/table/tautofmt.cxx +++ b/sw/source/ui/table/tautofmt.cxx @@ -77,7 +77,7 @@ private: VirtualDevice aVD; SvtScriptedTextHelper aScriptedText; svx::frame::Array maArray; /// Implementation to draw the frame borders. - BOOL bFitWidth; + sal_Bool bFitWidth; bool mbRTL; Size aPrvSize; long nLabelColWidth; @@ -99,19 +99,19 @@ private: //------------------------------------------- void Init (); void DoPaint ( const Rectangle& rRect ); - void CalcCellArray ( BOOL bFitWidth ); + void CalcCellArray ( sal_Bool bFitWidth ); void CalcLineMap (); void PaintCells (); - BYTE GetFormatIndex( size_t nCol, size_t nRow ) const; + sal_uInt8 GetFormatIndex( size_t nCol, size_t nRow ) const; const SvxBoxItem& GetBoxItem( size_t nCol, size_t nRow ) const; void DrawString( size_t nCol, size_t nRow ); void DrawStrings(); void DrawBackground(); - void MakeFonts ( BYTE nIndex, Font& rFont, Font& rCJKFont, Font& rCTLFont ); - String MakeNumberString( String cellString, BOOL bAddDec ); + void MakeFonts ( sal_uInt8 nIndex, Font& rFont, Font& rCJKFont, Font& rCTLFont ); + String MakeNumberString( String cellString, sal_Bool bAddDec ); }; //======================================================================== @@ -170,18 +170,18 @@ SwStringInputDlg::~SwStringInputDlg() SwAutoFormatDlg::SwAutoFormatDlg( Window* pParent, SwWrtShell* pWrtShell, - BOOL bSetAutoFormat, const SwTableAutoFmt* pSelFmt ) + sal_Bool bSetAutoFormat, const SwTableAutoFmt* pSelFmt ) : SfxModalDialog( pParent, SW_RES( DLG_AUTOFMT_TABLE ) ), // aFlFormat ( this, SW_RES( FL_FORMAT ) ), aLbFormat ( this, SW_RES( LB_FORMAT ) ), + aFlFormats ( this, SW_RES( FL_FORMATS ) ), aBtnNumFormat ( this, SW_RES( BTN_NUMFORMAT ) ), aBtnBorder ( this, SW_RES( BTN_BORDER ) ), aBtnFont ( this, SW_RES( BTN_FONT ) ), aBtnPattern ( this, SW_RES( BTN_PATTERN ) ), aBtnAlignment ( this, SW_RES( BTN_ALIGNMENT ) ), - aFlFormats ( this, SW_RES( FL_FORMATS ) ), aBtnOk ( this, SW_RES( BTN_OK ) ), aBtnCancel ( this, SW_RES( BTN_CANCEL ) ), aBtnHelp ( this, SW_RES( BTN_HELP ) ), @@ -201,7 +201,7 @@ SwAutoFormatDlg::SwAutoFormatDlg( Window* pParent, SwWrtShell* pWrtShell, pShell ( pWrtShell ), nIndex ( 0 ), nDfltStylePos ( 0 ), - bCoreDataChanged( FALSE ), + bCoreDataChanged( sal_False ), bSetAutoFmt ( bSetAutoFormat ) { pTableTbl = new SwTableAutoFmtTbl; @@ -261,7 +261,7 @@ void SwAutoFormatDlg::Init( const SwTableAutoFmt* pSelFmt ) nIndex = 255; } - for( BYTE i = 0, nCount = (BYTE)pTableTbl->Count(); i < nCount; i++ ) + for( sal_uInt8 i = 0, nCount = (sal_uInt8)pTableTbl->Count(); i < nCount; i++ ) { SwTableAutoFmt* pFmt = (*pTableTbl)[ i ]; aLbFormat.InsertEntry( pFmt->GetName() ); @@ -276,7 +276,7 @@ void SwAutoFormatDlg::Init( const SwTableAutoFmt* pSelFmt ) //------------------------------------------------------------------------ -void SwAutoFormatDlg::UpdateChecks( const SwTableAutoFmt& rFmt, BOOL bEnable ) +void SwAutoFormatDlg::UpdateChecks( const SwTableAutoFmt& rFmt, sal_Bool bEnable ) { aBtnNumFormat.Enable( bEnable ); aBtnNumFormat.Check( rFmt.IsValueFormat() ); @@ -316,7 +316,7 @@ void SwAutoFormatDlg::FillAutoFmtOfIndex( SwTableAutoFmt*& rToFill ) const IMPL_LINK( SwAutoFormatDlg, CheckHdl, Button *, pBtn ) { SwTableAutoFmtPtr pData = (*pTableTbl)[nIndex]; - BOOL bCheck = ((CheckBox*)pBtn)->IsChecked(), bDataChgd = TRUE; + sal_Bool bCheck = ((CheckBox*)pBtn)->IsChecked(), bDataChgd = sal_True; if( pBtn == &aBtnNumFormat ) pData->SetValueFormat( bCheck ); @@ -329,14 +329,14 @@ IMPL_LINK( SwAutoFormatDlg, CheckHdl, Button *, pBtn ) else if ( pBtn == &aBtnAlignment ) pData->SetJustify( bCheck ); else - bDataChgd = FALSE; + bDataChgd = sal_False; if( bDataChgd ) { if( !bCoreDataChanged ) { aBtnCancel.SetText( aStrClose ); - bCoreDataChanged = TRUE; + bCoreDataChanged = sal_True; } pWndPreview->NotifyChange( *pData ); @@ -349,7 +349,7 @@ IMPL_LINK( SwAutoFormatDlg, CheckHdl, Button *, pBtn ) IMPL_LINK( SwAutoFormatDlg, AddHdl, void *, EMPTYARG ) { - BOOL bOk = FALSE, bFmtInserted = FALSE; + sal_Bool bOk = sal_False, bFmtInserted = sal_False; while( !bOk ) { SwStringInputDlg* pDlg = new SwStringInputDlg( this, @@ -363,7 +363,7 @@ IMPL_LINK( SwAutoFormatDlg, AddHdl, void *, EMPTYARG ) if( aFormatName.Len() > 0 ) { - USHORT n; + sal_uInt16 n; for( n = 0; n < pTableTbl->Count(); ++n ) if( (*pTableTbl)[n]->GetName() == aFormatName ) break; @@ -384,16 +384,16 @@ IMPL_LINK( SwAutoFormatDlg, AddHdl, void *, EMPTYARG ) pTableTbl->Insert( pNewData, n ); aLbFormat.InsertEntry( aFormatName, nDfltStylePos + n ); aLbFormat.SelectEntryPos( nDfltStylePos + n ); - bFmtInserted = TRUE; - aBtnAdd.Enable( FALSE ); + bFmtInserted = sal_True; + aBtnAdd.Enable( sal_False ); if ( !bCoreDataChanged ) { aBtnCancel.SetText( aStrClose ); - bCoreDataChanged = TRUE; + bCoreDataChanged = sal_True; } SelFmtHdl( 0 ); - bOk = TRUE; + bOk = sal_True; } } @@ -406,7 +406,7 @@ IMPL_LINK( SwAutoFormatDlg, AddHdl, void *, EMPTYARG ) } } else - bOk = TRUE; + bOk = sal_True; delete pDlg; } return 0; @@ -434,14 +434,14 @@ IMPL_LINK( SwAutoFormatDlg, RemoveHdl, void *, EMPTYARG ) if( !nIndex ) { - aBtnRemove.Enable(FALSE); - aBtnRename.Enable(FALSE); + aBtnRemove.Enable(sal_False); + aBtnRename.Enable(sal_False); } if( !bCoreDataChanged ) { aBtnCancel.SetText( aStrClose ); - bCoreDataChanged = TRUE; + bCoreDataChanged = sal_True; } } delete pBox; @@ -453,7 +453,7 @@ IMPL_LINK( SwAutoFormatDlg, RemoveHdl, void *, EMPTYARG ) IMPL_LINK( SwAutoFormatDlg, RenameHdl, void *, EMPTYARG ) { - BOOL bOk = FALSE; + sal_Bool bOk = sal_False; while( !bOk ) { SwStringInputDlg* pDlg = new SwStringInputDlg( this, @@ -461,13 +461,13 @@ IMPL_LINK( SwAutoFormatDlg, RenameHdl, void *, EMPTYARG ) aEmptyStr ); if( pDlg->Execute() == RET_OK ) { - BOOL bFmtRenamed = FALSE; + sal_Bool bFmtRenamed = sal_False; String aFormatName; pDlg->GetInputString( aFormatName ); if ( aFormatName.Len() > 0 ) { - USHORT n; + sal_uInt16 n; for( n = 0; n < pTableTbl->Count(); ++n ) if ((*pTableTbl)[n]->GetName() == aFormatName) break; @@ -495,12 +495,12 @@ IMPL_LINK( SwAutoFormatDlg, RenameHdl, void *, EMPTYARG ) if ( !bCoreDataChanged ) { aBtnCancel.SetText( aStrClose ); - bCoreDataChanged = TRUE; + bCoreDataChanged = sal_True; } SelFmtHdl( 0 ); - bOk = TRUE; - bFmtRenamed = TRUE; + bOk = sal_True; + bFmtRenamed = sal_True; } } @@ -513,7 +513,7 @@ IMPL_LINK( SwAutoFormatDlg, RenameHdl, void *, EMPTYARG ) } } else - bOk = TRUE; + bOk = sal_True; delete pDlg; } return 0; @@ -523,30 +523,30 @@ IMPL_LINK( SwAutoFormatDlg, RenameHdl, void *, EMPTYARG ) IMPL_LINK( SwAutoFormatDlg, SelFmtHdl, void *, EMPTYARG ) { - BOOL bBtnEnable = FALSE; - BYTE nSelPos = (BYTE) aLbFormat.GetSelectEntryPos(), nOldIdx = nIndex; + sal_Bool bBtnEnable = sal_False; + sal_uInt8 nSelPos = (sal_uInt8) aLbFormat.GetSelectEntryPos(), nOldIdx = nIndex; if( nSelPos >= nDfltStylePos ) { nIndex = nSelPos - nDfltStylePos; pWndPreview->NotifyChange( *(*pTableTbl)[nIndex] ); bBtnEnable = 0 != nIndex; - UpdateChecks( *(*pTableTbl)[nIndex], TRUE ); + UpdateChecks( *(*pTableTbl)[nIndex], sal_True ); } else { nIndex = 255; SwTableAutoFmt aTmp( ViewShell::GetShellRes()->aStrNone ); - aTmp.SetFont( FALSE ); - aTmp.SetJustify( FALSE ); - aTmp.SetFrame( FALSE ); - aTmp.SetBackground( FALSE ); - aTmp.SetValueFormat( FALSE ); - aTmp.SetWidthHeight( FALSE ); + aTmp.SetFont( sal_False ); + aTmp.SetJustify( sal_False ); + aTmp.SetFrame( sal_False ); + aTmp.SetBackground( sal_False ); + aTmp.SetValueFormat( sal_False ); + aTmp.SetWidthHeight( sal_False ); if( nOldIdx != nIndex ) pWndPreview->NotifyChange( aTmp ); - UpdateChecks( aTmp, FALSE ); + UpdateChecks( aTmp, sal_False ); } aBtnRemove.Enable( bBtnEnable ); @@ -561,7 +561,7 @@ IMPL_LINK_INLINE_START( SwAutoFormatDlg, OkHdl, Button *, EMPTYARG ) if( bSetAutoFmt ) pShell->SetTableAutoFmt( *(*pTableTbl)[ nIndex ] ); EndDialog( RET_OK ); - return TRUE; + return sal_True; } IMPL_LINK_INLINE_END( SwAutoFormatDlg, OkHdl, Button *, EMPTYARG ) @@ -576,7 +576,7 @@ AutoFmtPreview::AutoFmtPreview( Window* pParent, const ResId& rRes, SwWrtShell* aCurData ( aEmptyStr ), aVD ( *this ), aScriptedText ( aVD ), - bFitWidth ( FALSE ), + bFitWidth ( sal_False ), mbRTL ( false ), aPrvSize ( GetSizePixel().Width() - 6, GetSizePixel().Height() - 30 ), nLabelColWidth ( (aPrvSize.Width() - 4) / 4 - 12 ), @@ -639,7 +639,7 @@ rFont.MethodName( Value ); \ rCJKFont.MethodName( Value ); \ rCTLFont.MethodName( Value ); -void AutoFmtPreview::MakeFonts( BYTE nIndex, Font& rFont, Font& rCJKFont, Font& rCTLFont ) +void AutoFmtPreview::MakeFonts( sal_uInt8 nIndex, Font& rFont, Font& rCJKFont, Font& rCTLFont ) { const SwBoxAutoFmt& rBoxFmt = aCurData.GetBoxFmt( nIndex ); @@ -657,14 +657,14 @@ void AutoFmtPreview::MakeFonts( BYTE nIndex, Font& rFont, Font& rCJKFont, Font& SETONALLFONTS( SetShadow, rBoxFmt.GetShadowed().GetValue() ); SETONALLFONTS( SetColor, rBoxFmt.GetColor().GetValue() ); SETONALLFONTS( SetSize, aFontSize ); - SETONALLFONTS( SetTransparent, TRUE ); + SETONALLFONTS( SetTransparent, sal_True ); } //------------------------------------------------------------------------ -BYTE AutoFmtPreview::GetFormatIndex( size_t nCol, size_t nRow ) const +sal_uInt8 AutoFmtPreview::GetFormatIndex( size_t nCol, size_t nRow ) const { - static const BYTE pnFmtMap[] = + static const sal_uInt8 pnFmtMap[] = { 0, 1, 2, 1, 3, 4, 5, 6, 5, 7, @@ -687,10 +687,10 @@ void AutoFmtPreview::DrawString( size_t nCol, size_t nRow ) //------------------------ // Ausgabe des Zelltextes: //------------------------ - ULONG nNum; + sal_uLong nNum; double nVal; String cellString; - BYTE nIndex = static_cast< BYTE >( maArray.GetCellIndex( nCol, nRow, mbRTL ) ); + sal_uInt8 nIndex = static_cast< sal_uInt8 >( maArray.GetCellIndex( nCol, nRow, mbRTL ) ); switch( nIndex ) { @@ -730,10 +730,10 @@ MAKENUMSTR: if( aCurData.IsValueFormat() ) { String sFmt; LanguageType eLng, eSys; - aCurData.GetBoxFmt( (BYTE)nNum ).GetValueFormat( sFmt, eLng, eSys ); + aCurData.GetBoxFmt( (sal_uInt8)nNum ).GetValueFormat( sFmt, eLng, eSys ); short nType; - BOOL bNew; + sal_Bool bNew; xub_StrLen nCheckPos; sal_uInt32 nKey = pNumFmt->GetIndexPuttingAndConverting( sFmt, eLng, eSys, nType, bNew, nCheckPos); @@ -749,10 +749,10 @@ MAKENUMSTR: if( cellString.Len() ) { Size aStrSize; - BYTE nFmtIndex = GetFormatIndex( nCol, nRow ); + sal_uInt8 nFmtIndex = GetFormatIndex( nCol, nRow ); Rectangle cellRect = maArray.GetCellRect( nCol, nRow ); Point aPos = cellRect.TopLeft(); - USHORT nRightX = 0; + sal_uInt16 nRightX = 0; Size theMaxStrSize( cellRect.GetWidth() - FRAME_OFFSET, cellRect.GetHeight() - FRAME_OFFSET ); @@ -786,14 +786,14 @@ MAKENUMSTR: aStrSize = aScriptedText.GetTextSize(); } - nRightX = (USHORT)( cellRect.GetWidth() + nRightX = (sal_uInt16)( cellRect.GetWidth() - aStrSize.Width() - FRAME_OFFSET ); //----------------------------- // vertikal (immer zentrieren): //----------------------------- - aPos.Y() += (nRowHeight - (USHORT)aStrSize.Height()) / 2; + aPos.Y() += (nRowHeight - (sal_uInt16)aStrSize.Height()) / 2; //----------- // horizontal @@ -802,7 +802,7 @@ MAKENUMSTR: aPos.X() += nRightX; else if (aCurData.IsJustify()) { - USHORT nHorPos = (USHORT) + sal_uInt16 nHorPos = (sal_uInt16) ((cellRect.GetWidth()-aStrSize.Width())/2); const SvxAdjustItem& rAdj = aCurData.GetBoxFmt(nFmtIndex).GetAdjust(); switch ( rAdj.GetAdjust() ) @@ -897,14 +897,14 @@ void AutoFmtPreview::Init() SetBorderStyle( GetBorderStyle() | WINDOW_BORDER_MONO ); maArray.Initialize( 5, 5 ); maArray.SetUseDiagDoubleClipping( false ); - CalcCellArray( FALSE ); + CalcCellArray( sal_False ); CalcLineMap(); } //------------------------------------------------------------------------ -void AutoFmtPreview::CalcCellArray( BOOL _bFitWidth ) +void AutoFmtPreview::CalcCellArray( sal_Bool _bFitWidth ) { maArray.SetXOffset( 2 ); maArray.SetAllColWidths( _bFitWidth ? nDataColWidth2 : nDataColWidth1 ); @@ -958,7 +958,7 @@ void AutoFmtPreview::CalcLineMap() void AutoFmtPreview::NotifyChange( const SwTableAutoFmt& rNewData ) { aCurData = rNewData; - bFitWidth = aCurData.IsJustify();//TRUE; //??? + bFitWidth = aCurData.IsJustify();//sal_True; //??? CalcCellArray( bFitWidth ); CalcLineMap(); DoPaint( Rectangle( Point(0,0), GetSizePixel() ) ); @@ -982,7 +982,7 @@ void AutoFmtPreview::DoPaint( const Rectangle& /*rRect*/ ) Font aFont; aFont = aVD.GetFont(); - aFont.SetTransparent( TRUE ); + aFont.SetTransparent( sal_True ); aVD.SetFont ( aFont ); aVD.SetLineColor (); diff --git a/sw/source/ui/table/tautofmt.src b/sw/source/ui/table/tautofmt.src index e7d9492181..5043c981ab 100644 --- a/sw/source/ui/table/tautofmt.src +++ b/sw/source/ui/table/tautofmt.src @@ -43,6 +43,7 @@ ModalDialog DLG_AUTOFMT_TABLE }; ListBox LB_FORMAT { + HelpID = "sw:ListBox:DLG_AUTOFMT_TABLE:LB_FORMAT"; Border = TRUE ; Pos = MAP_APPFONT ( 12 , 14 ) ; Size = MAP_APPFONT ( 65 , 100 ) ; @@ -56,6 +57,7 @@ ModalDialog DLG_AUTOFMT_TABLE }; CheckBox BTN_NUMFORMAT { + HelpID = "sw:CheckBox:DLG_AUTOFMT_TABLE:BTN_NUMFORMAT"; Hide = TRUE ; Pos = MAP_APPFONT ( 12 , 131 ) ; Size = MAP_APPFONT ( 60 , 10 ) ; @@ -64,6 +66,7 @@ ModalDialog DLG_AUTOFMT_TABLE }; CheckBox BTN_BORDER { + HelpID = "sw:CheckBox:DLG_AUTOFMT_TABLE:BTN_BORDER"; Hide = TRUE ; Pos = MAP_APPFONT ( 12 , 147 ) ; Size = MAP_APPFONT ( 60 , 10 ) ; @@ -72,6 +75,7 @@ ModalDialog DLG_AUTOFMT_TABLE }; CheckBox BTN_FONT { + HelpID = "sw:CheckBox:DLG_AUTOFMT_TABLE:BTN_FONT"; Hide = TRUE ; Pos = MAP_APPFONT ( 85 , 131 ) ; Size = MAP_APPFONT ( 60 , 10 ) ; @@ -80,6 +84,7 @@ ModalDialog DLG_AUTOFMT_TABLE }; CheckBox BTN_PATTERN { + HelpID = "sw:CheckBox:DLG_AUTOFMT_TABLE:BTN_PATTERN"; Hide = TRUE ; Pos = MAP_APPFONT ( 85 , 147 ) ; Size = MAP_APPFONT ( 60 , 10 ) ; @@ -88,6 +93,7 @@ ModalDialog DLG_AUTOFMT_TABLE }; CheckBox BTN_ALIGNMENT { + HelpID = "sw:CheckBox:DLG_AUTOFMT_TABLE:BTN_ALIGNMENT"; Hide = TRUE ; Pos = MAP_APPFONT ( 150 , 131 ) ; Size = MAP_APPFONT ( 60 , 10 ) ; @@ -116,6 +122,7 @@ ModalDialog DLG_AUTOFMT_TABLE }; MoreButton BTN_MORE { + HelpID = "sw:MoreButton:DLG_AUTOFMT_TABLE:BTN_MORE"; Pos = MAP_APPFONT ( 255 , 101 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "~More" ; @@ -125,6 +132,7 @@ ModalDialog DLG_AUTOFMT_TABLE }; PushButton BTN_ADD { + HelpID = "sw:PushButton:DLG_AUTOFMT_TABLE:BTN_ADD"; Pos = MAP_APPFONT ( 255 , 64 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "~Add" ; @@ -132,6 +140,7 @@ ModalDialog DLG_AUTOFMT_TABLE }; PushButton BTN_REMOVE { + HelpID = "sw:PushButton:DLG_AUTOFMT_TABLE:BTN_REMOVE"; Pos = MAP_APPFONT ( 255 , 81 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "~Delete" ; @@ -139,6 +148,7 @@ ModalDialog DLG_AUTOFMT_TABLE }; PushButton BTN_RENAME { + HelpID = "sw:PushButton:DLG_AUTOFMT_TABLE:BTN_RENAME"; Pos = MAP_APPFONT ( 255 , 123 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; TabStop = TRUE ; @@ -217,6 +227,7 @@ ModalDialog DLG_SWDLG_STRINPUT HelpID = HID_SWDLG_STRINPUT ; Edit ED_INPUT { + HelpID = "sw:Edit:DLG_SWDLG_STRINPUT:ED_INPUT"; Border = TRUE ; Pos = MAP_APPFONT ( 6 , 24 ) ; Size = MAP_APPFONT ( 104 , 12 ) ; diff --git a/sw/source/ui/uiview/formatclipboard.cxx b/sw/source/ui/uiview/formatclipboard.cxx index 40cba7f675..6fbb37e934 100644 --- a/sw/source/ui/uiview/formatclipboard.cxx +++ b/sw/source/ui/uiview/formatclipboard.cxx @@ -185,13 +185,13 @@ void lcl_getTableAttributes( SfxItemSet& rSet, SwWrtShell &rSh ) void lcl_setTableAttributes( const SfxItemSet& rSet, SwWrtShell &rSh ) { const SfxPoolItem* pItem = 0; - BOOL bBorder = ( SFX_ITEM_SET == rSet.GetItemState( RES_BOX ) || + sal_Bool bBorder = ( SFX_ITEM_SET == rSet.GetItemState( RES_BOX ) || SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_BORDER_INNER ) ); pItem = 0; - BOOL bBackground = SFX_ITEM_SET == rSet.GetItemState( RES_BACKGROUND, FALSE, &pItem ); + sal_Bool bBackground = SFX_ITEM_SET == rSet.GetItemState( RES_BACKGROUND, sal_False, &pItem ); const SfxPoolItem* pRowItem = 0, *pTableItem = 0; - bBackground |= SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_BRUSH_ROW, FALSE, &pRowItem ); - bBackground |= SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_BRUSH_TABLE, FALSE, &pTableItem ); + bBackground |= SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_BRUSH_ROW, sal_False, &pRowItem ); + bBackground |= SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_BRUSH_TABLE, sal_False, &pTableItem ); if(bBackground) { @@ -213,7 +213,7 @@ void lcl_setTableAttributes( const SfxItemSet& rSet, SwWrtShell &rSh ) if(bBorder) rSh.SetTabBorders( rSet ); - if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_TABLE_HEADLINE, FALSE, &pItem) ) + if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_TABLE_HEADLINE, sal_False, &pItem) ) rSh.SetRowsToRepeat( ((SfxUInt16Item*)pItem)->GetValue() ); SwFrmFmt* pFrmFmt = rSh.GetTableFmt(); @@ -221,52 +221,52 @@ void lcl_setTableAttributes( const SfxItemSet& rSet, SwWrtShell &rSh ) { //RES_SHADOW pItem=0; - rSet.GetItemState(rSet.GetPool()->GetWhich(RES_SHADOW), FALSE, &pItem); + rSet.GetItemState(rSet.GetPool()->GetWhich(RES_SHADOW), sal_False, &pItem); if(pItem) pFrmFmt->SetFmtAttr( *pItem ); //RES_BREAK pItem=0; - rSet.GetItemState(rSet.GetPool()->GetWhich(RES_BREAK), FALSE, &pItem); + rSet.GetItemState(rSet.GetPool()->GetWhich(RES_BREAK), sal_False, &pItem); if(pItem) pFrmFmt->SetFmtAttr( *pItem ); //RES_PAGEDESC pItem=0; - rSet.GetItemState(rSet.GetPool()->GetWhich(RES_PAGEDESC), FALSE, &pItem); + rSet.GetItemState(rSet.GetPool()->GetWhich(RES_PAGEDESC), sal_False, &pItem); if(pItem) pFrmFmt->SetFmtAttr( *pItem ); //RES_LAYOUT_SPLIT pItem=0; - rSet.GetItemState(rSet.GetPool()->GetWhich(RES_LAYOUT_SPLIT), FALSE, &pItem); + rSet.GetItemState(rSet.GetPool()->GetWhich(RES_LAYOUT_SPLIT), sal_False, &pItem); if(pItem) pFrmFmt->SetFmtAttr( *pItem ); //RES_KEEP pItem=0; - rSet.GetItemState(rSet.GetPool()->GetWhich(RES_KEEP), FALSE, &pItem); + rSet.GetItemState(rSet.GetPool()->GetWhich(RES_KEEP), sal_False, &pItem); if(pItem) pFrmFmt->SetFmtAttr( *pItem ); //RES_FRAMEDIR pItem=0; - rSet.GetItemState(rSet.GetPool()->GetWhich(RES_FRAMEDIR), FALSE, &pItem); + rSet.GetItemState(rSet.GetPool()->GetWhich(RES_FRAMEDIR), sal_False, &pItem); if(pItem) pFrmFmt->SetFmtAttr( *pItem ); } - if( SFX_ITEM_SET == rSet.GetItemState( FN_TABLE_BOX_TEXTDIRECTION, FALSE, &pItem) ) + if( SFX_ITEM_SET == rSet.GetItemState( FN_TABLE_BOX_TEXTDIRECTION, sal_False, &pItem) ) { SvxFrameDirectionItem aDirection( FRMDIR_ENVIRONMENT, RES_FRAMEDIR ); aDirection.SetValue(static_cast< const SvxFrameDirectionItem* >(pItem)->GetValue()); rSh.SetBoxDirection(aDirection); } - if( SFX_ITEM_SET == rSet.GetItemState( FN_TABLE_SET_VERT_ALIGN, FALSE, &pItem)) + if( SFX_ITEM_SET == rSet.GetItemState( FN_TABLE_SET_VERT_ALIGN, sal_False, &pItem)) rSh.SetBoxAlign(((SfxUInt16Item*)(pItem))->GetValue()); - if( SFX_ITEM_SET == rSet.GetItemState( RES_ROW_SPLIT, FALSE, &pItem) ) + if( SFX_ITEM_SET == rSet.GetItemState( RES_ROW_SPLIT, sal_False, &pItem) ) rSh.SetRowSplit(*static_cast<const SwFmtRowSplit*>(pItem)); } }//end anonymous namespace @@ -336,8 +336,8 @@ void SwFormatClipboard::Copy( SwWrtShell& rWrtShell, SfxItemPool& rPool, bool bP { SwPaM* pCrsr = rWrtShell.GetCrsr(); //select one character only to get the attributes of this single character only - BOOL bHasSelection = pCrsr->HasMark(); - BOOL bForwardSelection = FALSE; + sal_Bool bHasSelection = pCrsr->HasMark(); + sal_Bool bForwardSelection = sal_False; if(!bHasSelection) //check for and handle multiselections { @@ -387,7 +387,7 @@ void SwFormatClipboard::Copy( SwWrtShell& rWrtShell, SfxItemPool& rPool, bool bP SdrView* pDrawView = rWrtShell.GetDrawView(); if(pDrawView) { - BOOL bOnlyHardAttr = TRUE; + sal_Bool bOnlyHardAttr = sal_True; if( pDrawView->AreObjectsMarked() ) { pItemSet = new SfxItemSet( pDrawView->GetAttrFromMarked(bOnlyHardAttr) ); @@ -418,7 +418,7 @@ void SwFormatClipboard::Copy( SwWrtShell& rWrtShell, SfxItemPool& rPool, bool bP if( pFmt ) m_aParaStyle = pFmt->GetName(); } - rWrtShell.Pop(FALSE); + rWrtShell.Pop(sal_False); rWrtShell.EndAction(); } typedef boost::shared_ptr< SfxPoolItem > SfxPoolItemSharedPtr; @@ -426,10 +426,10 @@ typedef std::vector< SfxPoolItemSharedPtr > ItemVector; // collect all PoolItems from the applied styles void lcl_AppendSetItems( ItemVector& rItemVector, const SfxItemSet& rStyleAttrSet ) { - const USHORT* pRanges = rStyleAttrSet.GetRanges(); + const sal_uInt16* pRanges = rStyleAttrSet.GetRanges(); while( *pRanges ) { - for ( USHORT nWhich = *pRanges; nWhich <= *(pRanges+1); ++nWhich ) + for ( sal_uInt16 nWhich = *pRanges; nWhich <= *(pRanges+1); ++nWhich ) { const SfxPoolItem* pItem; if( SFX_ITEM_SET == rStyleAttrSet.GetItemState( nWhich, sal_False, &pItem ) ) @@ -484,7 +484,7 @@ void SwFormatClipboard::Paste( SwWrtShell& rWrtShell, SfxStyleSheetBasePool* pPo SwFmtCharFmt aFmt(pStyle->GetCharFmt()); // collect items from character style lcl_AppendSetItems( aItemVector, aFmt.GetCharFmt()->GetAttrSet()); - USHORT nFlags=0; + sal_uInt16 nFlags=0; rWrtShell.SetAttr( aFmt, nFlags ); } } @@ -507,7 +507,7 @@ void SwFormatClipboard::Paste( SwWrtShell& rWrtShell, SfxStyleSheetBasePool* pPo SdrView* pDrawView = rWrtShell.GetDrawView(); if(pDrawView) { - BOOL bReplaceAll = TRUE; + sal_Bool bReplaceAll = sal_True; pDrawView->SetAttrToMarked(*m_pItemSet, bReplaceAll); } } @@ -533,22 +533,22 @@ void SwFormatClipboard::Paste( SwWrtShell& rWrtShell, SfxStyleSheetBasePool* pPo { if( SFX_ITEM_SET == pTemplateItemSet->GetItemState(FN_NUMBER_NEWSTART) ) { - BOOL bStart = ((SfxBoolItem&)pTemplateItemSet->Get(FN_NUMBER_NEWSTART)).GetValue(); - USHORT nNumStart = USHRT_MAX; + sal_Bool bStart = ((SfxBoolItem&)pTemplateItemSet->Get(FN_NUMBER_NEWSTART)).GetValue(); + sal_uInt16 nNumStart = USHRT_MAX; if( SFX_ITEM_SET == pTemplateItemSet->GetItemState(FN_NUMBER_NEWSTART_AT) ) { nNumStart = ((SfxUInt16Item&)pTemplateItemSet->Get(FN_NUMBER_NEWSTART_AT)).GetValue(); if(USHRT_MAX != nNumStart) - bStart = FALSE; + bStart = sal_False; } rWrtShell.SetNumRuleStart(bStart); rWrtShell.SetNodeNumStart(nNumStart); } else if( SFX_ITEM_SET == pTemplateItemSet->GetItemState(FN_NUMBER_NEWSTART_AT) ) { - USHORT nNumStart = ((SfxUInt16Item&)pTemplateItemSet->Get(FN_NUMBER_NEWSTART_AT)).GetValue(); + sal_uInt16 nNumStart = ((SfxUInt16Item&)pTemplateItemSet->Get(FN_NUMBER_NEWSTART_AT)).GetValue(); rWrtShell.SetNodeNumStart(nNumStart); - rWrtShell.SetNumRuleStart(FALSE); + rWrtShell.SetNumRuleStart(sal_False); } } } diff --git a/sw/source/ui/uiview/makefile.mk b/sw/source/ui/uiview/makefile.mk deleted file mode 100644 index 70a4efa525..0000000000 --- a/sw/source/ui/uiview/makefile.mk +++ /dev/null @@ -1,77 +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=uiview - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -SRS1NAME=$(TARGET) -SRC1FILES = \ - view.src \ - pview.src - -EXCEPTIONSFILES= \ - $(SLO)$/formatclipboard.obj \ - $(SLO)$/pview.obj \ - $(SLO)$/scroll.obj \ - $(SLO)$/srcview.obj \ - $(SLO)$/swcli.obj \ - $(SLO)$/uivwimp.obj \ - $(SLO)$/view.obj \ - $(SLO)$/view0.obj \ - $(SLO)$/view1.obj \ - $(SLO)$/view2.obj \ - $(SLO)$/viewcoll.obj \ - $(SLO)$/viewdlg.obj \ - $(SLO)$/viewdlg2.obj \ - $(SLO)$/viewdraw.obj \ - $(SLO)$/viewling.obj \ - $(SLO)$/viewmdi.obj \ - $(SLO)$/viewport.obj \ - $(SLO)$/viewprt.obj \ - $(SLO)$/viewsrch.obj \ - $(SLO)$/viewstat.obj \ - $(SLO)$/viewtab.obj - -SLOFILES = \ - $(EXCEPTIONSFILES) - -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk - -$(SRS)$/uiview.srs: $(SOLARINCDIR)$/svx$/globlmn.hrc - diff --git a/sw/source/ui/uiview/pview.cxx b/sw/source/ui/uiview/pview.cxx index 785bae4792..293b03022a 100644 --- a/sw/source/ui/uiview/pview.cxx +++ b/sw/source/ui/uiview/pview.cxx @@ -36,7 +36,6 @@ #include <vcl/help.hxx> #include <vcl/cmdevt.hxx> #include <vcl/button.hxx> -#include <svtools/printdlg.hxx> #include <svl/whiter.hxx> #include <svl/stritem.hxx> #include <svl/eitem.hxx> @@ -69,7 +68,7 @@ #include <view.hxx> #include <textsh.hxx> #include <scroll.hxx> -#include <swprtopt.hxx> +#include <prtopt.hxx> #include <docstat.hxx> #include <usrpref.hxx> #include <viewfunc.hxx> @@ -89,8 +88,8 @@ #include <svx/dialogs.hrc> #include <osl/mutex.hxx> -using namespace ::com::sun::star; +using namespace ::com::sun::star; SFX_IMPL_NAMED_VIEWFACTORY(SwPagePreView, "PrintPreview") { SFX_VIEW_REGISTRATION(SwDocShell); @@ -114,13 +113,13 @@ TYPEINIT1(SwPagePreView,SfxViewShell) #define MIN_PREVIEW_ZOOM 25 #define MAX_PREVIEW_ZOOM 600 -USHORT lcl_GetNextZoomStep(USHORT nCurrentZoom, BOOL bZoomIn) +sal_uInt16 lcl_GetNextZoomStep(sal_uInt16 nCurrentZoom, sal_Bool bZoomIn) { - static USHORT aZoomArr[] = + static sal_uInt16 aZoomArr[] = { 25, 50, 75, 100, 150, 200, 400, 600 }; - const sal_uInt16 nZoomArrSize = sizeof(aZoomArr)/sizeof(USHORT); + const sal_uInt16 nZoomArrSize = sizeof(aZoomArr)/sizeof(sal_uInt16); if(bZoomIn) for(int i = nZoomArrSize - 1; i >= 0; --i) { @@ -138,14 +137,14 @@ USHORT lcl_GetNextZoomStep(USHORT nCurrentZoom, BOOL bZoomIn) void lcl_InvalidateZoomSlots(SfxBindings& rBindings) { - static USHORT const aInval[] = + static sal_uInt16 const aInval[] = { SID_ATTR_ZOOM, SID_ZOOM_OUT, SID_ZOOM_IN, SID_ATTR_ZOOMSLIDER, FN_PREVIEW_ZOOM, FN_STAT_ZOOM, 0 }; rBindings.Invalidate( aInval ); } - + // erstmal der Zoom-Dialog class SwPreViewZoomDlg : public SvxStandardDialog { @@ -181,15 +180,12 @@ SwPreViewZoomDlg::SwPreViewZoomDlg( SwPagePreViewWin& rParent ) : aColEdit.SetValue( rParent.GetCol() ); } -SwPreViewZoomDlg::~SwPreViewZoomDlg() -{ -} - +SwPreViewZoomDlg::~SwPreViewZoomDlg() {} void SwPreViewZoomDlg::Apply() { ((SwPagePreViewWin*)GetParent())->CalcWish( - BYTE(aRowEdit.GetValue()), - BYTE(aColEdit.GetValue()) ); + sal_uInt8(aRowEdit.GetValue()), + sal_uInt8(aColEdit.GetValue()) ); } // alles fuers SwPagePreViewWin @@ -206,7 +202,7 @@ SwPagePreViewWin::SwPagePreViewWin( Window *pParent, SwPagePreView& rPView ) SetLineColor( GetBackground().GetColor()); SetMapMode( MapMode(MAP_TWIP) ); - const SwMasterUsrPref *pUsrPref = SW_MOD()->GetUsrPref(FALSE); + const SwMasterUsrPref *pUsrPref = SW_MOD()->GetUsrPref(sal_False); mnRow = pUsrPref->GetPagePrevRow(); // 1 Zeile mnCol = pUsrPref->GetPagePrevCol(); // 1 Spalte mnSttPage = USHRT_MAX; @@ -246,15 +242,15 @@ void SwPagePreViewWin::Paint( const Rectangle& rRect ) } } -void SwPagePreViewWin::CalcWish( BYTE nNewRow, BYTE nNewCol ) +void SwPagePreViewWin::CalcWish( sal_uInt8 nNewRow, sal_uInt8 nNewCol ) { if( !mpViewShell || !mpViewShell->GetLayout() ) return; - USHORT nOldCol = mnCol; + sal_uInt16 nOldCol = mnCol; mnRow = nNewRow; mnCol = nNewCol; - USHORT nPages = mnRow * mnCol, + sal_uInt16 nPages = mnRow * mnCol, nLastSttPg = mrView.GetPageCount()+1 > nPages ? mrView.GetPageCount()+1 - nPages : 0; if( mnSttPage > nLastSttPg ) @@ -274,7 +270,7 @@ void SwPagePreViewWin::CalcWish( BYTE nNewRow, BYTE nNewCol ) // Sortierung muss eingehalten werden!! // additional invalidate page status. - static USHORT const aInval[] = + static sal_uInt16 aInval[] = { SID_ATTR_ZOOM, SID_ZOOM_OUT, SID_ZOOM_IN, FN_PREVIEW_ZOOM, @@ -297,10 +293,10 @@ void SwPagePreViewWin::CalcWish( BYTE nNewRow, BYTE nNewCol ) int SwPagePreViewWin::MovePage( int eMoveMode ) { // soviele Seiten hoch - USHORT nPages = mnRow * mnCol; - USHORT nNewSttPage = mnSttPage; - USHORT nPageCount = mrView.GetPageCount(); - USHORT nDefSttPg = GetDefSttPage(); + sal_uInt16 nPages = mnRow * mnCol; + sal_uInt16 nNewSttPage = mnSttPage; + sal_uInt16 nPageCount = mrView.GetPageCount(); + sal_uInt16 nDefSttPg = GetDefSttPage(); bool bPaintPageAtFirstCol = true; switch( eMoveMode ) @@ -377,13 +373,13 @@ int SwPagePreViewWin::MovePage( int eMoveMode ) maPaintedPreviewDocRect, bPaintPageAtFirstCol ); if( nNewSttPage == mnSttPage && eMoveMode != MV_SELPAGE ) - return FALSE; + return sal_False; SetPagePreview(mnRow, mnCol); mnSttPage = nNewSttPage; // additional invalidate page status. - static USHORT const aInval[] = + static sal_uInt16 aInval[] = { FN_START_OF_DOCUMENT, FN_END_OF_DOCUMENT, FN_PAGEUP, FN_PAGEDOWN, FN_STAT_PAGE, 0 @@ -392,7 +388,7 @@ int SwPagePreViewWin::MovePage( int eMoveMode ) SfxBindings& rBindings = mrView.GetViewFrame()->GetBindings(); rBindings.Invalidate( aInval ); - return TRUE; + return sal_True; } void SwPagePreViewWin::SetWinSize( const Size& rNewSize ) @@ -422,7 +418,7 @@ void SwPagePreViewWin::SetWinSize( const Size& rNewSize ) maScale = GetMapMode().GetScaleX(); } -void SwPagePreViewWin::GetStatusStr( String& rStr, USHORT nPageCnt ) const +void SwPagePreViewWin::GetStatusStr( String& rStr, sal_uInt16 nPageCnt ) const { // show physical and virtual page number of // selected page, if it's visible. @@ -449,11 +445,11 @@ void SwPagePreViewWin::GetStatusStr( String& rStr, USHORT nPageCnt ) const void SwPagePreViewWin::KeyInput( const KeyEvent &rKEvt ) { const KeyCode& rKeyCode = rKEvt.GetKeyCode(); - USHORT nKey = rKeyCode.GetCode(); - BOOL bHandled = FALSE; + sal_uInt16 nKey = rKeyCode.GetCode(); + sal_Bool bHandled = sal_False; if(!rKeyCode.GetModifier()) { - USHORT nSlot = 0; + sal_uInt16 nSlot = 0; switch(nKey) { case KEY_ADD : nSlot = SID_ZOOM_OUT; break; @@ -462,7 +458,7 @@ void SwPagePreViewWin::KeyInput( const KeyEvent &rKEvt ) } if(nSlot) { - bHandled = TRUE; + bHandled = sal_True; mrView.GetViewFrame()->GetDispatcher()->Execute( nSlot, SFX_CALLMODE_ASYNCHRON ); } @@ -473,12 +469,12 @@ void SwPagePreViewWin::KeyInput( const KeyEvent &rKEvt ) void SwPagePreViewWin::Command( const CommandEvent& rCEvt ) { - BOOL bCallBase = TRUE; + sal_Bool bCallBase = sal_True; switch( rCEvt.GetCommand() ) { case COMMAND_CONTEXTMENU: mrView.GetViewFrame()->GetDispatcher()->ExecutePopup(); - bCallBase = FALSE; + bCallBase = sal_False; break; case COMMAND_WHEEL: @@ -542,7 +538,7 @@ void SwPagePreViewWin::MouseButtonDown( const MouseEvent& rMEvt ) mrView.SetVScrollbarThumbPos( nNewSelectedPage ); } // invalidate page status. - static USHORT const aInval[] = + static sal_uInt16 aInval[] = { FN_STAT_PAGE, 0 }; @@ -555,9 +551,9 @@ void SwPagePreViewWin::MouseButtonDown( const MouseEvent& rMEvt ) /****************************************************************************** * Beschreibung: Userprefs bzw Viewoptions setzen ******************************************************************************/ -void SwPagePreViewWin::SetPagePreview( BYTE nRow, BYTE nCol ) +void SwPagePreViewWin::SetPagePreview( sal_uInt8 nRow, sal_uInt8 nCol ) { - SwMasterUsrPref *pOpt = (SwMasterUsrPref *)SW_MOD()->GetUsrPref(FALSE); + SwMasterUsrPref *pOpt = (SwMasterUsrPref *)SW_MOD()->GetUsrPref(sal_False); if (nRow != pOpt->GetPagePrevRow() || nCol != pOpt->GetPagePrevCol()) { @@ -644,7 +640,7 @@ void SwPagePreView::_ExecPgUpAndPgDown( const bool _bPgUp, const int eMvMode = _bPgUp ? SwPagePreViewWin::MV_PAGE_UP : SwPagePreViewWin::MV_PAGE_DOWN; - if ( ChgPage( eMvMode, TRUE ) ) + if ( ChgPage( eMvMode, sal_True ) ) aViewWin.Invalidate(); } else @@ -688,7 +684,7 @@ void SwPagePreView::_ExecPgUpAndPgDown( const bool _bPgUp, } ScrollViewSzChg(); // additional invalidate page status. - static USHORT const aInval[] = + static sal_uInt16 aInval[] = { FN_START_OF_DOCUMENT, FN_END_OF_DOCUMENT, FN_PAGEUP, FN_PAGEDOWN, FN_STAT_PAGE, 0 @@ -707,8 +703,8 @@ void SwPagePreView::_ExecPgUpAndPgDown( const bool _bPgUp, void SwPagePreView::Execute( SfxRequest &rReq ) { int eMvMode; - BYTE nRow = 1; - BOOL bRetVal = FALSE; + sal_uInt8 nRow = 1; + sal_Bool bRetVal = sal_False; bool bRefresh = true; switch(rReq.GetSlot()) @@ -723,9 +719,9 @@ void SwPagePreView::Execute( SfxRequest &rReq ) const SfxItemSet *pArgs = rReq.GetArgs(); if( pArgs && pArgs->Count() >= 2 ) { - BYTE nCols = (BYTE)((SfxUInt16Item &)pArgs->Get( + sal_uInt8 nCols = (sal_uInt8)((SfxUInt16Item &)pArgs->Get( SID_ATTR_TABLE_COLUMN)).GetValue(); - BYTE nRows = (BYTE)((SfxUInt16Item &)pArgs->Get( + sal_uInt8 nRows = (sal_uInt8)((SfxUInt16Item &)pArgs->Get( SID_ATTR_TABLE_ROW)).GetValue(); aViewWin.CalcWish( nRows, nCols ); @@ -740,7 +736,7 @@ void SwPagePreView::Execute( SfxRequest &rReq ) const SfxItemSet* pArgs = rReq.GetArgs(); const SfxPoolItem* pItem; bool bBookPreview = GetViewShell()->GetViewOptions()->IsPagePrevBookview(); - if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( FN_SHOW_BOOKVIEW, FALSE, &pItem ) ) + if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( FN_SHOW_BOOKVIEW, sal_False, &pItem ) ) { bBookPreview = static_cast< const SfxBoolItem* >( pItem )->GetValue(); ( ( SwViewOption* ) GetViewShell()->GetViewOptions() )->SetPagePrevBookview( bBookPreview ); @@ -751,7 +747,7 @@ void SwPagePreView::Execute( SfxRequest &rReq ) // book preview mode changed. Thus, adjust scrollbars and // invalidate corresponding states. ScrollViewSzChg(); - static USHORT const aInval[] = + static sal_uInt16 aInval[] = { FN_START_OF_DOCUMENT, FN_END_OF_DOCUMENT, FN_PAGEUP, FN_PAGEDOWN, FN_STAT_PAGE, FN_SHOW_BOOKVIEW, 0 @@ -803,13 +799,13 @@ void SwPagePreView::Execute( SfxRequest &rReq ) if( pArgs ) { enum SvxZoomType eType = SVX_ZOOM_PERCENT; - USHORT nZoomFactor = USHRT_MAX; - if(SFX_ITEM_SET == pArgs->GetItemState(SID_ATTR_ZOOM, TRUE, &pItem)) + sal_uInt16 nZoomFactor = USHRT_MAX; + if(SFX_ITEM_SET == pArgs->GetItemState(SID_ATTR_ZOOM, sal_True, &pItem)) { eType = ((const SvxZoomItem *)pItem)->GetType(); nZoomFactor = ((const SvxZoomItem *)pItem)->GetValue(); } - else if(SFX_ITEM_SET == pArgs->GetItemState(FN_PREVIEW_ZOOM, TRUE, &pItem)) + else if(SFX_ITEM_SET == pArgs->GetItemState(FN_PREVIEW_ZOOM, sal_True, &pItem)) nZoomFactor = ((const SfxUInt16Item *)pItem)->GetValue(); if(USHRT_MAX != nZoomFactor) SetZoom(eType, nZoomFactor); @@ -822,9 +818,9 @@ void SwPagePreView::Execute( SfxRequest &rReq ) const SfxItemSet *pArgs = rReq.GetArgs(); const SfxPoolItem* pItem; - if ( pArgs && SFX_ITEM_SET == pArgs->GetItemState(SID_ATTR_ZOOMSLIDER, TRUE, &pItem ) ) + if ( pArgs && SFX_ITEM_SET == pArgs->GetItemState(SID_ATTR_ZOOMSLIDER, sal_True, &pItem ) ) { - const USHORT nCurrentZoom = ((const SvxZoomSliderItem *)pItem)->GetValue(); + const sal_uInt16 nCurrentZoom = ((const SvxZoomSliderItem *)pItem)->GetValue(); SetZoom( SVX_ZOOM_PERCENT, nCurrentZoom ); } } @@ -871,12 +867,12 @@ void SwPagePreView::Execute( SfxRequest &rReq ) { aViewWin.SetSelectedPage( nNewSelectedPage ); aViewWin.SetSttPage( nNewStartPage ); - int nRet = ChgPage( SwPagePreViewWin::MV_SELPAGE, TRUE ); + int nRet = ChgPage( SwPagePreViewWin::MV_SELPAGE, sal_True ); bRefresh = 0 != nRet; } GetViewShell()->ShowPreViewSelection( nNewSelectedPage ); // invalidate page status. - static USHORT const aInval[] = + static sal_uInt16 aInval[] = { FN_STAT_PAGE, 0 }; @@ -899,14 +895,14 @@ void SwPagePreView::Execute( SfxRequest &rReq ) case FN_START_OF_LINE: case FN_START_OF_DOCUMENT: aViewWin.SetSelectedPage( 1 ); - eMvMode = SwPagePreViewWin::MV_DOC_STT; bRetVal = TRUE; goto MOVEPAGE; + eMvMode = SwPagePreViewWin::MV_DOC_STT; bRetVal = sal_True; goto MOVEPAGE; case FN_END_OF_LINE: case FN_END_OF_DOCUMENT: aViewWin.SetSelectedPage( mnPageCount ); - eMvMode = SwPagePreViewWin::MV_DOC_END; bRetVal = TRUE; goto MOVEPAGE; + eMvMode = SwPagePreViewWin::MV_DOC_END; bRetVal = sal_True; goto MOVEPAGE; MOVEPAGE: { - int nRet = ChgPage( eMvMode, TRUE ); + int nRet = ChgPage( eMvMode, sal_True ); // return value fuer Basic if(bRetVal) rReq.SetReturnValue(SfxBoolItem(rReq.GetSlot(), nRet == 0)); @@ -922,14 +918,14 @@ MOVEPAGE: // die Sache mit der Orientation if(pPPVPD) { - SfxPrinter* pPrinter = GetPrinter( TRUE ); + SfxPrinter* pPrinter = GetPrinter( sal_True ); if((pPrinter->GetOrientation() == ORIENTATION_LANDSCAPE) != pPPVPD->GetLandscape()) pPrinter->SetOrientation(pPPVPD->GetLandscape() ? ORIENTATION_LANDSCAPE : ORIENTATION_PORTRAIT); } - ::SetAppPrintOptions( aViewWin.GetViewShell(), FALSE ); - bNormalPrint = FALSE; - USHORT nPrtSlot = SID_PRINTDOC; + ::SetAppPrintOptions( aViewWin.GetViewShell(), sal_False ); + bNormalPrint = sal_False; + sal_uInt16 nPrtSlot = SID_PRINTDOC; rReq.SetSlot( nPrtSlot ); SfxViewShell::ExecuteSlot( rReq, SfxViewShell::GetInterface() ); rReq.SetSlot( FN_PRINT_PAGEPREVIEW ); @@ -937,8 +933,8 @@ MOVEPAGE: } case SID_PRINTDOCDIRECT: case SID_PRINTDOC: - ::SetAppPrintOptions( aViewWin.GetViewShell(), FALSE ); - bNormalPrint = TRUE; + ::SetAppPrintOptions( aViewWin.GetViewShell(), sal_False ); + bNormalPrint = sal_True; SfxViewShell::ExecuteSlot( rReq, SfxViewShell::GetInterface() ); return; case FN_CLOSE_PAGEPREVIEW: @@ -950,7 +946,7 @@ MOVEPAGE: break; case FN_INSERT_BREAK: { - USHORT nSelPage = aViewWin.SelectedPage(); + sal_uInt16 nSelPage = aViewWin.SelectedPage(); //if a dummy page is selected (e.g. a non-existing right/left page) //the direct neighbor is used if(GetViewShell()->IsDummyPage( nSelPage ) && GetViewShell()->IsDummyPage( --nSelPage )) @@ -973,12 +969,12 @@ MOVEPAGE: void SwPagePreView::GetState( SfxItemSet& rSet ) { SfxWhichIter aIter(rSet); - BYTE nRow = 1; - USHORT nWhich = aIter.FirstWhich(); + sal_uInt8 nRow = 1; + sal_uInt16 nWhich = aIter.FirstWhich(); OSL_ENSURE(nWhich, "empty set"); SwPagePreviewLayout* pPagePrevwLay = GetViewShell()->PagePreviewLayout(); // zoom has to be disabled if Accessibility support is switched on - BOOL bZoomEnabled = TRUE; // !Application::GetSettings().GetMiscSettings().GetEnableATToolSupport(); + sal_Bool bZoomEnabled = sal_True; // !Application::GetSettings().GetMiscSettings().GetEnableATToolSupport(); while(nWhich) { @@ -1046,7 +1042,7 @@ void SwPagePreView::GetState( SfxItemSet& rSet ) if(bZoomEnabled) { const SwViewOption* pVOpt = GetViewShell()->GetViewOptions(); - const USHORT nCurrentZoom = pVOpt->GetZoom(); + const sal_uInt16 nCurrentZoom = pVOpt->GetZoom(); SvxZoomSliderItem aZoomSliderItem( nCurrentZoom, MINZOOM, MAXZOOM ); aZoomSliderItem.AddSnappingPoint( 100 ); rSet.Put( aZoomSliderItem ); @@ -1082,7 +1078,7 @@ void SwPagePreView::GetState( SfxItemSet& rSet ) break; case FN_SHOW_BOOKVIEW: { - BOOL b = GetViewShell()->GetViewOptions()->IsPagePrevBookview(); + sal_Bool b = GetViewShell()->GetViewOptions()->IsPagePrevBookview(); rSet.Put(SfxBoolItem(nWhich, b)); } break; @@ -1099,10 +1095,10 @@ void SwPagePreView::GetState( SfxItemSet& rSet ) SfxItemSet aSet( *rSet.GetPool(), SID_PRINTDOC, SID_PRINTDOC ); GetSlotState( SID_PRINTDOC, SfxViewShell::GetInterface(), &aSet ); if( SFX_ITEM_DISABLED == aSet.GetItemState( SID_PRINTDOC, - FALSE, &pItem )) + sal_False, &pItem )) rSet.DisableItem( nWhich ); else if( SFX_ITEM_SET == aSet.GetItemState( SID_PRINTDOC, - FALSE, &pItem )) + sal_False, &pItem )) { ((SfxPoolItem*)pItem)->SetWhich( FN_PRINT_PAGEPREVIEW ); rSet.Put( *pItem ); @@ -1111,7 +1107,7 @@ void SwPagePreView::GetState( SfxItemSet& rSet ) break; case SID_PRINTPREVIEW: - rSet.Put( SfxBoolItem( nWhich, TRUE ) ); + rSet.Put( SfxBoolItem( nWhich, sal_True ) ); break; case SID_PRINTDOC: @@ -1126,7 +1122,7 @@ void SwPagePreView::GetState( SfxItemSet& rSet ) void SwPagePreView::StateUndo(SfxItemSet& rSet) { SfxWhichIter aIter(rSet); - USHORT nWhich = aIter.FirstWhich(); + sal_uInt16 nWhich = aIter.FirstWhich(); while (nWhich) { @@ -1138,58 +1134,57 @@ void SwPagePreView::StateUndo(SfxItemSet& rSet) void SwPagePreView::Init(const SwViewOption * pPrefs) { if ( GetViewShell()->HasDrawView() ) - GetViewShell()->GetDrawView()->SetAnimationEnabled( FALSE ); + GetViewShell()->GetDrawView()->SetAnimationEnabled( sal_False ); - bNormalPrint = TRUE; + bNormalPrint = sal_True; // Die DocSize erfragen und verarbeiten. Ueber die Handler konnte // die Shell nicht gefunden werden, weil die Shell innerhalb CTOR-Phase // nicht in der SFX-Verwaltung bekannt ist. if( !pPrefs ) - pPrefs = SW_MOD()->GetUsrPref(FALSE); + pPrefs = SW_MOD()->GetUsrPref(sal_False); // die Felder aktualisieren // ACHTUNG: hochcasten auf die EditShell, um die SS zu nutzen. // In den Methoden wird auf die akt. Shell abgefragt! SwEditShell* pESh = (SwEditShell*)GetViewShell(); - BOOL bIsModified = pESh->IsModified(); + sal_Bool bIsModified = pESh->IsModified(); SwViewOption aOpt( *pPrefs ); - aOpt.SetPagePreview(TRUE); - aOpt.SetTab( FALSE ); - aOpt.SetBlank( FALSE ); - aOpt.SetHardBlank( FALSE ); - aOpt.SetParagraph( FALSE ); - aOpt.SetLineBreak( FALSE ); - aOpt.SetPageBreak( FALSE ); - aOpt.SetColumnBreak( FALSE ); - aOpt.SetSoftHyph( FALSE ); - aOpt.SetFldName( FALSE ); - aOpt.SetPostIts( FALSE ); - aOpt.SetShowHiddenChar( FALSE ); - aOpt.SetShowHiddenField( FALSE ); - aOpt.SetShowHiddenPara( FALSE ); - aOpt.SetViewHRuler( FALSE ); - aOpt.SetViewVRuler( FALSE ); - aOpt.SetGraphic( TRUE ); - aOpt.SetTable( TRUE ); - aOpt.SetSnap( FALSE ); - aOpt.SetGridVisible( FALSE ); + aOpt.SetPagePreview(sal_True); + aOpt.SetTab( sal_False ); + aOpt.SetBlank( sal_False ); + aOpt.SetHardBlank( sal_False ); + aOpt.SetParagraph( sal_False ); + aOpt.SetLineBreak( sal_False ); + aOpt.SetPageBreak( sal_False ); + aOpt.SetColumnBreak( sal_False ); + aOpt.SetSoftHyph( sal_False ); + aOpt.SetFldName( sal_False ); + aOpt.SetPostIts( sal_False ); + aOpt.SetShowHiddenChar( sal_False ); + aOpt.SetShowHiddenField( sal_False ); + aOpt.SetShowHiddenPara( sal_False ); + aOpt.SetViewHRuler( sal_False ); + aOpt.SetViewVRuler( sal_False ); + aOpt.SetGraphic( sal_True ); + aOpt.SetTable( sal_True ); + aOpt.SetSnap( sal_False ); + aOpt.SetGridVisible( sal_False ); GetViewShell()->ApplyViewOptions( aOpt ); GetViewShell()->ApplyAccessiblityOptions(SW_MOD()->GetAccessibilityOptions()); // adjust view shell option to the same as for print - SwPrtOptions aPrintOptions( GetViewFrame()->GetObjectShell()->GetTitle(0) ); - aPrintOptions.MakeOptions( false ); + SwPrintData const aPrintOptions = *SW_MOD()->GetPrtOptions(false); GetViewShell()->AdjustOptionsForPagePreview( aPrintOptions ); IDocumentSettingAccess* pIDSA = pESh->getIDocumentSettingAccess(); if( pIDSA->get(IDocumentSettingAccess::BROWSE_MODE)) { pIDSA->set(IDocumentSettingAccess::BROWSE_MODE, false); - pESh->CheckBrowseView( TRUE ); + pESh->CheckBrowseView( sal_True ); } GetViewShell()->CalcLayout(); @@ -1220,8 +1215,8 @@ SwPagePreView::SwPagePreView(SfxViewFrame *pViewFrame, SfxViewShell* pOldSh): SetName(String::CreateFromAscii("PageView" )); SetWindow( &aViewWin ); SetHelpId(SW_PAGEPREVIEW); - _CreateScrollbar( TRUE ); - _CreateScrollbar( FALSE ); + _CreateScrollbar( sal_True ); + _CreateScrollbar( sal_False ); SfxObjectShell* pObjShell = pViewFrame->GetObjectShell(); if ( !pOldSh ) @@ -1244,15 +1239,15 @@ SwPagePreView::SwPagePreView(SfxViewFrame *pViewFrame, SfxViewShell* pOldSh): { pVS = ((SwView*)pOldSh)->GetWrtShellPtr(); // save the current ViewData of the previous SwView - pOldSh->WriteUserData( sSwViewData, FALSE ); + pOldSh->WriteUserData( sSwViewData, sal_False ); } else pVS = GetDocShell()->GetWrtShell(); if( pVS ) { // setze die akt. Seite als die erste - USHORT nPhysPg, nVirtPg; - ((SwCrsrShell*)pVS)->GetPageNum( nPhysPg, nVirtPg, TRUE, FALSE ); + sal_uInt16 nPhysPg, nVirtPg; + ((SwCrsrShell*)pVS)->GetPageNum( nPhysPg, nVirtPg, sal_True, sal_False ); if( 1 != aViewWin.GetCol() && 1 == nPhysPg ) --nPhysPg; aViewWin.SetSttPage( nPhysPg ); @@ -1296,7 +1291,7 @@ SwDocShell* SwPagePreView::GetDocShell() return PTR_CAST(SwDocShell, GetViewFrame()->GetObjectShell()); } -int SwPagePreView::_CreateScrollbar( BOOL bHori ) +int SwPagePreView::_CreateScrollbar( sal_Bool bHori ) { Window *pMDI = &GetViewFrame()->GetWindow(); SwScrollbar** ppScrollbar = bHori ? &pHScrollbar : &pVScrollbar; @@ -1307,9 +1302,9 @@ int SwPagePreView::_CreateScrollbar( BOOL bHori ) { pPageUpBtn = new ImageButton(pMDI, SW_RES( BTN_PAGEUP ) ); - pPageUpBtn->SetHelpId(FN_PAGEUP); + pPageUpBtn->SetHelpId(GetStaticInterface()->GetSlot(FN_PAGEUP)->GetCommand()); pPageDownBtn = new ImageButton(pMDI, SW_RES( BTN_PAGEDOWN ) ); - pPageDownBtn->SetHelpId(FN_PAGEDOWN); + pPageDownBtn->SetHelpId(GetStaticInterface()->GetSlot(FN_PAGEDOWN)->GetCommand()); Link aLk( LINK( this, SwPagePreView, BtnPage ) ); pPageUpBtn->SetClickHdl( aLk ); pPageDownBtn->SetClickHdl( aLk ); @@ -1320,7 +1315,7 @@ int SwPagePreView::_CreateScrollbar( BOOL bHori ) *ppScrollbar = new SwScrollbar( pMDI, bHori ); ScrollDocSzChg(); - (*ppScrollbar)->EnableDrag( TRUE ); + (*ppScrollbar)->EnableDrag( sal_True ); (*ppScrollbar)->SetEndScrollHdl( LINK( this, SwPagePreView, EndScrollHdl )); @@ -1362,7 +1357,7 @@ int SwPagePreView::ChgPage( int eMvMode, int bUpdateScrollbar ) { ScrollViewSzChg(); - static USHORT const aInval[] = + static sal_uInt16 aInval[] = { FN_START_OF_DOCUMENT, FN_END_OF_DOCUMENT, FN_PAGEUP, FN_PAGEDOWN, 0 @@ -1375,13 +1370,13 @@ int SwPagePreView::ChgPage( int eMvMode, int bUpdateScrollbar ) } // ab hier alles aus der SwView uebernommen -void SwPagePreView::CalcAndSetBorderPixel( SvBorder &rToFill, BOOL /*bInner*/ ) +void SwPagePreView::CalcAndSetBorderPixel( SvBorder &rToFill, sal_Bool /*bInner*/ ) { const StyleSettings &rSet = aViewWin.GetSettings().GetStyleSettings(); const long nTmp = rSet.GetScrollBarSize(); - if ( pVScrollbar->IsVisible( FALSE )) + if ( pVScrollbar->IsVisible( sal_False )) rToFill.Right() = nTmp; - if ( pHScrollbar->IsVisible( FALSE ) ) + if ( pHScrollbar->IsVisible( sal_False ) ) rToFill.Bottom() = nTmp; SetBorderPixel( rToFill ); } @@ -1389,12 +1384,12 @@ void SwPagePreView::CalcAndSetBorderPixel( SvBorder &rToFill, BOOL /*bInner*/ ) void SwPagePreView::InnerResizePixel( const Point &rOfst, const Size &rSize ) { SvBorder aBorder; - CalcAndSetBorderPixel( aBorder, TRUE ); + CalcAndSetBorderPixel( aBorder, sal_True ); Rectangle aRect( rOfst, rSize ); aRect += aBorder; ViewResizePixel( aViewWin, aRect.TopLeft(), aRect.GetSize(), aViewWin.GetOutputSizePixel(), - TRUE, + sal_True, *pVScrollbar, *pHScrollbar, pPageUpBtn, pPageDownBtn, 0, *pScrollFill ); @@ -1405,9 +1400,9 @@ void SwPagePreView::InnerResizePixel( const Point &rOfst, const Size &rSize ) void SwPagePreView::OuterResizePixel( const Point &rOfst, const Size &rSize ) { SvBorder aBorder; - CalcAndSetBorderPixel( aBorder, FALSE ); + CalcAndSetBorderPixel( aBorder, sal_False ); ViewResizePixel( aViewWin, rOfst, rSize, aViewWin.GetOutputSizePixel(), - FALSE, *pVScrollbar, + sal_False, *pVScrollbar, *pHScrollbar, pPageUpBtn, pPageDownBtn, 0, *pScrollFill ); //EditWin niemals einstellen! @@ -1425,7 +1420,7 @@ void SwPagePreView::OuterResizePixel( const Point &rOfst, const Size &rSize ) } } -void SwPagePreView::SetVisArea( const Rectangle &rRect, BOOL bUpdateScrollbar ) +void SwPagePreView::SetVisArea( const Rectangle &rRect, sal_Bool bUpdateScrollbar ) { const Point aTopLeft(AlignToPixel(rRect.TopLeft())); const Point aBottomRight(AlignToPixel(rRect.BottomRight())); @@ -1484,7 +1479,7 @@ IMPL_LINK( SwPagePreView, ScrollHdl, SwScrollbar *, pScrollbar ) { // wieviele Seiten scrollen ?? String sStateStr(sPageStr); - USHORT nThmbPos = (USHORT)pScrollbar->GetThumbPos(); + sal_uInt16 nThmbPos = (sal_uInt16)pScrollbar->GetThumbPos(); if( 1 == aViewWin.GetCol() || !nThmbPos ) ++nThmbPos; sStateStr += String::CreateFromInt32( nThmbPos ); @@ -1521,7 +1516,7 @@ IMPL_LINK( SwPagePreView, EndScrollHdl, SwScrollbar *, pScrollbar ) if ( GetViewShell()->PagePreviewLayout()->DoesPreviewLayoutRowsFitIntoWindow() ) { // wieviele Seiten scrollen ?? - USHORT nThmbPos = (USHORT)pScrollbar->GetThumbPos(); + sal_uInt16 nThmbPos = (sal_uInt16)pScrollbar->GetThumbPos(); // adjust to new preview functionality if( nThmbPos != aViewWin.SelectedPage() ) { @@ -1542,7 +1537,7 @@ IMPL_LINK( SwPagePreView, EndScrollHdl, SwScrollbar *, pScrollbar ) { aViewWin.SetSttPage( nThmbPos ); aViewWin.SetSelectedPage( nThmbPos ); - ChgPage( SwPagePreViewWin::MV_SCROLL, FALSE ); + ChgPage( SwPagePreViewWin::MV_SCROLL, sal_False ); // update scrollbars ScrollViewSzChg(); } @@ -1582,7 +1577,7 @@ IMPL_LINK( SwPagePreView, EndScrollHdl, SwScrollbar *, pScrollbar ) aViewWin.Scroll(nThmbPos - aViewWin.GetPaintedPreviewDocRect().Left(), 0); } // additional invalidate page status. - static USHORT const aInval[] = + static sal_uInt16 aInval[] = { FN_START_OF_DOCUMENT, FN_END_OF_DOCUMENT, FN_PAGEUP, FN_PAGEDOWN, FN_STAT_PAGE, 0 @@ -1616,7 +1611,7 @@ void SwPagePreView::DocSzChgd( const Size &rSz ) if( aVisArea.GetWidth() ) { - ChgPage( SwPagePreViewWin::MV_CALC, TRUE ); + ChgPage( SwPagePreViewWin::MV_CALC, sal_True ); ScrollDocSzChg(); aViewWin.Invalidate(); @@ -1633,7 +1628,7 @@ void SwPagePreView::ScrollViewSzChg() { //vertical scrolling by row // adjust to new preview functionality - USHORT nVisPages = aViewWin.GetRow() * aViewWin.GetCol(); + sal_uInt16 nVisPages = aViewWin.GetRow() * aViewWin.GetCol(); pVScrollbar->SetVisibleSize( nVisPages ); // set selected page as scroll bar position, // if it is visible. @@ -1698,12 +1693,12 @@ void SwPagePreView::ScrollDocSzChg() } // alles zum Thema Drucken -SfxPrinter* SwPagePreView::GetPrinter( BOOL bCreate ) +SfxPrinter* SwPagePreView::GetPrinter( sal_Bool bCreate ) { return aViewWin.GetViewShell()->getIDocumentDeviceAccess()->getPrinter( bCreate ); } -USHORT SwPagePreView::SetPrinter( SfxPrinter *pNew, USHORT nDiffFlags, bool ) +sal_uInt16 SwPagePreView::SetPrinter( SfxPrinter *pNew, sal_uInt16 nDiffFlags, bool ) { ViewShell &rSh = *GetViewShell(); SfxPrinter* pOld = rSh.getIDocumentDeviceAccess()->getPrinter( false ); @@ -1718,15 +1713,15 @@ USHORT SwPagePreView::SetPrinter( SfxPrinter *pNew, USHORT nDiffFlags, bool ) rESh.SetModified(); } if ( ( nDiffFlags & SFX_PRINTER_OPTIONS ) == SFX_PRINTER_OPTIONS ) - ::SetPrinter( rSh.getIDocumentDeviceAccess(), pNew, FALSE ); + ::SetPrinter( rSh.getIDocumentDeviceAccess(), pNew, sal_False ); - const BOOL bChgOri = nDiffFlags & SFX_PRINTER_CHG_ORIENTATION ? TRUE : FALSE; - const BOOL bChgSize= nDiffFlags & SFX_PRINTER_CHG_SIZE ? TRUE : FALSE; + const sal_Bool bChgOri = nDiffFlags & SFX_PRINTER_CHG_ORIENTATION ? sal_True : sal_False; + const sal_Bool bChgSize= nDiffFlags & SFX_PRINTER_CHG_SIZE ? sal_True : sal_False; if ( bChgOri || bChgSize ) { rESh.StartAllAction(); if ( bChgOri ) - rSh.ChgAllPageOrientation( USHORT(pNew->GetOrientation()) ); + rSh.ChgAllPageOrientation( sal_uInt16(pNew->GetOrientation()) ); if ( bChgSize ) { Size aSz( SvxPaperInfo::GetPaperSize( pNew ) ); @@ -1737,14 +1732,14 @@ USHORT SwPagePreView::SetPrinter( SfxPrinter *pNew, USHORT nDiffFlags, bool ) rESh.SetModified(); rESh.EndAllAction(); - static USHORT const aInval[] = + static sal_uInt16 aInval[] = { SID_ATTR_LONG_ULSPACE, SID_ATTR_LONG_LRSPACE, SID_RULER_BORDERS, SID_RULER_PAGE_POS, 0 }; #if OSL_DEBUG_LEVEL > 1 { - const USHORT* pPtr = aInval + 1; + const sal_uInt16* pPtr = aInval + 1; do { OSL_ENSURE( *(pPtr - 1) < *pPtr, "wrong sorting!" ); } while( *++pPtr ); @@ -1763,14 +1758,6 @@ SfxTabPage* SwPagePreView::CreatePrintOptionsPage( Window *pParent, return ::CreatePrintOptionsPage( pParent, rOptions, !bNormalPrint ); } -PrintDialog* SwPagePreView::CreatePrintDialog( Window *pParent ) -{ - PrintDialog *pDlg = ::CreatePrintDialog( pParent, 1, 0 ); - pDlg->DisableRange( PRINTDIALOG_SELECTION ); - return pDlg; -} - -// no longer needed ?? Size SwPagePreView::GetOptimalSizePixel() const { OSL_ENSURE( false, "overloaded virtual method <SwPagePreView::GetOptimalSizePixel()> needed ??" ); @@ -1843,7 +1830,7 @@ void SwPagePreViewWin::AdjustPreviewToNewZoom( const sal_uInt16 _nZoomFactor, * when less than the desired number of rows fits into * the view */ -void SwPagePreViewWin::Scroll(long nXMove, long nYMove, USHORT /*nFlags*/) +void SwPagePreViewWin::Scroll(long nXMove, long nYMove, sal_uInt16 /*nFlags*/) { maPaintedPreviewDocRect.Move(nXMove, nYMove); mpPgPrevwLayout->Prepare( 0, maPaintedPreviewDocRect.TopLeft(), @@ -1852,16 +1839,16 @@ void SwPagePreViewWin::Scroll(long nXMove, long nYMove, USHORT /*nFlags*/) } -BOOL SwPagePreView::HandleWheelCommands( const CommandEvent& rCEvt ) +sal_Bool SwPagePreView::HandleWheelCommands( const CommandEvent& rCEvt ) { - BOOL bOk = FALSE; + sal_Bool bOk = sal_False; const CommandWheelData* pWData = rCEvt.GetWheelData(); if( pWData && COMMAND_WHEEL_ZOOM == pWData->GetMode() ) { if(!Application::GetSettings().GetMiscSettings().GetEnableATToolSupport()) { - USHORT nFactor = GetViewShell()->GetViewOptions()->GetZoom(); - const USHORT nOffset = 10; + sal_uInt16 nFactor = GetViewShell()->GetViewOptions()->GetZoom(); + const sal_uInt16 nOffset = 10; if( 0L > pWData->GetDelta() ) { nFactor -= nOffset; @@ -1876,7 +1863,7 @@ BOOL SwPagePreView::HandleWheelCommands( const CommandEvent& rCEvt ) } SetZoom(SVX_ZOOM_PERCENT, nFactor); } - bOk = TRUE; + bOk = sal_True; } else bOk = aViewWin.HandleScrollCommand( rCEvt, pHScrollbar, pVScrollbar ); @@ -1909,7 +1896,7 @@ void SwPagePreView::ShowVScrollbar(sal_Bool bShow) InvalidateBorder(); } -void SwPagePreView::SetZoom(SvxZoomType eType, USHORT nFactor) +void SwPagePreView::SetZoom(SvxZoomType eType, sal_uInt16 nFactor) { ViewShell& rSh = *GetViewShell(); SwViewOption aOpt(*rSh.GetViewOptions()); diff --git a/sw/source/ui/uiview/pview.src b/sw/source/ui/uiview/pview.src index 4b97c83c43..0cfd2b1ec0 100644 --- a/sw/source/ui/uiview/pview.src +++ b/sw/source/ui/uiview/pview.src @@ -29,7 +29,6 @@ #include "pview.hrc" #include "helpid.h" #include "cmdid.h" - ModalDialog DLG_PAGEPREVIEW_ZOOM { HelpID = HID_PPREV_ZOOM ; @@ -54,6 +53,7 @@ ModalDialog DLG_PAGEPREVIEW_ZOOM }; NumericField ED_COL { + HelpID = "sw:NumericField:DLG_PAGEPREVIEW_ZOOM:ED_COL"; Border = TRUE ; Size = MAP_APPFONT ( 28 , 12 ) ; Pos = MAP_APPFONT ( 48 , 34 ) ; @@ -69,6 +69,7 @@ ModalDialog DLG_PAGEPREVIEW_ZOOM }; NumericField ED_ROW { + HelpID = "sw:NumericField:DLG_PAGEPREVIEW_ZOOM:ED_ROW"; Border = TRUE ; Pos = MAP_APPFONT ( 48 , 13 ) ; Size = MAP_APPFONT ( 28 , 12 ) ; @@ -106,92 +107,4 @@ String RID_PVIEW_TOOLBOX { Text [ en-US ] = "Page Preview" ; }; -ToolBox RID_PVIEW_TOOLBOX -{ - Border = TRUE ; - SVLook = TRUE ; - Dockable = TRUE ; - Moveable = TRUE ; - Sizeable = TRUE ; - Closeable = TRUE ; - Zoomable = TRUE ; - LineSpacing = TRUE ; - HideWhenDeactivate = TRUE ; - Customize = TRUE ; - HelpID = HID_PVIEW_TOOLBOX ; - ItemList = - { - ToolBoxItem - { - Identifier = FN_PAGEUP ; - HelpID = FN_PAGEUP ; - }; - ToolBoxItem - { - Identifier = FN_PAGEDOWN ; - HelpID = FN_PAGEDOWN ; - }; - ToolBoxItem - { - Identifier = FN_START_OF_DOCUMENT ; - HelpID = FN_START_OF_DOCUMENT ; - }; - ToolBoxItem - { - Identifier = FN_END_OF_DOCUMENT ; - HelpID = FN_END_OF_DOCUMENT ; - }; - ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; }; - ToolBoxItem - { - Identifier = FN_SHOW_TWO_PAGES ; - HelpID = FN_SHOW_TWO_PAGES ; - }; - ToolBoxItem - { - Identifier = FN_SHOW_MULTIPLE_PAGES ; - HelpID = FN_SHOW_MULTIPLE_PAGES ; - DropDown = TRUE; - }; - ToolBoxItem - { - Identifier = FN_SHOW_BOOKVIEW ; - HelpID = FN_SHOW_BOOKVIEW ; - }; - ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; }; - ToolBoxItem - { - Identifier = SID_ZOOM_OUT; - HelpID = SID_ZOOM_OUT ; - }; - ToolBoxItem - { - Identifier = SID_ZOOM_IN; - HelpID = SID_ZOOM_IN ; - }; - ToolBoxItem - { - Identifier = FN_PREVIEW_ZOOM; - HelpID = HID_PREVIEW_ZOOM ; - }; - ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; }; - ToolBoxItem - { - Identifier = SID_WIN_FULLSCREEN ; - HelpID = SID_WIN_FULLSCREEN ; - }; - ToolBoxItem - { - Identifier = FN_PRINT_PAGEPREVIEW ; - HelpID = FN_PRINT_PAGEPREVIEW ; - }; - ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; }; - ToolBoxItem - { - Identifier = FN_CLOSE_PAGEPREVIEW; - HelpID = SID_PRINTPREVIEW; - }; - }; - Scroll = TRUE ; -}; diff --git a/sw/source/ui/uiview/scroll.cxx b/sw/source/ui/uiview/scroll.cxx index e8b6f4f33e..2589dc09d4 100644 --- a/sw/source/ui/uiview/scroll.cxx +++ b/sw/source/ui/uiview/scroll.cxx @@ -36,18 +36,18 @@ #define SCROLL_LINE_SIZE 250 -SwScrollbar::SwScrollbar( Window *pWin, BOOL bHoriz ) : +SwScrollbar::SwScrollbar( Window *pWin, sal_Bool bHoriz ) : ScrollBar( pWin, WinBits( WB_3DLOOK | WB_HIDE | ( bHoriz ? WB_HSCROLL : WB_VSCROLL) ) ), bHori( bHoriz ), - bAuto( FALSE ), - bThumbEnabled( TRUE ), - bVisible(FALSE), - bSizeSet(FALSE) + bAuto( sal_False ), + bThumbEnabled( sal_True ), + bVisible(sal_False), + bSizeSet(sal_False) { // SSA: --- RTL --- no mirroring for horizontal scrollbars if( bHoriz ) - EnableRTL( FALSE ); + EnableRTL( sal_False ); } @@ -62,7 +62,7 @@ void SwScrollbar::DocSzChgd( const Size &rSize ) { aDocSz = rSize; SetRange( Range( 0, bHori ? rSize.Width() : rSize.Height()) ); - const ULONG nVisSize = GetVisibleSize(); + const sal_uLong nVisSize = GetVisibleSize(); SetLineSize( SCROLL_LINE_SIZE ); SetPageSize( nVisSize * 77 / 100 ); } @@ -95,7 +95,7 @@ void SwScrollbar::ViewPortChgd( const Rectangle &rRect ) AutoShow(); } -void SwScrollbar::ExtendedShow( BOOL bSet ) +void SwScrollbar::ExtendedShow( sal_Bool bSet ) { bVisible = bSet; if( (!bSet || !bAuto) && IsUpdateMode() && bSizeSet) @@ -105,13 +105,13 @@ void SwScrollbar::ExtendedShow( BOOL bSet ) void SwScrollbar::SetPosSizePixel( const Point& rNewPos, const Size& rNewSize ) { ScrollBar::SetPosSizePixel(rNewPos, rNewSize); - bSizeSet = TRUE; + bSizeSet = sal_True; if(bVisible) ExtendedShow(); } -void SwScrollbar::SetAuto(BOOL bSet) +void SwScrollbar::SetAuto(sal_Bool bSet) { if(bAuto != bSet) { @@ -119,7 +119,7 @@ void SwScrollbar::SetAuto(BOOL bSet) // automatisch versteckt - dann anzeigen if(!bAuto && bVisible && !ScrollBar::IsVisible()) - ExtendedShow(TRUE); + ExtendedShow(sal_True); else if(bAuto) AutoShow(); // oder automatisch verstecken } @@ -132,14 +132,14 @@ void SwScrollbar::AutoShow() if( nVis >= nLen - 1) { if(ScrollBar::IsVisible()) - ScrollBar::Show(FALSE); + ScrollBar::Show(sal_False); } else if ( !ScrollBar::IsVisible() && (!bHori || nVis) ) //Optimierung fuer Browser. //Horizontaler Scrollbar per //default aus. { - ScrollBar::Show(TRUE); + ScrollBar::Show(sal_True); } } diff --git a/sw/source/ui/uiview/srcview.cxx b/sw/source/ui/uiview/srcview.cxx index 7e4adbd64d..5ac3120a30 100644 --- a/sw/source/ui/uiview/srcview.cxx +++ b/sw/source/ui/uiview/srcview.cxx @@ -50,6 +50,8 @@ #include <svl/whiter.hxx> #include <unotools/saveopt.hxx> #include <svtools/transfer.hxx> +#include <svtools/svtools.hrc> +#include <svtools/svtdata.hxx> #include <svx/svxids.hrc> #include <svtools/htmlcfg.hxx> #include <sfx2/app.hxx> @@ -89,10 +91,6 @@ #include <com/sun/star/ui/dialogs/XFilterManager.hpp> #include <sfx2/filedlghelper.hxx> #define SwSrcView -#define SearchSettings -#define _ExecSearch Execute -#define _StateSearch GetState -#include <svx/svxslots.hxx> #include "swslots.hxx" #include <unomid.h> @@ -140,7 +138,7 @@ SFX_IMPL_INTERFACE( SwSrcView, SfxViewShell, SW_RES(0) ) TYPEINIT1(SwSrcView, SfxViewShell) -void lcl_PrintHeader( OutputDevice &rOutDev, USHORT nPages, USHORT nCurPage, const String& rTitle ) +void lcl_PrintHeader( OutputDevice &rOutDev, sal_uInt16 nPages, sal_uInt16 nCurPage, const String& rTitle ) { short nLeftMargin = LMARGPRN; Size aSz = rOutDev.GetOutputSize(); @@ -211,8 +209,8 @@ void lcl_ConvertTabsToSpaces( String& rLine ) { if ( rLine.Len() ) { - USHORT nPos = 0; - USHORT nMax = rLine.Len(); + sal_uInt16 nPos = 0; + sal_uInt16 nMax = rLine.Len(); while ( nPos < nMax ) { if ( rLine.GetChar(nPos) == '\t' ) @@ -233,7 +231,7 @@ SwSrcView::SwSrcView(SfxViewFrame* pViewFrame, SfxViewShell*) : SfxViewShell( pViewFrame, SWSRCVIEWFLAGS ), aEditWin( &pViewFrame->GetWindow(), this ), pSearchItem(0), - bSourceSaved(FALSE), + bSourceSaved(sal_False), eLoadEncoding(RTL_TEXTENCODING_DONTKNOW) { Init(); @@ -244,7 +242,7 @@ SwSrcView::~SwSrcView() SwDocShell* pDocShell = GetDocShell(); OSL_ENSURE(PTR_CAST(SwWebDocShell, pDocShell), "Wieso keine WebDocShell?"); const TextSelection& rSel = aEditWin.GetTextView()->GetSelection(); - ((SwWebDocShell*)pDocShell)->SetSourcePara( static_cast< USHORT >( rSel.GetStart().GetPara() ) ); + ((SwWebDocShell*)pDocShell)->SetSourcePara( static_cast< sal_uInt16 >( rSel.GetStart().GetPara() ) ); uno::Reference<document::XDocumentPropertiesSupplier> xDPS( pDocShell->GetModel(), uno::UNO_QUERY_THROW); @@ -277,10 +275,10 @@ void SwSrcView::Init() Load(pDocShell); else { - aEditWin.SetReadonly(TRUE); + aEditWin.SetReadonly(sal_True); } - StartListening(*pDocShell,TRUE); + StartListening(*pDocShell,sal_True); } SwDocShell* SwSrcView::GetDocShell() @@ -291,7 +289,7 @@ SwDocShell* SwSrcView::GetDocShell() void SwSrcView::SaveContent(const String& rTmpFile) { - SfxMedium aMedium( rTmpFile, STREAM_WRITE, TRUE); + SfxMedium aMedium( rTmpFile, STREAM_WRITE, sal_True); SvStream* pOutStream = aMedium.GetOutStream(); pOutStream->SetStreamCharSet( lcl_GetStreamCharSet(eLoadEncoding) ); aEditWin.Write(*pOutStream); @@ -300,7 +298,7 @@ void SwSrcView::SaveContent(const String& rTmpFile) void SwSrcView::Execute(SfxRequest& rReq) { - USHORT nSlot = rReq.GetSlot(); + sal_uInt16 nSlot = rReq.GetSlot(); TextView* pTextView = aEditWin.GetTextView(); switch( nSlot ) { @@ -339,7 +337,7 @@ void SwSrcView::Execute(SfxRequest& rReq) { SfxMedium aMedium( xFP->getFiles().getConstArray()[0], STREAM_WRITE | STREAM_SHARE_DENYNONE, - FALSE ); + sal_False ); SvStream* pOutStream = aMedium.GetOutStream(); pOutStream->SetStreamCharSet(lcl_GetStreamCharSet(eLoadEncoding)); aEditWin.Write( *pOutStream ); @@ -378,11 +376,11 @@ void SwSrcView::Execute(SfxRequest& rReq) { const SfxItemSet* pTmpArgs = rReq.GetArgs(); - USHORT nWhich = pTmpArgs->GetWhichByPos( 0 ); + sal_uInt16 nWhich = pTmpArgs->GetWhichByPos( 0 ); OSL_ENSURE( nWhich, "Wich fuer SearchItem ?" ); const SfxPoolItem& rItem = pTmpArgs->Get( nWhich ); SetSearchItem( (const SvxSearchItem&)rItem); - StartSearchAndReplace( (const SvxSearchItem&)rItem, FALSE, rReq.IsAPI() ); + StartSearchAndReplace( (const SvxSearchItem&)rItem, sal_False, rReq.IsAPI() ); if(aEditWin.IsModified()) GetDocShell()->GetDoc()->SetModified(); } @@ -392,7 +390,7 @@ void SwSrcView::Execute(SfxRequest& rReq) SvxSearchItem* pSrchItem = GetSearchItem(); if(pSrchItem) { - StartSearchAndReplace( *pSrchItem, FALSE, rReq.IsAPI() ); + StartSearchAndReplace( *pSrchItem, sal_False, rReq.IsAPI() ); if(aEditWin.IsModified()) GetDocShell()->GetDoc()->SetModified(); } @@ -406,11 +404,11 @@ void SwSrcView::Execute(SfxRequest& rReq) break; case SID_UNDO: pTextView->Undo(); - GetViewFrame()->GetBindings().InvalidateAll(FALSE); + GetViewFrame()->GetBindings().InvalidateAll(sal_False); break; case SID_REDO: pTextView->Redo(); - GetViewFrame()->GetBindings().InvalidateAll(FALSE); + GetViewFrame()->GetBindings().InvalidateAll(sal_False); break; case SID_REPEAT: break; @@ -435,7 +433,7 @@ void SwSrcView::Execute(SfxRequest& rReq) void SwSrcView::GetState(SfxItemSet& rSet) { SfxWhichIter aIter(rSet); - USHORT nWhich = aIter.FirstWhich(); + sal_uInt16 nWhich = aIter.FirstWhich(); TextView* pTextView = aEditWin.GetTextView(); while(nWhich) @@ -469,7 +467,7 @@ void SwSrcView::GetState(SfxItemSet& rSet) break; case SID_SEARCH_OPTIONS: { - USHORT nOpt = SRC_SEARCHOPTIONS; + sal_uInt16 nOpt = SRC_SEARCHOPTIONS; if(GetDocShell()->IsReadOnly()) nOpt &= ~(SEARCH_OPTIONS_REPLACE|SEARCH_OPTIONS_REPLACE_ALL); @@ -502,14 +500,14 @@ void SwSrcView::GetState(SfxItemSet& rSet) case SID_UNDO: case SID_REDO: { - SfxUndoManager& rMgr = pTextView->GetTextEngine()->GetUndoManager(); - USHORT nCount = 0; + ::svl::IUndoManager& rMgr = pTextView->GetTextEngine()->GetUndoManager(); + sal_uInt16 nCount = 0; if(nWhich == SID_UNDO) { nCount = rMgr.GetUndoActionCount(); if(nCount) { - String aStr(ResId( STR_UNDO, *SFX_APP()->GetSfxResManager() ));; + String aStr(SvtResId( STR_UNDO));; aStr += rMgr.GetUndoActionComment(--nCount); rSet.Put(SfxStringItem(nWhich, aStr)); } @@ -521,7 +519,7 @@ void SwSrcView::GetState(SfxItemSet& rSet) nCount = rMgr.GetRedoActionCount(); if(nCount) { - String aStr(ResId( STR_REDO, *SFX_APP()->GetSfxResManager() ));; + String aStr(SvtResId( STR_REDO));; aStr += rMgr.GetRedoActionComment(--nCount); rSet.Put(SfxStringItem(nWhich,aStr)); } @@ -550,7 +548,7 @@ void SwSrcView::GetState(SfxItemSet& rSet) TransferableDataHelper aDataHelper( TransferableDataHelper::CreateFromSystemClipboard( &aEditWin) ); - BOOL bDisable = !aDataHelper.GetXTransferable().is() || + sal_Bool bDisable = !aDataHelper.GetXTransferable().is() || 0 == aDataHelper.GetFormatCount(); if( bDisable ) rSet.DisableItem(nWhich); @@ -576,20 +574,20 @@ void SwSrcView::SetSearchItem( const SvxSearchItem& rItem ) pSearchItem = (SvxSearchItem*)rItem.Clone(); } -USHORT SwSrcView::StartSearchAndReplace(const SvxSearchItem& rSearchItem, - BOOL bFromStart, - BOOL bApi, - BOOL bRecursive) +sal_uInt16 SwSrcView::StartSearchAndReplace(const SvxSearchItem& rSearchItem, + sal_Bool bFromStart, + sal_Bool bApi, + sal_Bool bRecursive) { ExtTextView* pTextView = aEditWin.GetTextView(); TextSelection aSel; TextPaM aPaM; - BOOL bForward = !rSearchItem.GetBackward(); - BOOL bAtStart = pTextView->GetSelection() == TextSelection( aPaM, aPaM ); + sal_Bool bForward = !rSearchItem.GetBackward(); + sal_Bool bAtStart = pTextView->GetSelection() == TextSelection( aPaM, aPaM ); if( !bForward ) - aPaM = TextPaM( (ULONG)-1, (USHORT)-1 ); + aPaM = TextPaM( (sal_uLong)-1, (sal_uInt16)-1 ); if( bFromStart ) { @@ -601,8 +599,8 @@ USHORT SwSrcView::StartSearchAndReplace(const SvxSearchItem& rSearchItem, aSearchOpt.Locale = SvxCreateLocale( static_cast< LanguageType >( GetAppLanguage() ) ); - USHORT nFound; - BOOL bAll = FALSE; + sal_uInt16 nFound; + sal_Bool bAll = sal_False; switch( rSearchItem.GetCommand() ) { case SVX_SEARCHCMD_FIND: @@ -610,7 +608,7 @@ USHORT SwSrcView::StartSearchAndReplace(const SvxSearchItem& rSearchItem, nFound = pTextView->Search( aSearchOpt, bForward ); break; - case SVX_SEARCHCMD_REPLACE_ALL: bAll = TRUE; + case SVX_SEARCHCMD_REPLACE_ALL: bAll = sal_True; case SVX_SEARCHCMD_REPLACE: nFound = pTextView->Replace( aSearchOpt, bAll, bForward ); break; @@ -621,7 +619,7 @@ USHORT SwSrcView::StartSearchAndReplace(const SvxSearchItem& rSearchItem, if( !nFound ) { - BOOL bNotFoundMessage = FALSE; + sal_Bool bNotFoundMessage = sal_False; if(!bRecursive) { if(!bFromStart) @@ -630,13 +628,13 @@ USHORT SwSrcView::StartSearchAndReplace(const SvxSearchItem& rSearchItem, } else { - bNotFoundMessage = TRUE; + bNotFoundMessage = sal_True; pTextView->SetSelection( aSel ); } } else if(bAtStart) { - bNotFoundMessage = TRUE; + bNotFoundMessage = sal_True; } @@ -651,14 +649,14 @@ USHORT SwSrcView::StartSearchAndReplace(const SvxSearchItem& rSearchItem, : MSG_SEARCH_START)).Execute()) { pTextView->SetSelection( TextSelection( aPaM, aPaM ) ); - StartSearchAndReplace( rSearchItem, FALSE, FALSE, TRUE ); + StartSearchAndReplace( rSearchItem, sal_False, sal_False, sal_True ); } } } return nFound; } -USHORT SwSrcView::SetPrinter(SfxPrinter* pNew, USHORT nDiffFlags, bool ) +sal_uInt16 SwSrcView::SetPrinter(SfxPrinter* pNew, sal_uInt16 nDiffFlags, bool ) { SwDocShell* pDocSh = GetDocShell(); if ( (SFX_PRINTER_JOBSETUP | SFX_PRINTER_PRINTER) & nDiffFlags ) @@ -668,10 +666,10 @@ USHORT SwSrcView::SetPrinter(SfxPrinter* pNew, USHORT nDiffFlags, bool ) pDocSh->SetModified(); } if ( nDiffFlags & SFX_PRINTER_OPTIONS ) - ::SetPrinter( pDocSh->getIDocumentDeviceAccess(), pNew, TRUE ); + ::SetPrinter( pDocSh->getIDocumentDeviceAccess(), pNew, sal_True ); - const BOOL bChgOri = nDiffFlags & SFX_PRINTER_CHG_ORIENTATION ? TRUE : FALSE; - const BOOL bChgSize= nDiffFlags & SFX_PRINTER_CHG_SIZE ? TRUE : FALSE; + const sal_Bool bChgOri = nDiffFlags & SFX_PRINTER_CHG_ORIENTATION ? sal_True : sal_False; + const sal_Bool bChgSize= nDiffFlags & SFX_PRINTER_CHG_SIZE ? sal_True : sal_False; if ( bChgOri || bChgSize ) { pDocSh->SetModified(); @@ -679,7 +677,7 @@ USHORT SwSrcView::SetPrinter(SfxPrinter* pNew, USHORT nDiffFlags, bool ) return 0; } -SfxPrinter* SwSrcView::GetPrinter( BOOL bCreate ) +SfxPrinter* SwSrcView::GetPrinter( sal_Bool bCreate ) { return GetDocShell()->GetDoc()->getPrinter( bCreate ); } @@ -710,32 +708,32 @@ sal_Int32 SwSrcView::PrintSource( String aTitle( GetViewFrame()->GetWindow().GetText() ); - USHORT nLineHeight = (USHORT) pOutDev->GetTextHeight(); // etwas mehr. - USHORT nParaSpace = 10; + sal_uInt16 nLineHeight = (sal_uInt16) pOutDev->GetTextHeight(); // etwas mehr. + sal_uInt16 nParaSpace = 10; Size aPaperSz = pOutDev->GetOutputSize(); aPaperSz.Width() -= (LMARGPRN + RMARGPRN); aPaperSz.Height() -= (TMARGPRN + BMARGPRN); // nLinepPage stimmt nicht, wenn Zeilen umgebrochen werden muessen... - USHORT nLinespPage = (USHORT) (aPaperSz.Height() / nLineHeight); - USHORT nCharspLine = (USHORT) (aPaperSz.Width() / pOutDev->GetTextWidth( 'X' )); - USHORT nParas = static_cast< USHORT >( pTextEngine->GetParagraphCount() ); + sal_uInt16 nLinespPage = (sal_uInt16) (aPaperSz.Height() / nLineHeight); + sal_uInt16 nCharspLine = (sal_uInt16) (aPaperSz.Width() / pOutDev->GetTextWidth( 'X' )); + sal_uInt16 nParas = static_cast< sal_uInt16 >( pTextEngine->GetParagraphCount() ); - USHORT nPages = (USHORT) (nParas / nLinespPage + 1 ); - USHORT nCurPage = 1; + sal_uInt16 nPages = (sal_uInt16) (nParas / nLinespPage + 1 ); + sal_uInt16 nCurPage = 1; // Header drucken... if (!bCalcNumPagesOnly && nPage == nCurPage) lcl_PrintHeader( *pOutDev, nPages, nCurPage, aTitle ); const Point aStartPos( LMARGPRN, TMARGPRN ); Point aPos( aStartPos ); - for ( USHORT nPara = 0; nPara < nParas; ++nPara ) + for ( sal_uInt16 nPara = 0; nPara < nParas; ++nPara ) { String aLine( pTextEngine->GetText( nPara ) ); lcl_ConvertTabsToSpaces( aLine ); - USHORT nLines = aLine.Len() / nCharspLine + 1; - for ( USHORT nLine = 0; nLine < nLines; ++nLine ) + sal_uInt16 nLines = aLine.Len() / nCharspLine + 1; + for ( sal_uInt16 nLine = 0; nLine < nLines; ++nLine ) { String aTmpLine( aLine, nLine * nCharspLine, nCharspLine ); aPos.Y() += nLineHeight; @@ -772,7 +770,7 @@ void SwSrcView::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) { // Broadcast kommt nur einmal! const SwDocShell* pDocSh = GetDocShell(); - const BOOL bReadonly = pDocSh->IsReadOnly(); + const sal_Bool bReadonly = pDocSh->IsReadOnly(); aEditWin.SetReadonly(bReadonly); } SfxViewShell::Notify(rBC, rHint); @@ -790,8 +788,8 @@ void SwSrcView::Load(SwDocShell* pDocShell) SfxMedium* pMedium = pDocShell->GetMedium(); const SfxFilter* pFilter = pMedium->GetFilter(); - BOOL bHtml = pFilter && pFilter->GetUserData().EqualsAscii("HTML"); - BOOL bDocModified = pDocShell->IsModified(); + sal_Bool bHtml = pFilter && pFilter->GetUserData().EqualsAscii("HTML"); + sal_Bool bDocModified = pDocShell->IsModified(); if(bHtml && !bDocModified && pDocShell->HasName()) { SvStream* pStream = pMedium->GetInStream(); @@ -815,9 +813,9 @@ void SwSrcView::Load(SwDocShell* pDocShell) pStream->SetStreamCharSet( eDestEnc ); pStream->Seek(0); TextEngine* pTextEngine = aEditWin.GetTextEngine(); - pTextEngine->EnableUndo(FALSE); + pTextEngine->EnableUndo(sal_False); aEditWin.Read(*pStream); - pTextEngine->EnableUndo(TRUE); + pTextEngine->EnableUndo(sal_True); } else { @@ -833,18 +831,18 @@ void SwSrcView::Load(SwDocShell* pDocShell) SvtSaveOptions aOpt; { - SfxMedium aMedium( sFileURL,STREAM_READWRITE, TRUE ); + SfxMedium aMedium( sFileURL,STREAM_READWRITE, sal_True ); SwWriter aWriter( aMedium, *pDocShell->GetDoc() ); WriterRef xWriter; ::GetHTMLWriter(aEmptyStr, aMedium.GetBaseURL( true ), xWriter); String sWriteName = pDocShell->HasName() ? pMedium->GetName() : (const String&) sFileURL; - ULONG nRes = aWriter.Write(xWriter, &sWriteName); + sal_uLong nRes = aWriter.Write(xWriter, &sWriteName); if(nRes) { ErrorHandler::HandleError(ErrCode(nRes)); - aEditWin.SetReadonly(TRUE); + aEditWin.SetReadonly(sal_True); } aMedium.Commit(); SvStream* pInStream = aMedium.GetInStream(); @@ -862,9 +860,9 @@ void SwSrcView::Load(SwDocShell* pDocShell) if(bDocModified) pDocShell->SetModified();// das Flag wird zwischendurch zurueckgesetzt // AutoLoad abschalten - pDocShell->SetAutoLoad(INetURLObject(), 0, FALSE); + pDocShell->SetAutoLoad(INetURLObject(), 0, sal_False); OSL_ENSURE(PTR_CAST(SwWebDocShell, pDocShell), "Wieso keine WebDocShell?"); - USHORT nLine = ((SwWebDocShell*)pDocShell)->GetSourcePara(); + sal_uInt16 nLine = ((SwWebDocShell*)pDocShell)->GetSourcePara(); aEditWin.SetStartLine(nLine); aEditWin.GetTextEngine()->ResetUndo(); aEditWin.GetOutWin()->GrabFocus(); diff --git a/sw/source/ui/uiview/swcli.cxx b/sw/source/ui/uiview/swcli.cxx index aea6565fc1..344c9bb680 100644 --- a/sw/source/ui/uiview/swcli.cxx +++ b/sw/source/ui/uiview/swcli.cxx @@ -28,20 +28,23 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" -#include <com/sun/star/embed/NoVisualAreaSizeException.hpp> +#include <com/sun/star/embed/NoVisualAreaSizeException.hpp> #include <wrtsh.hxx> +#include <doc.hxx> #include <swtypes.hxx> #include <view.hxx> #include <edtwin.hxx> #include <swcli.hxx> +#include <cmdid.h> +#include <cfgitems.hxx> #include <toolkit/helper/vclunohelper.hxx> using namespace com::sun::star; SwOleClient::SwOleClient( SwView *pView, SwEditWin *pWin, const svt::EmbeddedObjectRef& xObj ) : - SfxInPlaceClient( pView, pWin, xObj.GetViewAspect() ), bInDoVerb( FALSE ), + SfxInPlaceClient( pView, pWin, xObj.GetViewAspect() ), bInDoVerb( sal_False ), bOldCheckForOLEInCaption( pView->GetWrtShell().IsCheckForOLEInCaption() ) { SetObject( xObj.GetObject() ); @@ -155,11 +158,11 @@ void SwOleClient::ViewChanged() aVisSize.Height()= Fraction( aVisSize.Height() ) * GetScaleHeight(); SwRect aRect( Point( LONG_MIN, LONG_MIN ), aVisSize ); - rSh.LockView( TRUE ); //Scrollen im EndAction verhindern + rSh.LockView( sal_True ); //Scrollen im EndAction verhindern rSh.StartAllAction(); rSh.RequestObjectResize( aRect, GetObject() ); rSh.EndAllAction(); - rSh.LockView( FALSE ); + rSh.LockView( sal_False ); } void SwOleClient::MakeVisible() @@ -168,4 +171,16 @@ void SwOleClient::MakeVisible() rSh.MakeObjVisible( GetObject() ); } +void SwOleClient::FormatChanged() +{ + const uno::Reference < embed::XEmbeddedObject >& xObj( GetObject() ); + SwView * pView = dynamic_cast< SwView * >( GetViewShell() ); + if ( pView && xObj.is() && SotExchange::IsMath( xObj->getClassID() ) ) + { + SwWrtShell & rWrtSh = pView->GetWrtShell(); + if (rWrtSh.GetDoc()->get( IDocumentSettingAccess::MATH_BASELINE_ALIGNMENT )) + rWrtSh.AlignFormulaToBaseline( xObj ); + } +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/uiview/uivwimp.cxx b/sw/source/ui/uiview/uivwimp.cxx index 80f3758d81..0563c27af6 100644 --- a/sw/source/ui/uiview/uivwimp.cxx +++ b/sw/source/ui/uiview/uivwimp.cxx @@ -98,7 +98,7 @@ SwView_Impl::~SwView_Impl() pScanEvtLstnr->ViewDestroyed(); if( xClipEvtLstnr.is() ) { - pClipEvtLstnr->AddRemoveListener( FALSE ); + pClipEvtLstnr->AddRemoveListener( sal_False ); pClipEvtLstnr->ViewDestroyed(); } delete pConfigItem; @@ -125,12 +125,12 @@ SwXTextView* SwView_Impl::GetUNOObject_Impl() void SwView_Impl::ExecuteScan( SfxRequest& rReq ) { - USHORT nSlot = rReq.GetSlot(); + sal_uInt16 nSlot = rReq.GetSlot(); switch(nSlot) { case SID_TWAIN_SELECT: { - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; Reference< XScannerManager > xScanMgr = SW_MOD()->GetScannerManager(); if( xScanMgr.is() ) @@ -162,7 +162,7 @@ void SwView_Impl::ExecuteScan( SfxRequest& rReq ) case SID_TWAIN_TRANSFER: { - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; Reference< XScannerManager > xScanMgr = SW_MOD()->GetScannerManager(); if( xScanMgr.is() ) @@ -175,7 +175,7 @@ void SwView_Impl::ExecuteScan( SfxRequest& rReq ) { Reference< XEventListener > xLstner = &rListener; xScanMgr->startScan( aContexts.getConstArray()[ 0 ], xLstner ); - bDone = TRUE; + bDone = sal_True; } } catch(...) @@ -212,7 +212,7 @@ void SwView_Impl::AddClipboardListener() if(!xClipEvtLstnr.is()) { xClipEvtLstnr = pClipEvtLstnr = new SwClipboardChangeListener( *pView ); - pClipEvtLstnr->AddRemoveListener( TRUE ); + pClipEvtLstnr->AddRemoveListener( sal_True ); } } @@ -265,7 +265,7 @@ SwScannerEventListener::~SwScannerEventListener() void SAL_CALL SwScannerEventListener::disposing( const EventObject& rEventObject) throw(uno::RuntimeException) { -#if defined WIN || defined WNT || defined UNX +#if defined WNT || defined UNX SolarMutexGuard aGuard; if( pView ) pView->ScannerEventHdl( rEventObject ); @@ -307,7 +307,7 @@ void SAL_CALL SwClipboardChangeListener::changedContents( const CLIP_NMSPC::Clip } } -void SwClipboardChangeListener::AddRemoveListener( BOOL bAdd ) +void SwClipboardChangeListener::AddRemoveListener( sal_Bool bAdd ) { pView->AddRemoveClipboardListener( Reference< XClipboardListener >( this ), bAdd ); } diff --git a/sw/source/ui/uiview/view.cxx b/sw/source/ui/uiview/view.cxx index 49e48d9c97..36c1d96082 100644 --- a/sw/source/ui/uiview/view.cxx +++ b/sw/source/ui/uiview/view.cxx @@ -39,7 +39,6 @@ #include <svl/eitem.hxx> #include <unotools/undoopt.hxx> #include <unotools/lingucfg.hxx> -#include <svtools/printdlg.hxx> #include <unotools/useroptions.hxx> #include <sfx2/dispatch.hxx> #include <sfx2/request.hxx> @@ -81,6 +80,7 @@ #include <usrpref.hxx> #include <srcview.hxx> #include <doc.hxx> +#include <IDocumentUndoRedo.hxx> #include <drawdoc.hxx> #include <wdocsh.hxx> #include <wview.hxx> @@ -94,7 +94,6 @@ #include <frmui.hrc> #include <cfgitems.hxx> #include <prtopt.hxx> -#include <swprtopt.hxx> #include <linguistic/lngprops.hxx> #include <editeng/unolingu.hxx> #include <com/sun/star/frame/FrameSearchFlag.hpp> @@ -174,7 +173,7 @@ void SwView::ImpSetVerb( int nSelType ) } if ( bResetVerbs ) { - SetVerbs( 0 ); + SetVerbs( Sequence< embed::VerbDescriptor >() ); bVerbsActive = sal_False; } } @@ -278,7 +277,7 @@ void SwView::SelectShell() rDispatcher.Flush(); // alle gecachten Shells wirklich loeschen //Zur alten Selektion merken welche Toolbar sichtbar war - USHORT nId = static_cast< USHORT >( rDispatcher.GetObjectBarId( SFX_OBJECTBAR_OBJECT )); + sal_uInt16 nId = static_cast< sal_uInt16 >( rDispatcher.GetObjectBarId( SFX_OBJECTBAR_OBJECT )); if ( nId ) pBarCfg->SetTopToolbar( nSelectionType, nId ); @@ -304,7 +303,7 @@ void SwView::SelectShell() } } - BOOL bInitFormShell = sal_False; + sal_Bool bInitFormShell = sal_False; if (!pFormShell) { bInitFormShell = sal_True; @@ -313,7 +312,7 @@ void SwView::SelectShell() StartListening(*pFormShell); } - BOOL bSetExtInpCntxt = sal_False; + sal_Bool bSetExtInpCntxt = sal_False; nSelectionType = nNewSelectionType; ShellModes eShellMode; @@ -553,8 +552,8 @@ IMPL_LINK( SwView, TimeoutHdl, Timer *, EMPTYARG ) _CheckReadonlyState(); _CheckReadonlySelection(); - BOOL bOldUndo = pWrtShell->DoesUndo(); - pWrtShell->DoUndo( FALSE ); + sal_Bool bOldUndo = pWrtShell->DoesUndo(); + pWrtShell->DoUndo( sal_False ); SelectShell(); pWrtShell->DoUndo( bOldUndo ); bAttrChgNotified = sal_False; @@ -749,9 +748,9 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh ) nLastPasteDestination( 0xFFFF ), nLeftBorderDistance( 0 ), nRightBorderDistance( 0 ), - bInMailMerge(FALSE), - bInDtor(FALSE), - bOldShellWasPagePreView(FALSE) + bInMailMerge(sal_False), + bInDtor(sal_False), + bOldShellWasPagePreView(sal_False) { // According to discussion with MBA and further // investigations, no old SfxViewShell will be set as parameter <pOldSh>, @@ -769,8 +768,8 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh ) bShowAtResize = bDrawSelMode = bDocSzUpdated = sal_True; - _CreateScrollbar( TRUE ); - _CreateScrollbar( FALSE ); + _CreateScrollbar( sal_True ); + _CreateScrollbar( sal_False ); pViewImpl = new SwView_Impl(this); SetName(C2S("View")); @@ -779,7 +778,7 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh ) aTimer.SetTimeout( 120 ); SwDocShell* pDocSh = PTR_CAST( SwDocShell, _pFrame->GetObjectShell() ); - BOOL bOldModifyFlag = pDocSh->IsEnableSetModified(); + sal_Bool bOldModifyFlag = pDocSh->IsEnableSetModified(); if(bOldModifyFlag) pDocSh->EnableSetModified( sal_False ); OSL_ENSURE( pDocSh, "view without DocShell." ); @@ -795,7 +794,7 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh ) aUsrPref.SetOnlineSpell( aLinguOpt.bIsSpellAuto ); - sal_Bool bOldShellWasSrcView = FALSE; + sal_Bool bOldShellWasSrcView = sal_False; // determine if there is an existing view for // document @@ -818,11 +817,11 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh ) sSwViewData = ((SwPagePreView*)pExistingSh)->GetPrevSwViewData(); sNewCrsrPos = ((SwPagePreView*)pExistingSh)->GetNewCrsrPos(); nNewPage = ((SwPagePreView*)pExistingSh)->GetNewPage(); - bOldShellWasPagePreView = TRUE; + bOldShellWasPagePreView = sal_True; } else if( pExistingSh && pExistingSh->IsA( TYPE( SwSrcView ) ) ) - bOldShellWasSrcView = TRUE; + bOldShellWasSrcView = sal_True; RTL_LOGFILE_CONTEXT_TRACE( aLog, "before create WrtShell" ); if(PTR_CAST( SwView, pExistingSh)) @@ -908,8 +907,8 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh ) aUsrPref.SetViewVRuler(sal_False); } - StartListening( *pViewFrame, TRUE ); - StartListening( *pDocSh, TRUE ); + StartListening( *pViewFrame, sal_True ); + StartListening( *pDocSh, sal_True ); // Set Zoom-factor from HLineal Fraction aZoomFract( aUsrPref.GetZoom(), 100 ); @@ -946,11 +945,9 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh ) !pDocSh->GetVisArea(ASPECT_CONTENT).IsEmpty() ) SetVisArea( pDocSh->GetVisArea(ASPECT_CONTENT),sal_False); - SwEditShell::SetUndoActionCount( - static_cast< USHORT >( SW_MOD()->GetUndoOptions().GetUndoCount() ) ); - pWrtShell->DoUndo( 0 != SwEditShell::GetUndoActionCount() ); + pWrtShell->DoUndo( 0 != SW_MOD()->GetUndoOptions().GetUndoCount() ); - const BOOL bBrowse = pWrtShell->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE); + const sal_Bool bBrowse = pWrtShell->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE); SetNewWindowAllowed(!bBrowse); ShowVScrollbar(aUsrPref.IsViewVScrollBar()); @@ -981,7 +978,7 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh ) SfxRequest aSfxRequest( FN_UPDATE_TOX, SFX_CALLMODE_SLOT, GetPool() ); Execute( aSfxRequest ); pWrtShell->GetDoc()->SetUpdateTOX( sal_False ); // wieder zurueck setzen - pWrtShell->SttEndDoc(TRUE); + pWrtShell->SttEndDoc(sal_True); } // kein ResetModified, wenn es schone eine View auf dieses Doc gibt @@ -993,7 +990,7 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh ) // so setze das Modified NICHT zurueck. // no reset of modified state, if document // was already modified. - if ( !pWrtShell->GetDoc()->IsUndoNoResetModified() && + if (!pWrtShell->GetDoc()->GetIDocumentUndoRedo().IsUndoNoResetModified() && ( !pFirst || pFirst == pVFrame ) && !bIsDocModified ) { @@ -1034,10 +1031,10 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh ) pDocSh->EnableSetModified( sal_True ); InvalidateBorder(); - if( !pHScrollbar->IsVisible( TRUE ) ) - ShowHScrollbar( FALSE ); - if( !pVScrollbar->IsVisible( TRUE ) ) - ShowVScrollbar( FALSE ); + if( !pHScrollbar->IsVisible( sal_True ) ) + ShowHScrollbar( sal_False ); + if( !pVScrollbar->IsVisible( sal_True ) ) + ShowVScrollbar( sal_False ); GetViewFrame()->GetWindow().AddChildEventListener( LINK( this, SwView, WindowChildEventListener ) ); } @@ -1048,7 +1045,7 @@ SwView::~SwView() delete mpPostItMgr; mpPostItMgr = 0; - bInDtor = TRUE; + bInDtor = sal_True; pEditWin->Hide(); // damit kein Paint Aerger machen kann! // An der SwDocShell den Pointer auf die View ruecksetzen SwDocShell* pDocSh = GetDocShell(); @@ -1234,7 +1231,7 @@ void SwView::ReadUserData( const String &rUserData, sal_Bool bBrowse ) Point aCrsrPos2( nXTmp, nYTmp ); bSelectObj = pWrtShell->IsObjSelectable( aCrsrPos2 ); - pWrtShell->SwCrsrShell::SetCrsr( aCrsrPos2, FALSE ); + pWrtShell->SwCrsrShell::SetCrsr( aCrsrPos2, sal_False ); if( bSelectObj ) { pWrtShell->SelectObj( aCrsrPos2 ); @@ -1245,7 +1242,7 @@ void SwView::ReadUserData( const String &rUserData, sal_Bool bBrowse ) } else if(USHRT_MAX != nNewPage) { - pWrtShell->GotoPage(nNewPage, TRUE); + pWrtShell->GotoPage(nNewPage, sal_True); nNewPage = USHRT_MAX; } @@ -1535,8 +1532,8 @@ void SwView::WriteUserDataSequence ( uno::Sequence < beans::PropertyValue >& rSe void SwView::ShowCursor( bool bOn ) { //don't scroll the cursor into the visible area - BOOL bUnlockView = !pWrtShell->IsViewLocked(); - pWrtShell->LockView( TRUE ); //lock visible section + sal_Bool bUnlockView = !pWrtShell->IsViewLocked(); + pWrtShell->LockView( sal_True ); //lock visible section if( !bOn ) pWrtShell->HideCrsr(); @@ -1544,7 +1541,7 @@ void SwView::ShowCursor( bool bOn ) pWrtShell->ShowCrsr(); if( bUnlockView ) - pWrtShell->LockView( FALSE ); + pWrtShell->LockView( sal_False ); } ErrCode SwView::DoVerb( long nVerb ) @@ -1594,7 +1591,7 @@ SwGlossaryHdl* SwView::GetGlosHdl() void SwView::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) { - BOOL bCallBase = sal_True; + sal_Bool bCallBase = sal_True; if ( rHint.ISA(SfxSimpleHint) ) { sal_uInt32 nId = ((SfxSimpleHint&)rHint).GetId(); @@ -1682,7 +1679,7 @@ void SwView::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) SfxViewShell::Notify(rBC, rHint); } -#if defined WIN || defined WNT || defined UNX +#if defined WNT || defined UNX void SwView::ScannerEventHdl( const EventObject& /*rEventObject*/ ) { @@ -1748,9 +1745,9 @@ sal_uInt16 SwView::PrepareClose( sal_Bool bUI, sal_Bool bForBrowsing ) // status methods for clipboard. // Status changes now notified from the clipboard. -BOOL SwView::IsPasteAllowed() +sal_Bool SwView::IsPasteAllowed() { - USHORT nPasteDestination = SwTransferable::GetSotDestination( *pWrtShell ); + sal_uInt16 nPasteDestination = SwTransferable::GetSotDestination( *pWrtShell ); if( nLastPasteDestination != nPasteDestination ) { TransferableDataHelper aDataHelper( @@ -1763,7 +1760,7 @@ BOOL SwView::IsPasteAllowed() *pWrtShell, aDataHelper ); } else - bPasteState = bPasteSpecialState = FALSE; + bPasteState = bPasteSpecialState = sal_False; if( 0xFFFF == nLastPasteDestination ) // the init value pViewImpl->AddClipboardListener(); @@ -1772,12 +1769,12 @@ BOOL SwView::IsPasteAllowed() return bPasteState; } -BOOL SwView::IsPasteSpecialAllowed() +sal_Bool SwView::IsPasteSpecialAllowed() { if ( pFormShell && pFormShell->IsActiveControl() ) - return FALSE; + return sal_False; - USHORT nPasteDestination = SwTransferable::GetSotDestination( *pWrtShell ); + sal_uInt16 nPasteDestination = SwTransferable::GetSotDestination( *pWrtShell ); if( nLastPasteDestination != nPasteDestination ) { TransferableDataHelper aDataHelper( @@ -1790,7 +1787,7 @@ BOOL SwView::IsPasteSpecialAllowed() *pWrtShell, aDataHelper ); } else - bPasteState = bPasteSpecialState = FALSE; + bPasteState = bPasteSpecialState = sal_False; if( 0xFFFF == nLastPasteDestination ) // the init value pViewImpl->AddClipboardListener(); @@ -1806,19 +1803,18 @@ void SwView::NotifyDBChanged() /*-------------------------------------------------------------------- Beschreibung: Drucken --------------------------------------------------------------------*/ -SfxObjectShellRef & SwView::GetTmpSelectionDoc() +SfxObjectShellLock & SwView::GetTmpSelectionDoc() { return GetViewImpl()->GetTmpSelectionDoc(); } -SfxObjectShellRef & SwView::GetOrCreateTmpSelectionDoc() +SfxObjectShellLock & SwView::GetOrCreateTmpSelectionDoc() { - SfxObjectShellRef &rxTmpDoc = GetViewImpl()->GetTmpSelectionDoc(); + SfxObjectShellLock &rxTmpDoc = GetViewImpl()->GetTmpSelectionDoc(); if (!rxTmpDoc.Is()) { SwXTextView *pImpl = GetViewImpl()->GetUNOObject_Impl(); - rxTmpDoc = pImpl->BuildTmpSelectionDoc( - GetViewImpl()->GetEmbeddedObjRef() ); + rxTmpDoc = pImpl->BuildTmpSelectionDoc(); } return rxTmpDoc; } @@ -1828,18 +1824,13 @@ void SwView::AddTransferable(SwTransferable& rTransferable) GetViewImpl()->AddTransferable(rTransferable); } -void SwPrtOptions::MakeOptions( BOOL bWeb ) -{ - *this = *SW_MOD()->GetPrtOptions(bWeb); - - nCopyCount = 1; - bCollate = FALSE; - bPrintSelection = FALSE; - bJobStartet = FALSE; +namespace sw { - aMulti.SetTotalRange( Range( 0, RANGE_MAX ) ); - aMulti.SelectAll(); - aMulti.Select( 0, FALSE ); +void InitPrintOptionsFromApplication(SwPrintData & o_rData, bool const bWeb) +{ + o_rData = *SW_MOD()->GetPrtOptions(bWeb); } +} // namespace sw + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/uiview/view.hrc b/sw/source/ui/uiview/view.hrc index e05b61e751..e05b61e751 100644..100755 --- a/sw/source/ui/uiview/view.hrc +++ b/sw/source/ui/uiview/view.hrc diff --git a/sw/source/ui/uiview/view.src b/sw/source/ui/uiview/view.src index 233664b509..e006ee71ae 100644 --- a/sw/source/ui/uiview/view.src +++ b/sw/source/ui/uiview/view.src @@ -196,160 +196,6 @@ String MN_SRCVIEW_POPUPMENU Text [ en-US ] = "HTML source" ; }; -ToolBox RID_TOOLS_TOOLBOX -{ - HelpID = HID_TOOLS_TOOLBOX ; - Border = TRUE ; - SVLook = TRUE ; - Dockable = TRUE ; - Moveable = TRUE ; - Sizeable = TRUE ; - Closeable = TRUE ; - Zoomable = TRUE ; - LineSpacing = TRUE ; - HideWhenDeactivate = TRUE ; - Customize = TRUE ; - MenuStrings = TRUE ; - Scroll = TRUE ; - Align = BOXALIGN_LEFT ; - Hide = TRUE ; - ItemList = - { - ToolBoxItem - { - Identifier = FN_INSERT_CTRL ; - HelpID = HID_INSERT_CTRL ; - DropDown = TRUE ; - }; - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - Identifier = FN_INSERT_FIELD_CTRL ; - HelpID = HID_INSERT_FIELD_CTRL ; - DropDown = TRUE ; - }; - ToolBoxItem - { - Identifier = FN_INSERT_OBJ_CTRL ; - HelpID = HID_INSERT_OBJ_CTRL ; - DropDown = TRUE ; - }; - ToolBoxItem - { - ITEM_TOOLBAR_INSERT_DRAW - }; - ToolBoxItem - { - ITEM_FORM_CONFIG - }; - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - Identifier = FN_GLOSSARY_DLG ; - HelpID = FN_GLOSSARY_DLG ; - DropDown = TRUE ; - }; - ToolBoxItem - { - Identifier = FN_INSERT_CAPTION; - HelpID = FN_INSERT_CAPTION ; - Hide = TRUE ; - }; - ToolBoxItem - { - Identifier = FN_INSERT_IDX_ENTRY_DLG; - HelpId = FN_INSERT_IDX_ENTRY_DLG; - Hide = TRUE; - }; - ToolBoxItem - { - Identifier = FN_INSERT_REF_FIELD; - HelpID = FN_INSERT_REF_FIELD ; - Hide = TRUE ; - }; - ToolBoxItem - { - Identifier = FN_SHADOWCURSOR ; - HelpID = FN_SHADOWCURSOR ; - }; - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - Identifier = FN_SPELL_GRAMMAR_DIALOG; - HelpID = FN_SPELL_GRAMMAR_DIALOG; - }; - ToolBoxItem - { - ITEM_TOOLBAR_AUTOSPELL_CHECK - }; - ToolBoxItem - { - Identifier = FN_HYPHENATE_OPT_DLG; - HelpID = FN_HYPHENATE_OPT_DLG; - Hide = TRUE; - }; - ToolBoxItem - { - Identifier = SID_THESAURUS; - HelpID = SID_THESAURUS; - Hide = TRUE; - }; - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - Identifier = SID_SEARCH_DLG ; - HelpID = SID_SEARCH_DLG ; - }; - ToolBoxItem - { - Identifier = SID_VIEW_DATA_SOURCE_BROWSER ; - HelpID = SID_VIEW_DATA_SOURCE_BROWSER ; - }; - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - Identifier = SID_ATTR_ZOOM; - HelpID = SID_ATTR_ZOOM ; - Hide = TRUE; - }; - ToolBoxItem - { - Identifier = FN_VIEW_META_CHARS ; - HelpID = FN_VIEW_META_CHARS ; - }; - ToolBoxItem - { - Identifier = FN_VIEW_FIELDNAME ; - HelpID = FN_VIEW_FIELDNAME ; - Hide = TRUE; - }; - ToolBoxItem - { - Identifier = FN_VIEW_GRAPHIC ; - HelpID = FN_VIEW_GRAPHIC ; - }; - ToolBoxItem - { - Identifier = SID_BROWSER_MODE ; - HelpID = SID_BROWSER_MODE ; - }; - }; -}; Menu MN_SRCVIEW_POPUPMENU { ItemList = diff --git a/sw/source/ui/uiview/view0.cxx b/sw/source/ui/uiview/view0.cxx index 6c7674934a..641aa159bb 100644 --- a/sw/source/ui/uiview/view0.cxx +++ b/sw/source/ui/uiview/view0.cxx @@ -65,11 +65,6 @@ #define OLEObjects #define SwView -#define SearchAttributes -#define ReplaceAttributes -#define SearchSettings -#define _ExecSearch ExecSearch -#define _StateSearch StateSearch #define Frames #define Graphics #define Tables @@ -89,7 +84,6 @@ #define WebListInTable #define TextPage #include <sfx2/msg.hxx> -#include <svx/svxslots.hxx> #include "swslots.hxx" #include <PostItMgr.hxx> @@ -184,7 +178,7 @@ void lcl_SetViewMarks(SwViewOption& rVOpt, sal_Bool bOn ) rVOpt.SetHardBlank(bOn); rVOpt.SetSoftHyph(bOn); SwViewOption::SetAppearanceFlag( - VIEWOPT_FIELD_SHADINGS, bOn, TRUE); + VIEWOPT_FIELD_SHADINGS, bOn, sal_True); } void lcl_SetViewMetaChars( SwViewOption& rVOpt, sal_Bool bOn) @@ -228,7 +222,7 @@ void SwView::StateViewOptions(SfxItemSet &rSet) { case FN_RULER: { - if(!pOpt->IsViewHRuler(TRUE) && !pOpt->IsViewVRuler(TRUE)) + if(!pOpt->IsViewHRuler(sal_True) && !pOpt->IsViewVRuler(sal_True)) { rSet.DisableItem(nWhich); nWhich = 0; @@ -330,7 +324,7 @@ void SwView::ExecViewOptions(SfxRequest &rReq) eState = bSet ? STATE_ON : STATE_OFF; } - BOOL bFlag = STATE_ON == eState; + sal_Bool bFlag = STATE_ON == eState; uno::Reference< beans::XPropertySet > xLngProp( ::GetLinguPropertySet() ); switch ( nSlot ) @@ -345,13 +339,13 @@ void SwView::ExecViewOptions(SfxRequest &rReq) case FN_VIEW_FIELDS: if( STATE_TOGGLE == eState ) bFlag = !SwViewOption::IsFieldShadings() ; - SwViewOption::SetAppearanceFlag(VIEWOPT_FIELD_SHADINGS, bFlag, TRUE ); + SwViewOption::SetAppearanceFlag(VIEWOPT_FIELD_SHADINGS, bFlag, sal_True ); break; case FN_VIEW_BOUNDS: if( STATE_TOGGLE == eState ) bFlag = !SwViewOption::IsDocBoundaries(); - SwViewOption::SetAppearanceFlag(VIEWOPT_DOC_BOUNDARIES, bFlag, TRUE ); + SwViewOption::SetAppearanceFlag(VIEWOPT_DOC_BOUNDARIES, bFlag, sal_True ); break; case SID_GRID_VISIBLE: @@ -431,7 +425,7 @@ void SwView::ExecViewOptions(SfxRequest &rReq) case FN_VIEW_TABLEGRID: if( STATE_TOGGLE == eState ) bFlag = !SwViewOption::IsTableBoundaries(); - SwViewOption::SetAppearanceFlag(VIEWOPT_TABLE_BOUNDARIES, bFlag, TRUE ); + SwViewOption::SetAppearanceFlag(VIEWOPT_TABLE_BOUNDARIES, bFlag, sal_True ); break; case FN_VIEW_FIELDNAME: @@ -520,15 +514,15 @@ void SwView::ExecViewOptions(SfxRequest &rReq) if ( nSlot == SID_AUTOSPELL_CHECK ) GetPostItMgr()->SetSpellChecking(); - const BOOL bLockedView = rSh.IsViewLocked(); - rSh.LockView( TRUE ); //lock visible section + const sal_Bool bLockedView = rSh.IsViewLocked(); + rSh.LockView( sal_True ); //lock visible section GetWrtShell().EndAction(); rSh.LockView( bLockedView ); delete pOpt; Invalidate(rReq.GetSlot()); if(!pArgs) - rReq.AppendItem(SfxBoolItem(nSlot, (BOOL)bFlag)); + rReq.AppendItem(SfxBoolItem(nSlot, (sal_Bool)bFlag)); rReq.Done(); } diff --git a/sw/source/ui/uiview/view1.cxx b/sw/source/ui/uiview/view1.cxx index 7e94e764d7..d1fdb5f32b 100644 --- a/sw/source/ui/uiview/view1.cxx +++ b/sw/source/ui/uiview/view1.cxx @@ -53,7 +53,7 @@ extern int bDocSzUpdated; -void SwView::Activate(BOOL bMDIActivate) +void SwView::Activate(sal_Bool bMDIActivate) { // aktuelle View anmelden an der DocShell // die View bleibt solange an der DocShell @@ -75,23 +75,23 @@ void SwView::Activate(BOOL bMDIActivate) pWrtShell->MakeSelVisible(); bMakeSelectionVisible = sal_False; } - pHRuler->SetActive( TRUE ); - pVRuler->SetActive( TRUE ); + pHRuler->SetActive( sal_True ); + pVRuler->SetActive( sal_True ); if ( bMDIActivate ) { - pWrtShell->ShGetFcs(FALSE); // Selektionen sichtbar + pWrtShell->ShGetFcs(sal_False); // Selektionen sichtbar if( sSwViewData.Len() ) { - ReadUserData( sSwViewData, FALSE ); + ReadUserData( sSwViewData, sal_False ); sSwViewData.Erase(); } AttrChangedNotify(pWrtShell); // Flddlg ggf neu initialisieren (z.B. fuer TYP_SETVAR) - USHORT nId = SwFldDlgWrapper::GetChildWindowId(); + sal_uInt16 nId = SwFldDlgWrapper::GetChildWindowId(); SfxViewFrame* pVFrame = GetViewFrame(); SwFldDlgWrapper *pWrp = (SwFldDlgWrapper*)pVFrame->GetChildWindow(nId); if (pWrp) @@ -123,9 +123,9 @@ void SwView::Activate(BOOL bMDIActivate) SfxViewShell::Activate(bMDIActivate); } -void SwView::Deactivate(BOOL bMDIActivate) +void SwView::Deactivate(sal_Bool bMDIActivate) { - extern BOOL bFlushCharBuffer ; + extern sal_Bool bFlushCharBuffer ; // Befinden sich noch Zeichen im Input Buffer? if( bFlushCharBuffer ) GetEditWin().FlushInBuffer(); @@ -134,8 +134,8 @@ void SwView::Deactivate(BOOL bMDIActivate) { pWrtShell->ShLooseFcs(); // Selektionen unsichtbar - pHRuler->SetActive( FALSE ); - pVRuler->SetActive( FALSE ); + pHRuler->SetActive( sal_False ); + pVRuler->SetActive( sal_False ); } SfxViewShell::Deactivate(bMDIActivate); } diff --git a/sw/source/ui/uiview/view2.cxx b/sw/source/ui/uiview/view2.cxx index 470f8a3fd1..aace13c3c8 100644 --- a/sw/source/ui/uiview/view2.cxx +++ b/sw/source/ui/uiview/view2.cxx @@ -28,6 +28,7 @@ // 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> #include <com/sun/star/i18n/TransliterationModules.hpp> @@ -44,7 +45,7 @@ #include <docary.hxx> #include <hintids.hxx> #include <SwRewriter.hxx> -#include <undobj.hxx> +#include <numrule.hxx> #include <swundo.hxx> #include <caption.hxx> #include <svl/PasswordHelper.hxx> @@ -89,6 +90,7 @@ #include <uivwimp.hxx> #include <docsh.hxx> #include <doc.hxx> +#include <IDocumentUndoRedo.hxx> #include <wrtsh.hxx> #include <viewopt.hxx> #include <basesh.hxx> @@ -159,14 +161,14 @@ using namespace ::com::sun::star::beans; using namespace ::com::sun::star::container; using namespace ::com::sun::star::ui::dialogs; -static void lcl_SetAllTextToDefaultLanguage( SwWrtShell &rWrtSh, USHORT nWhichId ) +static void lcl_SetAllTextToDefaultLanguage( SwWrtShell &rWrtSh, sal_uInt16 nWhichId ) { if (nWhichId == RES_CHRATR_LANGUAGE || nWhichId == RES_CHRATR_CJK_LANGUAGE || nWhichId == RES_CHRATR_CTL_LANGUAGE) { rWrtSh.StartAction(); - rWrtSh.LockView( TRUE ); + rWrtSh.LockView( sal_True ); rWrtSh.Push(); // prepare to apply new language to all text in document @@ -178,8 +180,8 @@ static void lcl_SetAllTextToDefaultLanguage( SwWrtShell &rWrtSh, USHORT nWhichId aAttribs.Insert( nWhichId ); rWrtSh.ResetAttr( &aAttribs ); - rWrtSh.Pop( FALSE ); - rWrtSh.LockView( FALSE ); + rWrtSh.Pop( sal_False ); + rWrtSh.LockView( sal_False ); rWrtSh.EndAction(); } } @@ -187,7 +189,7 @@ static void lcl_SetAllTextToDefaultLanguage( SwWrtShell &rWrtSh, USHORT nWhichId /*--------------------------------------------------------------------------- Beschreibung: String fuer die Seitenanzeige in der Statusbar basteln. ----------------------------------------------------------------------------*/ -String SwView::GetPageStr( USHORT nPg, USHORT nLogPg, +String SwView::GetPageStr( sal_uInt16 nPg, sal_uInt16 nLogPg, const String& rDisplay ) { String aStr( aPageStr ); @@ -208,10 +210,10 @@ String SwView::GetPageStr( USHORT nPg, USHORT nLogPg, } int SwView::InsertGraphic( const String &rPath, const String &rFilter, - BOOL bLink, GraphicFilter *pFlt, - Graphic* pPreviewGrf, BOOL bRule ) + sal_Bool bLink, GraphicFilter *pFlt, + Graphic* pPreviewGrf, sal_Bool bRule ) { - SwWait aWait( *GetDocShell(), TRUE ); + SwWait aWait( *GetDocShell(), sal_True ); Graphic aGrf; int nRes = GRFILTER_OK; @@ -226,7 +228,7 @@ int SwView::InsertGraphic( const String &rPath, const String &rFilter, if( GRFILTER_OK == nRes ) { - SwFlyFrmAttrMgr aFrmMgr( TRUE, GetWrtShellPtr(), FRMMGR_TYPE_GRF ); + SwFlyFrmAttrMgr aFrmMgr( sal_True, GetWrtShellPtr(), FRMMGR_TYPE_GRF ); SwWrtShell &rSh = GetWrtShell(); rSh.StartAction(); @@ -252,15 +254,15 @@ int SwView::InsertGraphic( const String &rPath, const String &rFilter, return nRes; } -BOOL SwView::InsertGraphicDlg( SfxRequest& rReq ) +sal_Bool SwView::InsertGraphicDlg( SfxRequest& rReq ) { #ifndef ENABLE_PROP_WITHOUTLINK #define ENABLE_PROP_WITHOUTLINK 0x08 #endif - BOOL bReturn = FALSE; + sal_Bool bReturn = sal_False; SwDocShell* pDocShell = GetDocShell(); - USHORT nHtmlMode = ::GetHtmlMode(pDocShell); + sal_uInt16 nHtmlMode = ::GetHtmlMode(pDocShell); // im HTML-Mode nur verknuepft einfuegen FileDialogHelper* pFileDlg = new FileDialogHelper( SFXWB_GRAPHIC | SFXWB_SHOWSTYLES ); pFileDlg->SetTitle(SW_RESSTR(STR_INSERT_GRAPHIC )); @@ -277,8 +279,8 @@ BOOL SwView::InsertGraphicDlg( SfxRequest& rReq ) SvStringsSortDtor aFormats; SwDoc* pDoc = pDocShell->GetDoc(); - const USHORT nArrLen = pDoc->GetFrmFmts()->Count(); - USHORT i; + const sal_uInt16 nArrLen = pDoc->GetFrmFmts()->Count(); + sal_uInt16 i; for( i = 0; i < nArrLen; i++ ) { SwFrmFmt* pFmt = (*pDoc->GetFrmFmts())[ i ]; @@ -325,7 +327,7 @@ BOOL SwView::InsertGraphicDlg( SfxRequest& rReq ) } SFX_REQUEST_ARG( rReq, pName, SfxStringItem, SID_INSERT_GRAPHIC , sal_False ); - BOOL bShowError = !pName; + sal_Bool bShowError = !pName; if( pName || ERRCODE_NONE == pFileDlg->Execute() ) { @@ -429,7 +431,7 @@ BOOL SwView::InsertGraphicDlg( SfxRequest& rReq ) if(!pFmt) pFmt = pDoc->MakeFrmFmt(sGraphicFormat, pDocShell->GetDoc()->GetDfltFrmFmt(), - TRUE, FALSE); + sal_True, sal_False); rSh.SetFrmFmt( pFmt ); } @@ -470,12 +472,12 @@ BOOL SwView::InsertGraphicDlg( SfxRequest& rReq ) else { // set the specific graphic attrbutes to the graphic - bReturn = TRUE; + bReturn = sal_True; AutoCaption( GRAPHIC_CAP ); rReq.Done(); } - rSh.EndUndo(UNDO_INSERT); // wegen moegl. Shellwechsel + rSh.EndUndo(); // due to possible change of Shell } delete pFileDlg; @@ -485,10 +487,10 @@ BOOL SwView::InsertGraphicDlg( SfxRequest& rReq ) void SwView::Execute(SfxRequest &rReq) { - USHORT nSlot = rReq.GetSlot(); + sal_uInt16 nSlot = rReq.GetSlot(); const SfxItemSet* pArgs = rReq.GetArgs(); const SfxPoolItem* pItem; - BOOL bIgnore = FALSE; + sal_Bool bIgnore = sal_False; switch( nSlot ) { case SID_CREATE_SW_DRAWVIEW: @@ -532,7 +534,7 @@ void SwView::Execute(SfxRequest &rReq) case FN_REDLINE_ON: { if( pArgs && - SFX_ITEM_SET == pArgs->GetItemState(nSlot, FALSE, &pItem )) + SFX_ITEM_SET == pArgs->GetItemState(nSlot, sal_False, &pItem )) { IDocumentRedlineAccess* pIDRA = pWrtShell->getIDocumentRedlineAccess(); Sequence <sal_Int8> aPasswd = pIDRA->GetRedlinePassword(); @@ -542,7 +544,7 @@ void SwView::Execute(SfxRequest &rReq) // xmlsec05: new password dialog Window* pParent; const SfxPoolItem* pParentItem; - if( SFX_ITEM_SET == pArgs->GetItemState( SID_ATTR_XWINDOW, FALSE, &pParentItem ) ) + if( SFX_ITEM_SET == pArgs->GetItemState( SID_ATTR_XWINDOW, sal_False, &pParentItem ) ) pParent = ( ( const XWindowItem* ) pParentItem )->GetWindowPtr(); else pParent = &GetViewFrame()->GetWindow(); @@ -561,8 +563,8 @@ void SwView::Execute(SfxRequest &rReq) } } - USHORT nOn = ((const SfxBoolItem*)pItem)->GetValue() ? nsRedlineMode_t::REDLINE_ON : 0; - USHORT nMode = pWrtShell->GetRedlineMode(); + sal_uInt16 nOn = ((const SfxBoolItem*)pItem)->GetValue() ? nsRedlineMode_t::REDLINE_ON : 0; + sal_uInt16 nMode = pWrtShell->GetRedlineMode(); pWrtShell->SetRedlineModeAndCheckInsMode( (nMode & ~nsRedlineMode_t::REDLINE_ON) | nOn); } } @@ -571,7 +573,7 @@ void SwView::Execute(SfxRequest &rReq) { IDocumentRedlineAccess* pIDRA = pWrtShell->getIDocumentRedlineAccess(); Sequence <sal_Int8> aPasswd = pIDRA->GetRedlinePassword(); - if( pArgs && SFX_ITEM_SET == pArgs->GetItemState(nSlot, FALSE, &pItem ) + if( pArgs && SFX_ITEM_SET == pArgs->GetItemState(nSlot, sal_False, &pItem ) && ((SfxBoolItem*)pItem)->GetValue() == ( aPasswd.getLength() != 0 ) ) break; @@ -579,7 +581,7 @@ void SwView::Execute(SfxRequest &rReq) // message box for wrong password Window* pParent; const SfxPoolItem* pParentItem; - if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( SID_ATTR_XWINDOW, FALSE, &pParentItem ) ) + if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( SID_ATTR_XWINDOW, sal_False, &pParentItem ) ) pParent = ( ( const XWindowItem* ) pParentItem )->GetWindowPtr(); else pParent = &GetViewFrame()->GetWindow(); @@ -589,7 +591,7 @@ void SwView::Execute(SfxRequest &rReq) aPasswdDlg.ShowExtras(SHOWEXTRAS_CONFIRM); if (aPasswdDlg.Execute()) { - USHORT nOn = nsRedlineMode_t::REDLINE_ON; + sal_uInt16 nOn = nsRedlineMode_t::REDLINE_ON; String sNewPasswd( aPasswdDlg.GetPassword() ); Sequence <sal_Int8> aNewPasswd = pIDRA->GetRedlinePassword(); @@ -603,20 +605,20 @@ void SwView::Execute(SfxRequest &rReq) pIDRA->SetRedlinePassword(Sequence <sal_Int8> ()); nOn = 0; } - USHORT nMode = pIDRA->GetRedlineMode(); + sal_uInt16 nMode = pIDRA->GetRedlineMode(); pWrtShell->SetRedlineModeAndCheckInsMode( (nMode & ~nsRedlineMode_t::REDLINE_ON) | nOn); rReq.AppendItem( SfxBoolItem( FN_REDLINE_PROTECT, ((nMode&nsRedlineMode_t::REDLINE_ON)==0) ) ); } else - bIgnore = TRUE; + bIgnore = sal_True; } break; case FN_REDLINE_SHOW: if( pArgs && - SFX_ITEM_SET == pArgs->GetItemState(nSlot, FALSE, &pItem)) + SFX_ITEM_SET == pArgs->GetItemState(nSlot, sal_False, &pItem)) { - USHORT nMode = ( ~(nsRedlineMode_t::REDLINE_SHOW_INSERT | nsRedlineMode_t::REDLINE_SHOW_DELETE) + sal_uInt16 nMode = ( ~(nsRedlineMode_t::REDLINE_SHOW_INSERT | nsRedlineMode_t::REDLINE_SHOW_DELETE) & pWrtShell->GetRedlineMode() ) | nsRedlineMode_t::REDLINE_SHOW_INSERT; if( ((const SfxBoolItem*)pItem)->GetValue() ) nMode |= nsRedlineMode_t::REDLINE_SHOW_DELETE; @@ -635,8 +637,8 @@ void SwView::Execute(SfxRequest &rReq) Point aCrsrPos = pWrtShell->GetCrsrDocPos( sal_True ); if( pWrtShell->GetContentAtPos( aCrsrPos, aCntntAtPos ) ) { - USHORT nCount = pWrtShell->GetRedlineCount(); - for( USHORT nRedline = 0; nRedline < nCount; ++nRedline ) + sal_uInt16 nCount = pWrtShell->GetRedlineCount(); + for( sal_uInt16 nRedline = 0; nRedline < nCount; ++nRedline ) { const SwRedline& rRedline = pWrtShell->GetRedline( nRedline ); if( *aCntntAtPos.aFnd.pRedl == rRedline ) @@ -655,20 +657,20 @@ void SwView::Execute(SfxRequest &rReq) case SID_DOCUMENT_MERGE: { String sFileName, sFilterName; - INT16 nVersion = 0; + sal_Int16 nVersion = 0; bool bHasFileName = false; pViewImpl->SetParam( 0 ); if( pArgs ) { - if( SFX_ITEM_SET == pArgs->GetItemState( SID_FILE_NAME, FALSE, &pItem )) + if( SFX_ITEM_SET == pArgs->GetItemState( SID_FILE_NAME, sal_False, &pItem )) sFileName = ((const SfxStringItem*)pItem)->GetValue(); bHasFileName = ( sFileName.Len() > 0 ); - if( SFX_ITEM_SET == pArgs->GetItemState( SID_FILTER_NAME, FALSE, &pItem )) + if( SFX_ITEM_SET == pArgs->GetItemState( SID_FILTER_NAME, sal_False, &pItem )) sFilterName = ((const SfxStringItem*)pItem)->GetValue(); - if( SFX_ITEM_SET == pArgs->GetItemState( SID_VERSION, FALSE, &pItem )) + if( SFX_ITEM_SET == pArgs->GetItemState( SID_VERSION, sal_False, &pItem )) { nVersion = ((const SfxInt16Item *)pItem)->GetValue(); pViewImpl->SetParam( nVersion ); @@ -688,7 +690,7 @@ void SwView::Execute(SfxRequest &rReq) pVFrame->ShowChildWindow(FN_REDLINE_ACCEPT); // RedlineDlg neu initialisieren - USHORT nId = SwRedlineAcceptChild::GetChildWindowId(); + sal_uInt16 nId = SwRedlineAcceptChild::GetChildWindowId(); SwRedlineAcceptChild *pRed = (SwRedlineAcceptChild*) pVFrame->GetChildWindow(nId); if (pRed) @@ -696,12 +698,12 @@ void SwView::Execute(SfxRequest &rReq) } } else - bIgnore = TRUE; + bIgnore = sal_True; } break; case FN_SYNC_LABELS: case FN_MAILMERGE_CHILDWINDOW: - GetViewFrame()->ShowChildWindow(nSlot, TRUE); + GetViewFrame()->ShowChildWindow(nSlot, sal_True); break; case FN_ESCAPE: { @@ -748,7 +750,7 @@ void SwView::Execute(SfxRequest &rReq) } else if ( GetEditWin().IsChainMode() ) { - GetEditWin().SetChainMode( FALSE ); + GetEditWin().SetChainMode( sal_False ); } else if( pWrtShell->GetFlyFrmFmt() ) { @@ -761,9 +763,9 @@ void SwView::Execute(SfxRequest &rReq) } else { - SfxBoolItem aItem( SID_WIN_FULLSCREEN, FALSE ); + SfxBoolItem aItem( SID_WIN_FULLSCREEN, sal_False ); GetViewFrame()->GetDispatcher()->Execute( SID_WIN_FULLSCREEN, SFX_CALLMODE_RECORD, &aItem, 0L ); - bIgnore = TRUE; + bIgnore = sal_True; } } break; @@ -783,7 +785,7 @@ void SwView::Execute(SfxRequest &rReq) { if(pArgs) { - const USHORT nCurIdx = pWrtShell->GetCurPageDesc(); + const sal_uInt16 nCurIdx = pWrtShell->GetCurPageDesc(); SwPageDesc aPageDesc( pWrtShell->GetPageDesc( nCurIdx ) ); ::ItemSetToPageDesc( *pArgs, aPageDesc ); // Den Descriptor der Core veraendern. @@ -827,12 +829,12 @@ void SwView::Execute(SfxRequest &rReq) { pWrtShell->StartAction(); pWrtShell->EnterStdMode(); - BOOL bOldCrsrInReadOnly = pWrtShell->IsReadOnlyAvailable(); - pWrtShell->SetReadOnlyAvailable( TRUE ); + sal_Bool bOldCrsrInReadOnly = pWrtShell->IsReadOnlyAvailable(); + pWrtShell->SetReadOnlyAvailable( sal_True ); - for( USHORT i = 0; i < 2; ++i ) + for( sal_uInt16 i = 0; i < 2; ++i ) { - USHORT nCount = pWrtShell->GetTOXCount(); + sal_uInt16 nCount = pWrtShell->GetTOXCount(); if( 1 == nCount ) ++i; @@ -848,13 +850,13 @@ void SwView::Execute(SfxRequest &rReq) pBase = pWrtShell->GetCurTOX(); } - BOOL bAutoMarkApplied = FALSE; + sal_Bool bAutoMarkApplied = sal_False; while( pBase ) { if(TOX_INDEX == pBase->GetType() && !bAutoMarkApplied) { pWrtShell->ApplyAutoMark(); - bAutoMarkApplied = TRUE; + bAutoMarkApplied = sal_True; } // das pBase wird nur fuer die Schnittstelle // benoetigt. Muss mal umgetstellt werden!!! @@ -872,9 +874,9 @@ void SwView::Execute(SfxRequest &rReq) break; case SID_ATTR_BRUSH: { - if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(RES_BACKGROUND, FALSE, &pItem)) + if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(RES_BACKGROUND, sal_False, &pItem)) { - const USHORT nCurIdx = pWrtShell->GetCurPageDesc(); + const sal_uInt16 nCurIdx = pWrtShell->GetCurPageDesc(); SwPageDesc aDesc( pWrtShell->GetPageDesc( nCurIdx )); SwFrmFmt& rMaster = aDesc.GetMaster(); rMaster.SetFmtAttr(*pItem); @@ -895,14 +897,14 @@ void SwView::Execute(SfxRequest &rReq) case FN_INSERT_CTRL: case FN_INSERT_OBJ_CTRL: { - if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(nSlot, FALSE, &pItem)) + if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(nSlot, sal_False, &pItem)) { - USHORT nValue = ((SfxUInt16Item*)pItem)->GetValue(); + sal_uInt16 nValue = ((SfxUInt16Item*)pItem)->GetValue(); switch ( nSlot ) { case FN_INSERT_CTRL: { - BOOL bWeb = 0 != PTR_CAST(SwWebView, this); + sal_Bool bWeb = 0 != PTR_CAST(SwWebView, this); if(bWeb) SwView::nWebInsertCtrlState = nValue; else @@ -916,7 +918,7 @@ void SwView::Execute(SfxRequest &rReq) GetViewFrame()->GetBindings().Invalidate( nSlot ); } break; -#if defined WIN || defined WNT || defined UNX +#if defined WNT || defined UNX case SID_TWAIN_SELECT: case SID_TWAIN_TRANSFER: GetViewImpl()->ExecuteScan( rReq ); @@ -925,17 +927,17 @@ void SwView::Execute(SfxRequest &rReq) case SID_ATTR_DEFTABSTOP: { - if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(SID_ATTR_DEFTABSTOP, FALSE, &pItem)) + if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(SID_ATTR_DEFTABSTOP, sal_False, &pItem)) { SvxTabStopItem aDefTabs( 0, 0, SVX_TAB_ADJUST_DEFAULT, RES_PARATR_TABSTOP ); - USHORT nTab = ((const SfxUInt16Item*)pItem)->GetValue(); + sal_uInt16 nTab = ((const SfxUInt16Item*)pItem)->GetValue(); MakeDefTabs( nTab, aDefTabs ); pWrtShell->SetDefault( aDefTabs ); } } break; case SID_ATTR_LANGUAGE : - if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(SID_ATTR_LANGUAGE, FALSE, &pItem)) + if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(SID_ATTR_LANGUAGE, sal_False, &pItem)) { SvxLanguageItem aLang(((SvxLanguageItem*)pItem)->GetLanguage(), RES_CHRATR_LANGUAGE); pWrtShell->SetDefault( aLang ); @@ -943,21 +945,21 @@ void SwView::Execute(SfxRequest &rReq) } break; case SID_ATTR_CHAR_CTL_LANGUAGE: - if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(RES_CHRATR_CTL_LANGUAGE, FALSE, &pItem)) + if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(RES_CHRATR_CTL_LANGUAGE, sal_False, &pItem)) { pWrtShell->SetDefault( *pItem ); lcl_SetAllTextToDefaultLanguage( *pWrtShell, RES_CHRATR_CTL_LANGUAGE ); } break; case SID_ATTR_CHAR_CJK_LANGUAGE: - if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(RES_CHRATR_CJK_LANGUAGE, FALSE, &pItem)) + if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(RES_CHRATR_CJK_LANGUAGE, sal_False, &pItem)) { pWrtShell->SetDefault( *pItem ); lcl_SetAllTextToDefaultLanguage( *pWrtShell, RES_CHRATR_CJK_LANGUAGE ); } break; case FN_SCROLL_NEXT_PREV: - if(pArgs && pArgs->GetItemState(FN_SCROLL_NEXT_PREV, FALSE, &pItem)) + if(pArgs && pArgs->GetItemState(FN_SCROLL_NEXT_PREV, sal_False, &pItem)) { // call the handlers of PageUp/DownButtons, only bool* pbNext = new bool ( ((const SfxBoolItem*)pItem)->GetValue() ); @@ -966,7 +968,7 @@ void SwView::Execute(SfxRequest &rReq) } break; case SID_JUMPTOMARK: - if( pArgs && SFX_ITEM_SET == pArgs->GetItemState(SID_JUMPTOMARK, FALSE, &pItem)) + if( pArgs && SFX_ITEM_SET == pArgs->GetItemState(SID_JUMPTOMARK, sal_False, &pItem)) JumpToSwMark( (( const SfxStringItem*)pItem)->GetValue() ); break; case SID_GALLERY : @@ -982,15 +984,15 @@ void SwView::Execute(SfxRequest &rReq) if(pVFrame->HasChildWindow(SID_BROWSER)) { const SwDBData& rData = GetWrtShell().GetDBDesc(); - SW_MOD()->ShowDBObj(*this, rData, FALSE); + SW_MOD()->ShowDBObj(*this, rData, sal_False); } } break; case FN_INSERT_FIELD_DATA_ONLY : { - BOOL bShow = FALSE; + sal_Bool bShow = sal_False; if( pArgs && - SFX_ITEM_SET == pArgs->GetItemState(nSlot, FALSE, &pItem )) + SFX_ITEM_SET == pArgs->GetItemState(nSlot, sal_False, &pItem )) bShow = ((const SfxBoolItem*)pItem)->GetValue(); if((bShow && bInMailMerge) != GetViewFrame()->HasChildWindow(nSlot)) GetViewFrame()->ToggleChildWindow(nSlot); @@ -1017,7 +1019,7 @@ void SwView::Execute(SfxRequest &rReq) pValues[0].Value <<= aData.sDataSource; pValues[1].Value <<= aData.sCommand; pValues[2].Value <<= aData.nCommandType; - pNewDBMgr->ExecuteFormLetter(rSh, aProperties, TRUE); + pNewDBMgr->ExecuteFormLetter(rSh, aProperties, sal_True); } } bInMailMerge &= bShow; @@ -1026,8 +1028,8 @@ void SwView::Execute(SfxRequest &rReq) break; case FN_QRY_MERGE: { - BOOL bUseCurrentDocument = TRUE; - BOOL bQuery = !pArgs||SFX_ITEM_SET != pArgs->GetItemState(nSlot); + sal_Bool bUseCurrentDocument = sal_True; + sal_Bool bQuery = !pArgs||SFX_ITEM_SET != pArgs->GetItemState(nSlot); if(bQuery) { SfxViewFrame* pTmpFrame = GetViewFrame(); @@ -1088,7 +1090,7 @@ void SwView::Execute(SfxRequest &rReq) case SID_ALIGN_ANY_HDEFAULT : case SID_ALIGN_ANY_VDEFAULT : { - USHORT nAlias = 0; + sal_uInt16 nAlias = 0; if( nSelectionType & (nsSelectionType::SEL_DRW_TXT|nsSelectionType::SEL_TXT) ) { switch( nSlot ) @@ -1161,7 +1163,7 @@ void SwView::Execute(SfxRequest &rReq) /*-------------------------------------------------------------------- Beschreibung: SeitenNr-Feld invalidieren --------------------------------------------------------------------*/ -void SwView::UpdatePageNums(USHORT nPhyNum, USHORT nVirtNum, const String& rPgStr) +void SwView::UpdatePageNums(sal_uInt16 nPhyNum, sal_uInt16 nVirtNum, const String& rPgStr) { String sTemp(GetPageStr( nPhyNum, nVirtNum, rPgStr )); const SfxStringItem aTmp( FN_STAT_PAGE, sTemp ); @@ -1178,7 +1180,7 @@ void SwView::StateStatusLine(SfxItemSet &rSet) SwWrtShell& rShell = GetWrtShell(); SfxWhichIter aIter( rSet ); - USHORT nWhich = aIter.FirstWhich(); + sal_uInt16 nWhich = aIter.FirstWhich(); OSL_ENSURE( nWhich, "empty set"); while( nWhich ) @@ -1187,24 +1189,24 @@ void SwView::StateStatusLine(SfxItemSet &rSet) { case FN_STAT_PAGE: { // Anzahl der Seiten, log. SeitenNr. SeitenNr ermitteln - USHORT nPage, nLogPage; + sal_uInt16 nPage, nLogPage; String sDisplay; rShell.GetPageNumber( -1, rShell.IsCrsrVisible(), nPage, nLogPage, sDisplay ); rSet.Put( SfxStringItem( FN_STAT_PAGE, GetPageStr( nPage, nLogPage, sDisplay) )); - USHORT nCnt = GetWrtShell().GetPageCnt(); + sal_uInt16 nCnt = GetWrtShell().GetPageCnt(); if (nPageCnt != nCnt) // Basic benachrichtigen { nPageCnt = nCnt; - SFX_APP()->NotifyEvent(SfxEventHint(SW_EVENT_PAGE_COUNT, SwDocShell::GetEventName(STR_SW_EVENT_PAGE_COUNT), GetViewFrame()->GetObjectShell()), FALSE); + SFX_APP()->NotifyEvent(SfxEventHint(SW_EVENT_PAGE_COUNT, SwDocShell::GetEventName(STR_SW_EVENT_PAGE_COUNT), GetViewFrame()->GetObjectShell()), sal_False); } } break; case FN_STAT_TEMPLATE: { rSet.Put(SfxStringItem( FN_STAT_TEMPLATE, - rShell.GetCurPageStyle(FALSE))); + rShell.GetCurPageStyle(sal_False))); } break; @@ -1235,7 +1237,7 @@ void SwView::StateStatusLine(SfxItemSet &rSet) if ( ( GetDocShell()->GetCreateMode() != SFX_CREATE_MODE_EMBEDDED ) || !GetDocShell()->IsInPlaceActive() ) { const SwViewOption* pVOpt = rShell.GetViewOptions(); - const USHORT nColumns = pVOpt->GetViewLayoutColumns(); + const sal_uInt16 nColumns = pVOpt->GetViewLayoutColumns(); const bool bBookMode = pVOpt->IsViewLayoutBookMode(); SvxViewLayoutItem aViewLayout(nColumns, bBookMode); rSet.Put( aViewLayout ); @@ -1249,13 +1251,13 @@ void SwView::StateStatusLine(SfxItemSet &rSet) if ( ( GetDocShell()->GetCreateMode() != SFX_CREATE_MODE_EMBEDDED ) || !GetDocShell()->IsInPlaceActive() ) { const SwViewOption* pVOpt = rShell.GetViewOptions(); - const USHORT nCurrentZoom = pVOpt->GetZoom(); + const sal_uInt16 nCurrentZoom = pVOpt->GetZoom(); SvxZoomSliderItem aZoomSliderItem( nCurrentZoom, MINZOOM, MAXZOOM ); aZoomSliderItem.AddSnappingPoint( 100 ); if ( !pWrtShell->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE) ) { - const USHORT nColumns = pVOpt->GetViewLayoutColumns(); + const sal_uInt16 nColumns = pVOpt->GetViewLayoutColumns(); const bool bAutomaticViewLayout = 0 == nColumns; const SwPostItMgr* pMgr = GetPostItMgr(); @@ -1374,7 +1376,7 @@ void SwView::StateStatusLine(SfxItemSet &rSet) if (pNumRule && !bOutlineNum ) // Cursor in Numerierung { - BYTE nNumLevel = rShell.GetNumLevel(); + sal_uInt8 nNumLevel = rShell.GetNumLevel(); if ( nNumLevel < MAXLEVEL ) { if(!pNumRule->IsAutoRule()) @@ -1383,7 +1385,7 @@ void SwView::StateStatusLine(SfxItemSet &rSet) RES_PARATR_NUMRULE, RES_PARATR_NUMRULE); rShell.GetCurAttr(aSet); if(SFX_ITEM_AVAILABLE <= - aSet.GetItemState(RES_PARATR_NUMRULE, TRUE )) + aSet.GetItemState(RES_PARATR_NUMRULE, sal_True)) { const String& rNumStyle = ((const SfxStringItem &) @@ -1463,8 +1465,8 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq) SwWrtShell &rSh = GetWrtShell(); const SfxItemSet* pArgs = rReq.GetArgs(); const SfxPoolItem* pItem=NULL; - BOOL bUp = FALSE; - USHORT nWhich = rReq.GetSlot(); + sal_Bool bUp = sal_False; + sal_uInt16 nWhich = rReq.GetSlot(); switch( nWhich ) { case FN_STAT_PAGE: @@ -1477,7 +1479,7 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq) case FN_STAT_BOOKMARK: if ( pArgs ) { - if (SFX_ITEM_SET == pArgs->GetItemState( nWhich, TRUE, &pItem)) + if (SFX_ITEM_SET == pArgs->GetItemState( nWhich, sal_True, &pItem)) { const IDocumentMarkAccess* pMarkAccess = rSh.getIDocumentMarkAccess(); const sal_Int32 nIdx = static_cast<const SfxUInt16Item*>(pItem)->GetValue(); @@ -1549,19 +1551,19 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq) // PAGES01 const SfxPoolItem* pViewLayoutItem = 0; - if ( pSet && SFX_ITEM_SET == pSet->GetItemState(SID_ATTR_VIEWLAYOUT, TRUE, &pViewLayoutItem)) + if ( pSet && SFX_ITEM_SET == pSet->GetItemState(SID_ATTR_VIEWLAYOUT, sal_True, &pViewLayoutItem)) { - const USHORT nColumns = ((const SvxViewLayoutItem *)pViewLayoutItem)->GetValue(); + const sal_uInt16 nColumns = ((const SvxViewLayoutItem *)pViewLayoutItem)->GetValue(); const bool bBookMode = ((const SvxViewLayoutItem *)pViewLayoutItem)->IsBookMode(); SetViewLayout( nColumns, bBookMode ); } - if ( pSet && SFX_ITEM_SET == pSet->GetItemState(SID_ATTR_ZOOM, TRUE, &pItem)) + if ( pSet && SFX_ITEM_SET == pSet->GetItemState(SID_ATTR_ZOOM, sal_True, &pItem)) { enum SvxZoomType eType = ((const SvxZoomItem *)pItem)->GetType(); SetZoom( eType, ((const SvxZoomItem *)pItem)->GetValue() ); } - bUp = TRUE; + bUp = sal_True; if ( pItem ) rReq.AppendItem( *pItem ); rReq.Done(); @@ -1577,9 +1579,9 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq) ( ( GetDocShell()->GetCreateMode() != SFX_CREATE_MODE_EMBEDDED ) || !GetDocShell()->IsInPlaceActive() ) ) { // PAGES01 - if ( SFX_ITEM_SET == pArgs->GetItemState(SID_ATTR_VIEWLAYOUT, TRUE, &pItem )) + if ( SFX_ITEM_SET == pArgs->GetItemState(SID_ATTR_VIEWLAYOUT, sal_True, &pItem )) { - const USHORT nColumns = ((const SvxViewLayoutItem *)pItem)->GetValue(); + const sal_uInt16 nColumns = ((const SvxViewLayoutItem *)pItem)->GetValue(); const bool bBookMode = (0 == nColumns || 0 != (nColumns % 2)) ? false : ((const SvxViewLayoutItem *)pItem)->IsBookMode(); @@ -1587,7 +1589,7 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq) SetViewLayout( nColumns, bBookMode ); } - bUp = TRUE; + bUp = sal_True; rReq.Done(); InvalidateRulerPos(); @@ -1600,13 +1602,13 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq) if ( pArgs && ( ( GetDocShell()->GetCreateMode() != SFX_CREATE_MODE_EMBEDDED ) || !GetDocShell()->IsInPlaceActive() ) ) { // PAGES01 - if ( SFX_ITEM_SET == pArgs->GetItemState(SID_ATTR_ZOOMSLIDER, TRUE, &pItem )) + if ( SFX_ITEM_SET == pArgs->GetItemState(SID_ATTR_ZOOMSLIDER, sal_True, &pItem )) { - const USHORT nCurrentZoom = ((const SvxZoomSliderItem *)pItem)->GetValue(); + const sal_uInt16 nCurrentZoom = ((const SvxZoomSliderItem *)pItem)->GetValue(); SetZoom( SVX_ZOOM_PERCENT, nCurrentZoom ); } - bUp = TRUE; + bUp = sal_True; rReq.Done(); } } @@ -1614,7 +1616,7 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq) case SID_ATTR_SIZE: { - ULONG nId = FN_INSERT_FIELD; + sal_uLong nId = FN_INSERT_FIELD; if( rSh.IsCrsrInTbl() ) nId = FN_FORMAT_TABLE_DLG; else if( rSh.GetCurTOX() ) @@ -1641,7 +1643,7 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq) } if( nId ) GetViewFrame()->GetDispatcher()->Execute( - static_cast< USHORT >( nId ), SFX_CALLMODE_SYNCHRON | SFX_CALLMODE_RECORD ); + static_cast< sal_uInt16 >( nId ), SFX_CALLMODE_SYNCHRON | SFX_CALLMODE_RECORD ); } break; @@ -1649,7 +1651,7 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq) { if ( pArgs ) { - if (SFX_ITEM_SET == pArgs->GetItemState( nWhich, TRUE, &pItem)) + if (SFX_ITEM_SET == pArgs->GetItemState( nWhich, sal_True, &pItem)) { switch ( ((const SfxUInt16Item *)pItem)->GetValue() ) { @@ -1678,23 +1680,23 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq) else rSh.ToggleBlockMode(); } - bUp = TRUE; + bUp = sal_True; break; } case FN_SET_ADD_MODE: rSh.ToggleAddMode(); nWhich = FN_STAT_SELMODE; - bUp = TRUE; + bUp = sal_True; break; case FN_SET_BLOCK_MODE: rSh.ToggleBlockMode(); nWhich = FN_STAT_SELMODE; - bUp = TRUE; + bUp = sal_True; break; case FN_SET_EXT_MODE: rSh.ToggleExtMode(); nWhich = FN_STAT_SELMODE; - bUp = TRUE; + bUp = sal_True; break; case SID_ATTR_INSERT: SwPostItMgr* pMgr = GetPostItMgr(); @@ -1704,7 +1706,7 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq) } else rSh.ToggleInsMode(); - bUp = TRUE; + bUp = sal_True; break; } @@ -1716,11 +1718,11 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq) } } -void SwView::InsFrmMode(USHORT nCols) +void SwView::InsFrmMode(sal_uInt16 nCols) { if ( pWrtShell->HasWholeTabSelection() ) { - SwFlyFrmAttrMgr aMgr( TRUE, pWrtShell, FRMMGR_TYPE_TEXT ); + SwFlyFrmAttrMgr aMgr( sal_True, pWrtShell, FRMMGR_TYPE_TEXT ); const SwFrmFmt &rPageFmt = pWrtShell->GetPageDesc(pWrtShell->GetCurPageDesc()).GetMaster(); @@ -1745,7 +1747,7 @@ void SwView::InsFrmMode(USHORT nCols) --------------------------------------------------------------------*/ void SwView::EditLinkDlg() { - BOOL bWeb = 0 != PTR_CAST(SwWebView, this); + sal_Bool bWeb = 0 != PTR_CAST(SwWebView, this); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); SfxAbstractLinksDialog* pDlg = pFact->CreateLinksDialog( &GetViewFrame()->GetWindow(), &GetWrtShell().GetLinkManager(), bWeb ); if ( pDlg ) @@ -1755,21 +1757,21 @@ void SwView::EditLinkDlg() } } -BOOL SwView::JumpToSwMark( const String& rMark ) +sal_Bool SwView::JumpToSwMark( const String& rMark ) { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; if( rMark.Len() ) { // wir wollen den Bookmark aber am oberen Rand haben - BOOL bSaveCC = IsCrsrAtCenter(); - BOOL bSaveCT = IsCrsrAtTop(); - SetCrsrAtTop( TRUE ); + sal_Bool bSaveCC = IsCrsrAtCenter(); + sal_Bool bSaveCT = IsCrsrAtTop(); + SetCrsrAtTop( sal_True ); // Damit in FrameSet auch gescrollt werden kann, muss die // entsprechende Shell auch das Focus-Flag gesetzt haben! - BOOL bHasShFocus = pWrtShell->HasShFcs(); + sal_Bool bHasShFocus = pWrtShell->HasShFcs(); if( !bHasShFocus ) - pWrtShell->ShGetFcs( FALSE ); + pWrtShell->ShGetFcs( sal_False ); const SwFmtINetFmt* pINet; String sCmp, sMark( INetURLObject::decode( rMark, INET_HEX_ESCAPE, @@ -1825,15 +1827,15 @@ BOOL SwView::JumpToSwMark( const String& rMark ) TransliterationModules_IGNORE_CASE ); //todo/mba: assuming that notes shouldn't be searched - BOOL bSearchInNotes = FALSE; + sal_Bool bSearchInNotes = sal_False; if( pWrtShell->SearchPattern( aSearchOpt, bSearchInNotes, DOCPOS_START, DOCPOS_END )) { pWrtShell->EnterStdMode(); // Selektion wieder aufheben - bRet = TRUE; + bRet = sal_True; } } else if( pMarkAccess->getMarksEnd() != (ppMark = pMarkAccess->findMark(sMark)) ) - pWrtShell->GotoMark( ppMark->get(), FALSE, TRUE ), bRet = TRUE; + pWrtShell->GotoMark( ppMark->get(), sal_False, sal_True ), bRet = sal_True; else if( 0 != ( pINet = pWrtShell->FindINetAttr( sMark ) )) { pWrtShell->addCurrentPosition(); bRet = pWrtShell->GotoINetAttr( *pINet->GetTxtINetFmt() ); @@ -1842,7 +1844,7 @@ BOOL SwView::JumpToSwMark( const String& rMark ) // fuer alle Arten von Flys if( FLYCNTTYPE_ALL != eFlyType && pWrtShell->GotoFly( sName, eFlyType )) { - bRet = TRUE; + bRet = sal_True; if( FLYCNTTYPE_FRM == eFlyType ) { // TextFrames: Cursor in den Frame setzen @@ -1857,7 +1859,7 @@ BOOL SwView::JumpToSwMark( const String& rMark ) } } else if( pMarkAccess->getMarksEnd() != (ppMark = pMarkAccess->findMark(sMark))) - pWrtShell->GotoMark( ppMark->get(), FALSE, TRUE ), bRet = TRUE; + pWrtShell->GotoMark( ppMark->get(), sal_False, sal_True ), bRet = sal_True; else if( 0 != ( pINet = pWrtShell->FindINetAttr( sMark ) )) bRet = pWrtShell->GotoINetAttr( *pINet->GetTxtINetFmt() ); @@ -1887,9 +1889,9 @@ sal_uInt16 lcl_PageDescWithHeader( const SwDoc& rDoc ) const SwPageDesc& rPageDesc = rDoc.GetPageDesc( i ); const SwFrmFmt& rMaster = rPageDesc.GetMaster(); const SfxPoolItem* pItem; - if( ( SFX_ITEM_SET == rMaster.GetAttrSet().GetItemState( RES_HEADER, FALSE, &pItem ) && + if( ( SFX_ITEM_SET == rMaster.GetAttrSet().GetItemState( RES_HEADER, sal_False, &pItem ) && ((SwFmtHeader*)pItem)->IsActive() ) || - ( SFX_ITEM_SET == rMaster.GetAttrSet().GetItemState( RES_FOOTER, FALSE, &pItem ) && + ( SFX_ITEM_SET == rMaster.GetAttrSet().GetItemState( RES_FOOTER, sal_False, &pItem ) && ((SwFmtFooter*)pItem)->IsActive()) ) ++nRet; } @@ -1903,7 +1905,7 @@ void SwView::ExecuteInsertDoc( SfxRequest& rRequest, const SfxPoolItem* pItem ) { pViewImpl->InitRequest( rRequest ); pViewImpl->SetParam( pItem ? 1 : 0 ); - USHORT nSlot = rRequest.GetSlot(); + sal_uInt16 nSlot = rRequest.GetSlot(); if ( !pItem ) { @@ -1914,7 +1916,7 @@ void SwView::ExecuteInsertDoc( SfxRequest& rRequest, const SfxPoolItem* pItem ) { String sFile, sFilter; sFile = ( (const SfxStringItem *)pItem )->GetValue(); - if ( SFX_ITEM_SET == rRequest.GetArgs()->GetItemState( FN_PARAM_1, TRUE, &pItem ) ) + if ( SFX_ITEM_SET == rRequest.GetArgs()->GetItemState( FN_PARAM_1, sal_True, &pItem ) ) sFilter = ( (const SfxStringItem *)pItem )->GetValue(); bool bHasFileName = ( sFile.Len() > 0 ); @@ -1928,7 +1930,7 @@ void SwView::ExecuteInsertDoc( SfxRequest& rRequest, const SfxPoolItem* pItem ) } } -long SwView::InsertDoc( USHORT nSlotId, const String& rFileName, const String& rFilterName, INT16 nVersion ) +long SwView::InsertDoc( sal_uInt16 nSlotId, const String& rFileName, const String& rFilterName, sal_Int16 nVersion ) { SfxMedium* pMed = 0; SwDocShell* pDocSh = GetDocShell(); @@ -1939,17 +1941,17 @@ long SwView::InsertDoc( USHORT nSlotId, const String& rFileName, const String& r const SfxFilter* pFilter = rFact.GetFilterContainer()->GetFilter4FilterName( rFilterName ); if ( !pFilter ) { - pMed = new SfxMedium(rFileName, STREAM_READ, TRUE, 0, 0 ); + pMed = new SfxMedium(rFileName, STREAM_READ, sal_True, 0, 0 ); SfxFilterMatcher aMatcher( rFact.GetFilterContainer()->GetName() ); - pMed->UseInteractionHandler( TRUE ); - ErrCode nErr = aMatcher.GuessFilter( *pMed, &pFilter, FALSE ); + pMed->UseInteractionHandler( sal_True ); + ErrCode nErr = aMatcher.GuessFilter( *pMed, &pFilter, sal_False ); if ( nErr ) DELETEZ(pMed); else pMed->SetFilter( pFilter ); } else - pMed = new SfxMedium(rFileName, STREAM_READ, TRUE, pFilter, 0); + pMed = new SfxMedium(rFileName, STREAM_READ, sal_True, pFilter, 0); } else { @@ -1964,21 +1966,21 @@ long SwView::InsertDoc( USHORT nSlotId, const String& rFileName, const String& r return InsertMedium( nSlotId, pMed, nVersion ); } -long SwView::InsertMedium( USHORT nSlotId, SfxMedium* pMedium, INT16 nVersion ) +long SwView::InsertMedium( sal_uInt16 nSlotId, SfxMedium* pMedium, sal_Int16 nVersion ) { - BOOL bInsert = FALSE, bCompare = FALSE; + sal_Bool bInsert = sal_False, bCompare = sal_False; long nFound = 0; SwDocShell* pDocSh = GetDocShell(); switch( nSlotId ) { case SID_DOCUMENT_MERGE: break; - case SID_DOCUMENT_COMPARE: bCompare = TRUE; break; - case SID_INSERTDOC: bInsert = TRUE; break; + case SID_DOCUMENT_COMPARE: bCompare = sal_True; break; + case SID_INSERTDOC: bInsert = sal_True; break; default: OSL_ENSURE( !this, "unknown SlotId!" ); - bInsert = TRUE; + bInsert = sal_True; nSlotId = SID_INSERTDOC; break; } @@ -2018,10 +2020,10 @@ long SwView::InsertMedium( USHORT nSlotId, SfxMedium* pMedium, INT16 nVersion ) SwDoc *pDoc = pDocSh->GetDoc(); if( pRead && pDocSh->GetDoc() ) nUndoCheck = lcl_PageDescWithHeader( *pDoc ); - ULONG nErrno; + sal_uLong nErrno; { //Scope for SwWait-Object, to be able to execute slots //outside this scope. - SwWait aWait( *GetDocShell(), TRUE ); + SwWait aWait( *GetDocShell(), sal_True ); pWrtShell->StartAllAction(); if ( pWrtShell->HasSelection() ) pWrtShell->DelRight(); // Selektionen loeschen @@ -2032,10 +2034,8 @@ long SwView::InsertMedium( USHORT nSlotId, SfxMedium* pMedium, INT16 nVersion ) } else { - sal_Bool bUndo = pDoc->DoesUndo(); - pDoc->DoUndo( sal_False ); + ::sw::UndoGuard const ug(pDoc->GetIDocumentUndoRedo()); nErrno = pDocSh->InsertFrom( *pMedium ) ? 0 : ERR_SWG_READ_ERROR; - pDoc->DoUndo( bUndo ); } } @@ -2045,14 +2045,16 @@ long SwView::InsertMedium( USHORT nSlotId, SfxMedium* pMedium, INT16 nVersion ) { SfxRequest aReq( FN_UPDATE_TOX, SFX_CALLMODE_SLOT, GetPool() ); Execute( aReq ); - pWrtShell->SetUpdateTOX( FALSE ); // wieder zurueck setzen + pWrtShell->SetUpdateTOX( sal_False ); // wieder zurueck setzen } if( pDoc ) { // Disable Undo for .sdw or // if the number of page styles with header/footer has changed if( !pRead || nUndoCheck != lcl_PageDescWithHeader( *pDoc ) ) - pDoc->DelAllUndoObj(); + { + pDoc->GetIDocumentUndoRedo().DelAllUndoObj(); + } } pWrtShell->EndAllAction(); @@ -2069,18 +2071,19 @@ long SwView::InsertMedium( USHORT nSlotId, SfxMedium* pMedium, INT16 nVersion ) else { SfxObjectShellRef xDocSh; + SfxObjectShellLock xLockRef; -extern int lcl_FindDocShell( SfxObjectShellRef& xDocSh, +extern int lcl_FindDocShell( SfxObjectShellRef& xDocSh, SfxObjectShellLock& xLockRef, const String& rFileName, const String& rPasswd, - String& rFilter, INT16 nVersion, + String& rFilter, sal_Int16 nVersion, SwDocShell* pDestSh ); String sFltNm; - int nRet = lcl_FindDocShell( xDocSh, pMedium->GetName(), aEmptyStr, + int nRet = lcl_FindDocShell( xDocSh, xLockRef, pMedium->GetName(), aEmptyStr, sFltNm, nVersion, pDocSh ); if( nRet ) { - SwWait aWait( *GetDocShell(), TRUE ); + SwWait aWait( *GetDocShell(), sal_True ); pWrtShell->StartAllAction(); pWrtShell->EnterStdMode(); // Selektionen loeschen @@ -2106,7 +2109,7 @@ extern int lcl_FindDocShell( SfxObjectShellRef& xDocSh, return nFound; } -void SwView::EnableMailMerge(BOOL bEnable ) +void SwView::EnableMailMerge(sal_Bool bEnable ) { bInMailMerge = bEnable; SfxBindings& rBind = GetViewFrame()->GetBindings(); @@ -2174,7 +2177,7 @@ class SwMergeSourceWarningBox_Impl : public ModalDialog void SetMessText( const String& rText ) { aMessageFI.SetText( rText ); } }; -void SwView::GenerateFormLetter(BOOL bUseCurrentDocument) +void SwView::GenerateFormLetter(sal_Bool bUseCurrentDocument) { if(bUseCurrentDocument) { @@ -2191,7 +2194,7 @@ void SwView::GenerateFormLetter(BOOL bUseCurrentDocument) } if(!xDBContext.is()) return ; - BOOL bCallAddressPilot = FALSE; + sal_Bool bCallAddressPilot = sal_False; if ( lcl_NeedAdditionalDataSource( xDBContext ) ) { // no data sources are available - create a new one @@ -2201,7 +2204,7 @@ void SwView::GenerateFormLetter(BOOL bUseCurrentDocument) // no cancel allowed if ( RET_OK != aWarning.Execute() ) return; - bCallAddressPilot = TRUE; + bCallAddressPilot = sal_True; } else { @@ -2231,12 +2234,12 @@ void SwView::GenerateFormLetter(BOOL bUseCurrentDocument) //call insert fields with database field page available, only SfxViewFrame* pVFrame = GetViewFrame(); //at first hide the default field dialog if currently visible - pVFrame->SetChildWindow(FN_INSERT_FIELD, FALSE); + pVFrame->SetChildWindow(FN_INSERT_FIELD, sal_False); //enable the status of the db field dialog - it is disabled in the status method //to prevent creation of the dialog without mail merge active EnableMailMerge(); //then show the "Data base only" field dialog - SfxBoolItem aOn(FN_INSERT_FIELD_DATA_ONLY, TRUE); + SfxBoolItem aOn(FN_INSERT_FIELD_DATA_ONLY, sal_True); pVFrame->GetDispatcher()->Execute(FN_INSERT_FIELD_DATA_ONLY, SFX_CALLMODE_SYNCHRON, &aOn, 0L); return; @@ -2294,7 +2297,7 @@ void SwView::GenerateFormLetter(BOOL bUseCurrentDocument) pValues[0].Value <<= aData.sDataSource; pValues[1].Value <<= aData.sCommand; pValues[2].Value <<= aData.nCommandType; - pNewDBMgr->ExecuteFormLetter(GetWrtShell(), aProperties, TRUE); + pNewDBMgr->ExecuteFormLetter(GetWrtShell(), aProperties, sal_True); } } else @@ -2332,7 +2335,7 @@ IMPL_LINK( SwView, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileDlg ) SfxMedium* pMed = pViewImpl->CreateMedium(); if ( pMed ) { - USHORT nSlot = pViewImpl->GetRequest()->GetSlot(); + sal_uInt16 nSlot = pViewImpl->GetRequest()->GetSlot(); long nFound = InsertMedium( nSlot, pMed, pViewImpl->GetParam() ); if ( SID_INSERTDOC == nSlot ) @@ -2358,7 +2361,7 @@ IMPL_LINK( SwView, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileDlg ) pVFrame->ShowChildWindow(FN_REDLINE_ACCEPT); // RedlineDlg neu initialisieren - USHORT nId = SwRedlineAcceptChild::GetChildWindowId(); + sal_uInt16 nId = SwRedlineAcceptChild::GetChildWindowId(); SwRedlineAcceptChild* pRed = (SwRedlineAcceptChild*)pVFrame->GetChildWindow( nId ); if ( pRed ) pRed->ReInitDlg( GetDocShell() ); diff --git a/sw/source/ui/uiview/viewcoll.cxx b/sw/source/ui/uiview/viewcoll.cxx index 87c20e40c6..ae81629926 100644 --- a/sw/source/ui/uiview/viewcoll.cxx +++ b/sw/source/ui/uiview/viewcoll.cxx @@ -45,7 +45,7 @@ void SwView::ExecColl(SfxRequest &rReq) { const SfxItemSet* pArgs = rReq.GetArgs(); const SfxPoolItem* pItem = 0; - USHORT nWhich = rReq.GetSlot(); + sal_uInt16 nWhich = rReq.GetSlot(); switch( nWhich ) { case FN_SET_PAGE: @@ -58,10 +58,10 @@ void SwView::ExecColl(SfxRequest &rReq) if( pArgs ) { if (pArgs && - SFX_ITEM_SET == pArgs->GetItemState( nWhich , TRUE, &pItem )) + SFX_ITEM_SET == pArgs->GetItemState( nWhich , sal_True, &pItem )) { if( ((SfxStringItem*)pItem)->GetValue() != - GetWrtShell().GetCurPageStyle(FALSE) ) + GetWrtShell().GetCurPageStyle(sal_False) ) { SfxStringItem aName(SID_STYLE_APPLY, ((SfxStringItem*)pItem)->GetValue()); diff --git a/sw/source/ui/uiview/viewdlg.cxx b/sw/source/ui/uiview/viewdlg.cxx index e769766bec..4dcb2911cc 100644 --- a/sw/source/ui/uiview/viewdlg.cxx +++ b/sw/source/ui/uiview/viewdlg.cxx @@ -53,9 +53,9 @@ void SwView::ExecDlg(SfxRequest &rReq) const SfxPoolItem* pItem = 0; const SfxItemSet* pArgs = rReq.GetArgs(); - USHORT nSlot = rReq.GetSlot(); + sal_uInt16 nSlot = rReq.GetSlot(); if(pArgs) - pArgs->GetItemState( GetPool().GetWhich(nSlot), FALSE, &pItem ); + pArgs->GetItemState( GetPool().GetWhich(nSlot), sal_False, &pItem ); switch ( nSlot ) { @@ -63,11 +63,11 @@ void SwView::ExecDlg(SfxRequest &rReq) { if ( pItem ) { - USHORT nValue = ((SfxUInt16Item *)pItem)->GetValue(); - USHORT nOldValue = pWrtShell->GetPageOffset(); - USHORT nPage, nLogPage; + sal_uInt16 nValue = ((SfxUInt16Item *)pItem)->GetValue(); + sal_uInt16 nOldValue = pWrtShell->GetPageOffset(); + sal_uInt16 nPage, nLogPage; pWrtShell->GetPageNum( nPage, nLogPage, - pWrtShell->IsCrsrVisible(), FALSE); + pWrtShell->IsCrsrVisible(), sal_False); if(nValue != nOldValue || nValue != nLogPage) { diff --git a/sw/source/ui/uiview/viewdlg2.cxx b/sw/source/ui/uiview/viewdlg2.cxx index 5aca43a02b..1712cd0565 100644 --- a/sw/source/ui/uiview/viewdlg2.cxx +++ b/sw/source/ui/uiview/viewdlg2.cxx @@ -31,7 +31,7 @@ #include <sfx2/request.hxx> #include <sfx2/viewfrm.hxx> - +#include <sfx2/objface.hxx> #include <fldmgr.hxx> #include <expfld.hxx> #include <modcfg.hxx> @@ -84,10 +84,10 @@ void SwView::ExecDlgExt(SfxRequest &rReq) SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); OSL_ENSURE(pFact, "Dialogdiet fail!"); AbstractInsFootNoteDlg* pDlg = pFact->CreateInsFootNoteDlg( DLG_INS_FOOTNOTE, - pMDI, *pWrtShell, TRUE ); + pMDI, *pWrtShell, sal_True ); OSL_ENSURE(pDlg, "Dialogdiet fail!"); - pDlg->SetHelpId(FN_EDIT_FOOTNOTE); + pDlg->SetHelpId(GetStaticInterface()->GetSlot(FN_EDIT_FOOTNOTE)->GetCommand()); pDlg->SetText( SW_RESSTR(STR_EDIT_FOOTNOTE) ); pDlg->Execute(); delete pDlg; @@ -96,15 +96,15 @@ void SwView::ExecDlgExt(SfxRequest &rReq) } } -void SwView::AutoCaption(const USHORT nType, const SvGlobalName *pOleId) +void SwView::AutoCaption(const sal_uInt16 nType, const SvGlobalName *pOleId) { SwModuleOptions* pModOpt = SW_MOD()->GetModuleConfig(); - BOOL bWeb = 0 != PTR_CAST(SwWebView, this); + sal_Bool bWeb = 0 != PTR_CAST(SwWebView, this); if (pModOpt->IsInsWithCaption(bWeb)) { const InsCaptionOpt *pOpt = pModOpt->GetCapOption(bWeb, (SwCapObjType)nType, pOleId); - if (pOpt && pOpt->UseCaption() == TRUE) + if (pOpt && pOpt->UseCaption() == sal_True) InsertCaption(pOpt); } } @@ -120,7 +120,7 @@ void SwView::InsertCaption(const InsCaptionOpt *pOpt) SwWrtShell &rSh = GetWrtShell(); if(rName.Len()) { - USHORT nPoolId = SwStyleNameMapper::GetPoolIdFromUIName(rName, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL); + sal_uInt16 nPoolId = SwStyleNameMapper::GetPoolIdFromUIName(rName, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL); if( USHRT_MAX != nPoolId ) rSh.GetTxtCollFromPool(nPoolId); // Pool-Vorlage existiert nicht: Existiert sie am Dokument? @@ -159,16 +159,16 @@ void SwView::InsertCaption(const InsCaptionOpt *pOpt) if (pFldType) { pFldType->SetDelimiter(pOpt->GetSeparator()); - pFldType->SetOutlineLvl( static_cast< BYTE >(pOpt->GetLevel()) ); + pFldType->SetOutlineLvl( static_cast< sal_uInt8 >(pOpt->GetLevel()) ); } } - USHORT nID = USHRT_MAX; + sal_uInt16 nID = USHRT_MAX; SwFieldType* pType = 0; - const USHORT nCount = aMgr.GetFldTypeCount(); + const sal_uInt16 nCount = aMgr.GetFldTypeCount(); if( rName.Len() ) { - for (USHORT i = 0; i < nCount; ++i) + for (sal_uInt16 i = 0; i < nCount; ++i) { pType = aMgr.GetFldType(USHRT_MAX, i); String aTmpName( pType->GetName() ); @@ -193,7 +193,7 @@ void SwView::InsertCaption(const InsCaptionOpt *pOpt) if(pType) ((SwSetExpFieldType*)pType)->SetSeqFormat(pOpt->GetNumType()); - rSh.UpdateExpFlds( TRUE ); + rSh.UpdateExpFlds( sal_True ); rSh.EndAllAction(); diff --git a/sw/source/ui/uiview/viewdraw.cxx b/sw/source/ui/uiview/viewdraw.cxx index 0e46771f5d..4219857b89 100644 --- a/sw/source/ui/uiview/viewdraw.cxx +++ b/sw/source/ui/uiview/viewdraw.cxx @@ -353,7 +353,7 @@ void SwView::ExecDraw(SfxRequest& rReq) }; GetViewFrame()->GetBindings().Invalidate(aInval); - BOOL bEndTextEdit = TRUE; + sal_Bool bEndTextEdit = sal_True; if (pFuncPtr) { if (GetDrawFuncPtr()) @@ -371,7 +371,7 @@ void SwView::ExecDraw(SfxRequest& rReq) { if(SID_OBJECT_SELECT == nDrawSfxId ) { - pWrtShell->GotoObj(TRUE); + pWrtShell->GotoObj(sal_True); } else { @@ -388,7 +388,7 @@ void SwView::ExecDraw(SfxRequest& rReq) { SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj(); BeginTextEdit(pObj); - bEndTextEdit = FALSE; + bEndTextEdit = sal_False; } } } @@ -416,7 +416,7 @@ void SwView::ExitDraw() { // the shell may be invalid at close/reload/SwitchToViewShell SfxDispatcher* pDispatch = GetViewFrame()->GetDispatcher(); - USHORT nIdx = 0; + sal_uInt16 nIdx = 0; SfxShell* pTest = 0; do { diff --git a/sw/source/ui/uiview/viewfunc.hxx b/sw/source/ui/uiview/viewfunc.hxx index 64d597a477..630e2b9170 100644 --- a/sw/source/ui/uiview/viewfunc.hxx +++ b/sw/source/ui/uiview/viewfunc.hxx @@ -31,7 +31,6 @@ class ImageButton; class Point; -class PrintDialog; class SfxItemSet; class SfxPrinter; class SfxTabPage; @@ -43,17 +42,16 @@ class Window; class SwWrtShell; // folgende Funktionen stehen im viewprt.cxx -PrintDialog* CreatePrintDialog( Window* , USHORT, SwWrtShell* ); -void SetPrinter( IDocumentDeviceAccess*, SfxPrinter*, BOOL bWeb ); +void SetPrinter( IDocumentDeviceAccess*, SfxPrinter*, sal_Bool bWeb ); SfxTabPage* CreatePrintOptionsPage( Window*, const SfxItemSet& ); -void SetAppPrintOptions( ViewShell* pSh, BOOL bWeb ); +void SetAppPrintOptions( ViewShell* pSh, sal_Bool bWeb ); // folgende Funktionen stehen im viewport.cxx void ViewResizePixel( const Window &rRef, const Point &rOfst, const Size &rSize, const Size &rEditSz, - const BOOL bInner, + const sal_Bool bInner, SwScrollbar& rVScrollbar, SwScrollbar& rHScrollbar, ImageButton* pPageUpBtn, @@ -62,8 +60,8 @@ void ViewResizePixel( const Window &rRef, Window& rScrollBarBox, SvxRuler* pVLineal = 0, SvxRuler* pHLineal = 0, - BOOL bWebView = FALSE, - BOOL bVRulerRight = FALSE ); + sal_Bool bWebView = sal_False, + sal_Bool bVRulerRight = sal_False ); #endif diff --git a/sw/source/ui/uiview/viewling.cxx b/sw/source/ui/uiview/viewling.cxx index 40e196b294..2b1d3060ec 100644 --- a/sw/source/ui/uiview/viewling.cxx +++ b/sw/source/ui/uiview/viewling.cxx @@ -539,7 +539,7 @@ void SwView::InsertThesaurusSynonym( const String &rSynonmText, const String &rL if( !bSelection ) { if(pWrtShell->IsEndWrd()) - pWrtShell->Left(CRSR_SKIP_CELLS, FALSE, 1, FALSE ); + pWrtShell->Left(CRSR_SKIP_CELLS, sal_False, 1, sal_False ); pWrtShell->SelWrd(); @@ -747,7 +747,7 @@ sal_Bool SwView::ExecSpellPopup(const Point& rPt) if ( pMenu ) { OUString aSlotURL( RTL_CONSTASCII_USTRINGPARAM( "slot:" )); - USHORT nId = ((PopupMenu*)pMenu)->Execute(pEditWin, aPixPos); + sal_uInt16 nId = ((PopupMenu*)pMenu)->Execute(pEditWin, aPixPos); OUString aCommand = ((PopupMenu*)pMenu)->GetItemCommand(nId); if (aCommand.getLength() == 0 ) { @@ -912,7 +912,7 @@ IMPL_LINK( SwFieldDialog, MyListBoxHandler, ListBox *, pBox ) (*pFieldmark->GetParameters())[ sKey ] = makeAny(selection); pFieldmark->Invalidate(); SwView& rView = ( ( SwEditWin* )GetParent() )->GetView(); - rView.GetDocShell()->SetModified( TRUE ); + rView.GetDocShell()->SetModified( sal_True ); } EndPopupMode(); diff --git a/sw/source/ui/uiview/viewmdi.cxx b/sw/source/ui/uiview/viewmdi.cxx index 28af9cae32..b321f32431 100644 --- a/sw/source/ui/uiview/viewmdi.cxx +++ b/sw/source/ui/uiview/viewmdi.cxx @@ -64,7 +64,7 @@ #include <IDocumentSettingAccess.hxx> #include <PostItMgr.hxx> -USHORT SwView::nMoveType = NID_PGE; +sal_uInt16 SwView::nMoveType = NID_PGE; sal_Int32 SwView::nActMark = 0; @@ -73,16 +73,16 @@ sal_Int32 SwView::nActMark = 0; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::frame; -void SwView::SetZoom( SvxZoomType eZoomType, short nFactor, BOOL bViewOnly ) +void SwView::SetZoom( SvxZoomType eZoomType, short nFactor, sal_Bool bViewOnly ) { _SetZoom( GetEditWin().GetOutputSizePixel(), eZoomType, nFactor, bViewOnly ); } void SwView::_SetZoom( const Size &rEditSize, SvxZoomType eZoomType, - short nFactor, BOOL bViewOnly ) + short nFactor, sal_Bool bViewOnly ) { - BOOL bUnLockView = !pWrtShell->IsViewLocked(); - pWrtShell->LockView( TRUE ); + sal_Bool bUnLockView = !pWrtShell->IsViewLocked(); + pWrtShell->LockView( sal_True ); pWrtShell->LockPaint(); { @@ -90,7 +90,7 @@ void SwView::_SetZoom( const Size &rEditSize, SvxZoomType eZoomType, long nFac = nFactor; - BOOL bWeb = 0 != PTR_CAST(SwWebView, this); + sal_Bool bWeb = 0 != PTR_CAST(SwWebView, this); SwMasterUsrPref *pUsrPref = (SwMasterUsrPref*)SW_MOD()->GetUsrPref(bWeb); const SwPageDesc &rDesc = pWrtShell->GetPageDesc( pWrtShell->GetCurPageDesc() ); @@ -157,19 +157,19 @@ void SwView::_SetZoom( const Size &rEditSize, SvxZoomType eZoomType, //MasterUsrPrefs updaten UND DANACH die ViewOptions der aktuellen //View updaten. if ( !bViewOnly && - (USHORT(nFac) != pUsrPref->GetZoom() || - BYTE (eZoomType) != pUsrPref->GetZoomType()) ) + (sal_uInt16(nFac) != pUsrPref->GetZoom() || + sal_uInt8 (eZoomType) != pUsrPref->GetZoomType()) ) { - pUsrPref->SetZoom ( USHORT(nFac) ); + pUsrPref->SetZoom ( sal_uInt16(nFac) ); pUsrPref->SetZoomType( eZoomType ); SW_MOD()->ApplyUsrPref( *pUsrPref, bViewOnly ? this: 0, bViewOnly ? VIEWOPT_DEST_VIEW_ONLY : 0 ); pUsrPref->SetModified(); } - if ( pOpt->GetZoom() != (USHORT) nFac ) + if ( pOpt->GetZoom() != (sal_uInt16) nFac ) { - aOpt.SetZoom ( USHORT(nFac) ); + aOpt.SetZoom ( sal_uInt16(nFac) ); aOpt.SetReadonly(pOpt->IsReadonly()); pWrtShell->ApplyViewOptions( aOpt ); } @@ -198,9 +198,9 @@ void SwView::_SetZoom( const Size &rEditSize, SvxZoomType eZoomType, ((SwViewOption*)pWrtShell->GetViewOptions())->SetZoomType( eZoomType ); CalcVisArea( rEditSize ); //fuer das Neuberechnen des sichtbaren Bereiches } - else if ( USHORT(nFac) != pOpt->GetZoom() ) + else if ( sal_uInt16(nFac) != pOpt->GetZoom() ) { - aOpt.SetZoom ( USHORT(nFac) ); + aOpt.SetZoom ( sal_uInt16(nFac) ); pWrtShell->ApplyViewOptions( aOpt ); } @@ -213,13 +213,13 @@ void SwView::_SetZoom( const Size &rEditSize, SvxZoomType eZoomType, } pWrtShell->UnlockPaint(); if( bUnLockView ) - pWrtShell->LockView( FALSE ); + pWrtShell->LockView( sal_False ); } -void SwView::SetViewLayout( USHORT nColumns, bool bBookMode, BOOL bViewOnly ) +void SwView::SetViewLayout( sal_uInt16 nColumns, bool bBookMode, sal_Bool bViewOnly ) { - const BOOL bUnLockView = !pWrtShell->IsViewLocked(); - pWrtShell->LockView( TRUE ); + const sal_Bool bUnLockView = !pWrtShell->IsViewLocked(); + pWrtShell->LockView( sal_True ); pWrtShell->LockPaint(); { @@ -228,7 +228,7 @@ void SwView::SetViewLayout( USHORT nColumns, bool bBookMode, BOOL bViewOnly ) if ( !GetViewFrame()->GetFrame().IsInPlace() && !bViewOnly ) { - const BOOL bWeb = 0 != PTR_CAST(SwWebView, this); + const sal_Bool bWeb = 0 != PTR_CAST(SwWebView, this); SwMasterUsrPref *pUsrPref = (SwMasterUsrPref*)SW_MOD()->GetUsrPref(bWeb); //MasterUsrPrefs updaten UND DANACH die ViewOptions der aktuellen @@ -263,7 +263,7 @@ void SwView::SetViewLayout( USHORT nColumns, bool bBookMode, BOOL bViewOnly ) pWrtShell->UnlockPaint(); if( bUnLockView ) - pWrtShell->LockView( FALSE ); + pWrtShell->LockView( sal_False ); SfxBindings& rBnd = GetViewFrame()->GetBindings(); rBnd.Invalidate( SID_ATTR_VIEWLAYOUT ); @@ -286,15 +286,15 @@ IMPL_LINK( SwView, WindowChildEventListener, VclSimpleEvent*, pEvent ) { case VCLEVENT_WINDOW_HIDE: if( pChildWin == pHScrollbar ) - ShowHScrollbar( FALSE ); + ShowHScrollbar( sal_False ); else if( pChildWin == pVScrollbar ) - ShowVScrollbar( FALSE ); + ShowVScrollbar( sal_False ); break; case VCLEVENT_WINDOW_SHOW: if( pChildWin == pHScrollbar ) - ShowHScrollbar( TRUE ); + ShowHScrollbar( sal_True ); else if( pChildWin == pVScrollbar ) - ShowVScrollbar( TRUE ); + ShowVScrollbar( sal_True ); break; } } @@ -302,7 +302,7 @@ IMPL_LINK( SwView, WindowChildEventListener, VclSimpleEvent*, pEvent ) return 0; } -int SwView::_CreateScrollbar( BOOL bHori ) +int SwView::_CreateScrollbar( sal_Bool bHori ) { Window *pMDI = &GetViewFrame()->GetWindow(); SwScrollbar** ppScrollbar = bHori ? &pHScrollbar : &pVScrollbar; @@ -320,9 +320,9 @@ int SwView::_CreateScrollbar( BOOL bHori ) (*ppScrollbar)->SetScrollHdl( LINK( this, SwView, ScrollHdl )); (*ppScrollbar)->SetEndScrollHdl( LINK( this, SwView, EndScrollHdl )); - (*ppScrollbar)->EnableDrag( TRUE ); + (*ppScrollbar)->EnableDrag( sal_True ); - (*ppScrollbar)->SetAuto( TRUE ); + (*ppScrollbar)->SetAuto( sal_True ); if(GetWindow()) InvalidateBorder(); @@ -335,12 +335,12 @@ int SwView::_CreateScrollbar( BOOL bHori ) return 1; } -void SwView::CreatePageButtons(BOOL bShow) +void SwView::CreatePageButtons(sal_Bool bShow) { Window *pMDI = &GetViewFrame()->GetWindow(); - pPageUpBtn = new SwHlpImageButton(pMDI, SW_RES( BTN_PAGEUP ), TRUE ); + pPageUpBtn = new SwHlpImageButton(pMDI, SW_RES( BTN_PAGEUP ), sal_True ); pPageUpBtn->SetHelpId(HID_SCRL_PAGEUP); - pPageDownBtn = new SwHlpImageButton(pMDI, SW_RES( BTN_PAGEDOWN ), FALSE ); + pPageDownBtn = new SwHlpImageButton(pMDI, SW_RES( BTN_PAGEDOWN ), sal_False ); pPageDownBtn->SetHelpId(HID_SCRL_PAGEDOWN); Reference< XFrame > xFrame = GetViewFrame()->GetFrame().GetFrameInterface(); pNaviBtn = new SwNaviImageButton(pMDI, xFrame ); @@ -395,12 +395,12 @@ IMPL_STATIC_LINK( SwView, MoveNavigationHdl, bool *, pbNext ) case NID_GRF: case NID_OLE: { - USHORT eType = GOTOOBJ_FLY_FRM; + sal_uInt16 eType = GOTOOBJ_FLY_FRM; if(nMoveType == NID_GRF) eType = GOTOOBJ_FLY_GRF; else if(nMoveType == NID_OLE) eType = GOTOOBJ_FLY_OLE; - BOOL bSuccess = bNext ? + sal_Bool bSuccess = bNext ? rSh.GotoNextFly(eType) : rSh.GotoPrevFly(eType); if(bSuccess) @@ -496,7 +496,7 @@ IMPL_STATIC_LINK( SwView, MoveNavigationHdl, bool *, pbNext ) case NID_SRCH_REP: if(pSrchItem) { - BOOL bBackward = pSrchItem->GetBackward(); + sal_Bool bBackward = pSrchItem->GetBackward(); if(rSh.HasSelection() && !bNext == rSh.IsCrsrPtAtEnd()) rSh.SwapPam(); pSrchItem->SetBackward(!bNext); @@ -514,7 +514,7 @@ IMPL_STATIC_LINK( SwView, MoveNavigationHdl, bool *, pbNext ) break; case NID_TABLE_FORMULA_ERROR: - rSh.GotoNxtPrvTblFormula( bNext, TRUE ); + rSh.GotoNxtPrvTblFormula( bNext, sal_True ); break; } pThis->pEditWin->GrabFocus(); @@ -586,7 +586,7 @@ int SwView::KillVLineal() IMPL_LINK( SwView, ExecRulerClick, Ruler *, pRuler ) { - USHORT nDefPage = 0; + sal_uInt16 nDefPage = 0; switch( pRuler->GetClickType() ) { case RULER_TYPE_DONTKNOW: @@ -608,16 +608,16 @@ IMPL_LINK( SwView, ExecRulerClick, Ruler *, pRuler ) return 0; } -USHORT SwView::GetMoveType() +sal_uInt16 SwView::GetMoveType() { return nMoveType; } -void SwView::SetMoveType(USHORT nSet) +void SwView::SetMoveType(sal_uInt16 nSet) { - BOOL bLastPage = nMoveType == NID_PGE; + sal_Bool bLastPage = nMoveType == NID_PGE; nMoveType = nSet; - BOOL bNewPage = nMoveType == NID_PGE; + sal_Bool bNewPage = nMoveType == NID_PGE; if(bNewPage != bLastPage) { Color aColor(bNewPage ? COL_BLACK : VIEW_IMAGECOLOR); @@ -654,7 +654,7 @@ void SwView::ShowHScrollbar(sal_Bool bShow) sal_Bool SwView::IsHScrollbarVisible()const { OSL_ENSURE(pHScrollbar, "Scrollbar invalid"); - return pHScrollbar->IsVisible( FALSE ) || pHScrollbar->IsAuto(); + return pHScrollbar->IsVisible( sal_False ) || pHScrollbar->IsAuto(); } void SwView::ShowVScrollbar(sal_Bool bShow) @@ -669,7 +669,7 @@ void SwView::ShowVScrollbar(sal_Bool bShow) sal_Bool SwView::IsVScrollbarVisible()const { OSL_ENSURE(pVScrollbar, "Scrollbar invalid"); - return pVScrollbar->IsVisible( FALSE ); + return pVScrollbar->IsVisible( sal_False ); } diff --git a/sw/source/ui/uiview/viewport.cxx b/sw/source/ui/uiview/viewport.cxx index c80018abce..1d1c376593 100644 --- a/sw/source/ui/uiview/viewport.cxx +++ b/sw/source/ui/uiview/viewport.cxx @@ -60,11 +60,11 @@ #define WB_RIGHT_ALIGNED ((WinBits)0x00008000) #endif -static BOOL bProtectDocShellVisArea = FALSE; +static sal_Bool bProtectDocShellVisArea = sal_False; -static USHORT nPgNum = 0; +static sal_uInt16 nPgNum = 0; -BOOL SwView::IsDocumentBorder() +sal_Bool SwView::IsDocumentBorder() { return GetDocShell()->GetCreateMode() == SFX_CREATE_MODE_EMBEDDED || pWrtShell->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE) || @@ -83,13 +83,13 @@ inline long GetLeftMargin( SwView &rView ) void lcl_GetPos(SwView* pView, Point& rPos, SwScrollbar* pScrollbar, - BOOL bBorder) + sal_Bool bBorder) { SwWrtShell &rSh = pView->GetWrtShell(); const Size aDocSz( rSh.GetDocSize() ); const long lBorder = bBorder ? DOCUMENTBORDER : DOCUMENTBORDER * 2; - BOOL bHori = pScrollbar->IsHoriScroll(); + sal_Bool bHori = pScrollbar->IsHoriScroll(); const long lPos = pScrollbar->GetThumbPos() + (bBorder ? DOCUMENTBORDER : 0); long Point:: *pPt = bHori ? &Point::nA : &Point::nB; @@ -116,7 +116,7 @@ void lcl_GetPos(SwView* pView, --------------------------------------------------------------------*/ void SwView::InvalidateRulerPos() { - static USHORT const aInval[] = + static sal_uInt16 aInval[] = { SID_ATTR_PARA_LRSPACE, SID_RULER_BORDERS, SID_RULER_PAGE_POS, SID_RULER_LR_MIN_MAX, SID_ATTR_LONG_ULSPACE, SID_ATTR_LONG_LRSPACE, @@ -174,14 +174,14 @@ aDocSz = rSz; if( !pWrtShell || aVisArea.IsEmpty() ) // keine Shell -> keine Aenderung { - bDocSzUpdated = FALSE; + bDocSzUpdated = sal_False; return; } //Wenn Text geloescht worden ist, kann es sein, dass die VisArea hinter //den sichtbaren Bereich verweist Rectangle aNewVisArea( aVisArea ); - BOOL bModified = false; + sal_Bool bModified = false; SwTwips lGreenOffset = IsDocumentBorder() ? DOCUMENTBORDER : DOCUMENTBORDER * 2; SwTwips lTmp = aDocSz.Width() + lGreenOffset; @@ -190,7 +190,7 @@ aDocSz = rSz; lTmp = aNewVisArea.Right() - lTmp; aNewVisArea.Right() -= lTmp; aNewVisArea.Left() -= lTmp; - bModified = TRUE; + bModified = sal_True; } lTmp = aDocSz.Height() + lGreenOffset; @@ -199,11 +199,11 @@ aDocSz = rSz; lTmp = aNewVisArea.Bottom() - lTmp; aNewVisArea.Bottom() -= lTmp; aNewVisArea.Top() -= lTmp; - bModified = TRUE; + bModified = sal_True; } if ( bModified ) - SetVisArea( aNewVisArea, FALSE ); + SetVisArea( aNewVisArea, sal_False ); if ( UpdateScrollbars() && !bInOuterResizePixel && !bInInnerResizePixel && !GetViewFrame()->GetFrame().IsInPlace()) @@ -214,7 +214,7 @@ aDocSz = rSz; /*-------------------------------------------------------------------- Beschreibung: Visarea neu setzen --------------------------------------------------------------------*/ -void SwView::SetVisArea( const Rectangle &rRect, BOOL bUpdateScrollbar ) +void SwView::SetVisArea( const Rectangle &rRect, sal_Bool bUpdateScrollbar ) { const Size aOldSz( aVisArea.GetSize() ); @@ -261,7 +261,7 @@ void SwView::SetVisArea( const Rectangle &rRect, BOOL bUpdateScrollbar ) aVisArea = aLR; - const BOOL bOuterResize = bUpdateScrollbar && UpdateScrollbars(); + const sal_Bool bOuterResize = bUpdateScrollbar && UpdateScrollbars(); if ( pWrtShell ) { @@ -269,7 +269,7 @@ void SwView::SetVisArea( const Rectangle &rRect, BOOL bUpdateScrollbar ) if ( aOldSz != pWrtShell->VisArea().SSize() && ( Abs(aOldSz.Width() - pWrtShell->VisArea().Width()) > 2 || Abs(aOldSz.Height() - pWrtShell->VisArea().Height()) > 2 ) ) - pWrtShell->CheckBrowseView( FALSE ); + pWrtShell->CheckBrowseView( sal_False ); } if ( !bProtectDocShellVisArea ) @@ -307,7 +307,7 @@ void SwView::SetVisArea( const Rectangle &rRect, BOOL bUpdateScrollbar ) /*-------------------------------------------------------------------- Beschreibung: Pos VisArea setzen --------------------------------------------------------------------*/ -void SwView::SetVisArea( const Point &rPt, BOOL bUpdateScrollbar ) +void SwView::SetVisArea( const Point &rPt, sal_Bool bUpdateScrollbar ) { //einmal alignen, damit Brushes korrekt angesetzt werden. //MA 31. May. 96: Das geht in der BrowseView schief, weil evlt. @@ -346,7 +346,7 @@ void SwView::CheckVisArea() Rectangle aNewVisArea( aVisArea ); aNewVisArea.Move( DOCUMENTBORDER - aVisArea.Left(), DOCUMENTBORDER - aVisArea.Top() ); - SetVisArea( aNewVisArea, TRUE ); + SetVisArea( aNewVisArea, sal_True ); } } } @@ -358,11 +358,11 @@ void SwView::CheckVisArea() Bereiches IN Rectangle &rRect: Rechteck, das sich innerhalb des neuen sichtbaren Bereiches befinden soll - USHORT nRange optional exakte Angabe des Bereiches, + sal_uInt16 nRange optional exakte Angabe des Bereiches, um den ggfs. gescrollt werden soll --------------------------------------------------------------------*/ void SwView::CalcPt( Point *pPt, const Rectangle &rRect, - USHORT nRangeX, USHORT nRangeY) + sal_uInt16 nRangeX, sal_uInt16 nRangeY) { const SwTwips lMin = IsDocumentBorder() ? DOCUMENTBORDER : 0; @@ -408,12 +408,12 @@ void SwView::CalcPt( Point *pPt, const Rectangle &rRect, /*-------------------------------------------------------------------- Beschreibung: Scrolling --------------------------------------------------------------------*/ -BOOL SwView::IsScroll( const Rectangle &rRect ) const +sal_Bool SwView::IsScroll( const Rectangle &rRect ) const { return bCenterCrsr || bTopCrsr || !aVisArea.IsInside(rRect); } -void SwView::Scroll( const Rectangle &rRect, USHORT nRangeX, USHORT nRangeY ) +void SwView::Scroll( const Rectangle &rRect, sal_uInt16 nRangeX, sal_uInt16 nRangeY ) { if ( aVisArea.IsEmpty() ) return; @@ -477,8 +477,8 @@ void SwView::Scroll( const Rectangle &rRect, USHORT nRangeX, USHORT nRangeY ) aSize.Height()= Min( aSize.Height(),aVisSize.Height()); CalcPt( &aPt, Rectangle( rRect.TopLeft(), aSize ), - static_cast< USHORT >((aVisSize.Width() - aSize.Width()) / 2), - static_cast< USHORT >((aVisSize.Height()- aSize.Height())/ 2) ); + static_cast< sal_uInt16 >((aVisSize.Width() - aSize.Width()) / 2), + static_cast< sal_uInt16 >((aVisSize.Height()- aSize.Height())/ 2) ); if( bTopCrsr ) { @@ -539,10 +539,10 @@ void SwView::Scroll( const Rectangle &rRect, USHORT nRangeX, USHORT nRangeY ) Beschreibung: Seitenweises Scrollen Liefern den Wert, um den bei PageUp / -Down gescrollt werden soll --------------------------------------------------------------------*/ -BOOL SwView::GetPageScrollUpOffset( SwTwips &rOff ) const +sal_Bool SwView::GetPageScrollUpOffset( SwTwips &rOff ) const { if ( !aVisArea.Top() || !aVisArea.GetHeight() ) - return FALSE; + return sal_False; long nYScrl = GetYScroll() / 2; rOff = -(aVisArea.GetHeight() - nYScrl); //nicht vor den Dokumentanfang scrollen @@ -550,14 +550,14 @@ BOOL SwView::GetPageScrollUpOffset( SwTwips &rOff ) const rOff = rOff - aVisArea.Top(); else if( GetWrtShell().GetCharRect().Top() < (aVisArea.Top() + nYScrl)) rOff += nYScrl; - return TRUE; + return sal_True; } -BOOL SwView::GetPageScrollDownOffset( SwTwips &rOff ) const +sal_Bool SwView::GetPageScrollDownOffset( SwTwips &rOff ) const { if ( !aVisArea.GetHeight() || (aVisArea.GetHeight() > aDocSz.Height()) ) - return FALSE; + return sal_False; long nYScrl = GetYScroll() / 2; rOff = aVisArea.GetHeight() - nYScrl; //nicht hinter das Dokumentende scrollen @@ -596,7 +596,7 @@ long SwView::PageDown() long SwView::PhyPageUp() { //aktuell sichtbare Seite erfragen, nicht formatieren - USHORT nActPage = pWrtShell->GetNextPrevPageNum( FALSE ); + sal_uInt16 nActPage = pWrtShell->GetNextPrevPageNum( sal_False ); if( USHRT_MAX != nActPage ) { @@ -616,7 +616,7 @@ long SwView::PhyPageUp() long SwView::PhyPageDown() { //aktuell sichtbare Seite erfragen, nicht formatieren - USHORT nActPage = pWrtShell->GetNextPrevPageNum( TRUE ); + sal_uInt16 nActPage = pWrtShell->GetNextPrevPageNum( sal_True ); // falls die letzte Dokumentseite sichtbar ist, nichts tun if( USHRT_MAX != nActPage ) { @@ -632,16 +632,16 @@ long SwView::PhyPageDown() return 1; } -long SwView::PageUpCrsr( BOOL bSelect ) +long SwView::PageUpCrsr( sal_Bool bSelect ) { if ( !bSelect ) { - const USHORT eType = pWrtShell->GetFrmType(0,TRUE); + const sal_uInt16 eType = pWrtShell->GetFrmType(0,sal_True); if ( eType & FRMTYPE_FOOTNOTE ) { pWrtShell->MoveCrsr(); pWrtShell->GotoFtnAnchor(); - pWrtShell->Right(CRSR_SKIP_CHARS, FALSE, 1, FALSE ); + pWrtShell->Right(CRSR_SKIP_CHARS, sal_False, 1, sal_False ); return 1; } } @@ -653,12 +653,12 @@ long SwView::PageUpCrsr( BOOL bSelect ) PageUp() ) { pWrtShell->ResetCursorStack(); - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } -long SwView::PageDownCrsr(BOOL bSelect) +long SwView::PageDownCrsr(sal_Bool bSelect) { SwTwips lOff = 0; if ( GetPageScrollDownOffset( lOff ) && @@ -667,9 +667,9 @@ long SwView::PageDownCrsr(BOOL bSelect) PageDown() ) { pWrtShell->ResetCursorStack(); - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } /*------------------------------------------------------------------------ @@ -681,7 +681,7 @@ IMPL_LINK( SwView, ScrollHdl, SwScrollbar *, pScrollbar ) return 0; if ( pScrollbar->GetType() == SCROLL_DRAG ) - pWrtShell->EnableSmooth( FALSE ); + pWrtShell->EnableSmooth( sal_False ); if(!pWrtShell->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE) && pScrollbar->GetType() == SCROLL_DRAG) @@ -694,11 +694,11 @@ IMPL_LINK( SwView, ScrollHdl, SwScrollbar *, pScrollbar ) Point aPos( aVisArea.TopLeft() ); lcl_GetPos(this, aPos, pScrollbar, IsDocumentBorder()); - USHORT nPhNum = 1; - USHORT nVirtNum = 1; + sal_uInt16 nPhNum = 1; + sal_uInt16 nVirtNum = 1; String sDisplay; - if(pWrtShell->GetPageNumber( aPos.Y(), FALSE, nPhNum, nVirtNum, sDisplay )) + if(pWrtShell->GetPageNumber( aPos.Y(), sal_False, nPhNum, nVirtNum, sDisplay )) { //QuickHelp: @@ -737,7 +737,7 @@ IMPL_LINK( SwView, ScrollHdl, SwScrollbar *, pScrollbar ) EndScrollHdl(pScrollbar); if ( pScrollbar->GetType() == SCROLL_DRAG ) - pWrtShell->EnableSmooth( TRUE ); + pWrtShell->EnableSmooth( sal_True ); return 0; } @@ -755,12 +755,12 @@ IMPL_LINK( SwView, EndScrollHdl, SwScrollbar *, pScrollbar ) Help::ShowQuickHelp(pScrollbar, Rectangle(), aEmptyStr, 0); } Point aPos( aVisArea.TopLeft() ); - BOOL bBorder = IsDocumentBorder(); + sal_Bool bBorder = IsDocumentBorder(); lcl_GetPos(this, aPos, pScrollbar, bBorder); if ( bBorder && aPos == aVisArea.TopLeft() ) UpdateScrollbars(); else - SetVisArea( aPos, FALSE ); + SetVisArea( aPos, sal_False ); GetViewFrame()->GetBindings().Update(FN_STAT_PAGE); } @@ -815,9 +815,9 @@ void SwView::CalcVisArea( const Size &rOutPixel ) /*-------------------------------------------------------------------- Beschreibung: Bedienelemente neu anordnen --------------------------------------------------------------------*/ -void SwView::CalcAndSetBorderPixel( SvBorder &rToFill, BOOL /*bInner*/ ) +void SwView::CalcAndSetBorderPixel( SvBorder &rToFill, sal_Bool /*bInner*/ ) { - BOOL bRightVRuler = pWrtShell->GetViewOptions()->IsVRulerRight(); + sal_Bool bRightVRuler = pWrtShell->GetViewOptions()->IsVRulerRight(); if ( pVRuler->IsVisible() ) { long nWidth = pVRuler->GetSizePixel().Width(); @@ -833,7 +833,7 @@ void SwView::CalcAndSetBorderPixel( SvBorder &rToFill, BOOL /*bInner*/ ) const StyleSettings &rSet = GetEditWin().GetSettings().GetStyleSettings(); const long nTmp = rSet.GetScrollBarSize(); - if( pVScrollbar->IsVisible(FALSE) ) + if( pVScrollbar->IsVisible(sal_False) ) { if(bRightVRuler) rToFill.Left() = nTmp; @@ -852,7 +852,7 @@ void ViewResizePixel( const Window &rRef, const Point &rOfst, const Size &rSize, const Size &rEditSz, - const BOOL /*bInner*/, + const sal_Bool /*bInner*/, SwScrollbar& rVScrollbar, SwScrollbar& rHScrollbar, ImageButton* pPageUpBtn, @@ -861,23 +861,23 @@ void ViewResizePixel( const Window &rRef, Window& rScrollBarBox, SvxRuler* pVLineal, SvxRuler* pHLineal, - BOOL bWebView, - BOOL bVRulerRight ) + sal_Bool bWebView, + sal_Bool bVRulerRight ) { // ViewResizePixel wird auch von der PreView benutzt!!! - const BOOL bHLineal = pHLineal && pHLineal->IsVisible(); + const sal_Bool bHLineal = pHLineal && pHLineal->IsVisible(); const long nHLinSzHeight = bHLineal ? pHLineal->GetSizePixel().Height() : 0; - const BOOL bVLineal = pVLineal && pVLineal->IsVisible(); + const sal_Bool bVLineal = pVLineal && pVLineal->IsVisible(); const long nVLinSzWidth = bVLineal ? pVLineal->GetSizePixel().Width() : 0; - long nHBSzHeight2= rHScrollbar.IsVisible( FALSE ) || !rHScrollbar.IsAuto() ? + long nHBSzHeight2= rHScrollbar.IsVisible( sal_False ) || !rHScrollbar.IsAuto() ? rRef.GetSettings().GetStyleSettings().GetScrollBarSize() : 0; long nHBSzHeight = - rHScrollbar.IsVisible(TRUE) || (rHScrollbar.IsVisible( FALSE ) && !rHScrollbar.IsAuto()) ? + rHScrollbar.IsVisible(sal_True) || (rHScrollbar.IsVisible( sal_False ) && !rHScrollbar.IsAuto()) ? nHBSzHeight2:0; - long nVBSzWidth = rVScrollbar.IsVisible(TRUE) || (rVScrollbar.IsVisible( FALSE ) && !rVScrollbar.IsAuto()) ? + long nVBSzWidth = rVScrollbar.IsVisible(sal_True) || (rVScrollbar.IsVisible( sal_False ) && !rVScrollbar.IsAuto()) ? rRef.GetSettings().GetStyleSettings().GetScrollBarSize() : 0; if(pVLineal) @@ -946,10 +946,10 @@ void ViewResizePixel( const Window &rRef, // wenn der Platz fuer Scrollbar und Page-Buttons zu klein wird, dann // werden die Buttons versteckt - USHORT nCnt = pNaviBtn ? 3 : 2; + sal_uInt16 nCnt = pNaviBtn ? 3 : 2; long nSubSize = (aImgSz.Width() * nCnt ); // - BOOL bHidePageButtons = aSize.Height() < ((bWebView ? 3 : 2) * nSubSize); + sal_Bool bHidePageButtons = aSize.Height() < ((bWebView ? 3 : 2) * nSubSize); if(!bHidePageButtons) aSize.Height() -= nSubSize; else @@ -971,7 +971,7 @@ void ViewResizePixel( const Window &rRef, pPageDownBtn->SetPosSizePixel( aPos, aImgSz ); - if( rHScrollbar.IsVisible( FALSE ) ) + if( rHScrollbar.IsVisible( sal_False ) ) { aScrollFillPos.X() = aPos.X(); @@ -983,7 +983,7 @@ void ViewResizePixel( const Window &rRef, void SwView::ShowAtResize() { - bShowAtResize = FALSE; + bShowAtResize = sal_False; if ( pWrtShell->GetViewOptions()->IsViewHRuler() ) pHRuler->Show(); } @@ -1002,15 +1002,15 @@ void SwView::InnerResizePixel( const Point &rOfst, const Size &rSize ) Fraction( aSize.Height(), aObjSizePixel.Height() ) ); } - bInInnerResizePixel = TRUE; - const BOOL bHScrollVisible = pHScrollbar->IsVisible(TRUE); - const BOOL bVScrollVisible = pVScrollbar->IsVisible(TRUE); - BOOL bRepeat = FALSE; + bInInnerResizePixel = sal_True; + const sal_Bool bHScrollVisible = pHScrollbar->IsVisible(sal_True); + const sal_Bool bVScrollVisible = pVScrollbar->IsVisible(sal_True); + sal_Bool bRepeat = sal_False; do { Size aSz( rSize ); SvBorder aBorder; - CalcAndSetBorderPixel( aBorder, TRUE ); + CalcAndSetBorderPixel( aBorder, sal_True ); if ( GetViewFrame()->GetFrame().IsInPlace() ) { Size aViewSize( aSz ); @@ -1028,7 +1028,7 @@ void SwView::InnerResizePixel( const Point &rOfst, const Size &rSize ) } Size aEditSz( GetEditWin().GetOutputSizePixel() ); - ViewResizePixel( GetEditWin(), rOfst, aSz, aEditSz, TRUE, *pVScrollbar, + ViewResizePixel( GetEditWin(), rOfst, aSz, aEditSz, sal_True, *pVScrollbar, *pHScrollbar, pPageUpBtn, pPageDownBtn, pNaviBtn, *pScrollFill, pVRuler, pHRuler, @@ -1040,9 +1040,9 @@ void SwView::InnerResizePixel( const Point &rOfst, const Size &rSize ) if( pHRuler->IsVisible() || pVRuler->IsVisible() ) { const Fraction& rFrac = GetEditWin().GetMapMode().GetScaleX(); - USHORT nZoom = 100; + sal_uInt16 nZoom = 100; if (0 != rFrac.GetDenominator()) - nZoom = USHORT(rFrac.GetNumerator() * 100L / rFrac.GetDenominator()); + nZoom = sal_uInt16(rFrac.GetNumerator() * 100L / rFrac.GetDenominator()); const Fraction aFrac( nZoom, 100 ); pVRuler->SetZoom( aFrac ); @@ -1056,18 +1056,18 @@ void SwView::InnerResizePixel( const Point &rOfst, const Size &rSize ) //EditWin niemals einstellen! //VisArea einstellen, aber dort nicht das SetVisArea der DocShell rufen! - bProtectDocShellVisArea = TRUE; + bProtectDocShellVisArea = sal_True; CalcVisArea( aEditSz ); //visibility changes of the automatic horizontal scrollbar //require to repeat the ViewResizePixel() call - but only once! if(bRepeat) - bRepeat = FALSE; - else if(bHScrollVisible != pHScrollbar->IsVisible(TRUE) || - bVScrollVisible != pVScrollbar->IsVisible(TRUE)) - bRepeat = TRUE; + bRepeat = sal_False; + else if(bHScrollVisible != pHScrollbar->IsVisible(sal_True) || + bVScrollVisible != pVScrollbar->IsVisible(sal_True)) + bRepeat = sal_True; }while( bRepeat ); - bProtectDocShellVisArea = FALSE; - bInInnerResizePixel = FALSE; + bProtectDocShellVisArea = sal_False; + bInInnerResizePixel = sal_False; } void SwView::OuterResizePixel( const Point &rOfst, const Size &rSize ) @@ -1075,13 +1075,13 @@ void SwView::OuterResizePixel( const Point &rOfst, const Size &rSize ) // #i16909# return, if no size (caused by minimize window). if ( bInOuterResizePixel || ( !rSize.Width() && !rSize.Height() ) ) return; - bInOuterResizePixel = TRUE; + bInOuterResizePixel = sal_True; // feststellen, ob Scrollbars angezeigt werden duerfen - BOOL bBrowse = pWrtShell->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE); - BOOL bShowH = FALSE, - bShowV = FALSE, - bAuto = FALSE, + sal_Bool bBrowse = pWrtShell->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE); + sal_Bool bShowH = sal_False, + bShowV = sal_False, + bAuto = sal_False, bHAuto = bBrowse; switch( GetScrollingMode() ) { @@ -1092,51 +1092,51 @@ void SwView::OuterResizePixel( const Point &rOfst, const Size &rSize ) { bShowH = pVOpt->IsViewHScrollBar(); bShowV = pVOpt->IsViewVScrollBar(); - bAuto = bHAuto = TRUE; + bAuto = bHAuto = sal_True; break; } } /* kein break hier */ case SCROLLING_AUTO: - bAuto = bHAuto = TRUE; - bShowH = bShowV = TRUE; + bAuto = bHAuto = sal_True; + bShowH = bShowV = sal_True; break; case SCROLLING_YES: - bShowH = bShowV = TRUE; + bShowH = bShowV = sal_True; break; case SCROLLING_NO: - bShowH = bShowV = bHAuto = FALSE; + bShowH = bShowV = bHAuto = sal_False; break; } SwDocShell* pDocSh = GetDocShell(); - BOOL bIsPreview = pDocSh->IsPreview(); + sal_Bool bIsPreview = pDocSh->IsPreview(); if( bIsPreview ) { - bShowH = bShowV = bHAuto = bAuto = FALSE; + bShowH = bShowV = bHAuto = bAuto = sal_False; } - if(pHScrollbar->IsVisible(FALSE) != bShowH && !bHAuto) + if(pHScrollbar->IsVisible(sal_False) != bShowH && !bHAuto) ShowHScrollbar(bShowH); pHScrollbar->SetAuto( bHAuto ); - if(pVScrollbar->IsVisible(FALSE) != bShowV && !bAuto) + if(pVScrollbar->IsVisible(sal_False) != bShowV && !bAuto) ShowVScrollbar(bShowV); pVScrollbar->SetAuto(bAuto); SET_CURR_SHELL( pWrtShell ); - BOOL bRepeat = FALSE; + sal_Bool bRepeat = sal_False; long nCnt = 0; - BOOL bUnLockView = !pWrtShell->IsViewLocked(); - pWrtShell->LockView( TRUE ); + sal_Bool bUnLockView = !pWrtShell->IsViewLocked(); + pWrtShell->LockView( sal_True ); pWrtShell->LockPaint(); do { ++nCnt; - const BOOL bScroll1 = pVScrollbar->IsVisible(TRUE); - const BOOL bScroll2 = pHScrollbar->IsVisible(TRUE); + const sal_Bool bScroll1 = pVScrollbar->IsVisible(sal_True); + const sal_Bool bScroll2 = pHScrollbar->IsVisible(sal_True); SvBorder aBorder; - CalcAndSetBorderPixel( aBorder, FALSE ); + CalcAndSetBorderPixel( aBorder, sal_False ); const Size aEditSz( GetEditWin().GetOutputSizePixel() ); - ViewResizePixel( GetEditWin(), rOfst, rSize, aEditSz, FALSE, *pVScrollbar, + ViewResizePixel( GetEditWin(), rOfst, rSize, aEditSz, sal_False, *pVScrollbar, *pHScrollbar, pPageUpBtn, pPageDownBtn, pNaviBtn, *pScrollFill, pVRuler, pHRuler, @@ -1173,12 +1173,12 @@ void SwView::OuterResizePixel( const Point &rOfst, const Size &rSize ) pDocSh->SfxInPlaceObject::GetVisArea() );*/ if ( pWrtShell->GetViewOptions()->GetZoomType() != SVX_ZOOM_PERCENT && !pWrtShell->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE) ) - _SetZoom( aEditSz, (SvxZoomType)pWrtShell->GetViewOptions()->GetZoomType(), 100, TRUE ); + _SetZoom( aEditSz, (SvxZoomType)pWrtShell->GetViewOptions()->GetZoomType(), 100, sal_True ); pWrtShell->EndAction(); - bRepeat = bScroll1 != pVScrollbar->IsVisible(TRUE); + bRepeat = bScroll1 != pVScrollbar->IsVisible(sal_True); if ( !bRepeat ) - bRepeat = bScroll2 != pHScrollbar->IsVisible(TRUE); + bRepeat = bScroll2 != pHScrollbar->IsVisible(sal_True); //Nicht endlosschleifen. Moeglichst dann stoppen wenn die //(Auto-)Scrollbars sichtbar sind. @@ -1186,14 +1186,14 @@ void SwView::OuterResizePixel( const Point &rOfst, const Size &rSize ) ( nCnt > 10 || ( nCnt > 3 && bHAuto && bAuto ) ) ) { - bRepeat = FALSE; + bRepeat = sal_False; } }while ( bRepeat ); - if( pVScrollbar->IsVisible(FALSE) || pVScrollbar->IsAuto()) + if( pVScrollbar->IsVisible(sal_False) || pVScrollbar->IsAuto()) { - BOOL bShowButtons = pVScrollbar->IsVisible(TRUE); + sal_Bool bShowButtons = pVScrollbar->IsVisible(sal_True); if(pPageUpBtn && pPageUpBtn->IsVisible() != bShowButtons) { pPageUpBtn->Show(bShowButtons); @@ -1206,9 +1206,9 @@ void SwView::OuterResizePixel( const Point &rOfst, const Size &rSize ) pWrtShell->UnlockPaint(); if( bUnLockView ) - pWrtShell->LockView( FALSE ); + pWrtShell->LockView( sal_False ); - bInOuterResizePixel = FALSE; + bInOuterResizePixel = sal_False; if ( mpPostItMgr ) { @@ -1248,12 +1248,12 @@ Size SwView::GetOptimalSizePixel() const return GetEditWin().LogicToPixel( aPgSize ); } -BOOL SwView::UpdateScrollbars() +sal_Bool SwView::UpdateScrollbars() { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; if ( !aVisArea.IsEmpty() ) { - const BOOL bBorder = IsDocumentBorder(); + const sal_Bool bBorder = IsDocumentBorder(); Rectangle aTmpRect( aVisArea ); if ( bBorder ) { @@ -1267,11 +1267,11 @@ BOOL SwView::UpdateScrollbars() aTmpSz.Width() += lOfst; aTmpSz.Height() += lOfst; { - const BOOL bVScrollVisible = pVScrollbar->IsVisible(TRUE); + const sal_Bool bVScrollVisible = pVScrollbar->IsVisible(sal_True); pVScrollbar->DocSzChgd( aTmpSz ); pVScrollbar->ViewPortChgd( aTmpRect ); - BOOL bShowButtons = pVScrollbar->IsVisible(TRUE); + sal_Bool bShowButtons = pVScrollbar->IsVisible(sal_True); if(pPageUpBtn && pPageUpBtn->IsVisible() != bShowButtons) { pPageUpBtn->Show(bShowButtons); @@ -1281,16 +1281,16 @@ BOOL SwView::UpdateScrollbars() pNaviBtn->Show(bShowButtons); } - if ( bVScrollVisible != pVScrollbar->IsVisible(TRUE) ) - bRet = TRUE; + if ( bVScrollVisible != pVScrollbar->IsVisible(sal_True) ) + bRet = sal_True; } { - const BOOL bHScrollVisible = pHScrollbar->IsVisible(TRUE); + const sal_Bool bHScrollVisible = pHScrollbar->IsVisible(sal_True); pHScrollbar->DocSzChgd( aTmpSz ); pHScrollbar->ViewPortChgd( aTmpRect ); - if ( bHScrollVisible != pHScrollbar->IsVisible(TRUE) ) - bRet = TRUE; - pScrollFill->Show(pHScrollbar->IsVisible(TRUE) && pVScrollbar->IsVisible(TRUE) ); + if ( bHScrollVisible != pHScrollbar->IsVisible(sal_True) ) + bRet = sal_True; + pScrollFill->Show(pHScrollbar->IsVisible(sal_True) && pVScrollbar->IsVisible(sal_True) ); } } return bRet; @@ -1303,30 +1303,30 @@ void SwView::Move() SfxViewShell::Move(); } -BOOL SwView::HandleWheelCommands( const CommandEvent& rCEvt ) +sal_Bool SwView::HandleWheelCommands( const CommandEvent& rCEvt ) { - BOOL bOk = FALSE; + sal_Bool bOk = sal_False; const CommandWheelData* pWData = rCEvt.GetWheelData(); if( pWData && COMMAND_WHEEL_ZOOM == pWData->GetMode() ) { - USHORT nFact = pWrtShell->GetViewOptions()->GetZoom(); + sal_uInt16 nFact = pWrtShell->GetViewOptions()->GetZoom(); if( 0L > pWData->GetDelta() ) - nFact = static_cast< USHORT >(Max( 20, nFact - 10 )); + nFact = static_cast< sal_uInt16 >(Max( 20, nFact - 10 )); else - nFact = static_cast< USHORT >(Min( 600, nFact + 10 )); + nFact = static_cast< sal_uInt16 >(Min( 600, nFact + 10 )); SetZoom( SVX_ZOOM_PERCENT, nFact ); - bOk = TRUE; + bOk = sal_True; } else { - if (pWData && (COMMAND_WHEEL_SCROLL==pWData->GetMode()) && (((ULONG)0xFFFFFFFF) == pWData->GetScrollLines())) + if (pWData && (COMMAND_WHEEL_SCROLL==pWData->GetMode()) && (((sal_uLong)0xFFFFFFFF) == pWData->GetScrollLines())) { if (pWData->GetDelta()<0) PhyPageDown(); else PhyPageUp(); - bOk = TRUE; + bOk = sal_True; } else bOk = pEditWin->HandleScrollCommand( rCEvt, diff --git a/sw/source/ui/uiview/viewprt.cxx b/sw/source/ui/uiview/viewprt.cxx index 32e8dce2b5..58efdb46f5 100644 --- a/sw/source/ui/uiview/viewprt.cxx +++ b/sw/source/ui/uiview/viewprt.cxx @@ -45,7 +45,6 @@ #include <sfx2/app.hxx> #include <vcl/msgbox.hxx> #include <vcl/oldprintadaptor.hxx> -#include <svtools/printdlg.hxx> #include <sfx2/printer.hxx> #include <sfx2/prnmon.hxx> #include <editeng/paperinf.hxx> @@ -66,7 +65,6 @@ #include <docsh.hxx> #include <viewopt.hxx> #include <prtopt.hxx> -#include <swprtopt.hxx> #include <fontcfg.hxx> #include <cfgitems.hxx> #include <dbmgr.hxx> @@ -91,14 +89,14 @@ using namespace ::com::sun::star; /*-------------------------------------------------------------------- Beschreibung: Drucker an Sfx uebergeben --------------------------------------------------------------------*/ -SfxPrinter* SwView::GetPrinter( BOOL bCreate ) +SfxPrinter* SwView::GetPrinter( sal_Bool bCreate ) { const IDocumentDeviceAccess* pIDDA = GetWrtShell().getIDocumentDeviceAccess(); SfxPrinter *pOld = pIDDA->getPrinter( false ); SfxPrinter *pPrt = pIDDA->getPrinter( bCreate ); if ( pOld != pPrt ) { - BOOL bWeb = 0 != PTR_CAST(SwWebView, this); + sal_Bool bWeb = 0 != PTR_CAST(SwWebView, this); ::SetAppPrintOptions( &GetWrtShell(), bWeb ); } return pPrt; @@ -107,7 +105,7 @@ SfxPrinter* SwView::GetPrinter( BOOL bCreate ) /*-------------------------------------------------------------------- Beschreibung: Druckerwechsel weitermelden --------------------------------------------------------------------*/ -void SetPrinter( IDocumentDeviceAccess* pIDDA, SfxPrinter* pNew, BOOL bWeb ) +void SetPrinter( IDocumentDeviceAccess* pIDDA, SfxPrinter* pNew, sal_Bool bWeb ) { SwPrintOptions* pOpt = SW_MOD()->GetPrtOptions(bWeb); if( !pOpt) @@ -117,7 +115,7 @@ void SetPrinter( IDocumentDeviceAccess* pIDDA, SfxPrinter* pNew, BOOL bWeb ) const SfxItemSet& rSet = pNew->GetOptions(); const SwAddPrinterItem* pAddPrinterAttr; - if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_ADDPRINTER, FALSE, + if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_ADDPRINTER, sal_False, (const SfxPoolItem**)&pAddPrinterAttr ) ) { if( pIDDA ) @@ -127,7 +125,7 @@ void SetPrinter( IDocumentDeviceAccess* pIDDA, SfxPrinter* pNew, BOOL bWeb ) } } -USHORT SwView::SetPrinter(SfxPrinter* pNew, USHORT nDiffFlags, bool ) +sal_uInt16 SwView::SetPrinter(SfxPrinter* pNew, sal_uInt16 nDiffFlags, bool ) { SwWrtShell &rSh = GetWrtShell(); SfxPrinter* pOld = rSh.getIDocumentDeviceAccess()->getPrinter( false ); @@ -140,17 +138,17 @@ USHORT SwView::SetPrinter(SfxPrinter* pNew, USHORT nDiffFlags, bool ) if ( nDiffFlags & SFX_PRINTER_PRINTER ) rSh.SetModified(); } - BOOL bWeb = 0 != PTR_CAST(SwWebView, this); + sal_Bool bWeb = 0 != PTR_CAST(SwWebView, this); if ( nDiffFlags & SFX_PRINTER_OPTIONS ) ::SetPrinter( rSh.getIDocumentDeviceAccess(), pNew, bWeb ); - const BOOL bChgOri = nDiffFlags & SFX_PRINTER_CHG_ORIENTATION ? TRUE : FALSE; - const BOOL bChgSize= nDiffFlags & SFX_PRINTER_CHG_SIZE ? TRUE : FALSE; + const sal_Bool bChgOri = nDiffFlags & SFX_PRINTER_CHG_ORIENTATION ? sal_True : sal_False; + const sal_Bool bChgSize= nDiffFlags & SFX_PRINTER_CHG_SIZE ? sal_True : sal_False; if ( bChgOri || bChgSize ) { rSh.StartAllAction(); if ( bChgOri ) - rSh.ChgAllPageOrientation( USHORT(pNew->GetOrientation()) ); + rSh.ChgAllPageOrientation( sal_uInt16(pNew->GetOrientation()) ); if ( bChgSize ) { Size aSz( SvxPaperInfo::GetPaperSize( pNew ) ); @@ -169,35 +167,7 @@ USHORT SwView::SetPrinter(SfxPrinter* pNew, USHORT nDiffFlags, bool ) SfxTabPage* SwView::CreatePrintOptionsPage(Window* pParent, const SfxItemSet& rSet) { - return ::CreatePrintOptionsPage( pParent, rSet, FALSE ); -} - -/*-------------------------------------------------------------------- - Beschreibung: Druckerdialog - --------------------------------------------------------------------*/ -PrintDialog* CreatePrintDialog( Window* pParent, USHORT nPg, SwWrtShell* pSh ) -{ - PrintDialog *pDlg = new PrintDialog( pParent, false ); - - if ( !nPg ) - nPg = 1; - pDlg->EnableRange( PRINTDIALOG_FROMTO ); - - if (pSh && (pSh->IsSelection() || pSh->IsFrmSelected() || pSh->IsObjSelected())) - pDlg->EnableRange( PRINTDIALOG_SELECTION ); - - pDlg->SetRangeText( String::CreateFromInt32(nPg) ); - pDlg->EnableRange( PRINTDIALOG_RANGE ); - pDlg->EnableCollate(); - return pDlg; -} - -PrintDialog* SwView::CreatePrintDialog( Window* pParent ) -{ - // AMA: Hier sollte vielleicht die virtuelle Seitennummer angezeigt werden, - // aber nur, wenn das Drucken virtuelle Seitennummern und nicht wie - // bisher (auch beim SWG 2.0) physikalische beachtet werden. - return ::CreatePrintDialog( pParent, GetWrtShell().GetPhyPageNum(), &GetWrtShell() ); + return ::CreatePrintOptionsPage( pParent, rSet, sal_False ); } /*-------------------------------------------------------------------- @@ -205,7 +175,7 @@ PrintDialog* SwView::CreatePrintDialog( Window* pParent ) --------------------------------------------------------------------*/ void SwView::ExecutePrint(SfxRequest& rReq) { - BOOL bWeb = 0 != PTR_CAST(SwWebView, this); + sal_Bool bWeb = 0 != PTR_CAST(SwWebView, this); ::SetAppPrintOptions( &GetWrtShell(), bWeb ); switch (rReq.GetSlot()) { @@ -216,7 +186,7 @@ void SwView::ExecutePrint(SfxRequest& rReq) if (sFaxName.Len()) { SfxStringItem aPrinterName(SID_PRINTER_NAME, sFaxName); - SfxBoolItem aSilent( SID_SILENT, TRUE ); + SfxBoolItem aSilent( SID_SILENT, sal_True ); GetViewFrame()->GetDispatcher()->Execute( SID_PRINTDOC, SFX_CALLMODE_SYNCHRON|SFX_CALLMODE_RECORD, &aPrinterName, &aSilent, 0L ); @@ -225,7 +195,7 @@ void SwView::ExecutePrint(SfxRequest& rReq) { InfoBox aInfoBox(&GetEditWin(), SW_RES(MSG_ERR_NO_FAX)); String sMsg = aInfoBox.GetMessText(); - USHORT nResNo = bWeb ? STR_WEBOPTIONS : STR_TEXTOPTIONS; + sal_uInt16 nResNo = bWeb ? STR_WEBOPTIONS : STR_TEXTOPTIONS; sMsg.SearchAndReplace(String::CreateFromAscii("%1"), String(SW_RES(nResNo))); aInfoBox.SetMessText(sMsg); aInfoBox.Execute(); @@ -240,12 +210,12 @@ void SwView::ExecutePrint(SfxRequest& rReq) case SID_PRINTDOCDIRECT: { SwWrtShell* pSh = &GetWrtShell(); - SFX_REQUEST_ARG(rReq, pSilentItem, SfxBoolItem, SID_SILENT, FALSE); - BOOL bSilent = pSilentItem ? pSilentItem->GetValue() : FALSE; - SFX_REQUEST_ARG(rReq, pPrintFromMergeItem, SfxBoolItem, FN_QRY_MERGE, FALSE); + SFX_REQUEST_ARG(rReq, pSilentItem, SfxBoolItem, SID_SILENT, sal_False); + sal_Bool bSilent = pSilentItem ? pSilentItem->GetValue() : sal_False; + SFX_REQUEST_ARG(rReq, pPrintFromMergeItem, SfxBoolItem, FN_QRY_MERGE, sal_False); if(pPrintFromMergeItem) rReq.RemoveItem(FN_QRY_MERGE); - BOOL bFromMerge = pPrintFromMergeItem ? pPrintFromMergeItem->GetValue() : FALSE; + sal_Bool bFromMerge = pPrintFromMergeItem ? pPrintFromMergeItem->GetValue() : sal_False; SwMiscConfig aMiscConfig; bool bPrintSelection = false; if(!bSilent && !bFromMerge && @@ -255,7 +225,7 @@ void SwView::ExecutePrint(SfxRequest& rReq) short nRet = aBox.Execute(); if(RET_YES == nRet) { - SfxBoolItem aBool(FN_QRY_MERGE, TRUE); + SfxBoolItem aBool(FN_QRY_MERGE, sal_True); GetViewFrame()->GetDispatcher()->Execute( FN_QRY_MERGE, SFX_CALLMODE_ASYNCHRON, &aBool, 0L); rReq.Ignore(); @@ -297,7 +267,7 @@ void SwView::ExecutePrint(SfxRequest& rReq) SwPagePreview --------------------------------------------------------------------*/ SfxTabPage* CreatePrintOptionsPage( Window *pParent, - const SfxItemSet &rOptions, BOOL bPreview ) + const SfxItemSet &rOptions, sal_Bool bPreview ) { SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); OSL_ENSURE(pFact, "No Print Dialog"); @@ -321,14 +291,10 @@ SfxTabPage* CreatePrintOptionsPage( Window *pParent, return pPage; } -void SetAppPrintOptions( ViewShell* pSh, BOOL bWeb ) +void SetAppPrintOptions( ViewShell* pSh, sal_Bool bWeb ) { - SwPrintData aPrtData = *SW_MOD()->GetPrtOptions(bWeb); const IDocumentDeviceAccess* pIDDA = pSh->getIDocumentDeviceAccess(); - SwPrintData* pShellPrintData = pIDDA->getPrintData(); - - if(pShellPrintData) - aPrtData = *pShellPrintData; + SwPrintData aPrtData = pIDDA->getPrintData(); if( pIDDA->getPrinter( false ) ) { diff --git a/sw/source/ui/uiview/viewsrch.cxx b/sw/source/ui/uiview/viewsrch.cxx index 54b05ab4d3..5a21b7aafb 100644 --- a/sw/source/ui/uiview/viewsrch.cxx +++ b/sw/source/ui/uiview/viewsrch.cxx @@ -60,7 +60,6 @@ #include <view.hrc> #include <SwRewriter.hxx> -#include <undobj.hxx> #include <comcore.hrc> #include "PostItMgr.hxx" @@ -82,9 +81,9 @@ using namespace ::com::sun::star::i18n; struct SwSearchOptions { SwDocPositions eStart, eEnd; - BOOL bDontWrap; + sal_Bool bDontWrap; - SwSearchOptions( SwWrtShell* pSh, BOOL bBackward ); + SwSearchOptions( SwWrtShell* pSh, sal_Bool bBackward ); }; @@ -98,24 +97,24 @@ inline Window* GetParentWindow( SvxSearchDialog* pSrchDlg ) return pWin; } -void SwView::ExecSearch(SfxRequest& rReq, BOOL bNoMessage) +void SwView::ExecSearch(SfxRequest& rReq, sal_Bool bNoMessage) { const SfxItemSet* pArgs = rReq.GetArgs(); const SfxPoolItem* pItem = 0; - const USHORT nId = SvxSearchDialogWrapper::GetChildWindowId(); + const sal_uInt16 nId = SvxSearchDialogWrapper::GetChildWindowId(); SvxSearchDialogWrapper *pWrp = (SvxSearchDialogWrapper*)GetViewFrame()->GetChildWindow(nId); - BOOL bQuiet = FALSE; - if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(SID_SEARCH_QUIET, FALSE, &pItem)) + sal_Bool bQuiet = sal_False; + if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(SID_SEARCH_QUIET, sal_False, &pItem)) bQuiet = ((const SfxBoolItem*) pItem)->GetValue(); - BOOL bApi = bQuiet | bNoMessage; + sal_Bool bApi = bQuiet | bNoMessage; - USHORT nSlot = rReq.GetSlot(); + sal_uInt16 nSlot = rReq.GetSlot(); if (nSlot == FN_REPEAT_SEARCH && !pSrchItem) { if(bApi) { - rReq.SetReturnValue(SfxBoolItem(nSlot, FALSE)); + rReq.SetReturnValue(SfxBoolItem(nSlot, sal_False)); nSlot = 0; } } @@ -132,7 +131,7 @@ void SwView::ExecSearch(SfxRequest& rReq, BOOL bNoMessage) break; case FID_SEARCH_ON: - bJustOpened = TRUE; + bJustOpened = sal_True; GetViewFrame()->GetBindings().Invalidate(SID_SEARCH_ITEM); break; @@ -209,7 +208,7 @@ void SwView::ExecSearch(SfxRequest& rReq, BOOL bNoMessage) { case SVX_SEARCHCMD_FIND: { - BOOL bRet = SearchAndWrap(bApi); + sal_Bool bRet = SearchAndWrap(bApi); if( bRet ) Scroll(pWrtShell->GetCharRect().SVRect()); rReq.SetReturnValue(SfxBoolItem(nSlot, bRet)); @@ -217,7 +216,7 @@ void SwView::ExecSearch(SfxRequest& rReq, BOOL bNoMessage) break; case SVX_SEARCHCMD_FIND_ALL: { - BOOL bRet = SearchAll(); + sal_Bool bRet = SearchAll(); if( !bRet ) { if( !bApi ) @@ -225,7 +224,7 @@ void SwView::ExecSearch(SfxRequest& rReq, BOOL bNoMessage) Window* pParentWindow = GetParentWindow( pSrchDlg ); InfoBox( pParentWindow, SW_RES(MSG_NOT_FOUND)).Execute(); } - bFound = FALSE; + bFound = sal_False; } rReq.SetReturnValue(SfxBoolItem(nSlot, bRet)); } @@ -238,7 +237,7 @@ void SwView::ExecSearch(SfxRequest& rReq, BOOL bNoMessage) //JP 27.04.95: warum ? // was ist, wenn man das gefundene nur attributieren will?? - USHORT nCmd = SVX_SEARCHCMD_FIND; + sal_uInt16 nCmd = SVX_SEARCHCMD_FIND; if( pSrchItem->GetReplaceString().Len() || !pReplList ) { @@ -246,7 +245,7 @@ void SwView::ExecSearch(SfxRequest& rReq, BOOL bNoMessage) // Ersetzungsstring enthalten ist - der ersetzte String // noch einmal gefunden wird. - BOOL bBack = pSrchItem->GetBackward(); + sal_Bool bBack = pSrchItem->GetBackward(); if (bBack) pWrtShell->Push(); String aReplace( pSrchItem->GetReplaceString() ); @@ -271,9 +270,9 @@ void SwView::ExecSearch(SfxRequest& rReq, BOOL bNoMessage) // 2) Weiter suchen (ohne zu ersetzen!) - USHORT nOldCmd = pSrchItem->GetCommand(); + sal_uInt16 nOldCmd = pSrchItem->GetCommand(); pSrchItem->SetCommand( nCmd ); - BOOL bRet = SearchAndWrap(bApi); + sal_Bool bRet = SearchAndWrap(bApi); if( bRet ) Scroll( pWrtShell->GetCharRect().SVRect()); pSrchItem->SetCommand( nOldCmd ); @@ -290,18 +289,18 @@ void SwView::ExecSearch(SfxRequest& rReq, BOOL bNoMessage) { // bestehende Selektionen aufheben, // wenn nicht in selektierten Bereichen gesucht werden soll - (pWrtShell->*pWrtShell->fnKillSel)(0, FALSE); + (pWrtShell->*pWrtShell->fnKillSel)(0, sal_False); if( DOCPOS_START == aOpts.eEnd ) pWrtShell->EndDoc(); else pWrtShell->SttDoc(); } - bExtra = FALSE; - ULONG nFound; + bExtra = sal_False; + sal_uLong nFound; { //Scope for SwWait-Object - SwWait aWait( *GetDocShell(), TRUE ); + SwWait aWait( *GetDocShell(), sal_True ); pWrtShell->StartAllAction(); nFound = FUNC_Search( aOpts ); // #i8288# Now that everything has been replaced, restore the original cursor position. @@ -317,7 +316,7 @@ void SwView::ExecSearch(SfxRequest& rReq, BOOL bNoMessage) Window* pParentWindow = GetParentWindow( pSrchDlg ); InfoBox( pParentWindow, SW_RES(MSG_NOT_FOUND)).Execute(); } - bFound = FALSE; + bFound = sal_False; return; } @@ -346,7 +345,7 @@ void SwView::ExecSearch(SfxRequest& rReq, BOOL bNoMessage) case FID_SEARCH_SEARCHSET: case FID_SEARCH_REPLACESET: { - static const USHORT aNormalAttr[] = + static const sal_uInt16 aNormalAttr[] = { /* 0 */ RES_CHRATR_CASEMAP, RES_CHRATR_CASEMAP, /* 2 */ RES_CHRATR_COLOR, RES_CHRATR_POSTURE, @@ -364,13 +363,13 @@ void SwView::ExecSearch(SfxRequest& rReq, BOOL bNoMessage) /*24 */ 0 }; - static const USHORT aCJKAttr[] = + static const sal_uInt16 aCJKAttr[] = { RES_CHRATR_CJK_FONT, RES_CHRATR_CJK_WEIGHT, RES_CHRATR_EMPHASIS_MARK, RES_CHRATR_TWO_LINES, RES_PARATR_SCRIPTSPACE, RES_PARATR_FORBIDDEN_RULES }; - static const USHORT aCTLAttr[] = + static const sal_uInt16 aCTLAttr[] = { RES_CHRATR_CTL_FONT, RES_CHRATR_CTL_WEIGHT }; @@ -390,7 +389,7 @@ void SwView::ExecSearch(SfxRequest& rReq, BOOL bNoMessage) 14 ); SfxItemSet aSet( pWrtShell->GetAttrPool(), aArr.GetData() ); - USHORT nWhich = SID_SEARCH_SEARCHSET; + sal_uInt16 nWhich = SID_SEARCH_SEARCHSET; if ( FID_SEARCH_REPLACESET == nSlot ) { @@ -425,7 +424,7 @@ void SwView::ExecSearch(SfxRequest& rReq, BOOL bNoMessage) } -BOOL SwView::SearchAndWrap(BOOL bApi) +sal_Bool SwView::SearchAndWrap(sal_Bool bApi) { SwSearchOptions aOpts( pWrtShell, pSrchItem->GetBackward() ); @@ -437,12 +436,12 @@ BOOL SwView::SearchAndWrap(BOOL bApi) // falls in selektierten Bereichen gesucht werden soll, duerfen sie // nicht aufgehoben werden if (!pSrchItem->GetSelection()) - (pWrtShell->*pWrtShell->fnKillSel)(0, FALSE); + (pWrtShell->*pWrtShell->fnKillSel)(0, sal_False); - SwWait *pWait = new SwWait( *GetDocShell(), TRUE ); + SwWait *pWait = new SwWait( *GetDocShell(), sal_True ); if( FUNC_Search( aOpts ) ) { - bFound = TRUE; + bFound = sal_True; if(pWrtShell->IsSelFrmMode()) { pWrtShell->UnSelectFrm(); @@ -451,30 +450,30 @@ BOOL SwView::SearchAndWrap(BOOL bApi) pWrtShell->Pop(); pWrtShell->EndAllAction(); delete pWait; - return TRUE; + return sal_True; } delete pWait, pWait = 0; // Suchen in den Sonderbereichen, wenn keine // Suche in Selektionen vorliegt. Bei Suche in Selektionen // wird ohnehin in diesen Sonderbereichen gesucht - BOOL bHasSrchInOther = bExtra; + sal_Bool bHasSrchInOther = bExtra; if (!pSrchItem->GetSelection() && !bExtra ) { - bExtra = TRUE; + bExtra = sal_True; if( FUNC_Search( aOpts ) ) { - bFound = TRUE; + bFound = sal_True; pWrtShell->Pop(); pWrtShell->EndAllAction(); - return TRUE; + return sal_True; } - bExtra = FALSE; + bExtra = sal_False; } else bExtra = !bExtra; - const USHORT nId = SvxSearchDialogWrapper::GetChildWindowId(); + const sal_uInt16 nId = SvxSearchDialogWrapper::GetChildWindowId(); SvxSearchDialogWrapper *pWrp = (SvxSearchDialogWrapper*)GetViewFrame()->GetChildWindow(nId); pSrchDlg = pWrp ? static_cast <SvxSearchDialog*> (pWrp->getDialog ()) : 0; @@ -487,9 +486,9 @@ BOOL SwView::SearchAndWrap(BOOL bApi) Window* pParentWindow = GetParentWindow( pSrchDlg ); InfoBox( pParentWindow, SW_RES(MSG_NOT_FOUND)).Execute(); } - bFound = FALSE; + bFound = sal_False; pWrtShell->Pop(); - return FALSE; + return sal_False; } pWrtShell->EndAllAction(); // noch mal mit WrapAround versuchen? @@ -500,15 +499,15 @@ BOOL SwView::SearchAndWrap(BOOL bApi) : MSG_SEARCH_END ) ).Execute() ) { - bFound = FALSE; + bFound = sal_False; pWrtShell->Pop(); - return FALSE; + return sal_False; } pWrtShell->StartAllAction(); - pWrtShell->Pop(FALSE); - pWait = new SwWait( *GetDocShell(), TRUE ); + pWrtShell->Pop(sal_False); + pWait = new SwWait( *GetDocShell(), sal_True ); - BOOL bSrchBkwrd = DOCPOS_START == aOpts.eEnd; + sal_Bool bSrchBkwrd = DOCPOS_START == aOpts.eEnd; aOpts.eEnd = bSrchBkwrd ? DOCPOS_START : DOCPOS_END; aOpts.eStart = bSrchBkwrd ? DOCPOS_END : DOCPOS_START; @@ -532,13 +531,13 @@ BOOL SwView::SearchAndWrap(BOOL bApi) Window* pParentWindow = GetParentWindow( pSrchDlg ); InfoBox( pParentWindow, SW_RES(MSG_NOT_FOUND)).Execute(); } - return bFound = FALSE; + return bFound = sal_False; } -BOOL SwView::SearchAll(USHORT* pFound) +sal_Bool SwView::SearchAll(sal_uInt16* pFound) { - SwWait aWait( *GetDocShell(), TRUE ); + SwWait aWait( *GetDocShell(), sal_True ); pWrtShell->StartAllAction(); SwSearchOptions aOpts( pWrtShell, pSrchItem->GetBackward() ); @@ -547,15 +546,15 @@ BOOL SwView::SearchAll(USHORT* pFound) { // bestehende Selektionen aufheben, // wenn nicht in selektierten Bereichen gesucht werden soll - (pWrtShell->*pWrtShell->fnKillSel)(0, FALSE); + (pWrtShell->*pWrtShell->fnKillSel)(0, sal_False); if( DOCPOS_START == aOpts.eEnd ) pWrtShell->EndDoc(); else pWrtShell->SttDoc(); } - bExtra = FALSE; - USHORT nFound = (USHORT)FUNC_Search( aOpts ); + bExtra = sal_False; + sal_uInt16 nFound = (sal_uInt16)FUNC_Search( aOpts ); if(pFound) *pFound = nFound; bFound = 0 != nFound; @@ -567,7 +566,7 @@ BOOL SwView::SearchAll(USHORT* pFound) void SwView::Replace() { - SwWait aWait( *GetDocShell(), TRUE ); + SwWait aWait( *GetDocShell(), sal_True ); pWrtShell->StartAllAction(); @@ -584,7 +583,7 @@ void SwView::Replace() pSrchItem->GetReplaceString(), SwWrtShell::GETSTYLE_CREATESOME )); - pWrtShell->EndUndo(UNDO_UI_REPLACE_STYLE); + pWrtShell->EndUndo(); } else { @@ -610,7 +609,7 @@ void SwView::Replace() -SwSearchOptions::SwSearchOptions( SwWrtShell* pSh, BOOL bBackward ) +SwSearchOptions::SwSearchOptions( SwWrtShell* pSh, sal_Bool bBackward ) { eStart = DOCPOS_CURR; if( bBackward ) @@ -625,9 +624,9 @@ SwSearchOptions::SwSearchOptions( SwWrtShell* pSh, BOOL bBackward ) } } -ULONG SwView::FUNC_Search( const SwSearchOptions& rOptions ) +sal_uLong SwView::FUNC_Search( const SwSearchOptions& rOptions ) { - BOOL bDoReplace = pSrchItem->GetCommand() == SVX_SEARCHCMD_REPLACE || + sal_Bool bDoReplace = pSrchItem->GetCommand() == SVX_SEARCHCMD_REPLACE || pSrchItem->GetCommand() == SVX_SEARCHCMD_REPLACE_ALL; int eRanges = pSrchItem->GetSelection() ? @@ -638,7 +637,7 @@ ULONG SwView::FUNC_Search( const SwSearchOptions& rOptions ) pWrtShell->SttSelect(); - static USHORT const aSearchAttrRange[] = { + static sal_uInt16 aSearchAttrRange[] = { RES_FRMATR_BEGIN, RES_FRMATR_END-1, RES_CHRATR_BEGIN, RES_CHRATR_END-1, RES_PARATR_BEGIN, RES_PARATR_END-1, @@ -672,11 +671,11 @@ ULONG SwView::FUNC_Search( const SwSearchOptions& rOptions ) // build SearchOptions to be used // SearchOptions aSearchOpt( pSrchItem->GetSearchOptions() ); - aSearchOpt.Locale = SvxCreateLocale( (USHORT)GetAppLanguage() ); + aSearchOpt.Locale = SvxCreateLocale( (sal_uInt16)GetAppLanguage() ); if( !bDoReplace ) aSearchOpt.replaceString = aEmptyStr; - ULONG nFound; + sal_uLong nFound; if( aSrchSet.Count() || ( pReplSet && pReplSet->Count() )) { nFound = pWrtShell->SearchAttr( @@ -713,7 +712,7 @@ ULONG SwView::FUNC_Search( const SwSearchOptions& rOptions ) LAYOUT_NS Dialog* SwView::GetSearchDialog() { - const USHORT nId = SvxSearchDialogWrapper::GetChildWindowId(); + const sal_uInt16 nId = SvxSearchDialogWrapper::GetChildWindowId(); SvxSearchDialogWrapper *pWrp = (SvxSearchDialogWrapper*)SfxViewFrame::Current()->GetChildWindow(nId); if ( pWrp ) pSrchDlg = pWrp->getDialog (); @@ -725,7 +724,7 @@ LAYOUT_NS Dialog* SwView::GetSearchDialog() void SwView::StateSearch(SfxItemSet &rSet) { SfxWhichIter aIter(rSet); - USHORT nWhich = aIter.FirstWhich(); + sal_uInt16 nWhich = aIter.FirstWhich(); while(nWhich) { @@ -733,7 +732,7 @@ void SwView::StateSearch(SfxItemSet &rSet) { case SID_SEARCH_OPTIONS: { - UINT16 nOpt = 0xFFFF; + sal_uInt16 nOpt = 0xFFFF; if( GetDocShell()->IsReadOnly() ) nOpt &= ~( SEARCH_OPTIONS_REPLACE | SEARCH_OPTIONS_REPLACE_ALL ); @@ -756,13 +755,13 @@ void SwView::StateSearch(SfxItemSet &rSet) ( aTxt = pWrtShell->SwCrsrShell::GetSelTxt() ).Len() ) { pSrchItem->SetSearchString( aTxt ); - pSrchItem->SetSelection( FALSE ); + pSrchItem->SetSelection( sal_False ); } else - pSrchItem->SetSelection( TRUE ); + pSrchItem->SetSelection( sal_True ); } - bJustOpened = FALSE; + bJustOpened = sal_False; rSet.Put( *pSrchItem ); } break; diff --git a/sw/source/ui/uiview/viewstat.cxx b/sw/source/ui/uiview/viewstat.cxx index 20812fb809..3e7406867d 100644 --- a/sw/source/ui/uiview/viewstat.cxx +++ b/sw/source/ui/uiview/viewstat.cxx @@ -28,6 +28,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" + #include <hintids.hxx> #include <com/sun/star/linguistic2/XThesaurus.hpp> #include <com/sun/star/uno/Sequence.hxx> @@ -152,7 +153,7 @@ void SwView::GetState(SfxItemSet &rSet) break; case SID_CLEARHISTORY: { - rSet.Put(SfxBoolItem(nWhich, pWrtShell->GetUndoIds() != UNDO_EMPTY)); + rSet.Put(SfxBoolItem(nWhich, pWrtShell->GetLastUndoInfo(0, 0))); } break; case SID_UNDO: @@ -179,7 +180,7 @@ void SwView::GetState(SfxItemSet &rSet) if(pWrtShell->IsInVerticalText()) aImgItem.SetRotation(2700); if(pWrtShell->IsInRightToLeftText()) - aImgItem.SetMirrored(TRUE); + aImgItem.SetMirrored(sal_True); } rSet.Put(aImgItem); } @@ -197,7 +198,7 @@ void SwView::GetState(SfxItemSet &rSet) if(pWrtShell->IsInVerticalText()) aImgItem.SetRotation(2700); if(pWrtShell->IsInRightToLeftText()) - aImgItem.SetMirrored(TRUE); + aImgItem.SetMirrored(sal_True); } rSet.Put(aImgItem); } @@ -217,7 +218,7 @@ void SwView::GetState(SfxItemSet &rSet) break; case SID_TWAIN_SELECT: case SID_TWAIN_TRANSFER: -#if defined WIN || defined WNT || defined UNX +#if defined WNT || defined UNX { if(!SW_MOD()->GetScannerManager().is()) rSet.DisableItem(nWhich); @@ -350,7 +351,7 @@ void SwView::GetState(SfxItemSet &rSet) if(pWrtShell->IsInVerticalText()) aImageItem.SetRotation( 2700 ); if(pWrtShell->IsInRightToLeftText()) - aImageItem.SetMirrored( TRUE ); + aImageItem.SetMirrored( sal_True ); rSet.Put(aImageItem); } break; @@ -378,7 +379,7 @@ void SwView::GetState(SfxItemSet &rSet) { if( !pShell ) SelectShell(); - USHORT nAlias = 0; + sal_uInt16 nAlias = 0; bool bDraw = false; if( nSelectionType & (nsSelectionType::SEL_DRW_TXT|nsSelectionType::SEL_TXT) ) { diff --git a/sw/source/ui/uiview/viewtab.cxx b/sw/source/ui/uiview/viewtab.cxx index 02fede0369..4504e55c6d 100644 --- a/sw/source/ui/uiview/viewtab.cxx +++ b/sw/source/ui/uiview/viewtab.cxx @@ -79,19 +79,19 @@ using namespace ::com::sun::star; Beschreibung: Columns eintueten --------------------------------------------------------------------*/ void lcl_FillSvxColumn(const SwFmtCol& rCol, - USHORT nTotalWidth, + sal_uInt16 nTotalWidth, SvxColumnItem& rColItem, long nDistance) { const SwColumns& rCols = rCol.GetColumns(); - USHORT nWidth = 0; + sal_uInt16 nWidth = 0; - BOOL bOrtho = rCol.IsOrtho() && rCols.Count(); + sal_Bool bOrtho = rCol.IsOrtho() && rCols.Count(); long nInnerWidth = 0; if( bOrtho ) { nInnerWidth = nTotalWidth; - for ( USHORT i = 0; i < rCols.Count(); ++i ) + for ( sal_uInt16 i = 0; i < rCols.Count(); ++i ) { SwColumn* pCol = rCols[i]; nInnerWidth -= pCol->GetLeft() + pCol->GetRight(); @@ -101,17 +101,17 @@ void lcl_FillSvxColumn(const SwFmtCol& rCol, else nInnerWidth /= rCols.Count(); } - for ( USHORT i = 0; i < rCols.Count(); ++i ) + for ( sal_uInt16 i = 0; i < rCols.Count(); ++i ) { SwColumn* pCol = rCols[i]; - const USHORT nStart = USHORT(pCol->GetLeft() + nWidth + nDistance); + const sal_uInt16 nStart = sal_uInt16(pCol->GetLeft() + nWidth + nDistance); if( bOrtho ) - nWidth = static_cast< USHORT >(nWidth + nInnerWidth + pCol->GetLeft() + pCol->GetRight()); + nWidth = static_cast< sal_uInt16 >(nWidth + nInnerWidth + pCol->GetLeft() + pCol->GetRight()); else - nWidth = static_cast< USHORT >(nWidth + rCol.CalcColWidth(i, nTotalWidth)); - const USHORT nEnd = USHORT(nWidth - pCol->GetRight() + nDistance); + nWidth = static_cast< sal_uInt16 >(nWidth + rCol.CalcColWidth(i, nTotalWidth)); + const sal_uInt16 nEnd = sal_uInt16(nWidth - pCol->GetRight() + nDistance); - SvxColumnDescription aColDesc(nStart, nEnd, TRUE); + SvxColumnDescription aColDesc(nStart, nEnd, sal_True); rColItem.Append(aColDesc); } } @@ -120,7 +120,7 @@ void lcl_FillSvxColumn(const SwFmtCol& rCol, Beschreibung: ColumnItem in ColumnInfo ueberfuehren --------------------------------------------------------------------*/ void lcl_ConvertToCols(const SvxColumnItem& rColItem, - USHORT nTotalWidth, + sal_uInt16 nTotalWidth, SwFmtCol& rCols) { OSL_ENSURE( rCols.GetNumCols() == rColItem.Count(), "Column count mismatch" ); @@ -129,27 +129,27 @@ void lcl_ConvertToCols(const SvxColumnItem& rColItem, if(rCols.GetNumCols() != rColItem.Count()) return; - USHORT nLeft = 0; + sal_uInt16 nLeft = 0; SwTwips nSumAll= 0; // Summiere alle Spalten und Raender auf SwColumns& rArr = rCols.GetColumns(); // Tabcols der Reihe nach - for( USHORT i=0; i < rColItem.Count()-1; ++i ) + for( sal_uInt16 i=0; i < rColItem.Count()-1; ++i ) { OSL_ENSURE(rColItem[i+1].nStart >= rColItem[i].nEnd,"overlapping columns" ); - USHORT nStart = static_cast< USHORT >(rColItem[i+1].nStart); - USHORT nEnd = static_cast< USHORT >(rColItem[i].nEnd); + sal_uInt16 nStart = static_cast< sal_uInt16 >(rColItem[i+1].nStart); + sal_uInt16 nEnd = static_cast< sal_uInt16 >(rColItem[i].nEnd); if(nStart < nEnd) nStart = nEnd; - const USHORT nDiff = nStart - nEnd; - const USHORT nRight = nDiff / 2; + const sal_uInt16 nDiff = nStart - nEnd; + const sal_uInt16 nRight = nDiff / 2; - USHORT nWidth = static_cast< USHORT >(rColItem[i].nEnd - rColItem[i].nStart); + sal_uInt16 nWidth = static_cast< sal_uInt16 >(rColItem[i].nEnd - rColItem[i].nStart); nWidth += nLeft + nRight; SwColumn* pCol = rArr[i]; - pCol->SetWishWidth( USHORT(long(rCols.GetWishWidth()) * long(nWidth) / + pCol->SetWishWidth( sal_uInt16(long(rCols.GetWishWidth()) * long(nWidth) / long(nTotalWidth) )); pCol->SetLeft( nLeft ); pCol->SetRight( nRight ); @@ -161,9 +161,9 @@ void lcl_ConvertToCols(const SvxColumnItem& rColItem, //Die Differenz aus der Gesamtwunschbreite und der Summe der bisher berechneten // Spalten und Raender sollte die Breite der letzten Spalte ergeben. - rArr[rColItem.Count()-1]->SetWishWidth( rCols.GetWishWidth() - (USHORT)nSumAll ); + rArr[rColItem.Count()-1]->SetWishWidth( rCols.GetWishWidth() - (sal_uInt16)nSumAll ); - rCols.SetOrtho(FALSE, 0, 0 ); + rCols.SetOrtho(sal_False, 0, 0 ); } /*-------------------------------------------------------------------- @@ -172,7 +172,7 @@ void lcl_ConvertToCols(const SvxColumnItem& rColItem, void lcl_EraseDefTabs(SvxTabStopItem& rTabStops) { // Def Tabs loeschen - for ( USHORT i = 0; i < rTabStops.Count(); ) + for ( sal_uInt16 i = 0; i < rTabStops.Count(); ) { // Hier auch den DefTab auf Null rausschmeissen if ( SVX_TAB_ADJUST_DEFAULT == rTabStops[i].GetAdjustment() || @@ -190,7 +190,7 @@ void lcl_EraseDefTabs(SvxTabStopItem& rTabStops) --------------------------------------------------------------------*/ void SwView::SwapPageMargin(const SwPageDesc& rDesc, SvxLRSpaceItem& rLRSpace) { - USHORT nPhyPage, nVirPage; + sal_uInt16 nPhyPage, nVirPage; GetWrtShell().GetPageNum( nPhyPage, nVirPage ); if ( rDesc.GetUseOn() == nsUseOnPage::PD_MIRROR && (nPhyPage % 2) == 0 ) @@ -224,30 +224,30 @@ void ResizeFrameCols(SwFmtCol& rCol, { // wenn die Wunschbreite zu gross wird, dann muessen alle Werte passend skaliert werden long nScale = (0xffffl << 8)/ nNewWishWidth; - for(USHORT i = 0; i < rArr.Count(); i++) + for(sal_uInt16 i = 0; i < rArr.Count(); i++) { SwColumn* pCol = rArr.GetObject(i); long nVal = pCol->GetWishWidth(); lcl_Scale(nVal, nScale); - pCol->SetWishWidth((USHORT) nVal); + pCol->SetWishWidth((sal_uInt16) nVal); nVal = pCol->GetLeft(); lcl_Scale(nVal, nScale); - pCol->SetLeft((USHORT) nVal); + pCol->SetLeft((sal_uInt16) nVal); nVal = pCol->GetRight(); lcl_Scale(nVal, nScale); - pCol->SetRight((USHORT) nVal); + pCol->SetRight((sal_uInt16) nVal); } lcl_Scale(nNewWishWidth, nScale); lcl_Scale(nWishDiff, nScale); } - rCol.SetWishWidth( (USHORT) (nNewWishWidth) ); + rCol.SetWishWidth( (sal_uInt16) (nNewWishWidth) ); if( nLeftDelta >= 2 || nLeftDelta <= -2) - rArr[0]->SetWishWidth(rArr[0]->GetWishWidth() + (USHORT)nWishDiff); + rArr[0]->SetWishWidth(rArr[0]->GetWishWidth() + (sal_uInt16)nWishDiff); else - rArr[rArr.Count()-1]->SetWishWidth(rArr[rArr.Count()-1]->GetWishWidth() + (USHORT)nWishDiff); + rArr[rArr.Count()-1]->SetWishWidth(rArr[rArr.Count()-1]->GetWishWidth() + (sal_uInt16)nWishDiff); //reset auto width - rCol.SetOrtho(FALSE, 0, 0 ); + rCol.SetOrtho(sal_False, 0, 0 ); } /*-------------------------------------------------------------------- @@ -257,18 +257,18 @@ void ResizeFrameCols(SwFmtCol& rCol, void SwView::ExecTabWin( SfxRequest& rReq ) { SwWrtShell &rSh = GetWrtShell(); - const USHORT nFrmType = rSh.IsObjSelected() ? + const sal_uInt16 nFrmType = rSh.IsObjSelected() ? FRMTYPE_DRAWOBJ : - rSh.GetFrmType(0,TRUE); - const BOOL bFrmSelection = rSh.IsFrmSelected(); - const BOOL bBrowse = rSh.getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE); + rSh.GetFrmType(0,sal_True); + const sal_Bool bFrmSelection = rSh.IsFrmSelected(); + const sal_Bool bBrowse = rSh.getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE); - const USHORT nSlot = rReq.GetSlot(); - const USHORT nDescId = rSh.GetCurPageDesc(); + const sal_uInt16 nSlot = rReq.GetSlot(); + const sal_uInt16 nDescId = rSh.GetCurPageDesc(); const SwPageDesc& rDesc = rSh.GetPageDesc( nDescId ); - const BOOL bVerticalWriting = rSh.IsInVerticalText(); + const sal_Bool bVerticalWriting = rSh.IsInVerticalText(); const SwFmtHeader& rHeaderFmt = rDesc.GetMaster().GetHeader(); SwFrmFmt *pHeaderFmt = (SwFrmFmt*)rHeaderFmt.GetHeaderFmt(); @@ -281,9 +281,9 @@ void SwView::ExecTabWin( SfxRequest& rReq ) const long nPageWidth = bBrowse ? rPageRect.Width() : rFrmSize.GetWidth(); const long nPageHeight = bBrowse ? rPageRect.Height() : rFrmSize.GetHeight(); - BOOL bUnlockView = FALSE; + sal_Bool bUnlockView = sal_False; rSh.StartAllAction(); - BOOL bSect = 0 != (nFrmType & FRMTYPE_COLSECT); + sal_Bool bSect = 0 != (nFrmType & FRMTYPE_COLSECT); switch ( nSlot ) { @@ -297,8 +297,14 @@ void SwView::ExecTabWin( SfxRequest& rReq ) SwFrmFmt* pFmt = ((SwFrmFmt*)rSh.GetFlyFrmFmt()); const SwRect &rRect = rSh.GetAnyCurRect(RECT_FLY_EMBEDDED); - BOOL bRTL; - BOOL bVerticalFrame = (bFrmSelection && rSh.IsFrmVertical(TRUE, bRTL))|| (!bFrmSelection && bVerticalWriting); + sal_Bool bVerticalFrame(sal_False); + { + sal_Bool bRTL; + sal_Bool bVertL2R; + bVerticalFrame = ( bFrmSelection && + rSh.IsFrmVertical(sal_True, bRTL, bVertL2R) ) || + ( !bFrmSelection && bVerticalWriting); + } long nDeltaX = bVerticalFrame ? rRect.Right() - rPageRect.Right() + aLongLR.GetRight() : rPageRect.Left() + aLongLR.GetLeft() - rRect.Left(); @@ -330,7 +336,7 @@ void SwView::ExecTabWin( SfxRequest& rReq ) SwRect aRect; rSh.CalcBoundRect(aRect, FLY_AS_CHAR); long nPrtWidth = aRect.Width(); - aSize.SetWidthPercent(BYTE((nPageWidth - aLongLR.GetLeft() - aLongLR.GetRight()) * 100 /nPrtWidth)); + aSize.SetWidthPercent(sal_uInt8((nPageWidth - aLongLR.GetLeft() - aLongLR.GetRight()) * 100 /nPrtWidth)); } else aSize.SetWidth( nPageWidth - @@ -365,9 +371,9 @@ void SwView::ExecTabWin( SfxRequest& rReq ) aLongLR.SetLeft( nOld > aLongLR.GetLeft() ? 0 : aLongLR.GetLeft() - nOld ); nOld = rDesc.GetMaster().GetLRSpace().GetRight(); - aLongLR.SetRight( nOld > (USHORT)aLongLR.GetRight() ? 0 : aLongLR.GetRight() - nOld ); - aLR.SetLeft((USHORT)aLongLR.GetLeft()); - aLR.SetRight((USHORT)aLongLR.GetRight()); + aLongLR.SetRight( nOld > (sal_uInt16)aLongLR.GetRight() ? 0 : aLongLR.GetRight() - nOld ); + aLR.SetLeft((sal_uInt16)aLongLR.GetLeft()); + aLR.SetRight((sal_uInt16)aLongLR.GetRight()); if ( nFrmType & FRMTYPE_HEADER && pHeaderFmt ) pHeaderFmt->SetFmtAttr( aLR ); @@ -411,8 +417,8 @@ void SwView::ExecTabWin( SfxRequest& rReq ) } else { // Seitenraender einstellen - aLR.SetLeft((USHORT)aLongLR.GetLeft()); - aLR.SetRight((USHORT)aLongLR.GetRight()); + aLR.SetLeft((sal_uInt16)aLongLR.GetLeft()); + aLR.SetRight((sal_uInt16)aLongLR.GetRight()); SwapPageMargin( rDesc, aLR ); SwPageDesc aDesc( rDesc ); aDesc.GetMaster().SetFmtAttr( aLR ); @@ -435,8 +441,11 @@ void SwView::ExecTabWin( SfxRequest& rReq ) SfxItemSet aSet( GetPool(), RES_FRM_SIZE, RES_FRM_SIZE, RES_VERT_ORIENT, RES_HORI_ORIENT, 0 ); //which of the orientation attributes is to be put depends on the frame's environment - BOOL bRTL; - if((bFrmSelection && rSh.IsFrmVertical(TRUE, bRTL))|| (!bFrmSelection && bVerticalWriting)) + sal_Bool bRTL; + sal_Bool bVertL2R; + if ( ( bFrmSelection && + rSh.IsFrmVertical(sal_True, bRTL, bVertL2R ) ) || + ( !bFrmSelection && bVerticalWriting ) ) { SwFmtHoriOrient aHoriOrient(pFmt->GetHoriOrient()); aHoriOrient.SetHoriOrient(text::HoriOrientation::NONE); @@ -456,7 +465,7 @@ void SwView::ExecTabWin( SfxRequest& rReq ) SwRect aRect; rSh.CalcBoundRect(aRect, FLY_AS_CHAR); long nPrtHeight = aRect.Height(); - aSize.SetHeightPercent(BYTE(nHeight * 100 /nPrtHeight)); + aSize.SetHeightPercent(sal_uInt8(nHeight * 100 /nPrtHeight)); } else aSize.SetHeight(nHeight ); @@ -505,15 +514,15 @@ void SwView::ExecTabWin( SfxRequest& rReq ) if ( nFrmType & ( FRMTYPE_HEADER | FRMTYPE_FOOTER )) { - const BOOL bHead = nFrmType & FRMTYPE_HEADER ? TRUE : FALSE; + const sal_Bool bHead = nFrmType & FRMTYPE_HEADER ? sal_True : sal_False; SvxULSpaceItem aUL( rDesc.GetMaster().GetULSpace() ); if ( bHead ) - aUL.SetUpper( (USHORT)aLongULSpace.GetUpper() ); + aUL.SetUpper( (sal_uInt16)aLongULSpace.GetUpper() ); else - aUL.SetLower( (USHORT)aLongULSpace.GetLower() ); + aUL.SetLower( (sal_uInt16)aLongULSpace.GetLower() ); aDesc.GetMaster().SetFmtAttr( aUL ); - if( (bHead && pHeaderFmt) || (!bHead && pFooterFmt )) + if( (bHead && pHeaderFmt) || (!bHead && pFooterFmt) ) { SwFmtFrmSize aSz( bHead ? pHeaderFmt->GetFrmSize() : pFooterFmt->GetFrmSize() ); @@ -529,8 +538,8 @@ void SwView::ExecTabWin( SfxRequest& rReq ) else { SvxULSpaceItem aUL(RES_UL_SPACE); - aUL.SetUpper((USHORT)aLongULSpace.GetUpper()); - aUL.SetLower((USHORT)aLongULSpace.GetLower()); + aUL.SetUpper((sal_uInt16)aLongULSpace.GetUpper()); + aUL.SetLower((sal_uInt16)aLongULSpace.GetLower()); aDesc.GetMaster().SetFmtAttr(aUL); } @@ -541,7 +550,7 @@ void SwView::ExecTabWin( SfxRequest& rReq ) case SID_ATTR_TABSTOP_VERTICAL: case SID_ATTR_TABSTOP: { - USHORT nWhich = GetPool().GetWhich(nSlot); + sal_uInt16 nWhich = GetPool().GetWhich(nSlot); SvxTabStopItem aTabStops( (const SvxTabStopItem&)rReq.GetArgs()-> Get( nWhich )); aTabStops.SetWhich(RES_PARATR_TABSTOP); @@ -560,7 +569,7 @@ void SwView::ExecTabWin( SfxRequest& rReq ) } // auffuellen mit Default-Tabs - USHORT nDef = ::GetTabDist( rDefTabs ); + sal_uInt16 nDef = ::GetTabDist( rDefTabs ); ::MakeDefTabs( nDef, aTabStops ); SwTxtFmtColl* pColl = rSh.GetCurTxtFmtColl(); @@ -622,7 +631,7 @@ void SwView::ExecTabWin( SfxRequest& rReq ) const SvxTabStopItem& rTabStops = (const SvxTabStopItem&)aSet.Get(RES_PARATR_TABSTOP); // Haben wir einen Tab an Stelle Null - USHORT i; + sal_uInt16 i; for ( i = 0; i < rTabStops.Count(); ++i ) if ( rTabStops[i].GetTabPos() == 0 ) @@ -641,7 +650,7 @@ void SwView::ExecTabWin( SfxRequest& rReq ) const SvxTabStopItem& rDefTabs = (const SvxTabStopItem&)rSh.GetDefault(RES_PARATR_TABSTOP); - USHORT nDef = ::GetTabDist(rDefTabs); + sal_uInt16 nDef = ::GetTabDist(rDefTabs); ::MakeDefTabs( nDef, aTabStops ); if( pColl && pColl->IsAutoUpdateFmt()) @@ -662,11 +671,11 @@ void SwView::ExecTabWin( SfxRequest& rReq ) SvxColumnItem aColItem((const SvxColumnItem&)rReq. GetArgs()->Get(nSlot)); - if( bSetTabColFromDoc || (!bSect && rSh.GetTableFmt())) + if( bSetTabColFromDoc || (!bSect && rSh.GetTableFmt()) ) { OSL_ENSURE(aColItem.Count(), "ColDesc is empty!!"); - const BOOL bSingleLine = ((const SfxBoolItem&)rReq. + const sal_Bool bSingleLine = ((const SfxBoolItem&)rReq. GetArgs()->Get(SID_RULER_ACT_LINE_ONLY)).GetValue(); SwTabCols aTabCols; @@ -687,14 +696,14 @@ void SwView::ExecTabWin( SfxRequest& rReq ) // Tabcols der Reihe nach // Die letzte Col wird durch den Rand definiert //columns in right-to-left tables need to be mirrored - BOOL bIsTableRTL = + sal_Bool bIsTableRTL = IsTabColFromDoc() ? rSh.IsMouseTableRightToLeft(aTabColFromDocPos) : rSh.IsTableRightToLeft(); if(bIsTableRTL) { - USHORT nColCount = aColItem.Count() - 1; - for ( USHORT i = 0; i < nColCount && i < aTabCols.Count(); ++i ) + sal_uInt16 nColCount = aColItem.Count() - 1; + for ( sal_uInt16 i = 0; i < nColCount && i < aTabCols.Count(); ++i ) { const SvxColumnDescription& rCol = aColItem[nColCount - i]; aTabCols[i] = aTabCols.GetRight() - rCol.nStart; @@ -703,7 +712,7 @@ void SwView::ExecTabWin( SfxRequest& rReq ) } else { - for ( USHORT i = 0; i < aColItem.Count()-1 && i < aTabCols.Count(); ++i ) + for ( sal_uInt16 i = 0; i < aColItem.Count()-1 && i < aTabCols.Count(); ++i ) { const SvxColumnDescription& rCol = aColItem[i]; aTabCols[i] = rCol.nEnd + aTabCols.GetLeft(); @@ -715,8 +724,8 @@ void SwView::ExecTabWin( SfxRequest& rReq ) { if( !rSh.IsViewLocked() ) { - bUnlockView = TRUE; - rSh.LockView( TRUE ); + bUnlockView = sal_True; + rSh.LockView( sal_True ); } rSh.SetMouseTabCols( aTabCols, bSingleLine, aTabColFromDocPos ); @@ -744,10 +753,10 @@ void SwView::ExecTabWin( SfxRequest& rReq ) SwFmtCol aCols( bSect ? pSectFmt->GetCol() : - (const SwFmtCol&)aSet.Get( RES_COL, FALSE )); + (const SwFmtCol&)aSet.Get( RES_COL, sal_False )); SwRect aCurRect = rSh.GetAnyCurRect(bSect ? RECT_SECTION_PRT : RECT_FLY_PRT_EMBEDDED); const long lWidth = bVerticalWriting ? aCurRect.Height() : aCurRect.Width(); - ::lcl_ConvertToCols( aColItem, USHORT(lWidth), aCols ); + ::lcl_ConvertToCols( aColItem, sal_uInt16(lWidth), aCols ); aSet.Put( aCols ); if(bSect) rSh.SetSectionAttr( aSet, pSectFmt ); @@ -771,7 +780,7 @@ void SwView::ExecTabWin( SfxRequest& rReq ) SwFmtCol aCols( rDesc.GetMaster().GetCol() ); const SwRect aPrtRect = rSh.GetAnyCurRect(RECT_PAGE_PRT); ::lcl_ConvertToCols( aColItem, - USHORT(bVerticalWriting ? aPrtRect.Height() : aPrtRect.Width()), + sal_uInt16(bVerticalWriting ? aPrtRect.Height() : aPrtRect.Width()), aCols ); SwPageDesc aDesc( rDesc ); aDesc.GetMaster().SetFmtAttr( aCols ); @@ -810,7 +819,7 @@ void SwView::ExecTabWin( SfxRequest& rReq ) if(bVerticalWriting) { - for ( USHORT i = aColItem.Count() - 1; i; --i ) + for ( sal_uInt16 i = aColItem.Count() - 1; i; --i ) { const SvxColumnDescription& rCol = aColItem[i - 1]; long nColumnPos = aTabCols.GetRight() - rCol.nEnd ; @@ -820,23 +829,23 @@ void SwView::ExecTabWin( SfxRequest& rReq ) } else { - for ( USHORT i = 0; i < aColItem.Count()-1; ++i ) + for ( sal_uInt16 i = 0; i < aColItem.Count()-1; ++i ) { const SvxColumnDescription& rCol = aColItem[i]; aTabCols[i] = rCol.nEnd + aTabCols.GetLeft(); aTabCols.SetHidden( i, !rCol.bVisible ); } } - BOOL bSingleLine = FALSE; + sal_Bool bSingleLine = sal_False; const SfxPoolItem* pSingleLine; - if( SFX_ITEM_SET == rReq.GetArgs()->GetItemState(SID_RULER_ACT_LINE_ONLY, FALSE, &pSingleLine)) + if( SFX_ITEM_SET == rReq.GetArgs()->GetItemState(SID_RULER_ACT_LINE_ONLY, sal_False, &pSingleLine)) bSingleLine = ((const SfxBoolItem*)pSingleLine)->GetValue(); if ( bSetTabRowFromDoc ) { if( !rSh.IsViewLocked() ) { - bUnlockView = TRUE; - rSh.LockView( TRUE ); + bUnlockView = sal_True; + rSh.LockView( sal_True ); } rSh.SetMouseTabRows( aTabCols, bSingleLine, aTabColFromDocPos ); } @@ -852,9 +861,9 @@ void SwView::ExecTabWin( SfxRequest& rReq ) rSh.EndAllAction(); if( bUnlockView ) - rSh.LockView( FALSE ); + rSh.LockView( sal_False ); - bSetTabColFromDoc = bSetTabRowFromDoc = bTabColFromDoc = bTabRowFromDoc = FALSE; + bSetTabColFromDoc = bSetTabRowFromDoc = bTabColFromDoc = bTabRowFromDoc = sal_False; SetNumRuleNodeFromDoc(NULL); } @@ -868,13 +877,13 @@ void SwView::StateTabWin(SfxItemSet& rSet) SwWrtShell &rSh = GetWrtShell(); const Point* pPt = IsTabColFromDoc() || IsTabRowFromDoc() ? &aTabColFromDocPos : 0; - const USHORT nFrmType = rSh.IsObjSelected() + const sal_uInt16 nFrmType = rSh.IsObjSelected() ? FRMTYPE_DRAWOBJ - : rSh.GetFrmType( pPt, TRUE ); + : rSh.GetFrmType( pPt, sal_True ); - const BOOL bFrmSelection = rSh.IsFrmSelected(); + const sal_Bool bFrmSelection = rSh.IsFrmSelected(); - const BOOL bBrowse = rSh.getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE); + const sal_Bool bBrowse = rSh.getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE); // PageOffset/Begrenzer const SwRect& rPageRect = rSh.GetAnyCurRect( RECT_PAGE, pPt ); const SwRect& rPagePrtRect = rSh.GetAnyCurRect( RECT_PAGE_PRT, pPt ); @@ -886,7 +895,7 @@ void SwView::StateTabWin(SfxItemSet& rSet) rSh.GetMousePageDesc(aTabColFromDocPos) : rSh.GetCurPageDesc() ); const SvxFrameDirectionItem& rFrameDir = rDesc.GetMaster().GetFrmDir(); - const BOOL bVerticalWriting = rSh.IsInVerticalText(); + const sal_Bool bVerticalWriting = rSh.IsInVerticalText(); //enable tab stop display on the rulers depending on the writing direction WinBits nRulerStyle = pHRuler->GetStyle() & ~WB_EXTRAFIELD; @@ -909,7 +918,7 @@ void SwView::StateTabWin(SfxItemSet& rSet) SelectionType nSelType = rSh.GetSelectionType(); SfxWhichIter aIter( rSet ); - USHORT nWhich = aIter.FirstWhich(); + sal_uInt16 nWhich = aIter.FirstWhich(); sal_Bool bPutContentProtection = sal_False; while ( nWhich ) @@ -989,15 +998,15 @@ void SwView::StateTabWin(SfxItemSet& rSet) { // Dokumentkoordinaten Frame auf Seitenkoordinaten umbrechen const SwRect &rRect = rSh.GetAnyCurRect(RECT_FLY_EMBEDDED, pPt); - aLongUL.SetUpper((USHORT)(rRect.Top() - rPageRect.Top() )); - aLongUL.SetLower((USHORT)(rPageRect.Bottom() - rRect.Bottom() )); + aLongUL.SetUpper((sal_uInt16)(rRect.Top() - rPageRect.Top() )); + aLongUL.SetLower((sal_uInt16)(rPageRect.Bottom() - rRect.Bottom() )); } else if ( nFrmType & FRMTYPE_HEADER || nFrmType & FRMTYPE_FOOTER ) { SwRect aRect( rSh.GetAnyCurRect( RECT_HEADERFOOTER, pPt)); aRect.Pos() -= rSh.GetAnyCurRect( RECT_PAGE, pPt ).Pos(); - aLongUL.SetUpper( (USHORT)aRect.Top() ); - aLongUL.SetLower( (USHORT)(nPageHeight - aRect.Bottom()) ); + aLongUL.SetUpper( (sal_uInt16)aRect.Top() ); + aLongUL.SetLower( (sal_uInt16)(nPageHeight - aRect.Bottom()) ); } else if( nFrmType & FRMTYPE_DRAWOBJ) { @@ -1014,8 +1023,8 @@ void SwView::StateTabWin(SfxItemSet& rSet) rSet.Put( aLongUL ); else { - SvxULSpaceItem aULTmp((USHORT)aLongUL.GetUpper(), - (USHORT)aLongUL.GetLower(), + SvxULSpaceItem aULTmp((sal_uInt16)aLongUL.GetUpper(), + (sal_uInt16)aLongUL.GetLower(), nWhich); rSet.Put(aULTmp); } @@ -1078,7 +1087,7 @@ void SwView::StateTabWin(SfxItemSet& rSet) short nOffset = static_cast< short >(aLR.GetTxtLeft() + // #i42922# Mouse move of numbering label // has to consider the left indent of the paragraph - pNumRuleNodeFromDoc->GetLeftMarginWithNum( TRUE ) ); + pNumRuleNodeFromDoc->GetLeftMarginWithNum( sal_True ) ); // <-- short nFLOffset; @@ -1121,8 +1130,8 @@ void SwView::StateTabWin(SfxItemSet& rSet) aCoreSet.Put( aBoxInfo ); rSh.GetFlyFrmAttr( aCoreSet ); const SvxBoxItem& rBox = (const SvxBoxItem&)aCoreSet.Get(RES_BOX); - aDistLR.SetLeft((USHORT)rBox.GetDistance(BOX_LINE_LEFT )); - aDistLR.SetRight((USHORT)rBox.GetDistance(BOX_LINE_RIGHT)); + aDistLR.SetLeft((sal_uInt16)rBox.GetDistance(BOX_LINE_LEFT )); + aDistLR.SetRight((sal_uInt16)rBox.GetDistance(BOX_LINE_RIGHT)); //add the paragraph border distance SfxItemSet aCoreSet1( GetPool(), @@ -1130,12 +1139,12 @@ void SwView::StateTabWin(SfxItemSet& rSet) 0 ); rSh.GetCurAttr( aCoreSet1 ); const SvxBoxItem& rParaBox = (const SvxBoxItem&)aCoreSet1.Get(RES_BOX); - aDistLR.SetLeft(aDistLR.GetLeft() + (USHORT)rParaBox.GetDistance(BOX_LINE_LEFT )); - aDistLR.SetRight(aDistLR.GetRight() + (USHORT)rParaBox.GetDistance(BOX_LINE_RIGHT)); + aDistLR.SetLeft(aDistLR.GetLeft() + (sal_uInt16)rParaBox.GetDistance(BOX_LINE_LEFT )); + aDistLR.SetRight(aDistLR.GetRight() + (sal_uInt16)rParaBox.GetDistance(BOX_LINE_RIGHT)); } rSet.Put(aDistLR); - nLeftBorderDistance = static_cast< USHORT >(aDistLR.GetLeft()); - nRightBorderDistance = static_cast< USHORT >(aDistLR.GetRight()); + nLeftBorderDistance = static_cast< sal_uInt16 >(aDistLR.GetLeft()); + nRightBorderDistance = static_cast< sal_uInt16 >(aDistLR.GetRight()); } else if ( IsTabColFromDoc() || ( rSh.GetTableFmt() && !bFrmSelection && @@ -1145,13 +1154,13 @@ void SwView::StateTabWin(SfxItemSet& rSet) RES_BOX, RES_BOX, SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER, 0 ); SvxBoxInfoItem aBoxInfo( SID_ATTR_BORDER_INNER ); - aBoxInfo.SetTable(FALSE); - aBoxInfo.SetDist((BOOL) TRUE); + aBoxInfo.SetTable(sal_False); + aBoxInfo.SetDist((sal_Bool) sal_True); aCoreSet2.Put(aBoxInfo); rSh.GetTabBorders( aCoreSet2 ); const SvxBoxItem& rBox = (const SvxBoxItem&)aCoreSet2.Get(RES_BOX); - aDistLR.SetLeft((USHORT)rBox.GetDistance(BOX_LINE_LEFT )); - aDistLR.SetRight((USHORT)rBox.GetDistance(BOX_LINE_RIGHT)); + aDistLR.SetLeft((sal_uInt16)rBox.GetDistance(BOX_LINE_LEFT )); + aDistLR.SetRight((sal_uInt16)rBox.GetDistance(BOX_LINE_RIGHT)); //add the border distance of the paragraph SfxItemSet aCoreSet1( GetPool(), @@ -1159,19 +1168,19 @@ void SwView::StateTabWin(SfxItemSet& rSet) 0 ); rSh.GetCurAttr( aCoreSet1 ); const SvxBoxItem& rParaBox = (const SvxBoxItem&)aCoreSet1.Get(RES_BOX); - aDistLR.SetLeft(aDistLR.GetLeft() + (USHORT)rParaBox.GetDistance(BOX_LINE_LEFT )); - aDistLR.SetRight(aDistLR.GetRight() + (USHORT)rParaBox.GetDistance(BOX_LINE_RIGHT)); + aDistLR.SetLeft(aDistLR.GetLeft() + (sal_uInt16)rParaBox.GetDistance(BOX_LINE_LEFT )); + aDistLR.SetRight(aDistLR.GetRight() + (sal_uInt16)rParaBox.GetDistance(BOX_LINE_RIGHT)); rSet.Put(aDistLR); - nLeftBorderDistance = static_cast< USHORT >(aDistLR.GetLeft()); - nRightBorderDistance = static_cast< USHORT >(aDistLR.GetRight()); + nLeftBorderDistance = static_cast< sal_uInt16 >(aDistLR.GetLeft()); + nRightBorderDistance = static_cast< sal_uInt16 >(aDistLR.GetRight()); } else if ( !rSh.IsDirectlyInSection() ) { //get the page/header/footer border distance const SwFrmFmt& rMaster = rDesc.GetMaster(); const SvxBoxItem& rBox = (const SvxBoxItem&)rMaster.GetAttrSet().Get(RES_BOX); - aDistLR.SetLeft((USHORT)rBox.GetDistance(BOX_LINE_LEFT )); - aDistLR.SetRight((USHORT)rBox.GetDistance(BOX_LINE_RIGHT)); + aDistLR.SetLeft((sal_uInt16)rBox.GetDistance(BOX_LINE_LEFT )); + aDistLR.SetRight((sal_uInt16)rBox.GetDistance(BOX_LINE_RIGHT)); const SvxBoxItem* pBox = 0; if(nFrmType & FRMTYPE_HEADER) @@ -1191,8 +1200,8 @@ void SwView::StateTabWin(SfxItemSet& rSet) } if(pBox) { - aDistLR.SetLeft((USHORT)pBox->GetDistance(BOX_LINE_LEFT )); - aDistLR.SetRight((USHORT)pBox->GetDistance(BOX_LINE_RIGHT)); + aDistLR.SetLeft((sal_uInt16)pBox->GetDistance(BOX_LINE_LEFT )); + aDistLR.SetRight((sal_uInt16)pBox->GetDistance(BOX_LINE_RIGHT)); } //add the border distance of the paragraph @@ -1201,11 +1210,11 @@ void SwView::StateTabWin(SfxItemSet& rSet) SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER, 0 ); rSh.GetCurAttr( aCoreSetTmp ); const SvxBoxItem& rParaBox = (const SvxBoxItem&)aCoreSetTmp.Get(RES_BOX); - aDistLR.SetLeft(aDistLR.GetLeft() + (USHORT)rParaBox.GetDistance(BOX_LINE_LEFT )); - aDistLR.SetRight(aDistLR.GetRight() + (USHORT)rParaBox.GetDistance(BOX_LINE_RIGHT)); + aDistLR.SetLeft(aDistLR.GetLeft() + (sal_uInt16)rParaBox.GetDistance(BOX_LINE_LEFT )); + aDistLR.SetRight(aDistLR.GetRight() + (sal_uInt16)rParaBox.GetDistance(BOX_LINE_RIGHT)); rSet.Put(aDistLR); - nLeftBorderDistance = static_cast< USHORT >(aDistLR.GetLeft()); - nRightBorderDistance = static_cast< USHORT >(aDistLR.GetRight()); + nLeftBorderDistance = static_cast< sal_uInt16 >(aDistLR.GetLeft()); + nRightBorderDistance = static_cast< sal_uInt16 >(aDistLR.GetRight()); } } } @@ -1219,7 +1228,7 @@ void SwView::StateTabWin(SfxItemSet& rSet) rSet.DisableItem(nWhich); else { - BOOL bFlag = rSh.IsInRightToLeftText(); + sal_Bool bFlag = rSh.IsInRightToLeftText(); rSet.Put(SfxBoolItem(nWhich, bFlag)); } } @@ -1227,13 +1236,18 @@ void SwView::StateTabWin(SfxItemSet& rSet) case SID_RULER_BORDERS_VERTICAL: case SID_RULER_BORDERS: { - BOOL bFrameRTL; - BOOL bFrameHasVerticalColumns = rSh.IsFrmVertical(FALSE, bFrameRTL) && bFrmSelection; - BOOL bHasTable = ( IsTabColFromDoc() || + sal_Bool bFrameHasVerticalColumns(sal_False); + { + sal_Bool bFrameRTL; + sal_Bool bFrameVertL2R; + bFrameHasVerticalColumns = rSh.IsFrmVertical(sal_False, bFrameRTL, bFrameVertL2R) && + bFrmSelection; + } + sal_Bool bHasTable = ( IsTabColFromDoc() || ( rSh.GetTableFmt() && !bFrmSelection && !(nFrmType & FRMTYPE_COLSECT ) ) ); - BOOL bTableVertical = bHasTable && rSh.IsTableVertical(); + sal_Bool bTableVertical = bHasTable && rSh.IsTableVertical(); if(((SID_RULER_BORDERS_VERTICAL == nWhich) && ((bHasTable && !bTableVertical) || @@ -1246,7 +1260,7 @@ void SwView::StateTabWin(SfxItemSet& rSet) else if ( bHasTable ) { SwTabCols aTabCols; - USHORT nNum; + sal_uInt16 nNum; if ( 0 != ( bSetTabColFromDoc = IsTabColFromDoc() ) ) { rSh.GetMouseTabCols( aTabCols, aTabColFromDocPos ); @@ -1262,47 +1276,47 @@ void SwView::StateTabWin(SfxItemSet& rSet) OSL_ENSURE(nNum <= aTabCols.Count(), "TabCol not found"); const int nLft = aTabCols.GetLeftMin() + aTabCols.GetLeft(); - const int nRgt = (USHORT)(bTableVertical ? nPageHeight : nPageWidth) - + const int nRgt = (sal_uInt16)(bTableVertical ? nPageHeight : nPageWidth) - (aTabCols.GetLeftMin() + aTabCols.GetRight()); - const USHORT nL = static_cast< USHORT >(nLft > 0 ? nLft : 0); - const USHORT nR = static_cast< USHORT >(nRgt > 0 ? nRgt : 0); + const sal_uInt16 nL = static_cast< sal_uInt16 >(nLft > 0 ? nLft : 0); + const sal_uInt16 nR = static_cast< sal_uInt16 >(nRgt > 0 ? nRgt : 0); SvxColumnItem aColItem(nNum, nL, nR); - USHORT nStart = 0, + sal_uInt16 nStart = 0, nEnd; //columns in right-to-left tables need to be mirrored - BOOL bIsTableRTL = + sal_Bool bIsTableRTL = IsTabColFromDoc() ? rSh.IsMouseTableRightToLeft(aTabColFromDocPos) : rSh.IsTableRightToLeft(); if(bIsTableRTL) { - for ( USHORT i = aTabCols.Count(); i ; --i ) + for ( sal_uInt16 i = aTabCols.Count(); i ; --i ) { const SwTabColsEntry& rEntry = aTabCols.GetEntry( i - 1 ); - nEnd = (USHORT)aTabCols.GetRight(); - nEnd = nEnd - (USHORT)rEntry.nPos; + nEnd = (sal_uInt16)aTabCols.GetRight(); + nEnd = nEnd - (sal_uInt16)rEntry.nPos; SvxColumnDescription aColDesc( nStart, nEnd, - (USHORT(aTabCols.GetRight() - rEntry.nMax)), - (USHORT(aTabCols.GetRight() - rEntry.nMin)), + (sal_uInt16(aTabCols.GetRight() - rEntry.nMax)), + (sal_uInt16(aTabCols.GetRight() - rEntry.nMin)), !aTabCols.IsHidden(i - 1) ); aColItem.Append(aColDesc); nStart = nEnd; } SvxColumnDescription aColDesc(nStart, - aTabCols.GetRight() - aTabCols.GetLeft(), TRUE); + aTabCols.GetRight() - aTabCols.GetLeft(), sal_True); aColItem.Append(aColDesc); } else { - for ( USHORT i = 0; i < aTabCols.Count(); ++i ) + for ( sal_uInt16 i = 0; i < aTabCols.Count(); ++i ) { const SwTabColsEntry& rEntry = aTabCols.GetEntry( i ); - nEnd = static_cast< USHORT >(rEntry.nPos - aTabCols.GetLeft()); + nEnd = static_cast< sal_uInt16 >(rEntry.nPos - aTabCols.GetLeft()); SvxColumnDescription aColDesc( nStart, nEnd, rEntry.nMin - aTabCols.GetLeft(), rEntry.nMax - aTabCols.GetLeft(), !aTabCols.IsHidden(i) ); @@ -1311,7 +1325,7 @@ void SwView::StateTabWin(SfxItemSet& rSet) } SvxColumnDescription aColDesc(nStart, aTabCols.GetRight() - aTabCols.GetLeft(), 0, 0, - TRUE); + sal_True); aColItem.Append(aColDesc); } rSet.Put(aColItem, nWhich); @@ -1319,7 +1333,7 @@ void SwView::StateTabWin(SfxItemSet& rSet) else if ( bFrmSelection || nFrmType & ( FRMTYPE_COLUMN | FRMTYPE_COLSECT ) ) { // Aus Rahmen oder Seite ? - USHORT nNum = 0; + sal_uInt16 nNum = 0; if(bFrmSelection) { const SwFrmFmt* pFmt = rSh.GetFlyFrmFmt(); @@ -1334,7 +1348,7 @@ void SwView::StateTabWin(SfxItemSet& rSet) !bFrmSelection && nFrmType & FRMTYPE_COLSECT ) { - const SwSection *pSect = rSh.GetAnySection(FALSE, pPt); + const SwSection *pSect = rSh.GetAnySection(sal_False, pPt); OSL_ENSURE( pSect, "Which section?"); if( pSect ) { @@ -1348,14 +1362,14 @@ void SwView::StateTabWin(SfxItemSet& rSet) SwRect aRect = rSh.GetAnyCurRect(RECT_SECTION_PRT, pPt); const SwRect aTmpRect = rSh.GetAnyCurRect(RECT_SECTION, pPt); - ::lcl_FillSvxColumn(rCol, USHORT(bVerticalWriting ? aRect.Height() : aRect.Width()), aColItem, 0); + ::lcl_FillSvxColumn(rCol, sal_uInt16(bVerticalWriting ? aRect.Height() : aRect.Width()), aColItem, 0); if(bVerticalWriting) { aRect.Pos() += Point(aTmpRect.Left(), aTmpRect.Top()); aRect.Pos().Y() -= rPageRect.Top(); - aColItem.SetLeft ((USHORT)(aRect.Top())); - aColItem.SetRight((USHORT)(nPageHeight - aRect.Bottom() )); + aColItem.SetLeft ((sal_uInt16)(aRect.Top())); + aColItem.SetRight((sal_uInt16)(nPageHeight - aRect.Bottom() )); } else { @@ -1363,8 +1377,8 @@ void SwView::StateTabWin(SfxItemSet& rSet) // PAGES01 // make relative to page position: - aColItem.SetLeft ((USHORT)( aRect.Left() - rPageRect.Left() )); - aColItem.SetRight((USHORT)( rPageRect.Right() - aRect.Right())); + aColItem.SetLeft ((sal_uInt16)( aRect.Left() - rPageRect.Left() )); + aColItem.SetRight((sal_uInt16)( rPageRect.Right() - aRect.Right())); } aColItem.SetOrtho(aColItem.CalcOrtho()); @@ -1386,24 +1400,24 @@ void SwView::StateTabWin(SfxItemSet& rSet) SvxColumnItem aColItem(nNum); const SwRect &rSizeRect = rSh.GetAnyCurRect(RECT_FLY_PRT_EMBEDDED, pPt); - BOOL bUseVertical = bFrameHasVerticalColumns || (!bFrmSelection && bVerticalWriting); + sal_Bool bUseVertical = bFrameHasVerticalColumns || (!bFrmSelection && bVerticalWriting); const long lWidth = bUseVertical ? rSizeRect.Height() : rSizeRect.Width(); const SwRect &rRect = rSh.GetAnyCurRect(RECT_FLY_EMBEDDED, pPt); long nDist2 = ((bUseVertical ? rRect.Height() : rRect.Width()) - lWidth) /2; - ::lcl_FillSvxColumn(rCol, USHORT(lWidth), aColItem, nDist2); + ::lcl_FillSvxColumn(rCol, sal_uInt16(lWidth), aColItem, nDist2); SfxItemSet aFrameSet(GetPool(), RES_LR_SPACE, RES_LR_SPACE); rSh.GetFlyFrmAttr( aFrameSet ); if(bUseVertical) { - aColItem.SetLeft ((USHORT)(rRect.Top()- rPageRect.Top())); - aColItem.SetRight((USHORT)(nPageHeight + rPageRect.Top() - rRect.Bottom() )); + aColItem.SetLeft ((sal_uInt16)(rRect.Top()- rPageRect.Top())); + aColItem.SetRight((sal_uInt16)(nPageHeight + rPageRect.Top() - rRect.Bottom() )); } else { - aColItem.SetLeft ((USHORT)(rRect.Left() - rPageRect.Left() )); - aColItem.SetRight((USHORT)(rPageRect.Right() - rRect.Right() )); + aColItem.SetLeft ((sal_uInt16)(rRect.Left() - rPageRect.Left() )); + aColItem.SetRight((sal_uInt16)(rPageRect.Right() - rRect.Right() )); } aColItem.SetOrtho(aColItem.CalcOrtho()); @@ -1427,13 +1441,13 @@ void SwView::StateTabWin(SfxItemSet& rSet) const SvxBoxItem& rBox = (const SvxBoxItem&)rMaster.GetFmtAttr(RES_BOX); long nDist = rBox.GetDistance(); ::lcl_FillSvxColumn(aCol, - USHORT(bVerticalWriting ? aPrtRect.Height() : aPrtRect.Width() ), + sal_uInt16(bVerticalWriting ? aPrtRect.Height() : aPrtRect.Width() ), aColItem, nDist); if(bBrowse) { - aColItem.SetLeft((USHORT)rPagePrtRect.Left()); - aColItem.SetRight(USHORT(nPageWidth - rPagePrtRect.Right())); + aColItem.SetLeft((sal_uInt16)rPagePrtRect.Left()); + aColItem.SetRight(sal_uInt16(nPageWidth - rPagePrtRect.Right())); } else { @@ -1452,8 +1466,13 @@ void SwView::StateTabWin(SfxItemSet& rSet) case SID_RULER_ROWS : case SID_RULER_ROWS_VERTICAL: { - BOOL bFrameRTL; - BOOL bFrameHasVerticalColumns = rSh.IsFrmVertical(FALSE, bFrameRTL) && bFrmSelection; + sal_Bool bFrameHasVerticalColumns(sal_False); + { + sal_Bool bFrameRTL; + sal_Bool bFrameVertL2R; + bFrameHasVerticalColumns = rSh.IsFrmVertical(sal_False, bFrameRTL, bFrameVertL2R) && + bFrmSelection; + } if(((SID_RULER_ROWS == nWhich) && ((!bVerticalWriting && !bFrmSelection) || (bFrmSelection && !bFrameHasVerticalColumns))) || @@ -1466,7 +1485,7 @@ void SwView::StateTabWin(SfxItemSet& rSet) { SwTabCols aTabCols; //no current value necessary - USHORT nNum = 0; + sal_uInt16 nNum = 0; if ( 0 != ( bSetTabRowFromDoc = IsTabRowFromDoc() ) ) { rSh.GetMouseTabRows( aTabCols, aTabColFromDocPos ); @@ -1477,24 +1496,24 @@ void SwView::StateTabWin(SfxItemSet& rSet) } const int nLft = aTabCols.GetLeftMin(); - const int nRgt = (USHORT)(bVerticalWriting ? nPageWidth : nPageHeight) - + const int nRgt = (sal_uInt16)(bVerticalWriting ? nPageWidth : nPageHeight) - (aTabCols.GetLeftMin() + aTabCols.GetRight()); - const USHORT nL = static_cast< USHORT >(nLft > 0 ? nLft : 0); - const USHORT nR = static_cast< USHORT >(nRgt > 0 ? nRgt : 0); + const sal_uInt16 nL = static_cast< sal_uInt16 >(nLft > 0 ? nLft : 0); + const sal_uInt16 nR = static_cast< sal_uInt16 >(nRgt > 0 ? nRgt : 0); SvxColumnItem aColItem(nNum, nL, nR); - USHORT nStart = 0, + sal_uInt16 nStart = 0, nEnd; - for ( USHORT i = 0; i < aTabCols.Count(); ++i ) + for ( sal_uInt16 i = 0; i < aTabCols.Count(); ++i ) { const SwTabColsEntry& rEntry = aTabCols.GetEntry( i ); if(bVerticalWriting) { - nEnd = USHORT(aTabCols.GetRight() - rEntry.nPos); + nEnd = sal_uInt16(aTabCols.GetRight() - rEntry.nPos); SvxColumnDescription aColDesc( nStart, nEnd, aTabCols.GetRight() - rEntry.nMax, aTabCols.GetRight() - rEntry.nMin, !aTabCols.IsHidden(i) ); @@ -1502,18 +1521,18 @@ void SwView::StateTabWin(SfxItemSet& rSet) } else { - nEnd = USHORT(rEntry.nPos - aTabCols.GetLeft()); + nEnd = sal_uInt16(rEntry.nPos - aTabCols.GetLeft()); SvxColumnDescription aColDesc( nStart, nEnd, - USHORT(rEntry.nMin - aTabCols.GetLeft()), USHORT(rEntry.nMax - aTabCols.GetLeft()), + sal_uInt16(rEntry.nMin - aTabCols.GetLeft()), sal_uInt16(rEntry.nMax - aTabCols.GetLeft()), !aTabCols.IsHidden(i) ); aColItem.Append(aColDesc); } nStart = nEnd; } if(bVerticalWriting) - nEnd = static_cast< USHORT >(aTabCols.GetRight()); + nEnd = static_cast< sal_uInt16 >(aTabCols.GetRight()); else - nEnd = static_cast< USHORT >(aTabCols.GetLeft()); + nEnd = static_cast< sal_uInt16 >(aTabCols.GetLeft()); // put a position protection when the last row cannot be moved // due to a page break inside of a row if(!aTabCols.IsLastRowAllowedToChange()) @@ -1521,7 +1540,7 @@ void SwView::StateTabWin(SfxItemSet& rSet) SvxColumnDescription aColDesc( nStart, nEnd, aTabCols.GetRight(), aTabCols.GetRight(), - FALSE ); + sal_False ); aColItem.Append(aColDesc); rSet.Put(aColItem, nWhich); @@ -1547,15 +1566,15 @@ void SwView::StateTabWin(SfxItemSet& rSet) { if( nFrmType & FRMTYPE_TABLE ) { - const USHORT nNum = rSh.GetCurTabColNum(); + const sal_uInt16 nNum = rSh.GetCurTabColNum(); SwTabCols aTabCols; rSh.GetTabCols( aTabCols ); const int nLft = aTabCols.GetLeftMin() + aTabCols.GetLeft(); - const int nRgt = (USHORT)nPageWidth -(aTabCols.GetLeftMin() + aTabCols.GetRight()); + const int nRgt = (sal_uInt16)nPageWidth -(aTabCols.GetLeftMin() + aTabCols.GetRight()); - const USHORT nL = static_cast< USHORT >(nLft > 0 ? nLft : 0); - const USHORT nR = static_cast< USHORT >(nRgt > 0 ? nRgt : 0); + const sal_uInt16 nL = static_cast< sal_uInt16 >(nLft > 0 ? nLft : 0); + const sal_uInt16 nR = static_cast< sal_uInt16 >(nRgt > 0 ? nRgt : 0); aRectangle.Left() = nL; if(nNum > 1) @@ -1576,8 +1595,8 @@ void SwView::StateTabWin(SfxItemSet& rSet) const SwFmtCol* pCols = pFmt ? &pFmt->GetCol(): &rDesc.GetMaster().GetCol(); const SwColumns& rCols = pCols->GetColumns(); - USHORT nNum = rSh.GetCurOutColNum(); - USHORT nCount = Min(USHORT(nNum + 1), rCols.Count()); + sal_uInt16 nNum = rSh.GetCurOutColNum(); + sal_uInt16 nCount = Min(sal_uInt16(nNum + 1), rCols.Count()); const SwRect aRect( rSh.GetAnyCurRect( pFmt ? RECT_FLY_PRT_EMBEDDED : RECT_PAGE_PRT, pPt )); @@ -1586,14 +1605,14 @@ void SwView::StateTabWin(SfxItemSet& rSet) : RECT_PAGE, pPt )); //die Breite im Rahmen bzw. innerhalbe der Seitenraender - const USHORT nTotalWidth = (USHORT)aRect.Width(); + const sal_uInt16 nTotalWidth = (sal_uInt16)aRect.Width(); //die gesamte Rahmenbreite - die Differenz ist der doppelte Abstand zum Rand - const USHORT nOuterWidth = (USHORT)aAbsRect.Width(); + const sal_uInt16 nOuterWidth = (sal_uInt16)aAbsRect.Width(); int nWidth = 0, nStart = 0, nEnd = 0; aRectangle.Left() = 0; - for ( USHORT i = 0; i < nCount; ++i ) + for ( sal_uInt16 i = 0; i < nCount; ++i ) { SwColumn* pCol = rCols[i]; nStart = pCol->GetLeft() + nWidth; @@ -1635,13 +1654,13 @@ void SwView::StateTabWin(SfxItemSet& rSet) else if ( ((nFrmType & FRMTYPE_TABLE) || IsTabColFromDoc()) && !bFrmSelection ) { - BOOL bColumn; + sal_Bool bColumn; if ( IsTabColFromDoc() ) bColumn = rSh.GetCurMouseColNum( aTabColFromDocPos ) != 0; else bColumn = (nFrmType & (FRMTYPE_COLUMN|FRMTYPE_FLY_ANY| FRMTYPE_COLSECTOUTTAB)) ? - TRUE : FALSE; + sal_True : sal_False; if ( !bColumn ) { if( nFrmType & FRMTYPE_FLY_ANY && IsTabColFromDoc() ) @@ -1667,16 +1686,16 @@ void SwView::StateTabWin(SfxItemSet& rSet) } else { //hier nur fuer Tabelle in mehrspaltigen Seiten und Rahmen - BOOL bSectOutTbl = (nFrmType & FRMTYPE_TABLE) ? TRUE : FALSE; - BOOL bFrame = (nFrmType & FRMTYPE_FLY_ANY) ? TRUE : FALSE; - BOOL bColSct = (nFrmType & ( bSectOutTbl + sal_Bool bSectOutTbl = (nFrmType & FRMTYPE_TABLE) ? sal_True : sal_False; + sal_Bool bFrame = (nFrmType & FRMTYPE_FLY_ANY) ? sal_True : sal_False; + sal_Bool bColSct = (nFrmType & ( bSectOutTbl ? FRMTYPE_COLSECTOUTTAB : FRMTYPE_COLSECT ) - ) ? TRUE : FALSE; + ) ? sal_True : sal_False; //Damit man auch mit der Mouse ziehen kann, //ohne in der Tabelle zu stehen CurRectType eRecType = RECT_PAGE_PRT; - USHORT nNum = IsTabColFromDoc() ? + sal_uInt16 nNum = IsTabColFromDoc() ? rSh.GetCurMouseColNum( aTabColFromDocPos ): rSh.GetCurOutColNum(); const SwFrmFmt* pFmt = NULL; @@ -1697,7 +1716,7 @@ void SwView::StateTabWin(SfxItemSet& rSet) const SwFmtCol* pCols = pFmt ? &pFmt->GetCol(): &rDesc.GetMaster().GetCol(); const SwColumns& rCols = pCols->GetColumns(); - const USHORT nBorder = pFmt ? pFmt->GetBox().GetDistance() : + const sal_uInt16 nBorder = pFmt ? pFmt->GetBox().GetDistance() : rDesc.GetMaster().GetBox().GetDistance(); /* RECT_FLY_PRT_EMBEDDED returns the relative position to @@ -1709,7 +1728,7 @@ void SwView::StateTabWin(SfxItemSet& rSet) aRect.Pos() += rSh.GetAnyCurRect( RECT_FLY_EMBEDDED, pPt ).Pos(); - const USHORT nTotalWidth = (USHORT)aRect.Width(); + const sal_uInt16 nTotalWidth = (sal_uInt16)aRect.Width(); //nStart und nEnd initialisieren fuer nNum == 0 int nWidth = 0, nStart = 0, @@ -1721,7 +1740,7 @@ void SwView::StateTabWin(SfxItemSet& rSet) nNum = rCols.Count(); } - for( USHORT i = 0; i < nNum; ++i ) + for( sal_uInt16 i = 0; i < nNum; ++i ) { SwColumn* pCol = rCols[i]; nStart = pCol->GetLeft() + nWidth; @@ -1767,7 +1786,7 @@ void SwView::StateTabWin(SfxItemSet& rSet) { if(bFrmSelection) { - BYTE nProtect = pWrtShell->IsSelObjProtected( FLYPROTECT_SIZE|FLYPROTECT_POS|FLYPROTECT_CONTENT ); + sal_uInt8 nProtect = pWrtShell->IsSelObjProtected( FLYPROTECT_SIZE|FLYPROTECT_POS|FLYPROTECT_CONTENT ); SvxProtectItem aProt(SID_RULER_PROTECT); aProt.SetCntntProtect((nProtect & FLYPROTECT_CONTENT) != 0); @@ -1780,8 +1799,8 @@ void SwView::StateTabWin(SfxItemSet& rSet) SvxProtectItem aProtect(SID_RULER_PROTECT); if(bBrowse && !(nFrmType & (FRMTYPE_DRAWOBJ|FRMTYPE_COLUMN)) && !rSh.GetTableFmt()) { - aProtect.SetSizeProtect(TRUE); - aProtect.SetPosProtect(TRUE); + aProtect.SetSizeProtect(sal_True); + aProtect.SetPosProtect(sal_True); } rSet.Put(aProtect); } @@ -1793,7 +1812,7 @@ void SwView::StateTabWin(SfxItemSet& rSet) if(bPutContentProtection) { SvxProtectItem aProtect(SID_RULER_PROTECT); - aProtect.SetCntntProtect(TRUE); + aProtect.SetCntntProtect(sal_True); rSet.Put(aProtect); } } diff --git a/sw/source/ui/uno/SwXDocumentSettings.cxx b/sw/source/ui/uno/SwXDocumentSettings.cxx index 71c73a71c4..639d0bd67d 100644 --- a/sw/source/ui/uno/SwXDocumentSettings.cxx +++ b/sw/source/ui/uno/SwXDocumentSettings.cxx @@ -32,7 +32,6 @@ #include <osl/mutex.hxx> #include <sfx2/sfxbasecontroller.hxx> #include <SwXDocumentSettings.hxx> -#include <SwXPrintPreviewSettings.hxx> #include <comphelper/MasterPropertySetInfo.hxx> #include <com/sun/star/beans/PropertyAttribute.hpp> #include <com/sun/star/i18n/XForbiddenCharacters.hpp> @@ -121,6 +120,7 @@ enum SwDocumentSettingsPropertyHandles HANDLE_TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST, // <-- HANDLE_MODIFYPASSWORDINFO, + HANDLE_MATH_BASELINE_ALIGNMENT, HANDLE_INVERT_BORDER_SPACING, HANDLE_COLLAPSE_EMPTY_CELL_PARA }; @@ -177,6 +177,7 @@ MasterPropertySetInfo * lcl_createSettingsInfo() // --> OD 2008-06-05 #i89181# { RTL_CONSTASCII_STRINGPARAM("TabAtLeftIndentForParagraphsInList"), HANDLE_TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST, CPPUTYPE_BOOLEAN, 0, 0}, { RTL_CONSTASCII_STRINGPARAM("ModifyPasswordInfo"), HANDLE_MODIFYPASSWORDINFO, CPPUTYPE_PROPERTYVALUE, 0, 0}, + { RTL_CONSTASCII_STRINGPARAM("MathBaselineAlignment"), HANDLE_MATH_BASELINE_ALIGNMENT, CPPUTYPE_BOOLEAN, 0, 0}, { RTL_CONSTASCII_STRINGPARAM("InvertBorderSpacing"), HANDLE_INVERT_BORDER_SPACING, CPPUTYPE_BOOLEAN, 0, 0}, { RTL_CONSTASCII_STRINGPARAM("CollapseEmptyCellPara"), HANDLE_COLLAPSE_EMPTY_CELL_PARA, CPPUTYPE_BOOLEAN, 0, 0}, /* @@ -220,7 +221,6 @@ SwXDocumentSettings::SwXDocumentSettings ( SwXTextDocument * pModel ) , mpPrinter( NULL ) { registerSlave ( new SwXPrintSettings ( PRINT_SETTINGS_DOCUMENT, mpModel->GetDocShell()->GetDoc() ) ); - registerSlave ( new SwXPrintPreviewSettings ( mpModel->GetDocShell()->GetDoc() ) ); } SwXDocumentSettings::~SwXDocumentSettings() @@ -687,12 +687,18 @@ void SwXDocumentSettings::_setSingleValue( const comphelper::PropertyInfo & rInf uno::Reference< uno::XInterface >() ); } break; - case HANDLE_INVERT_BORDER_SPACING: - { + case HANDLE_MATH_BASELINE_ALIGNMENT: + { + sal_Bool bTmp = *(sal_Bool*)rValue.getValue(); + mpDoc->set( IDocumentSettingAccess::MATH_BASELINE_ALIGNMENT, bTmp ); + } + break; + case HANDLE_INVERT_BORDER_SPACING: + { sal_Bool bTmp = *(sal_Bool*)rValue.getValue(); mpDoc->set(IDocumentSettingAccess::INVERT_BORDER_SPACING, bTmp); - } - break; + } + break; case HANDLE_COLLAPSE_EMPTY_CELL_PARA: { sal_Bool bTmp = *(sal_Bool*)rValue.getValue(); @@ -713,11 +719,7 @@ void SwXDocumentSettings::_postSetValues () // #i86352# the printer is also used as container for options by sfx // when setting a printer it should have decent default options SfxItemSet aOptions( mpPrinter->GetOptions() ); - SwPrintData aPrtData; - if( mpDoc->getPrintData() ) - aPrtData = *mpDoc->getPrintData(); - else - aPrtData = *SW_MOD()->GetPrtOptions(false); + SwPrintData aPrtData( mpDoc->getPrintData() ); SwAddPrinterItem aAddPrinterItem (FN_PARAM_ADDPRINTER, aPrtData); aOptions.Put(aAddPrinterItem); mpPrinter->SetOptions( aOptions ); @@ -758,14 +760,14 @@ void SwXDocumentSettings::_getSingleValue( const comphelper::PropertyInfo & rInf case HANDLE_FIELD_AUTO_UPDATE: { SwFldUpdateFlags nFlags = mpDoc->getFieldUpdateFlags(true); - BOOL bFieldUpd = (nFlags == AUTOUPD_FIELD_ONLY || nFlags == AUTOUPD_FIELD_AND_CHARTS ); + sal_Bool bFieldUpd = (nFlags == AUTOUPD_FIELD_ONLY || nFlags == AUTOUPD_FIELD_AND_CHARTS ); rValue.setValue(&bFieldUpd, ::getBooleanCppuType()); } break; case HANDLE_CHART_AUTO_UPDATE: { SwFldUpdateFlags nFlags = mpDoc->getFieldUpdateFlags(true); - BOOL bChartUpd = nFlags == AUTOUPD_FIELD_AND_CHARTS; + sal_Bool bChartUpd = nFlags == AUTOUPD_FIELD_AND_CHARTS; rValue.setValue(&bChartUpd, ::getBooleanCppuType()); } break; @@ -1030,6 +1032,12 @@ void SwXDocumentSettings::_getSingleValue( const comphelper::PropertyInfo & rInf rValue <<= mpDocSh->GetModifyPasswordInfo(); } break; + case HANDLE_MATH_BASELINE_ALIGNMENT: + { + sal_Bool bTmp = mpDoc->get( IDocumentSettingAccess::MATH_BASELINE_ALIGNMENT ); + rValue.setValue( &bTmp, ::getBooleanCppuType() ); + } + break; case HANDLE_INVERT_BORDER_SPACING: { sal_Bool bTmp = mpDoc->get(IDocumentSettingAccess::INVERT_BORDER_SPACING); diff --git a/sw/source/ui/uno/SwXPrintPreviewSettings.cxx b/sw/source/ui/uno/SwXPrintPreviewSettings.cxx deleted file mode 100644 index 4c98e0692a..0000000000 --- a/sw/source/ui/uno/SwXPrintPreviewSettings.cxx +++ /dev/null @@ -1,370 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_sw.hxx" -#include <SwXPrintPreviewSettings.hxx> -#include <comphelper/ChainablePropertySetInfo.hxx> -#include <pvprtdat.hxx> -#include <swtypes.hxx> -#include <com/sun/star/beans/PropertyAttribute.hpp> -#include <doc.hxx> -#include <vcl/svapp.hxx> -using namespace ::com::sun::star; -using namespace ::com::sun::star::uno; -using namespace ::com::sun::star::beans; -using namespace ::com::sun::star::lang; -using namespace ::comphelper; -using ::rtl::OUString; - -enum SwPrintSettingsPropertyHandles -{ - HANDLE_PRINTSET_PREVIEW_LEFT_MARGIN, - HANDLE_PRINTSET_PREVIEW_RIGHT_MARGIN, - HANDLE_PRINTSET_PREVIEW_TOP_MARGIN, - HANDLE_PRINTSET_PREVIEW_BOTTOM_MARGIN, - HANDLE_PRINTSET_PREVIEW_HORIZONTAL_SPACING, - HANDLE_PRINTSET_PREVIEW_VERTICAL_SPACING, - HANDLE_PRINTSET_PREVIEW_NUM_ROWS, - HANDLE_PRINTSET_PREVIEW_NUM_COLUMNS, - HANDLE_PRINTSET_PREVIEW_LANDSCAPE -}; - -static ChainablePropertySetInfo * lcl_createPrintPreviewSettingsInfo() -{ - static PropertyInfo aPrintPreviewSettingsMap_Impl[] = - { - { RTL_CONSTASCII_STRINGPARAM ( "PreviewPrintLeftMargin" ), HANDLE_PRINTSET_PREVIEW_LEFT_MARGIN, CPPUTYPE_INT32, PropertyAttribute::MAYBEVOID, 0 }, - { RTL_CONSTASCII_STRINGPARAM ( "PreviewPrintRightMargin" ), HANDLE_PRINTSET_PREVIEW_RIGHT_MARGIN, CPPUTYPE_INT32, PropertyAttribute::MAYBEVOID, 0 }, - { RTL_CONSTASCII_STRINGPARAM ( "PreviewPrintTopMargin" ), HANDLE_PRINTSET_PREVIEW_TOP_MARGIN, CPPUTYPE_INT32, PropertyAttribute::MAYBEVOID, 0 }, - { RTL_CONSTASCII_STRINGPARAM ( "PreviewPrintBottomMargin" ),HANDLE_PRINTSET_PREVIEW_BOTTOM_MARGIN, CPPUTYPE_INT32, PropertyAttribute::MAYBEVOID, 0 }, - { RTL_CONSTASCII_STRINGPARAM ( "PreviewPrintHorizontalSpacing" ),HANDLE_PRINTSET_PREVIEW_HORIZONTAL_SPACING, CPPUTYPE_INT32, PropertyAttribute::MAYBEVOID, 0 }, - { RTL_CONSTASCII_STRINGPARAM ( "PreviewPrintVerticalSpacing" ), HANDLE_PRINTSET_PREVIEW_VERTICAL_SPACING, CPPUTYPE_INT32, PropertyAttribute::MAYBEVOID, 0 }, - { RTL_CONSTASCII_STRINGPARAM ( "PreviewPrintNumRows" ), HANDLE_PRINTSET_PREVIEW_NUM_ROWS, CPPUTYPE_INT8, PropertyAttribute::MAYBEVOID, 0 }, - { RTL_CONSTASCII_STRINGPARAM ( "PreviewPrintNumColumns" ), HANDLE_PRINTSET_PREVIEW_NUM_COLUMNS, CPPUTYPE_INT8, PropertyAttribute::MAYBEVOID, 0 }, - { RTL_CONSTASCII_STRINGPARAM ( "PreviewPrintLandscape" ), HANDLE_PRINTSET_PREVIEW_LANDSCAPE, CPPUTYPE_BOOLEAN, PropertyAttribute::MAYBEVOID, 0 }, - { 0, 0, 0, CPPUTYPE_UNKNOWN, 0, 0 } - }; - return new ChainablePropertySetInfo ( aPrintPreviewSettingsMap_Impl ); -} - -SwXPrintPreviewSettings::SwXPrintPreviewSettings( SwDoc *pDoc) -: ChainablePropertySet ( lcl_createPrintPreviewSettingsInfo (), &Application::GetSolarMutex() ) -, mbPreviewDataChanged( sal_False ) -, mpDoc( pDoc) -{ -} - -SwXPrintPreviewSettings::~SwXPrintPreviewSettings() - throw() -{ -} - -Any SAL_CALL SwXPrintPreviewSettings::queryInterface( const Type& rType ) - throw(RuntimeException) -{ - return ::cppu::queryInterface ( rType , - // OWeakObject interfaces - dynamic_cast< XInterface* >( dynamic_cast< OWeakObject* >(this) ) , - dynamic_cast< XWeak* >( this ) , - // my own interfaces - dynamic_cast< XServiceInfo* >( this ) , - dynamic_cast< XPropertySet* >( this ) , - dynamic_cast< XMultiPropertySet* >( this ) ); -} - -void SwXPrintPreviewSettings::acquire () - throw () -{ - OWeakObject::acquire(); -} - -void SwXPrintPreviewSettings::release () - throw () -{ - OWeakObject::release(); -} - -void SwXPrintPreviewSettings::_preSetValues () - throw(UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException ) -{ - if ( mpDoc ) - { - const SwPagePreViewPrtData *pConstPrtData = mpDoc->GetPreViewPrtData(); - mpPreViewData = new SwPagePreViewPrtData; - if ( pConstPrtData ) - { - mpPreViewData->SetLeftSpace ( pConstPrtData->GetLeftSpace() ); - mpPreViewData->SetRightSpace ( pConstPrtData->GetRightSpace() ); - mpPreViewData->SetTopSpace ( pConstPrtData->GetTopSpace() ); - mpPreViewData->SetBottomSpace ( pConstPrtData->GetBottomSpace() ); - mpPreViewData->SetHorzSpace ( pConstPrtData->GetHorzSpace() ); - mpPreViewData->SetVertSpace ( pConstPrtData->GetVertSpace() ); - mpPreViewData->SetRow ( pConstPrtData->GetRow() ); - mpPreViewData->SetCol ( pConstPrtData->GetCol() ); - mpPreViewData->SetLandscape ( pConstPrtData->GetLandscape() ); - } - } -} - -void SwXPrintPreviewSettings::_setSingleValue( const comphelper::PropertyInfo & rInfo, const uno::Any &rValue ) - throw(UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException ) -{ - switch( rInfo.mnHandle ) - { - case HANDLE_PRINTSET_PREVIEW_LEFT_MARGIN: - { - sal_Int32 nVal = 0; - rValue >>= nVal; - nVal = MM100_TO_TWIP( nVal ); - if ( nVal != static_cast < sal_Int32 > (mpPreViewData->GetLeftSpace() ) ) - { - mbPreviewDataChanged = sal_True; - mpPreViewData->SetLeftSpace( nVal ); - } - } - break; - case HANDLE_PRINTSET_PREVIEW_RIGHT_MARGIN: - { - sal_Int32 nVal = 0; - rValue >>= nVal; - nVal = MM100_TO_TWIP( nVal ); - if ( nVal != static_cast < sal_Int32 > (mpPreViewData->GetRightSpace() ) ) - { - mbPreviewDataChanged = sal_True; - mpPreViewData->SetRightSpace( nVal ); - } - } - break; - case HANDLE_PRINTSET_PREVIEW_TOP_MARGIN: - { - sal_Int32 nVal = 0; - rValue >>= nVal; - nVal = MM100_TO_TWIP( nVal ); - if ( nVal != static_cast < sal_Int32 > ( mpPreViewData->GetTopSpace() ) ) - { - mbPreviewDataChanged = sal_True; - mpPreViewData->SetTopSpace( nVal ); - } - } - break; - case HANDLE_PRINTSET_PREVIEW_BOTTOM_MARGIN: - { - sal_Int32 nVal = 0; - rValue >>= nVal; - nVal = MM100_TO_TWIP( nVal ); - if ( nVal != static_cast < sal_Int32 > ( mpPreViewData->GetBottomSpace() ) ) - { - mbPreviewDataChanged = sal_True; - mpPreViewData->SetBottomSpace( nVal ); - } - } - break; - case HANDLE_PRINTSET_PREVIEW_HORIZONTAL_SPACING: - { - sal_Int32 nVal = 0; - rValue >>= nVal; - nVal = MM100_TO_TWIP( nVal ); - if ( nVal != static_cast < sal_Int32 > ( mpPreViewData->GetHorzSpace() ) ) - { - mbPreviewDataChanged = sal_True; - mpPreViewData->SetHorzSpace( nVal ); - } - } - break; - case HANDLE_PRINTSET_PREVIEW_VERTICAL_SPACING: - { - sal_Int32 nVal = 0; - rValue >>= nVal; - nVal = MM100_TO_TWIP( nVal ); - if ( nVal != static_cast < sal_Int32 > ( mpPreViewData->GetVertSpace() ) ) - { - mbPreviewDataChanged = sal_True; - mpPreViewData->SetVertSpace( nVal ); - } - } - break; - case HANDLE_PRINTSET_PREVIEW_NUM_ROWS: - { - sal_Int8 nVal = 0; - rValue >>= nVal; - if ( nVal != mpPreViewData->GetRow() ) - { - mbPreviewDataChanged = sal_True; - mpPreViewData->SetRow( nVal ); - } - } - break; - case HANDLE_PRINTSET_PREVIEW_NUM_COLUMNS: - { - sal_Int8 nVal = 0; - rValue >>= nVal; - if ( nVal != mpPreViewData->GetCol() ) - { - mbPreviewDataChanged = sal_True; - mpPreViewData->SetCol( nVal ); - } - } - break; - case HANDLE_PRINTSET_PREVIEW_LANDSCAPE: - { - sal_Bool bVal = *(sal_Bool*)rValue.getValue(); - if ( bVal != mpPreViewData->GetLandscape() ) - { - mbPreviewDataChanged = sal_True; - mpPreViewData->SetLandscape ( bVal ); - } - } - break; - default: - throw UnknownPropertyException(); - } -} - -void SwXPrintPreviewSettings::_postSetValues () - throw(UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException ) -{ - if ( mbPreviewDataChanged ) - { - mpDoc->SetPreViewPrtData ( mpPreViewData ); - mbPreviewDataChanged = sal_False; - } - delete mpPreViewData; - mpPreViewData = NULL; -} - -void SwXPrintPreviewSettings::_preGetValues () - throw(UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException ) -{ - if (mpDoc) - mpConstPreViewData = mpDoc->GetPreViewPrtData(); -} - -void SwXPrintPreviewSettings::_getSingleValue( const comphelper::PropertyInfo & rInfo, uno::Any & rValue ) - throw(UnknownPropertyException, WrappedTargetException ) -{ - sal_Bool bBool = TRUE; - sal_Bool bBoolVal; - switch( rInfo.mnHandle ) - { - case HANDLE_PRINTSET_PREVIEW_LEFT_MARGIN: - { - bBool = FALSE; - if ( mpConstPreViewData ) - rValue <<= static_cast < sal_Int32 > ( TWIP_TO_MM100_UNSIGNED( mpConstPreViewData->GetLeftSpace() ) ); - } - break; - case HANDLE_PRINTSET_PREVIEW_RIGHT_MARGIN: - { - bBool = FALSE; - if ( mpConstPreViewData ) - rValue <<= static_cast < sal_Int32 > ( TWIP_TO_MM100_UNSIGNED( mpConstPreViewData->GetRightSpace() ) ); - } - break; - case HANDLE_PRINTSET_PREVIEW_TOP_MARGIN: - { - bBool = FALSE; - if ( mpConstPreViewData ) - rValue <<= static_cast < sal_Int32 > ( TWIP_TO_MM100_UNSIGNED( mpConstPreViewData->GetTopSpace() ) ); - } - break; - case HANDLE_PRINTSET_PREVIEW_BOTTOM_MARGIN: - { - bBool = FALSE; - if ( mpConstPreViewData ) - rValue <<= static_cast < sal_Int32 > ( TWIP_TO_MM100_UNSIGNED( mpConstPreViewData->GetBottomSpace() ) ); - } - break; - case HANDLE_PRINTSET_PREVIEW_HORIZONTAL_SPACING: - { - bBool = FALSE; - if ( mpConstPreViewData ) - rValue <<= static_cast < sal_Int32 > ( TWIP_TO_MM100_UNSIGNED( mpConstPreViewData->GetHorzSpace() ) ); - } - break; - case HANDLE_PRINTSET_PREVIEW_VERTICAL_SPACING: - { - bBool = FALSE; - if ( mpConstPreViewData ) - rValue <<= static_cast < sal_Int32 > ( TWIP_TO_MM100_UNSIGNED( mpConstPreViewData->GetVertSpace() ) ); - } - break; - case HANDLE_PRINTSET_PREVIEW_NUM_ROWS: - { - bBool = FALSE; - if ( mpConstPreViewData ) - rValue <<= static_cast < sal_Int8 > ( mpConstPreViewData->GetRow() ); - } - break; - case HANDLE_PRINTSET_PREVIEW_NUM_COLUMNS: - { - bBool = FALSE; - if ( mpConstPreViewData ) - rValue <<= static_cast < sal_Int8 > ( mpConstPreViewData->GetCol() ); - } - break; - case HANDLE_PRINTSET_PREVIEW_LANDSCAPE: - { - if (mpConstPreViewData) - bBoolVal = mpConstPreViewData->GetLandscape(); - else - bBool = FALSE; - } - break; - default: - throw UnknownPropertyException(); - } - if(bBool) - rValue.setValue(&bBoolVal, ::getBooleanCppuType()); -} - -void SwXPrintPreviewSettings::_postGetValues () - throw(UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException ) -{ - mpConstPreViewData = NULL; -} - -OUString SwXPrintPreviewSettings::getImplementationName(void) throw( RuntimeException ) -{ - return OUString( RTL_CONSTASCII_USTRINGPARAM ( "SwXPrintPreviewSettings" ) ); -} - -sal_Bool SwXPrintPreviewSettings::supportsService(const OUString& rServiceName) throw( RuntimeException ) -{ - return rServiceName.equalsAsciiL ( RTL_CONSTASCII_STRINGPARAM ( "com.sun.star.text.PrintPreviewSettings") ); -} - -Sequence< OUString > SwXPrintPreviewSettings::getSupportedServiceNames(void) throw( RuntimeException ) -{ - Sequence< OUString > aRet(1); - OUString* pArray = aRet.getArray(); - pArray[0] = OUString( RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.text.PrintPreviewSettings" ) ); - return aRet; -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/uno/SwXPrintPreviewSettings.hxx b/sw/source/ui/uno/SwXPrintPreviewSettings.hxx deleted file mode 100644 index 518f250a5f..0000000000 --- a/sw/source/ui/uno/SwXPrintPreviewSettings.hxx +++ /dev/null @@ -1,90 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef _SW_XPRINTPREVIEWSETTINGS_HXX_ -#define _SW_XPRINTPREVIEWSETTINGS_HXX_ - -#ifdef PRECOMPILED -#include "ui_pch.hxx" -#endif -#include <comphelper/ChainablePropertySet.hxx> -#include <com/sun/star/text/XTextDocument.hpp> -#include <cppuhelper/weak.hxx> -#include <com/sun/star/lang/XServiceInfo.hpp> - -class SwDoc; -class SwPagePreViewPrtData; - -class SwXPrintPreviewSettings :public comphelper::ChainablePropertySet, - public cppu::OWeakObject, - public com::sun::star::lang::XServiceInfo -{ - friend class SwXDocumentSettings; -protected: - sal_Bool mbPreviewDataChanged; - SwDoc* mpDoc; - SwPagePreViewPrtData *mpPreViewData; - const SwPagePreViewPrtData *mpConstPreViewData; - - virtual void _preSetValues () - throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException ); - virtual void _setSingleValue( const comphelper::PropertyInfo & rInfo, const ::com::sun::star::uno::Any &rValue ) - throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException ); - virtual void _postSetValues () - throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException ); - - virtual void _preGetValues () - throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException ); - virtual void _getSingleValue( const comphelper::PropertyInfo & rInfo, ::com::sun::star::uno::Any & rValue ) - throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException ); - virtual void _postGetValues () - throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException ); - virtual ~SwXPrintPreviewSettings() - throw(); -public: - SwXPrintPreviewSettings(SwDoc *pDoc); - - - // XInterface - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) - throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL acquire( ) - throw (); - virtual void SAL_CALL release( ) - throw (); - - //XServiceInfo - virtual rtl::OUString SAL_CALL getImplementationName(void) - throw( ::com::sun::star::uno::RuntimeException ); - virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) - throw( ::com::sun::star::uno::RuntimeException ); - virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) - throw( ::com::sun::star::uno::RuntimeException ); -}; -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/uno/detreg.cxx b/sw/source/ui/uno/detreg.cxx index e6c55d11e2..d7dcf4bea9 100644 --- a/sw/source/ui/uno/detreg.cxx +++ b/sw/source/ui/uno/detreg.cxx @@ -44,30 +44,6 @@ SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( *ppEnvironmentTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME ; } -SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo( - void* /*pServiceManager*/, - void* pRegistryKey ) -{ - Reference< ::registry::XRegistryKey > - xKey( reinterpret_cast< ::registry::XRegistryKey* >( pRegistryKey ) ) ; - - OUString aDelimiter( RTL_CONSTASCII_USTRINGPARAM("/") ); - OUString aUnoServices( RTL_CONSTASCII_USTRINGPARAM( "/UNO/SERVICES") ); - - // Eigentliche Implementierung und ihre Services registrieren - sal_Int32 i; - Reference< ::registry::XRegistryKey > xNewKey; - - xNewKey = xKey->createKey( aDelimiter + SwFilterDetect::impl_getStaticImplementationName() + - aUnoServices ); - - Sequence< OUString > aServices = SwFilterDetect::impl_getStaticSupportedServiceNames(); - for(i = 0; i < aServices.getLength(); i++ ) - xNewKey->createKey( aServices.getConstArray()[i] ); - - return sal_True; -} - SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char* pImplementationName, void* pServiceManager, diff --git a/sw/source/ui/uno/makefile.mk b/sw/source/ui/uno/makefile.mk deleted file mode 100644 index 0023fd52f5..0000000000 --- a/sw/source/ui/uno/makefile.mk +++ /dev/null @@ -1,82 +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=unoidl -ENABLE_EXCEPTIONS=TRUE -LIBTARGET=no - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -.IF "$(DVO_XFORMS)" != "" -CDEFS+=-DDVO_XFORMS -.ENDIF - -# --- Files -------------------------------------------------------- - -SLO1FILES = \ - $(SLO)$/unodefaults.obj\ - $(SLO)$/unodispatch.obj\ - $(SLO)$/unotxdoc.obj\ - $(SLO)$/unoatxt.obj \ - $(SLO)$/unomailmerge.obj \ - $(SLO)$/unomod.obj \ - $(SLO)$/unotxvw.obj \ - $(SLO)$/dlelstnr.obj \ - $(SLO)$/unofreg.obj \ - $(SLO)$/SwXDocumentSettings.obj \ - $(SLO)$/SwXPrintPreviewSettings.obj \ - $(SLO)$/SwXFilterOptions.obj\ - $(SLO)$/RefreshListenerContainer.obj \ - $(SLO)$/unomodule.obj \ - $(SLO)$/unodoc.obj - -SLO2FILES = \ - $(SLO)$/swdetect.obj \ - $(SLO)$/swdet2.obj \ - $(SLO)$/detreg.obj - -SLOFILES = \ - $(SLO1FILES) \ - $(SLO2FILES) - -LIB1TARGET = \ - $(SLB)$/$(TARGET).lib - -LIB1OBJFILES = \ - $(SLO1FILES) - -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/ui/uno/swdet2.cxx b/sw/source/ui/uno/swdet2.cxx index 04315c56e1..6ba37ce5fc 100644 --- a/sw/source/ui/uno/swdet2.cxx +++ b/sw/source/ui/uno/swdet2.cxx @@ -58,16 +58,16 @@ bool IsDocShellRegistered() //------------------------------------------------------------------------- -ULONG SwFilterDetect::DetectFilter( SfxMedium& rMedium, const SfxFilter** ppFilter ) +sal_uLong SwFilterDetect::DetectFilter( SfxMedium& rMedium, const SfxFilter** ppFilter ) { - ULONG nRet = ERRCODE_NONE; + sal_uLong nRet = ERRCODE_NONE; if( *ppFilter ) { // verify the given filter String aPrefFlt = (*ppFilter)->GetUserData(); // detection for TextFilter needs an additional checking - BOOL bDetected = SwIoSystem::IsFileFilter( rMedium, aPrefFlt ); + sal_Bool bDetected = SwIoSystem::IsFileFilter( rMedium, aPrefFlt ); return bDetected ? nRet : ERRCODE_ABORT; } diff --git a/sw/source/ui/uno/swdetect.cxx b/sw/source/ui/uno/swdetect.cxx index fd60703baa..601bd439e9 100644 --- a/sw/source/ui/uno/swdetect.cxx +++ b/sw/source/ui/uno/swdetect.cxx @@ -170,7 +170,7 @@ SwFilterDetect::~SwFilterDetect() SfxApplication* pApp = SFX_APP(); SfxAllItemSet *pSet = new SfxAllItemSet( pApp->GetPool() ); TransformParameters( SID_OPENDOC, lDescriptor, *pSet ); - SFX_ITEMSET_ARG( pSet, pItem, SfxBoolItem, SID_DOC_READONLY, FALSE ); + SFX_ITEMSET_ARG( pSet, pItem, SfxBoolItem, SID_DOC_READONLY, sal_False ); bWasReadOnly = pItem && pItem->GetValue(); @@ -189,8 +189,8 @@ SwFilterDetect::~SwFilterDetect() else { // ctor of SfxMedium uses owner transition of ItemSet - SfxMedium aMedium( aURL, bWasReadOnly ? STREAM_STD_READ : STREAM_STD_READWRITE, FALSE, NULL, pSet ); - aMedium.UseInteractionHandler( TRUE ); + SfxMedium aMedium( aURL, bWasReadOnly ? STREAM_STD_READ : STREAM_STD_READWRITE, sal_False, NULL, pSet ); + aMedium.UseInteractionHandler( sal_True ); if ( aMedium.GetErrorCode() == ERRCODE_NONE ) { // remember input stream and content and put them into the descriptor later @@ -199,7 +199,7 @@ SwFilterDetect::~SwFilterDetect() xContent = aMedium.GetContent(); bReadOnly = aMedium.IsReadOnly(); - BOOL bIsStorage = aMedium.IsStorage(); + sal_Bool bIsStorage = aMedium.IsStorage(); if ( bIsStorage ) { uno::Reference< embed::XStorage > xStorage = aMedium.GetStorage( sal_False ); @@ -245,7 +245,7 @@ SwFilterDetect::~SwFilterDetect() aTypeName = pPreFilter->GetTypeName(); } - aTypeName = SfxFilter::GetTypeFromStorage( xStorage, pPreFilter ? pPreFilter->IsOwnTemplateFormat() : FALSE, &aFilterName ); + aTypeName = SfxFilter::GetTypeFromStorage( xStorage, pPreFilter ? pPreFilter->IsOwnTemplateFormat() : sal_False, &aFilterName ); } catch( lang::WrappedTargetException& aWrap ) { @@ -267,18 +267,17 @@ SwFilterDetect::~SwFilterDetect() if ( !bRepairPackage ) { // ask the user whether he wants to try to repair - RequestPackageReparation* pRequest = new RequestPackageReparation( aDocumentTitle ); - uno::Reference< task::XInteractionRequest > xRequest ( pRequest ); - xInteraction->handle( xRequest ); - bRepairAllowed = pRequest->isApproved(); + RequestPackageReparation aRequest( aDocumentTitle ); + xInteraction->handle( aRequest.GetRequest() ); + bRepairAllowed = aRequest.isApproved(); } if ( !bRepairAllowed ) { // repair either not allowed or not successful - NotifyBrokenPackage* pNotifyRequest = new NotifyBrokenPackage( aDocumentTitle ); - uno::Reference< task::XInteractionRequest > xRequest ( pNotifyRequest ); - xInteraction->handle( xRequest ); + // repair either not allowed or not successful + NotifyBrokenPackage aNotifyRequest( aDocumentTitle ); + xInteraction->handle( aNotifyRequest.GetRequest() ); rtl::Reference< ::comphelper::OIHWrapNoFilterDialog > xHandler = new ::comphelper::OIHWrapNoFilterDialog( xInteraction ); if ( nIndexOfInteractionHandler != -1 ) @@ -319,9 +318,9 @@ SwFilterDetect::~SwFilterDetect() else pFilter = SfxFilterMatcher().GetFilter4EA( aTypeName ); - BOOL bTestWriter = !pFilter || pFilter->GetServiceName().EqualsAscii("com.sun.star.text.TextDocument") || + sal_Bool bTestWriter = !pFilter || pFilter->GetServiceName().EqualsAscii("com.sun.star.text.TextDocument") || pFilter->GetServiceName().EqualsAscii("com.sun.star.text.WebDocument"); - BOOL bTestGlobal = !pFilter || pFilter->GetServiceName().EqualsAscii("com.sun.star.text.GlobalDocument"); + sal_Bool bTestGlobal = !pFilter || pFilter->GetServiceName().EqualsAscii("com.sun.star.text.GlobalDocument"); const SfxFilter* pOrigFilter = NULL; if ( !bTestWriter && !bTestGlobal && pFilter ) @@ -331,10 +330,10 @@ SwFilterDetect::~SwFilterDetect() // example: HTML filter for Calc pOrigFilter = pFilter; pFilter = SfxFilterMatcher().GetFilter4EA( pFilter->GetTypeName() ); - bTestWriter = TRUE; + bTestWriter = sal_True; } - ULONG nErr = ERRCODE_NONE; + sal_uLong nErr = ERRCODE_NONE; if ( pFilter || bTestWriter ) nErr = DetectFilter( aMedium, &pFilter ); if ( nErr != ERRCODE_NONE ) diff --git a/sw/source/ui/uno/swdetect.hxx b/sw/source/ui/uno/swdetect.hxx index 5d6d323453..92518cf433 100644 --- a/sw/source/ui/uno/swdetect.hxx +++ b/sw/source/ui/uno/swdetect.hxx @@ -79,8 +79,8 @@ class SfxFilter; class SwFilterDetect : public ::cppu::WeakImplHelper2< ::com::sun::star::document::XExtendedFilterDetection, ::com::sun::star::lang::XServiceInfo > { - static ULONG DetectFilter( SfxMedium& rMedium, const SfxFilter** ppFilter ); - static ULONG GlobDetectFilter( SfxMedium& rMedium, const SfxFilter** ppFilter ); + static sal_uLong DetectFilter( SfxMedium& rMedium, const SfxFilter** ppFilter ); + static sal_uLong GlobDetectFilter( SfxMedium& rMedium, const SfxFilter** ppFilter ); public: SwFilterDetect( const REFERENCE < ::com::sun::star::lang::XMultiServiceFactory >& xFactory ); virtual ~SwFilterDetect(); diff --git a/sw/source/ui/uno/unoatxt.cxx b/sw/source/ui/uno/unoatxt.cxx index 88ed54dff2..db0727ea66 100644 --- a/sw/source/ui/uno/unoatxt.cxx +++ b/sw/source/ui/uno/unoatxt.cxx @@ -116,7 +116,7 @@ uno::Any SwXAutoTextContainer::getByIndex(sal_Int32 nIndex) uno::Any aRet; sal_uInt16 nCount = pGlossaries->GetGroupCnt(); if ( 0 <= nIndex && nIndex < nCount ) - aRet = getByName(pGlossaries->GetGroupName( static_cast< USHORT >(nIndex) )); + aRet = getByName(pGlossaries->GetGroupName( static_cast< sal_uInt16 >(nIndex) )); else throw lang::IndexOutOfBoundsException(); return aRet; @@ -141,8 +141,8 @@ uno::Any SwXAutoTextContainer::getByName(const OUString& GroupName) uno::Reference< text::XAutoTextGroup > xGroup; if ( pGlossaries && hasByName( GroupName ) ) // group name already known? - // TRUE = create group if not already available - xGroup = pGlossaries->GetAutoTextGroup( GroupName, TRUE ); + // sal_True = create group if not already available + xGroup = pGlossaries->GetAutoTextGroup( GroupName, sal_True ); if ( !xGroup.is() ) throw container::NoSuchElementException(); @@ -839,7 +839,7 @@ void SwXAutoTextEntry::GetBodyText () { SolarMutexGuard aGuard; - xDocSh = pGlossaries->EditGroupDoc ( sGroupName, sEntryName, FALSE ); + xDocSh = pGlossaries->EditGroupDoc ( sGroupName, sEntryName, sal_False ); OSL_ENSURE( xDocSh.Is(), "SwXAutoTextEntry::GetBodyText: unexpected: no doc returned by EditGroupDoc!" ); // start listening at the document @@ -1057,7 +1057,7 @@ OUString SwAutoTextEventDescriptor::getImplementationName() } void SwAutoTextEventDescriptor::replaceByName( - const USHORT nEvent, + const sal_uInt16 nEvent, const SvxMacro& rMacro) throw( lang::IllegalArgumentException, @@ -1079,7 +1079,7 @@ void SwAutoTextEventDescriptor::replaceByName( if( pBlocks && !pBlocks->GetError()) { - USHORT nIndex = pBlocks->GetIndex( rAutoTextEntry.GetEntryName() ); + sal_uInt16 nIndex = pBlocks->GetIndex( rAutoTextEntry.GetEntryName() ); if( nIndex != USHRT_MAX ) { SvxMacroTableDtor aMacroTable; @@ -1098,7 +1098,7 @@ void SwAutoTextEventDescriptor::replaceByName( void SwAutoTextEventDescriptor::getByName( SvxMacro& rMacro, - const USHORT nEvent ) + const sal_uInt16 nEvent ) throw( container::NoSuchElementException, lang::WrappedTargetException, @@ -1122,7 +1122,7 @@ void SwAutoTextEventDescriptor::getByName( if ( pBlocks && !pBlocks->GetError()) { - USHORT nIndex = pBlocks->GetIndex( rAutoTextEntry.GetEntryName() ); + sal_uInt16 nIndex = pBlocks->GetIndex( rAutoTextEntry.GetEntryName() ); if( nIndex != USHRT_MAX ) { SvxMacroTableDtor aMacroTable; diff --git a/sw/source/ui/uno/unofreg.cxx b/sw/source/ui/uno/unofreg.cxx index 6ceba9fc32..4b0b8e6293 100644 --- a/sw/source/ui/uno/unofreg.cxx +++ b/sw/source/ui/uno/unofreg.cxx @@ -156,99 +156,6 @@ SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } -static void lcl_uno_writeInfo( - registry::XRegistryKey * pRegistryKey, - const OUString& rImplementationName, - const uno::Sequence< OUString >& rServices ) -{ - uno::Reference< registry::XRegistryKey > xNewKey( - pRegistryKey->createKey( - OUString( RTL_CONSTASCII_USTRINGPARAM("/") ) + rImplementationName + OUString(RTL_CONSTASCII_USTRINGPARAM( "/UNO/SERVICES") ) ) ); - - for( sal_Int32 i = 0; i < rServices.getLength(); i++ ) - xNewKey->createKey( rServices.getConstArray()[i]); -} - -SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo( - void * /*pServiceManager*/, - void * pRegistryKey ) -{ - if( pRegistryKey ) - { - try - { - registry::XRegistryKey *pKey = - reinterpret_cast< registry::XRegistryKey * >( pRegistryKey ); - - - // xml filter - lcl_uno_writeInfo( pKey, SwXMLImport_getImplementationName(), - SwXMLImport_getSupportedServiceNames() ); - lcl_uno_writeInfo( pKey, SwXMLImportStyles_getImplementationName(), - SwXMLImportStyles_getSupportedServiceNames() ); - lcl_uno_writeInfo( pKey,SwXMLImportContent_getImplementationName(), - SwXMLImportContent_getSupportedServiceNames() ); - lcl_uno_writeInfo( pKey, SwXMLImportMeta_getImplementationName(), - SwXMLImportMeta_getSupportedServiceNames() ); - lcl_uno_writeInfo( pKey, SwXMLImportSettings_getImplementationName(), - SwXMLImportSettings_getSupportedServiceNames() ); - lcl_uno_writeInfo( pKey, SwXMLExportOOO_getImplementationName(), - SwXMLExportOOO_getSupportedServiceNames() ); - lcl_uno_writeInfo( pKey, SwXMLExportStylesOOO_getImplementationName(), - SwXMLExportStylesOOO_getSupportedServiceNames() ); - lcl_uno_writeInfo( pKey,SwXMLExportContentOOO_getImplementationName(), - SwXMLExportContentOOO_getSupportedServiceNames() ); - lcl_uno_writeInfo( pKey, SwXMLExportMetaOOO_getImplementationName(), - SwXMLExportMetaOOO_getSupportedServiceNames() ); - lcl_uno_writeInfo( pKey, SwXMLExportSettingsOOO_getImplementationName(), - SwXMLExportSettingsOOO_getSupportedServiceNames() ); - lcl_uno_writeInfo( pKey, SwXMLExport_getImplementationName(), - SwXMLExport_getSupportedServiceNames() ); - lcl_uno_writeInfo( pKey, SwXMLExportStyles_getImplementationName(), - SwXMLExportStyles_getSupportedServiceNames() ); - lcl_uno_writeInfo( pKey,SwXMLExportContent_getImplementationName(), - SwXMLExportContent_getSupportedServiceNames() ); - lcl_uno_writeInfo( pKey, SwXMLExportMeta_getImplementationName(), - SwXMLExportMeta_getSupportedServiceNames() ); - lcl_uno_writeInfo( pKey, SwXMLExportSettings_getImplementationName(), - SwXMLExportSettings_getSupportedServiceNames() ); - //API objects - lcl_uno_writeInfo( pKey, SwXAutoTextContainer_getImplementationName(), - SwXAutoTextContainer_getSupportedServiceNames() ); - lcl_uno_writeInfo( pKey, SwXModule_getImplementationName(), - SwXModule_getSupportedServiceNames() ); - lcl_uno_writeInfo( pKey, SwXMailMerge_getImplementationName(), - SwXMailMerge_getSupportedServiceNames() ); - //Filter options - lcl_uno_writeInfo( pKey, SwXFilterOptions::getImplementationName_Static(), - SwXFilterOptions::getSupportedServiceNames_Static() ); - - // documents - lcl_uno_writeInfo( pKey, SwTextDocument_getImplementationName(), - SwTextDocument_getSupportedServiceNames() ); - lcl_uno_writeInfo( pKey, SwWebDocument_getImplementationName(), - SwWebDocument_getSupportedServiceNames() ); - lcl_uno_writeInfo( pKey,SwGlobalDocument_getImplementationName(), - SwGlobalDocument_getSupportedServiceNames() ); - - // module - lcl_uno_writeInfo( pKey, SwUnoModule_getImplementationName(), - SwUnoModule_getSupportedServiceNames() ); - // --> OD 2007-05-24 #i73788# - lcl_uno_writeInfo( pKey, - comp_FinalThreadManager::_getImplementationName(), - comp_FinalThreadManager::_getSupportedServiceNames() ); - // <-- - - } - catch (registry::InvalidRegistryException &) - { - OSL_ENSURE( sal_False, "### InvalidRegistryException!" ); - } - } - return sal_True; -} - static ::cppu::ImplementationEntry const entries[] = { { &comp_FinalThreadManager::_create, &comp_FinalThreadManager::_getImplementationName, diff --git a/sw/source/ui/uno/unomailmerge.cxx b/sw/source/ui/uno/unomailmerge.cxx index 6a52d76ed0..bb65d66d79 100644 --- a/sw/source/ui/uno/unomailmerge.cxx +++ b/sw/source/ui/uno/unomailmerge.cxx @@ -150,11 +150,11 @@ static CloseResult CloseModelAndDocSh( //////////////////////////////////////////////////////////// -static BOOL LoadFromURL_impl( +static sal_Bool LoadFromURL_impl( Reference< frame::XModel > &rxModel, SfxObjectShellRef &rxDocSh, const String &rURL, - BOOL bClose ) + sal_Bool bClose ) throw (RuntimeException) { // try to open the document readonly and hidden @@ -172,7 +172,7 @@ static BOOL LoadFromURL_impl( } catch( Exception & ) { - return FALSE; + return sal_False; } // try to get the DocShell @@ -185,7 +185,7 @@ static BOOL LoadFromURL_impl( pTmpDocShell = pTextDoc ? pTextDoc->GetDocShell() : 0; } - BOOL bRes = FALSE; + sal_Bool bRes = sal_False; if (xTmpModel.is() && pTmpDocShell) // everything available? { if (bClose) @@ -193,10 +193,11 @@ static BOOL LoadFromURL_impl( // set new stuff rxModel = xTmpModel; rxDocSh = pTmpDocShell; - bRes = TRUE; + bRes = sal_True; } else { + // SfxObjectShellRef is ok here, since the document will be explicitly closed SfxObjectShellRef xTmpDocSh = pTmpDocShell; CloseModelAndDocSh( xTmpModel, xTmpDocSh ); } @@ -369,15 +370,15 @@ namespace //////////////////////////////////////////////////////////// -static BOOL DeleteTmpFile_Impl( +static sal_Bool DeleteTmpFile_Impl( Reference< frame::XModel > &rxModel, SfxObjectShellRef &rxDocSh, const String &rTmpFileURL ) { - BOOL bRes = FALSE; + sal_Bool bRes = sal_False; if (rTmpFileURL.Len()) { - BOOL bDelete = TRUE; + sal_Bool bDelete = sal_True; if ( eVetoed == CloseModelAndDocSh( rxModel, rxDocSh ) ) { // somebody vetoed the closing, and took the ownership of the document @@ -385,7 +386,7 @@ static BOOL DeleteTmpFile_Impl( Reference< XEventListener > xEnsureDelete( new DelayedFileDeletion( rxModel, rTmpFileURL ) ); // note: as soon as #106931# is fixed, the whole DelayedFileDeletion is to be superseeded by // a better solution - bDelete = FALSE; + bDelete = sal_False; } rxModel = 0; @@ -400,7 +401,7 @@ static BOOL DeleteTmpFile_Impl( } } else - bRes = TRUE; // file will be deleted delayed + bRes = sal_True; // file will be deleted delayed } return bRes; } @@ -490,7 +491,7 @@ uno::Any SAL_CALL SwXMailMerge::execute( const OUString &rName = pArguments[i].Name; const Any &rValue = pArguments[i].Value; - BOOL bOK = TRUE; + sal_Bool bOK = sal_True; if (rName.equalsAscii( GetPropName( UNO_NAME_SELECTION ) )) bOK = rValue >>= aCurSelection; else if (rName.equalsAscii( GetPropName( UNO_NAME_RESULT_SET ) )) @@ -509,7 +510,7 @@ uno::Any SAL_CALL SwXMailMerge::execute( { bOK = rValue >>= aCurDocumentURL; if (aCurDocumentURL.getLength() - && !LoadFromURL_impl( xCurModel, xCurDocSh, aCurDocumentURL, FALSE )) + && !LoadFromURL_impl( xCurModel, xCurDocSh, aCurDocumentURL, sal_False )) throw RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Failed to create document from URL: " ) ) + aCurDocumentURL, static_cast < cppu::OWeakObject * > ( this ) ); } else if (rName.equalsAscii( GetPropName( UNO_NAME_OUTPUT_URL ) )) @@ -620,7 +621,7 @@ uno::Any SAL_CALL SwXMailMerge::execute( aCurSelection = aTranslated; } - SfxViewFrame* pFrame = SfxViewFrame::GetFirst( xCurDocSh, FALSE); + SfxViewFrame* pFrame = SfxViewFrame::GetFirst( xCurDocSh, sal_False); SwView *pView = PTR_CAST( SwView, pFrame->GetViewShell() ); if (!pView) throw RuntimeException(); @@ -686,7 +687,7 @@ uno::Any SAL_CALL SwXMailMerge::execute( // aDescriptor[ svx::daColumnObject ] not used aDescriptor[ svx::daSelection ] <<= aCurSelection; - USHORT nMergeType; + sal_uInt16 nMergeType; switch (nCurOutputType) { case MailMergeType::PRINTER : nMergeType = DBMGR_MERGE_MAILMERGE; break; @@ -707,11 +708,8 @@ uno::Any SAL_CALL SwXMailMerge::execute( uno::Reference< mail::XMailService > xInService; if (MailMergeType::PRINTER == nCurOutputType) { - SwPrintData aPrtData = *SW_MOD()->GetPrtOptions( FALSE ); IDocumentDeviceAccess* pIDDA = rSh.getIDocumentDeviceAccess(); - SwPrintData* pShellPrintData = pIDDA->getPrintData(); - if (pShellPrintData) - aPrtData = *pShellPrintData; + SwPrintData aPrtData( pIDDA->getPrintData() ); aPrtData.SetPrintSingleJobs( bCurSinglePrintJobs ); pIDDA->setPrintData( aPrtData ); // #i25686# printing should not be done asynchronously to prevent dangling offices @@ -818,13 +816,13 @@ uno::Any SAL_CALL SwXMailMerge::execute( if ( !bStoredAsTemporary ) throw RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Failed to save temporary file." ) ), static_cast < cppu::OWeakObject * > ( this ) ); - pMgr->SetMergeSilent( TRUE ); // suppress dialogs, message boxes, etc. + pMgr->SetMergeSilent( sal_True ); // suppress dialogs, message boxes, etc. const SwXMailMerge *pOldSrc = pMgr->GetMailMergeEvtSrc(); OSL_ENSURE( !pOldSrc || pOldSrc == this, "Ooops... different event source already set." ); pMgr->SetMailMergeEvtSrc( this ); // launch events for listeners SFX_APP()->NotifyEvent(SfxEventHint(SW_EVENT_MAIL_MERGE, SwDocShell::GetEventName(STR_SW_EVENT_MAIL_MERGE), xCurDocSh)); - BOOL bSucc = pMgr->MergeNew( aMergeDesc ); + sal_Bool bSucc = pMgr->MergeNew( aMergeDesc ); SFX_APP()->NotifyEvent(SfxEventHint(SW_EVENT_MAIL_MERGE_END, SwDocShell::GetEventName(STR_SW_EVENT_MAIL_MERGE_END), xCurDocSh)); pMgr->SetMailMergeEvtSrc( pOldSrc ); @@ -960,7 +958,7 @@ void SAL_CALL SwXMailMerge::setPropertyValue( OUString aText; bOK = rValue >>= aText; if (aText.getLength() - && !LoadFromURL_impl( xModel, xDocSh, aText, TRUE )) + && !LoadFromURL_impl( xModel, xDocSh, aText, sal_True )) throw RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Failed to create document from URL: " ) ) + aText, static_cast < cppu::OWeakObject * > ( this ) ); aDocumentURL = aText; } @@ -1033,7 +1031,7 @@ void SAL_CALL SwXMailMerge::setPropertyValue( if (bChanged) { PropertyChangeEvent aChgEvt( (XPropertySet *) this, rPropertyName, - FALSE, pCur->nWID, aOld, rValue ); + sal_False, pCur->nWID, aOld, rValue ); launchEvent( aChgEvt ); } } diff --git a/sw/source/ui/uno/unomod.cxx b/sw/source/ui/uno/unomod.cxx index 70f8b9978f..c9c52bf876 100644 --- a/sw/source/ui/uno/unomod.cxx +++ b/sw/source/ui/uno/unomod.cxx @@ -53,7 +53,7 @@ #include <comphelper/ChainablePropertySetInfo.hxx> #include <edtwin.hxx> #include <rtl/ustrbuf.hxx> - +#include <tools/urlobj.hxx> using namespace ::com::sun::star; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::beans; @@ -275,9 +275,9 @@ sal_Bool SwXModule::supportsService(const OUString& rServiceName) throw( Runtime for(sal_Int32 nService = 0; nService < aNames.getLength(); nService++) { if(aNames.getConstArray()[nService] == rServiceName) - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } Sequence< OUString > SwXModule::getSupportedServiceNames(void) throw( RuntimeException ) @@ -316,13 +316,7 @@ void SwXPrintSettings::_preSetValues () { if (!mpDoc) throw IllegalArgumentException (); - if ( !mpDoc->getPrintData() ) - { - mpPrtOpt = new SwPrintData; - mpDoc->setPrintData ( *mpPrtOpt ); - delete mpPrtOpt; - } - mpPrtOpt = mpDoc->getPrintData(); + mpPrtOpt = const_cast< SwPrintData * >(&mpDoc->getPrintData()); } break; } @@ -479,13 +473,7 @@ void SwXPrintSettings::_preGetValues () { if (!mpDoc) throw IllegalArgumentException (); - if ( !mpDoc->getPrintData() ) - { - mpPrtOpt = new SwPrintData; - mpDoc->setPrintData ( *mpPrtOpt ); - delete mpPrtOpt; - } - mpPrtOpt = mpDoc->getPrintData(); + mpPrtOpt = const_cast< SwPrintData * >(&mpDoc->getPrintData()); } break; } @@ -651,10 +639,10 @@ void SwXViewSettings::_setSingleValue( const comphelper::PropertyInfo & rInfo, c case HANDLE_VIEWSET_DRAWINGS : mpViewOption->SetDraw(bVal); break; case HANDLE_VIEWSET_FIELD_COMMANDS : mpViewOption->SetFldName(bVal); break; case HANDLE_VIEWSET_ANNOTATIONS : mpViewOption->SetPostIts(bVal); break; - case HANDLE_VIEWSET_INDEX_MARK_BACKGROUND : mpViewOption->SetAppearanceFlag(VIEWOPT_FIELD_SHADINGS, bVal, TRUE); break; + case HANDLE_VIEWSET_INDEX_MARK_BACKGROUND : mpViewOption->SetAppearanceFlag(VIEWOPT_FIELD_SHADINGS, bVal, sal_True); break; case HANDLE_VIEWSET_NONPRINTING_CHARACTERS: mpViewOption->SetViewMetaChars( bVal ); break; - case HANDLE_VIEWSET_FOOTNOTE_BACKGROUND : mpViewOption->SetAppearanceFlag(VIEWOPT_FIELD_SHADINGS, bVal, TRUE); break; - case HANDLE_VIEWSET_TEXT_FIELD_BACKGROUND : mpViewOption->SetAppearanceFlag(VIEWOPT_FIELD_SHADINGS, bVal, TRUE); break; + case HANDLE_VIEWSET_FOOTNOTE_BACKGROUND : mpViewOption->SetAppearanceFlag(VIEWOPT_FIELD_SHADINGS, bVal, sal_True); break; + case HANDLE_VIEWSET_TEXT_FIELD_BACKGROUND : mpViewOption->SetAppearanceFlag(VIEWOPT_FIELD_SHADINGS, bVal, sal_True); break; case HANDLE_VIEWSET_PARA_BREAKS : mpViewOption->SetParagraph(bVal); break; case HANDLE_VIEWSET_SOFT_HYPHENS : mpViewOption->SetSoftHyph(bVal); break; case HANDLE_VIEWSET_SPACES : mpViewOption->SetBlank(bVal); break; @@ -664,7 +652,7 @@ void SwXViewSettings::_setSingleValue( const comphelper::PropertyInfo & rInfo, c case HANDLE_VIEWSET_HIDDEN_TEXT : mpViewOption->SetShowHiddenField(bVal); break; case HANDLE_VIEWSET_HIDDEN_CHARACTERS : mpViewOption->SetShowHiddenChar(bVal); break; case HANDLE_VIEWSET_HIDDEN_PARAGRAPHS : mpViewOption->SetShowHiddenPara(bVal); break; - case HANDLE_VIEWSET_TABLE_BOUNDARIES : mpViewOption->SetAppearanceFlag(VIEWOPT_TABLE_BOUNDARIES, bVal, TRUE); break; + case HANDLE_VIEWSET_TABLE_BOUNDARIES : mpViewOption->SetAppearanceFlag(VIEWOPT_TABLE_BOUNDARIES, bVal, sal_True); break; case HANDLE_VIEWSET_TEXT_BOUNDARIES : mpViewOption->SetDocBoundaries(bVal); break; case HANDLE_VIEWSET_SMOOTH_SCROLLING : mpViewOption->SetSmoothScroll(bVal); break; case HANDLE_VIEWSET_SOLID_MARK_HANDLES : mpViewOption->SetSolidMarkHdl(bVal); break; @@ -765,14 +753,12 @@ void SwXViewSettings::_setSingleValue( const comphelper::PropertyInfo & rInfo, c OUString sHelpURL; if ( ! ( rValue >>= sHelpURL ) ) throw IllegalArgumentException(); - SwEditWin &rEditWin = pView->GetEditWin(); - OUString sPrefix = sHelpURL.copy ( 0, 4 ); - // Make sure we have a valid string...should be in the format HID:12345 - if ( ! sPrefix.equalsAsciiL ( RTL_CONSTASCII_STRINGPARAM ( "HID:" ) ) ) + + INetURLObject aHID( sHelpURL ); + if ( aHID.GetProtocol() == INET_PROT_HID ) + pView->GetEditWin().SetHelpId( rtl::OUStringToOString( aHID.GetURLPath(), RTL_TEXTENCODING_UTF8 ) ); + else throw IllegalArgumentException (); - OUString sNumber = sHelpURL.copy ( 4 ); - sal_uInt32 nHelpId = sNumber.toInt32(); - rEditWin.SetHelpId ( nHelpId ); } else throw UnknownPropertyException(); @@ -859,13 +845,13 @@ void SwXViewSettings::_preGetValues () void SwXViewSettings::_getSingleValue( const comphelper::PropertyInfo & rInfo, uno::Any & rValue ) throw(UnknownPropertyException, WrappedTargetException ) { - sal_Bool bBool = TRUE; + sal_Bool bBool = sal_True; sal_Bool bBoolVal; switch( rInfo.mnHandle ) { case HANDLE_VIEWSET_SHOW_RULER: bBoolVal = mpConstViewOption->IsViewAnyRuler(); break; - case HANDLE_VIEWSET_HRULER : bBoolVal = mpConstViewOption->IsViewHRuler(TRUE); break; - case HANDLE_VIEWSET_VRULER : bBoolVal = mpConstViewOption->IsViewVRuler(TRUE);break; + case HANDLE_VIEWSET_HRULER : bBoolVal = mpConstViewOption->IsViewHRuler(sal_True); break; + case HANDLE_VIEWSET_VRULER : bBoolVal = mpConstViewOption->IsViewVRuler(sal_True);break; case HANDLE_VIEWSET_VRULER_RIGHT : bBoolVal = mpConstViewOption->IsVRulerRight();break; case HANDLE_VIEWSET_HSCROLL: bBoolVal = mpConstViewOption->IsViewHScrollBar();break; case HANDLE_VIEWSET_VSCROLL: bBoolVal = mpConstViewOption->IsViewVScrollBar();break; @@ -895,28 +881,28 @@ void SwXViewSettings::_getSingleValue( const comphelper::PropertyInfo & rInfo, u case HANDLE_VIEWSET_IS_RASTER_VISIBLE : bBoolVal = mpConstViewOption->IsGridVisible(); break; case HANDLE_VIEWSET_IS_SNAP_TO_RASTER : bBoolVal = mpConstViewOption->IsSnap(); break; case HANDLE_VIEWSET_RASTER_RESOLUTION_X : - bBool = FALSE; + bBool = sal_False; rValue <<= (sal_Int32) TWIP_TO_MM100(mpConstViewOption->GetSnapSize().Width()); break; case HANDLE_VIEWSET_RASTER_RESOLUTION_Y : - bBool = FALSE; + bBool = sal_False; rValue <<= (sal_Int32) TWIP_TO_MM100(mpConstViewOption->GetSnapSize().Height()); break; case HANDLE_VIEWSET_RASTER_SUBDIVISION_X : - bBool = FALSE; + bBool = sal_False; rValue <<= (sal_Int32) mpConstViewOption->GetDivisionX(); break; case HANDLE_VIEWSET_RASTER_SUBDIVISION_Y : - bBool = FALSE; + bBool = sal_False; rValue <<= (sal_Int32) mpConstViewOption->GetDivisionY(); break; case HANDLE_VIEWSET_ZOOM : - bBool = FALSE; + bBool = sal_False; rValue <<= (sal_Int16)mpConstViewOption->GetZoom(); break; case HANDLE_VIEWSET_ZOOM_TYPE: { - bBool = FALSE; + bBool = sal_False; sal_Int16 nRet(0); switch (mpConstViewOption->GetZoomType()) { @@ -952,9 +938,9 @@ void SwXViewSettings::_getSingleValue( const comphelper::PropertyInfo & rInfo, u { bBool = sal_False; OUStringBuffer sHelpURL; - sHelpURL.appendAscii ( "HID:" ); + sHelpURL.appendAscii ( INET_HID_SCHEME ); SwEditWin &rEditWin = pView->GetEditWin(); - sHelpURL.append ( static_cast < sal_Int32 > ( rEditWin.GetHelpId() ) ); + sHelpURL.append( rtl::OStringToOUString( rEditWin.GetHelpId(), RTL_TEXTENCODING_UTF8 ) ); rValue <<= sHelpURL.makeStringAndClear(); } else diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx index 5be2575e40..1de417b97b 100644 --- a/sw/source/ui/uno/unotxdoc.cxx +++ b/sw/source/ui/uno/unotxdoc.cxx @@ -46,7 +46,7 @@ #include <pview.hxx> #include <viewsh.hxx> #include <pvprtdat.hxx> -#include <swprtopt.hxx> +#include <printdata.hxx> #include <svl/stritem.hxx> #include <unotxdoc.hxx> #include <svl/numuno.hxx> @@ -81,7 +81,6 @@ #include <globals.hrc> #include <unomid.h> #include <unotools/printwarningoptions.hxx> - #include <com/sun/star/util/SearchOptions.hpp> #include <com/sun/star/lang/ServiceNotRegisteredException.hpp> #include <com/sun/star/lang/DisposedException.hpp> @@ -106,7 +105,6 @@ #include <swcont.hxx> #include <unodefaults.hxx> #include <SwXDocumentSettings.hxx> -#include <SwXPrintPreviewSettings.hxx> #include <doc.hxx> #include <editeng/forbiddencharacterstable.hxx> #include <svl/zforlist.hxx> @@ -181,17 +179,16 @@ SwPrintUIOptions * lcl_GetPrintUIOptions( if (!pDocShell) return NULL; - const BOOL bWebDoc = NULL != dynamic_cast< const SwWebDocShell * >(pDocShell); + const sal_Bool bWebDoc = NULL != dynamic_cast< const SwWebDocShell * >(pDocShell); const bool bSwSrcView = NULL != dynamic_cast< const SwSrcView * >(pView); const SwView * pSwView = dynamic_cast< const SwView * >(pView); const bool bHasSelection = pSwView ? pSwView->HasSelection( sal_False ) : false; // check for any selection, not just text selection const bool bHasPostIts = lcl_GetPostIts( pDocShell->GetDoc(), 0 ); // get default values to use in dialog from documents SwPrintData - const SwPrintData *pPrintData = pDocShell->GetDoc()->getPrintData(); - OSL_ENSURE( pPrintData, "failed to get SwPrintData from document" ); + const SwPrintData &rPrintData = pDocShell->GetDoc()->getPrintData(); - return new SwPrintUIOptions( bWebDoc, bSwSrcView, bHasSelection, bHasPostIts, *pPrintData ); + return new SwPrintUIOptions( bWebDoc, bSwSrcView, bHasSelection, bHasPostIts, rPrintData ); } SwTxtFmtColl *lcl_GetParaStyle(const String& rCollName, SwDoc* pDoc) @@ -210,7 +207,7 @@ void lcl_DisposeView( SfxViewFrame* pToClose, SwDocShell* pDocShell ) { // check if the view frame still exists SfxViewFrame* pFound = SfxViewFrame::GetFirst( pDocShell, - FALSE ); + sal_False ); while(pFound) { if( pFound == pToClose) @@ -220,7 +217,7 @@ void lcl_DisposeView( SfxViewFrame* pToClose, SwDocShell* pDocShell ) } pFound = SfxViewFrame::GetNext( *pFound, pDocShell, - FALSE ); + sal_False ); } } @@ -735,7 +732,7 @@ sal_Int32 SwXTextDocument::replaceAll(const Reference< util::XSearchDescriptor > 0); pSearch->FillSearchItemSet(aSearch); pSearch->FillReplaceItemSet(aReplace); - BOOL bCancel; + sal_Bool bCancel; nResult = (sal_Int32)pUnoCrsr->Find( aSearch, !pSearch->bStyles, eStart, eEnd, bCancel, (FindRanges)eRanges, @@ -747,7 +744,7 @@ sal_Int32 SwXTextDocument::replaceAll(const Reference< util::XSearchDescriptor > SwTxtFmtColl *pSearchColl = lcl_GetParaStyle(pSearch->sSearchText, pUnoCrsr->GetDoc()); SwTxtFmtColl *pReplaceColl = lcl_GetParaStyle(pSearch->sReplaceText, pUnoCrsr->GetDoc());; - BOOL bCancel; + sal_Bool bCancel; nResult = pUnoCrsr->Find( *pSearchColl, eStart, eEnd, bCancel, (FindRanges)eRanges, pReplaceColl ); @@ -756,8 +753,8 @@ sal_Int32 SwXTextDocument::replaceAll(const Reference< util::XSearchDescriptor > else { //todo/mba: assuming that notes should be omitted - BOOL bSearchInNotes = FALSE; - BOOL bCancel; + sal_Bool bSearchInNotes = sal_False; + sal_Bool bCancel; nResult = pUnoCrsr->Find( aSearchOpt, bSearchInNotes, eStart, eEnd, bCancel, (FindRanges)eRanges, @@ -863,10 +860,10 @@ SwUnoCrsr* SwXTextDocument::FindAny(const Reference< util::XSearchDescriptor > RES_CHRATR_BEGIN, RES_CHRATR_END-1, RES_PARATR_BEGIN, RES_PARATR_END-1, RES_FRMATR_BEGIN, RES_FRMATR_END-1, - RES_TXTATR_INETFMT, RES_TXTATR_INETFMT, + RES_TXTATR_INETFMT, RES_TXTATR_CHARFMT, 0); pSearch->FillSearchItemSet(aSearch); - BOOL bCancel; + sal_Bool bCancel; nResult = (sal_Int32)pUnoCrsr->Find( aSearch, !pSearch->bStyles, eStart, eEnd, bCancel, (FindRanges)eRanges, @@ -878,7 +875,7 @@ SwUnoCrsr* SwXTextDocument::FindAny(const Reference< util::XSearchDescriptor > SwTxtFmtColl *pSearchColl = lcl_GetParaStyle(pSearch->sSearchText, pUnoCrsr->GetDoc()); //pSearch->sReplaceText SwTxtFmtColl *pReplaceColl = 0; - BOOL bCancel; + sal_Bool bCancel; nResult = (sal_Int32)pUnoCrsr->Find( *pSearchColl, eStart, eEnd, bCancel, (FindRanges)eRanges, pReplaceColl ); @@ -886,8 +883,8 @@ SwUnoCrsr* SwXTextDocument::FindAny(const Reference< util::XSearchDescriptor > else { //todo/mba: assuming that notes should be omitted - BOOL bSearchInNotes = FALSE; - BOOL bCancel; + sal_Bool bSearchInNotes = sal_False; + sal_Bool bCancel; nResult = (sal_Int32)pUnoCrsr->Find( aSearchOpt, bSearchInNotes, eStart, eEnd, bCancel, (FindRanges)eRanges, @@ -996,7 +993,7 @@ Sequence< beans::PropertyValue > SwXTextDocument::getPagePrintSettings(void) pArray[6] = beans::PropertyValue(C2U("HoriMargin"), -1, aVal, PropertyState_DIRECT_VALUE); aVal <<= (sal_Int32)TWIP_TO_MM100_UNSIGNED(aData.GetVertSpace()); pArray[7] = beans::PropertyValue(C2U("VertMargin"), -1, aVal, PropertyState_DIRECT_VALUE); - BOOL bTemp = aData.GetLandscape(); + sal_Bool bTemp = aData.GetLandscape(); aVal.setValue(&bTemp, ::getCppuBooleanType()); pArray[8] = beans::PropertyValue(C2U("IsLandscape"), -1, aVal, PropertyState_DIRECT_VALUE); } @@ -1024,7 +1021,7 @@ sal_uInt32 lcl_Any_To_ULONG(const Any& rValue, sal_Bool& bException) return nRet; } -String lcl_CreateOutlineString( USHORT nIndex, +String lcl_CreateOutlineString( sal_uInt16 nIndex, const SwOutlineNodes& rOutlineNodes, const SwNumRule* pOutlRule) { String sEntry; @@ -1069,13 +1066,13 @@ void SwXTextDocument::setPagePrintSettings(const Sequence< beans::PropertyValue { if(!nVal || nVal > 0xff) throw RuntimeException(); - aData.SetRow((BYTE)nVal); + aData.SetRow((sal_uInt8)nVal); } else if(COMPARE_EQUAL == sName.CompareToAscii("PageColumns")) { if(!nVal || nVal > 0xff) throw RuntimeException(); - aData.SetCol((BYTE)nVal); + aData.SetCol((sal_uInt8)nVal); } else if(COMPARE_EQUAL == sName.CompareToAscii("LeftMargin")) { @@ -1401,7 +1398,7 @@ void SwXTextDocument::Reactivate(SwDocShell* pNewDocShell) if(pDocShell && pDocShell != pNewDocShell) Invalidate(); pDocShell = pNewDocShell; - bObjectValid = TRUE; + bObjectValid = sal_True; } void SwXTextDocument::InitNewDoc() @@ -1668,9 +1665,7 @@ Reference< XInterface > SwXTextDocument::createInstance(const OUString& rServic } else if (sCategory == C2U ("text") ) { - if( 0 == rServiceName.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.PrintPreviewSettings") ) ) - xRet = Reference < XInterface > ( *new SwXPrintPreviewSettings ( pDocShell->GetDoc() ) ); - else if( 0 == rServiceName.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.DocumentSettings") ) ) + if( 0 == rServiceName.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.DocumentSettings") ) ) xRet = Reference < XInterface > ( *new SwXDocumentSettings ( this ) ); } else if (sCategory == C2U ("chart2") ) @@ -1768,9 +1763,9 @@ sal_Bool SwXTextDocument::supportsService(const OUString& rServiceName) throw( R ) return sal_True; - BOOL bWebDoc = (0 != PTR_CAST(SwWebDocShell, pDocShell)); - BOOL bGlobalDoc = (0 != PTR_CAST(SwGlobalDocShell, pDocShell)); - BOOL bTextDoc = (!bWebDoc && !bGlobalDoc); + sal_Bool bWebDoc = (0 != PTR_CAST(SwWebDocShell, pDocShell)); + sal_Bool bGlobalDoc = (0 != PTR_CAST(SwGlobalDocShell, pDocShell)); + sal_Bool bTextDoc = (!bWebDoc && !bGlobalDoc); return ( (bWebDoc && rServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.WebDocument" ))) || @@ -1781,9 +1776,9 @@ sal_Bool SwXTextDocument::supportsService(const OUString& rServiceName) throw( R Sequence< OUString > SwXTextDocument::getSupportedServiceNames(void) throw( RuntimeException ) { - BOOL bWebDoc = (0 != PTR_CAST(SwWebDocShell, pDocShell)); - BOOL bGlobalDoc = (0 != PTR_CAST(SwGlobalDocShell, pDocShell)); - BOOL bTextDoc = (!bWebDoc && !bGlobalDoc); + sal_Bool bWebDoc = (0 != PTR_CAST(SwWebDocShell, pDocShell)); + sal_Bool bGlobalDoc = (0 != PTR_CAST(SwGlobalDocShell, pDocShell)); + sal_Bool bTextDoc = (!bWebDoc && !bGlobalDoc); Sequence< OUString > aRet (3); OUString* pArray = aRet.getArray(); @@ -2066,7 +2061,7 @@ Any SwXTextDocument::getPropertyValue(const OUString& rPropertyName) break; case WID_DOC_HIDE_TIPS : { - BOOL bTemp = SW_MOD()->GetModuleConfig()->IsHideFieldTips(); + sal_Bool bTemp = SW_MOD()->GetModuleConfig()->IsHideFieldTips(); aAny.setValue(&bTemp, ::getBooleanCppuType()); } break; @@ -2093,7 +2088,7 @@ Any SwXTextDocument::getPropertyValue(const OUString& rPropertyName) break; case WID_DOC_TWO_DIGIT_YEAR: { - aAny <<= static_cast < sal_Int16 > (pDocShell->GetDoc()->GetNumberFormatter ( TRUE )->GetYear2000()); + aAny <<= static_cast < sal_Int16 > (pDocShell->GetDoc()->GetNumberFormatter ( sal_True )->GetYear2000()); } break; case WID_DOC_AUTOMATIC_CONTROL_FOCUS: @@ -2247,7 +2242,7 @@ void SwXTextDocument::updateLinks( ) throw(RuntimeException) if( rLnkMan.GetLinks().Count() ) { UnoActionContext aAction(pDoc); - rLnkMan.UpdateAllLinks( FALSE, FALSE, TRUE ); + rLnkMan.UpdateAllLinks( sal_False, sal_False, sal_True ); } } @@ -2425,7 +2420,7 @@ SwDoc * SwXTextDocument::GetRenderDoc( const TypeId aSwViewTypeId = TYPE(SwView); if (rpView && rpView->IsA(aSwViewTypeId)) { - SfxObjectShellRef xDocSh(((SwView*)rpView)->GetOrCreateTmpSelectionDoc()); + SfxObjectShellLock xDocSh(((SwView*)rpView)->GetOrCreateTmpSelectionDoc()); if (xDocSh.Is()) { pDoc = ((SwDocShell*)&xDocSh)->GetDoc(); @@ -2446,33 +2441,28 @@ static void lcl_SavePrintUIOptionsToDocumentPrintData( const SwPrintUIOptions &rPrintUIOptions, bool bIsPDFEXport ) { - if (!rDoc.getPrintData()) - { - SwPrintData *pTmpData = new SwPrintData; - rDoc.setPrintData ( *pTmpData ); - delete pTmpData; // setPrintData does make its own copy! - } - - SwPrintData *pDocPrintData = rDoc.getPrintData(); - - pDocPrintData->SetPrintGraphic( rPrintUIOptions.IsPrintGraphics() ); - pDocPrintData->SetPrintTable( rPrintUIOptions.IsPrintTables() ); - pDocPrintData->SetPrintDraw( rPrintUIOptions.IsPrintDrawings() ); - pDocPrintData->SetPrintControl( rPrintUIOptions.IsPrintFormControls() ); - pDocPrintData->SetPrintLeftPage( rPrintUIOptions.IsPrintLeftPages() ); - pDocPrintData->SetPrintRightPage( rPrintUIOptions.IsPrintRightPages() ); - pDocPrintData->SetPrintReverse( rPrintUIOptions.IsPrintReverse() ); - pDocPrintData->SetPaperFromSetup( rPrintUIOptions.IsPaperFromSetup() ); - pDocPrintData->SetPrintEmptyPages( rPrintUIOptions.IsPrintEmptyPages( bIsPDFEXport ) ); - pDocPrintData->SetPrintPostIts( rPrintUIOptions.GetPrintPostItsType() ); - pDocPrintData->SetPrintProspect( rPrintUIOptions.IsPrintProspect() ); - pDocPrintData->SetPrintProspect_RTL( rPrintUIOptions.IsPrintProspectRTL() ); - pDocPrintData->SetPrintPageBackground( rPrintUIOptions.IsPrintPageBackground() ); - pDocPrintData->SetPrintBlackFont( rPrintUIOptions.IsPrintWithBlackTextColor() ); - // pDocPrintData->SetPrintSingleJobs( b ); handled by File/Print dialog itself - // pDocPrintData->SetFaxName( s ); n/a in File/Print dialog - pDocPrintData->SetPrintHiddenText( rPrintUIOptions.IsPrintHiddenText() ); - pDocPrintData->SetPrintTextPlaceholder( rPrintUIOptions.IsPrintTextPlaceholders() ); + SwPrintData aDocPrintData( rDoc.getPrintData() ); + + aDocPrintData.SetPrintGraphic( rPrintUIOptions.IsPrintGraphics() ); + aDocPrintData.SetPrintTable( rPrintUIOptions.IsPrintTables() ); + aDocPrintData.SetPrintDraw( rPrintUIOptions.IsPrintDrawings() ); + aDocPrintData.SetPrintControl( rPrintUIOptions.IsPrintFormControls() ); + aDocPrintData.SetPrintLeftPage( rPrintUIOptions.IsPrintLeftPages() ); + aDocPrintData.SetPrintRightPage( rPrintUIOptions.IsPrintRightPages() ); + aDocPrintData.SetPrintReverse( rPrintUIOptions.IsPrintReverse() ); + aDocPrintData.SetPaperFromSetup( rPrintUIOptions.IsPaperFromSetup() ); + aDocPrintData.SetPrintEmptyPages( rPrintUIOptions.IsPrintEmptyPages( bIsPDFEXport ) ); + aDocPrintData.SetPrintPostIts( rPrintUIOptions.GetPrintPostItsType() ); + aDocPrintData.SetPrintProspect( rPrintUIOptions.IsPrintProspect() ); + aDocPrintData.SetPrintProspect_RTL( rPrintUIOptions.IsPrintProspectRTL() ); + aDocPrintData.SetPrintPageBackground( rPrintUIOptions.IsPrintPageBackground() ); + aDocPrintData.SetPrintBlackFont( rPrintUIOptions.IsPrintWithBlackTextColor() ); + // aDocPrintData.SetPrintSingleJobs( b ); handled by File/Print dialog itself + // arDocPrintData.SetFaxName( s ); n/a in File/Print dialog + aDocPrintData.SetPrintHiddenText( rPrintUIOptions.IsPrintHiddenText() ); + aDocPrintData.SetPrintTextPlaceholder( rPrintUIOptions.IsPrintTextPlaceholders() ); + + rDoc.setPrintData( aDocPrintData ); } sal_Int32 SAL_CALL SwXTextDocument::getRendererCount( @@ -2543,14 +2533,15 @@ sal_Int32 SAL_CALL SwXTextDocument::getRendererCount( m_pRenderData->ViewOptionAdjustStart( *pWrtShell, *pWrtShell->GetViewOptions() ); } - m_pRenderData->SetSwPrtOptions( new SwPrtOptions( bIsPDFExport ? rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PDF export")) : rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Printing") ) ) ); + m_pRenderData->SetSwPrtOptions( new SwPrintData ); m_pRenderData->MakeSwPrtOptions( m_pRenderData->GetSwPrtOptionsRef(), pRenderDocShell, m_pPrintUIOptions, m_pRenderData, bIsPDFExport ); if (pView->IsA(aSwViewTypeId)) { // PDF export should not make use of the SwPrtOptions - const SwPrtOptions *pPrtOptions = bIsPDFExport? NULL : m_pRenderData->GetSwPrtOptions(); + const SwPrintData *pPrtOptions = (bIsPDFExport) + ? NULL : m_pRenderData->GetSwPrtOptions(); m_pRenderData->ViewOptionAdjust( pPrtOptions ); } @@ -2568,7 +2559,7 @@ sal_Int32 SAL_CALL SwXTextDocument::getRendererCount( // --> FME 2005-05-23 #122919# Force field update before PDF export: - pWrtShell->ViewShell::UpdateFlds(TRUE); + pWrtShell->ViewShell::UpdateFlds(sal_True); // <-- if( bStateChanged ) pRenderDocShell->EnableSetModified( sal_True ); @@ -2682,7 +2673,7 @@ uno::Sequence< beans::PropertyValue > SAL_CALL SwXTextDocument::getRenderer( // determine the correct page number from the renderer index // --> OD 2010-10-01 #i114875 // consider brochure print - const USHORT nPage = bPrintProspect + const sal_uInt16 nPage = bPrintProspect ? nRenderer + 1 : m_pRenderData->GetPagesToPrint()[ nRenderer ]; // <-- @@ -2722,6 +2713,9 @@ uno::Sequence< beans::PropertyValue > SAL_CALL SwXTextDocument::getRenderer( aTmpSize = pPrinter->LogicToLogic( aTmpSize, pPrinter->GetMapMode(), MapMode( MAP_100TH_MM )); aPageSize = awt::Size( aTmpSize.Width(), aTmpSize.Height() ); + #if 0 + // #i115048# it seems users didn't like getting double the formatted page size + // revert to "old" behavior scaling to the current paper size of the printer if (bPrintProspect) { // we just state what output size we would need @@ -2731,6 +2725,20 @@ uno::Sequence< beans::PropertyValue > SAL_CALL SwXTextDocument::getRenderer( aPreferredPageSize = awt::Size ( TWIP_TO_MM100( 2 * aTmpSize.Width() ), TWIP_TO_MM100( aTmpSize.Height() )); } + #else + if( bPrintProspect ) + { + // just switch to an appropriate portrait/landscape format + // FIXME: brochure printing with landscape pages puts the + // pages next to each other, so landscape is currently always + // the better choice + if( aPageSize.Width < aPageSize.Height ) + { + aPreferredPageSize.Width = aPageSize.Height; + aPreferredPageSize.Height = aPageSize.Width; + } + } + #endif } } else @@ -2906,7 +2914,8 @@ void SAL_CALL SwXTextDocument::render( } // <-- - const SwPrtOptions &rSwPrtOptions = *m_pRenderData->GetSwPrtOptions(); + SwPrintData const& rSwPrtOptions = + *m_pRenderData->GetSwPrtOptions(); if (bPrintProspect) pVwSh->PrintProspect( pOut, rSwPrtOptions, nRenderer ); else // normal printing and PDF export @@ -2981,8 +2990,12 @@ uno::Reference< util::XCloneable > SwXTextDocument::createClone( ) throw (uno:: SolarMutexGuard aGuard; if(!IsValid()) throw RuntimeException(); - //create a new document - hidden - copy the storage and return it - SfxObjectShell* pShell = pDocShell->GetDoc()->CreateCopy(false); + + // create a new document - hidden - copy the storage and return it + // SfxObjectShellRef is used here, since the model should control object lifetime after creation + // and thus SfxObjectShellLock is not allowed here + // the model holds reference to the shell, so the shell will not destructed at the end of method + SfxObjectShellRef pShell = pDocShell->GetDoc()->CreateCopy(false); uno::Reference< frame::XModel > xNewModel = pShell->GetModel(); uno::Reference< embed::XStorage > xNewStorage = ::comphelper::OStorageHelper::GetTemporaryStorage( ); uno::Sequence< beans::PropertyValue > aTempMediaDescriptor; @@ -3036,50 +3049,50 @@ uno::Sequence< lang::Locale > SAL_CALL SwXTextDocument::getDocumentLanguages( //USER STYLES const SwCharFmts *pFmts = pDoc->GetCharFmts(); - for(USHORT i = 0; i < pFmts->Count(); ++i) + for(sal_uInt16 i = 0; i < pFmts->Count(); ++i) { const SwAttrSet &rAttrSet = (*pFmts)[i]->GetAttrSet(); LanguageType nLang = LANGUAGE_DONTKNOW; if (bLatin) { - nLang = rAttrSet.GetLanguage( FALSE ).GetLanguage(); + nLang = rAttrSet.GetLanguage( sal_False ).GetLanguage(); if (nLang != LANGUAGE_DONTKNOW && nLang != LANGUAGE_SYSTEM) aAllLangs.insert( nLang ); } if (bAsian) { - nLang = rAttrSet.GetCJKLanguage( FALSE ).GetLanguage(); + nLang = rAttrSet.GetCJKLanguage( sal_False ).GetLanguage(); if (nLang != LANGUAGE_DONTKNOW && nLang != LANGUAGE_SYSTEM) aAllLangs.insert( nLang ); } if (bComplex) { - nLang = rAttrSet.GetCTLLanguage( FALSE ).GetLanguage(); + nLang = rAttrSet.GetCTLLanguage( sal_False ).GetLanguage(); if (nLang != LANGUAGE_DONTKNOW && nLang != LANGUAGE_SYSTEM) aAllLangs.insert( nLang ); } } const SwTxtFmtColls *pColls = pDoc->GetTxtFmtColls(); - for (USHORT i = 0; i < pColls->Count(); ++i) + for (sal_uInt16 i = 0; i < pColls->Count(); ++i) { const SwAttrSet &rAttrSet = (*pColls)[i]->GetAttrSet(); LanguageType nLang = LANGUAGE_DONTKNOW;; if (bLatin) { - nLang = rAttrSet.GetLanguage( FALSE ).GetLanguage(); + nLang = rAttrSet.GetLanguage( sal_False ).GetLanguage(); if (nLang != LANGUAGE_DONTKNOW && nLang != LANGUAGE_SYSTEM) aAllLangs.insert( nLang ); } if (bAsian) { - nLang = rAttrSet.GetCJKLanguage( FALSE ).GetLanguage(); + nLang = rAttrSet.GetCJKLanguage( sal_False ).GetLanguage(); if (nLang != LANGUAGE_DONTKNOW && nLang != LANGUAGE_SYSTEM) aAllLangs.insert( nLang ); } if (bComplex) { - nLang = rAttrSet.GetCTLLanguage( FALSE ).GetLanguage(); + nLang = rAttrSet.GetCTLLanguage( sal_False ).GetLanguage(); if (nLang != LANGUAGE_DONTKNOW && nLang != LANGUAGE_SYSTEM) aAllLangs.insert( nLang ); } @@ -3104,19 +3117,19 @@ uno::Sequence< lang::Locale > SAL_CALL SwXTextDocument::getDocumentLanguages( LanguageType nLang = LANGUAGE_DONTKNOW; if (bLatin) { - nLang = dynamic_cast< const SvxLanguageItem & >(pSet->Get( RES_CHRATR_LANGUAGE, FALSE )).GetLanguage(); + nLang = dynamic_cast< const SvxLanguageItem & >(pSet->Get( RES_CHRATR_LANGUAGE, sal_False )).GetLanguage(); if (nLang != LANGUAGE_DONTKNOW && nLang != LANGUAGE_SYSTEM) aAllLangs.insert( nLang ); } if (bAsian) { - nLang = dynamic_cast< const SvxLanguageItem & >(pSet->Get( RES_CHRATR_CJK_LANGUAGE, FALSE )).GetLanguage(); + nLang = dynamic_cast< const SvxLanguageItem & >(pSet->Get( RES_CHRATR_CJK_LANGUAGE, sal_False )).GetLanguage(); if (nLang != LANGUAGE_DONTKNOW && nLang != LANGUAGE_SYSTEM) aAllLangs.insert( nLang ); } if (bComplex) { - nLang = dynamic_cast< const SvxLanguageItem & >(pSet->Get( RES_CHRATR_CTL_LANGUAGE, FALSE )).GetLanguage(); + nLang = dynamic_cast< const SvxLanguageItem & >(pSet->Get( RES_CHRATR_CTL_LANGUAGE, sal_False )).GetLanguage(); if (nLang != LANGUAGE_DONTKNOW && nLang != LANGUAGE_SYSTEM) aAllLangs.insert( nLang ); } @@ -3133,38 +3146,38 @@ uno::Sequence< lang::Locale > SAL_CALL SwXTextDocument::getDocumentLanguages( if(pOutliner) { EditEngine& rEditEng = (EditEngine&)pOutliner->GetEditEngine(); - ULONG nParCount = pOutliner->GetParagraphCount(); - for (ULONG nPar=0; nPar<nParCount; nPar++) + sal_uLong nParCount = pOutliner->GetParagraphCount(); + for (sal_uLong nPar=0; nPar<nParCount; nPar++) { //every paragraph SvUShorts aPortions; - rEditEng.GetPortions( (USHORT)nPar, aPortions ); + rEditEng.GetPortions( (sal_uInt16)nPar, aPortions ); - for ( USHORT nPos = aPortions.Count(); nPos; ) + for ( sal_uInt16 nPos = aPortions.Count(); nPos; ) { //every position --nPos; - USHORT nEnd = aPortions.GetObject( nPos ); - USHORT nStart = nPos ? aPortions.GetObject( nPos - 1 ) : 0; - ESelection aSelection( (USHORT)nPar, nStart, (USHORT)nPar, nEnd ); + sal_uInt16 nEnd = aPortions.GetObject( nPos ); + sal_uInt16 nStart = nPos ? aPortions.GetObject( nPos - 1 ) : 0; + ESelection aSelection( (sal_uInt16)nPar, nStart, (sal_uInt16)nPar, nEnd ); SfxItemSet aAttr = rEditEng.GetAttribs( aSelection ); LanguageType nLang = LANGUAGE_DONTKNOW; if (bLatin) { - nLang = dynamic_cast< const SvxLanguageItem & >(aAttr.Get( EE_CHAR_LANGUAGE, FALSE )).GetLanguage(); + nLang = dynamic_cast< const SvxLanguageItem & >(aAttr.Get( EE_CHAR_LANGUAGE, sal_False )).GetLanguage(); if (nLang != LANGUAGE_DONTKNOW && nLang != LANGUAGE_SYSTEM) aAllLangs.insert( nLang ); } if (bAsian) { - nLang = dynamic_cast< const SvxLanguageItem & >(aAttr.Get( EE_CHAR_LANGUAGE_CJK, FALSE )).GetLanguage(); + nLang = dynamic_cast< const SvxLanguageItem & >(aAttr.Get( EE_CHAR_LANGUAGE_CJK, sal_False )).GetLanguage(); if (nLang != LANGUAGE_DONTKNOW && nLang != LANGUAGE_SYSTEM) aAllLangs.insert( nLang ); } if (bComplex) { - nLang = dynamic_cast< const SvxLanguageItem & >(aAttr.Get( EE_CHAR_LANGUAGE_CTL, FALSE )).GetLanguage(); + nLang = dynamic_cast< const SvxLanguageItem & >(aAttr.Get( EE_CHAR_LANGUAGE_CTL, sal_False )).GetLanguage(); if (nLang != LANGUAGE_DONTKNOW && nLang != LANGUAGE_SYSTEM) aAllLangs.insert( nLang ); } @@ -3805,8 +3818,8 @@ SwViewOptionAdjust_Impl::~SwViewOptionAdjust_Impl() m_rShell.ApplyViewOptions( m_aOldViewOptions ); } -void SwViewOptionAdjust_Impl::AdjustViewOptions( - const SwPrtOptions *pPrtOptions ) +void +SwViewOptionAdjust_Impl::AdjustViewOptions(SwPrintData const*const pPrtOptions) { // to avoid unnecessary reformatting the view options related to the content // below should only change if necessary, that is if respective content is present @@ -3824,15 +3837,15 @@ void SwViewOptionAdjust_Impl::AdjustViewOptions( // disable anything in the view that should not be printed (or exported to PDF) by default // (see also dialog "Tools/Options - StarOffice Writer - Formatting Aids" // in section "Display of ...") - aRenderViewOptions.SetParagraph( FALSE ); // paragraph end - aRenderViewOptions.SetSoftHyph( FALSE ); // aka custom hyphens - aRenderViewOptions.SetBlank( FALSE ); // spaces - aRenderViewOptions.SetHardBlank( FALSE ); // non-breaking spaces - aRenderViewOptions.SetTab( FALSE ); // tabs - aRenderViewOptions.SetLineBreak( FALSE ); // breaks (type 1) - aRenderViewOptions.SetPageBreak( FALSE ); // breaks (type 2) - aRenderViewOptions.SetColumnBreak( FALSE ); // breaks (type 3) - BOOL bVal = pPrtOptions? pPrtOptions->bPrintHiddenText : FALSE; + aRenderViewOptions.SetParagraph( sal_False ); // paragraph end + aRenderViewOptions.SetSoftHyph( sal_False ); // aka custom hyphens + aRenderViewOptions.SetBlank( sal_False ); // spaces + aRenderViewOptions.SetHardBlank( sal_False ); // non-breaking spaces + aRenderViewOptions.SetTab( sal_False ); // tabs + aRenderViewOptions.SetLineBreak( sal_False ); // breaks (type 1) + aRenderViewOptions.SetPageBreak( sal_False ); // breaks (type 2) + aRenderViewOptions.SetColumnBreak( sal_False ); // breaks (type 3) + sal_Bool bVal = pPrtOptions? pPrtOptions->bPrintHiddenText : sal_False; if (bContainsHiddenChars) aRenderViewOptions.SetShowHiddenChar( bVal ); // hidden text if (bContainsHiddenFields) @@ -3843,16 +3856,16 @@ void SwViewOptionAdjust_Impl::AdjustViewOptions( if (bContainsPlaceHolders) { // should always be printed in PDF export! - bVal = pPrtOptions ? pPrtOptions->bPrintTextPlaceholder : TRUE; + bVal = pPrtOptions ? pPrtOptions->bPrintTextPlaceholder : sal_True; aRenderViewOptions.SetShowPlaceHolderFields( bVal ); } if (bContainsFields) - aRenderViewOptions.SetFldName( FALSE ); + aRenderViewOptions.SetFldName( sal_False ); // we need to set this flag in order to get to see the visible effect of // some of the above settings (needed for correct rendering) - aRenderViewOptions.SetViewMetaChars( TRUE ); + aRenderViewOptions.SetViewMetaChars( sal_True ); if (m_aOldViewOptions != aRenderViewOptions) // check if reformatting is necessary { diff --git a/sw/source/ui/uno/unotxvw.cxx b/sw/source/ui/uno/unotxvw.cxx index 8c4265e386..c10ba278f5 100644 --- a/sw/source/ui/uno/unotxvw.cxx +++ b/sw/source/ui/uno/unotxvw.cxx @@ -747,11 +747,11 @@ Sequence< Sequence< PropertyValue > > SwXTextView::getRubyList( sal_Bool /*bAuto SwDoc* pDoc = m_pView->GetDocShell()->GetDoc(); SwRubyList aList; - USHORT nCount = pDoc->FillRubyList( *rSh.GetCrsr(), aList, 0 ); + sal_uInt16 nCount = pDoc->FillRubyList( *rSh.GetCrsr(), aList, 0 ); Sequence< Sequence< PropertyValue > > aRet(nCount); Sequence< PropertyValue >* pRet = aRet.getArray(); String aString; - for(USHORT n = 0; n < nCount; n++) + for(sal_uInt16 n = 0; n < nCount; n++) { const SwRubyListEntryPtr pEntry = aList[n]; @@ -843,20 +843,23 @@ void SAL_CALL SwXTextView::setRubyList( pEntry->GetRubyAttr().SetPosition(bValue ? 0 : 1); } } - aList.Insert(pEntry, (USHORT)nPos); + aList.Insert(pEntry, (sal_uInt16)nPos); } SwDoc* pDoc = m_pView->GetDocShell()->GetDoc(); pDoc->SetRubyList( *rSh.GetCrsr(), aList, 0 ); } -SfxObjectShellRef SwXTextView::BuildTmpSelectionDoc( SfxObjectShellRef& /*rRef*/ ) +SfxObjectShellLock SwXTextView::BuildTmpSelectionDoc() { SwWrtShell& rOldSh = m_pView->GetWrtShell(); SfxPrinter *pPrt = rOldSh.getIDocumentDeviceAccess()->getPrinter( false ); SwDocShell* pDocSh; - SfxObjectShellRef xDocSh( pDocSh = new SwDocShell( /*pPrtDoc, */SFX_CREATE_MODE_STANDARD ) ); + SfxObjectShellLock xDocSh( pDocSh = new SwDocShell( /*pPrtDoc, */SFX_CREATE_MODE_STANDARD ) ); xDocSh->DoInitNew( 0 ); - rOldSh.FillPrtDoc(pDocSh->GetDoc(), pPrt); + SwDoc *const pTempDoc( pDocSh->GetDoc() ); + // #i103634#, #i112425#: do not expand numbering and fields on PDF export + pTempDoc->SetClipBoard(true); + rOldSh.FillPrtDoc(pTempDoc, pPrt); SfxViewFrame* pDocFrame = SfxViewFrame::LoadHiddenDocument( *xDocSh, 0 ); SwView* pDocView = (SwView*) pDocFrame->GetViewShell(); pDocView->AttrChangedNotify( &pDocView->GetWrtShell() );//Damit SelectShell gerufen wird. @@ -990,7 +993,7 @@ uno::Any SAL_CALL SwXTextView::getPropertyValue( if (nWID == WID_PAGE_COUNT) nCount = m_pView->GetDocShell()->GetDoc()->GetPageCount(); else // WID_LINE_COUNT - nCount = m_pView->GetWrtShell().GetLineCount( FALSE /*of whole document*/ ); + nCount = m_pView->GetWrtShell().GetLineCount( sal_False /*of whole document*/ ); aRet <<= nCount; } break; @@ -1002,7 +1005,7 @@ uno::Any SAL_CALL SwXTextView::getPropertyValue( const SwViewOption *pOpt = m_pView->GetWrtShell().GetViewOptions(); if (!pOpt) throw RuntimeException(); - UINT32 nFlag = VIEWOPT_1_ONLINESPELL; + sal_uInt32 nFlag = VIEWOPT_1_ONLINESPELL; sal_Bool bVal = 0 != (pOpt->GetCoreOptions() & nFlag); aRet <<= bVal; } @@ -1424,7 +1427,7 @@ sal_Bool SwXTextViewCursor::jumpToFirstPage(void) throw( uno::RuntimeException ) rSh.LeaveSelFrmMode(); } rSh.EnterStdMode(); - bRet = rSh.SttEndDoc(TRUE); + bRet = rSh.SttEndDoc(sal_True); } else throw uno::RuntimeException(); @@ -1444,7 +1447,7 @@ sal_Bool SwXTextViewCursor::jumpToLastPage(void) throw( uno::RuntimeException ) rSh.LeaveSelFrmMode(); } rSh.EnterStdMode(); - bRet = rSh.SttEndDoc(FALSE); + bRet = rSh.SttEndDoc(sal_False); rSh.SttPg(); } else @@ -1457,7 +1460,7 @@ sal_Bool SwXTextViewCursor::jumpToPage(sal_Int16 nPage) throw( uno::RuntimeExcep SolarMutexGuard aGuard; sal_Bool bRet = sal_False; if(m_pView) - bRet = m_pView->GetWrtShell().GotoPage(nPage, TRUE); + bRet = m_pView->GetWrtShell().GotoPage(nPage, sal_True); else throw uno::RuntimeException(); return bRet; @@ -1515,7 +1518,7 @@ sal_Int16 SwXTextViewCursor::getPage(void) throw( uno::RuntimeException ) { SwWrtShell& rSh = m_pView->GetWrtShell(); SwPaM* pShellCrsr = rSh.GetCrsr(); - nRet = (short)pShellCrsr->GetPageNum( TRUE, 0 ); + nRet = (short)pShellCrsr->GetPageNum( sal_True, 0 ); } else throw uno::RuntimeException(); @@ -1984,8 +1987,8 @@ uno::Reference< datatransfer::XTransferable > SAL_CALL SwXTextView::getTransfera else { SwTransferable* pTransfer = new SwTransferable( rSh ); - const BOOL bLockedView = rSh.IsViewLocked(); - rSh.LockView( TRUE ); //lock visible section + const sal_Bool bLockedView = rSh.IsViewLocked(); + rSh.LockView( sal_True ); //lock visible section pTransfer->PrepareForCopy(); rSh.LockView( bLockedView ); return uno::Reference< datatransfer::XTransferable >( pTransfer ); @@ -2003,7 +2006,7 @@ void SAL_CALL SwXTextView::insertTransferable( const uno::Reference< datatransfe { SdrView *pSdrView = rSh.GetDrawView(); OutlinerView* pOLV = pSdrView->GetTextEditOutlinerView(); - pOLV->GetEditView().InsertText( xTrans, GetView()->GetDocShell()->GetMedium()->GetBaseURL(), FALSE ); + pOLV->GetEditView().InsertText( xTrans, GetView()->GetDocShell()->GetMedium()->GetBaseURL(), sal_False ); } else { diff --git a/sw/source/ui/utlui/attrdesc.cxx b/sw/source/ui/utlui/attrdesc.cxx index 392c76ff42..c151976dc5 100644 --- a/sw/source/ui/utlui/attrdesc.cxx +++ b/sw/source/ui/utlui/attrdesc.cxx @@ -87,7 +87,7 @@ static sal_Char const sKomma[] = ", "; SfxItemIter aIter( *this ); const IntlWrapper rInt( ::comphelper::getProcessServiceFactory(), GetAppLanguage() ); - while( TRUE ) + while( sal_True ) { aIter.GetCurItem()->GetPresentation( ePres, eCoreMetric, ePresMetric, aStr, @@ -283,7 +283,7 @@ SfxItemPresentation SwRegisterItem::GetPresentation case SFX_ITEM_PRESENTATION_NAMELESS: case SFX_ITEM_PRESENTATION_COMPLETE: { - USHORT nId = GetValue() ? STR_REGISTER_ON : STR_REGISTER_OFF; + sal_uInt16 nId = GetValue() ? STR_REGISTER_ON : STR_REGISTER_OFF; rText = SW_RESSTR( nId ); return ePres; } @@ -346,7 +346,7 @@ SfxItemPresentation SwParaConnectBorderItem::GetPresentation case SFX_ITEM_PRESENTATION_NAMELESS: case SFX_ITEM_PRESENTATION_COMPLETE: { - USHORT nId = GetValue() ? STR_CONNECT_BORDER_ON : STR_CONNECT_BORDER_OFF; + sal_uInt16 nId = GetValue() ? STR_CONNECT_BORDER_ON : STR_CONNECT_BORDER_OFF; rText = SW_RESSTR( nId ); return ePres; } @@ -397,7 +397,7 @@ SfxItemPresentation SwFmtFrmSize::GetPresentation { rText += ','; rText += ' '; - const USHORT nId = ATT_FIX_SIZE == eFrmHeightType ? + const sal_uInt16 nId = ATT_FIX_SIZE == eFrmHeightType ? STR_FRM_FIXEDHEIGHT : STR_FRM_MINHEIGHT; rText += SW_RESSTR( nId ); rText += ' '; @@ -440,7 +440,7 @@ SfxItemPresentation SwFmtHeader::GetPresentation case SFX_ITEM_PRESENTATION_NAMELESS: case SFX_ITEM_PRESENTATION_COMPLETE: { - const USHORT nId = GetHeaderFmt() ? STR_HEADER : STR_NO_HEADER; + const sal_uInt16 nId = GetHeaderFmt() ? STR_HEADER : STR_NO_HEADER; rText = SW_RESSTR( nId ); return ePres; } @@ -470,7 +470,7 @@ SfxItemPresentation SwFmtFooter::GetPresentation case SFX_ITEM_PRESENTATION_NAMELESS: case SFX_ITEM_PRESENTATION_COMPLETE: { - const USHORT nId = GetFooterFmt() ? STR_FOOTER : STR_NO_FOOTER; + const sal_uInt16 nId = GetFooterFmt() ? STR_FOOTER : STR_NO_FOOTER; rText = SW_RESSTR( nId ); return ePres; } @@ -497,7 +497,7 @@ SfxItemPresentation SwFmtSurround::GetPresentation case SFX_ITEM_PRESENTATION_NAMELESS: case SFX_ITEM_PRESENTATION_COMPLETE: { - USHORT nId = 0; + sal_uInt16 nId = 0; switch ( (SwSurround)GetValue() ) { case SURROUND_NONE: @@ -557,7 +557,7 @@ SfxItemPresentation SwFmtVertOrient::GetPresentation case SFX_ITEM_PRESENTATION_NAMELESS: case SFX_ITEM_PRESENTATION_COMPLETE: { - USHORT nId = 0; + sal_uInt16 nId = 0; switch ( GetVertOrient() ) { case text::VertOrientation::NONE: @@ -618,7 +618,7 @@ SfxItemPresentation SwFmtHoriOrient::GetPresentation case SFX_ITEM_PRESENTATION_NAMELESS: case SFX_ITEM_PRESENTATION_COMPLETE: { - USHORT nId = 0; + sal_uInt16 nId = 0; switch ( GetHoriOrient() ) { case text::HoriOrientation::NONE: @@ -678,7 +678,7 @@ SfxItemPresentation SwFmtAnchor::GetPresentation case SFX_ITEM_PRESENTATION_NAMELESS: case SFX_ITEM_PRESENTATION_COMPLETE: { - USHORT nId = 0; + sal_uInt16 nId = 0; switch ( GetAnchorId() ) { case FLY_AT_PARA: @@ -751,7 +751,7 @@ SfxItemPresentation SwFmtCol::GetPresentation case SFX_ITEM_PRESENTATION_NAMELESS: case SFX_ITEM_PRESENTATION_COMPLETE: { - USHORT nCnt = GetNumCols(); + sal_uInt16 nCnt = GetNumCols(); if ( nCnt > 1 ) { rText = String::CreateFromInt32(nCnt); @@ -759,7 +759,7 @@ SfxItemPresentation SwFmtCol::GetPresentation rText += SW_RESSTR( STR_COLUMNS ); if ( COLADJ_NONE != GetLineAdj() ) { - USHORT nWdth = USHORT(GetLineWidth()); + sal_uInt16 nWdth = sal_uInt16(GetLineWidth()); rText += ' '; rText += SW_RESSTR( STR_LINE_WIDTH ); rText += ' '; @@ -1017,7 +1017,7 @@ SfxItemPresentation SwTextGridItem::GetPresentation case SFX_ITEM_PRESENTATION_NAMELESS: case SFX_ITEM_PRESENTATION_COMPLETE: { - USHORT nId = 0; + sal_uInt16 nId = 0; switch ( GetGridType() ) { @@ -1069,7 +1069,7 @@ SfxItemPresentation SwMirrorGrf::GetPresentation( case SFX_ITEM_PRESENTATION_NAMELESS: case SFX_ITEM_PRESENTATION_COMPLETE: { - USHORT nId; + sal_uInt16 nId; switch( GetValue() ) { case RES_MIRROR_GRAPH_DONT: nId = STR_NO_MIRROR; break; @@ -1174,7 +1174,7 @@ SfxItemPresentation SwChannelGrf::GetPresentation( case SFX_ITEM_PRESENTATION_COMPLETE: if( SFX_ITEM_PRESENTATION_COMPLETE == ePres ) { - USHORT nId; + sal_uInt16 nId; switch ( Which() ) { case RES_GRFATR_CHANNELR: nId = STR_CHANNELR; break; @@ -1234,7 +1234,7 @@ SfxItemPresentation SwInvertGrf::GetPresentation( case SFX_ITEM_PRESENTATION_COMPLETE: if( SFX_ITEM_PRESENTATION_COMPLETE == ePres ) { - USHORT nId = 0 != GetValue() ? STR_INVERT : STR_INVERT_NOT; + sal_uInt16 nId = 0 != GetValue() ? STR_INVERT : STR_INVERT_NOT; rText = SW_RESSTR( nId ); } break; @@ -1280,7 +1280,7 @@ SfxItemPresentation SwDrawModeGrf::GetPresentation( case SFX_ITEM_PRESENTATION_COMPLETE: if( SFX_ITEM_PRESENTATION_COMPLETE == ePres ) { - USHORT nId; + sal_uInt16 nId; switch ( GetValue() ) { @@ -1313,7 +1313,7 @@ SfxItemPresentation SwFmtFollowTextFlow::GetPresentation( SfxItemPresentation eP break; case SFX_ITEM_PRESENTATION_COMPLETE: { - USHORT nId = GetValue() ? STR_FOLLOW_TEXT_FLOW : STR_DONT_FOLLOW_TEXT_FLOW; + sal_uInt16 nId = GetValue() ? STR_FOLLOW_TEXT_FLOW : STR_DONT_FOLLOW_TEXT_FLOW; rText = SW_RESSTR( nId ); } break; diff --git a/sw/source/ui/utlui/bookctrl.cxx b/sw/source/ui/utlui/bookctrl.cxx index 75a8468b36..cc28c8aaf0 100644 --- a/sw/source/ui/utlui/bookctrl.cxx +++ b/sw/source/ui/utlui/bookctrl.cxx @@ -57,10 +57,10 @@ class BookmarkPopup_Impl : public PopupMenu public: BookmarkPopup_Impl(); - USHORT GetCurId() const { return nCurId; } + sal_uInt16 GetCurId() const { return nCurId; } private: - USHORT nCurId; + sal_uInt16 nCurId; virtual void Select(); }; @@ -78,8 +78,8 @@ void BookmarkPopup_Impl::Select() // class SvxZoomStatusBarControl ------------------------------------------ -SwBookmarkControl::SwBookmarkControl( USHORT _nSlotId, - USHORT _nId, +SwBookmarkControl::SwBookmarkControl( sal_uInt16 _nSlotId, + sal_uInt16 _nId, StatusBar& rStb ) : SfxStatusBarControl( _nSlotId, _nId, rStb ) { @@ -90,7 +90,7 @@ SwBookmarkControl::~SwBookmarkControl() } void SwBookmarkControl::StateChanged( - USHORT /*nSID*/, SfxItemState eState, const SfxPoolItem* pState ) + sal_uInt16 /*nSID*/, SfxItemState eState, const SfxPoolItem* pState ) { if( eState != SFX_ITEM_AVAILABLE || pState->ISA( SfxVoidItem ) ) GetStatusBar().SetItemText( GetId(), String() ); @@ -118,8 +118,8 @@ void SwBookmarkControl::Command( const CommandEvent& rCEvt ) { IDocumentMarkAccess* const pMarkAccess = pWrtShell->getIDocumentMarkAccess(); IDocumentMarkAccess::const_iterator_t ppBookmarkStart = pMarkAccess->getBookmarksBegin(); - USHORT nPopupId = 1; - ::std::map<sal_Int32, USHORT> aBookmarkIdx; + sal_uInt16 nPopupId = 1; + ::std::map<sal_Int32, sal_uInt16> aBookmarkIdx; for(IDocumentMarkAccess::const_iterator_t ppBookmark = ppBookmarkStart; ppBookmark != pMarkAccess->getBookmarksEnd(); ppBookmark++) @@ -127,12 +127,12 @@ void SwBookmarkControl::Command( const CommandEvent& rCEvt ) if(IDocumentMarkAccess::BOOKMARK == IDocumentMarkAccess::GetType(**ppBookmark)) { aPop.InsertItem( nPopupId, ppBookmark->get()->GetName() ); - aBookmarkIdx[nPopupId] = static_cast<USHORT>(ppBookmark - ppBookmarkStart); + aBookmarkIdx[nPopupId] = static_cast<sal_uInt16>(ppBookmark - ppBookmarkStart); nPopupId++; } } aPop.Execute( &GetStatusBar(), rCEvt.GetMousePosPixel()); - USHORT nCurrId = aPop.GetCurId(); + sal_uInt16 nCurrId = aPop.GetCurId(); if( nCurrId != USHRT_MAX) { SfxUInt16Item aBookmark( FN_STAT_BOOKMARK, aBookmarkIdx[nCurrId] ); diff --git a/sw/source/ui/utlui/condedit.cxx b/sw/source/ui/utlui/condedit.cxx index 80ce1bc14a..653492788e 100644 --- a/sw/source/ui/utlui/condedit.cxx +++ b/sw/source/ui/utlui/condedit.cxx @@ -43,7 +43,7 @@ using namespace ::com::sun::star::uno; ConditionEdit::ConditionEdit( Window* pParent, const ResId& rResId ) : Edit( pParent, rResId ), DropTargetHelper( this ), - bBrackets( TRUE ), bEnableDrop( TRUE ) + bBrackets( sal_True ), bEnableDrop( sal_True ) { } diff --git a/sw/source/ui/utlui/content.cxx b/sw/source/ui/utlui/content.cxx index 855e0961b0..a63193ac55 100644 --- a/sw/source/ui/utlui/content.cxx +++ b/sw/source/ui/utlui/content.cxx @@ -83,7 +83,9 @@ #include <svx/svdpage.hxx> #include <svx/svdview.hxx> #include <vcl/scrbar.hxx> -#include <undobj.hxx> +#include <SwRewriter.hxx> +#include <hints.hxx> +#include <numrule.hxx> #include <swundo.hxx> #include <ndtxt.hxx> #include <PostItMgr.hxx> @@ -274,7 +276,7 @@ void SwContentType::Init(sal_Bool* pbInvalidateWindow) case CONTENT_TYPE_BOOKMARK: { IDocumentMarkAccess* const pMarkAccess = pWrtShell->getIDocumentMarkAccess(); - nMemberCount = static_cast<USHORT>(count_if( + nMemberCount = static_cast<sal_uInt16>(count_if( pMarkAccess->getBookmarksBegin(), pMarkAccess->getBookmarksEnd(), &lcl_IsUiVisibleBookmark)); @@ -307,7 +309,7 @@ void SwContentType::Init(sal_Bool* pbInvalidateWindow) { const String& rSectionName = pFmt->GetSection()->GetSectionName(); - BYTE nLevel = 0; + sal_uInt8 nLevel = 0; SwSectionFmt* pParentFmt = pFmt->GetParent(); while(pParentFmt) { @@ -634,7 +636,7 @@ void SwContentType::FillMemberList(sal_Bool* pbLevelOrVisibiblityChanged) { String sSectionName = pFmt->GetSection()->GetSectionName(); - BYTE nLevel = 0; + sal_uInt8 nLevel = 0; SwSectionFmt* pParentFmt = pFmt->GetParent(); while(pParentFmt) { @@ -787,7 +789,7 @@ void SwContentType::FillMemberList(sal_Bool* pbLevelOrVisibiblityChanged) pMember->Insert(pCnt); nMemberCount++; if(nOldMemberCount > (int)i && - (pOldMember->GetObject((USHORT)i))->IsInvisible() != pCnt->IsInvisible()) + (pOldMember->GetObject((sal_uInt16)i))->IsInvisible() != pCnt->IsInvisible()) *pbLevelOrVisibiblityChanged = sal_True; } } @@ -865,6 +867,7 @@ SwContentTree::SwContentTree(Window* pParent, const ResId& rResId) : aUpdTimer.SetTimeout(1000); Clear(); EnableContextMenuHandling(); + SetStyle( GetStyle() | WB_QUICK_SEARCH ); } SwContentTree::~SwContentTree() @@ -2292,7 +2295,7 @@ DragDropMode SwContentTree::NotifyStartDrag( Childs verschoben ***************************************************************************/ sal_Bool SwContentTree::NotifyMoving( SvLBoxEntry* pTarget, - SvLBoxEntry* pEntry, SvLBoxEntry*& , ULONG& ) + SvLBoxEntry* pEntry, SvLBoxEntry*& , sal_uLong& ) { if(!bDocChgdInDragging) { @@ -2331,7 +2334,7 @@ sal_Bool SwContentTree::NotifyMoving( SvLBoxEntry* pTarget, Childs verschoben ***************************************************************************/ sal_Bool SwContentTree::NotifyCopying( SvLBoxEntry* pTarget, - SvLBoxEntry* pEntry, SvLBoxEntry*& , ULONG& ) + SvLBoxEntry* pEntry, SvLBoxEntry*& , sal_uLong& ) { if(!bDocChgdInDragging) { @@ -2453,7 +2456,7 @@ void SwContentTree::KeyInput(const KeyEvent& rEvent) !pActiveShell->GetView().GetDocShell()->IsReadOnly()) { EditEntry(pEntry, EDIT_MODE_DELETE); - bViewHasChanged = TRUE; + bViewHasChanged = sal_True; GetParentWindow()->UpdateListBox(); TimerUpdate(&aUpdTimer); GrabFocus(); @@ -2466,7 +2469,7 @@ void SwContentTree::KeyInput(const KeyEvent& rEvent) void SwContentTree::RequestHelp( const HelpEvent& rHEvt ) { - BOOL bCallBase = TRUE; + sal_Bool bCallBase = sal_True; if( rHEvt.GetMode() & HELPMODE_QUICK ) { Point aPos( ScreenToOutputPixel( rHEvt.GetMousePosPixel() )); @@ -2565,13 +2568,13 @@ void SwContentTree::RequestHelp( const HelpEvent& rHEvt ) else Help::ShowQuickHelp( this, aItemRect, sEntry, QUICKHELP_LEFT|QUICKHELP_VCENTER ); - bCallBase = FALSE; + bCallBase = sal_False; } } else { Help::ShowQuickHelp( this, Rectangle(), aEmptyStr, 0 ); - bCallBase = FALSE; + bCallBase = sal_False; } } } @@ -2579,7 +2582,7 @@ void SwContentTree::RequestHelp( const HelpEvent& rHEvt ) Window::RequestHelp( rHEvt ); } -void SwContentTree::ExcecuteContextMenuAction( USHORT nSelectedPopupEntry ) +void SwContentTree::ExcecuteContextMenuAction( sal_uInt16 nSelectedPopupEntry ) { SvLBoxEntry* pFirst = FirstSelected(); switch( nSelectedPopupEntry ) @@ -2783,7 +2786,7 @@ void SwContentTree::EditEntry(SvLBoxEntry* pEntry, sal_uInt8 nMode) pActiveShell->StartUndo(UNDO_DELETE, &aRewriter); pActiveShell->GetView().GetViewFrame()->GetDispatcher()->Execute(FN_TABLE_SELECT_ALL); pActiveShell->DeleteRow(); - pActiveShell->EndUndo(UNDO_DELETE); + pActiveShell->EndUndo(); pActiveShell->EndAction(); } else if(nMode == EDIT_MODE_RENAME) @@ -3123,7 +3126,7 @@ sal_Bool NaviContentBookmark::Paste( TransferableDataHelper& rData ) xub_StrLen nPos = 0; aUrl = sStr.GetToken(0, NAVI_BOOKMARK_DELIM, nPos ); aDescr = sStr.GetToken(0, NAVI_BOOKMARK_DELIM, nPos ); - nDefDrag= (USHORT)sStr.GetToken(0, NAVI_BOOKMARK_DELIM, nPos ).ToInt32(); + nDefDrag= (sal_uInt16)sStr.GetToken(0, NAVI_BOOKMARK_DELIM, nPos ).ToInt32(); nDocSh = sStr.GetToken(0, NAVI_BOOKMARK_DELIM, nPos ).ToInt32(); } return bRet; diff --git a/sw/source/ui/utlui/glbltree.cxx b/sw/source/ui/utlui/glbltree.cxx index b711387fcc..8c2fdfd13c 100644 --- a/sw/source/ui/utlui/glbltree.cxx +++ b/sw/source/ui/utlui/glbltree.cxx @@ -108,7 +108,7 @@ using ::rtl::OUString; #define GLBL_TABPOS_SUB 5 const SfxObjectShell* SwGlobalTree::pShowShell = 0; -static const USHORT aHelpForMenu[] = +static const char* aHelpForMenu[] = { 0, // HID_GLBLTREE_UPDATE, //CTX_UPDATE @@ -138,24 +138,24 @@ static const USHORT aHelpForMenu[] = class SwGlobalFrameListener_Impl : public SfxListener { - BOOL bValid; + sal_Bool bValid; public: SwGlobalFrameListener_Impl(SfxViewFrame& rFrame) : - bValid(TRUE) + bValid(sal_True) { StartListening(rFrame); } virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ); - BOOL IsValid() const {return bValid;} + sal_Bool IsValid() const {return bValid;} }; void SwGlobalFrameListener_Impl::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint ) { if( rHint.ISA(SfxSimpleHint) && (((SfxSimpleHint&) rHint).GetId() == SFX_HINT_DYING)) - bValid = FALSE; + bValid = sal_False; } SwGlobalTree::SwGlobalTree(Window* pParent, const ResId& rResId) : @@ -170,9 +170,9 @@ SwGlobalTree::SwGlobalTree(Window* pParent, const ResId& rResId) : pDocContent ( NULL ), pDocInserter ( NULL ), - bIsInternalDrag ( FALSE ), - bLastEntryEmphasis ( FALSE ), - bIsImageListInitialized ( FALSE ) + bIsInternalDrag ( sal_False ), + bLastEntryEmphasis ( sal_False ), + bIsImageListInitialized ( sal_False ) { SetDragDropMode(SV_DRAGDROP_APP_COPY | @@ -182,7 +182,7 @@ SwGlobalTree::SwGlobalTree(Window* pParent, const ResId& rResId) : aUpdateTimer.SetTimeout(GLOBAL_UPDATE_TIMEOUT); aUpdateTimer.SetTimeoutHdl(LINK(this, SwGlobalTree, Timeout)); aUpdateTimer.Start(); - for(USHORT i = 0; i < GLOBAL_CONTEXT_COUNT; i++) + for(sal_uInt16 i = 0; i < GLOBAL_CONTEXT_COUNT; i++) { aContextStrings[i] = SW_RESSTR(i+ ST_GLOBAL_CONTEXT_FIRST); } @@ -204,19 +204,19 @@ sal_Int8 SwGlobalTree::ExecuteDrop( const ExecuteDropEvent& rEvt ) SvLBoxEntry* pLast = (SvLBoxEntry*)LastVisible(); if(pEmphasisEntry) { - ImplShowTargetEmphasis( Prev(pEmphasisEntry), FALSE ); + ImplShowTargetEmphasis( Prev(pEmphasisEntry), sal_False ); pEmphasisEntry = 0; } else if(bLastEntryEmphasis && pLast) { - ImplShowTargetEmphasis( pLast, FALSE); + ImplShowTargetEmphasis( pLast, sal_False); } SvLBoxEntry* pDropEntry = bLastEntryEmphasis ? 0 : GetEntry(rEvt.maPosPixel); if( bIsInternalDrag ) { SvLBoxEntry* pDummy = 0; - ULONG nInsertionPos = LIST_APPEND; + sal_uLong nInsertionPos = LIST_APPEND; NotifyMoving( pDropEntry, pDDSource, pDummy, nInsertionPos ); } else @@ -234,12 +234,12 @@ sal_Int8 SwGlobalTree::ExecuteDrop( const ExecuteDropEvent& rEvt ) int nAbsContPos = pDropEntry ? (int) GetModel()->GetAbsPos(pDropEntry): - 1; - USHORT nEntryCount = (USHORT)GetEntryCount(); + sal_uInt16 nEntryCount = (sal_uInt16)GetEntryCount(); // Daten holen FileList aFileList; aData.GetFileList( FORMAT_FILE_LIST, aFileList ); - for ( USHORT n = (USHORT)aFileList.Count(); n--; ) + for ( sal_uInt16 n = (sal_uInt16)aFileList.Count(); n--; ) { sFileName = aFileList.GetFile(n); InsertRegion(pCnt, &sFileName); @@ -255,7 +255,7 @@ sal_Int8 SwGlobalTree::ExecuteDrop( const ExecuteDropEvent& rEvt ) { nEntryCount++; nAbsContPos++; - pCnt = pTempContents->GetObject( static_cast< USHORT >(nAbsContPos) ); + pCnt = pTempContents->GetObject( static_cast< sal_uInt16 >(nAbsContPos) ); } } } @@ -273,7 +273,7 @@ sal_Int8 SwGlobalTree::ExecuteDrop( const ExecuteDropEvent& rEvt ) } } } - bLastEntryEmphasis = FALSE; + bLastEntryEmphasis = sal_False; return nRet; } @@ -289,14 +289,14 @@ sal_Int8 SwGlobalTree::AcceptDrop( const AcceptDropEvent& rEvt ) { if( pEmphasisEntry ) { - ImplShowTargetEmphasis( Prev(pEmphasisEntry), FALSE ); + ImplShowTargetEmphasis( Prev(pEmphasisEntry), sal_False ); pEmphasisEntry = 0; } else if(bLastEntryEmphasis && pLast) { - ImplShowTargetEmphasis( pLast, FALSE); + ImplShowTargetEmphasis( pLast, sal_False); } - bLastEntryEmphasis = FALSE; + bLastEntryEmphasis = sal_False; } else { @@ -318,11 +318,11 @@ sal_Int8 SwGlobalTree::AcceptDrop( const AcceptDropEvent& rEvt ) nRet = DND_ACTION_LINK; if(pEmphasisEntry && pEmphasisEntry != pDropEntry) - ImplShowTargetEmphasis( Prev(pEmphasisEntry), FALSE ); + ImplShowTargetEmphasis( Prev(pEmphasisEntry), sal_False ); else if(pLast && bLastEntryEmphasis && pDropEntry) { - ImplShowTargetEmphasis( pLast, FALSE); - bLastEntryEmphasis = FALSE; + ImplShowTargetEmphasis( pLast, sal_False); + bLastEntryEmphasis = sal_False; } if(pDropEntry) @@ -330,7 +330,7 @@ sal_Int8 SwGlobalTree::AcceptDrop( const AcceptDropEvent& rEvt ) else if(pLast) { ImplShowTargetEmphasis( pLast, DND_ACTION_NONE != nRet ); - bLastEntryEmphasis = TRUE; + bLastEntryEmphasis = sal_True; } pEmphasisEntry = pDropEntry; } @@ -343,12 +343,12 @@ PopupMenu* SwGlobalTree::CreateContextMenu() if(pActiveShell && !pActiveShell->GetView().GetDocShell()->IsReadOnly()) { - USHORT nEnableFlags = GetEnableFlags(); + sal_uInt16 nEnableFlags = GetEnableFlags(); pPop = new PopupMenu; PopupMenu* pSubPop1 = new PopupMenu; PopupMenu* pSubPop2 = new PopupMenu; - for (USHORT i = CTX_UPDATE_SEL; i <= CTX_UPDATE_ALL; i++) + for (sal_uInt16 i = CTX_UPDATE_SEL; i <= CTX_UPDATE_ALL; i++) { pSubPop2->InsertItem( i, aContextStrings[ST_UPDATE_SEL - ST_GLOBAL_CONTEXT_FIRST - CTX_UPDATE_SEL+ i] ); pSubPop2->SetHelpId(i, aHelpForMenu[i]); @@ -398,13 +398,13 @@ PopupMenu* SwGlobalTree::CreateContextMenu() return pPop; } -void SwGlobalTree::TbxMenuHdl(USHORT nTbxId, ToolBox* pBox) +void SwGlobalTree::TbxMenuHdl(sal_uInt16 nTbxId, ToolBox* pBox) { - USHORT nEnableFlags = GetEnableFlags(); + sal_uInt16 nEnableFlags = GetEnableFlags(); if(FN_GLOBAL_OPEN == nTbxId) { PopupMenu *pMenu = new PopupMenu; - for (USHORT i = CTX_INSERT_ANY_INDEX; i <= CTX_INSERT_TEXT; i++) + for (sal_uInt16 i = CTX_INSERT_ANY_INDEX; i <= CTX_INSERT_TEXT; i++) { pMenu->InsertItem( i, aContextStrings[ST_INDEX - ST_GLOBAL_CONTEXT_FIRST - CTX_INSERT_ANY_INDEX + i] ); pMenu->SetHelpId(i, aHelpForMenu[i] ); @@ -422,7 +422,7 @@ void SwGlobalTree::TbxMenuHdl(USHORT nTbxId, ToolBox* pBox) else if(FN_GLOBAL_UPDATE == nTbxId) { PopupMenu *pMenu = new PopupMenu; - for (USHORT i = CTX_UPDATE_SEL; i <= CTX_UPDATE_ALL; i++) + for (sal_uInt16 i = CTX_UPDATE_SEL; i <= CTX_UPDATE_ALL; i++) { pMenu->InsertItem( i, aContextStrings[ST_UPDATE_SEL - ST_GLOBAL_CONTEXT_FIRST - CTX_UPDATE_SEL+ i] ); pMenu->SetHelpId(i, aHelpForMenu[i] ); @@ -436,14 +436,14 @@ void SwGlobalTree::TbxMenuHdl(USHORT nTbxId, ToolBox* pBox) } } -USHORT SwGlobalTree::GetEnableFlags() const +sal_uInt16 SwGlobalTree::GetEnableFlags() const { SvLBoxEntry* pEntry = FirstSelected(); - USHORT nSelCount = (USHORT)GetSelectionCount(); - USHORT nEntryCount = (USHORT)GetEntryCount(); + sal_uInt16 nSelCount = (sal_uInt16)GetSelectionCount(); + sal_uInt16 nEntryCount = (sal_uInt16)GetEntryCount(); SvLBoxEntry* pPrevEntry = pEntry ? Prev(pEntry) : 0; - USHORT nRet = 0; + sal_uInt16 nRet = 0; if(nSelCount == 1 || !nEntryCount) nRet |= ENABLE_INSERT_IDX|ENABLE_INSERT_FILE; if(nSelCount == 1) @@ -468,9 +468,9 @@ USHORT SwGlobalTree::GetEnableFlags() const void SwGlobalTree::RequestHelp( const HelpEvent& rHEvt ) { - BOOL bParent = TRUE; - Update(TRUE); - Display(TRUE); + sal_Bool bParent = sal_True; + Update(sal_True); + Display(sal_True); if( rHEvt.GetMode() & HELPMODE_QUICK ) { Point aPos( ScreenToOutputPixel( rHEvt.GetMousePosPixel() )); @@ -479,7 +479,7 @@ void SwGlobalTree::RequestHelp( const HelpEvent& rHEvt ) (const SwGlblDocContent*)pEntry->GetUserData() : 0; if( pCont && GLBLDOC_SECTION == pCont->GetType()) { - bParent = FALSE; + bParent = sal_False; SvLBoxTab* pTab; SvLBoxItem* pItem = GetItem( pEntry, aPos.X(), &pTab ); if(pItem && SV_ITEM_ID_LBOXSTRING == pItem->IsA()) @@ -517,11 +517,11 @@ void SwGlobalTree::RequestHelp( const HelpEvent& rHEvt ) void SwGlobalTree::SelectHdl() { - USHORT nSelCount = (USHORT)GetSelectionCount(); + sal_uInt16 nSelCount = (sal_uInt16)GetSelectionCount(); SvLBoxEntry* pSel = FirstSelected(); - USHORT nAbsPos = pSel ? (USHORT)GetModel()->GetAbsPos(pSel) : 0; + sal_uInt16 nAbsPos = pSel ? (sal_uInt16)GetModel()->GetAbsPos(pSel) : 0; SwNavigationPI* pNavi = GetParentWindow(); - BOOL bReadonly = !pActiveShell || + sal_Bool bReadonly = !pActiveShell || pActiveShell->GetView().GetDocShell()->IsReadOnly(); pNavi->aGlobalToolBox.EnableItem(FN_GLOBAL_EDIT, nSelCount == 1 && !bReadonly); pNavi->aGlobalToolBox.EnableItem(FN_GLOBAL_OPEN, nSelCount <= 1 && !bReadonly); @@ -529,7 +529,7 @@ void SwGlobalTree::SelectHdl() pNavi->aGlobalToolBox.EnableItem(FN_ITEM_UP, nSelCount == 1 && nAbsPos && !bReadonly); pNavi->aGlobalToolBox.EnableItem(FN_ITEM_DOWN, - nSelCount == 1 && nAbsPos < ((USHORT)GetEntryCount()) - 1 && !bReadonly); + nSelCount == 1 && nAbsPos < ((sal_uInt16)GetEntryCount()) - 1 && !bReadonly); } @@ -541,7 +541,7 @@ void SwGlobalTree::DeselectHdl() DragDropMode SwGlobalTree::NotifyStartDrag( TransferDataContainer& , SvLBoxEntry* pEntry ) { - bIsInternalDrag = TRUE; + bIsInternalDrag = sal_True; pDDSource = pEntry; return SV_DRAGDROP_CTRL_MOVE; } @@ -551,33 +551,33 @@ long SwGlobalTree::GetTabPos( SvLBoxEntry*, SvLBoxTab* pTab) return pTab->GetPos() - GLBL_TABPOS_SUB; } -BOOL SwGlobalTree::NotifyMoving( SvLBoxEntry* pTarget, +sal_Bool SwGlobalTree::NotifyMoving( SvLBoxEntry* pTarget, SvLBoxEntry* pSource, SvLBoxEntry*&, - ULONG& + sal_uLong& ) { SvTreeList* _pModel = GetModel(); - USHORT nSource = (USHORT) _pModel->GetAbsPos(pSource); - USHORT nDest = pTarget ? (USHORT) _pModel->GetAbsPos(pTarget) : pSwGlblDocContents->Count(); + sal_uInt16 nSource = (sal_uInt16) _pModel->GetAbsPos(pSource); + sal_uInt16 nDest = pTarget ? (sal_uInt16) _pModel->GetAbsPos(pTarget) : pSwGlblDocContents->Count(); if( pActiveShell->MoveGlobalDocContent( *pSwGlblDocContents, nSource, nSource + 1, nDest ) && - Update( FALSE )) + Update( sal_False )) Display(); - return FALSE; + return sal_False; } -BOOL SwGlobalTree::NotifyCopying( SvLBoxEntry* /*pTarget*/, +sal_Bool SwGlobalTree::NotifyCopying( SvLBoxEntry* /*pTarget*/, SvLBoxEntry* /*pEntry*/, SvLBoxEntry*& /*rpNewParent*/, - ULONG& /*rNewChildPos*/ + sal_uLong& /*rNewChildPos*/ ) { - return FALSE; + return sal_False; } -BOOL SwGlobalTree::NotifyAcceptDrop( SvLBoxEntry* pEntry) +sal_Bool SwGlobalTree::NotifyAcceptDrop( SvLBoxEntry* pEntry) { return pEntry != 0; } @@ -591,7 +591,7 @@ void SwGlobalTree::StartDrag( sal_Int8 nAction, const Point& rPt ) void SwGlobalTree::DragFinished( sal_Int8 nAction ) { SvTreeListBox::DragFinished( nAction ); - bIsInternalDrag = FALSE; + bIsInternalDrag = sal_False; } /*************************************************************************** @@ -601,7 +601,7 @@ void SwGlobalTree::DragFinished( sal_Int8 nAction ) void SwGlobalTree::MouseButtonDown( const MouseEvent& rMEvt ) { Point aPos( rMEvt.GetPosPixel()); - SvLBoxEntry* pEntry = GetEntry( aPos, TRUE ); + SvLBoxEntry* pEntry = GetEntry( aPos, sal_True ); if( !pEntry && rMEvt.IsLeft() && rMEvt.IsMod1() && (rMEvt.GetClicks() % 2) == 0) Control::MouseButtonDown( rMEvt ); else @@ -610,7 +610,7 @@ void SwGlobalTree::MouseButtonDown( const MouseEvent& rMEvt ) void SwGlobalTree::GetFocus() { - if(Update( FALSE )) + if(Update( sal_False )) Display(); SvTreeListBox::GetFocus(); } @@ -638,18 +638,18 @@ void SwGlobalTree::Clear() SvTreeListBox::Clear(); } -void SwGlobalTree::Display(BOOL bOnlyUpdateUserData) +void SwGlobalTree::Display(sal_Bool bOnlyUpdateUserData) { if(!bIsImageListInitialized) { aEntryImages = ImageList(SW_RES(IMG_NAVI_ENTRYBMP)); - bIsImageListInitialized = TRUE; + bIsImageListInitialized = sal_True; } - USHORT nCount = pSwGlblDocContents->Count(); + sal_uInt16 nCount = pSwGlblDocContents->Count(); if(bOnlyUpdateUserData && GetEntryCount() == pSwGlblDocContents->Count()) { SvLBoxEntry* pEntry = First(); - for( USHORT i = 0; i < nCount; i++) + for( sal_uInt16 i = 0; i < nCount; i++) { SwGlblDocContentPtr pCont = pSwGlblDocContents->GetObject(i); pEntry->SetUserData(pCont); @@ -658,21 +658,21 @@ void SwGlobalTree::Display(BOOL bOnlyUpdateUserData) } else { - SetUpdateMode( FALSE ); + SetUpdateMode( sal_False ); SvLBoxEntry* pOldSelEntry = FirstSelected(); String sEntryName; // Name des Eintrags - USHORT nSelPos = USHRT_MAX; + sal_uInt16 nSelPos = USHRT_MAX; if(pOldSelEntry) { sEntryName = GetEntryText(pOldSelEntry); - nSelPos = (USHORT)GetModel()->GetAbsPos(pOldSelEntry); + nSelPos = (sal_uInt16)GetModel()->GetAbsPos(pOldSelEntry); } Clear(); if(!pSwGlblDocContents) - Update( FALSE ); + Update( sal_False ); SvLBoxEntry* pSelEntry = 0; - for( USHORT i = 0; i < nCount; i++) + for( sal_uInt16 i = 0; i < nCount; i++) { SwGlblDocContentPtr pCont = pSwGlblDocContents->GetObject(i); String sEntry; @@ -701,7 +701,7 @@ void SwGlobalTree::Display(BOOL bOnlyUpdateUserData) break; } SvLBoxEntry* pEntry = InsertEntry(sEntry, aImage, aImage, - 0, FALSE, LIST_APPEND, pCont); + 0, sal_False, LIST_APPEND, pCont); if(sEntry == sEntryName) { pSelEntry = pEntry; @@ -719,7 +719,7 @@ void SwGlobalTree::Display(BOOL bOnlyUpdateUserData) Select(First()); else SelectHdl(); - SetUpdateMode( TRUE ); + SetUpdateMode( sal_True ); } } @@ -747,7 +747,7 @@ void SwGlobalTree::InsertRegion( const SwGlblDocContent* pCont, const String* pF void SwGlobalTree::EditContent(const SwGlblDocContent* pCont ) { - USHORT nSlot = 0; + sal_uInt16 nSlot = 0; switch( pCont->GetType() ) { case GLBLDOC_UNKNOWN: @@ -774,7 +774,7 @@ void SwGlobalTree::EditContent(const SwGlblDocContent* pCont ) if(nSlot) { pActiveShell->GetView().GetViewFrame()->GetDispatcher()->Execute(nSlot); - if(Update( FALSE )) + if(Update( sal_False )) Display(); } } @@ -782,10 +782,10 @@ void SwGlobalTree::EditContent(const SwGlblDocContent* pCont ) IMPL_LINK( SwGlobalTree, PopupHdl, Menu* , pMenu) { ExcecuteContextMenuAction( pMenu->GetCurItemId()); - return TRUE; + return sal_True; } -void SwGlobalTree::ExcecuteContextMenuAction( USHORT nSelectedPopupEntry ) +void SwGlobalTree::ExcecuteContextMenuAction( sal_uInt16 nSelectedPopupEntry ) { SvLBoxEntry* pEntry = FirstSelected(); SwGlblDocContent* pCont = pEntry ? (SwGlblDocContent*)pEntry->GetUserData() : 0; @@ -796,7 +796,7 @@ void SwGlobalTree::ExcecuteContextMenuAction( USHORT nSelectedPopupEntry ) if(pCont) pContCopy = new SwGlblDocContent(pCont->GetDocPos()); SfxDispatcher& rDispatch = *pActiveShell->GetView().GetViewFrame()->GetDispatcher(); - USHORT nSlot = 0; + sal_uInt16 nSlot = 0; bool bDeleteContentCopy = true; switch( nSelectedPopupEntry ) { @@ -835,7 +835,7 @@ void SwGlobalTree::ExcecuteContextMenuAction( USHORT nSelectedPopupEntry ) case CTX_UPDATE_LINK: case CTX_UPDATE_ALL: { - pActiveShell->GetLinkManager().UpdateAllLinks(TRUE); + pActiveShell->GetLinkManager().UpdateAllLinks(sal_True); if(CTX_UPDATE_ALL == nSelectedPopupEntry) nSlot = FN_UPDATE_TOX; pCont = 0; @@ -867,7 +867,7 @@ void SwGlobalTree::ExcecuteContextMenuAction( USHORT nSelectedPopupEntry ) { pActiveShell->DeleteGlobalDocContent( pTempContents ? *pTempContents : *pSwGlblDocContents, - (USHORT)GetModel()->GetAbsPos(pSelEntry)); + (sal_uInt16)GetModel()->GetAbsPos(pSelEntry)); pSelEntry = PrevSelected(pSelEntry); if(pSelEntry) { @@ -900,7 +900,7 @@ void SwGlobalTree::ExcecuteContextMenuAction( USHORT nSelectedPopupEntry ) *pActiveShell, 0, USHRT_MAX, - TRUE); + sal_True); OSL_ENSURE(pDlg, "Dialogdiet fail!"); if(RET_OK == pDlg->Execute()) { @@ -929,7 +929,7 @@ void SwGlobalTree::ExcecuteContextMenuAction( USHORT nSelectedPopupEntry ) SfxViewFrame* pGlobFrm = pActiveShell->GetView().GetViewFrame(); SwGlobalFrameListener_Impl aFrmListener(*pGlobFrm); - ULONG nEntryPos = pEntry ? GetModel()->GetAbsPos(pEntry) : (ULONG)-1; + sal_uLong nEntryPos = pEntry ? GetModel()->GetAbsPos(pEntry) : (sal_uLong)-1; // neues Dok anlegen SfxStringItem aFactory(SID_NEWDOCDIRECT, SwDocShell::Factory().GetFilterContainer()->GetName()); @@ -956,9 +956,9 @@ void SwGlobalTree::ExcecuteContextMenuAction( USHORT nSelectedPopupEntry ) { pGlobFrm->ToTop(); // durch das Update sind die Eintraege invalid - if(nEntryPos != (ULONG)-1) + if(nEntryPos != (sal_uLong)-1) { - Update( FALSE ); + Update( sal_False ); Display(); Select(GetModel()->GetEntryAtAbsPos(nEntryPos)); pEntry = FirstSelected(); @@ -993,7 +993,7 @@ void SwGlobalTree::ExcecuteContextMenuAction( USHORT nSelectedPopupEntry ) else { pActiveShell->SplitNode(); // leeres Dokument - pActiveShell->Up( FALSE, 1 ); + pActiveShell->Up( sal_False, 1 ); } pActiveShell->GetView().GetEditWin().GrabFocus(); } @@ -1008,7 +1008,7 @@ void SwGlobalTree::ExcecuteContextMenuAction( USHORT nSelectedPopupEntry ) GotoContent(pCont); if(nSlot) rDispatch.Execute(nSlot); - if(Update( FALSE )) + if(Update( sal_False )) Display(); if ( bDeleteContentCopy ) delete pContCopy; @@ -1018,7 +1018,7 @@ void SwGlobalTree::ExcecuteContextMenuAction( USHORT nSelectedPopupEntry ) IMPL_LINK( SwGlobalTree, Timeout, Timer*, EMPTYARG ) { - if(!HasFocus() && Update( FALSE )) + if(!HasFocus() && Update( sal_False )) Display(); return 0; } @@ -1057,7 +1057,7 @@ void SwGlobalTree::HideTree() SvTreeListBox::Hide(); } -void SwGlobalTree::ExecCommand(USHORT nCmd) +void SwGlobalTree::ExecCommand(sal_uInt16 nCmd) { SvLBoxEntry* pEntry = FirstSelected(); OSL_ENSURE(pEntry, "gleich knallt's"); @@ -1071,14 +1071,14 @@ void SwGlobalTree::ExecCommand(USHORT nCmd) { if(GetSelectionCount() == 1) { - BOOL bMove = FALSE; - USHORT nSource = (USHORT)GetModel()->GetAbsPos(pEntry); - USHORT nDest = nSource; + sal_Bool bMove = sal_False; + sal_uInt16 nSource = (sal_uInt16)GetModel()->GetAbsPos(pEntry); + sal_uInt16 nDest = nSource; switch(nCmd) { case FN_ITEM_DOWN: { - USHORT nEntryCount = (USHORT)GetEntryCount(); + sal_uInt16 nEntryCount = (sal_uInt16)GetEntryCount(); bMove = nEntryCount > nSource + 1; nDest+= 2; } @@ -1093,16 +1093,16 @@ void SwGlobalTree::ExecCommand(USHORT nCmd) } if( bMove && pActiveShell->MoveGlobalDocContent( *pSwGlblDocContents, nSource, nSource + 1, nDest ) && - Update( FALSE )) + Update( sal_False )) Display(); } } } -BOOL SwGlobalTree::Update(BOOL bHard) +sal_Bool SwGlobalTree::Update(sal_Bool bHard) { SwView* pActView = GetParentWindow()->GetCreateView(); - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; if(pActView && pActView->GetWrtShellPtr()) { const SwWrtShell* pOldShell = pActiveShell; @@ -1115,23 +1115,23 @@ BOOL SwGlobalTree::Update(BOOL bHard) if(!pSwGlblDocContents) { pSwGlblDocContents = new SwGlblDocContents; - bRet = TRUE; + bRet = sal_True; pActiveShell->GetGlobalDocContent(*pSwGlblDocContents); } else { - BOOL bCopy = FALSE; + sal_Bool bCopy = sal_False; SwGlblDocContents* pTempContents = new SwGlblDocContents; pActiveShell->GetGlobalDocContent(*pTempContents); if(pTempContents->Count() != pSwGlblDocContents->Count() || pTempContents->Count() != GetEntryCount()) { - bRet = TRUE; - bCopy = TRUE; + bRet = sal_True; + bCopy = sal_True; } else { - for(USHORT i = 0; i < pTempContents->Count() && !bCopy; i++) + for(sal_uInt16 i = 0; i < pTempContents->Count() && !bCopy; i++) { SwGlblDocContent* pLeft = pTempContents->GetObject(i); SwGlblDocContent* pRight = pSwGlblDocContents->GetObject(i); @@ -1150,13 +1150,13 @@ BOOL SwGlobalTree::Update(BOOL bHard) ) ) { - bCopy = bRet = TRUE; + bCopy = bRet = sal_True; } } } if(bCopy || bHard) { - USHORT i; + sal_uInt16 i; pSwGlblDocContents->DeleteAndDestroy(0, pSwGlblDocContents->Count()); for( i = 0; i < pTempContents->Count(); i++) @@ -1185,14 +1185,14 @@ void SwGlobalTree::OpenDoc(const SwGlblDocContent* pCont) { String sFileName(pCont->GetSection()->GetLinkFileName().GetToken(0, sfx2::cTokenSeperator)); - BOOL bFound = FALSE; + sal_Bool bFound = sal_False; const SfxObjectShell* pCurr = SfxObjectShell::GetFirst(); while( !bFound && pCurr ) { if(pCurr->GetMedium() && String(pCurr->GetMedium()->GetURLObject().GetMainURL(INetURLObject::DECODE_TO_IURI)) == sFileName) { - bFound = TRUE; + bFound = sal_True; SwGlobalTree::SetShowShell(pCurr); Application::PostUserEvent( STATIC_LINK( this, SwGlobalTree, ShowFrameHdl ) ); @@ -1205,7 +1205,7 @@ void SwGlobalTree::OpenDoc(const SwGlblDocContent* pCont) { SfxStringItem aURL(SID_FILE_NAME, sFileName); - SfxBoolItem aReadOnly(SID_DOC_READONLY, FALSE); + SfxBoolItem aReadOnly(SID_DOC_READONLY, sal_False); SfxStringItem aTargetFrameName( SID_TARGETNAME, String::CreateFromAscii("_blank") ); SfxStringItem aReferer(SID_REFERER, pActiveShell->GetView().GetDocShell()->GetTitle()); pActiveShell->GetView().GetViewFrame()->GetDispatcher()-> @@ -1240,14 +1240,14 @@ void SwGlobalTree::InitEntry(SvLBoxEntry* pEntry, const XubString& rStr ,const Image& rImg1,const Image& rImg2, SvLBoxButtonKind eButtonKind) { - USHORT nColToHilite = 1; //0==Bitmap;1=="Spalte1";2=="Spalte2" + sal_uInt16 nColToHilite = 1; //0==Bitmap;1=="Spalte1";2=="Spalte2" SvTreeListBox::InitEntry( pEntry, rStr, rImg1, rImg2, eButtonKind ); SvLBoxString* pCol = (SvLBoxString*)pEntry->GetItem( nColToHilite ); SwLBoxString* pStr = new SwLBoxString( pEntry, 0, pCol->GetText() ); pEntry->ReplaceItem( pStr, nColToHilite ); } -void SwLBoxString::Paint( const Point& rPos, SvLBox& rDev, USHORT nFlags, +void SwLBoxString::Paint( const Point& rPos, SvLBox& rDev, sal_uInt16 nFlags, SvLBoxEntry* pEntry ) { SwGlblDocContent* pCont = (SwGlblDocContent*)pEntry->GetUserData(); @@ -1282,24 +1282,24 @@ void SwGlobalTree::InsertRegion( const SwGlblDocContent* _pContent, const Sequen sal_Int32 nFiles = _rFiles.getLength(); if ( nFiles ) { - BOOL bMove = FALSE; + sal_Bool bMove = sal_False; if ( !_pContent ) { SvLBoxEntry* pLast = (SvLBoxEntry*)LastVisible(); _pContent = (SwGlblDocContent*)pLast->GetUserData(); - bMove = TRUE; + bMove = sal_True; } String sFilePassword; - USHORT nEntryCount = (USHORT)GetEntryCount(); + sal_uInt16 nEntryCount = (sal_uInt16)GetEntryCount(); const OUString* pFileNames = _rFiles.getConstArray(); SwWrtShell& rSh = GetParentWindow()->GetCreateView()->GetWrtShell(); rSh.StartAction(); // after insertion of the first new content the 'pCont' parameter becomes invalid // find the index of the 'anchor' content to always use a current anchor content - USHORT nAnchorContent = pSwGlblDocContents->Count() - 1; + sal_uInt16 nAnchorContent = pSwGlblDocContents->Count() - 1; if ( !bMove ) { - for( USHORT nContent = 0; nContent < pSwGlblDocContents->Count(); ++nContent ) + for( sal_uInt16 nContent = 0; nContent < pSwGlblDocContents->Count(); ++nContent ) { if( *_pContent == *pSwGlblDocContents->GetObject( nContent ) ) { @@ -1316,7 +1316,7 @@ void SwGlobalTree::InsertRegion( const SwGlblDocContent* _pContent, const Sequen SwGlblDocContent* pAnchorContent = 0; OSL_ENSURE(aTempContents.Count() > (nAnchorContent + nFile), "invalid anchor content -> last insertion failed"); if ( aTempContents.Count() > (nAnchorContent + nFile) ) - pAnchorContent = aTempContents.GetObject(nAnchorContent + (USHORT)nFile); + pAnchorContent = aTempContents.GetObject(nAnchorContent + (sal_uInt16)nFile); else pAnchorContent = aTempContents.GetObject(aTempContents.Count() - 1); String sFileName(pFileNames[nFile]); @@ -1325,10 +1325,10 @@ void SwGlobalTree::InsertRegion( const SwGlblDocContent* _pContent, const Sequen String sSectionName(String(aFileUrl.GetLastName( INetURLObject::DECODE_UNAMBIGUOUS)).GetToken(0, sfx2::cTokenSeperator)); - USHORT nSectCount = rSh.GetSectionFmtCount(); + sal_uInt16 nSectCount = rSh.GetSectionFmtCount(); String sTempSectionName(sSectionName); - USHORT nAddNumber = 0; - USHORT nCount = 0; + sal_uInt16 nAddNumber = 0; + sal_uInt16 nCount = 0; // evtl : und Index anhaengen, wenn der Bereichsname schon vergeben ist while ( nCount < nSectCount ) { @@ -1361,12 +1361,12 @@ void SwGlobalTree::InsertRegion( const SwGlblDocContent* _pContent, const Sequen } if ( bMove ) { - Update( FALSE ); + Update( sal_False ); rSh.MoveGlobalDocContent( - *pSwGlblDocContents, nEntryCount, nEntryCount + (USHORT)nFiles, nEntryCount - (USHORT)nFiles ); + *pSwGlblDocContents, nEntryCount, nEntryCount + (sal_uInt16)nFiles, nEntryCount - (sal_uInt16)nFiles ); } rSh.EndAction(); - Update( FALSE ); + Update( sal_False ); Display(); } } diff --git a/sw/source/ui/utlui/gloslst.cxx b/sw/source/ui/utlui/gloslst.cxx index c03a9d0e88..bf1ec6d9c7 100644 --- a/sw/source/ui/utlui/gloslst.cxx +++ b/sw/source/ui/utlui/gloslst.cxx @@ -119,7 +119,7 @@ IMPL_LINK(SwGlossDecideDlg, SelectHdl, ListBox*, EMPTYARG) SwGlossaryList::SwGlossaryList() : - bFilled(FALSE) + bFilled(sal_False) { SvtPathOptions aPathOpt; sPath = aPathOpt.GetAutoTextPath(); @@ -143,7 +143,7 @@ SwGlossaryList::~SwGlossaryList() ********************************************************************/ -BOOL SwGlossaryList::GetShortName(const String& rLongName, +sal_Bool SwGlossaryList::GetShortName(const String& rLongName, String& rShortName, String& rGroupName ) { if(!bFilled) @@ -151,13 +151,13 @@ BOOL SwGlossaryList::GetShortName(const String& rLongName, TripleStrings aTripleStrings; - USHORT nCount = aGroupArr.Count(); - USHORT nFound = 0; - for(USHORT i = 0; i < nCount; i++ ) + sal_uInt16 nCount = aGroupArr.Count(); + sal_uInt16 nFound = 0; + for(sal_uInt16 i = 0; i < nCount; i++ ) { AutoTextGroup* pGroup = aGroupArr.GetObject(i); if(!rGroupName.Len() || rGroupName == pGroup->sName) - for(USHORT j = 0; j < pGroup->nCount; j++) + for(sal_uInt16 j = 0; j < pGroup->nCount; j++) { String sLong = pGroup->sLongNames.GetToken(j, STRING_DELIM); if((rLongName == sLong)) @@ -171,14 +171,14 @@ BOOL SwGlossaryList::GetShortName(const String& rLongName, } } - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; nCount = aTripleStrings.Count(); if(1 == nCount ) { TripleString* pTriple = aTripleStrings[0]; rShortName = pTriple->sShort; rGroupName = pTriple->sGroup; - bRet = TRUE; + bRet = sal_True; } else if(1 < nCount) { @@ -189,7 +189,7 @@ BOOL SwGlossaryList::GetShortName(const String& rLongName, aDlg.SetText(sTitle); ListBox& rLB = aDlg.GetListBox(); - for(USHORT i = 0; i < nCount; i++ ) + for(sal_uInt16 i = 0; i < nCount; i++ ) rLB.InsertEntry(aTripleStrings[i]->sGroup.GetToken(0, GLOS_DELIM)); rLB.SelectEntryPos(0); @@ -199,10 +199,10 @@ BOOL SwGlossaryList::GetShortName(const String& rLongName, TripleString* pTriple = aTripleStrings[rLB.GetSelectEntryPos()]; rShortName = pTriple->sShort; rGroupName = pTriple->sGroup; - bRet = TRUE; + bRet = sal_True; } else - bRet = FALSE; + bRet = sal_False; } return bRet; } @@ -212,7 +212,7 @@ BOOL SwGlossaryList::GetShortName(const String& rLongName, ********************************************************************/ -USHORT SwGlossaryList::GetGroupCount() +sal_uInt16 SwGlossaryList::GetGroupCount() { if(!bFilled) Update(); @@ -224,7 +224,7 @@ USHORT SwGlossaryList::GetGroupCount() ********************************************************************/ -String SwGlossaryList::GetGroupName(USHORT nPos, BOOL bNoPath, String* pTitle) +String SwGlossaryList::GetGroupName(sal_uInt16 nPos, sal_Bool bNoPath, String* pTitle) { OSL_ENSURE(aGroupArr.Count() > nPos, "group not available"); String sRet(aEmptyStr); @@ -246,7 +246,7 @@ String SwGlossaryList::GetGroupName(USHORT nPos, BOOL bNoPath, String* pTitle) ********************************************************************/ -USHORT SwGlossaryList::GetBlockCount(USHORT nGroup) +sal_uInt16 SwGlossaryList::GetBlockCount(sal_uInt16 nGroup) { OSL_ENSURE(aGroupArr.Count() > nGroup, "group not available"); if(nGroup < aGroupArr.Count()) @@ -262,7 +262,7 @@ USHORT SwGlossaryList::GetBlockCount(USHORT nGroup) ********************************************************************/ -String SwGlossaryList::GetBlockName(USHORT nGroup, USHORT nBlock, String& rShortName) +String SwGlossaryList::GetBlockName(sal_uInt16 nGroup, sal_uInt16 nBlock, String& rShortName) { OSL_ENSURE(aGroupArr.Count() > nGroup, "group not available"); if(nGroup < aGroupArr.Count()) @@ -289,7 +289,7 @@ void SwGlossaryList::Update() if(sTemp != sPath) { sPath = sTemp; - bFilled = FALSE; + bFilled = sal_False; ClearGroups(); } SwGlossaries* pGlossaries = ::GetGlossaries(); @@ -297,11 +297,11 @@ void SwGlossaryList::Update() String sExt( SwGlossaries::GetExtension() ); if(!bFilled) { - USHORT nGroupCount = pGlossaries->GetGroupCnt(); - for(USHORT i = 0; i < nGroupCount; i++) + sal_uInt16 nGroupCount = pGlossaries->GetGroupCnt(); + for(sal_uInt16 i = 0; i < nGroupCount; i++) { String sGrpName = pGlossaries->GetGroupName(i); - USHORT nPath = (USHORT)sGrpName.GetToken(1, GLOS_DELIM).ToInt32(); + sal_uInt16 nPath = (sal_uInt16)sGrpName.GetToken(1, GLOS_DELIM).ToInt32(); if(nPath < pPathArr->Count()) { AutoTextGroup* pGroup = new AutoTextGroup; @@ -320,11 +320,11 @@ void SwGlossaryList::Update() aGroupArr.Insert( pGroup, i ); } } - bFilled = TRUE; + bFilled = sal_True; } else { - for(USHORT nPath = 0; nPath < pPathArr->Count(); nPath++) + for(sal_uInt16 nPath = 0; nPath < pPathArr->Count(); nPath++) { SvStringsDtor aFoundGroupNames; SvStrings aFiles( 16, 16 ); @@ -332,7 +332,7 @@ void SwGlossaryList::Update() SWUnoHelper::UCB_GetFileListOfFolder( *(*pPathArr)[nPath], aFiles, &sExt, &aDateTimeArr ); - for( USHORT nFiles = 0, nFEnd = aFiles.Count(); + for( sal_uInt16 nFiles = 0, nFEnd = aFiles.Count(); nFiles < nFEnd; ++nFiles ) { String* pTitle = aFiles[ nFiles ]; @@ -365,20 +365,20 @@ void SwGlossaryList::Update() delete pDT; } - USHORT nArrCount = aGroupArr.Count(); - for( USHORT i = nArrCount; i; --i) + sal_uInt16 nArrCount = aGroupArr.Count(); + for( sal_uInt16 i = nArrCount; i; --i) { // evtl. geloeschte Gruppen entfernen AutoTextGroup* pGroup = aGroupArr.GetObject(i - 1); - USHORT nGroupPath = (USHORT)pGroup->sName.GetToken( 1, + sal_uInt16 nGroupPath = (sal_uInt16)pGroup->sName.GetToken( 1, GLOS_DELIM).ToInt32(); // nur die Gruppen werden geprueft, die fuer den // aktuellen Teilpfad registriert sind if(nGroupPath == nPath) { - BOOL bFound = FALSE; + sal_Bool bFound = sal_False; String sCompareGroup = pGroup->sName.GetToken(0, GLOS_DELIM); - for( USHORT j = 0; j < aFoundGroupNames.Count() && !bFound; ++j) + for( sal_uInt16 j = 0; j < aFoundGroupNames.Count() && !bFound; ++j) { bFound = sCompareGroup == *aFoundGroupNames[j]; } @@ -412,7 +412,7 @@ void SwGlossaryList::Timeout() AutoTextGroup* SwGlossaryList::FindGroup(const String& rGroupName) { - for(USHORT i = 0; i < aGroupArr.Count(); i++) + for(sal_uInt16 i = 0; i < aGroupArr.Count(); i++) { AutoTextGroup* pRet = aGroupArr.GetObject(i); if(pRet->sName == rGroupName) @@ -434,7 +434,7 @@ void SwGlossaryList::FillGroup(AutoTextGroup* pGroup, SwGlossaries* pGlossaries) if(pBlock) pGroup->sTitle = pBlock->GetName(); - for(USHORT j = 0; j < pGroup->nCount; j++) + for(sal_uInt16 j = 0; j < pGroup->nCount; j++) { pGroup->sLongNames += pBlock->GetLongName(j); pGroup->sLongNames += STRING_DELIM; @@ -449,19 +449,19 @@ void SwGlossaryList::FillGroup(AutoTextGroup* pGroup, SwGlossaries* pGlossaries) passendem Anfang zurueckgeben ********************************************************************/ -BOOL SwGlossaryList::HasLongName(const String& rBegin, SvStringsISortDtor* pLongNames ) +sal_Bool SwGlossaryList::HasLongName(const String& rBegin, SvStringsISortDtor* pLongNames ) { if(!bFilled) Update(); - USHORT nFound = 0; - USHORT nCount = aGroupArr.Count(); - USHORT nBeginLen = rBegin.Len(); + sal_uInt16 nFound = 0; + sal_uInt16 nCount = aGroupArr.Count(); + sal_uInt16 nBeginLen = rBegin.Len(); const ::utl::TransliterationWrapper& rSCmp = GetAppCmpStrIgnore(); - for(USHORT i = 0; i < nCount; i++ ) + for(sal_uInt16 i = 0; i < nCount; i++ ) { AutoTextGroup* pGroup = aGroupArr.GetObject(i); - for(USHORT j = 0; j < pGroup->nCount; j++) + for(sal_uInt16 j = 0; j < pGroup->nCount; j++) { String sBlock = pGroup->sLongNames.GetToken(j, STRING_DELIM); if( rSCmp.isEqual( sBlock.Copy(0, nBeginLen), rBegin ) && @@ -483,12 +483,12 @@ BOOL SwGlossaryList::HasLongName(const String& rBegin, SvStringsISortDtor* pLong ********************************************************************/ void SwGlossaryList::ClearGroups() { - USHORT nCount = aGroupArr.Count(); - for( USHORT i = 0; i < nCount; ++i ) + sal_uInt16 nCount = aGroupArr.Count(); + for( sal_uInt16 i = 0; i < nCount; ++i ) delete aGroupArr.GetObject( i ); aGroupArr.Remove( 0, nCount ); - bFilled = FALSE; + bFilled = sal_False; } diff --git a/sw/source/ui/utlui/gloslst.src b/sw/source/ui/utlui/gloslst.src index 1ccf855ffe..db34b8c5ae 100644 --- a/sw/source/ui/utlui/gloslst.src +++ b/sw/source/ui/utlui/gloslst.src @@ -68,6 +68,7 @@ ModalDialog DLG_GLOSSARY_DECIDE_DLG }; ListBox LB_LIST { + HelpID = "sw:ListBox:DLG_GLOSSARY_DECIDE_DLG:LB_LIST"; Pos = MAP_APPFONT ( 12 , 15 ) ; Size = MAP_APPFONT ( 81 , 40 ) ; TabStop = TRUE ; diff --git a/sw/source/ui/utlui/initui.cxx b/sw/source/ui/utlui/initui.cxx index 21c545ac94..5663af9604 100644 --- a/sw/source/ui/utlui/initui.cxx +++ b/sw/source/ui/utlui/initui.cxx @@ -174,7 +174,7 @@ ShellResource::ShellResource() sPageDescFollowName( SW_RES(STR_PAGEDESC_FOLLOWNAME)), sPageDescName( SW_RES(STR_PAGEDESC_NAME)) { - const USHORT nCount = FLD_DOCINFO_END - FLD_DOCINFO_BEGIN; + const sal_uInt16 nCount = FLD_DOCINFO_END - FLD_DOCINFO_BEGIN; KeyCode aCode( KEY_SPACE ); KeyCode aModifiedCode( KEY_SPACE, KEY_MOD1 ); @@ -183,7 +183,7 @@ ShellResource::ShellResource() aModStr.SearchAndReplaceAllAscii( "+", String() ); aHyperlinkClick.SearchAndReplaceAllAscii( "%s", aModStr ); - for(USHORT i = 0; i < nCount; ++i) + for(sal_uInt16 i = 0; i < nCount; ++i) { String* pNew = new SW_RESSTR(FLD_DOCINFO_BEGIN + i); aDocInfoLst.Insert(pNew, aDocInfoLst.Count()); @@ -198,7 +198,7 @@ ShellResource::~ShellResource() delete pAutoFmtNameLst, pAutoFmtNameLst = 0; } -String ShellResource::GetPageDescName( USHORT nNo, PageNameMode eMode ) +String ShellResource::GetPageDescName( sal_uInt16 nNo, PageNameMode eMode ) { String sRet; @@ -228,7 +228,7 @@ SwGlossaries* GetGlossaries() return (pGlossaries); } -BOOL HasGlossaryList() +sal_Bool HasGlossaryList() { return pGlossaryList != 0; } @@ -256,7 +256,7 @@ void ShellResource::_GetAutoFmtNameLst() const ImpAutoFmtNameListLoader::ImpAutoFmtNameListLoader( SvStringsDtor& rLst ) : Resource( ResId(RID_SHELLRES_AUTOFMTSTRS, *pSwResMgr) ) { - for( USHORT n = 0; n < STR_AUTOFMTREDL_END; ++n ) + for( sal_uInt16 n = 0; n < STR_AUTOFMTREDL_END; ++n ) { String* p = new String( ResId( n + 1, *pSwResMgr) ); if(STR_AUTOFMTREDL_TYPO == n) @@ -283,13 +283,13 @@ const String& SwAuthorityFieldType::GetAuthFieldName(ToxAuthorityField eType) if(!pAuthFieldNameList) { pAuthFieldNameList = new SvStringsDtor(AUTH_FIELD_END, 1); - for(USHORT i = 0; i < AUTH_FIELD_END; i++) + for(sal_uInt16 i = 0; i < AUTH_FIELD_END; i++) { String* pTmp = new String(SW_RES(STR_AUTH_FIELD_START + i)); pAuthFieldNameList->Insert(pTmp, pAuthFieldNameList->Count()); } } - return *pAuthFieldNameList->GetObject( static_cast< USHORT >(eType) ); + return *pAuthFieldNameList->GetObject( static_cast< sal_uInt16 >(eType) ); } const String& SwAuthorityFieldType::GetAuthTypeName(ToxAuthorityType eType) @@ -297,12 +297,12 @@ const String& SwAuthorityFieldType::GetAuthTypeName(ToxAuthorityType eType) if(!pAuthFieldTypeList) { pAuthFieldTypeList = new SvStringsDtor(AUTH_TYPE_END, 1); - for(USHORT i = 0; i < AUTH_TYPE_END; i++) + for(sal_uInt16 i = 0; i < AUTH_TYPE_END; i++) pAuthFieldTypeList->Insert( new String(SW_RES(STR_AUTH_TYPE_START + i)), pAuthFieldTypeList->Count()); } - return *pAuthFieldTypeList->GetObject( static_cast< USHORT >(eType) ); + return *pAuthFieldTypeList->GetObject( static_cast< sal_uInt16 >(eType) ); } diff --git a/sw/source/ui/utlui/makefile.mk b/sw/source/ui/utlui/makefile.mk deleted file mode 100644 index 75d8376702..0000000000 --- a/sw/source/ui/utlui/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=utlui - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - - -SRS1NAME=$(TARGET) -SRC1FILES = \ - initui.src \ - gloslst.src \ - navipi.src \ - poolfmt.src \ - attrdesc.src \ - unotools.src \ - utlui.src - -EXCEPTIONSFILES= \ - $(SLO)$/attrdesc.obj \ - $(SLO)$/bookctrl.obj \ - $(SLO)$/condedit.obj \ - $(SLO)$/content.obj \ - $(SLO)$/glbltree.obj \ - $(SLO)$/gloslst.obj \ - $(SLO)$/initui.obj \ - $(SLO)$/navipi.obj \ - $(SLO)$/numfmtlb.obj \ - $(SLO)$/prcntfld.obj \ - $(SLO)$/shdwcrsr.obj \ - $(SLO)$/swrenamexnameddlg.obj \ - $(SLO)$/textcontrolcombo.obj \ - $(SLO)$/tmplctrl.obj \ - $(SLO)$/uitool.obj \ - $(SLO)$/unotools.obj \ - $(SLO)$/viewlayoutctrl.obj \ - $(SLO)$/zoomctrl.obj - -SLOFILES = $(EXCEPTIONSFILES) \ - $(SLO)$/navicfg.obj \ - $(SLO)$/uiitems.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/ui/utlui/navicfg.cxx b/sw/source/ui/utlui/navicfg.cxx index 768e7c9159..222cc0f57a 100644 --- a/sw/source/ui/utlui/navicfg.cxx +++ b/sw/source/ui/utlui/navicfg.cxx @@ -72,8 +72,8 @@ SwNavigationConfig::SwNavigationConfig() : nOutlineLevel(MAXLEVEL), nRegionMode(REGION_MODE_NONE), nActiveBlock(0), - bIsSmall(FALSE), - bIsGlobalActive(TRUE) + bIsSmall(sal_False), + bIsGlobalActive(sal_True) { Sequence<OUString> aNames = GetPropertyNames(); Sequence<Any> aValues = GetProperties(aNames); diff --git a/sw/source/ui/utlui/navipi.cxx b/sw/source/ui/utlui/navipi.cxx index 4908f69f66..eac367ce43 100644 --- a/sw/source/ui/utlui/navipi.cxx +++ b/sw/source/ui/utlui/navipi.cxx @@ -63,6 +63,8 @@ #include <navipi.hrc> #include <utlui.hrc> +#include "access.hrc" + #include <unomid.h> #define PAGE_CHANGE_TIMEOUT 1000 //Timeout fuer Seitenwechsel @@ -92,7 +94,7 @@ SFX_IMPL_CHILDWINDOW_CONTEXT( SwNavigationChild, SID_NAVIGATOR, SwView ) void SwNavigationPI::CleanEntry( String& rEntry ) { - USHORT i = rEntry.Len(); + sal_uInt16 i = rEntry.Len(); if( i ) for( sal_Unicode* pStr = rEntry.GetBufferAccess(); i; --i, ++pStr ) if( *pStr == 10 || *pStr == 9 ) @@ -103,8 +105,8 @@ void SwNavigationPI::CleanEntry( String& rEntry ) mit und ohne Childs ------------------------------------------------------------------------*/ -void SwNavigationPI::MoveOutline(USHORT nSource, USHORT nTarget, - BOOL bWithChilds) +void SwNavigationPI::MoveOutline(sal_uInt16 nSource, sal_uInt16 nTarget, + sal_Bool bWithChilds) { SwView *pView = GetCreateView(); SwWrtShell &rSh = pView->GetWrtShell(); @@ -116,9 +118,9 @@ void SwNavigationPI::MoveOutline(USHORT nSource, USHORT nTarget, short nMove = nTarget-nSource; //( nDir<0 ) ? 1 : 0 ; rSh.GotoOutline(nSource); if (bWithChilds) - rSh.MakeOutlineSel(nSource, nSource, TRUE); + rSh.MakeOutlineSel(nSource, nSource, sal_True); // Die selektierten Children zaehlen bei der Bewegung vorwaerts nicht mit - USHORT nLastOutlinePos = rSh.GetOutlinePos(MAXLEVEL); + sal_uInt16 nLastOutlinePos = rSh.GetOutlinePos(MAXLEVEL); if(bWithChilds && nMove > 1 && nLastOutlinePos < nTarget) { @@ -190,7 +192,7 @@ void SwNavigationPI::FillBox() if(pContentWrtShell) { aContentTree.SetHiddenShell( pContentWrtShell ); - aContentTree.Display( FALSE ); + aContentTree.Display( sal_False ); } else { @@ -205,7 +207,7 @@ void SwNavigationPI::FillBox() aContentTree.SetActiveShell(pWrtShell); } else - aContentTree.Display( TRUE ); + aContentTree.Display( sal_True ); pActContView = pView; } } @@ -221,8 +223,8 @@ void SwNavigationPI::UsePage(SwWrtShell *pSh) } if (pSh) { - const USHORT nPageCnt = pSh->GetPageCnt(); - USHORT nPhyPage, nVirPage; + const sal_uInt16 nPageCnt = pSh->GetPageCnt(); + sal_uInt16 nPhyPage, nVirPage; pSh->GetPageNum(nPhyPage, nVirPage); GetPageEdit().SetMax(nPageCnt); @@ -238,7 +240,7 @@ void SwNavigationPI::UsePage(SwWrtShell *pSh) IMPL_LINK( SwNavigationPI, ToolBoxSelectHdl, ToolBox *, pBox ) { - const USHORT nCurrItemId = pBox->GetCurItemId(); + const sal_uInt16 nCurrItemId = pBox->GetCurItemId(); SwView *pView = GetCreateView(); if (!pView) return 1; @@ -247,9 +249,9 @@ IMPL_LINK( SwNavigationPI, ToolBoxSelectHdl, ToolBox *, pBox ) //Standard: Unterebenen werden mitgenommen // mit Ctrl Unterebenen nicht mitnehmen - BOOL bOutlineWithChilds = ( KEY_MOD1 != pBox->GetModifier()); + sal_Bool bOutlineWithChilds = ( KEY_MOD1 != pBox->GetModifier()); int nFuncId = 0; - BOOL bFocusToDoc = FALSE; + sal_Bool bFocusToDoc = sal_False; switch (nCurrItemId) { case FN_UP: @@ -278,13 +280,13 @@ IMPL_LINK( SwNavigationPI, ToolBoxSelectHdl, ToolBox *, pBox ) _ZoomIn(); } } - return TRUE; + return sal_True; // Funktionen, die eine direkte Aktion ausloesen case FN_SELECT_FOOTER: { rSh.MoveCrsr(); - const USHORT eType = rSh.GetFrmType(0,FALSE); + const sal_uInt16 eType = rSh.GetFrmType(0,sal_False); if (eType & FRMTYPE_FOOTER) { if (rSh.EndPg()) @@ -292,13 +294,13 @@ IMPL_LINK( SwNavigationPI, ToolBoxSelectHdl, ToolBox *, pBox ) } else if (rSh.GotoFooterTxt()) nFuncId = FN_TO_FOOTER; - bFocusToDoc = TRUE; + bFocusToDoc = sal_True; } break; case FN_SELECT_HEADER: { rSh.MoveCrsr(); - const USHORT eType = rSh.GetFrmType(0,FALSE); + const sal_uInt16 eType = rSh.GetFrmType(0,sal_False); if (eType & FRMTYPE_HEADER) { if (rSh.SttPg()) @@ -306,13 +308,13 @@ IMPL_LINK( SwNavigationPI, ToolBoxSelectHdl, ToolBox *, pBox ) } else if (rSh.GotoHeaderTxt()) nFuncId = FN_TO_HEADER; - bFocusToDoc = TRUE; + bFocusToDoc = sal_True; } break; case FN_SELECT_FOOTNOTE: { rSh.MoveCrsr(); - const USHORT eFrmType = rSh.GetFrmType(0,FALSE); + const sal_uInt16 eFrmType = rSh.GetFrmType(0,sal_False); // aus Fussnote zum Anker springen if (eFrmType & FRMTYPE_FOOTNOTE) { @@ -331,7 +333,7 @@ IMPL_LINK( SwNavigationPI, ToolBoxSelectHdl, ToolBox *, pBox ) else if (rSh.GotoPrevFtnAnchor()) nFuncId = FN_PREV_FOOTNOTE; } - bFocusToDoc = TRUE; + bFocusToDoc = sal_True; } break; @@ -358,7 +360,7 @@ IMPL_LINK( SwNavigationPI, ToolBoxSelectHdl, ToolBox *, pBox ) break; case FN_GLOBAL_SAVE_CONTENT: { - BOOL bSave = rSh.IsGlblDocSaveLinks(); + sal_Bool bSave = rSh.IsGlblDocSaveLinks(); rSh.SetGlblDocSaveLinks( !bSave ); pBox->CheckItem(FN_GLOBAL_SAVE_CONTENT, !bSave ); } @@ -371,7 +373,7 @@ IMPL_LINK( SwNavigationPI, ToolBoxSelectHdl, ToolBox *, pBox ) } if(bFocusToDoc) pView->GetEditWin().GrabFocus(); - return TRUE; + return sal_True; } /*------------------------------------------------------------------------ Beschreibung: ClickHandler der Toolboxen @@ -380,7 +382,7 @@ IMPL_LINK( SwNavigationPI, ToolBoxSelectHdl, ToolBox *, pBox ) IMPL_LINK( SwNavigationPI, ToolBoxClickHdl, ToolBox *, pBox ) { - const USHORT nCurrItemId = pBox->GetCurItemId(); + const sal_uInt16 nCurrItemId = pBox->GetCurItemId(); switch (nCurrItemId) { case FN_GLOBAL_UPDATE: @@ -391,36 +393,41 @@ IMPL_LINK( SwNavigationPI, ToolBoxClickHdl, ToolBox *, pBox ) break; } - return TRUE; + return sal_True; } IMPL_LINK( SwNavigationPI, ToolBoxDropdownClickHdl, ToolBox*, pBox ) { - const USHORT nCurrItemId = pBox->GetCurItemId(); + const sal_uInt16 nCurrItemId = pBox->GetCurItemId(); switch (nCurrItemId) { case FN_CREATE_NAVIGATION: { - CreateNavigationTool(pBox->GetItemRect(FN_CREATE_NAVIGATION), TRUE); + CreateNavigationTool(pBox->GetItemRect(FN_CREATE_NAVIGATION), sal_True); } break; case FN_DROP_REGION: { + static const char* aHIDs[] = + { + HID_NAVI_DRAG_HYP, + HID_NAVI_DRAG_LINK, + HID_NAVI_DRAG_COPY, + }; PopupMenu *pMenu = new PopupMenu; - for (USHORT i = 0; i <= REGION_MODE_EMBEDDED; i++) + for (sal_uInt16 i = 0; i <= REGION_MODE_EMBEDDED; i++) { pMenu->InsertItem( i + 1, aContextArr[i] ); - pMenu->SetHelpId(i + 1, HID_NAVI_DRAG_HYP + i); - + pMenu->SetHelpId(i + 1, aHIDs[i]); } pMenu->CheckItem( nRegionMode + 1 ); pMenu->SetSelectHdl(LINK(this, SwNavigationPI, MenuSelectHdl)); - pBox->SetItemDown( nCurrItemId, TRUE ); + pBox->SetItemDown( nCurrItemId, sal_True ); pMenu->Execute( pBox, pBox->GetItemRect(FN_DROP_REGION), POPUPMENU_EXECUTE_DOWN ); - pBox->SetItemDown( nCurrItemId, FALSE ); + pBox->SetItemDown( nCurrItemId, sal_False ); pBox->EndSelection(); delete pMenu; pBox->Invalidate(); @@ -429,25 +436,25 @@ IMPL_LINK( SwNavigationPI, ToolBoxDropdownClickHdl, ToolBox*, pBox ) case FN_OUTLINE_LEVEL: { PopupMenu *pMenu = new PopupMenu; - for (USHORT i = 101; i <= 100 + MAXLEVEL; i++) + for (sal_uInt16 i = 101; i <= 100 + MAXLEVEL; i++) { pMenu->InsertItem( i, String::CreateFromInt32(i - 100) ); pMenu->SetHelpId( i, HID_NAVI_OUTLINES ); } pMenu->CheckItem( aContentTree.GetOutlineLevel() + 100 ); pMenu->SetSelectHdl(LINK(this, SwNavigationPI, MenuSelectHdl)); - pBox->SetItemDown( nCurrItemId, TRUE ); + pBox->SetItemDown( nCurrItemId, sal_True ); pMenu->Execute( pBox, pBox->GetItemRect(FN_OUTLINE_LEVEL), POPUPMENU_EXECUTE_DOWN ); - pBox->SetItemDown( nCurrItemId, FALSE ); + pBox->SetItemDown( nCurrItemId, sal_False ); delete pMenu; pBox->EndSelection(); pBox->Invalidate(); } break; } - return TRUE; + return sal_True; } @@ -460,13 +467,13 @@ void SwNavHelpToolBox::MouseButtonDown(const MouseEvent &rEvt) if(rEvt.GetButtons() == MOUSE_LEFT && FN_CREATE_NAVIGATION == GetItemId(rEvt.GetPosPixel())) { - ((SwNavigationPI*)GetParent())->CreateNavigationTool(GetItemRect(FN_CREATE_NAVIGATION), FALSE); + ((SwNavigationPI*)GetParent())->CreateNavigationTool(GetItemRect(FN_CREATE_NAVIGATION), sal_False); } else SwHelpToolBox::MouseButtonDown(rEvt); } -void SwNavigationPI::CreateNavigationTool(const Rectangle& rRect, BOOL bSetFocus) +void SwNavigationPI::CreateNavigationTool(const Rectangle& rRect, sal_Bool bSetFocus) { Reference< XFrame > xFrame = GetCreateView()->GetViewFrame()->GetFrame().GetFrameInterface(); SwScrollNaviPopup* pPopup = new @@ -488,7 +495,7 @@ void SwNavigationPI::CreateNavigationTool(const Rectangle& rRect, BOOL bSetFocus void SwNavHelpToolBox::RequestHelp( const HelpEvent& rHEvt ) { - USHORT nItemId = GetItemId(ScreenToOutputPixel(rHEvt.GetMousePosPixel())); + sal_uInt16 nItemId = GetItemId(ScreenToOutputPixel(rHEvt.GetMousePosPixel())); if( FN_UP == nItemId || FN_DOWN == nItemId ) { SetItemText(nItemId, SwScrollNaviPopup::GetQuickHelpText((FN_DOWN == nItemId))); @@ -509,7 +516,7 @@ IMPL_LINK( SwNavigationPI, EditAction, NumEditAction *, pEdit ) { if(aPageChgTimer.IsActive()) aPageChgTimer.Stop(); - pCreateView->GetWrtShell().GotoPage((USHORT)pEdit->GetValue(), TRUE); + pCreateView->GetWrtShell().GotoPage((sal_uInt16)pEdit->GetValue(), sal_True); pCreateView->GetEditWin().GrabFocus(); pCreateView->GetViewFrame()->GetBindings().Invalidate(FN_STAT_PAGE); } @@ -529,18 +536,18 @@ IMPL_LINK( SwNavigationPI, EditGetFocus, NumEditAction *, pEdit ) return 0; SwWrtShell &rSh = pView->GetWrtShell(); - const USHORT nPageCnt = rSh.GetPageCnt(); + const sal_uInt16 nPageCnt = rSh.GetPageCnt(); pEdit->SetMax(nPageCnt); pEdit->SetLast(nPageCnt); return 0; } -BOOL SwNavigationPI::Close() +sal_Bool SwNavigationPI::Close() { SfxViewFrame* pVFrame = pCreateView->GetViewFrame(); pVFrame->GetBindings().Invalidate(SID_NAVIGATOR); pVFrame->GetDispatcher()->Execute(SID_NAVIGATOR); - return TRUE; + return sal_True; } /*------------------------------------------------------------------------ @@ -592,7 +599,7 @@ void SwNavigationPI::_ZoomOut() if (_IsZoomedIn()) { FloatingWindow* pFloat = pContextWin->GetFloatingWindow(); - bIsZoomedIn = FALSE; + bIsZoomedIn = sal_False; Size aSz(GetOutputSizePixel()); aSz.Height() = nZoomOut; Size aMinOutSizePixel = ((SfxDockingWindow*)GetParent())->GetMinOutputSizePixel(); @@ -611,8 +618,8 @@ void SwNavigationPI::_ZoomOut() } SvLBoxEntry* pFirst = aContentTree.FirstSelected(); if(pFirst) - aContentTree.Select(pFirst, TRUE); // toolbox enablen - pConfig->SetSmall( FALSE ); + aContentTree.Select(pFirst, sal_True); // toolbox enablen + pConfig->SetSmall( sal_False ); aContentToolBox.CheckItem(FN_SHOW_CONTENT_BOX); } } @@ -626,7 +633,7 @@ void SwNavigationPI::_ZoomIn() aContentTree.HideTree(); aDocListBox.Hide(); aGlobalTree.HideTree(); - bIsZoomedIn = TRUE; + bIsZoomedIn = sal_True; Size aSz(GetOutputSizePixel()); if( aSz.Height() > nZoomIn ) nZoomOut = ( short ) aSz.Height(); @@ -638,9 +645,9 @@ void SwNavigationPI::_ZoomIn() pFloat->SetOutputSizePixel(aSz); SvLBoxEntry* pFirst = aContentTree.FirstSelected(); if(pFirst) - aContentTree.Select(pFirst, TRUE); // toolbox enablen - pConfig->SetSmall( TRUE ); - aContentToolBox.CheckItem(FN_SHOW_CONTENT_BOX, FALSE); + aContentTree.Select(pFirst, sal_True); // toolbox enablen + pConfig->SetSmall( sal_True ); + aContentToolBox.CheckItem(FN_SHOW_CONTENT_BOX, sal_False); } } @@ -723,10 +730,10 @@ SwNavigationPI::SwNavigationPI( SfxBindings* _pBindings, nAutoMarkIdx(1), nRegionMode(REGION_MODE_NONE), - bSmallMode(FALSE), - bIsZoomedIn(FALSE), - bPageCtrlsVisible(FALSE), - bGlobalMode(FALSE) + bSmallMode(sal_False), + bIsZoomedIn(sal_False), + bPageCtrlsVisible(sal_False), + bGlobalMode(sal_False) { GetCreateView(); InitImageList(); @@ -744,14 +751,14 @@ SwNavigationPI::SwNavigationPI( SfxBindings* _pBindings, pEdit->SetActionHdl(LINK(this, SwNavigationPI, EditAction)); pEdit->SetGetFocusHdl(LINK(this, SwNavigationPI, EditGetFocus)); pEdit->SetModifyHdl(LINK(this, SwNavigationPI, PageEditModifyHdl)); - - bPageCtrlsVisible = TRUE; + pEdit->SetAccessibleName(pEdit->GetQuickHelpText()); + bPageCtrlsVisible = sal_True; //doppelte Separatoren sind nicht erlaubt, also muss //die passende Groesse anders ermittelt werden Rectangle aFirstRect = aContentToolBox.GetItemRect(FN_SELECT_FOOTNOTE); Rectangle aSecondRect = aContentToolBox.GetItemRect(FN_SELECT_HEADER); - USHORT nWidth = USHORT(aFirstRect.Left() - aSecondRect.Left()); + sal_uInt16 nWidth = sal_uInt16(aFirstRect.Left() - aSecondRect.Left()); Size aItemWinSize( nWidth , aFirstRect.Bottom() - aFirstRect.Top() ); pEdit->SetSizePixel(aItemWinSize); @@ -761,7 +768,7 @@ SwNavigationPI::SwNavigationPI( SfxBindings* _pBindings, aContentToolBox.SetHelpId(FN_PAGENUMBER, HID_NAVI_TBX16); aContentToolBox.ShowItem( FN_PAGENUMBER ); - for( USHORT i = 0; i <= REGION_MODE_EMBEDDED; i++ ) + for( sal_uInt16 i = 0; i <= REGION_MODE_EMBEDDED; i++ ) { aContextArr[i] = SW_RESSTR(ST_HYPERLINK + i); aStatusArr[i] = SW_RESSTR(ST_STATUS_FIRST + i); @@ -802,21 +809,21 @@ SwNavigationPI::SwNavigationPI( SfxBindings* _pBindings, ((SfxDockingWindow*)pParent)->SetOutputSizePixel(aMinSize); aContentTree.SetPosSizePixel( 0, nListboxYPos, 0, 0, WINDOW_POSSIZE_Y ); - aContentTree.SetWindowBits( WB_HASBUTTONS|WB_HASBUTTONSATROOT| + aContentTree.SetStyle( aContentTree.GetStyle()|WB_HASBUTTONS|WB_HASBUTTONSATROOT| WB_CLIPCHILDREN|WB_HSCROLL|WB_FORCE_MAKEVISIBLE ); aContentTree.SetSpaceBetweenEntries(3); aContentTree.SetSelectionMode( SINGLE_SELECTION ); aContentTree.SetDragDropMode( SV_DRAGDROP_CTRL_MOVE | SV_DRAGDROP_CTRL_COPY | SV_DRAGDROP_ENABLE_TOP ); - aContentTree.EnableAsyncDrag(TRUE); + aContentTree.EnableAsyncDrag(sal_True); aContentTree.ShowTree(); - aContentToolBox.CheckItem(FN_SHOW_CONTENT_BOX, TRUE); + aContentToolBox.CheckItem(FN_SHOW_CONTENT_BOX, sal_True); // TreeListBox fuer Globaldokument aGlobalTree.SetPosSizePixel( 0, nListboxYPos, 0, 0, WINDOW_POSSIZE_Y ); aGlobalTree.SetSelectionMode( MULTIPLE_SELECTION ); - aGlobalTree.SetWindowBits( WB_HASBUTTONS|WB_HASBUTTONSATROOT| + aGlobalTree.SetStyle( aGlobalTree.GetStyle()|WB_HASBUTTONS|WB_HASBUTTONSATROOT| WB_CLIPCHILDREN|WB_HSCROLL ); Size aGlblSize(aGlobalToolBox.CalcWindowSizePixel()); aGlobalToolBox.SetSizePixel(aGlblSize); @@ -832,7 +839,7 @@ SwNavigationPI::SwNavigationPI( SfxBindings* _pBindings, aContentToolBox.SetDropdownClickHdl( LINK(this, SwNavigationPI, ToolBoxDropdownClickHdl) ); aGlobalToolBox.SetClickHdl( LINK(this, SwNavigationPI, ToolBoxClickHdl) ); aGlobalToolBox.SetDropdownClickHdl( LINK(this, SwNavigationPI, ToolBoxDropdownClickHdl) ); - aGlobalToolBox.CheckItem(FN_GLOBAL_SWITCH, TRUE); + aGlobalToolBox.CheckItem(FN_GLOBAL_SWITCH, sal_True); Font aFont(GetFont()); aFont.SetWeight(WEIGHT_NORMAL); @@ -867,6 +874,10 @@ SwNavigationPI::SwNavigationPI( SfxBindings* _pBindings, UsePage(0); aPageChgTimer.SetTimeoutHdl(LINK(this, SwNavigationPI, ChangePageHdl)); aPageChgTimer.SetTimeout(PAGE_CHANGE_TIMEOUT); + + aContentTree.SetAccessibleName(SW_RESSTR(STR_ACCESS_TL_CONTENT)); + aGlobalTree.SetAccessibleName(SW_RESSTR(STR_ACCESS_TL_GLOBAL)); + aDocListBox.SetAccessibleName(aStatusArr[3]); } SwNavigationPI::~SwNavigationPI() @@ -876,7 +887,7 @@ SwNavigationPI::~SwNavigationPI() SwView *pView = GetCreateView(); SwWrtShell &rSh = pView->GetWrtShell(); if( !rSh.IsAllProtect() ) - pView->GetDocShell()->SetReadOnlyUI(FALSE); + pView->GetDocShell()->SetReadOnlyUI(sal_False); } EndListening(*SFX_APP()); @@ -936,7 +947,7 @@ IMPL_LINK( SwNavigationPI, ClosePopupWindow, SfxPopupWindow *, pWindow ) return 1; } -void SwNavigationPI::StateChanged( USHORT nSID, SfxItemState /*eState*/, +void SwNavigationPI::StateChanged( sal_uInt16 nSID, SfxItemState /*eState*/, const SfxPoolItem* /*pState*/ ) { if(nSID == SID_DOCFULLNAME) @@ -946,7 +957,7 @@ void SwNavigationPI::StateChanged( USHORT nSID, SfxItemState /*eState*/, { SwWrtShell* pWrtShell = pActView->GetWrtShellPtr(); aContentTree.SetActiveShell(pWrtShell); - BOOL bGlobal = IsGlobalDoc(); + sal_Bool bGlobal = IsGlobalDoc(); aContentToolBox.EnableItem(FN_GLOBAL_SWITCH, bGlobal); if( (!bGlobal && IsGlobalMode()) || (!IsGlobalMode() && pConfig->IsGlobalActive()) ) @@ -1046,7 +1057,7 @@ void SwNavigationPI::Notify( SfxBroadcaster& rBrdc, const SfxHint& rHint ) aContentTree.SetActiveShell(pWrtShell); if(aGlobalTree.IsVisible()) { - if(aGlobalTree.Update( FALSE )) + if(aGlobalTree.Update( sal_False )) aGlobalTree.Display(); else // wenn kein Update notwendig, dann zumindest painten @@ -1061,27 +1072,27 @@ void SwNavigationPI::Notify( SfxBroadcaster& rBrdc, const SfxHint& rHint ) IMPL_LINK( SwNavigationPI, MenuSelectHdl, Menu *, pMenu ) { - USHORT nMenuId = pMenu->GetCurItemId(); + sal_uInt16 nMenuId = pMenu->GetCurItemId(); if(nMenuId != USHRT_MAX) { if(nMenuId < 100) SetRegionDropMode( --nMenuId); else - aContentTree.SetOutlineLevel( static_cast< BYTE >(nMenuId - 100) ); + aContentTree.SetOutlineLevel( static_cast< sal_uInt8 >(nMenuId - 100) ); } return 0; } void SwNavigationPI::UpdateListBox() { - aDocListBox.SetUpdateMode(FALSE); + aDocListBox.SetUpdateMode(sal_False); aDocListBox.Clear(); SwView *pActView = GetCreateView(); - BOOL bDisable = pActView == 0; + sal_Bool bDisable = pActView == 0; SwView *pView = SwModule::GetFirstView(); - USHORT nCount = 0; - USHORT nAct = 0; - USHORT nConstPos = 0; + sal_uInt16 nCount = 0; + sal_uInt16 nAct = 0; + sal_uInt16 nConstPos = 0; const SwView* pConstView = aContentTree.IsConstantView() && aContentTree.GetActiveWrtShell() ? &aContentTree.GetActiveWrtShell()->GetView(): @@ -1123,12 +1134,12 @@ void SwNavigationPI::UpdateListBox() sEntry += aStatusArr[ST_HIDDEN - ST_STATUS_FIRST]; sEntry += ')'; aDocListBox.InsertEntry(sEntry); - bDisable = FALSE; + bDisable = sal_False; } if(aContentTree.IsActiveView()) { //entweder den Namen des akt. Docs oder "Aktives Dokument" - USHORT nTmp = pActView ? nAct : --nCount; + sal_uInt16 nTmp = pActView ? nAct : --nCount; aDocListBox.SelectEntryPos( nTmp ); } else if(aContentTree.IsHiddenView()) @@ -1139,7 +1150,7 @@ void SwNavigationPI::UpdateListBox() aDocListBox.SelectEntryPos(nConstPos); aDocListBox.Enable( !bDisable ); - aDocListBox.SetUpdateMode(TRUE); + aDocListBox.SetUpdateMode(sal_True); } IMPL_LINK(SwNavigationPI, DoneLink, SfxPoolItem *, pItem) @@ -1168,7 +1179,7 @@ IMPL_LINK(SwNavigationPI, DoneLink, SfxPoolItem *, pItem) String SwNavigationPI::CreateDropFileName( TransferableDataHelper& rData ) { String sFileName; - ULONG nFmt; + sal_uLong nFmt; if( rData.HasFormat( nFmt = FORMAT_FILE_LIST )) { FileList aFileList; @@ -1249,12 +1260,12 @@ sal_Int8 SwNavigationPI::ExecuteDrop( const ExecuteDropEvent& rEvt ) return nRet; } -void SwNavigationPI::SetRegionDropMode(USHORT nNewMode) +void SwNavigationPI::SetRegionDropMode(sal_uInt16 nNewMode) { nRegionMode = nNewMode; pConfig->SetRegionMode( nRegionMode ); - USHORT nDropId = FN_DROP_REGION; + sal_uInt16 nDropId = FN_DROP_REGION; if(nRegionMode == REGION_MODE_LINK) nDropId = FN_DROP_REGION_LINK; else if(nRegionMode == REGION_MODE_EMBEDDED) @@ -1266,13 +1277,13 @@ void SwNavigationPI::SetRegionDropMode(USHORT nNewMode) } -BOOL SwNavigationPI::ToggleTree() +sal_Bool SwNavigationPI::ToggleTree() { - BOOL bRet = TRUE; - BOOL bGlobalDoc = IsGlobalDoc(); + sal_Bool bRet = sal_True; + sal_Bool bGlobalDoc = IsGlobalDoc(); if(!IsGlobalMode() && bGlobalDoc) { - SetUpdateMode(FALSE); + SetUpdateMode(sal_False); if(_IsZoomedIn()) _ZoomOut(); aGlobalTree.ShowTree(); @@ -1280,8 +1291,8 @@ BOOL SwNavigationPI::ToggleTree() aContentTree.HideTree(); aContentToolBox.Hide(); aDocListBox.Hide(); - SetGlobalMode(TRUE); - SetUpdateMode(TRUE); + SetGlobalMode(sal_True); + SetUpdateMode(sal_True); } else { @@ -1293,15 +1304,15 @@ BOOL SwNavigationPI::ToggleTree() aContentToolBox.Show(); aDocListBox.Show(); } - bRet = FALSE; - SetGlobalMode(FALSE); + bRet = sal_False; + SetGlobalMode(sal_False); } return bRet; } -BOOL SwNavigationPI::IsGlobalDoc() const +sal_Bool SwNavigationPI::IsGlobalDoc() const { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; SwView *pView = GetCreateView(); if(pView) { @@ -1346,7 +1357,7 @@ SwView* SwNavigationPI::GetCreateView() const } SwNavigationChild::SwNavigationChild( Window* pParent, - USHORT nId, + sal_uInt16 nId, SfxBindings* _pBindings, SfxChildWinInfo* pInfo ) : SfxChildWindowContext( nId ) @@ -1358,14 +1369,14 @@ SwNavigationChild::SwNavigationChild( Window* pParent, SwNavigationConfig* pNaviConfig = SW_MOD()->GetNavigationConfig(); - USHORT nRootType = static_cast< USHORT >( pNaviConfig->GetRootType() ); + sal_uInt16 nRootType = static_cast< sal_uInt16 >( pNaviConfig->GetRootType() ); if( nRootType < CONTENT_TYPE_MAX ) { pNavi->aContentTree.SetRootType(nRootType); - pNavi->aContentToolBox.CheckItem(FN_SHOW_ROOT, TRUE); + pNavi->aContentToolBox.CheckItem(FN_SHOW_ROOT, sal_True); } - pNavi->aContentTree.SetOutlineLevel( static_cast< BYTE >( pNaviConfig->GetOutlineLevel() ) ); - pNavi->SetRegionDropMode( static_cast< USHORT >( pNaviConfig->GetRegionMode() ) ); + pNavi->aContentTree.SetOutlineLevel( static_cast< sal_uInt8 >( pNaviConfig->GetOutlineLevel() ) ); + pNavi->SetRegionDropMode( static_cast< sal_uInt16 >( pNaviConfig->GetRegionMode() ) ); if(GetFloatingWindow() && pNaviConfig->IsSmall()) { @@ -1389,7 +1400,7 @@ void SwNavigationPI::DataChanged( const DataChangedEvent& rDCEvt ) void SwNavigationPI::InitImageList() { - USHORT k; + sal_uInt16 k; ImageList& rImgLst = aContentImageList; for( k = 0; k < aContentToolBox.GetItemCount(); k++) @@ -1400,7 +1411,7 @@ void SwNavigationPI::InitImageList() aGlobalToolBox.SetItemImage(aGlobalToolBox.GetItemId(k), rImgLst.GetImage(aGlobalToolBox.GetItemId(k))); - USHORT nDropId = FN_DROP_REGION; + sal_uInt16 nDropId = FN_DROP_REGION; if(nRegionMode == REGION_MODE_LINK) nDropId = FN_DROP_REGION_LINK; else if(nRegionMode == REGION_MODE_EMBEDDED) diff --git a/sw/source/ui/utlui/navipi.hrc b/sw/source/ui/utlui/navipi.hrc index 8c0f92497d..fbf97d851e 100644 --- a/sw/source/ui/utlui/navipi.hrc +++ b/sw/source/ui/utlui/navipi.hrc @@ -87,4 +87,3 @@ #define ST_POSTIT_SHOW (ST_GLOBAL_CONTEXT_FIRST +35) #define ST_POSTIT_HIDE (ST_GLOBAL_CONTEXT_FIRST +36) #define ST_POSTIT_DELETE (ST_GLOBAL_CONTEXT_FIRST +37) - diff --git a/sw/source/ui/utlui/navipi.src b/sw/source/ui/utlui/navipi.src index 1c6cb9fc77..d0130b589e 100644 --- a/sw/source/ui/utlui/navipi.src +++ b/sw/source/ui/utlui/navipi.src @@ -29,6 +29,7 @@ #include "utlui.hrc" #include "navipi.hrc" #include "helpid.h" +#include "access.hrc" Window DLG_NAVIGATION_PI { @@ -503,3 +504,15 @@ ImageList IMG_NAVI_ENTRYBMP MaskColor = IMAGE_MASK_COLOR ; NAVI_ENTRY_IDS }; + + +//IAccessibility2 Implementation 2009----- +String STR_ACCESS_TL_GLOBAL +{ + Text [ en-US ] = "Global View"; +}; +String STR_ACCESS_TL_CONTENT +{ + Text [ en-US ] = "Content View"; +}; +//-----IAccessibility2 Implementation 2009 diff --git a/sw/source/ui/utlui/numfmtlb.cxx b/sw/source/ui/utlui/numfmtlb.cxx index 31d97a794c..65d84597b5 100644 --- a/sw/source/ui/utlui/numfmtlb.cxx +++ b/sw/source/ui/utlui/numfmtlb.cxx @@ -72,38 +72,38 @@ using namespace ::com::sun::star::lang; --------------------------------------------------------------------*/ NumFormatListBox::NumFormatListBox( Window* pWin, const ResId& rResId, - short nFormatType, ULONG nDefFmt, - BOOL bUsrFmts ) : + short nFormatType, sal_uLong nDefFmt, + sal_Bool bUsrFmts ) : ListBox ( pWin, rResId ), nCurrFormatType (-1), nStdEntry (0), - bOneArea (FALSE), + bOneArea (sal_False), nDefFormat (nDefFmt), pVw (0), pOwnFormatter (0), - bShowLanguageControl(FALSE), - bUseAutomaticLanguage(TRUE) + bShowLanguageControl(sal_False), + bUseAutomaticLanguage(sal_True) { Init(nFormatType, bUsrFmts); } NumFormatListBox::NumFormatListBox( Window* pWin, SwView* pView, const ResId& rResId, short nFormatType, - ULONG nDefFmt, BOOL bUsrFmts ) : + sal_uLong nDefFmt, sal_Bool bUsrFmts ) : ListBox ( pWin, rResId ), nCurrFormatType (-1), nStdEntry (0), - bOneArea (FALSE), + bOneArea (sal_False), nDefFormat (nDefFmt), pVw (pView), pOwnFormatter (0), - bShowLanguageControl(FALSE), - bUseAutomaticLanguage(TRUE) + bShowLanguageControl(sal_False), + bUseAutomaticLanguage(sal_True) { Init(nFormatType, bUsrFmts); } -void NumFormatListBox::Init(short nFormatType, BOOL bUsrFmts) +void NumFormatListBox::Init(short nFormatType, sal_Bool bUsrFmts) { SwView *pView = GetView(); @@ -112,7 +112,7 @@ void NumFormatListBox::Init(short nFormatType, BOOL bUsrFmts) else eCurLanguage = SvxLocaleToLanguage( SvtSysLocale().GetLocaleData().getLocale() ); - if (bUsrFmts == FALSE) + if (bUsrFmts == sal_False) { Reference< XMultiServiceFactory > xMSF = ::comphelper::getProcessServiceFactory(); pOwnFormatter = new SvNumberFormatter(xMSF, eCurLanguage); @@ -224,17 +224,17 @@ void NumFormatListBox::SetFormatType(const short nFormatType) } const SvNumberformat* pFmt; - USHORT nPos, i = 0; - ULONG nFormat; + sal_uInt16 nPos, i = 0; + sal_uLong nFormat; Color* pCol; double fVal = GetDefValue( nFormatType ); String sValue; - ULONG nSysNumFmt = pFormatter->GetFormatIndex( + sal_uLong nSysNumFmt = pFormatter->GetFormatIndex( NF_NUMBER_SYSTEM, eCurLanguage ); - ULONG nSysShortDateFmt = pFormatter->GetFormatIndex( + sal_uLong nSysShortDateFmt = pFormatter->GetFormatIndex( NF_DATE_SYSTEM_SHORT, eCurLanguage ); - ULONG nSysLongDateFmt = pFormatter->GetFormatIndex( + sal_uLong nSysLongDateFmt = pFormatter->GetFormatIndex( NF_DATE_SYSTEM_LONG, eCurLanguage ); for( long nIndex = eOffsetStart; nIndex <= eOffsetEnd; ++nIndex ) @@ -280,7 +280,7 @@ void NumFormatListBox::SetFormatType(const short nFormatType) } } -void NumFormatListBox::SetDefFormat(const ULONG nDefFmt) +void NumFormatListBox::SetDefFormat(const sal_uLong nDefFmt) { if (nDefFmt == ULONG_MAX) { @@ -305,11 +305,11 @@ void NumFormatListBox::SetDefFormat(const ULONG nDefFmt) SetFormatType(nType); - ULONG nFormat = pFormatter->GetFormatForLanguageIfBuiltIn(nDefFmt, eCurLanguage); + sal_uLong nFormat = pFormatter->GetFormatForLanguageIfBuiltIn(nDefFmt, eCurLanguage); - for (USHORT i = 0; i < GetEntryCount(); i++) + for (sal_uInt16 i = 0; i < GetEntryCount(); i++) { - if (nFormat == (ULONG)GetEntryData(i)) + if (nFormat == (sal_uLong)GetEntryData(i)) { SelectEntryPos(i); nStdEntry = i; @@ -331,19 +331,19 @@ void NumFormatListBox::SetDefFormat(const ULONG nDefFmt) else pFormatter->GetOutputString(fValue, nDefFmt, sValue, &pCol); - USHORT nPos = 0; - while ((ULONG)GetEntryData(nPos) == ULONG_MAX) + sal_uInt16 nPos = 0; + while ((sal_uLong)GetEntryData(nPos) == ULONG_MAX) nPos++; - ULONG nSysNumFmt = pFormatter->GetFormatIndex( NF_NUMBER_SYSTEM, eCurLanguage); - ULONG nSysShortDateFmt = pFormatter->GetFormatIndex( NF_DATE_SYSTEM_SHORT, eCurLanguage); - ULONG nSysLongDateFmt = pFormatter->GetFormatIndex( NF_DATE_SYSTEM_LONG, eCurLanguage); - BOOL bSysLang = FALSE; + sal_uLong nSysNumFmt = pFormatter->GetFormatIndex( NF_NUMBER_SYSTEM, eCurLanguage); + sal_uLong nSysShortDateFmt = pFormatter->GetFormatIndex( NF_DATE_SYSTEM_SHORT, eCurLanguage); + sal_uLong nSysLongDateFmt = pFormatter->GetFormatIndex( NF_DATE_SYSTEM_LONG, eCurLanguage); + sal_Bool bSysLang = sal_False; if( eCurLanguage == GetAppLanguage() ) - bSysLang = TRUE; - ULONG nNumFormatForLanguage = pFormatter->GetFormatForLanguageIfBuiltIn(nSysNumFmt, LANGUAGE_SYSTEM ); - ULONG nShortDateFormatForLanguage = pFormatter->GetFormatForLanguageIfBuiltIn(nSysShortDateFmt, LANGUAGE_SYSTEM ); - ULONG nLongDateFormatForLanguage = pFormatter->GetFormatForLanguageIfBuiltIn(nSysLongDateFmt, LANGUAGE_SYSTEM ); + bSysLang = sal_True; + sal_uLong nNumFormatForLanguage = pFormatter->GetFormatForLanguageIfBuiltIn(nSysNumFmt, LANGUAGE_SYSTEM ); + sal_uLong nShortDateFormatForLanguage = pFormatter->GetFormatForLanguageIfBuiltIn(nSysShortDateFmt, LANGUAGE_SYSTEM ); + sal_uLong nLongDateFormatForLanguage = pFormatter->GetFormatForLanguageIfBuiltIn(nSysLongDateFmt, LANGUAGE_SYSTEM ); if ( nDefFmt == nSysNumFmt || @@ -368,16 +368,16 @@ void NumFormatListBox::SetDefFormat(const ULONG nDefFmt) nDefFormat = GetFormat(); } -ULONG NumFormatListBox::GetFormat() const +sal_uLong NumFormatListBox::GetFormat() const { - USHORT nPos = GetSelectEntryPos(); + sal_uInt16 nPos = GetSelectEntryPos(); - return (ULONG)GetEntryData(nPos); + return (sal_uLong)GetEntryData(nPos); } IMPL_LINK( NumFormatListBox, SelectHdl, ListBox *, pBox ) { - USHORT nPos = pBox->GetSelectEntryPos(); + sal_uInt16 nPos = pBox->GetSelectEntryPos(); String sDefine(SW_RES( STR_DEFINE_NUMBERFORMAT )); SwView *pView = GetView(); @@ -397,7 +397,7 @@ IMPL_LINK( NumFormatListBox, SelectHdl, ListBox *, pBox ) double fValue = GetDefValue( nCurrFormatType); - ULONG nFormat = pFormatter->GetStandardFormat( nCurrFormatType, eCurLanguage); + sal_uLong nFormat = pFormatter->GetStandardFormat( nCurrFormatType, eCurLanguage); aCoreSet.Put( SfxUInt32Item( SID_ATTR_NUMBERFORMAT_VALUE, nFormat )); aCoreSet.Put( SvxNumberInfoItem( pFormatter, fValue, @@ -426,15 +426,15 @@ IMPL_LINK( NumFormatListBox, SelectHdl, ListBox *, pBox ) { const sal_uInt32* pDelArr = ((SvxNumberInfoItem*)pItem)->GetDelArray(); - for ( USHORT i = 0; i < ((SvxNumberInfoItem*)pItem)->GetDelCount(); i++ ) + for ( sal_uInt16 i = 0; i < ((SvxNumberInfoItem*)pItem)->GetDelCount(); i++ ) pFormatter->DeleteEntry( pDelArr[i] ); } const SfxItemSet* pOutSet = pDlg->GetOutputItemSet(); if( SFX_ITEM_SET == pOutSet->GetItemState( - SID_ATTR_NUMBERFORMAT_VALUE, FALSE, &pItem )) + SID_ATTR_NUMBERFORMAT_VALUE, sal_False, &pItem )) { - UINT32 nNumberFormat = ((SfxUInt32Item*)pItem)->GetValue(); + sal_uInt32 nNumberFormat = ((SfxUInt32Item*)pItem)->GetValue(); // oj #105473# change order of calls const SvNumberformat* pFmt = pFormatter->GetEntry(nNumberFormat); if( pFmt ) @@ -443,7 +443,7 @@ IMPL_LINK( NumFormatListBox, SelectHdl, ListBox *, pBox ) SetDefFormat(nNumberFormat); } if( bShowLanguageControl && SFX_ITEM_SET == pOutSet->GetItemState( - SID_ATTR_NUMBERFORMAT_ADD_AUTO, FALSE, &pItem )) + SID_ATTR_NUMBERFORMAT_ADD_AUTO, sal_False, &pItem )) { bUseAutomaticLanguage = ((const SfxBoolItem*)pItem)->GetValue(); } diff --git a/sw/source/ui/utlui/poolfmt.src b/sw/source/ui/utlui/poolfmt.src index e7bd9dd7d5..909296c8c2 100644 --- a/sw/source/ui/utlui/poolfmt.src +++ b/sw/source/ui/utlui/poolfmt.src @@ -738,7 +738,28 @@ String STR_POOLCHR_RUBYTEXT { Text [ en-US ] = "Rubies"; }; - +//IAccessibility2 Implementation 2009----- +String STR_COLUMN_VALUESET_ITEM0 +{ + Text [ en-US ] = "1 column"; +}; +String STR_COLUMN_VALUESET_ITEM1 +{ + Text [ en-US ] = "2 columns with equal size"; +}; +String STR_COLUMN_VALUESET_ITEM2 +{ + Text [ en-US ] = "3 columns with equal size"; +}; +String STR_COLUMN_VALUESET_ITEM3 +{ + Text [ en-US ] = "2 columns with different size (left > right)"; +}; +String STR_COLUMN_VALUESET_ITEM4 +{ + Text [ en-US ] = "2 columns with different size (left < right)"; +}; +//-----IAccessibility2 Implementation 2009 String STR_POOLCHR_VERT_NUM { Text [ en-US ] = "Vertical Numbering Symbols"; diff --git a/sw/source/ui/utlui/prcntfld.cxx b/sw/source/ui/utlui/prcntfld.cxx index 5b7dfbbb1a..9ccb0f077a 100644 --- a/sw/source/ui/utlui/prcntfld.cxx +++ b/sw/source/ui/utlui/prcntfld.cxx @@ -58,7 +58,7 @@ void PercentField::SetRefValue(sal_Int64 nValue) SetPrcntValue(nRealValue, eOldUnit); } -void PercentField::ShowPercent(BOOL bPercent) +void PercentField::ShowPercent(sal_Bool bPercent) { if ((bPercent && GetUnit() == FUNIT_CUSTOM) || (!bPercent && GetUnit() != FUNIT_CUSTOM)) @@ -238,17 +238,17 @@ sal_Int64 PercentField::DenormalizePercent(sal_Int64 nValue) return nValue; } -BOOL PercentField::IsValueModified() +sal_Bool PercentField::IsValueModified() { if (GetUnit() == FUNIT_CUSTOM) - return TRUE; + return sal_True; else return MetricField::IsValueModified(); } -sal_Int64 PercentField::ImpPower10( USHORT n ) +sal_Int64 PercentField::ImpPower10( sal_uInt16 n ) { - USHORT i; + sal_uInt16 i; sal_Int64 nValue = 1; for ( i=0; i < n; i++ ) diff --git a/sw/source/ui/utlui/shdwcrsr.cxx b/sw/source/ui/utlui/shdwcrsr.cxx index 36f81c1a21..b72a9556ca 100644 --- a/sw/source/ui/utlui/shdwcrsr.cxx +++ b/sw/source/ui/utlui/shdwcrsr.cxx @@ -45,7 +45,7 @@ SwShadowCursor::~SwShadowCursor() DrawCrsr( aOldPt, nOldHeight, nOldMode ); } -void SwShadowCursor::SetPos( const Point& rPt, long nHeight, USHORT nMode ) +void SwShadowCursor::SetPos( const Point& rPt, long nHeight, sal_uInt16 nMode ) { Point aPt( pWin->LogicToPixel( rPt )); nHeight = pWin->LogicToPixel( Size( 0, nHeight )).Height(); @@ -61,7 +61,7 @@ void SwShadowCursor::SetPos( const Point& rPt, long nHeight, USHORT nMode ) } } -void SwShadowCursor::DrawTri( const Point& rPt, long nHeight, BOOL bLeft ) +void SwShadowCursor::DrawTri( const Point& rPt, long nHeight, sal_Bool bLeft ) { long nLineDiff = ( nHeight / 2 ); long nLineDiffHalf = nLineDiff / 2; @@ -80,7 +80,7 @@ void SwShadowCursor::DrawTri( const Point& rPt, long nHeight, BOOL bLeft ) } } -void SwShadowCursor::DrawCrsr( const Point& rPt, long nHeight, USHORT nMode ) +void SwShadowCursor::DrawCrsr( const Point& rPt, long nHeight, sal_uInt16 nMode ) { nHeight = (((nHeight / 4)+1) * 4) + 1; @@ -97,9 +97,9 @@ void SwShadowCursor::DrawCrsr( const Point& rPt, long nHeight, USHORT nMode ) // 2. das Dreieck if( text::HoriOrientation::LEFT == nMode || text::HoriOrientation::CENTER == nMode ) // Pfeil nach rechts - DrawTri( rPt, nHeight, FALSE ); + DrawTri( rPt, nHeight, sal_False ); if( text::HoriOrientation::RIGHT == nMode || text::HoriOrientation::CENTER == nMode ) // Pfeil nach links - DrawTri( rPt, nHeight, TRUE ); + DrawTri( rPt, nHeight, sal_True ); pWin->Pop(); } diff --git a/sw/source/ui/utlui/swrenamexnameddlg.cxx b/sw/source/ui/utlui/swrenamexnameddlg.cxx index fed0cb21d7..d977d5aa97 100644 --- a/sw/source/ui/utlui/swrenamexnameddlg.cxx +++ b/sw/source/ui/utlui/swrenamexnameddlg.cxx @@ -73,9 +73,9 @@ SwRenameXNamedDlg::SwRenameXNamedDlg( Window* pWin, uno::Reference< container::XNamed > & xN, uno::Reference< container::XNameAccess > & xNA ) : ModalDialog(pWin, SW_RES(DLG_RENAME_XNAMED)), - aNewNameFT(this, SW_RES(FT_NEW_NAME)), - aNewNameED(this, SW_RES(ED_NEW_NAME)), aNameFL(this, SW_RES(FL_NAME)), + aNewNameFT(this, SW_RES(FT_NEW_NAME)), + aNewNameED(this, SW_RES(ED_NEW_NAME)), aOk(this, SW_RES(PB_OK)), aCancel(this, SW_RES(PB_CANCEL)), aHelp(this, SW_RES(PB_HELP)), diff --git a/sw/source/ui/utlui/textcontrolcombo.cxx b/sw/source/ui/utlui/textcontrolcombo.cxx index 6d4d6968a5..2d1a0ea8be 100644 --- a/sw/source/ui/utlui/textcontrolcombo.cxx +++ b/sw/source/ui/utlui/textcontrolcombo.cxx @@ -46,7 +46,7 @@ TextControlCombo::~TextControlCombo() { } -void TextControlCombo::Arrange( FixedText& _rFTcomplete, BOOL /*bShow*/ ) +void TextControlCombo::Arrange( FixedText& _rFTcomplete, sal_Bool /*bShow*/ ) { Point aBasePos( GetPosPixel() ); Size aMetricVals( GetSizePixel() ); @@ -97,14 +97,14 @@ void TextControlCombo::Arrange( FixedText& _rFTcomplete, BOOL /*bShow*/ ) Window::Hide(); } -void TextControlCombo::Show( BOOL _bVisible, USHORT _nFlags ) +void TextControlCombo::Show( sal_Bool _bVisible, sal_uInt16 _nFlags ) { mrCtrl.Show( _bVisible, _nFlags ); mrFTbefore.Show( _bVisible, _nFlags ); mrFTafter.Show( _bVisible, _nFlags ); } -void TextControlCombo::Enable( BOOL _bEnable, BOOL _bChild ) +void TextControlCombo::Enable( sal_Bool _bEnable, sal_Bool _bChild ) { mrCtrl.Enable( _bEnable, _bChild ); mrFTbefore.Enable( _bEnable, _bChild ); diff --git a/sw/source/ui/utlui/tmplctrl.cxx b/sw/source/ui/utlui/tmplctrl.cxx index 062875aee0..545e861a33 100644 --- a/sw/source/ui/utlui/tmplctrl.cxx +++ b/sw/source/ui/utlui/tmplctrl.cxx @@ -54,10 +54,10 @@ class TemplatePopup_Impl : public PopupMenu public: TemplatePopup_Impl(); - USHORT GetCurId() const { return nCurId; } + sal_uInt16 GetCurId() const { return nCurId; } private: - USHORT nCurId; + sal_uInt16 nCurId; virtual void Select(); }; @@ -75,8 +75,8 @@ void TemplatePopup_Impl::Select() // class SvxZoomStatusBarControl ------------------------------------------ -SwTemplateControl::SwTemplateControl( USHORT _nSlotId, - USHORT _nId, +SwTemplateControl::SwTemplateControl( sal_uInt16 _nSlotId, + sal_uInt16 _nId, StatusBar& rStb ) : SfxStatusBarControl( _nSlotId, _nId, rStb ) { @@ -87,7 +87,7 @@ SwTemplateControl::~SwTemplateControl() } void SwTemplateControl::StateChanged( - USHORT /*nSID*/, SfxItemState eState, const SfxPoolItem* pState ) + sal_uInt16 /*nSID*/, SfxItemState eState, const SfxPoolItem* pState ) { if( eState != SFX_ITEM_AVAILABLE || pState->ISA( SfxVoidItem ) ) GetStatusBar().SetItemText( GetId(), String() ); @@ -123,7 +123,7 @@ void SwTemplateControl::Command( const CommandEvent& rCEvt ) pPool->SetSearchMask(SFX_STYLE_FAMILY_PAGE, SFXSTYLEBIT_ALL); if( pPool->Count() > 1 ) { - USHORT nCount = 0; + sal_uInt16 nCount = 0; SfxStyleSheetBase* pStyle = pPool->First(); while( pStyle ) { @@ -133,7 +133,7 @@ void SwTemplateControl::Command( const CommandEvent& rCEvt ) } aPop.Execute( &GetStatusBar(), rCEvt.GetMousePosPixel()); - USHORT nCurrId = aPop.GetCurId(); + sal_uInt16 nCurrId = aPop.GetCurId(); if( nCurrId != USHRT_MAX) { // sieht etwas umstaendlich aus, anders geht's aber nicht diff --git a/sw/source/ui/utlui/uiitems.cxx b/sw/source/ui/utlui/uiitems.cxx index d39e4865fb..87a8045c7c 100644 --- a/sw/source/ui/utlui/uiitems.cxx +++ b/sw/source/ui/utlui/uiitems.cxx @@ -46,7 +46,7 @@ using namespace ::com::sun::star; using namespace ::com::sun::star::uno; // Breitenangaben der Fussnotenlinien, mit TabPage abstimmen -static const USHORT nFtnLines[] = { +static const sal_uInt16 nFtnLines[] = { 0, 10, 50, @@ -58,7 +58,7 @@ static const USHORT nFtnLines[] = { #define FTN_LINE_STYLE_COUNT 5 -SwPageFtnInfoItem::SwPageFtnInfoItem( const USHORT nId, SwPageFtnInfo& rInfo) : +SwPageFtnInfoItem::SwPageFtnInfoItem( const sal_uInt16 nId, SwPageFtnInfo& rInfo) : SfxPoolItem( nId ), aFtnInfo(rInfo) { @@ -107,7 +107,7 @@ SfxItemPresentation SwPageFtnInfoItem::GetPresentation case SFX_ITEM_PRESENTATION_NAMELESS: case SFX_ITEM_PRESENTATION_COMPLETE: { - USHORT nHght = (USHORT) GetPageFtnInfo().GetHeight(); + sal_uInt16 nHght = (sal_uInt16) GetPageFtnInfo().GetHeight(); if ( nHght ) { rText = SW_RESSTR( STR_MAX_FTN_HEIGHT ); @@ -122,7 +122,7 @@ SfxItemPresentation SwPageFtnInfoItem::GetPresentation return SFX_ITEM_PRESENTATION_NONE; } -bool SwPageFtnInfoItem::QueryValue( Any& rVal, BYTE nMemberId ) const +bool SwPageFtnInfoItem::QueryValue( Any& rVal, sal_uInt8 nMemberId ) const { bool bRet = true; switch(nMemberId & ~CONVERT_TWIPS) @@ -146,7 +146,7 @@ bool SwPageFtnInfoItem::QueryValue( Any& rVal, BYTE nMemberId ) const return bRet; } -bool SwPageFtnInfoItem::PutValue(const Any& rVal, BYTE nMemberId) +bool SwPageFtnInfoItem::PutValue(const Any& rVal, sal_uInt8 nMemberId) { sal_Int32 nSet32 = 0; bool bRet = true; @@ -209,7 +209,7 @@ bool SwPageFtnInfoItem::PutValue(const Any& rVal, BYTE nMemberId) return bRet; } -SwPtrItem::SwPtrItem( const USHORT nId, void* pPtr ) : +SwPtrItem::SwPtrItem( const sal_uInt16 nId, void* pPtr ) : SfxPoolItem( nId ), pMisc(pPtr) { @@ -246,7 +246,7 @@ int SwPtrItem::operator==( const SfxPoolItem& rAttr ) const /*-------------------------------------------------------------- SwUINumRuleItem fuer die NumTabPages der FormatNumRule/Stylisten ---------------------------------------------------------------*/ -SwUINumRuleItem::SwUINumRuleItem( const SwNumRule& rRul, const USHORT nId ) +SwUINumRuleItem::SwUINumRuleItem( const SwNumRule& rRul, const sal_uInt16 nId ) : SfxPoolItem( nId ), pRule( new SwNumRule( rRul ) ) { } @@ -274,13 +274,13 @@ int SwUINumRuleItem::operator==( const SfxPoolItem& rAttr ) const return *pRule == *((SwUINumRuleItem&)rAttr).pRule; } -bool SwUINumRuleItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/ ) const +bool SwUINumRuleItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/ ) const { uno::Reference< container::XIndexReplace >xRules = new SwXNumberingRules(*pRule); rVal.setValue(&xRules, ::getCppuType((uno::Reference< container::XIndexReplace>*)0)); return true; } -bool SwUINumRuleItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/ ) +bool SwUINumRuleItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/ ) { uno::Reference< container::XIndexReplace> xRulesRef; if(rVal >>= xRulesRef) @@ -296,7 +296,7 @@ bool SwUINumRuleItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/ ) return true; } -SwBackgroundDestinationItem::SwBackgroundDestinationItem(USHORT _nWhich, USHORT nValue) : +SwBackgroundDestinationItem::SwBackgroundDestinationItem(sal_uInt16 _nWhich, sal_uInt16 nValue) : SfxUInt16Item(_nWhich, nValue) { } diff --git a/sw/source/ui/utlui/uitool.cxx b/sw/source/ui/utlui/uitool.cxx index 26cc001d83..7f64011422 100644 --- a/sw/source/ui/utlui/uitool.cxx +++ b/sw/source/ui/utlui/uitool.cxx @@ -119,14 +119,14 @@ void PrepareBoxInfo(SfxItemSet& rSet, const SwWrtShell& rSh) SvxBoxInfoItem aBoxInfo( SID_ATTR_BORDER_INNER ); const SfxPoolItem *pBoxInfo; if ( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_BORDER_INNER, - TRUE, &pBoxInfo)) + sal_True, &pBoxInfo)) aBoxInfo = *(SvxBoxInfoItem*)pBoxInfo; // Tabellenvariante, wenn mehrere Tabellenzellen selektiert rSh.GetCrsr(); //Damit GetCrsrCnt() auch das Richtige liefert aBoxInfo.SetTable (rSh.IsTableMode() && rSh.GetCrsrCnt() > 1); // Abstandsfeld immer anzeigen - aBoxInfo.SetDist ((BOOL) TRUE); + aBoxInfo.SetDist ((sal_Bool) sal_True); // Minimalgroesse in Tabellen und Absaetzen setzen aBoxInfo.SetMinDist (rSh.IsTableMode() || rSh.GetSelectionType() & (nsSelectionType::SEL_TXT | nsSelectionType::SEL_TBL)); // Default-Abstand immer setzen @@ -178,7 +178,7 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc ) { const SvxPageItem& rPageItem = (const SvxPageItem&)rSet.Get(SID_ATTR_PAGE); - USHORT nUse = (USHORT)rPageItem.GetPageUsage(); + sal_uInt16 nUse = (sal_uInt16)rPageItem.GetPageUsage(); if(nUse & 0x04) nUse |= 0x03; if(nUse) @@ -201,7 +201,7 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc ) // const SfxPoolItem* pItem; if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_PAGE_HEADERSET, - FALSE, &pItem ) ) + sal_False, &pItem ) ) { const SfxItemSet& rHeaderSet = ((SvxSetItem*)pItem)->GetItemSet(); const SfxBoolItem& rHeaderOn = (const SfxBoolItem&)rHeaderSet.Get(SID_ATTR_PAGE_ON); @@ -210,7 +210,7 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc ) { // Werte uebernehmen if(!rMaster.GetHeader().IsActive()) - rMaster.SetFmtAttr(SwFmtHeader(TRUE)); + rMaster.SetFmtAttr(SwFmtHeader(sal_True)); // Das Headerformat rausholen und anpassen // @@ -228,8 +228,8 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc ) // if(rMaster.GetHeader().IsActive()) { - rMaster.SetFmtAttr(SwFmtHeader(BOOL(FALSE))); - rPageDesc.ChgHeaderShare(FALSE); + rMaster.SetFmtAttr(SwFmtHeader(sal_Bool(sal_False))); + rPageDesc.ChgHeaderShare(sal_False); } } } @@ -237,7 +237,7 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc ) // Fusszeilen-Attribute auswerten // if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_PAGE_FOOTERSET, - FALSE, &pItem ) ) + sal_False, &pItem ) ) { const SfxItemSet& rFooterSet = ((SvxSetItem*)pItem)->GetItemSet(); const SfxBoolItem& rFooterOn = (const SfxBoolItem&)rFooterSet.Get(SID_ATTR_PAGE_ON); @@ -246,7 +246,7 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc ) { // Werte uebernehmen if(!rMaster.GetFooter().IsActive()) - rMaster.SetFmtAttr(SwFmtFooter(TRUE)); + rMaster.SetFmtAttr(SwFmtFooter(sal_True)); // Das Footerformat rausholen und anpassen // @@ -264,8 +264,8 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc ) // if(rMaster.GetFooter().IsActive()) { - rMaster.SetFmtAttr(SwFmtFooter(BOOL(FALSE))); - rPageDesc.ChgFooterShare(FALSE); + rMaster.SetFmtAttr(SwFmtFooter(sal_Bool(sal_False))); + rPageDesc.ChgFooterShare(sal_False); } } } @@ -273,7 +273,7 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc ) // Fussnoten // if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_FTN_INFO, - FALSE, &pItem ) ) + sal_False, &pItem ) ) rPageDesc.SetFtnInfo( ((SwPageFtnInfoItem*)pItem)->GetPageFtnInfo() ); @@ -284,20 +284,20 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc ) // Registerhaltigkeit if(SFX_ITEM_SET == rSet.GetItemState( - SID_SWREGISTER_MODE, FALSE, &pItem)) + SID_SWREGISTER_MODE, sal_False, &pItem)) { - BOOL bSet = ((const SfxBoolItem*)pItem)->GetValue(); + sal_Bool bSet = ((const SfxBoolItem*)pItem)->GetValue(); if(!bSet) rPageDesc.SetRegisterFmtColl(0); else if(SFX_ITEM_SET == rSet.GetItemState( - SID_SWREGISTER_COLLECTION, FALSE, &pItem)) + SID_SWREGISTER_COLLECTION, sal_False, &pItem)) { const String& rColl = ((const SfxStringItem*)pItem)->GetValue(); SwDoc& rDoc = *rMaster.GetDoc(); SwTxtFmtColl* pColl = rDoc.FindTxtFmtCollByName( rColl ); if( !pColl ) { - USHORT nId = SwStyleNameMapper::GetPoolIdFromUIName( rColl, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL ); + sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName( rColl, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL ); if( USHRT_MAX != nId ) pColl = rDoc.GetTxtCollFromPool( nId ); else @@ -305,7 +305,7 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc ) (SwTxtFmtColl*)rDoc.GetDfltTxtFmtColl() ); } if( pColl ) - pColl->SetFmtAttr( SwRegisterItem ( TRUE )); + pColl->SetFmtAttr( SwRegisterItem ( sal_True )); rPageDesc.SetRegisterFmtColl( pColl ); } } @@ -339,14 +339,14 @@ void PageDescToItemSet( const SwPageDesc& rPageDesc, SfxItemSet& rSet) SvxBoxInfoItem aBoxInfo( SID_ATTR_BORDER_INNER ); const SfxPoolItem *pBoxInfo; if ( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_BORDER_INNER, - TRUE, &pBoxInfo) ) + sal_True, &pBoxInfo) ) aBoxInfo = *(SvxBoxInfoItem*)pBoxInfo; - aBoxInfo.SetTable( FALSE ); + aBoxInfo.SetTable( sal_False ); // Abstandsfeld immer anzeigen - aBoxInfo.SetDist( TRUE); + aBoxInfo.SetDist( sal_True); // Minimalgroesse in Tabellen und Absaetzen setzen - aBoxInfo.SetMinDist( FALSE ); + aBoxInfo.SetMinDist( sal_False ); // Default-Abstand immer setzen aBoxInfo.SetDefDist( MIN_BORDER_DIST ); // Einzelne Linien koennen nur in Tabellen DontCare-Status haben @@ -378,7 +378,7 @@ void PageDescToItemSet( const SwPageDesc& rPageDesc, SfxItemSet& rSet) // dynamische oder feste Hoehe // - SfxBoolItem aOn(SID_ATTR_PAGE_ON, TRUE); + SfxBoolItem aOn(SID_ATTR_PAGE_ON, sal_True); aHeaderSet.Put(aOn); const SwFmtFrmSize &rFrmSize = pHeaderFmt->GetFrmSize(); @@ -424,7 +424,7 @@ void PageDescToItemSet( const SwPageDesc& rPageDesc, SfxItemSet& rSet) // dynamische oder feste Hoehe // - SfxBoolItem aOn(SID_ATTR_PAGE_ON, TRUE); + SfxBoolItem aOn(SID_ATTR_PAGE_ON, sal_True); aFooterSet.Put(aOn); const SwFmtFrmSize &rFrmSize = pFooterFmt->GetFrmSize(); @@ -490,11 +490,11 @@ void MakeDefTabs(SwTwips nDefDist, SvxTabStopItem& rTabs) --------------------------------------------------------------------*/ -USHORT GetTabDist(const SvxTabStopItem& rTabs) +sal_uInt16 GetTabDist(const SvxTabStopItem& rTabs) { - USHORT nDefDist; + sal_uInt16 nDefDist; if( rTabs.Count() ) - nDefDist = (USHORT)( rTabs[0].GetTabPos() ); + nDefDist = (sal_uInt16)( rTabs[0].GetTabPos() ); else nDefDist = 1134; // 2cm return nDefDist; @@ -507,14 +507,14 @@ void SfxToSwPageDescAttr( const SwWrtShell& rShell, SfxItemSet& rSet ) const SfxPoolItem* pItem; SwFmtPageDesc aPgDesc; - BOOL bChanged = FALSE; + sal_Bool bChanged = sal_False; // Seitennummer - if(SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_PARA_PAGENUM, FALSE, &pItem)) + if(SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_PARA_PAGENUM, sal_False, &pItem)) { aPgDesc.SetNumOffset(((SfxUInt16Item*)pItem)->GetValue()); - bChanged = TRUE; + bChanged = sal_True; } - if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_PARA_MODEL, FALSE, &pItem )) + if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_PARA_MODEL, sal_False, &pItem )) { const String& rDescName = ((SvxPageModelItem*)pItem)->GetValue(); if( rDescName.Len() ) // kein Name -> PageDesc ausschalten! @@ -522,18 +522,18 @@ void SfxToSwPageDescAttr( const SwWrtShell& rShell, SfxItemSet& rSet ) // nur loeschen, wenn PageDesc eingschaltet wird! rSet.ClearItem( RES_BREAK ); SwPageDesc* pDesc = ((SwWrtShell&)rShell).FindPageDescByName( - rDescName, TRUE ); + rDescName, sal_True ); if( pDesc ) pDesc->Add( &aPgDesc ); } rSet.ClearItem( SID_ATTR_PARA_MODEL ); - bChanged = TRUE; + bChanged = sal_True; } else { SfxItemSet aCoreSet(rShell.GetView().GetPool(), RES_PAGEDESC, RES_PAGEDESC ); rShell.GetCurAttr( aCoreSet ); - if(SFX_ITEM_SET == aCoreSet.GetItemState( RES_PAGEDESC, TRUE, &pItem ) ) + if(SFX_ITEM_SET == aCoreSet.GetItemState( RES_PAGEDESC, sal_True, &pItem ) ) { if( ((SwFmtPageDesc*)pItem)->GetPageDesc() ) { @@ -553,9 +553,9 @@ void SwToSfxPageDescAttr( SfxItemSet& rCoreSet ) { const SfxPoolItem* pItem = 0; String aName; - USHORT nPageNum = 0; - BOOL bPut = TRUE; - switch( rCoreSet.GetItemState( RES_PAGEDESC, TRUE, &pItem ) ) + sal_uInt16 nPageNum = 0; + sal_Bool bPut = sal_True; + switch( rCoreSet.GetItemState( RES_PAGEDESC, sal_True, &pItem ) ) { case SFX_ITEM_SET: { @@ -573,13 +573,13 @@ void SwToSfxPageDescAttr( SfxItemSet& rCoreSet ) break; default: - bPut = FALSE; + bPut = sal_False; } SfxUInt16Item aPageNum( SID_ATTR_PARA_PAGENUM, nPageNum ); rCoreSet.Put( aPageNum ); if(bPut) - rCoreSet.Put( SvxPageModelItem( aName, TRUE, SID_ATTR_PARA_MODEL ) ); + rCoreSet.Put( SvxPageModelItem( aName, sal_True, SID_ATTR_PARA_MODEL ) ); } /*-------------------------------------------------------------------- @@ -587,7 +587,7 @@ void SwToSfxPageDescAttr( SfxItemSet& rCoreSet ) --------------------------------------------------------------------*/ -FieldUnit GetDfltMetric(BOOL bWeb) +FieldUnit GetDfltMetric(sal_Bool bWeb) { return SW_MOD()->GetUsrPref(bWeb)->GetMetric(); } @@ -597,14 +597,14 @@ FieldUnit GetDfltMetric(BOOL bWeb) --------------------------------------------------------------------*/ -void SetDfltMetric( FieldUnit eMetric, BOOL bWeb ) +void SetDfltMetric( FieldUnit eMetric, sal_Bool bWeb ) { SW_MOD()->ApplyUserMetric(eMetric, bWeb); } -USHORT InsertStringSorted(const String& rEntry, ListBox& rToFill, USHORT nOffset ) +sal_uInt16 InsertStringSorted(const String& rEntry, ListBox& rToFill, sal_uInt16 nOffset ) { - USHORT i = nOffset; + sal_uInt16 i = nOffset; CollatorWrapper& rCaseColl = ::GetAppCaseCollator(); for( ; i < rToFill.GetEntryCount(); i++ ) @@ -614,9 +614,9 @@ USHORT InsertStringSorted(const String& rEntry, ListBox& rToFill, USHORT nOffset } return rToFill.InsertEntry(rEntry, i); } -void FillCharStyleListBox(ListBox& rToFill, SwDocShell* pDocSh, BOOL bSorted, BOOL bWithDefault) +void FillCharStyleListBox(ListBox& rToFill, SwDocShell* pDocSh, sal_Bool bSorted, sal_Bool bWithDefault) { - BOOL bHasOffset = rToFill.GetEntryCount() > 0; + sal_Bool bHasOffset = rToFill.GetEntryCount() > 0; SfxStyleSheetBasePool* pPool = pDocSh->GetStyleSheetPool(); pPool->SetSearchMask(SFX_STYLE_FAMILY_CHAR, SFXSTYLEBIT_ALL); SwDoc* pDoc = pDocSh->GetDoc(); @@ -627,7 +627,7 @@ void FillCharStyleListBox(ListBox& rToFill, SwDocShell* pDocSh, BOOL bSorted, BO { if(bWithDefault || pBase->GetName() != sStandard) { - USHORT nPos; + sal_uInt16 nPos; if(bSorted) nPos = InsertStringSorted(pBase->GetName(), rToFill, bHasOffset ); else @@ -639,7 +639,7 @@ void FillCharStyleListBox(ListBox& rToFill, SwDocShell* pDocSh, BOOL bSorted, BO } // non-pool styles const SwCharFmts* pFmts = pDoc->GetCharFmts(); - for(USHORT i = 0; i < pFmts->Count(); i++) + for(sal_uInt16 i = 0; i < pFmts->Count(); i++) { const SwCharFmt* pFmt = (*pFmts)[i]; if(pFmt->IsDefault()) @@ -647,7 +647,7 @@ void FillCharStyleListBox(ListBox& rToFill, SwDocShell* pDocSh, BOOL bSorted, BO const String& rName = pFmt->GetName(); if(rToFill.GetEntryPos(rName) == LISTBOX_ENTRY_NOTFOUND) { - USHORT nPos; + sal_uInt16 nPos; if(bSorted) nPos = InsertStringSorted(rName, rToFill, bHasOffset ); else @@ -658,7 +658,7 @@ void FillCharStyleListBox(ListBox& rToFill, SwDocShell* pDocSh, BOOL bSorted, BO } }; -SwTwips GetTableWidth( SwFrmFmt* pFmt, SwTabCols& rCols, USHORT *pPercent, +SwTwips GetTableWidth( SwFrmFmt* pFmt, SwTabCols& rCols, sal_uInt16 *pPercent, SwWrtShell* pSh ) { //Die Breite zu besorgen ist etwas komplizierter. @@ -705,29 +705,29 @@ String GetAppLangDateTimeString( const DateTime& rDT ) const SvtSysLocale aSysLocale; const LocaleDataWrapper& rAppLclData = aSysLocale.GetLocaleData(); String sRet( rAppLclData.getDate( rDT )); - ( sRet += ' ' ) += rAppLclData.getTime( rDT, FALSE, FALSE ); + ( sRet += ' ' ) += rAppLclData.getTime( rDT, sal_False, sal_False ); return sRet; } /*---------------------------------------------------------------------------- * add a new function which can get and set the current "SID_ATTR_APPLYCHARUNIT" value *---------------------------------------------------------------------------*/ -BOOL HasCharUnit( BOOL bWeb) +sal_Bool HasCharUnit( sal_Bool bWeb) { return SW_MOD()->GetUsrPref(bWeb)->IsApplyCharUnit(); } -void SetApplyCharUnit(BOOL bApplyChar, BOOL bWeb) +void SetApplyCharUnit(sal_Bool bApplyChar, sal_Bool bWeb) { SW_MOD()->ApplyUserCharUnit(bApplyChar, bWeb); } -bool ExecuteMenuCommand( PopupMenu& rMenu, SfxViewFrame& rViewFrame, USHORT nId ) +bool ExecuteMenuCommand( PopupMenu& rMenu, SfxViewFrame& rViewFrame, sal_uInt16 nId ) { bool bRet = false; - USHORT nItemCount = rMenu.GetItemCount(); + sal_uInt16 nItemCount = rMenu.GetItemCount(); String sCommand; - for( USHORT nItem = 0; nItem < nItemCount; ++nItem) + for( sal_uInt16 nItem = 0; nItem < nItemCount; ++nItem) { PopupMenu* pPopup = rMenu.GetPopupMenu( rMenu.GetItemId( nItem ) ); if(pPopup) diff --git a/sw/source/ui/utlui/unotools.cxx b/sw/source/ui/utlui/unotools.cxx index 7a8bcdbc11..dc363abc9e 100644 --- a/sw/source/ui/utlui/unotools.cxx +++ b/sw/source/ui/utlui/unotools.cxx @@ -154,7 +154,7 @@ void SwOneExampleFrame::CreateControl() uno::Sequence<beans::PropertyValue> aSeq(3); beans::PropertyValue* pValues = aSeq.getArray(); pValues[0].Name = C2U("ReadOnly"); - BOOL bTrue = sal_True; + sal_Bool bTrue = sal_True; pValues[0].Value.setValue(&bTrue, ::getBooleanCppuType()); pValues[1].Name = C2U("OpenFlags"); pValues[1].Value <<= C2U("-RB"); @@ -343,7 +343,7 @@ IMPL_LINK( SwOneExampleFrame, TimeoutHdl, Timer*, pTimer ) return 0; } -void SwOneExampleFrame::ClearDocument( BOOL bStartUpdateTimer ) +void SwOneExampleFrame::ClearDocument( sal_Bool bStartUpdateTimer ) { uno::Reference< lang::XUnoTunnel> xTunnel( _xCursor, uno::UNO_QUERY); if( xTunnel.is() ) @@ -368,8 +368,8 @@ void SwOneExampleFrame::ClearDocument( BOOL bStartUpdateTimer ) } else { - _xCursor->gotoStart(FALSE); - _xCursor->gotoEnd(TRUE); + _xCursor->gotoStart(sal_False); + _xCursor->gotoEnd(sal_True); _xCursor->setString(OUString()); } } diff --git a/sw/source/ui/utlui/unotools.src b/sw/source/ui/utlui/unotools.src index aa4be8804c..c6a4443a39 100644 --- a/sw/source/ui/utlui/unotools.src +++ b/sw/source/ui/utlui/unotools.src @@ -44,6 +44,7 @@ ModalDialog DLG_RENAME_XNAMED }; Edit ED_NEW_NAME { + HelpID = "sw:Edit:DLG_RENAME_XNAMED:ED_NEW_NAME"; Pos = MAP_APPFONT ( 65 , 13 ) ; Size = MAP_APPFONT ( 87 , 12 ) ; Border = TRUE; diff --git a/sw/source/ui/utlui/viewlayoutctrl.cxx b/sw/source/ui/utlui/viewlayoutctrl.cxx index fef0002b94..a52632ef08 100644 --- a/sw/source/ui/utlui/viewlayoutctrl.cxx +++ b/sw/source/ui/utlui/viewlayoutctrl.cxx @@ -51,7 +51,7 @@ const long nImageHeight = 11; struct SwViewLayoutControl::SwViewLayoutControl_Impl { - USHORT mnState; // 0 = single, 1 = auto, 2 = book, 3 = none + sal_uInt16 mnState; // 0 = single, 1 = auto, 2 = book, 3 = none Image maImageSingleColumn; Image maImageSingleColumn_Active; Image maImageAutomatic; @@ -62,7 +62,7 @@ struct SwViewLayoutControl::SwViewLayoutControl_Impl // class SwViewLayoutControl ------------------------------------------ -SwViewLayoutControl::SwViewLayoutControl( USHORT _nSlotId, USHORT _nId, StatusBar& rStb ) : +SwViewLayoutControl::SwViewLayoutControl( sal_uInt16 _nSlotId, sal_uInt16 _nId, StatusBar& rStb ) : SfxStatusBarControl( _nSlotId, _nId, rStb ), mpImpl( new SwViewLayoutControl_Impl ) { @@ -81,14 +81,14 @@ SwViewLayoutControl::~SwViewLayoutControl() delete mpImpl; } -void SwViewLayoutControl::StateChanged( USHORT /*nSID*/, SfxItemState eState, const SfxPoolItem* pState ) +void SwViewLayoutControl::StateChanged( sal_uInt16 /*nSID*/, SfxItemState eState, const SfxPoolItem* pState ) { if ( SFX_ITEM_AVAILABLE != eState || pState->ISA( SfxVoidItem ) ) GetStatusBar().SetItemText( GetId(), String() ); else { OSL_ENSURE( pState->ISA( SvxViewLayoutItem ), "invalid item type" ); - const USHORT nColumns = static_cast<const SvxViewLayoutItem*>( pState )->GetValue(); + const sal_uInt16 nColumns = static_cast<const SvxViewLayoutItem*>( pState )->GetValue(); const bool bBookMode = static_cast<const SvxViewLayoutItem*>( pState )->IsBookMode(); // SingleColumn Mode @@ -135,13 +135,13 @@ void SwViewLayoutControl::Paint( const UserDrawEvent& rUsrEvt ) pDev->DrawImage( aRect.TopLeft(), bBookMode ? mpImpl->maImageBookMode_Active : mpImpl->maImageBookMode ); } -BOOL SwViewLayoutControl::MouseButtonDown( const MouseEvent & rEvt ) +sal_Bool SwViewLayoutControl::MouseButtonDown( const MouseEvent & rEvt ) { const Rectangle aRect = getControlRect(); const Point aPoint = rEvt.GetPosPixel(); const long nXDiff = aPoint.X() - aRect.Left(); - USHORT nColumns = 1; + sal_uInt16 nColumns = 1; bool bBookMode = false; const long nXOffset = (aRect.GetWidth() - nImageWidthSum)/2; @@ -175,7 +175,7 @@ BOOL SwViewLayoutControl::MouseButtonDown( const MouseEvent & rEvt ) execute( aArgs ); - return TRUE; + return sal_True; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/utlui/zoomctrl.cxx b/sw/source/ui/utlui/zoomctrl.cxx index a828c9d6cd..3d91b7c10f 100644 --- a/sw/source/ui/utlui/zoomctrl.cxx +++ b/sw/source/ui/utlui/zoomctrl.cxx @@ -41,8 +41,8 @@ SFX_IMPL_STATUSBAR_CONTROL( SwZoomControl, SvxZoomItem ); -SwZoomControl::SwZoomControl( USHORT _nSlotId, - USHORT _nId, +SwZoomControl::SwZoomControl( sal_uInt16 _nSlotId, + sal_uInt16 _nId, StatusBar& rStb ) : SvxZoomStatusBarControl( _nSlotId, _nId, rStb ) { @@ -52,7 +52,7 @@ SwZoomControl::~SwZoomControl() { } -void SwZoomControl::StateChanged( USHORT nSID, SfxItemState eState, +void SwZoomControl::StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ) { if(SFX_ITEM_AVAILABLE == eState && pState->ISA( SfxStringItem )) diff --git a/sw/source/ui/vba/makefile.mk b/sw/source/ui/vba/makefile.mk deleted file mode 100644 index 26975035f1..0000000000 --- a/sw/source/ui/vba/makefile.mk +++ /dev/null @@ -1,140 +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=vbaswobj -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -DLLPRE = - -.IF "$(ENABLE_VBA)"!="YES" -dummy: - @echo "not building vba..." -.ENDIF - -INCPRE=$(INCCOM)$/$(TARGET) -CDEFS+=-DVBA_OOBUILD_HACK -# ------------------------------------------------------------------ - -SLOFILES= \ - $(SLO)$/vbaglobals.obj \ - $(SLO)$/vbaapplication.obj \ - $(SLO)$/vbadocument.obj \ - $(SLO)$/vbawindow.obj \ - $(SLO)$/vbasystem.obj \ - $(SLO)$/vbarangehelper.obj \ - $(SLO)$/vbarange.obj \ - $(SLO)$/vbabookmark.obj \ - $(SLO)$/vbabookmarks.obj \ - $(SLO)$/vbavariable.obj \ - $(SLO)$/vbavariables.obj \ - $(SLO)$/vbaview.obj \ - $(SLO)$/wordvbahelper.obj \ - $(SLO)$/service.obj \ - $(SLO)$/vbadocumentproperties.obj \ - $(SLO)$/vbapane.obj \ - $(SLO)$/vbapanes.obj \ - $(SLO)$/vbaoptions.obj \ - $(SLO)$/vbaselection.obj \ - $(SLO)$/vbatemplate.obj \ - $(SLO)$/vbaparagraphformat.obj \ - $(SLO)$/vbaautotextentry.obj \ - $(SLO)$/vbaparagraph.obj \ - $(SLO)$/vbafind.obj \ - $(SLO)$/vbareplacement.obj \ - $(SLO)$/vbastyle.obj \ - $(SLO)$/vbastyles.obj \ - $(SLO)$/vbafont.obj \ - $(SLO)$/vbapalette.obj \ - $(SLO)$/vbainformationhelper.obj \ - $(SLO)$/vbatable.obj \ - $(SLO)$/vbatables.obj \ - $(SLO)$/vbafield.obj \ - $(SLO)$/vbaborders.obj \ - $(SLO)$/vbadocuments.obj \ - $(SLO)$/vbaheaderfooter.obj \ - $(SLO)$/vbaheadersfooters.obj \ - $(SLO)$/vbaheaderfooterhelper.obj \ - $(SLO)$/vbaaddin.obj \ - $(SLO)$/vbaaddins.obj \ - $(SLO)$/vbadialogs.obj \ - $(SLO)$/vbadialog.obj \ - $(SLO)$/vbawrapformat.obj \ - $(SLO)$/vbapagesetup.obj \ - $(SLO)$/vbasection.obj \ - $(SLO)$/vbasections.obj \ - $(SLO)$/vbarow.obj \ - $(SLO)$/vbarows.obj \ - $(SLO)$/vbacolumn.obj \ - $(SLO)$/vbacolumns.obj \ - $(SLO)$/vbatablehelper.obj \ - $(SLO)$/vbacell.obj \ - $(SLO)$/vbacells.obj \ - $(SLO)$/vbatabstop.obj \ - $(SLO)$/vbatabstops.obj \ - $(SLO)$/vbatableofcontents.obj \ - $(SLO)$/vbatablesofcontents.obj \ - $(SLO)$/vbalistgallery.obj \ - $(SLO)$/vbalistgalleries.obj \ - $(SLO)$/vbalisthelper.obj \ - $(SLO)$/vbalisttemplate.obj \ - $(SLO)$/vbalisttemplates.obj \ - $(SLO)$/vbalistlevel.obj \ - $(SLO)$/vbalistlevels.obj \ - $(SLO)$/vbalistformat.obj \ - $(SLO)$/vbarevision.obj \ - $(SLO)$/vbarevisions.obj \ - $(SLO)$/vbaframe.obj \ - $(SLO)$/vbaframes.obj \ - $(SLO)$/vbaeventshelper.obj \ - -# These files to be enabled when field related patches -# are folded into libreoffice -.IF "$(ENABLE_FIELDBITS)"=="YES" -SLOFILES+=$(SLO)$/vbaformfield.obj \ - $(SLO)$/vbaformfields.obj \ - $(SLO)$/vbacheckbox.obj -.ENDIF - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk - -ALLTAR : \ - $(MISC)$/$(TARGET).don \ - -$(SLOFILES) : $(MISC)$/$(TARGET).don - -$(MISC)$/$(TARGET).don : $(SOLARBINDIR)$/oovbaapi.rdb - +$(CPPUMAKER) -O$(INCCOM)$/$(TARGET) -BUCR $(SOLARBINDIR)$/oovbaapi.rdb -X$(SOLARBINDIR)$/types.rdb && echo > $@ - echo $@ - diff --git a/sw/source/ui/vba/service.cxx b/sw/source/ui/vba/service.cxx index c3794606de..291f0e8989 100644 --- a/sw/source/ui/vba/service.cxx +++ b/sw/source/ui/vba/service.cxx @@ -65,24 +65,14 @@ extern sdecl::ServiceDecl const serviceDecl; extern "C" { - void SAL_CALL component_getImplementationEnvironment( + SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( const sal_Char ** ppEnvTypeName, uno_Environment ** /*ppEnv*/ ) { OSL_TRACE("In component_getImplementationEnv"); *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } - sal_Bool SAL_CALL component_writeInfo( - lang::XMultiServiceFactory * pServiceManager, registry::XRegistryKey * pRegistryKey ) - { - OSL_TRACE("In component_writeInfo"); - - // Component registration - return component_writeInfoHelper( pServiceManager, pRegistryKey, - globals::serviceDecl, document::serviceDecl, wrapformat::serviceDecl, vbaeventshelper::serviceDecl ); - } - - void * SAL_CALL component_getFactory( + SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory( const sal_Char * pImplName, lang::XMultiServiceFactory * pServiceManager, registry::XRegistryKey * pRegistryKey ) { diff --git a/sw/source/ui/vba/vbadocumentproperties.cxx b/sw/source/ui/vba/vbadocumentproperties.cxx index 43d16f4ee3..69c6539634 100644 --- a/sw/source/ui/vba/vbadocumentproperties.cxx +++ b/sw/source/ui/vba/vbadocumentproperties.cxx @@ -150,7 +150,7 @@ public: SwFEShell* pFEShell = mpDocShell->GetFEShell(); if(pFEShell) { - aReturn <<= pFEShell->GetLineCount(FALSE); + aReturn <<= pFEShell->GetLineCount(sal_False); } } } diff --git a/sw/source/ui/vba/vbadocuments.cxx b/sw/source/ui/vba/vbadocuments.cxx index fd42b8e9d7..a354574c10 100644 --- a/sw/source/ui/vba/vbadocuments.cxx +++ b/sw/source/ui/vba/vbadocuments.cxx @@ -121,7 +121,7 @@ SwVbaDocuments::Add( const uno::Any& Template, const uno::Any& /*NewTemplate*/, { return Open( sFileName, uno::Any(), uno::Any(), uno::Any(), uno::Any(), uno::Any(), uno::Any(), uno::Any(), uno::Any(), uno::Any(), uno::Any(), uno::Any(), uno::Any(), uno::Any(), uno::Any(), uno::Any()); } - uno::Reference <text::XTextDocument> xTextDoc( VbaDocumentsBase::Add() , uno::UNO_QUERY_THROW ); + uno::Reference <text::XTextDocument> xTextDoc( createDocument() , uno::UNO_QUERY_THROW ); if( xTextDoc.is() ) return getDocument( mxContext, xTextDoc, Application() ); @@ -132,7 +132,7 @@ SwVbaDocuments::Add( const uno::Any& Template, const uno::Any& /*NewTemplate*/, void SAL_CALL SwVbaDocuments::Close( const uno::Any& /*SaveChanges*/, const uno::Any& /*OriginalFormat*/, const uno::Any& /*RouteDocument*/ ) throw (uno::RuntimeException) { - VbaDocumentsBase::Close(); + closeDocuments(); } // #TODO# #FIXME# can any of the unused params below be used? @@ -151,7 +151,7 @@ SwVbaDocuments::Open( const ::rtl::OUString& Filename, const uno::Any& /*Confirm uno::Sequence< beans::PropertyValue > sProps(0); - uno::Reference <text::XTextDocument> xSpreadDoc( VbaDocumentsBase::Open( Filename, ReadOnly, sProps ), uno::UNO_QUERY_THROW ); + uno::Reference <text::XTextDocument> xSpreadDoc( openDocument( Filename, ReadOnly, sProps ), uno::UNO_QUERY_THROW ); uno::Any aRet = getDocument( mxContext, xSpreadDoc, Application() ); uno::Reference< word::XDocument > xDocument( aRet, uno::UNO_QUERY ); if ( xDocument.is() ) @@ -159,26 +159,7 @@ SwVbaDocuments::Open( const ::rtl::OUString& Filename, const uno::Any& /*Confirm return aRet; } - // VbaDocumentsBase / XDocumentsBase (to avoid warning C4266 for hiding function on wntmsci) -uno::Any SAL_CALL -SwVbaDocuments::Add() throw (uno::RuntimeException) -{ - return VbaDocumentsBase::Add(); -} - -void SAL_CALL -SwVbaDocuments::Close( ) throw (uno::RuntimeException) -{ - VbaDocumentsBase::Close(); -} - -uno::Any SAL_CALL -SwVbaDocuments::Open( const ::rtl::OUString& Filename, const uno::Any& ReadOnly, const uno::Sequence< beans::PropertyValue >& rProps ) throw (uno::RuntimeException) -{ - return VbaDocumentsBase::Open( Filename, ReadOnly, rProps ); -} - -rtl::OUString& +rtl::OUString& SwVbaDocuments::getServiceImplName() { static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaDocuments") ); diff --git a/sw/source/ui/vba/vbadocuments.hxx b/sw/source/ui/vba/vbadocuments.hxx index 665b07de75..d8ad9ff306 100644 --- a/sw/source/ui/vba/vbadocuments.hxx +++ b/sw/source/ui/vba/vbadocuments.hxx @@ -57,11 +57,6 @@ public: virtual css::uno::Any SAL_CALL Add( const css::uno::Any& Template, const css::uno::Any& NewTemplate, const css::uno::Any& DocumentType, const css::uno::Any& Visible ) throw (css::uno::RuntimeException); virtual css::uno::Any SAL_CALL Open( const ::rtl::OUString& Filename, const css::uno::Any& ConfirmConversions, const css::uno::Any& ReadOnly, const css::uno::Any& AddToRecentFiles, const css::uno::Any& PasswordDocument, const css::uno::Any& PasswordTemplate, const css::uno::Any& Revert, const css::uno::Any& WritePasswordDocument, const css::uno::Any& WritePasswordTemplate, const css::uno::Any& Format, const css::uno::Any& Encoding, const css::uno::Any& Visible, const css::uno::Any& OpenAndRepair, const css::uno::Any& DocumentDirection, const css::uno::Any& NoEncodingDialog, const css::uno::Any& XMLTransform ) throw (css::uno::RuntimeException); virtual void SAL_CALL Close( const css::uno::Any& SaveChanges, const css::uno::Any& OriginalFormat, const css::uno::Any& RouteDocument ) throw (css::uno::RuntimeException); - - // VbaDocumentsBase / XDocumentsBase (to avoid warning C4266 for hiding function on wntmsci) - virtual css::uno::Any SAL_CALL Add() throw (css::uno::RuntimeException); - virtual void SAL_CALL Close( ) throw (css::uno::RuntimeException); - virtual css::uno::Any SAL_CALL Open( const ::rtl::OUString& Filename, const css::uno::Any& ReadOnly, const css::uno::Sequence< css::beans::PropertyValue >& rProps ) throw (css::uno::RuntimeException); }; #endif /* SW_VBA_DOCUMENTS_HXX */ diff --git a/sw/source/ui/vba/vbaeventshelper.cxx b/sw/source/ui/vba/vbaeventshelper.cxx index b132aaeaf6..e837785be3 100644 --- a/sw/source/ui/vba/vbaeventshelper.cxx +++ b/sw/source/ui/vba/vbaeventshelper.cxx @@ -51,11 +51,6 @@ SwVbaEventsHelper::~SwVbaEventsHelper() { } -bool SwVbaEventsHelper::implEventsEnabled() throw (uno::RuntimeException) -{ - return true; -} - bool SwVbaEventsHelper::implPrepareEvent( EventQueue& rEventQueue, const EventHandlerInfo& rInfo, const uno::Sequence< uno::Any >& /*rArgs*/ ) throw (uno::RuntimeException) { diff --git a/sw/source/ui/vba/vbaeventshelper.hxx b/sw/source/ui/vba/vbaeventshelper.hxx index 3e28174ec4..a5817eef2d 100644 --- a/sw/source/ui/vba/vbaeventshelper.hxx +++ b/sw/source/ui/vba/vbaeventshelper.hxx @@ -42,7 +42,6 @@ public: virtual ~SwVbaEventsHelper(); protected: - virtual bool implEventsEnabled() throw (css::uno::RuntimeException); virtual bool implPrepareEvent( EventQueue& rEventQueue, const EventHandlerInfo& rInfo, const css::uno::Sequence< css::uno::Any >& rArgs ) throw (css::uno::RuntimeException); virtual css::uno::Sequence< css::uno::Any > implBuildArgumentList( const EventHandlerInfo& rInfo, const css::uno::Sequence< css::uno::Any >& rArgs ) throw (css::lang::IllegalArgumentException); virtual void implPostProcessEvent( EventQueue& rEventQueue, const EventHandlerInfo& rInfo, bool bSuccess, bool bCancel ) throw (css::uno::RuntimeException); diff --git a/sw/source/ui/vba/vbafield.cxx b/sw/source/ui/vba/vbafield.cxx index 9f7f3da8f9..0ff4295a12 100644 --- a/sw/source/ui/vba/vbafield.cxx +++ b/sw/source/ui/vba/vbafield.cxx @@ -250,10 +250,10 @@ xub_StrLen _ReadFieldParams::FindNextStringPiece(const xub_StrLen nStart) // read parameters "1-3" or 1-3 with both values between 1 and nMax -bool _ReadFieldParams::GetTokenSttFromTo(USHORT* pFrom, USHORT* pTo, USHORT nMax) +bool _ReadFieldParams::GetTokenSttFromTo(sal_uInt16* pFrom, sal_uInt16* pTo, sal_uInt16 nMax) { - USHORT nStart = 0; - USHORT nEnd = 0; + sal_uInt16 nStart = 0; + sal_uInt16 nEnd = 0; xub_StrLen n = GoToTokenParam(); if( STRING_NOTFOUND != n ) { @@ -264,8 +264,8 @@ bool _ReadFieldParams::GetTokenSttFromTo(USHORT* pFrom, USHORT* pTo, USHORT nMax String sStart( sParams.GetToken(0, '-', nIndex) ); if( STRING_NOTFOUND != nIndex ) { - nStart = static_cast<USHORT>(sStart.ToInt32()); - nEnd = static_cast<USHORT>(sParams.Copy(nIndex).ToInt32()); + nStart = static_cast<sal_uInt16>(sStart.ToInt32()); + nEnd = static_cast<sal_uInt16>(sParams.Copy(nIndex).ToInt32()); } } if( pFrom ) *pFrom = nStart; diff --git a/sw/source/ui/vba/vbaselection.cxx b/sw/source/ui/vba/vbaselection.cxx index 383bcd69de..3b115ad4c7 100644 --- a/sw/source/ui/vba/vbaselection.cxx +++ b/sw/source/ui/vba/vbaselection.cxx @@ -127,7 +127,7 @@ SwVbaSelection::setText( const rtl::OUString& rText ) throw ( uno::RuntimeExcept void SAL_CALL SwVbaSelection::TypeText( const rtl::OUString& rText ) throw ( uno::RuntimeException ) { - // FIXME: handle the property Options.ReplaceSelection, the default value is TRUE + // FIXME: handle the property Options.ReplaceSelection, the default value is sal_True setText( rText ); } diff --git a/sw/source/ui/vba/vbatablehelper.cxx b/sw/source/ui/vba/vbatablehelper.cxx index c77f02a56d..072c39485a 100644 --- a/sw/source/ui/vba/vbatablehelper.cxx +++ b/sw/source/ui/vba/vbatablehelper.cxx @@ -181,7 +181,7 @@ SwTableBox* SwVbaTableHelper::GetTabBox( sal_Int32 nCol, sal_Int32 nRow ) throw return pStart; } -void SwVbaTableHelper::InitTabCols( SwTabCols& rCols, const SwTableBox *pStart, BOOL /*bCurRowOnly*/ ) +void SwVbaTableHelper::InitTabCols( SwTabCols& rCols, const SwTableBox *pStart, sal_Bool /*bCurRowOnly*/ ) { rCols.SetLeftMin ( 0 ); rCols.SetLeft ( 0 ); @@ -205,7 +205,7 @@ sal_Int32 SwVbaTableHelper::GetRightSeparator( SwTabCols& rCols, sal_Int32 nNum) sal_Int32 i = 0; while( nNum >= 0 ) { - if( !rCols.IsHidden( static_cast< USHORT >(i)) ) + if( !rCols.IsHidden( static_cast< sal_uInt16 >(i)) ) nNum--; i++; } @@ -240,10 +240,10 @@ sal_Int32 SwVbaTableHelper::GetColWidth( SwTabCols& rCols, sal_Int32 nNum ) thro else { SwTwips nRValid = nNum < GetColCount( rCols ) ? - rCols[(USHORT)GetRightSeparator( rCols, nNum)]: + rCols[(sal_uInt16)GetRightSeparator( rCols, nNum)]: rCols.GetRight(); SwTwips nLValid = nNum ? - rCols[(USHORT)GetRightSeparator( rCols, nNum - 1)]: + rCols[(sal_uInt16)GetRightSeparator( rCols, nNum - 1)]: rCols.GetLeft(); nWidth = nRValid - nLValid; } @@ -271,20 +271,20 @@ void SwVbaTableHelper::SetColWidth( sal_Int32 _width, sal_Int32 nCol, sal_Int32 int nDiff = (int)(nNewWidth - nWidth); if( !nCol ) - aCols[ static_cast< USHORT >(GetRightSeparator(aCols, 0)) ] += nDiff; + aCols[ static_cast< sal_uInt16 >(GetRightSeparator(aCols, 0)) ] += nDiff; else if( nCol < GetColCount( aCols ) ) { if(nDiff < GetColWidth( aCols, nCol + 1) - MINLAY) - aCols[ static_cast< USHORT >(GetRightSeparator( aCols, nCol)) ] += nDiff; + aCols[ static_cast< sal_uInt16 >(GetRightSeparator( aCols, nCol)) ] += nDiff; else { int nDiffLeft = nDiff - (int)GetColWidth( aCols, nCol + 1) + (int)MINLAY; - aCols[ static_cast< USHORT >(GetRightSeparator( aCols, nCol)) ] += (nDiff - nDiffLeft); - aCols[ static_cast< USHORT >(GetRightSeparator( aCols, nCol - 1)) ] -= nDiffLeft; + aCols[ static_cast< sal_uInt16 >(GetRightSeparator( aCols, nCol)) ] += (nDiff - nDiffLeft); + aCols[ static_cast< sal_uInt16 >(GetRightSeparator( aCols, nCol - 1)) ] -= nDiffLeft; } } else - aCols[ static_cast< USHORT >(GetRightSeparator( aCols, nCol-1)) ] -= nDiff; + aCols[ static_cast< sal_uInt16 >(GetRightSeparator( aCols, nCol-1)) ] -= nDiff; } else aCols.SetRight( Min( (long)nNewWidth, aCols.GetRightMax()) ); diff --git a/sw/source/ui/vba/vbatablehelper.hxx b/sw/source/ui/vba/vbatablehelper.hxx index b603fd115d..0dcd630d07 100644 --- a/sw/source/ui/vba/vbatablehelper.hxx +++ b/sw/source/ui/vba/vbatablehelper.hxx @@ -43,7 +43,7 @@ private: private: SwTableBox* GetTabBox( sal_Int32 nCol, sal_Int32 nRow ) throw (css::uno::RuntimeException); - void InitTabCols( SwTabCols& rCols, const SwTableBox *pStart, sal_Bool bCurRowOnly = FALSE ); + void InitTabCols( SwTabCols& rCols, const SwTableBox *pStart, sal_Bool bCurRowOnly = sal_False ); sal_Int32 GetRightSeparator( SwTabCols& rCols, sal_Int32 nNum) const; sal_Int32 GetColCount( SwTabCols& rCols ) const; sal_Int32 GetColWidth( SwTabCols& rCols, sal_Int32 nNum ) throw (css::uno::RuntimeException); @@ -58,8 +58,8 @@ public: sal_Int32 getTableWidth( ) throw (css::uno::RuntimeException); void setTableWidth( sal_Int32 _width ) throw (css::uno::RuntimeException); - sal_Int32 GetColWidth( sal_Int32 nCol, sal_Int32 nRow = 0, sal_Bool bCurRowOnly = FALSE ) throw (css::uno::RuntimeException); - void SetColWidth( sal_Int32 _width, sal_Int32 nCol, sal_Int32 nRow = 0, sal_Bool bCurRowOnly = FALSE ) throw (css::uno::RuntimeException); + sal_Int32 GetColWidth( sal_Int32 nCol, sal_Int32 nRow = 0, sal_Bool bCurRowOnly = sal_False ) throw (css::uno::RuntimeException); + void SetColWidth( sal_Int32 _width, sal_Int32 nCol, sal_Int32 nRow = 0, sal_Bool bCurRowOnly = sal_False ) throw (css::uno::RuntimeException); static SwTable* GetSwTable( const css::uno::Reference< css::text::XTextTable >& xTextTable ) throw (css::uno::RuntimeException); static rtl::OUString getColumnStr( sal_Int32 nCol ); diff --git a/sw/source/ui/web/makefile.mk b/sw/source/ui/web/makefile.mk deleted file mode 100644 index 3dca3955de..0000000000 --- a/sw/source/ui/web/makefile.mk +++ /dev/null @@ -1,62 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=web - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -SRS1NAME=$(TARGET) -SRC1FILES = \ - web.src - -EXCEPTIONSFILES = \ - $(SLO)$/wdocsh.obj \ - $(SLO)$/wformsh.obj \ - $(SLO)$/wfrmsh.obj \ - $(SLO)$/wgrfsh.obj \ - $(SLO)$/wlistsh.obj \ - $(SLO)$/wolesh.obj \ - $(SLO)$/wtabsh.obj \ - $(SLO)$/wtextsh.obj \ - $(SLO)$/wview.obj - -SLOFILES = \ - $(EXCEPTIONSFILES) - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/ui/web/web.src b/sw/source/ui/web/web.src index 08b6707962..01fcf69716 100644 --- a/sw/source/ui/web/web.src +++ b/sw/source/ui/web/web.src @@ -25,15 +25,10 @@ * ************************************************************************/ -#ifndef _SVX_SVXIDS_HRC #include <svx/svxids.hrc> -#endif #include "globals.hrc" #include "cmdid.h" #include "web.hrc" -#include "swmn.hrc" -#define ACC_SW_WEB -#include "toolbox.hrc" #include "helpid.h" #include "cfgid.h" @@ -65,124 +60,6 @@ String RID_WEBTOOLS_TOOLBOX { Text [ en-US ] = "Main Toolbar/Web" ; }; -ToolBox RID_WEBTOOLS_TOOLBOX -{ - HelpID = HID_WEBTOOLS_TOOLBOX ; - Border = TRUE ; - SVLook = TRUE ; - Dockable = TRUE ; - Moveable = TRUE ; - Sizeable = TRUE ; - Closeable = TRUE ; - Zoomable = TRUE ; - LineSpacing = TRUE ; - HideWhenDeactivate = TRUE ; - Customize = TRUE ; - MenuStrings = TRUE ; - Scroll = TRUE ; - Hide = TRUE ; - Align = BOXALIGN_LEFT ; - ItemList = - { - ToolBoxItem - { - Identifier = FN_INSERT_CTRL ; - HelpID = HID_INSERT_CTRL ; - DropDown = TRUE ; - }; - ToolBoxItem - { - Identifier = FN_INSERT_FIELD_CTRL ; - HelpID = HID_INSERT_FIELD_CTRL ; - DropDown = TRUE ; - }; - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - Identifier = SID_DRAW_TEXT_MARQUEE ; - HelpID = SID_DRAW_TEXT_MARQUEE ; - }; - ToolBoxItem - { - Identifier = SID_FM_CONFIG ; - HelpID = SID_FM_CONFIG; - DropDown = TRUE ; - }; - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - Identifier = FN_GLOSSARY_DLG ; - HelpID = FN_GLOSSARY_DLG ; - DropDown = TRUE ; - }; - ToolBoxItem - { - Identifier = FN_SPELL_GRAMMAR_DIALOG; - HelpID = FN_SPELL_GRAMMAR_DIALOG; - }; - ToolBoxItem - { - ITEM_TOOLBAR_AUTOSPELL_CHECK - }; - ToolBoxItem - { - Identifier = FN_HYPHENATE_OPT_DLG; - HelpID = FN_HYPHENATE_OPT_DLG; - Hide = TRUE; - }; - ToolBoxItem - { - Identifier = SID_THESAURUS; - HelpID = SID_THESAURUS; - Hide = TRUE; - }; - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - Identifier = SID_SEARCH_DLG ; - HelpID = SID_SEARCH_DLG ; - }; - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - Identifier = SID_ATTR_ZOOM; - HelpID = SID_ATTR_ZOOM ; - Hide = TRUE; - }; - ToolBoxItem - { - Identifier = FN_VIEW_META_CHARS ; - HelpID = FN_VIEW_META_CHARS ; - }; - ToolBoxItem - { - Identifier = FN_VIEW_GRAPHIC ; - HelpID = FN_VIEW_GRAPHIC ; - }; - ToolBoxItem - { - Identifier = FN_PRINT_LAYOUT ; - HelpID = FN_PRINT_LAYOUT ; - }; - ToolBoxItem - { - Identifier = SID_SOURCEVIEW ; - HelpID = HID_SOURCEVIEW ; - }; - }; -}; /************************************************************************* Textleiste *************************************************************************/ @@ -190,156 +67,17 @@ String RID_WEBTEXT_TOOLBOX { Text [ en-US ] = "Text Object Bar/Web" ; }; -ToolBox RID_WEBTEXT_TOOLBOX -{ - HelpID = HID_WEBTEXT_TOOLBOX ; - Border = TRUE ; - SVLook = TRUE ; - Dockable = TRUE ; - Moveable = TRUE ; - Sizeable = TRUE ; - Closeable = TRUE ; - Zoomable = TRUE ; - Hide = TRUE ; - HideWhenDeactivate = TRUE ; - LineSpacing = TRUE ; - Customize = TRUE ; - MenuStrings = TRUE ; - ItemList = - { - MN_TEMPLATE - MN_FONT - MN_TEXT1(TRUE) - MN_TEXT_LTR_RTL - MN_TEXT_LINESPACE - MN_TEXT2 - MN_TEXT_BACKGROUND - MN_TEXT_DIALOGS(TRUE) - }; - Scroll = TRUE ; -}; String RID_WEBFRAME_TOOLBOX { Text [ en-US ] = "Frame Object Bar/Web" ; }; -ToolBox RID_WEBFRAME_TOOLBOX -{ - HelpID = HID_WEBFRAME_TOOLBOX ; - Border = TRUE ; - SVLook = TRUE ; - Dockable = TRUE ; - Moveable = TRUE ; - Sizeable = TRUE ; - Closeable = TRUE ; - Zoomable = TRUE ; - Hide = TRUE ; - LineSpacing = TRUE ; - MenuStrings = TRUE ; - HideWhenDeactivate = TRUE ; - Customize = TRUE ; - ItemList = - { - MN_FRAME_WRAP_WEB - MN_FRAME1 - MN_FRAME3 - MN_LINESTYLE - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - MN_BACKGROUND_COLOR - ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; }; - MN_ATTRIBUTES_FRAME - ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; }; - MN_LAYER - ToolBoxItem - { - Identifier = FN_TOOL_ANKER ; - HelpID = FN_TOOL_ANKER ; - }; - }; - Scroll = TRUE ; -}; String RID_WEBGRAPHIC_TOOLBOX { Text [ en-US ] = "Graphics Object Bar/Web" ; }; -ToolBox RID_WEBGRAPHIC_TOOLBOX -{ - HelpID = HID_WEBGRAPHIC_TOOLBOX ; - Border = TRUE ; - SVLook = TRUE ; - Dockable = TRUE ; - Moveable = TRUE ; - Sizeable = TRUE ; - Closeable = TRUE ; - Zoomable = TRUE ; - LineSpacing = TRUE ; - HideWhenDeactivate = TRUE ; - MenuStrings = TRUE ; - Customize = TRUE ; - Hide = TRUE ; - ItemList = - { - MN_FRAME_WRAP_WEB - MN_FRAME1 - MN_FRAME3 - MN_LINESTYLE - ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; }; - MN_ATTRIBUTES_GRAFIK - ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; }; - MN_LAYER - ToolBoxItem - { - Identifier = FN_TOOL_ANKER ; - HelpID = FN_TOOL_ANKER ; - DropDown = TRUE ; - }; - }; - Scroll = TRUE ; -}; String RID_WEBOLE_TOOLBOX { Text [ en-US ] = "Object/Web" ; }; -ToolBox RID_WEBOLE_TOOLBOX -{ - HelpID = HID_OLE_TOOLBOX ; - Border = TRUE ; - SVLook = TRUE ; - Dockable = TRUE ; - Moveable = TRUE ; - Sizeable = TRUE ; - Closeable = TRUE ; - Zoomable = TRUE ; - LineSpacing = TRUE ; - HideWhenDeactivate = TRUE ; - Customize = TRUE ; - MenuStrings = TRUE ; - Hide = TRUE ; - Scroll = TRUE ; - ItemList = - { - MN_FRAME_WRAP_WEB - MN_FRAME1 - MN_FRAME3 - MN_LINESTYLE - ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; }; - MN_ATTRIBUTES_OLE - ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; }; - MN_LAYER - ToolBoxItem - { - Identifier = FN_TOOL_ANKER ; - HelpID = FN_TOOL_ANKER ; - DropDown = TRUE ; - }; - }; -}; -/************************************************************************* -*************************************************************************/ -Menu MN_WEB_TEXT_POPUPMENU - BASE_TEXT_POPUPMENU_BEGIN - BASE_TEXT_POPUPMENU_END diff --git a/sw/source/ui/web/wtextsh.cxx b/sw/source/ui/web/wtextsh.cxx index 8c33d7b420..650afb1b69 100644 --- a/sw/source/ui/web/wtextsh.cxx +++ b/sw/source/ui/web/wtextsh.cxx @@ -62,7 +62,7 @@ SFX_IMPL_INTERFACE(SwWebTextShell, SwBaseShell, SW_RES(STR_SHELLNAME_WEBTEXT)) { - SFX_POPUPMENU_REGISTRATION(SW_RES(MN_WEB_TEXT_POPUPMENU)); + SFX_POPUPMENU_REGISTRATION(SW_RES(MN_TEXT_POPUPMENU)); SFX_OBJECTBAR_REGISTRATION(SFX_OBJECTBAR_OBJECT, SW_RES(RID_TEXT_TOOLBOX)); SFX_CHILDWINDOW_REGISTRATION(FN_EDIT_FORMULA); SFX_CHILDWINDOW_REGISTRATION(FN_INSERT_FIELD); diff --git a/sw/source/ui/web/wview.cxx b/sw/source/ui/web/wview.cxx index ade1cf9dc4..2c4c3bc927 100644 --- a/sw/source/ui/web/wview.cxx +++ b/sw/source/ui/web/wview.cxx @@ -71,11 +71,6 @@ #include <shells.hrc> #define SwWebView -#define SearchAttributes -#define ReplaceAttributes -#define SearchSettings -#define _ExecSearch ExecSearch -#define _StateSearch StateSearch #define Frames #define Graphics #define OLEObjects @@ -90,7 +85,6 @@ #define ListInText #define ListInTable #define Page -#include <svx/svxslots.hxx> #include <swslots.hxx> @@ -99,7 +93,6 @@ SFX_IMPL_NAMED_VIEWFACTORY(SwWebView, "Default") SFX_VIEW_REGISTRATION(SwWebDocShell); } - SFX_IMPL_INTERFACE( SwWebView, SwView, SW_RES(RID_WEBTOOLS_TOOLBOX) ) { SFX_CHILDWINDOW_REGISTRATION(SfxTemplateDialogWrapper::GetChildWindowId()); @@ -123,11 +116,11 @@ SwWebView::~SwWebView() void SwWebView::SelectShell() { // Entscheidung, ob UpdateTable gerufen werden muss - BOOL bUpdateTable = FALSE; + sal_Bool bUpdateTable = sal_False; const SwFrmFmt* pCurTableFmt = GetWrtShell().GetTableFmt(); if(pCurTableFmt && pCurTableFmt != GetLastTblFrmFmt()) { - bUpdateTable = TRUE; // kann erst spaeter ausgefuehrt werden + bUpdateTable = sal_True; // kann erst spaeter ausgefuehrt werden } SetLastTblFrmFmt(pCurTableFmt); //SEL_TBL und SEL_TBL_CELLS koennen verodert sein! @@ -137,7 +130,7 @@ void SwWebView::SelectShell() int _nSelectionType = GetSelectionType(); if ( nNewSelectionType == _nSelectionType ) { - GetViewFrame()->GetBindings().InvalidateAll( FALSE ); + GetViewFrame()->GetBindings().InvalidateAll( sal_False ); if ( _nSelectionType & nsSelectionType::SEL_OLE || _nSelectionType & nsSelectionType::SEL_GRF ) //Fuer Grafiken und OLE kann sich natuerlich das Verb aendern! @@ -158,8 +151,8 @@ void SwWebView::SelectShell() pBarCfg->SetTopToolbar( _nSelectionType, nId ); SfxShell *pSfxShell; - USHORT i; - for ( i = 0; TRUE; ++i ) + sal_uInt16 i; + for ( i = 0; sal_True; ++i ) { pSfxShell = rDispatcher.GetShell( i ); if ( !( pSfxShell->ISA( SwBaseShell ) || @@ -171,15 +164,15 @@ void SwWebView::SelectShell() rDispatcher.Pop( *pSfxShell, SFX_SHELL_POP_UNTIL | SFX_SHELL_POP_DELETE); } - BOOL bInitFormShell = FALSE; + sal_Bool bInitFormShell = sal_False; if( !GetFormShell() ) { - bInitFormShell = TRUE; + bInitFormShell = sal_True; SetFormShell( new FmFormShell( this ) ); rDispatcher.Push( *GetFormShell() ); } - BOOL bSetExtInpCntxt = FALSE; + sal_Bool bSetExtInpCntxt = sal_False; _nSelectionType = nNewSelectionType; SetSelectionType( _nSelectionType ); ShellModes eShellMode; @@ -251,7 +244,7 @@ void SwWebView::SelectShell() } else { - bSetExtInpCntxt = TRUE; + bSetExtInpCntxt = sal_True; eShellMode = SHELL_MODE_TEXT; if ( _nSelectionType & nsSelectionType::SEL_NUM ) { @@ -275,7 +268,7 @@ void SwWebView::SelectShell() if( !GetDocShell()->IsReadOnly() ) { if( bSetExtInpCntxt && GetWrtShell().HasReadonlySel() ) - bSetExtInpCntxt = FALSE; + bSetExtInpCntxt = sal_False; InputContext aCntxt( GetEditWin().GetInputContext() ); aCntxt.SetOptions( bSetExtInpCntxt @@ -309,7 +302,7 @@ void SwWebView::SelectShell() //Guenstiger Zeitpunkt fuer die Kommunikation mit OLE-Objekten? if ( GetDocShell()->GetDoc()->IsOLEPrtNotifyPending() ) - GetDocShell()->GetDoc()->PrtOLENotify( FALSE ); + GetDocShell()->GetDoc()->PrtOLENotify( sal_False ); //jetzt das Tabellen-Update if(bUpdateTable) diff --git a/sw/source/ui/wrtsh/delete.cxx b/sw/source/ui/wrtsh/delete.cxx index 367361fe43..44385b000d 100644 --- a/sw/source/ui/wrtsh/delete.cxx +++ b/sw/source/ui/wrtsh/delete.cxx @@ -47,7 +47,7 @@ inline void SwWrtShell::OpenMark() SetMark(); } -inline void SwWrtShell::CloseMark( BOOL bOkFlag ) +inline void SwWrtShell::CloseMark( sal_Bool bOkFlag ) { if( bOkFlag ) UpdateAttr(); @@ -59,9 +59,9 @@ inline void SwWrtShell::CloseMark( BOOL bOkFlag ) } // #i23725# -BOOL SwWrtShell::TryRemoveIndent() +sal_Bool SwWrtShell::TryRemoveIndent() { - BOOL bResult = FALSE; + sal_Bool bResult = sal_False; SfxItemSet aAttrSet(GetAttrPool(), RES_LR_SPACE, RES_LR_SPACE); GetCurAttr(aAttrSet); @@ -72,19 +72,19 @@ BOOL SwWrtShell::TryRemoveIndent() if (aOldFirstLineOfst > 0) { aItem.SetTxtFirstLineOfst(0); - bResult = TRUE; + bResult = sal_True; } else if (aOldFirstLineOfst < 0) { aItem.SetTxtFirstLineOfst(0); aItem.SetLeft(aItem.GetLeft() + aOldFirstLineOfst); - bResult = TRUE; + bResult = sal_True; } else if (aItem.GetLeft() != 0) { aItem.SetLeft(0); - bResult = TRUE; + bResult = sal_True; } if (bResult) @@ -114,7 +114,7 @@ long SwWrtShell::DelLine() SwCrsrShell::RightMargin(); long nRet = Delete(); - Pop(FALSE); + Pop(sal_False); if( nRet ) UpdateAttr(); return nRet; @@ -198,7 +198,7 @@ long SwWrtShell::DelLeft() } // JP 29.06.95: nie eine davor stehende Tabelle loeschen. - BOOL bSwap = FALSE; + sal_Bool bSwap = sal_False; const SwTableNode * pWasInTblNd = SwCrsrShell::IsCrsrInTbl(); if( SwCrsrShell::IsSttPara()) @@ -234,7 +234,7 @@ long SwWrtShell::DelLeft() OpenMark(); SwCrsrShell::Right(1,CRSR_SKIP_CHARS); SwCrsrShell::SwapPam(); - bSwap = TRUE; + bSwap = sal_True; } else { @@ -311,7 +311,7 @@ long SwWrtShell::DelRight() } // restore cursor - SwCrsrShell::Pop( FALSE ); + SwCrsrShell::Pop( sal_False ); if( bDelFull ) { @@ -351,14 +351,14 @@ long SwWrtShell::DelRight() have moved to a different cell */ if (pSNdOld != pSNdNew) { - SwCrsrShell::Pop( TRUE ); + SwCrsrShell::Pop( sal_True ); break; } } } // restore cursor - SwCrsrShell::Pop( FALSE ); + SwCrsrShell::Pop( sal_False ); } } @@ -435,11 +435,11 @@ long SwWrtShell::DelToEndOfPara() SetMark(); if( !MovePara(fnParaCurr,fnParaEnd)) { - Pop(FALSE); + Pop(sal_False); return 0; } long nRet = Delete(); - Pop(FALSE); + Pop(sal_False); if( nRet ) UpdateAttr(); return nRet; @@ -455,11 +455,11 @@ long SwWrtShell::DelToStartOfPara() SetMark(); if( !MovePara(fnParaCurr,fnParaStart)) { - Pop(FALSE); + Pop(sal_False); return 0; } long nRet = Delete(); - Pop(FALSE); + Pop(sal_False); if( nRet ) UpdateAttr(); return nRet; @@ -539,11 +539,11 @@ long SwWrtShell::DelPrvWord() { // skip over all-1 spaces short n = -1; - while( ' ' == GetChar( FALSE, n )) + while( ' ' == GetChar( sal_False, n )) --n; if( ++n ) - ExtendSelection( FALSE, -n ); + ExtendSelection( sal_False, -n ); } } else if( IsSttPara()) diff --git a/sw/source/ui/wrtsh/makefile.mk b/sw/source/ui/wrtsh/makefile.mk deleted file mode 100644 index 84ce030afb..0000000000 --- a/sw/source/ui/wrtsh/makefile.mk +++ /dev/null @@ -1,62 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=wrtsh - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -SRS1NAME=$(TARGET) -SRC1FILES = \ - wrtsh.src - -SLOFILES = \ - $(EXCEPTIONSFILES) - -EXCEPTIONSFILES = \ - $(SLO)$/delete.obj \ - $(SLO)$/move.obj \ - $(SLO)$/navmgr.obj \ - $(SLO)$/select.obj \ - $(SLO)$/wrtsh1.obj \ - $(SLO)$/wrtsh2.obj \ - $(SLO)$/wrtsh3.obj \ - $(SLO)$/wrtsh4.obj \ - $(SLO)$/wrtundo.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/ui/wrtsh/move.cxx b/sw/source/ui/wrtsh/move.cxx index 6b9f6cb61a..f7776f228a 100644 --- a/sw/source/ui/wrtsh/move.cxx +++ b/sw/source/ui/wrtsh/move.cxx @@ -53,12 +53,12 @@ const long nReadOnlyScrollOfst = 10; class ShellMoveCrsr { SwWrtShell* pSh; - BOOL bAct; + sal_Bool bAct; public: - inline ShellMoveCrsr( SwWrtShell* pWrtSh, BOOL bSel ) + inline ShellMoveCrsr( SwWrtShell* pWrtSh, sal_Bool bSel ) { - bAct = !pWrtSh->ActionPend() && (pWrtSh->GetFrmType(0,FALSE) & FRMTYPE_FLY_ANY); - ( pSh = pWrtSh )->MoveCrsr( BOOL(bSel) ); + bAct = !pWrtSh->ActionPend() && (pWrtSh->GetFrmType(0,sal_False) & FRMTYPE_FLY_ANY); + ( pSh = pWrtSh )->MoveCrsr( sal_Bool(bSel) ); pWrtSh->GetView().GetViewFrame()->GetBindings().Invalidate(SID_HYPERLINK_GETLINK); } inline ~ShellMoveCrsr() @@ -73,7 +73,7 @@ public: } }; -void SwWrtShell::MoveCrsr( BOOL bWithSelect ) +void SwWrtShell::MoveCrsr( sal_Bool bWithSelect ) { ResetCursorStack(); if ( IsGCAttr() ) @@ -86,35 +86,35 @@ void SwWrtShell::MoveCrsr( BOOL bWithSelect ) else { EndSelect(); - (this->*fnKillSel)( 0, FALSE ); + (this->*fnKillSel)( 0, sal_False ); } } -BOOL SwWrtShell::SimpleMove( FNSimpleMove FnSimpleMove, BOOL bSelect ) +sal_Bool SwWrtShell::SimpleMove( FNSimpleMove FnSimpleMove, sal_Bool bSelect ) { - BOOL nRet; + sal_Bool nRet; if( bSelect ) { SttCrsrMove(); - MoveCrsr( TRUE ); + MoveCrsr( sal_True ); nRet = (this->*FnSimpleMove)(); EndCrsrMove(); } else if( 0 != ( nRet = (this->*FnSimpleMove)() ) ) - MoveCrsr( FALSE ); + MoveCrsr( sal_False ); return nRet; } -BOOL SwWrtShell::Left( USHORT nMode, BOOL bSelect, - USHORT nCount, BOOL bBasicCall, BOOL bVisual ) +sal_Bool SwWrtShell::Left( sal_uInt16 nMode, sal_Bool bSelect, + sal_uInt16 nCount, sal_Bool bBasicCall, sal_Bool bVisual ) { if ( !bSelect && !bBasicCall && IsCrsrReadonly() && !GetViewOptions()->IsSelectionInReadonly()) { Point aTmp( VisArea().Pos() ); aTmp.X() -= VisArea().Width() * nReadOnlyScrollOfst / 100; rView.SetVisArea( aTmp ); - return TRUE; + return sal_True; } else { @@ -125,8 +125,8 @@ BOOL SwWrtShell::Left( USHORT nMode, BOOL bSelect, -BOOL SwWrtShell::Right( USHORT nMode, BOOL bSelect, - USHORT nCount, BOOL bBasicCall, BOOL bVisual ) +sal_Bool SwWrtShell::Right( sal_uInt16 nMode, sal_Bool bSelect, + sal_uInt16 nCount, sal_Bool bBasicCall, sal_Bool bVisual ) { if ( !bSelect && !bBasicCall && IsCrsrReadonly() && !GetViewOptions()->IsSelectionInReadonly() ) { @@ -134,7 +134,7 @@ BOOL SwWrtShell::Right( USHORT nMode, BOOL bSelect, aTmp.X() += VisArea().Width() * nReadOnlyScrollOfst / 100; aTmp.X() = rView.SetHScrollMax( aTmp.X() ); rView.SetVisArea( aTmp ); - return TRUE; + return sal_True; } else { @@ -145,14 +145,14 @@ BOOL SwWrtShell::Right( USHORT nMode, BOOL bSelect, -BOOL SwWrtShell::Up( BOOL bSelect, USHORT nCount, BOOL bBasicCall ) +sal_Bool SwWrtShell::Up( sal_Bool bSelect, sal_uInt16 nCount, sal_Bool bBasicCall ) { if ( !bSelect && !bBasicCall && IsCrsrReadonly() && !GetViewOptions()->IsSelectionInReadonly()) { Point aTmp( VisArea().Pos() ); aTmp.Y() -= VisArea().Height() * nReadOnlyScrollOfst / 100; rView.SetVisArea( aTmp ); - return TRUE; + return sal_True; } else { @@ -163,7 +163,7 @@ BOOL SwWrtShell::Up( BOOL bSelect, USHORT nCount, BOOL bBasicCall ) -BOOL SwWrtShell::Down( BOOL bSelect, USHORT nCount, BOOL bBasicCall ) +sal_Bool SwWrtShell::Down( sal_Bool bSelect, sal_uInt16 nCount, sal_Bool bBasicCall ) { if ( !bSelect && !bBasicCall && IsCrsrReadonly() && !GetViewOptions()->IsSelectionInReadonly()) { @@ -171,7 +171,7 @@ BOOL SwWrtShell::Down( BOOL bSelect, USHORT nCount, BOOL bBasicCall ) aTmp.Y() += VisArea().Height() * nReadOnlyScrollOfst / 100; aTmp.Y() = rView.SetVScrollMax( aTmp.Y() ); rView.SetVisArea( aTmp ); - return TRUE; + return sal_True; } else { @@ -182,14 +182,14 @@ BOOL SwWrtShell::Down( BOOL bSelect, USHORT nCount, BOOL bBasicCall ) -BOOL SwWrtShell::LeftMargin( BOOL bSelect, BOOL bBasicCall ) +sal_Bool SwWrtShell::LeftMargin( sal_Bool bSelect, sal_Bool bBasicCall ) { if ( !bSelect && !bBasicCall && IsCrsrReadonly() ) { Point aTmp( VisArea().Pos() ); aTmp.X() = DOCUMENTBORDER; rView.SetVisArea( aTmp ); - return TRUE; + return sal_True; } else { @@ -200,7 +200,7 @@ BOOL SwWrtShell::LeftMargin( BOOL bSelect, BOOL bBasicCall ) -BOOL SwWrtShell::RightMargin( BOOL bSelect, BOOL bBasicCall ) +sal_Bool SwWrtShell::RightMargin( sal_Bool bSelect, sal_Bool bBasicCall ) { if ( !bSelect && !bBasicCall && IsCrsrReadonly() ) { @@ -209,7 +209,7 @@ BOOL SwWrtShell::RightMargin( BOOL bSelect, BOOL bBasicCall ) if( DOCUMENTBORDER > aTmp.X() ) aTmp.X() = DOCUMENTBORDER; rView.SetVisArea( aTmp ); - return TRUE; + return sal_True; } else { @@ -220,12 +220,12 @@ BOOL SwWrtShell::RightMargin( BOOL bSelect, BOOL bBasicCall ) -BOOL SwWrtShell::GoStart( BOOL bKeepArea, BOOL *pMoveTable, - BOOL bSelect, BOOL bDontMoveRegion ) +sal_Bool SwWrtShell::GoStart( sal_Bool bKeepArea, sal_Bool *pMoveTable, + sal_Bool bSelect, sal_Bool bDontMoveRegion ) { if ( IsCrsrInTbl() ) { - const BOOL bBoxSelection = HasBoxSelection(); + const sal_Bool bBoxSelection = HasBoxSelection(); if( !bBlockMode ) { if ( !bSelect ) @@ -238,14 +238,14 @@ BOOL SwWrtShell::GoStart( BOOL bKeepArea, BOOL *pMoveTable, || bDontMoveRegion)) { if ( pMoveTable ) - *pMoveTable = FALSE; - return TRUE; + *pMoveTable = sal_False; + return sal_True; } if( MoveTable( fnTableCurr, fnTableStart ) || bDontMoveRegion ) { if ( pMoveTable ) - *pMoveTable = TRUE; - return TRUE; + *pMoveTable = sal_True; + return sal_True; } else if( bBoxSelection && pMoveTable ) { @@ -254,8 +254,8 @@ BOOL SwWrtShell::GoStart( BOOL bKeepArea, BOOL *pMoveTable, // SelAll gesetzt). Dann darf die Tabelle nicht // verlassen werden; sonst ist keine Selektion der // gesamten Tabelle moeglich! - *pMoveTable = TRUE; - return TRUE; + *pMoveTable = sal_True; + return sal_True; } } @@ -266,29 +266,29 @@ BOOL SwWrtShell::GoStart( BOOL bKeepArea, BOOL *pMoveTable, else SttSelect(); } - const USHORT nFrmType = GetFrmType(0,FALSE); + const sal_uInt16 nFrmType = GetFrmType(0,sal_False); if ( FRMTYPE_FLY_ANY & nFrmType ) { if( MoveSection( fnSectionCurr, fnSectionStart ) ) - return TRUE; + return sal_True; else if ( FRMTYPE_FLY_FREE & nFrmType || bDontMoveRegion ) - return FALSE; + return sal_False; } if(( FRMTYPE_HEADER | FRMTYPE_FOOTER | FRMTYPE_FOOTNOTE ) & nFrmType ) { if ( MoveSection( fnSectionCurr, fnSectionStart ) ) - return TRUE; + return sal_True; else if ( bKeepArea ) - return TRUE; + return sal_True; } // Bereiche ??? return SwCrsrShell::MoveRegion( fnRegionCurrAndSkip, fnRegionStart ) || - SwCrsrShell::SttEndDoc(TRUE); + SwCrsrShell::SttEndDoc(sal_True); } -BOOL SwWrtShell::GoEnd(BOOL bKeepArea, BOOL *pMoveTable) +sal_Bool SwWrtShell::GoEnd(sal_Bool bKeepArea, sal_Bool *pMoveTable) { if ( pMoveTable && *pMoveTable ) return MoveTable( fnTableCurr, fnTableEnd ); @@ -297,49 +297,49 @@ BOOL SwWrtShell::GoEnd(BOOL bKeepArea, BOOL *pMoveTable) { if ( MoveSection( fnSectionCurr, fnSectionEnd ) || MoveTable( fnTableCurr, fnTableEnd ) ) - return TRUE; + return sal_True; } else { - const USHORT nFrmType = GetFrmType(0,FALSE); + const sal_uInt16 nFrmType = GetFrmType(0,sal_False); if ( FRMTYPE_FLY_ANY & nFrmType ) { if ( MoveSection( fnSectionCurr, fnSectionEnd ) ) - return TRUE; + return sal_True; else if ( FRMTYPE_FLY_FREE & nFrmType ) - return FALSE; + return sal_False; } if(( FRMTYPE_HEADER | FRMTYPE_FOOTER | FRMTYPE_FOOTNOTE ) & nFrmType ) { if ( MoveSection( fnSectionCurr, fnSectionEnd) ) - return TRUE; + return sal_True; else if ( bKeepArea ) - return TRUE; + return sal_True; } } // Bereiche ??? return SwCrsrShell::MoveRegion( fnRegionCurrAndSkip, fnRegionEnd ) || - SwCrsrShell::SttEndDoc(FALSE); + SwCrsrShell::SttEndDoc(sal_False); } -BOOL SwWrtShell::SttDoc( BOOL bSelect ) +sal_Bool SwWrtShell::SttDoc( sal_Bool bSelect ) { ShellMoveCrsr aTmp( this, bSelect ); - return GoStart(FALSE, 0, bSelect ); + return GoStart(sal_False, 0, bSelect ); } -BOOL SwWrtShell::EndDoc( BOOL bSelect) +sal_Bool SwWrtShell::EndDoc( sal_Bool bSelect) { ShellMoveCrsr aTmp( this, bSelect ); return GoEnd(); } -BOOL SwWrtShell::SttNxtPg( BOOL bSelect ) +sal_Bool SwWrtShell::SttNxtPg( sal_Bool bSelect ) { ShellMoveCrsr aTmp( this, bSelect ); return MovePage( fnPageNext, fnPageStart ); @@ -347,7 +347,7 @@ BOOL SwWrtShell::SttNxtPg( BOOL bSelect ) -BOOL SwWrtShell::SttPrvPg( BOOL bSelect ) +sal_Bool SwWrtShell::SttPrvPg( sal_Bool bSelect ) { ShellMoveCrsr aTmp( this, bSelect ); return MovePage( fnPagePrev, fnPageStart ); @@ -355,7 +355,7 @@ BOOL SwWrtShell::SttPrvPg( BOOL bSelect ) -BOOL SwWrtShell::EndNxtPg( BOOL bSelect ) +sal_Bool SwWrtShell::EndNxtPg( sal_Bool bSelect ) { ShellMoveCrsr aTmp( this, bSelect ); return MovePage( fnPageNext, fnPageEnd ); @@ -363,7 +363,7 @@ BOOL SwWrtShell::EndNxtPg( BOOL bSelect ) -BOOL SwWrtShell::EndPrvPg( BOOL bSelect ) +sal_Bool SwWrtShell::EndPrvPg( sal_Bool bSelect ) { ShellMoveCrsr aTmp( this, bSelect ); return MovePage( fnPagePrev, fnPageEnd ); @@ -371,7 +371,7 @@ BOOL SwWrtShell::EndPrvPg( BOOL bSelect ) -BOOL SwWrtShell::SttPg( BOOL bSelect ) +sal_Bool SwWrtShell::SttPg( sal_Bool bSelect ) { ShellMoveCrsr aTmp( this, bSelect ); return MovePage( fnPageCurr, fnPageStart ); @@ -379,7 +379,7 @@ BOOL SwWrtShell::SttPg( BOOL bSelect ) -BOOL SwWrtShell::EndPg( BOOL bSelect ) +sal_Bool SwWrtShell::EndPg( sal_Bool bSelect ) { ShellMoveCrsr aTmp( this, bSelect ); return MovePage( fnPageCurr, fnPageEnd ); @@ -387,7 +387,7 @@ BOOL SwWrtShell::EndPg( BOOL bSelect ) -BOOL SwWrtShell::SttPara( BOOL bSelect ) +sal_Bool SwWrtShell::SttPara( sal_Bool bSelect ) { ShellMoveCrsr aTmp( this, bSelect ); return MovePara( fnParaCurr, fnParaStart ); @@ -395,7 +395,7 @@ BOOL SwWrtShell::SttPara( BOOL bSelect ) -BOOL SwWrtShell::EndPara( BOOL bSelect ) +sal_Bool SwWrtShell::EndPara( sal_Bool bSelect ) { ShellMoveCrsr aTmp( this, bSelect ); return MovePara(fnParaCurr,fnParaEnd); @@ -410,7 +410,7 @@ BOOL SwWrtShell::EndPara( BOOL bSelect ) -BOOL SwWrtShell::StartOfColumn( BOOL bSelect ) +sal_Bool SwWrtShell::StartOfColumn( sal_Bool bSelect ) { ShellMoveCrsr aTmp( this, bSelect); return MoveColumn(fnColumnCurr, fnColumnStart); @@ -418,7 +418,7 @@ BOOL SwWrtShell::StartOfColumn( BOOL bSelect ) -BOOL SwWrtShell::EndOfColumn( BOOL bSelect ) +sal_Bool SwWrtShell::EndOfColumn( sal_Bool bSelect ) { ShellMoveCrsr aTmp( this, bSelect); return MoveColumn(fnColumnCurr, fnColumnEnd); @@ -426,7 +426,7 @@ BOOL SwWrtShell::EndOfColumn( BOOL bSelect ) -BOOL SwWrtShell::StartOfNextColumn( BOOL bSelect ) +sal_Bool SwWrtShell::StartOfNextColumn( sal_Bool bSelect ) { ShellMoveCrsr aTmp( this, bSelect); return MoveColumn( fnColumnNext, fnColumnStart); @@ -434,7 +434,7 @@ BOOL SwWrtShell::StartOfNextColumn( BOOL bSelect ) -BOOL SwWrtShell::EndOfNextColumn( BOOL bSelect ) +sal_Bool SwWrtShell::EndOfNextColumn( sal_Bool bSelect ) { ShellMoveCrsr aTmp( this, bSelect); return MoveColumn(fnColumnNext, fnColumnEnd); @@ -442,7 +442,7 @@ BOOL SwWrtShell::EndOfNextColumn( BOOL bSelect ) -BOOL SwWrtShell::StartOfPrevColumn( BOOL bSelect ) +sal_Bool SwWrtShell::StartOfPrevColumn( sal_Bool bSelect ) { ShellMoveCrsr aTmp( this, bSelect); return MoveColumn(fnColumnPrev, fnColumnStart); @@ -450,7 +450,7 @@ BOOL SwWrtShell::StartOfPrevColumn( BOOL bSelect ) -BOOL SwWrtShell::EndOfPrevColumn( BOOL bSelect ) +sal_Bool SwWrtShell::EndOfPrevColumn( sal_Bool bSelect ) { ShellMoveCrsr aTmp( this, bSelect); return MoveColumn(fnColumnPrev, fnColumnEnd); @@ -458,9 +458,9 @@ BOOL SwWrtShell::EndOfPrevColumn( BOOL bSelect ) -BOOL SwWrtShell::PushCrsr(SwTwips lOffset, BOOL bSelect) +sal_Bool SwWrtShell::PushCrsr(SwTwips lOffset, sal_Bool bSelect) { - BOOL bDiff = FALSE; + sal_Bool bDiff = sal_False; SwRect aOldRect( GetCharRect() ), aTmpArea( VisArea() ); //bDestOnStack besagt, ob ich den Cursor nicht an die aktuelle Position @@ -477,15 +477,15 @@ BOOL SwWrtShell::PushCrsr(SwTwips lOffset, BOOL bSelect) aPt.Y() += lOffset; aDest = GetCntntPos(aPt,lOffset > 0); aDest.X() = aPt.X(); - bDestOnStack = TRUE; + bDestOnStack = sal_True; } //falls wir eine Rahmenselektion hatten, muss diese nach dem //fnSetCrsr entfernt werden und damit wir da wieder hinkommen //auf dem Stack gemerkt werden. - BOOL bIsFrmSel = FALSE; + sal_Bool bIsFrmSel = sal_False; - BOOL bIsObjSel = FALSE; + sal_Bool bIsObjSel = sal_False; //Zielposition liegt jetzt innerhalb des sichtbaren Bereiches --> //Cursor an die Zielposition setzen; merken, dass keine Ziel- @@ -516,7 +516,7 @@ BOOL SwWrtShell::PushCrsr(SwTwips lOffset, BOOL bSelect) CallChgLnk(); } - (this->*fnSetCrsr)( &aDest, TRUE ); + (this->*fnSetCrsr)( &aDest, sal_True ); bDiff = aOldRect != GetCharRect(); @@ -528,7 +528,7 @@ BOOL SwWrtShell::PushCrsr(SwTwips lOffset, BOOL bSelect) } // Zuruecksetzen des Dest. SPoint Flags - bDestOnStack = FALSE; + bDestOnStack = sal_False; } // Position auf den Stack; bDiff besagt, ob ein Unterschied zwischen @@ -540,12 +540,12 @@ BOOL SwWrtShell::PushCrsr(SwTwips lOffset, BOOL bSelect) -BOOL SwWrtShell::PopCrsr(BOOL bUpdate, BOOL bSelect) +sal_Bool SwWrtShell::PopCrsr(sal_Bool bUpdate, sal_Bool bSelect) { if( 0 == pCrsrStack) - return FALSE; + return sal_False; - const BOOL bValidPos = pCrsrStack->bValidCurPos; + const sal_Bool bValidPos = pCrsrStack->bValidCurPos; if( bUpdate && bValidPos ) { // falls ein Vorgaenger auf dem Stack steht, dessen Flag fuer eine @@ -573,7 +573,7 @@ BOOL SwWrtShell::PopCrsr(BOOL bUpdate, BOOL bSelect) else { _ResetCursorStack(); - return FALSE; + return sal_False; } } CrsrStack *pTmp = pCrsrStack; @@ -582,7 +582,7 @@ BOOL SwWrtShell::PopCrsr(BOOL bUpdate, BOOL bSelect) if( 0 == pCrsrStack ) { ePageMove = MV_NO; - bDestOnStack = FALSE; + bDestOnStack = sal_False; } return bValidPos; } @@ -604,7 +604,7 @@ void SwWrtShell::_ResetCursorStack() pCrsrStack = pTmp; } ePageMove = MV_NO; - bDestOnStack = FALSE; + bDestOnStack = sal_False; } /************** @@ -619,10 +619,10 @@ void SwWrtShell::_ResetCursorStack() -BOOL SwWrtShell::PageCrsr(SwTwips lOffset, BOOL bSelect) +sal_Bool SwWrtShell::PageCrsr(SwTwips lOffset, sal_Bool bSelect) { // nichts tun, wenn ein Offset von 0 angegeben wurde - if(!lOffset) return FALSE; + if(!lOffset) return sal_False; // Diente mal dazu, eine Neuformatierung fuer das Layout // zu erzwingen. // Hat so nicht funktioniert, da der Cursor nicht gesetzt @@ -638,19 +638,19 @@ BOOL SwWrtShell::PageCrsr(SwTwips lOffset, BOOL bSelect) // ViewShell::StartAction(); PageMove eDir = lOffset > 0? MV_PAGE_DOWN: MV_PAGE_UP; // Richtungswechsel und Stack vorhanden - if( eDir != ePageMove && ePageMove != MV_NO && PopCrsr( TRUE, bSelect )) - return TRUE; + if( eDir != ePageMove && ePageMove != MV_NO && PopCrsr( sal_True, bSelect )) + return sal_True; - const BOOL bRet = PushCrsr(lOffset, bSelect); + const sal_Bool bRet = PushCrsr(lOffset, bSelect); ePageMove = eDir; return bRet; } -BOOL SwWrtShell::GotoPage(USHORT nPage, BOOL bRecord) +sal_Bool SwWrtShell::GotoPage(sal_uInt16 nPage, sal_Bool bRecord) { - ShellMoveCrsr aTmp( this, FALSE); + ShellMoveCrsr aTmp( this, sal_False); if( SwCrsrShell::GotoPage(nPage) && bRecord) { if(IsSelFrmMode()) @@ -658,14 +658,14 @@ BOOL SwWrtShell::GotoPage(USHORT nPage, BOOL bRecord) UnSelectFrm(); LeaveSelFrmMode(); } - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } -BOOL SwWrtShell::GotoMark( const ::sw::mark::IMark* const pMark, BOOL bSelect, BOOL bStart ) +sal_Bool SwWrtShell::GotoMark( const ::sw::mark::IMark* const pMark, sal_Bool bSelect, sal_Bool bStart ) { ShellMoveCrsr aTmp( this, bSelect ); SwPosition aPos = *GetCrsr()->GetPoint(); @@ -675,7 +675,7 @@ BOOL SwWrtShell::GotoMark( const ::sw::mark::IMark* const pMark, BOOL bSelect, B return bRet; } -BOOL SwWrtShell::GotoFly( const String& rName, FlyCntType eType, BOOL bSelFrame ) +sal_Bool SwWrtShell::GotoFly( const String& rName, FlyCntType eType, sal_Bool bSelFrame ) { SwPosition aPos = *GetCrsr()->GetPoint(); bool bRet = SwFEShell::GotoFly(rName, eType, bSelFrame); @@ -684,7 +684,7 @@ BOOL SwWrtShell::GotoFly( const String& rName, FlyCntType eType, BOOL bSelFrame return bRet; } -BOOL SwWrtShell::GotoINetAttr( const SwTxtINetFmt& rAttr ) +sal_Bool SwWrtShell::GotoINetAttr( const SwTxtINetFmt& rAttr ) { SwPosition aPos = *GetCrsr()->GetPoint(); bool bRet = SwCrsrShell::GotoINetAttr(rAttr); @@ -693,13 +693,13 @@ BOOL SwWrtShell::GotoINetAttr( const SwTxtINetFmt& rAttr ) return bRet; } -void SwWrtShell::GotoOutline( USHORT nIdx ) +void SwWrtShell::GotoOutline( sal_uInt16 nIdx ) { addCurrentPosition(); return SwCrsrShell::GotoOutline (nIdx); } -BOOL SwWrtShell::GotoOutline( const String& rName ) +sal_Bool SwWrtShell::GotoOutline( const String& rName ) { SwPosition aPos = *GetCrsr()->GetPoint(); bool bRet = SwCrsrShell::GotoOutline (rName); @@ -708,7 +708,7 @@ BOOL SwWrtShell::GotoOutline( const String& rName ) return bRet; } -BOOL SwWrtShell::GotoRegion( const String& rName ) +sal_Bool SwWrtShell::GotoRegion( const String& rName ) { SwPosition aPos = *GetCrsr()->GetPoint(); bool bRet = SwCrsrShell::GotoRegion (rName); @@ -717,8 +717,8 @@ BOOL SwWrtShell::GotoRegion( const String& rName ) return bRet; } -BOOL SwWrtShell::GotoRefMark( const String& rRefMark, USHORT nSubType, - USHORT nSeqNo ) +sal_Bool SwWrtShell::GotoRefMark( const String& rRefMark, sal_uInt16 nSubType, + sal_uInt16 nSeqNo ) { SwPosition aPos = *GetCrsr()->GetPoint(); bool bRet = SwCrsrShell::GotoRefMark(rRefMark, nSubType, nSeqNo); @@ -727,7 +727,7 @@ BOOL SwWrtShell::GotoRefMark( const String& rRefMark, USHORT nSubType, return bRet; } -BOOL SwWrtShell::GotoNextTOXBase( const String* pName ) +sal_Bool SwWrtShell::GotoNextTOXBase( const String* pName ) { SwPosition aPos = *GetCrsr()->GetPoint(); bool bRet = SwCrsrShell::GotoNextTOXBase(pName); @@ -736,7 +736,7 @@ BOOL SwWrtShell::GotoNextTOXBase( const String* pName ) return bRet; } -BOOL SwWrtShell::GotoTable( const String& rName ) +sal_Bool SwWrtShell::GotoTable( const String& rName ) { SwPosition aPos = *GetCrsr()->GetPoint(); bool bRet = SwCrsrShell::GotoTable(rName); @@ -745,7 +745,7 @@ BOOL SwWrtShell::GotoTable( const String& rName ) return bRet; } -BOOL SwWrtShell::GotoFld( const SwFmtFld& rFld ) { +sal_Bool SwWrtShell::GotoFld( const SwFmtFld& rFld ) { SwPosition aPos = *GetCrsr()->GetPoint(); bool bRet = SwCrsrShell::GotoFld(rFld); if (bRet) @@ -753,7 +753,7 @@ BOOL SwWrtShell::GotoFld( const SwFmtFld& rFld ) { return bRet; } -const SwRedline* SwWrtShell::GotoRedline( USHORT nArrPos, BOOL bSelect ) { +const SwRedline* SwWrtShell::GotoRedline( sal_uInt16 nArrPos, sal_Bool bSelect ) { SwPosition aPos = *GetCrsr()->GetPoint(); const SwRedline *pRedline = SwCrsrShell::GotoRedline(nArrPos, bSelect); if (pRedline) @@ -763,13 +763,13 @@ const SwRedline* SwWrtShell::GotoRedline( USHORT nArrPos, BOOL bSelect ) { -BOOL SwWrtShell::SelectTxtAttr( USHORT nWhich, const SwTxtAttr* pAttr ) +sal_Bool SwWrtShell::SelectTxtAttr( sal_uInt16 nWhich, const SwTxtAttr* pAttr ) { - BOOL bRet; + sal_Bool bRet; { MV_KONTEXT(this); SttSelect(); - bRet = SwCrsrShell::SelectTxtAttr( nWhich, FALSE, pAttr ); + bRet = SwCrsrShell::SelectTxtAttr( nWhich, sal_False, pAttr ); } EndSelect(); return bRet; diff --git a/sw/source/ui/wrtsh/navmgr.cxx b/sw/source/ui/wrtsh/navmgr.cxx index a56bf5df07..2ef5b17d5e 100644 --- a/sw/source/ui/wrtsh/navmgr.cxx +++ b/sw/source/ui/wrtsh/navmgr.cxx @@ -77,7 +77,7 @@ SwNavigationMgr::SwNavigationMgr(SwWrtShell* pShell) * It is called when we want to check if the back button should be enabled or not. * The back button should be enabled only if there are some entries in the navigation history */ -BOOL SwNavigationMgr::backEnabled() { +sal_Bool SwNavigationMgr::backEnabled() { return (_nCurrent > 0); } /* @@ -87,7 +87,7 @@ BOOL SwNavigationMgr::backEnabled() { * current position within the navigation history entries in not the last one * i.e. when the _nCurrent index is not at the end of the _entries vector */ -BOOL SwNavigationMgr::forwardEnabled() { +sal_Bool SwNavigationMgr::forwardEnabled() { return _nCurrent+1 < _entries.size(); } diff --git a/sw/source/ui/wrtsh/select.cxx b/sw/source/ui/wrtsh/select.cxx index 0833ac6c7d..6647dc061d 100644 --- a/sw/source/ui/wrtsh/select.cxx +++ b/sw/source/ui/wrtsh/select.cxx @@ -63,7 +63,7 @@ using namespace ::com::sun::star::util; static long nStartDragX = 0, nStartDragY = 0; -static BOOL bStartDrag = FALSE; +static sal_Bool bStartDrag = sal_False; void SwWrtShell::Invalidate() { @@ -72,21 +72,21 @@ void SwWrtShell::Invalidate() GetView().GetViewFrame()->GetBindings().Invalidate( FN_STAT_SELMODE ); } -BOOL SwWrtShell::SelNearestWrd() +sal_Bool SwWrtShell::SelNearestWrd() { MV_KONTEXT(this); if( !IsInWrd() && !IsEndWrd() && !IsSttWrd() ) PrvWrd(); if( IsEndWrd() ) - Left(CRSR_SKIP_CELLS, FALSE, 1, FALSE ); + Left(CRSR_SKIP_CELLS, sal_False, 1, sal_False ); return SelWrd(); } -BOOL SwWrtShell::SelWrd(const Point *pPt, BOOL ) +sal_Bool SwWrtShell::SelWrd(const Point *pPt, sal_Bool ) { - BOOL bRet; + sal_Bool bRet; { MV_KONTEXT(this); SttSelect(); @@ -95,14 +95,14 @@ BOOL SwWrtShell::SelWrd(const Point *pPt, BOOL ) EndSelect(); if( bRet ) { - bSelWrd = TRUE; + bSelWrd = sal_True; if(pPt) aStart = *pPt; } return bRet; } -void SwWrtShell::SelSentence(const Point *pPt, BOOL ) +void SwWrtShell::SelSentence(const Point *pPt, sal_Bool ) { { MV_KONTEXT(this); @@ -114,11 +114,11 @@ void SwWrtShell::SelSentence(const Point *pPt, BOOL ) EndSelect(); if(pPt) aStart = *pPt; - bSelLn = TRUE; - bSelWrd = FALSE; // SelWord abschalten, sonst geht kein SelLine weiter + bSelLn = sal_True; + bSelWrd = sal_False; // SelWord abschalten, sonst geht kein SelLine weiter } -void SwWrtShell::SelPara(const Point *pPt, BOOL ) +void SwWrtShell::SelPara(const Point *pPt, sal_Bool ) { { MV_KONTEXT(this); @@ -130,20 +130,20 @@ void SwWrtShell::SelPara(const Point *pPt, BOOL ) EndSelect(); if(pPt) aStart = *pPt; - bSelLn = FALSE; - bSelWrd = FALSE; // SelWord abschalten, sonst geht kein SelLine weiter + bSelLn = sal_False; + bSelWrd = sal_False; // SelWord abschalten, sonst geht kein SelLine weiter } long SwWrtShell::SelAll() { - const BOOL bLockedView = IsViewLocked(); - LockView( TRUE ); + const sal_Bool bLockedView = IsViewLocked(); + LockView( sal_True ); { if(bBlockMode) LeaveBlockMode(); MV_KONTEXT(this); - BOOL bMoveTable = FALSE; + sal_Bool bMoveTable = sal_False; SwPosition *pStartPos = 0; SwPosition *pEndPos = 0; SwShellCrsr* pTmpCrsr = 0; @@ -158,19 +158,19 @@ long SwWrtShell::SelAll() pEndPos = new SwPosition( *pTmpCrsr->GetMark() ); } Push(); - BOOL bIsFullSel = !MoveSection( fnSectionCurr, fnSectionStart); + sal_Bool bIsFullSel = !MoveSection( fnSectionCurr, fnSectionStart); SwapPam(); bIsFullSel &= !MoveSection( fnSectionCurr, fnSectionEnd); - Pop(FALSE); - GoStart(TRUE, &bMoveTable, FALSE, !bIsFullSel); + Pop(sal_False); + GoStart(sal_True, &bMoveTable, sal_False, !bIsFullSel); } else { EnterStdMode(); - SttEndDoc(TRUE); + SttEndDoc(sal_True); } SttSelect(); - GoEnd(TRUE, &bMoveTable); + GoEnd(sal_True, &bMoveTable); if( pStartPos ) { pTmpCrsr = getShellCrsr( false ); @@ -184,7 +184,7 @@ long SwWrtShell::SelAll() if( *pTmpCrsr->GetPoint() < *pEndPos || ( *pStartPos == *pTmpCrsr->GetMark() && *pEndPos == *pTmpCrsr->GetPoint() ) ) - SwCrsrShell::SttEndDoc(FALSE); + SwCrsrShell::SttEndDoc(sal_False); } delete pStartPos; delete pEndPos; @@ -200,18 +200,18 @@ long SwWrtShell::SelAll() ------------------------------------------------------------------------*/ -ULONG SwWrtShell::SearchPattern( const SearchOptions& rSearchOpt, BOOL bSearchInNotes, +sal_uLong SwWrtShell::SearchPattern( const SearchOptions& rSearchOpt, sal_Bool bSearchInNotes, SwDocPositions eStt, SwDocPositions eEnd, FindRanges eFlags, int bReplace ) { // keine Erweiterung bestehender Selektionen if(!(eFlags & FND_IN_SEL)) ClearMark(); - BOOL bCancel = FALSE; - ULONG nRet = Find( rSearchOpt, bSearchInNotes, eStt, eEnd, bCancel, eFlags, bReplace ); + sal_Bool bCancel = sal_False; + sal_uLong nRet = Find( rSearchOpt, bSearchInNotes, eStt, eEnd, bCancel, eFlags, bReplace ); if(bCancel) { - Undo(UNDO_EMPTY, 1); + Undo(1); nRet = ULONG_MAX; } return nRet; @@ -222,7 +222,7 @@ ULONG SwWrtShell::SearchPattern( const SearchOptions& rSearchOpt, BOOL bSearchIn -ULONG SwWrtShell::SearchTempl( const String &rTempl, +sal_uLong SwWrtShell::SearchTempl( const String &rTempl, SwDocPositions eStt, SwDocPositions eEnd, FindRanges eFlags, const String* pReplTempl ) { @@ -234,12 +234,12 @@ ULONG SwWrtShell::SearchTempl( const String &rTempl, if( pReplTempl ) pReplaceColl = GetParaStyle(*pReplTempl, SwWrtShell::GETSTYLE_CREATESOME ); - BOOL bCancel = FALSE; - ULONG nRet = Find(pColl? *pColl: GetDfltTxtFmtColl(), + sal_Bool bCancel = sal_False; + sal_uLong nRet = Find(pColl? *pColl: GetDfltTxtFmtColl(), eStt,eEnd, bCancel, eFlags, pReplaceColl); if(bCancel) { - Undo(UNDO_EMPTY, 1); + Undo(1); nRet = ULONG_MAX; } return nRet; @@ -249,7 +249,7 @@ ULONG SwWrtShell::SearchTempl( const String &rTempl, -ULONG SwWrtShell::SearchAttr( const SfxItemSet& rFindSet, BOOL bNoColls, +sal_uLong SwWrtShell::SearchAttr( const SfxItemSet& rFindSet, sal_Bool bNoColls, SwDocPositions eStart, SwDocPositions eEnde, FindRanges eFlags, const SearchOptions* pSearchOpt, const SfxItemSet* pReplaceSet ) @@ -259,12 +259,12 @@ ULONG SwWrtShell::SearchAttr( const SfxItemSet& rFindSet, BOOL bNoColls, ClearMark(); // Suchen - BOOL bCancel = FALSE; - ULONG nRet = Find( rFindSet, bNoColls, eStart, eEnde, bCancel, eFlags, pSearchOpt, pReplaceSet); + sal_Bool bCancel = sal_False; + sal_uLong nRet = Find( rFindSet, bNoColls, eStart, eEnde, bCancel, eFlags, pSearchOpt, pReplaceSet); if(bCancel) { - Undo(UNDO_EMPTY, 1); + Undo(1); nRet = ULONG_MAX; } return nRet; @@ -307,7 +307,7 @@ void SwWrtShell::PopMode() -long SwWrtShell::SetCrsr(const Point *pPt, BOOL bTextOnly) +long SwWrtShell::SetCrsr(const Point *pPt, sal_Bool bTextOnly) { /* * eine gfs. bestehende Selektion an der Position des @@ -321,10 +321,10 @@ long SwWrtShell::SetCrsr(const Point *pPt, BOOL bTextOnly) } -long SwWrtShell::SetCrsrKillSel(const Point *pPt, BOOL bTextOnly ) +long SwWrtShell::SetCrsrKillSel(const Point *pPt, sal_Bool bTextOnly ) { ACT_KONTEXT(this); - ResetSelect(pPt,FALSE); + ResetSelect(pPt,sal_False); return SwCrsrShell::SetCrsr(*pPt, bTextOnly); } @@ -344,7 +344,7 @@ void SwWrtShell::UnSelectFrm() -long SwWrtShell::ResetSelect(const Point *,BOOL) +long SwWrtShell::ResetSelect(const Point *,sal_Bool) { if(IsSelFrmMode()) { @@ -361,7 +361,7 @@ long SwWrtShell::ResetSelect(const Point *,BOOL) */ { ACT_KONTEXT(this); - bSelWrd = bSelLn = FALSE; + bSelWrd = bSelLn = sal_False; KillPams(); ClearMark(); fnKillSel = &SwWrtShell::Ignore; @@ -383,7 +383,7 @@ long SwWrtShell::ResetSelect(const Point *,BOOL) /* * tue nichts */ -long SwWrtShell::Ignore(const Point *, BOOL ) { +long SwWrtShell::Ignore(const Point *, sal_Bool ) { return 1; } @@ -407,7 +407,7 @@ void SwWrtShell::SttSelect() } fnKillSel = &SwWrtShell::Ignore; fnSetCrsr = &SwWrtShell::SetCrsr; - bInSelect = TRUE; + bInSelect = sal_True; Invalidate(); SwTransferable::CreateSelection( *this ); } @@ -421,8 +421,8 @@ void SwWrtShell::EndSelect() { if(!bInSelect || bExtMode) return; - bInSelect = FALSE; - (this->*fnLeaveSelect)(0,FALSE); + bInSelect = sal_False; + (this->*fnLeaveSelect)(0,sal_False); if(!bAddMode) { fnSetCrsr = &SwWrtShell::SetCrsrKillSel; fnKillSel = &SwWrtShell::ResetSelect; @@ -432,14 +432,14 @@ void SwWrtShell::EndSelect() * zu erweitern. */ -inline BOOL operator<(const Point &rP1,const Point &rP2) +inline sal_Bool operator<(const Point &rP1,const Point &rP2) { return rP1.Y() < rP2.Y() || (rP1.Y() == rP2.Y() && rP1.X() < rP2.X()); } -long SwWrtShell::ExtSelWrd(const Point *pPt, BOOL ) +long SwWrtShell::ExtSelWrd(const Point *pPt, sal_Bool ) { MV_KONTEXT(this); if( IsTableMode() ) @@ -449,7 +449,7 @@ long SwWrtShell::ExtSelWrd(const Point *pPt, BOOL ) // Then destroy the actual an go to prev, this will be expand if( !HasMark() && GoPrevCrsr() ) { - BOOL bHasMark = HasMark(); // thats wrong! + sal_Bool bHasMark = HasMark(); // thats wrong! GoNextCrsr(); if( bHasMark ) { @@ -459,19 +459,19 @@ long SwWrtShell::ExtSelWrd(const Point *pPt, BOOL ) } // check the direction of the selection with the new point - BOOL bRet = FALSE, bMoveCrsr = TRUE, bToTop = FALSE; + sal_Bool bRet = sal_False, bMoveCrsr = sal_True, bToTop = sal_False; SwCrsrShell::SelectWord( &aStart ); // select the startword SwCrsrShell::Push(); // save the cursor SwCrsrShell::SetCrsr( *pPt ); // and check the direction switch( SwCrsrShell::CompareCursor( StackMkCurrPt )) { - case -1: bToTop = FALSE; break; - case 1: bToTop = TRUE; break; - default: bMoveCrsr = FALSE; break; + case -1: bToTop = sal_False; break; + case 1: bToTop = sal_True; break; + default: bMoveCrsr = sal_False; break; } - SwCrsrShell::Pop( FALSE ); // retore the saved cursor + SwCrsrShell::Pop( sal_False ); // retore the saved cursor if( bMoveCrsr ) { @@ -486,22 +486,22 @@ long SwWrtShell::ExtSelWrd(const Point *pPt, BOOL ) if( bToTop ) SwapPam(); Combine(); - bRet = TRUE; + bRet = sal_True; } else { - SwCrsrShell::Pop( FALSE ); + SwCrsrShell::Pop( sal_False ); if( bToTop ) SwapPam(); } } else - bRet = TRUE; + bRet = sal_True; return bRet; } -long SwWrtShell::ExtSelLn(const Point *pPt, BOOL ) +long SwWrtShell::ExtSelLn(const Point *pPt, sal_Bool ) { MV_KONTEXT(this); SwCrsrShell::SetCrsr(*pPt); @@ -512,7 +512,7 @@ long SwWrtShell::ExtSelLn(const Point *pPt, BOOL ) // Then destroy the actual an go to prev, this will be expand if( !HasMark() && GoPrevCrsr() ) { - BOOL bHasMark = HasMark(); // thats wrong! + sal_Bool bHasMark = HasMark(); // thats wrong! GoNextCrsr(); if( bHasMark ) { @@ -522,7 +522,7 @@ long SwWrtShell::ExtSelLn(const Point *pPt, BOOL ) } // ggfs. den Mark der Selektion anpassen - BOOL bToTop = !IsCrsrPtAtEnd(); + sal_Bool bToTop = !IsCrsrPtAtEnd(); SwapPam(); // der "Mark" muss am Zeilenende/-anfang stehen @@ -553,9 +553,9 @@ void SwWrtShell::EnterStdMode() LeaveAddMode(); if(bBlockMode) LeaveBlockMode(); - bBlockMode = FALSE; - bExtMode = FALSE; - bInSelect = FALSE; + bBlockMode = sal_False; + bExtMode = sal_False; + bInSelect = sal_False; if(IsSelFrmMode()) { UnSelectFrm(); @@ -569,7 +569,7 @@ void SwWrtShell::EnterStdMode() */ { ACT_KONTEXT(this); - bSelWrd = bSelLn = FALSE; + bSelWrd = bSelLn = sal_False; if( !IsRetainSelection() ) KillPams(); ClearMark(); @@ -595,9 +595,9 @@ void SwWrtShell::EnterExtMode() KillPams(); ClearMark(); } - bExtMode = TRUE; - bAddMode = FALSE; - bBlockMode = FALSE; + bExtMode = sal_True; + bAddMode = sal_False; + bBlockMode = sal_False; SttSelect(); } @@ -605,7 +605,7 @@ void SwWrtShell::EnterExtMode() void SwWrtShell::LeaveExtMode() { - bExtMode = FALSE; + bExtMode = sal_False; EndSelect(); } /* @@ -615,7 +615,7 @@ void SwWrtShell::LeaveExtMode() -long SwWrtShell::SttLeaveSelect(const Point *, BOOL ) +long SwWrtShell::SttLeaveSelect(const Point *, sal_Bool ) { if(SwCrsrShell::HasSelection() && !IsSelTblCells() && bClearMark) { return 0; @@ -629,7 +629,7 @@ long SwWrtShell::SttLeaveSelect(const Point *, BOOL ) -long SwWrtShell::AddLeaveSelect(const Point *, BOOL ) +long SwWrtShell::AddLeaveSelect(const Point *, sal_Bool ) { if(IsTableMode()) LeaveAddMode(); else if(SwCrsrShell::HasSelection()) @@ -650,9 +650,9 @@ void SwWrtShell::EnterAddMode() fnLeaveSelect = &SwWrtShell::AddLeaveSelect; fnKillSel = &SwWrtShell::Ignore; fnSetCrsr = &SwWrtShell::SetCrsr; - bAddMode = TRUE; - bBlockMode = FALSE; - bExtMode = FALSE; + bAddMode = sal_True; + bBlockMode = sal_False; + bExtMode = sal_False; if(SwCrsrShell::HasSelection()) CreateCrsr(); Invalidate(); @@ -665,7 +665,7 @@ void SwWrtShell::LeaveAddMode() fnLeaveSelect = &SwWrtShell::SttLeaveSelect; fnKillSel = &SwWrtShell::ResetSelect; fnSetCrsr = &SwWrtShell::SetCrsrKillSel; - bAddMode = FALSE; + bAddMode = sal_False; Invalidate(); } @@ -675,9 +675,9 @@ void SwWrtShell::LeaveAddMode() void SwWrtShell::EnterBlockMode() { - bBlockMode = FALSE; + bBlockMode = sal_False; EnterStdMode(); - bBlockMode = TRUE; + bBlockMode = sal_True; CrsrToBlockCrsr(); Invalidate(); } @@ -686,7 +686,7 @@ void SwWrtShell::EnterBlockMode() void SwWrtShell::LeaveBlockMode() { - bBlockMode = FALSE; + bBlockMode = sal_False; BlockCrsrToCrsr(); EndSelect(); Invalidate(); @@ -696,7 +696,7 @@ void SwWrtShell::LeaveBlockMode() -void SwWrtShell::SetInsMode( BOOL bOn ) +void SwWrtShell::SetInsMode( sal_Bool bOn ) { bIns = bOn; SwCrsrShell::SetOverwriteCrsr( !bIns ); @@ -707,7 +707,7 @@ void SwWrtShell::SetInsMode( BOOL bOn ) Invalidate(); } //Overwrite mode is incompatible with red-lining -void SwWrtShell::SetRedlineModeAndCheckInsMode( USHORT eMode ) +void SwWrtShell::SetRedlineModeAndCheckInsMode( sal_uInt16 eMode ) { SetRedlineMode( eMode ); if (IsRedlineOn()) @@ -719,16 +719,16 @@ void SwWrtShell::SetRedlineModeAndCheckInsMode( USHORT eMode ) */ -long SwWrtShell::BeginFrmDrag(const Point *pPt, BOOL) +long SwWrtShell::BeginFrmDrag(const Point *pPt, sal_Bool) { fnDrag = &SwFEShell::Drag; if(bStartDrag) { Point aTmp( nStartDragX, nStartDragY ); - SwFEShell::BeginDrag( &aTmp, FALSE ); + SwFEShell::BeginDrag( &aTmp, sal_False ); } else - SwFEShell::BeginDrag( pPt, FALSE ); + SwFEShell::BeginDrag( pPt, sal_False ); return 1; } @@ -740,9 +740,9 @@ void SwWrtShell::EnterSelFrmMode(const Point *pPos) { nStartDragX = pPos->X(); nStartDragY = pPos->Y(); - bStartDrag = TRUE; + bStartDrag = sal_True; } - bNoEdit = bLayoutMode = TRUE; + bNoEdit = bLayoutMode = sal_True; HideCrsr(); // gleicher Aufruf von BeginDrag an der SwFEShell @@ -758,8 +758,8 @@ void SwWrtShell::LeaveSelFrmMode() { fnDrag = &SwWrtShell::BeginDrag; fnEndDrag = &SwWrtShell::EndDrag; - bLayoutMode = FALSE; - bStartDrag = FALSE; + bLayoutMode = sal_False; + bStartDrag = sal_False; Edit(); SwBaseShell::SetFrmMode( FLY_DRAG_END, this ); Invalidate(); @@ -780,7 +780,7 @@ IMPL_LINK( SwWrtShell, ExecFlyMac, void *, pFlyFmt ) { const SvxMacro &rMac = rFmtMac.GetMacro(SW_EVENT_OBJECT_SELECT); if( IsFrmSelected() ) - bLayoutMode = TRUE; + bLayoutMode = sal_True; CallChgLnk(); ExecMacro( rMac ); } @@ -789,10 +789,10 @@ IMPL_LINK( SwWrtShell, ExecFlyMac, void *, pFlyFmt ) -long SwWrtShell::UpdateLayoutFrm(const Point *pPt, BOOL ) +long SwWrtShell::UpdateLayoutFrm(const Point *pPt, sal_Bool ) { // voerst Dummy - SwFEShell::EndDrag( pPt, FALSE ); + SwFEShell::EndDrag( pPt, sal_False ); fnDrag = &SwWrtShell::BeginFrmDrag; return 1; } @@ -831,11 +831,11 @@ long SwWrtShell::ToggleExtMode() -long SwWrtShell::BeginDrag(const Point * /*pPt*/, BOOL ) +long SwWrtShell::BeginDrag(const Point * /*pPt*/, sal_Bool ) { if(bSelWrd) { - bInSelect = TRUE; + bInSelect = sal_True; if( !IsCrsrPtAtEnd() ) SwapPam(); @@ -844,7 +844,7 @@ long SwWrtShell::BeginDrag(const Point * /*pPt*/, BOOL ) } else if(bSelLn) { - bInSelect = TRUE; + bInSelect = sal_True; fnDrag = &SwWrtShell::ExtSelLn; fnSetCrsr = &SwWrtShell::Ignore; } @@ -859,7 +859,7 @@ long SwWrtShell::BeginDrag(const Point * /*pPt*/, BOOL ) -long SwWrtShell::Drag(const Point *, BOOL ) +long SwWrtShell::Drag(const Point *, sal_Bool ) { if( IsSelTblCells() ) aSelTblLink.Call(this); @@ -869,7 +869,7 @@ long SwWrtShell::Drag(const Point *, BOOL ) -long SwWrtShell::EndDrag(const Point * /*pPt*/, BOOL ) +long SwWrtShell::EndDrag(const Point * /*pPt*/, sal_Bool ) { fnDrag = &SwWrtShell::BeginDrag; if( IsExtSel() ) @@ -882,7 +882,7 @@ long SwWrtShell::EndDrag(const Point * /*pPt*/, BOOL ) } // --> FME 2004-07-30 #i32329# Enhanced table selection -BOOL SwWrtShell::SelectTableRowCol( const Point& rPt, const Point* pEnd, bool bRowDrag ) +sal_Bool SwWrtShell::SelectTableRowCol( const Point& rPt, const Point* pEnd, bool bRowDrag ) { MV_KONTEXT(this); SttSelect(); @@ -890,9 +890,9 @@ BOOL SwWrtShell::SelectTableRowCol( const Point& rPt, const Point* pEnd, bool bR { fnSetCrsr = &SwWrtShell::SetCrsrKillSel; fnKillSel = &SwWrtShell::ResetSelect; - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } // <-- @@ -900,39 +900,39 @@ BOOL SwWrtShell::SelectTableRowCol( const Point& rPt, const Point* pEnd, bool bR Beschreibung: Selektion einer Tabellenzeile / Spalte ------------------------------------------------------------------------*/ -BOOL SwWrtShell::SelectTableRow() +sal_Bool SwWrtShell::SelectTableRow() { if ( SelTblRow() ) { fnSetCrsr = &SwWrtShell::SetCrsrKillSel; fnKillSel = &SwWrtShell::ResetSelect; - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } -BOOL SwWrtShell::SelectTableCol() +sal_Bool SwWrtShell::SelectTableCol() { if ( SelTblCol() ) { fnSetCrsr = &SwWrtShell::SetCrsrKillSel; fnKillSel = &SwWrtShell::ResetSelect; - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } -BOOL SwWrtShell::SelectTableCell() +sal_Bool SwWrtShell::SelectTableCell() { if ( SelTblBox() ) { fnSetCrsr = &SwWrtShell::SetCrsrKillSel; fnKillSel = &SwWrtShell::ResetSelect; - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } /*------------------------------------------------------------------------ Beschreibung: Prueft, ob eine Wortselektion vorliegt. @@ -943,28 +943,28 @@ BOOL SwWrtShell::SelectTableCell() -int SwWrtShell::IntelligentCut(int nSelection, BOOL bCut) +int SwWrtShell::IntelligentCut(int nSelection, sal_Bool bCut) { // kein intelligentes Drag and Drop bei Mehrfachselektion // es existieren mehrere Cursor, da ein zweiter bereits // an die Zielposition gesetzt wurde if( IsAddMode() || !(nSelection & nsSelectionType::SEL_TXT) ) - return FALSE; + return sal_False; String sTxt; CharClass& rCC = GetAppCharClass(); // wenn das erste und das letzte Zeichen kein Wortzeichen ist, // ist kein Wort selektiert. - sal_Unicode cPrev = GetChar(FALSE); - sal_Unicode cNext = GetChar(TRUE, -1); + sal_Unicode cPrev = GetChar(sal_False); + sal_Unicode cNext = GetChar(sal_True, -1); if( !cPrev || !cNext || !rCC.isLetterNumeric( ( sTxt = cPrev), 0 ) || !rCC.isLetterNumeric( ( sTxt = cNext), 0 ) ) return NO_WORD; - cPrev = GetChar(FALSE, -1); - cNext = GetChar(TRUE); + cPrev = GetChar(sal_False, -1); + cNext = GetChar(sal_True); int cWord = NO_WORD; // ist ein Wort selektiert? @@ -988,7 +988,7 @@ int SwWrtShell::IntelligentCut(int nSelection, BOOL bCut) SetMark(); SwCrsrShell::Left(1,CRSR_SKIP_CHARS); SwFEShell::Delete(); - Pop( FALSE ); + Pop( sal_False ); } } else if(cWord == WORD_NO_SPACE && cNext == ' ') @@ -1002,7 +1002,7 @@ int SwWrtShell::IntelligentCut(int nSelection, BOOL bCut) SetMark(); SwCrsrShell::Right(1,CRSR_SKIP_CHARS); SwFEShell::Delete(); - Pop( FALSE ); + Pop( sal_False ); } } return cWord; @@ -1012,24 +1012,24 @@ int SwWrtShell::IntelligentCut(int nSelection, BOOL bCut) // jump to the next / previous hyperlink - inside text and also // on graphics -BOOL SwWrtShell::SelectNextPrevHyperlink( BOOL bNext ) +sal_Bool SwWrtShell::SelectNextPrevHyperlink( sal_Bool bNext ) { StartAction(); - BOOL bRet = SwCrsrShell::SelectNxtPrvHyperlink( bNext ); + sal_Bool bRet = SwCrsrShell::SelectNxtPrvHyperlink( bNext ); if( !bRet ) { // will we have this feature? EnterStdMode(); if( bNext ) - SttEndDoc(TRUE); + SttEndDoc(sal_True); else - SttEndDoc(FALSE); + SttEndDoc(sal_False); bRet = SwCrsrShell::SelectNxtPrvHyperlink( bNext ); } EndAction(); - BOOL bCreateXSelection = FALSE; - const BOOL bFrmSelected = IsFrmSelected() || IsObjSelected(); + sal_Bool bCreateXSelection = sal_False; + const sal_Bool bFrmSelected = IsFrmSelected() || IsObjSelected(); if( IsSelection() ) { if ( bFrmSelected ) @@ -1039,18 +1039,18 @@ BOOL SwWrtShell::SelectNextPrevHyperlink( BOOL bNext ) // bei Cursor setzen fnKillSel = &SwWrtShell::ResetSelect; fnSetCrsr = &SwWrtShell::SetCrsrKillSel; - bCreateXSelection = TRUE; + bCreateXSelection = sal_True; } else if( bFrmSelected ) { EnterSelFrmMode(); - bCreateXSelection = TRUE; + bCreateXSelection = sal_True; } else if( (CNT_GRF | CNT_OLE ) & GetCntType() ) { SelectObj( GetCharRect().Pos() ); EnterSelFrmMode(); - bCreateXSelection = TRUE; + bCreateXSelection = sal_True; } if( bCreateXSelection ) diff --git a/sw/source/ui/wrtsh/wrtsh1.cxx b/sw/source/ui/wrtsh/wrtsh1.cxx index 7840bbc211..0b33cf6bb5 100644 --- a/sw/source/ui/wrtsh/wrtsh1.cxx +++ b/sw/source/ui/wrtsh/wrtsh1.cxx @@ -28,6 +28,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" + #include <com/sun/star/container/XChild.hpp> #include <com/sun/star/embed/XVisualObject.hpp> #include <com/sun/star/embed/EmbedMisc.hpp> @@ -35,6 +36,7 @@ #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/embed/NoVisualAreaSizeException.hpp> #include <com/sun/star/chart2/XChartDocument.hpp> +#include <com/sun/star/util/XModifiable.hpp> #include <math.h> #include <hintids.hxx> @@ -57,11 +59,11 @@ #include <vcl/graph.hxx> #include <sfx2/printer.hxx> #include <unotools/charclass.hxx> - #include <comphelper/storagehelper.hxx> #include <svx/svxdlg.hxx> #include <svx/extrusionbar.hxx> #include <svx/fontworkbar.hxx> +#include <frmfmt.hxx> #include <fmtftn.hxx> #include <fmtpdsc.hxx> #include <wdocsh.hxx> @@ -71,6 +73,7 @@ #include <view.hxx> #include <uitool.hxx> #include <cmdid.h> +#include <cfgitems.hxx> #include <pagedesc.hxx> #include <frmmgr.hxx> #include <shellio.hxx> @@ -98,13 +101,13 @@ // -> #111827# #include <SwRewriter.hxx> #include <comcore.hrc> -#include <undobj.hxx> // <- #111827# #include <toolkit/helper/vclunohelper.hxx> #include <sfx2/viewfrm.hxx> #include "PostItMgr.hxx" +#include <sfx2/msgpool.hxx> using namespace sw::mark; using namespace com::sun::star; @@ -119,12 +122,12 @@ using namespace com::sun::star; pCrsrStack(0), \ rView(rShell),\ aNavigationMgr(this), \ - bDestOnStack(FALSE), \ + bDestOnStack(sal_False), \ fnLeaveSelect(&SwWrtShell::SttLeaveSelect) #define BITFLD_INI_LIST \ bClearMark = \ - bIns = TRUE;\ + bIns = sal_True;\ bAddMode = \ bBlockMode = \ bExtMode = \ @@ -135,7 +138,7 @@ using namespace com::sun::star; bSelWrd = \ bSelLn = \ bIsInClickToEdit = \ - mbRetainSelection = FALSE; + mbRetainSelection = sal_False; SvxAutoCorrect* lcl_IsAutoCorr() @@ -148,11 +151,11 @@ SvxAutoCorrect* lcl_IsAutoCorr() return pACorr; } -void SwWrtShell::NoEdit(BOOL bHideCrsr) +void SwWrtShell::NoEdit(sal_Bool bHideCrsr) { if(bHideCrsr) HideCrsr(); - bNoEdit = TRUE; + bNoEdit = sal_True; } @@ -162,17 +165,17 @@ void SwWrtShell::Edit() if (CanInsert()) { ShowCrsr(); - bNoEdit = FALSE; + bNoEdit = sal_False; } } -BOOL SwWrtShell::IsEndWrd() +sal_Bool SwWrtShell::IsEndWrd() { MV_KONTEXT(this); if(IsEndPara() && !IsSttPara()) - return TRUE; + return sal_True; return IsEndWord(); } @@ -184,14 +187,14 @@ BOOL SwWrtShell::IsEndWrd() -BOOL SwWrtShell::_CanInsert() +sal_Bool SwWrtShell::_CanInsert() { if(!CanInsert()) { Sound::Beep(); - return FALSE; + return sal_False; } - return TRUE; + return sal_True; } /*------------------------------------------------------------------------ Beschreibung: String einfuegen @@ -201,11 +204,11 @@ void SwWrtShell::InsertByWord( const String & rStr) { if( rStr.Len() ) { - BOOL bDelim = GetAppCharClass().isLetterNumeric( rStr, 0 ); + sal_Bool bDelim = GetAppCharClass().isLetterNumeric( rStr, 0 ); xub_StrLen nPos = 0, nStt = 0; for( ; nPos < rStr.Len(); nPos++ ) { - BOOL bTmpDelim = GetAppCharClass().isLetterNumeric( rStr, nPos ); + sal_Bool bTmpDelim = GetAppCharClass().isLetterNumeric( rStr, nPos ); if( bTmpDelim != bDelim ) { Insert( rStr.Copy( nStt, nPos - nStt )); @@ -224,7 +227,7 @@ void SwWrtShell::Insert( const String &rStr ) if( !_CanInsert() ) return; - BOOL bStarted = FALSE, bHasSel = HasSelection(), + sal_Bool bStarted = sal_False, bHasSel = HasSelection(), bCallIns = bIns /*|| bHasSel*/; bool bDeleted = false; @@ -249,7 +252,7 @@ void SwWrtShell::Insert( const String &rStr ) } StartUndo(UNDO_REPLACE, &aRewriter); - bStarted = TRUE; + bStarted = sal_True; bDeleted = DelRight() != 0; } @@ -260,7 +263,7 @@ void SwWrtShell::Insert( const String &rStr ) if( bStarted ) { EndAllAction(); - EndUndo(UNDO_REPLACE); + EndUndo(); } } @@ -271,7 +274,7 @@ void SwWrtShell::Insert( const String &rStr ) void SwWrtShell::Insert( const String &rPath, const String &rFilter, const Graphic &rGrf, SwFlyFrmAttrMgr *pFrmMgr, - BOOL bRule ) + sal_Bool bRule ) { ResetCursorStack(); if ( !_CanInsert() ) @@ -293,13 +296,13 @@ void SwWrtShell::Insert( const String &rPath, const String &rFilter, EnterSelFrmMode(); - BOOL bSetGrfSize = TRUE; - BOOL bOwnMgr = FALSE; + sal_Bool bSetGrfSize = sal_True; + sal_Bool bOwnMgr = sal_False; if ( !pFrmMgr ) { - bOwnMgr = TRUE; - pFrmMgr = new SwFlyFrmAttrMgr( TRUE, this, FRMMGR_TYPE_GRF ); + bOwnMgr = sal_True; + pFrmMgr = new SwFlyFrmAttrMgr( sal_True, this, FRMMGR_TYPE_GRF ); // VORSICHT // GetAttrSet nimmt einen Abgleich vor @@ -317,7 +320,7 @@ void SwWrtShell::Insert( const String &rPath, const String &rFilter, pFrmMgr->SetSize( aSz ); } else if ( aSz.Width() != DFLT_WIDTH && aSz.Height() != DFLT_HEIGHT ) - bSetGrfSize = FALSE; + bSetGrfSize = sal_False; pFrmMgr->SetHeightSizeType(ATT_FIX_SIZE); @@ -359,7 +362,7 @@ void SwWrtShell::Insert( const String &rPath, const String &rFilter, if ( bOwnMgr ) delete pFrmMgr; - EndUndo(UNDO_INSERT); + EndUndo(); EndAllAction(); } @@ -371,7 +374,7 @@ void SwWrtShell::Insert( const String &rPath, const String &rFilter, void SwWrtShell::InsertObject( const svt::EmbeddedObjectRef& xRef, SvGlobalName *pName, - BOOL bActivate, USHORT nSlotId ) + sal_Bool bActivate, sal_uInt16 nSlotId ) { ResetCursorStack(); if( !_CanInsert() ) @@ -382,7 +385,7 @@ void SwWrtShell::InsertObject( const svt::EmbeddedObjectRef& xRef, SvGlobalName // temporary storage svt::EmbeddedObjectRef xObj; uno::Reference < embed::XStorage > xStor = comphelper::OStorageHelper::GetTemporaryStorage(); - BOOL bDoVerb = TRUE; + sal_Bool bDoVerb = sal_True; if ( pName ) { comphelper::EmbeddedObjectContainer aCnt( xStor ); @@ -404,12 +407,15 @@ void SwWrtShell::InsertObject( const svt::EmbeddedObjectRef& xRef, SvGlobalName // TODO/LATER: recording! Convert properties to items case SID_INSERT_PLUGIN: - case SID_INSERT_APPLET: case SID_INSERT_FLOATINGFRAME: { + SfxSlotPool* pSlotPool = SW_MOD()->GetSlotPool(); + const SfxSlot* pSlot = pSlotPool->GetSlot(nSlotId); + rtl::OString aCmd(".uno:"); + aCmd += pSlot->GetUnoName(); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); SfxAbstractInsertObjectDialog* pDlg = - pFact->CreateInsertObjectDialog( GetWin(), nSlotId, xStor, &aServerList ); + pFact->CreateInsertObjectDialog( GetWin(), rtl::OUString( aCmd, aCmd.getLength(), RTL_TEXTENCODING_UTF8 ), xStor, &aServerList ); if ( pDlg ) { pDlg->Execute(); @@ -440,7 +446,7 @@ void SwWrtShell::InsertObject( const svt::EmbeddedObjectRef& xRef, SvGlobalName if ( !pClient ) { pClient = new SwOleClient( &GetView(), &GetView().GetEditWin(), xObj ); - SetCheckForOLEInCaption( TRUE ); + SetCheckForOLEInCaption( sal_True ); } if ( xObj.GetViewAspect() == embed::Aspects::MSOLE_ICON ) @@ -477,7 +483,7 @@ void SwWrtShell::InsertObject( const svt::EmbeddedObjectRef& xRef, SvGlobalName Vom ClipBoard oder Insert ------------------------------------------------------------------------*/ -BOOL SwWrtShell::InsertOleObject( const svt::EmbeddedObjectRef& xRef, SwFlyFrmFmt **pFlyFrmFmt ) +sal_Bool SwWrtShell::InsertOleObject( const svt::EmbeddedObjectRef& xRef, SwFlyFrmFmt **pFlyFrmFmt ) { ResetCursorStack(); StartAllAction(); @@ -491,9 +497,9 @@ BOOL SwWrtShell::InsertOleObject( const svt::EmbeddedObjectRef& xRef, SwFlyFrmFm // break should be insertet. StarMath objects are character bound and // no break should be inserted. //3. If an selektion is passed to a StarMath object, this object should - // not be activated. FALSE should be returned then. - BOOL bStarMath = TRUE; - BOOL bActivate = TRUE; + // not be activated. sal_False should be returned then. + sal_Bool bStarMath = sal_True; + sal_Bool bActivate = sal_True; // set parent to get correct VisArea(in case of object needing parent printer) uno::Reference < container::XChild > xChild( xRef.GetObject(), uno::UNO_QUERY ); @@ -517,7 +523,7 @@ BOOL SwWrtShell::InsertOleObject( const svt::EmbeddedObjectRef& xRef, SwFlyFrmFm try { xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Formula")), uno::makeAny( ::rtl::OUString( aMathData ) ) ); - bActivate = FALSE; + bActivate = sal_False; } catch ( uno::Exception& ) { @@ -529,11 +535,11 @@ BOOL SwWrtShell::InsertOleObject( const svt::EmbeddedObjectRef& xRef, SwFlyFrmFm } if ( !bStarMath ) - SwFEShell::SplitNode( FALSE, FALSE ); + SwFEShell::SplitNode( sal_False, sal_False ); EnterSelFrmMode(); - SwFlyFrmAttrMgr aFrmMgr( TRUE, this, FRMMGR_TYPE_OLE ); + SwFlyFrmAttrMgr aFrmMgr( sal_True, this, FRMMGR_TYPE_OLE ); aFrmMgr.SetHeightSizeType(ATT_FIX_SIZE); SwRect aBound; @@ -553,9 +559,39 @@ BOOL SwWrtShell::InsertOleObject( const svt::EmbeddedObjectRef& xRef, SwFlyFrmFm aFrmMgr.SetSize( aSz ); SwFlyFrmFmt *pFmt = SwFEShell::InsertObject( xRef, &aFrmMgr.GetAttrSet() ); + // --> #i972# + if ( bStarMath && pDoc->get( IDocumentSettingAccess::MATH_BASELINE_ALIGNMENT ) ) + AlignFormulaToBaseline( xRef.GetObject() ); + // <-- + if (pFlyFrmFmt) *pFlyFrmFmt = pFmt; + if ( SotExchange::IsChart( aCLSID ) ) + { + uno::Reference< embed::XEmbeddedObject > xEmbeddedObj( xRef.GetObject(), uno::UNO_QUERY ); + if ( xEmbeddedObj.is() ) + { + bool bDisableDataTableDialog = false; + svt::EmbeddedObjectRef::TryRunningState( xEmbeddedObj ); + uno::Reference< beans::XPropertySet > xProps( xEmbeddedObj->getComponent(), uno::UNO_QUERY ); + if ( xProps.is() && + ( xProps->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DisableDataTableDialog" ) ) ) >>= bDisableDataTableDialog ) && + bDisableDataTableDialog ) + { + xProps->setPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DisableDataTableDialog" ) ), + uno::makeAny( sal_False ) ); + xProps->setPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DisableComplexChartTypes" ) ), + uno::makeAny( sal_False ) ); + uno::Reference< util::XModifiable > xModifiable( xProps, uno::UNO_QUERY ); + if ( xModifiable.is() ) + { + xModifiable->setModified( sal_True ); + } + } + } + } + EndAllAction(); GetView().AutoCaption(OLE_CAP, &aCLSID); @@ -593,12 +629,12 @@ void SwWrtShell::LaunchOLEObj( long nVerb ) if ( !pCli ) pCli = new SwOleClient( &GetView(), &GetView().GetEditWin(), xRef ); - ((SwOleClient*)pCli)->SetInDoVerb( TRUE ); + ((SwOleClient*)pCli)->SetInDoVerb( sal_True ); CalcAndSetScale( xRef ); pCli->DoVerb( nVerb ); - ((SwOleClient*)pCli)->SetInDoVerb( FALSE ); + ((SwOleClient*)pCli)->SetInDoVerb( sal_False ); CalcAndSetScale( xRef ); } } @@ -677,7 +713,7 @@ void SwWrtShell::CalcAndSetScale( svt::EmbeddedObjectRef& xObj, bool bResetEnableSetModified(false); if ( GetDoc()->GetDocShell()->IsEnableSetModified() ) { - GetDoc()->GetDocShell()->EnableSetModified( FALSE ); + GetDoc()->GetDocShell()->EnableSetModified( sal_False ); bResetEnableSetModified = true; } @@ -690,7 +726,7 @@ void SwWrtShell::CalcAndSetScale( svt::EmbeddedObjectRef& xObj, if ( bResetEnableSetModified ) { - GetDoc()->GetDocShell()->EnableSetModified( TRUE ); + GetDoc()->GetDocShell()->EnableSetModified( sal_True ); } } // <-- @@ -713,6 +749,8 @@ void SwWrtShell::CalcAndSetScale( svt::EmbeddedObjectRef& xObj, if ( (embed::EmbedMisc::EMBED_ACTIVATEIMMEDIATELY & nMisc) || bLinkingChart // TODO/LATER: ResizeOnPrinterChange //|| SVOBJ_MISCSTATUS_RESIZEONPRINTERCHANGE & xObj->GetMiscStatus() + || nMisc & embed::EmbedMisc::EMBED_NEVERRESIZE // non-resizable objects need to be + // set the size back by this method ) { pCli = new SwOleClient( &GetView(), &GetView().GetEditWin(), xObj ); @@ -823,6 +861,17 @@ void SwWrtShell::CalcAndSetScale( svt::EmbeddedObjectRef& xObj, if ( bUseObjectSize ) { + // --> this moves non-resizable object so that when adding borders the baseline remains the same + const SwFlyFrmFmt *pFlyFrmFmt = dynamic_cast< const SwFlyFrmFmt * >( GetFlyFrmFmt() ); + OSL_ENSURE( pFlyFrmFmt, "Could not find fly frame." ); + if ( pFlyFrmFmt ) + { + const Point &rPoint = pFlyFrmFmt->GetLastFlyFrmPrtRectPos(); + SwRect aRect( pFlyPrtRect ? *pFlyPrtRect + : GetAnyCurRect( RECT_FLY_PRT_EMBEDDED, 0, xObj.GetObject() )); + aArea += rPoint - aRect.Pos(); // adjust area by diff of printing area position in order to keep baseline alignment correct. + } + // <-- aArea.Width ( _aVisArea.Width() ); aArea.Height( _aVisArea.Height() ); RequestObjectResize( aArea, xObj.GetObject() ); @@ -854,7 +903,7 @@ void SwWrtShell::ConnectObj( svt::EmbeddedObjectRef& xObj, const SwRect &rPrt, -void SwWrtShell::InsertPageBreak(const String *pPageDesc, USHORT nPgNum ) +void SwWrtShell::InsertPageBreak(const String *pPageDesc, sal_uInt16 nPgNum ) { ResetCursorStack(); if( _CanInsert() ) @@ -872,7 +921,7 @@ void SwWrtShell::InsertPageBreak(const String *pPageDesc, USHORT nPgNum ) } const SwPageDesc *pDesc = pPageDesc - ? FindPageDescByName( *pPageDesc, TRUE ) : 0; + ? FindPageDescByName( *pPageDesc, sal_True ) : 0; if( pDesc ) { SwFmtPageDesc aDesc( pDesc ); @@ -924,7 +973,7 @@ void SwWrtShell::InsertColumnBreak() { if(HasSelection()) DelRight(); - SwFEShell::SplitNode( FALSE, FALSE ); + SwFEShell::SplitNode( sal_False, sal_False ); } SetAttr(SvxFmtBreakItem(SVX_BREAK_COLUMN_BEFORE, RES_BREAK)); @@ -938,7 +987,7 @@ void SwWrtShell::InsertColumnBreak() ------------------------------------------------------------------------*/ -void SwWrtShell::InsertFootnote(const String &rStr, BOOL bEndNote, BOOL bEdit ) +void SwWrtShell::InsertFootnote(const String &rStr, sal_Bool bEndNote, sal_Bool bEdit ) { ResetCursorStack(); if( _CanInsert() ) @@ -960,7 +1009,7 @@ void SwWrtShell::InsertFootnote(const String &rStr, BOOL bEndNote, BOOL bEdit ) if( bEdit ) { // zur Bearbeiung des Fussnotentextes - Left(CRSR_SKIP_CHARS, FALSE, 1, FALSE ); + Left(CRSR_SKIP_CHARS, sal_False, 1, sal_False ); GotoFtnTxt(); } aNavigationMgr.addEntry(aPos); @@ -973,7 +1022,7 @@ void SwWrtShell::InsertFootnote(const String &rStr, BOOL bEndNote, BOOL bEdit ) ------------------------------------------------------------------------*/ -void SwWrtShell::SplitNode( BOOL bAutoFmt, BOOL bCheckTableStart ) +void SwWrtShell::SplitNode( sal_Bool bAutoFmt, sal_Bool bCheckTableStart ) { ResetCursorStack(); if( _CanInsert() ) @@ -981,7 +1030,7 @@ void SwWrtShell::SplitNode( BOOL bAutoFmt, BOOL bCheckTableStart ) ACT_KONTEXT(this); rView.GetEditWin().FlushInBuffer(); - BOOL bHasSel = HasSelection(); + sal_Bool bHasSel = HasSelection(); if( bHasSel ) { StartUndo( UNDO_INSERT ); @@ -1007,11 +1056,11 @@ void SwWrtShell::SplitNode( BOOL bAutoFmt, BOOL bCheckTableStart ) // -> #i40041# // Preconditions (as far as OD has figured out): -// - <SwEditShell::HasNumber()> is FALSE, if <bNum> is TRUE -// - <SwEditShell::HasBullet()> is FALSE, if <bNum> is FALSE +// - <SwEditShell::HasNumber()> is sal_False, if <bNum> is sal_True +// - <SwEditShell::HasBullet()> is sal_False, if <bNum> is sal_False // Behavior of method is determined by the current situation at the current // cursor position in the document. -void SwWrtShell::NumOrBulletOn(BOOL bNum) +void SwWrtShell::NumOrBulletOn(sal_Bool bNum) { // determine numbering rule found at current cursor position in the docment. const SwNumRule* pCurRule = GetCurNumRule(); @@ -1021,12 +1070,12 @@ void SwWrtShell::NumOrBulletOn(BOOL bNum) const SwNumRule * pNumRule = pCurRule; // - activate outline rule respectively turning on outline rule for - // current text node. But, only for turning on a numbering (<bNum> == TRUE). + // current text node. But, only for turning on a numbering (<bNum> == sal_True). // - overwrite found numbering rule at current cursor position, if // no numbering rule can be retrieved from the paragraph style. bool bContinueFoundNumRule( false ); bool bActivateOutlineRule( false ); - int nActivateOutlineLvl( MAXLEVEL ); // only relevant, if <bActivateOutlineRule> == TRUE + int nActivateOutlineLvl( MAXLEVEL ); // only relevant, if <bActivateOutlineRule> == sal_True SwTxtFmtColl * pColl = GetCurTxtFmtColl(); if ( pColl ) { @@ -1040,7 +1089,7 @@ void SwWrtShell::NumOrBulletOn(BOOL bNum) if ( pCollRule && pCollRule == GetDoc()->GetOutlineNumRule() ) { const SwNumRule* pDirectCollRule = - pDoc->FindNumRulePtr(pColl->GetNumRule( FALSE ).GetValue()); + pDoc->FindNumRulePtr(pColl->GetNumRule( sal_False ).GetValue()); if ( !pDirectCollRule ) { pCollRule = 0; @@ -1071,7 +1120,7 @@ void SwWrtShell::NumOrBulletOn(BOOL bNum) OSL_ENSURE( pColl->IsAssignedToListLevelOfOutlineStyle(), "<SwWrtShell::NumOrBulletOn(..)> - paragraph style with outline rule, but no outline level" ); if ( pColl->IsAssignedToListLevelOfOutlineStyle() && - pCollRule->Get( static_cast<USHORT>(nActivateOutlineLvl) ).GetNumberingType() + pCollRule->Get( static_cast<sal_uInt16>(nActivateOutlineLvl) ).GetNumberingType() == SVX_NUM_NUMBER_NONE ) { // activate outline numbering @@ -1087,7 +1136,7 @@ void SwWrtShell::NumOrBulletOn(BOOL bNum) { // --> OD 2009-08-27 #i101234# // activate outline numbering, because from the precondition - // it's known, that <SwEdit::HasNumber()> == FALSE + // it's known, that <SwEdit::HasNumber()> == sal_False bActivateOutlineRule = true; nActivateOutlineLvl = pColl->GetAssignedOutlineStyleLevel();//<-end,zhaojianwei } @@ -1098,11 +1147,11 @@ void SwWrtShell::NumOrBulletOn(BOOL bNum) // Check, if corresponding list level of the outline numbering // has already a numbering format set. nActivateOutlineLvl = pColl->GetAssignedOutlineStyleLevel();//<-end,zhaojianwei,need further consideration - if ( pCollRule->Get( static_cast<USHORT>(nActivateOutlineLvl) ).GetNumberingType() + if ( pCollRule->Get( static_cast<sal_uInt16>(nActivateOutlineLvl) ).GetNumberingType() == SVX_NUM_NUMBER_NONE ) { // activate outline numbering, because from the precondition - // it's known, that <SwEdit::HasNumber()> == FALSE + // it's known, that <SwEdit::HasNumber()> == sal_False bActivateOutlineRule = true; } else @@ -1120,7 +1169,7 @@ void SwWrtShell::NumOrBulletOn(BOOL bNum) OSL_ENSURE( pColl->IsAssignedToListLevelOfOutlineStyle(), "<SwWrtShell::NumOrBulletOn(..)> - paragraph style with outline rule, but no outline level" ); if ( pColl->IsAssignedToListLevelOfOutlineStyle() && - pCollRule->Get( static_cast<USHORT>(nActivateOutlineLvl) ).GetNumberingType() + pCollRule->Get( static_cast<sal_uInt16>(nActivateOutlineLvl) ).GetNumberingType() == SVX_NUM_NUMBER_NONE ) { // activate outline numbering @@ -1184,7 +1233,7 @@ void SwWrtShell::NumOrBulletOn(BOOL bNum) if (nLevel >= MAXLEVEL) nLevel = MAXLEVEL - 1; - SwNumFmt aFmt(aNumRule.Get(static_cast<USHORT>(nLevel))); + SwNumFmt aFmt(aNumRule.Get(static_cast<sal_uInt16>(nLevel))); if (bNum) aFmt.SetNumberingType(SVX_NUM_ARABIC); @@ -1196,10 +1245,10 @@ void SwWrtShell::NumOrBulletOn(BOOL bNum) const Font* pFnt = &numfunc::GetDefBulletFont(); aFmt.SetBulletFont( pFnt ); } - aFmt.SetBulletChar( numfunc::GetBulletChar(static_cast<BYTE>(nLevel))); + aFmt.SetBulletChar( numfunc::GetBulletChar(static_cast<sal_uInt8>(nLevel))); aFmt.SetNumberingType(SVX_NUM_CHAR_SPECIAL); } - aNumRule.Set(static_cast<USHORT>(nLevel), aFmt); + aNumRule.Set(static_cast<sal_uInt16>(nLevel), aFmt); } } @@ -1240,7 +1289,7 @@ void SwWrtShell::NumOrBulletOn(BOOL bNum) const bool bHtml = 0 != PTR_CAST(SwWebDocShell, pDocSh); const bool bRightToLeft = IsInRightToLeftText(); - for( BYTE nLvl = 0; nLvl < MAXLEVEL; ++nLvl ) + for( sal_uInt8 nLvl = 0; nLvl < MAXLEVEL; ++nLvl ) { SwNumFmt aFmt( aNumRule.Get( nLvl ) ); aFmt.SetCharFmt( pChrFmt ); @@ -1322,7 +1371,7 @@ void SwWrtShell::NumOrBulletOn(BOOL bNum) void SwWrtShell::NumOn() { - NumOrBulletOn(TRUE); + NumOrBulletOn(sal_True); } void SwWrtShell::NumOrBulletOff() @@ -1357,7 +1406,7 @@ void SwWrtShell::NumOrBulletOff() // --> OD 2005-10-24 #126346# - Cursor can not be anymore in front of // a label, because numbering/bullet is switched off. - SetInFrontOfLabel( FALSE ); + SetInFrontOfLabel( sal_False ); // <-- } } @@ -1369,7 +1418,7 @@ void SwWrtShell::NumOrBulletOff() void SwWrtShell::BulletOn() { - NumOrBulletOn(FALSE); + NumOrBulletOn(sal_False); } @@ -1476,7 +1525,7 @@ SwTxtFmtColl *SwWrtShell::GetParaStyle(const String &rCollName, GetStyle eCreate SwTxtFmtColl* pColl = FindTxtFmtCollByName( rCollName ); if( !pColl && GETSTYLE_NOCREATE != eCreate ) { - USHORT nId = SwStyleNameMapper::GetPoolIdFromUIName( rCollName, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL ); + sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName( rCollName, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL ); if( USHRT_MAX != nId || GETSTYLE_CREATEANY == eCreate ) pColl = GetTxtCollFromPool( nId ); } @@ -1496,7 +1545,7 @@ SwCharFmt *SwWrtShell::GetCharStyle(const String &rFmtName, GetStyle eCreate ) SwCharFmt* pFmt = FindCharFmtByName( rFmtName ); if( !pFmt && GETSTYLE_NOCREATE != eCreate ) { - USHORT nId = SwStyleNameMapper::GetPoolIdFromUIName( rFmtName, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT ); + sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName( rFmtName, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT ); if( USHRT_MAX != nId || GETSTYLE_CREATEANY == eCreate ) pFmt = (SwCharFmt*)GetFmtFromPool( nId ); } @@ -1515,7 +1564,7 @@ SwCharFmt *SwWrtShell::GetCharStyle(const String &rFmtName, GetStyle eCreate ) SwFrmFmt *SwWrtShell::GetTblStyle(const String &rFmtName) { SwFrmFmt *pFmt = 0; - for( USHORT i = GetTblFrmFmtCount(); i; ) + for( sal_uInt16 i = GetTblFrmFmtCount(); i; ) if( !( pFmt = &GetTblFrmFmt( --i ) )->IsDefault() && pFmt->GetName() == rFmtName && IsUsed( *pFmt ) ) return pFmt; @@ -1540,7 +1589,7 @@ void SwWrtShell::SetPageStyle(const String &rCollName) { if( !SwCrsrShell::HasSelection() && !IsSelFrmMode() && !IsObjSelected() ) { - SwPageDesc* pDesc = FindPageDescByName( rCollName, TRUE ); + SwPageDesc* pDesc = FindPageDescByName( rCollName, sal_True ); if( pDesc ) ChgCurPageDesc( *pDesc ); } @@ -1552,7 +1601,7 @@ void SwWrtShell::SetPageStyle(const String &rCollName) -String SwWrtShell::GetCurPageStyle( const BOOL bCalcFrm ) const +String SwWrtShell::GetCurPageStyle( const sal_Bool bCalcFrm ) const { return GetPageDesc(GetCurPageDesc( bCalcFrm )).GetName(); } @@ -1591,19 +1640,19 @@ void SwWrtShell::AutoUpdatePara(SwTxtFmtColl* pColl, const SfxItemSet& rStyleSet SID_ATTR_PARA_PAGENUM, SID_ATTR_PARA_PAGENUM, 0 ); GetCurAttr( aCoreSet ); - BOOL bReset = FALSE; + sal_Bool bReset = sal_False; SfxItemIter aParaIter( aCoreSet ); const SfxPoolItem* pParaItem = aParaIter.FirstItem(); while( pParaItem ) { if(!IsInvalidItem(pParaItem)) { - USHORT nWhich = pParaItem->Which(); + sal_uInt16 nWhich = pParaItem->Which(); if(SFX_ITEM_SET == aCoreSet.GetItemState(nWhich) && SFX_ITEM_SET == rStyleSet.GetItemState(nWhich)) { aCoreSet.ClearItem(nWhich); - bReset = TRUE; + bReset = sal_True; } } pParaItem = aParaIter.NextItem(); @@ -1634,14 +1683,14 @@ void SwWrtShell::AutoCorrect( SvxAutoCorrect& rACorr, sal_Unicode cChar ) ResetCursorStack(); if(_CanInsert()) { - BOOL bStarted = FALSE; + sal_Bool bStarted = sal_False; if(HasSelection()) { // nur hier klammern, da das normale Insert schon an der // Editshell geklammert ist StartAllAction(); StartUndo(UNDO_INSERT); - bStarted = TRUE; + bStarted = sal_True; DelRight(); } SwEditShell::AutoCorrect( rACorr, IsInsMode(), cChar ); @@ -1705,14 +1754,14 @@ SwWrtShell::~SwWrtShell() SET_CURR_SHELL( this ); while(IsModePushed()) PopMode(); - while(PopCrsr(FALSE)) + while(PopCrsr(sal_False)) ; SwTransferable::ClearSelection( *this ); } -BOOL SwWrtShell::Pop( BOOL bOldCrsr ) +sal_Bool SwWrtShell::Pop( sal_Bool bOldCrsr ) { - BOOL bRet = SwCrsrShell::Pop( bOldCrsr ); + sal_Bool bRet = SwCrsrShell::Pop( bOldCrsr ); if( bRet && IsSelection() ) { fnSetCrsr = &SwWrtShell::SetCrsrKillSel; @@ -1721,7 +1770,7 @@ BOOL SwWrtShell::Pop( BOOL bOldCrsr ) return bRet; } -BOOL SwWrtShell::CanInsert() +sal_Bool SwWrtShell::CanInsert() { return (!(IsSelFrmMode() | IsObjSelected() | (GetView().GetDrawFuncPtr() != NULL) | (GetView().GetPostItMgr()->GetActiveSidebarWin()!= NULL))); } diff --git a/sw/source/ui/wrtsh/wrtsh2.cxx b/sw/source/ui/wrtsh/wrtsh2.cxx index 651be62130..34e5012a3e 100644 --- a/sw/source/ui/wrtsh/wrtsh2.cxx +++ b/sw/source/ui/wrtsh/wrtsh2.cxx @@ -52,6 +52,7 @@ #include <reffld.hxx> #include <swundo.hxx> #include <doc.hxx> +#include <IDocumentUndoRedo.hxx> #include <viewopt.hxx> // SwViewOptions #include <frmfmt.hxx> // fuer UpdateTable #include <swtable.hxx> // fuer UpdateTable @@ -68,8 +69,7 @@ #include <wrtsh.hrc> #include "swabstdlg.hxx" #include "fldui.hrc" - -#include <undobj.hxx> +#include <SwRewriter.hxx> #include <com/sun/star/document/XDocumentProperties.hpp> #include <com/sun/star/document/XDocumentPropertiesSupplier.hpp> @@ -93,7 +93,7 @@ void SwWrtShell::Insert(SwField &rFld) } SwEditShell::Insert2(rFld, bDeleted); - EndUndo(UNDO_INSERT); + EndUndo(); EndAllAction(); } @@ -103,7 +103,7 @@ void SwWrtShell::Insert(SwField &rFld) -void SwWrtShell::UpdateInputFlds( SwInputFieldList* pLst, BOOL bOnlyInSel ) +void SwWrtShell::UpdateInputFlds( SwInputFieldList* pLst, sal_Bool bOnlyInSel ) { // ueber die Liste der Eingabefelder gehen und Updaten SwInputFieldList* pTmp = pLst; @@ -113,21 +113,21 @@ void SwWrtShell::UpdateInputFlds( SwInputFieldList* pLst, BOOL bOnlyInSel ) if (bOnlyInSel) pTmp->RemoveUnselectedFlds(); - const USHORT nCnt = pTmp->Count(); + const sal_uInt16 nCnt = pTmp->Count(); if(nCnt) { pTmp->PushCrsr(); - BOOL bCancel = FALSE; + sal_Bool bCancel = sal_False; ByteString aDlgPos; - for( USHORT i = 0; i < nCnt && !bCancel; ++i ) + for( sal_uInt16 i = 0; i < nCnt && !bCancel; ++i ) { pTmp->GotoFieldPos( i ); SwField* pField = pTmp->GetField( i ); if(pField->GetTyp()->Which() == RES_DROPDOWN) - bCancel = StartDropDownFldDlg( pField, TRUE, &aDlgPos ); + bCancel = StartDropDownFldDlg( pField, sal_True, &aDlgPos ); else - bCancel = StartInputFldDlg( pField, TRUE, 0, &aDlgPos); + bCancel = StartInputFldDlg( pField, sal_True, 0, &aDlgPos); // Sonst Updatefehler bei Multiselektion: pTmp->GetField( i )->GetTyp()->UpdateFlds(); @@ -146,7 +146,7 @@ void SwWrtShell::UpdateInputFlds( SwInputFieldList* pLst, BOOL bOnlyInSel ) -BOOL SwWrtShell::StartInputFldDlg( SwField* pFld, BOOL bNextButton, +sal_Bool SwWrtShell::StartInputFldDlg( SwField* pFld, sal_Bool bNextButton, Window* pParentWin, ByteString* pWindowState ) { @@ -157,7 +157,7 @@ BOOL SwWrtShell::StartInputFldDlg( SwField* pFld, BOOL bNextButton, OSL_ENSURE(pDlg, "Dialogdiet fail!"); if(pWindowState && pWindowState->Len()) pDlg->SetWindowState(*pWindowState); - BOOL bRet = RET_CANCEL == pDlg->Execute(); + sal_Bool bRet = RET_CANCEL == pDlg->Execute(); if(pWindowState) *pWindowState = pDlg->GetWindowState(); @@ -166,7 +166,7 @@ BOOL SwWrtShell::StartInputFldDlg( SwField* pFld, BOOL bNextButton, return bRet; } -BOOL SwWrtShell::StartDropDownFldDlg(SwField* pFld, BOOL bNextButton, ByteString* pWindowState) +sal_Bool SwWrtShell::StartDropDownFldDlg(SwField* pFld, sal_Bool bNextButton, ByteString* pWindowState) { SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!"); @@ -175,11 +175,11 @@ BOOL SwWrtShell::StartDropDownFldDlg(SwField* pFld, BOOL bNextButton, ByteString OSL_ENSURE(pDlg, "Dialogdiet fail!"); if(pWindowState && pWindowState->Len()) pDlg->SetWindowState(*pWindowState); - USHORT nRet = pDlg->Execute(); + sal_uInt16 nRet = pDlg->Execute(); if(pWindowState) *pWindowState = pDlg->GetWindowState(); delete pDlg; - BOOL bRet = RET_CANCEL == nRet; + sal_Bool bRet = RET_CANCEL == nRet; GetWin()->Update(); if(RET_YES == nRet) { @@ -210,9 +210,9 @@ void SwWrtShell::InsertTableOf(const SwTOXBase& rTOX, const SfxItemSet* pSet) Beschreibung: Verzeichnis Updaten Selektion loeschen --------------------------------------------------------------------*/ -BOOL SwWrtShell::UpdateTableOf(const SwTOXBase& rTOX, const SfxItemSet* pSet) +sal_Bool SwWrtShell::UpdateTableOf(const SwTOXBase& rTOX, const SfxItemSet* pSet) { - BOOL bResult = FALSE; + sal_Bool bResult = sal_False; if(_CanInsert()) { @@ -220,10 +220,11 @@ BOOL SwWrtShell::UpdateTableOf(const SwTOXBase& rTOX, const SfxItemSet* pSet) if (pSet == NULL) { - SwDoc * _pDoc = GetDoc(); - - if (_pDoc != NULL) - _pDoc->DelAllUndoObj(); + SwDoc *const pDoc_ = GetDoc(); + if (pDoc_) + { + pDoc_->GetIDocumentUndoRedo().DelAllUndoObj(); + } } } @@ -236,12 +237,12 @@ BOOL SwWrtShell::UpdateTableOf(const SwTOXBase& rTOX, const SfxItemSet* pSet) void SwWrtShell::ClickToField( const SwField& rFld ) { - bIsInClickToEdit = TRUE; + bIsInClickToEdit = sal_True; switch( rFld.GetTyp()->Which() ) { case RES_JUMPEDITFLD: { - USHORT nSlotId = 0; + sal_uInt16 nSlotId = 0; switch( rFld.GetFormat() ) { case JE_FMT_TABLE: @@ -257,7 +258,7 @@ void SwWrtShell::ClickToField( const SwField& rFld ) } - Right( CRSR_SKIP_CHARS, TRUE, 1, FALSE ); // Feld selektieren + Right( CRSR_SKIP_CHARS, sal_True, 1, sal_False ); // Feld selektieren if( nSlotId ) { @@ -298,29 +299,29 @@ void SwWrtShell::ClickToField( const SwField& rFld ) break; case RES_INPUTFLD: - StartInputFldDlg( (SwField*)&rFld, FALSE ); + StartInputFldDlg( (SwField*)&rFld, sal_False ); break; case RES_SETEXPFLD: if( ((SwSetExpField&)rFld).GetInputFlag() ) - StartInputFldDlg( (SwField*)&rFld, FALSE ); + StartInputFldDlg( (SwField*)&rFld, sal_False ); break; case RES_DROPDOWN : - StartDropDownFldDlg( (SwField*)&rFld, FALSE ); + StartDropDownFldDlg( (SwField*)&rFld, sal_False ); break; } - bIsInClickToEdit = FALSE; + bIsInClickToEdit = sal_False; } -void SwWrtShell::ClickToINetAttr( const SwFmtINetFmt& rItem, USHORT nFilter ) +void SwWrtShell::ClickToINetAttr( const SwFmtINetFmt& rItem, sal_uInt16 nFilter ) { if( !rItem.GetValue().Len() ) return ; - bIsInClickToEdit = TRUE; + bIsInClickToEdit = sal_True; // erstmal das evt. gesetzte ObjectSelect Macro ausfuehren const SvxMacro* pMac = rItem.GetMacro( SFX_EVENT_MOUSECLICK_OBJECT ); @@ -328,7 +329,7 @@ void SwWrtShell::ClickToINetAttr( const SwFmtINetFmt& rItem, USHORT nFilter ) { SwCallMouseEvent aCallEvent; aCallEvent.Set( &rItem ); - GetDoc()->CallEvent( SFX_EVENT_MOUSECLICK_OBJECT, aCallEvent, FALSE ); + GetDoc()->CallEvent( SFX_EVENT_MOUSECLICK_OBJECT, aCallEvent, sal_False ); } // damit die Vorlagenumsetzung sofort angezeigt wird @@ -340,27 +341,27 @@ void SwWrtShell::ClickToINetAttr( const SwFmtINetFmt& rItem, USHORT nFilter ) const_cast<SwTxtINetFmt*>(pTxtAttr)->SetVisitedValid( true ); } - bIsInClickToEdit = FALSE; + bIsInClickToEdit = sal_False; } -BOOL SwWrtShell::ClickToINetGrf( const Point& rDocPt, USHORT nFilter ) +sal_Bool SwWrtShell::ClickToINetGrf( const Point& rDocPt, sal_uInt16 nFilter ) { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; String sURL; String sTargetFrameName; const SwFrmFmt* pFnd = IsURLGrfAtPos( rDocPt, &sURL, &sTargetFrameName ); if( pFnd && sURL.Len() ) { - bRet = TRUE; + bRet = sal_True; // erstmal das evt. gesetzte ObjectSelect Macro ausfuehren const SvxMacro* pMac = &pFnd->GetMacro().GetMacro( SFX_EVENT_MOUSECLICK_OBJECT ); if( pMac ) { SwCallMouseEvent aCallEvent; aCallEvent.Set( EVENT_OBJECT_URLITEM, pFnd ); - GetDoc()->CallEvent( SFX_EVENT_MOUSECLICK_OBJECT, aCallEvent, FALSE ); + GetDoc()->CallEvent( SFX_EVENT_MOUSECLICK_OBJECT, aCallEvent, sal_False ); } ::LoadURL( sURL, this, nFilter, &sTargetFrameName); @@ -369,7 +370,7 @@ BOOL SwWrtShell::ClickToINetGrf( const Point& rDocPt, USHORT nFilter ) } -void LoadURL( const String& rURL, ViewShell* pVSh, USHORT nFilter, +void LoadURL( const String& rURL, ViewShell* pVSh, sal_uInt16 nFilter, const String *pTargetFrameName ) { OSL_ENSURE( rURL.Len() && pVSh, "what should be loaded here?" ); @@ -409,9 +410,9 @@ void LoadURL( const String& rURL, ViewShell* pVSh, USHORT nFilter, SfxStringItem aTargetFrameName( SID_TARGETNAME, sTargetFrame ); SfxStringItem aReferer( SID_REFERER, sReferer ); - SfxBoolItem aNewView( SID_OPEN_NEW_VIEW, FALSE ); + SfxBoolItem aNewView( SID_OPEN_NEW_VIEW, sal_False ); //#39076# Silent kann lt. SFX entfernt werden. - SfxBoolItem aBrowse( SID_BROWSE, TRUE ); + SfxBoolItem aBrowse( SID_BROWSE, sal_True ); if( nFilter & URLLOAD_NEWVIEW ) aTargetFrameName.SetValue( String::CreateFromAscii("_blank") ); @@ -430,7 +431,7 @@ void LoadURL( const String& rURL, ViewShell* pVSh, USHORT nFilter, } void SwWrtShell::NavigatorPaste( const NaviContentBookmark& rBkmk, - const USHORT nAction ) + const sal_uInt16 nAction ) { if( EXCHG_IN_ACTION_COPY == nAction ) { @@ -468,9 +469,15 @@ void SwWrtShell::NavigatorPaste( const NaviContentBookmark& rBkmk, // the update of content from linked section at time delete // the undostack. Then the change of the section dont create // any undoobject. - BUG 69145 - BOOL bDoesUndo = DoesUndo(); - if( UNDO_INSSECTION != GetUndoIds() ) - DoUndo( FALSE ); + sal_Bool bDoesUndo = DoesUndo(); + SwUndoId nLastUndoId(UNDO_EMPTY); + if (GetLastUndoInfo(0, & nLastUndoId)) + { + if (UNDO_INSSECTION != nLastUndoId) + { + DoUndo(false); + } + } UpdateSection( GetSectionFmtPos( *pIns->GetFmt() ), aSection ); DoUndo( bDoesUndo ); } diff --git a/sw/source/ui/wrtsh/wrtsh3.cxx b/sw/source/ui/wrtsh/wrtsh3.cxx index ac6bb37455..1fcc75ffb5 100644 --- a/sw/source/ui/wrtsh/wrtsh3.cxx +++ b/sw/source/ui/wrtsh/wrtsh3.cxx @@ -56,12 +56,12 @@ using ::rtl::OUString; extern sal_Bool bNoInterrupt; // in mainwn.cxx -BOOL SwWrtShell::MoveBookMark( BookMarkMove eFuncId, const ::sw::mark::IMark* const pMark) +sal_Bool SwWrtShell::MoveBookMark( BookMarkMove eFuncId, const ::sw::mark::IMark* const pMark) { addCurrentPosition(); (this->*fnKillSel)( 0, sal_False ); - BOOL bRet = sal_True; + sal_Bool bRet = sal_True; switch(eFuncId) { case BOOKMARK_INDEX:bRet = SwCrsrShell::GotoMark( pMark );break; @@ -83,11 +83,11 @@ BOOL SwWrtShell::MoveBookMark( BookMarkMove eFuncId, const ::sw::mark::IMark* co return bRet; } -BOOL SwWrtShell::GotoField( const SwFmtFld& rFld ) +sal_Bool SwWrtShell::GotoField( const SwFmtFld& rFld ) { (this->*fnKillSel)( 0, sal_False ); - BOOL bRet = SwCrsrShell::GotoFld( rFld ); + sal_Bool bRet = SwCrsrShell::GotoFld( rFld ); if( bRet && IsSelFrmMode() ) { UnSelectFrm(); @@ -141,7 +141,7 @@ void SwWrtShell::DrawSelChanged( ) bNoInterrupt = bOldVal; } -BOOL SwWrtShell::GotoMark( const ::rtl::OUString& rName ) +sal_Bool SwWrtShell::GotoMark( const ::rtl::OUString& rName ) { IDocumentMarkAccess::const_iterator_t ppMark = getIDocumentMarkAccess()->findMark( rName ); if(ppMark == getIDocumentMarkAccess()->getMarksEnd()) return false; @@ -149,19 +149,19 @@ BOOL SwWrtShell::GotoMark( const ::rtl::OUString& rName ) } -BOOL SwWrtShell::GotoMark( const ::sw::mark::IMark* const pMark ) +sal_Bool SwWrtShell::GotoMark( const ::sw::mark::IMark* const pMark ) { return MoveBookMark( BOOKMARK_INDEX, pMark ); } -BOOL SwWrtShell::GoNextBookmark() +sal_Bool SwWrtShell::GoNextBookmark() { return MoveBookMark( BOOKMARK_NEXT ); } -BOOL SwWrtShell::GoPrevBookmark() +sal_Bool SwWrtShell::GoPrevBookmark() { return MoveBookMark( BOOKMARK_PREV ); } diff --git a/sw/source/ui/wrtsh/wrtsh4.cxx b/sw/source/ui/wrtsh/wrtsh4.cxx index dfed2f208a..9469ff2245 100644 --- a/sw/source/ui/wrtsh/wrtsh4.cxx +++ b/sw/source/ui/wrtsh/wrtsh4.cxx @@ -47,7 +47,7 @@ */ -BOOL SwWrtShell::_SttWrd() +sal_Bool SwWrtShell::_SttWrd() { if ( IsSttPara() ) return 1; @@ -73,7 +73,7 @@ BOOL SwWrtShell::_SttWrd() -BOOL SwWrtShell::_EndWrd() +sal_Bool SwWrtShell::_EndWrd() { if ( IsEndWrd() ) return 1; @@ -91,14 +91,14 @@ BOOL SwWrtShell::_EndWrd() -BOOL SwWrtShell::_NxtWrd() +sal_Bool SwWrtShell::_NxtWrd() { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; while( IsEndPara() ) // wenn schon am Ende, dann naechsten ??? { if(!SwCrsrShell::Right(1,CRSR_SKIP_CHARS)) // Document - Ende ?? { - Pop( FALSE ); + Pop( sal_False ); return bRet; } bRet = IsStartWord(); @@ -115,21 +115,21 @@ BOOL SwWrtShell::_NxtWrd() bRet = IsStartWord(); } else - bRet = TRUE; + bRet = sal_True; } ClearMark(); Combine(); return bRet; } -BOOL SwWrtShell::_PrvWrd() +sal_Bool SwWrtShell::_PrvWrd() { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; while( IsSttPara() ) { // wenn schon am Anfang, dann naechsten ??? if(!SwCrsrShell::Left(1,CRSR_SKIP_CHARS)) { // Document - Anfang ?? - Pop( FALSE ); + Pop( sal_False ); return bRet; } bRet = IsStartWord(); @@ -146,7 +146,7 @@ BOOL SwWrtShell::_PrvWrd() bRet = IsStartWord(); } else - bRet = TRUE; + bRet = sal_True; } ClearMark(); Combine(); @@ -155,16 +155,16 @@ BOOL SwWrtShell::_PrvWrd() // --> OD 2008-08-06 #i92468# // method code of <SwWrtShell::_NxtWrd()> before fix for issue i72162 -BOOL SwWrtShell::_NxtWrdForDelete() +sal_Bool SwWrtShell::_NxtWrdForDelete() { if ( IsEndPara() ) { if ( !SwCrsrShell::Right(1,CRSR_SKIP_CHARS) ) { - Pop( FALSE ); - return FALSE; + Pop( sal_False ); + return sal_False; } - return TRUE; + return sal_True; } Push(); ClearMark(); @@ -174,20 +174,20 @@ BOOL SwWrtShell::_NxtWrdForDelete() } ClearMark(); Combine(); - return TRUE; + return sal_True; } // method code of <SwWrtShell::_PrvWrd()> before fix for issue i72162 -BOOL SwWrtShell::_PrvWrdForDelete() +sal_Bool SwWrtShell::_PrvWrdForDelete() { if ( IsSttPara() ) { if ( !SwCrsrShell::Left(1,CRSR_SKIP_CHARS) ) { - Pop( FALSE ); - return FALSE; + Pop( sal_False ); + return sal_False; } - return TRUE; + return sal_True; } Push(); ClearMark(); @@ -197,18 +197,18 @@ BOOL SwWrtShell::_PrvWrdForDelete() } ClearMark(); Combine(); - return TRUE; + return sal_True; } // <-- -BOOL SwWrtShell::_FwdSentence() +sal_Bool SwWrtShell::_FwdSentence() { Push(); ClearMark(); if(!SwCrsrShell::Right(1,CRSR_SKIP_CHARS)) { - Pop(FALSE); + Pop(sal_False); return 0; } if( !GoNextSentence() && !IsEndPara() ) @@ -221,13 +221,13 @@ BOOL SwWrtShell::_FwdSentence() -BOOL SwWrtShell::_BwdSentence() +sal_Bool SwWrtShell::_BwdSentence() { Push(); ClearMark(); if(!SwCrsrShell::Left(1,CRSR_SKIP_CHARS)) { - Pop(FALSE); + Pop(sal_False); return 0; } if(IsSttPara()) @@ -244,11 +244,11 @@ BOOL SwWrtShell::_BwdSentence() } -BOOL SwWrtShell::_FwdPara() +sal_Bool SwWrtShell::_FwdPara() { Push(); ClearMark(); - BOOL bRet = SwCrsrShell::MovePara(fnParaNext, fnParaStart); + sal_Bool bRet = SwCrsrShell::MovePara(fnParaNext, fnParaStart); ClearMark(); Combine(); @@ -256,12 +256,12 @@ BOOL SwWrtShell::_FwdPara() } -BOOL SwWrtShell::_BwdPara() +sal_Bool SwWrtShell::_BwdPara() { Push(); ClearMark(); - BOOL bRet = SwCrsrShell::MovePara(fnParaPrev, fnParaStart); + sal_Bool bRet = SwCrsrShell::MovePara(fnParaPrev, fnParaStart); if ( !bRet && !IsSttOfPara() ) { SttPara(); diff --git a/sw/source/ui/wrtsh/wrtundo.cxx b/sw/source/ui/wrtsh/wrtundo.cxx index ef70e42d66..bbd1d06052 100644 --- a/sw/source/ui/wrtsh/wrtundo.cxx +++ b/sw/source/ui/wrtsh/wrtundo.cxx @@ -37,8 +37,11 @@ #include <svl/slstitm.hxx> #include <wrtsh.hxx> #include <swundo.hxx> // fuer Undo-Ids +#include <IDocumentUndoRedo.hxx> #include <swdtflvr.hxx> - +#include <svtools/svtdata.hxx> +#include <svtools/svtools.hrc> +#include <svtools/svtdata.hxx> #include <wrtsh.hrc> #include <sfx2/sfx.hrc> @@ -47,7 +50,7 @@ // ist, muss die fuer die weiteren Aktionen beruecksichtigt werden. -void SwWrtShell::Do( DoType eDoType, USHORT nCnt ) +void SwWrtShell::Do( DoType eDoType, sal_uInt16 nCnt ) { // #105332# save current state of DoesUndo() sal_Bool bSaveDoesUndo = DoesUndo(); @@ -59,7 +62,7 @@ void SwWrtShell::Do( DoType eDoType, USHORT nCnt ) DoUndo(sal_False); // #i21739# // Modi zuruecksetzen EnterStdMode(); - SwEditShell::Undo(UNDO_EMPTY, nCnt ); + SwEditShell::Undo(nCnt); break; case REDO: DoUndo(sal_False); // #i21739# @@ -76,8 +79,8 @@ void SwWrtShell::Do( DoType eDoType, USHORT nCnt ) // #105332# restore undo state DoUndo(bSaveDoesUndo); - BOOL bCreateXSelection = FALSE; - const BOOL bFrmSelected = IsFrmSelected() || IsObjSelected(); + sal_Bool bCreateXSelection = sal_False; + const sal_Bool bFrmSelected = IsFrmSelected() || IsObjSelected(); if ( IsSelection() ) { if ( bFrmSelected ) @@ -87,18 +90,18 @@ void SwWrtShell::Do( DoType eDoType, USHORT nCnt ) // bei Cursor setzen fnKillSel = &SwWrtShell::ResetSelect; fnSetCrsr = &SwWrtShell::SetCrsrKillSel; - bCreateXSelection = TRUE; + bCreateXSelection = sal_True; } else if ( bFrmSelected ) { EnterSelFrmMode(); - bCreateXSelection = TRUE; + bCreateXSelection = sal_True; } else if( (CNT_GRF | CNT_OLE ) & GetCntType() ) { SelectObj( GetCharRect().Pos() ); EnterSelFrmMode(); - bCreateXSelection = TRUE; + bCreateXSelection = sal_True; } if( bCreateXSelection ) @@ -112,70 +115,67 @@ void SwWrtShell::Do( DoType eDoType, USHORT nCnt ) String SwWrtShell::GetDoString( DoType eDoType ) const { - String aStr, aUndoStr; - USHORT nResStr = STR_UNDO; + ::rtl::OUString aUndoStr; + sal_uInt16 nResStr = STR_UNDO; switch( eDoType ) { case UNDO: nResStr = STR_UNDO; - aUndoStr = GetUndoIdsStr(); + GetLastUndoInfo(& aUndoStr, 0); break; case REDO: nResStr = STR_REDO; - aUndoStr = GetRedoIdsStr(); + GetFirstRedoInfo(& aUndoStr); break; default:;//prevent warning } - aStr.Insert( String(ResId( nResStr, *SFX_APP()->GetSfxResManager())), 0 ); - aStr += aUndoStr; + ::rtl::OUStringBuffer buf = ::rtl::OUStringBuffer( String( SvtResId( nResStr ) ) ); + buf.append(aUndoStr); - return aStr; + return buf.makeStringAndClear(); } -USHORT SwWrtShell::GetDoStrings( DoType eDoType, SfxStringListItem& rStrs ) const +sal_uInt16 SwWrtShell::GetDoStrings( DoType eDoType, SfxStringListItem& rStrs ) const { - SwUndoIds aIds; + SwUndoComments_t comments; switch( eDoType ) { case UNDO: - GetUndoIds( NULL, &aIds ); + comments = GetIDocumentUndoRedo().GetUndoComments(); break; case REDO: - GetRedoIds( NULL, &aIds ); + comments = GetIDocumentUndoRedo().GetRedoComments(); break; default:;//prevent warning } - String sList; - for( USHORT n = 0, nEnd = aIds.Count(); n < nEnd; ++n ) + ::rtl::OUStringBuffer buf; + for (size_t i = 0; i < comments.size(); ++i) { - const SwUndoIdAndName& rIdNm = *aIds[ n ]; - if( rIdNm.GetUndoStr() ) - sList += *rIdNm.GetUndoStr(); - else - { + OSL_ENSURE(comments[i].getLength(), "no Undo/Redo Text set"); + buf.append(comments[i]); + buf.append(sal_Unicode('\n')); OSL_ENSURE( !this, "no Undo/Redo Test set" ); - } - sList += '\n'; } - rStrs.SetString( sList ); - return aIds.Count(); + rStrs.SetString(buf.makeStringAndClear()); + return static_cast<sal_uInt16>(comments.size()); } String SwWrtShell::GetRepeatString() const { - String aStr; - String aUndoStr = GetRepeatIdsStr(); + ::rtl::OUString str; + GetRepeatInfo(& str); - if (aUndoStr.Len() > 0) + if (str.getLength() == 0) { - aStr.Insert( ResId( STR_REPEAT, *SFX_APP()->GetSfxResManager()), 0 ); - aStr += aUndoStr; + return str; } - return aStr; + ::rtl::OUStringBuffer buf( String(SvtResId(STR_REPEAT)) ); + buf.append(str); + return buf.makeStringAndClear(); } |