summaryrefslogtreecommitdiff
path: root/sw/source/ui
diff options
context:
space:
mode:
authoros <os@openoffice.org>2011-02-15 16:01:31 +0100
committeros <os@openoffice.org>2011-02-15 16:01:31 +0100
commit49cee70700df0b4cddfe3632b34749a0093be336 (patch)
treea1c3a0228c17048a4cfafbacfc5e869e1bb2a968 /sw/source/ui
parentb3b18b10a748601d1dd2573fb5005c02a2470f22 (diff)
parent2fa791c5295f16bbc25ab33a58b9dbb1652108f7 (diff)
m100 merged
Diffstat (limited to 'sw/source/ui')
-rw-r--r--sw/source/ui/app/appenv.cxx76
-rw-r--r--sw/source/ui/app/apphdl.cxx44
-rw-r--r--sw/source/ui/app/appopt.cxx90
-rw-r--r--sw/source/ui/app/docsh.cxx167
-rw-r--r--sw/source/ui/app/docsh2.cxx275
-rw-r--r--sw/source/ui/app/docshini.cxx44
-rw-r--r--sw/source/ui/app/docst.cxx161
-rw-r--r--sw/source/ui/app/docstyle.cxx432
-rw-r--r--sw/source/ui/app/mainwn.cxx12
-rw-r--r--sw/source/ui/app/swmodul1.cxx12
-rw-r--r--sw/source/ui/app/swmodule.cxx2
-rw-r--r--sw/source/ui/app/swwait.cxx18
-rw-r--r--sw/source/ui/cctrl/actctrl.cxx12
-rw-r--r--sw/source/ui/cctrl/popbox.cxx4
-rw-r--r--sw/source/ui/cctrl/swlbox.cxx30
-rw-r--r--sw/source/ui/chrdlg/break.cxx38
-rw-r--r--sw/source/ui/chrdlg/ccoll.cxx12
-rw-r--r--sw/source/ui/chrdlg/chardlg.cxx32
-rw-r--r--sw/source/ui/chrdlg/drpcps.cxx124
-rw-r--r--sw/source/ui/chrdlg/numpara.cxx60
-rw-r--r--sw/source/ui/chrdlg/pardlg.cxx26
-rw-r--r--sw/source/ui/chrdlg/swuiccoll.cxx46
-rw-r--r--sw/source/ui/config/barcfg.cxx4
-rw-r--r--sw/source/ui/config/caption.cxx28
-rw-r--r--sw/source/ui/config/cfgitems.cxx36
-rw-r--r--sw/source/ui/config/fontcfg.cxx16
-rw-r--r--sw/source/ui/config/mailconfigpage.cxx2
-rw-r--r--sw/source/ui/config/modcfg.cxx44
-rw-r--r--sw/source/ui/config/optcomp.cxx80
-rw-r--r--sw/source/ui/config/optload.cxx112
-rw-r--r--sw/source/ui/config/optpage.cxx336
-rw-r--r--sw/source/ui/config/prtopt.cxx2
-rw-r--r--sw/source/ui/config/uinums.cxx114
-rw-r--r--sw/source/ui/config/usrpref.cxx34
-rw-r--r--sw/source/ui/config/viewopt.cxx44
-rw-r--r--sw/source/ui/dbui/addresslistdialog.cxx8
-rw-r--r--sw/source/ui/dbui/createaddresslistdialog.cxx18
-rw-r--r--sw/source/ui/dbui/customizeaddresslistdialog.cxx16
-rw-r--r--sw/source/ui/dbui/dbinsdlg.cxx210
-rw-r--r--sw/source/ui/dbui/dbmgr.cxx305
-rw-r--r--sw/source/ui/dbui/dbtree.cxx32
-rw-r--r--sw/source/ui/dbui/mailmergechildwindow.cxx4
-rw-r--r--sw/source/ui/dbui/mailmergehelper.cxx8
-rw-r--r--sw/source/ui/dbui/mmaddressblockpage.cxx64
-rw-r--r--sw/source/ui/dbui/mmaddressblockpage.hxx2
-rw-r--r--sw/source/ui/dbui/mmconfigitem.cxx12
-rw-r--r--sw/source/ui/dbui/mmdocselectpage.cxx2
-rw-r--r--sw/source/ui/dbui/mmgreetingspage.cxx20
-rw-r--r--sw/source/ui/dbui/mmlayoutpage.cxx20
-rw-r--r--sw/source/ui/dbui/mmoutputpage.cxx32
-rw-r--r--sw/source/ui/dbui/selectdbtabledialog.cxx2
-rw-r--r--sw/source/ui/dbui/swdbtoolsclient.cxx4
-rw-r--r--sw/source/ui/dialog/SwSpellDialogChildWindow.cxx38
-rw-r--r--sw/source/ui/dialog/abstract.cxx8
-rw-r--r--sw/source/ui/dialog/ascfldlg.cxx52
-rw-r--r--sw/source/ui/dialog/docstdlg.cxx14
-rw-r--r--sw/source/ui/dialog/macassgn.cxx47
-rw-r--r--sw/source/ui/dialog/regionsw.cxx44
-rw-r--r--sw/source/ui/dialog/swabstdlg.cxx2
-rw-r--r--sw/source/ui/dialog/swdlgfact.cxx108
-rw-r--r--sw/source/ui/dialog/swdlgfact.hxx112
-rw-r--r--sw/source/ui/dialog/swwrtshitem.cxx2
-rw-r--r--sw/source/ui/dialog/uiregionsw.cxx388
-rwxr-xr-x[-rw-r--r--]sw/source/ui/dochdl/gloshdl.cxx190
-rw-r--r--sw/source/ui/dochdl/swdtflvr.cxx388
-rw-r--r--sw/source/ui/docvw/AnnotationMenuButton.cxx10
-rw-r--r--sw/source/ui/docvw/AnnotationWin.cxx17
-rw-r--r--sw/source/ui/docvw/PostItMgr.cxx20
-rw-r--r--sw/source/ui/docvw/SidebarTxtControl.cxx11
-rw-r--r--sw/source/ui/docvw/SidebarTxtControlAcc.cxx2
-rw-r--r--sw/source/ui/docvw/SidebarWin.cxx30
-rw-r--r--sw/source/ui/docvw/edtdd.cxx84
-rw-r--r--sw/source/ui/docvw/edtwin.cxx892
-rw-r--r--sw/source/ui/docvw/edtwin2.cxx38
-rw-r--r--sw/source/ui/docvw/edtwin3.cxx24
-rw-r--r--sw/source/ui/docvw/romenu.cxx86
-rw-r--r--sw/source/ui/docvw/romenu.hxx8
-rw-r--r--sw/source/ui/docvw/srcedtw.cxx110
-rw-r--r--sw/source/ui/envelp/envfmt.cxx70
-rw-r--r--sw/source/ui/envelp/envfmt.hxx4
-rw-r--r--sw/source/ui/envelp/envimg.cxx14
-rw-r--r--sw/source/ui/envelp/envlop1.cxx46
-rw-r--r--sw/source/ui/envelp/envprt.cxx20
-rw-r--r--sw/source/ui/envelp/envprt.hxx2
-rw-r--r--sw/source/ui/envelp/label1.cxx8
-rw-r--r--sw/source/ui/envelp/labelcfg.cxx4
-rw-r--r--sw/source/ui/envelp/labelexp.cxx2
-rw-r--r--sw/source/ui/envelp/labfmt.cxx52
-rw-r--r--sw/source/ui/envelp/labfmt.hxx6
-rw-r--r--sw/source/ui/envelp/labimg.cxx6
-rw-r--r--sw/source/ui/envelp/labprt.cxx12
-rw-r--r--sw/source/ui/envelp/labprt.hxx2
-rw-r--r--sw/source/ui/envelp/mailmrge.cxx49
-rw-r--r--sw/source/ui/envelp/syncbtn.cxx2
-rw-r--r--sw/source/ui/fldui/DropDownFieldDialog.cxx4
-rw-r--r--sw/source/ui/fldui/changedb.cxx18
-rw-r--r--sw/source/ui/fldui/flddb.cxx78
-rw-r--r--sw/source/ui/fldui/flddb.hxx8
-rw-r--r--sw/source/ui/fldui/flddinf.cxx98
-rw-r--r--sw/source/ui/fldui/flddinf.hxx10
-rw-r--r--sw/source/ui/fldui/flddok.cxx132
-rw-r--r--sw/source/ui/fldui/flddok.hxx12
-rw-r--r--sw/source/ui/fldui/fldedt.cxx22
-rw-r--r--sw/source/ui/fldui/fldfunc.cxx130
-rw-r--r--sw/source/ui/fldui/fldfunc.hxx6
-rw-r--r--sw/source/ui/fldui/fldmgr.cxx288
-rw-r--r--sw/source/ui/fldui/fldpage.cxx46
-rw-r--r--sw/source/ui/fldui/fldpage.hxx44
-rw-r--r--sw/source/ui/fldui/fldref.cxx148
-rw-r--r--sw/source/ui/fldui/fldref.hxx6
-rw-r--r--sw/source/ui/fldui/fldtdlg.cxx28
-rw-r--r--sw/source/ui/fldui/fldvar.cxx248
-rw-r--r--sw/source/ui/fldui/fldvar.hxx16
-rw-r--r--sw/source/ui/fldui/fldwrap.cxx28
-rw-r--r--sw/source/ui/fldui/inpdlg.cxx14
-rw-r--r--sw/source/ui/fldui/javaedit.cxx14
-rw-r--r--sw/source/ui/fldui/xfldui.cxx10
-rw-r--r--sw/source/ui/fmtui/tmpdlg.cxx52
-rw-r--r--sw/source/ui/frmdlg/colex.cxx74
-rw-r--r--sw/source/ui/frmdlg/colmgr.cxx34
-rw-r--r--sw/source/ui/frmdlg/column.cxx210
-rw-r--r--sw/source/ui/frmdlg/cption.cxx8
-rw-r--r--sw/source/ui/frmdlg/frmdlg.cxx18
-rw-r--r--sw/source/ui/frmdlg/frmmgr.cxx54
-rw-r--r--sw/source/ui/frmdlg/frmpage.cxx446
-rw-r--r--sw/source/ui/frmdlg/uiborder.cxx2
-rw-r--r--sw/source/ui/frmdlg/wrap.cxx90
-rw-r--r--sw/source/ui/inc/DropDownFieldDialog.hxx2
-rw-r--r--sw/source/ui/inc/SwSpellDialogChildWindow.hxx2
-rw-r--r--sw/source/ui/inc/abstract.hxx4
-rwxr-xr-xsw/source/ui/inc/annotsh.hxx5
-rw-r--r--sw/source/ui/inc/ascfldlg.hxx2
-rw-r--r--sw/source/ui/inc/basesh.hxx4
-rw-r--r--sw/source/ui/inc/bmpwin.hxx16
-rw-r--r--sw/source/ui/inc/bookctrl.hxx4
-rw-r--r--sw/source/ui/inc/bookmark.hxx10
-rw-r--r--sw/source/ui/inc/break.hxx10
-rw-r--r--sw/source/ui/inc/caption.hxx40
-rw-r--r--sw/source/ui/inc/cfgdesc.hxx14
-rw-r--r--sw/source/ui/inc/cfgitems.hxx132
-rw-r--r--sw/source/ui/inc/chldwrap.hxx4
-rw-r--r--sw/source/ui/inc/chrdlg.hxx10
-rw-r--r--sw/source/ui/inc/cnttab.hxx8
-rw-r--r--sw/source/ui/inc/colex.hxx8
-rw-r--r--sw/source/ui/inc/colmgr.hxx44
-rw-r--r--sw/source/ui/inc/column.hxx36
-rw-r--r--sw/source/ui/inc/conarc.hxx8
-rw-r--r--sw/source/ui/inc/concustomshape.hxx6
-rw-r--r--sw/source/ui/inc/condedit.hxx8
-rw-r--r--sw/source/ui/inc/conform.hxx4
-rw-r--r--sw/source/ui/inc/conpoly.hxx8
-rw-r--r--sw/source/ui/inc/conrect.hxx10
-rw-r--r--sw/source/ui/inc/content.hxx66
-rw-r--r--sw/source/ui/inc/conttree.hxx120
-rw-r--r--sw/source/ui/inc/dbinsdlg.hxx16
-rw-r--r--sw/source/ui/inc/dbtree.hxx10
-rw-r--r--sw/source/ui/inc/docfnote.hxx2
-rw-r--r--sw/source/ui/inc/docstdlg.hxx2
-rw-r--r--sw/source/ui/inc/drawbase.hxx26
-rw-r--r--sw/source/ui/inc/drpcps.hxx12
-rw-r--r--sw/source/ui/inc/drwbassh.hxx8
-rw-r--r--sw/source/ui/inc/drwtxtsh.hxx9
-rw-r--r--sw/source/ui/inc/dselect.hxx4
-rw-r--r--sw/source/ui/inc/edtwin.hxx90
-rw-r--r--sw/source/ui/inc/envimg.hxx4
-rw-r--r--sw/source/ui/inc/envlop.hxx6
-rw-r--r--sw/source/ui/inc/fldedt.hxx4
-rw-r--r--sw/source/ui/inc/fldmgr.hxx80
-rw-r--r--sw/source/ui/inc/fldtdlg.hxx16
-rw-r--r--sw/source/ui/inc/fldwrap.hxx10
-rw-r--r--sw/source/ui/inc/fontcfg.hxx12
-rw-r--r--sw/source/ui/inc/formedt.hxx6
-rw-r--r--sw/source/ui/inc/frmdlg.hxx18
-rw-r--r--sw/source/ui/inc/frmmgr.hxx20
-rw-r--r--sw/source/ui/inc/frmpage.hxx84
-rw-r--r--sw/source/ui/inc/glosbib.hxx2
-rw-r--r--sw/source/ui/inc/glosdoc.hxx24
-rw-r--r--sw/source/ui/inc/gloshdl.hxx50
-rw-r--r--sw/source/ui/inc/gloslst.hxx16
-rw-r--r--sw/source/ui/inc/glossary.hxx12
-rw-r--r--sw/source/ui/inc/glshell.hxx4
-rw-r--r--sw/source/ui/inc/initui.hxx2
-rw-r--r--sw/source/ui/inc/inpdlg.hxx2
-rw-r--r--sw/source/ui/inc/inputwin.hxx39
-rw-r--r--sw/source/ui/inc/insfnote.hxx10
-rw-r--r--sw/source/ui/inc/insrule.hxx6
-rw-r--r--sw/source/ui/inc/instable.hxx2
-rw-r--r--sw/source/ui/inc/javaedit.hxx10
-rw-r--r--sw/source/ui/inc/label.hxx8
-rwxr-xr-xsw/source/ui/inc/langhelper.hxx8
-rw-r--r--sw/source/ui/inc/linenum.hxx2
-rw-r--r--sw/source/ui/inc/macassgn.hxx2
-rw-r--r--sw/source/ui/inc/mailconfigpage.hxx2
-rw-r--r--sw/source/ui/inc/mailmergechildwindow.hxx2
-rw-r--r--sw/source/ui/inc/mailmrge.hxx8
-rw-r--r--sw/source/ui/inc/mergetbl.hxx4
-rw-r--r--sw/source/ui/inc/mmconfigitem.hxx10
-rw-r--r--sw/source/ui/inc/multmrk.hxx2
-rw-r--r--sw/source/ui/inc/navicont.hxx8
-rw-r--r--sw/source/ui/inc/navipi.hxx36
-rw-r--r--sw/source/ui/inc/num.hxx20
-rw-r--r--sw/source/ui/inc/numberingtypelistbox.hxx4
-rw-r--r--sw/source/ui/inc/numfmtlb.hxx32
-rw-r--r--sw/source/ui/inc/numpara.hxx8
-rw-r--r--sw/source/ui/inc/numprevw.hxx10
-rw-r--r--sw/source/ui/inc/olmenu.hxx4
-rw-r--r--sw/source/ui/inc/optcomp.hxx8
-rw-r--r--sw/source/ui/inc/optload.hxx12
-rw-r--r--sw/source/ui/inc/optpage.hxx56
-rw-r--r--sw/source/ui/inc/outline.hxx16
-rw-r--r--sw/source/ui/inc/pgfnote.hxx4
-rw-r--r--sw/source/ui/inc/pggrid.hxx4
-rw-r--r--sw/source/ui/inc/prcntfld.hxx10
-rw-r--r--sw/source/ui/inc/prtopt.hxx55
-rw-r--r--sw/source/ui/inc/pview.hxx56
-rw-r--r--sw/source/ui/inc/redlndlg.hxx36
-rw-r--r--sw/source/ui/inc/regionsw.hxx22
-rw-r--r--sw/source/ui/inc/scroll.hxx24
-rw-r--r--sw/source/ui/inc/selglos.hxx8
-rw-r--r--sw/source/ui/inc/shdwcrsr.hxx10
-rw-r--r--sw/source/ui/inc/split.hxx4
-rw-r--r--sw/source/ui/inc/splittbl.hxx4
-rw-r--r--sw/source/ui/inc/srcedtw.hxx30
-rw-r--r--sw/source/ui/inc/srcview.hxx20
-rw-r--r--sw/source/ui/inc/srtdlg.hxx4
-rw-r--r--sw/source/ui/inc/swcont.hxx16
-rw-r--r--sw/source/ui/inc/swdtflvr.hxx66
-rw-r--r--sw/source/ui/inc/swlbox.hxx30
-rw-r--r--sw/source/ui/inc/swmodalredlineacceptdlg.hxx2
-rw-r--r--sw/source/ui/inc/swtablerep.hxx46
-rw-r--r--sw/source/ui/inc/swuiccoll.hxx8
-rw-r--r--sw/source/ui/inc/swuicnttab.hxx54
-rw-r--r--sw/source/ui/inc/swuiidxmrk.hxx8
-rw-r--r--sw/source/ui/inc/swuipardlg.hxx14
-rw-r--r--sw/source/ui/inc/swwrtshitem.hxx2
-rw-r--r--sw/source/ui/inc/syncbtn.hxx2
-rw-r--r--sw/source/ui/inc/tabledlg.hxx4
-rw-r--r--sw/source/ui/inc/tablemgr.hxx18
-rw-r--r--sw/source/ui/inc/tabsh.hxx4
-rw-r--r--sw/source/ui/inc/tautofmt.hxx12
-rw-r--r--sw/source/ui/inc/tblctrl.hxx2
-rw-r--r--sw/source/ui/inc/tbxanchr.hxx6
-rw-r--r--sw/source/ui/inc/textcontrolcombo.hxx10
-rw-r--r--sw/source/ui/inc/textsh.hxx2
-rw-r--r--sw/source/ui/inc/tmpdlg.hxx14
-rw-r--r--sw/source/ui/inc/tmplctrl.hxx4
-rw-r--r--sw/source/ui/inc/toxmgr.hxx104
-rw-r--r--sw/source/ui/inc/uiborder.hxx2
-rw-r--r--sw/source/ui/inc/uiitems.hxx16
-rw-r--r--sw/source/ui/inc/uinums.hxx20
-rw-r--r--sw/source/ui/inc/uitool.hxx14
-rw-r--r--sw/source/ui/inc/uivwimp.hxx2
-rw-r--r--sw/source/ui/inc/unotools.hxx2
-rw-r--r--sw/source/ui/inc/unotxvw.hxx16
-rw-r--r--sw/source/ui/inc/usrpref.hxx18
-rw-r--r--sw/source/ui/inc/view.hxx208
-rw-r--r--sw/source/ui/inc/viewlayoutctrl.hxx6
-rw-r--r--sw/source/ui/inc/workctrl.hxx28
-rw-r--r--sw/source/ui/inc/wrap.hxx30
-rw-r--r--sw/source/ui/inc/wrtsh.hxx358
-rw-r--r--sw/source/ui/inc/zoomctrl.hxx4
-rw-r--r--sw/source/ui/index/cntex.cxx12
-rw-r--r--sw/source/ui/index/cnttab.cxx80
-rw-r--r--sw/source/ui/index/multmrk.cxx4
-rw-r--r--sw/source/ui/index/swuiidxmrk.cxx61
-rw-r--r--sw/source/ui/index/toxmgr.cxx70
-rw-r--r--sw/source/ui/lingu/hhcwrp.cxx8
-rw-r--r--[-rwxr-xr-x]sw/source/ui/lingu/olmenu.cxx61
-rw-r--r--sw/source/ui/misc/bookmark.cxx42
-rw-r--r--sw/source/ui/misc/docfnote.cxx52
-rw-r--r--sw/source/ui/misc/glosbib.cxx88
-rw-r--r--sw/source/ui/misc/glosdoc.cxx14
-rw-r--r--sw/source/ui/misc/glossary.cxx22
-rw-r--r--sw/source/ui/misc/glshell.cxx36
-rw-r--r--sw/source/ui/misc/impfnote.hxx8
-rw-r--r--sw/source/ui/misc/insfnote.cxx52
-rw-r--r--sw/source/ui/misc/insrule.cxx8
-rw-r--r--sw/source/ui/misc/linenum.cxx28
-rw-r--r--sw/source/ui/misc/num.cxx164
-rw-r--r--sw/source/ui/misc/numberingtypelistbox.cxx20
-rw-r--r--sw/source/ui/misc/outline.cxx220
-rw-r--r--sw/source/ui/misc/pgfnote.cxx46
-rw-r--r--sw/source/ui/misc/pggrid.cxx18
-rw-r--r--sw/source/ui/misc/redlndlg.cxx245
-rw-r--r--sw/source/ui/misc/srtdlg.cxx82
-rw-r--r--sw/source/ui/misc/swmodalredlineacceptdlg.cxx16
-rw-r--r--sw/source/ui/ribbar/conarc.cxx18
-rw-r--r--sw/source/ui/ribbar/concustomshape.cxx8
-rw-r--r--sw/source/ui/ribbar/conform.cxx28
-rw-r--r--sw/source/ui/ribbar/conpoly.cxx18
-rw-r--r--sw/source/ui/ribbar/conrect.cxx34
-rw-r--r--sw/source/ui/ribbar/drawbase.cxx145
-rw-r--r--sw/source/ui/ribbar/dselect.cxx18
-rwxr-xr-xsw/source/ui/ribbar/inputwin.cxx170
-rw-r--r--sw/source/ui/ribbar/tblctrl.cxx4
-rw-r--r--sw/source/ui/ribbar/tbxanchr.cxx10
-rw-r--r--sw/source/ui/ribbar/workctrl.cxx108
-rwxr-xr-xsw/source/ui/shells/annotsh.cxx110
-rw-r--r--sw/source/ui/shells/basesh.cxx388
-rw-r--r--sw/source/ui/shells/beziersh.cxx30
-rw-r--r--sw/source/ui/shells/drawdlg.cxx38
-rw-r--r--sw/source/ui/shells/drawsh.cxx44
-rw-r--r--sw/source/ui/shells/drwbassh.cxx102
-rw-r--r--sw/source/ui/shells/drwtxtex.cxx30
-rw-r--r--sw/source/ui/shells/drwtxtsh.cxx84
-rw-r--r--sw/source/ui/shells/frmsh.cxx100
-rw-r--r--sw/source/ui/shells/grfsh.cxx74
-rw-r--r--sw/source/ui/shells/grfshex.cxx15
-rwxr-xr-xsw/source/ui/shells/langhelper.cxx44
-rw-r--r--sw/source/ui/shells/listsh.cxx28
-rw-r--r--sw/source/ui/shells/mediash.cxx12
-rw-r--r--sw/source/ui/shells/tabsh.cxx240
-rw-r--r--sw/source/ui/shells/textdrw.cxx2
-rw-r--r--sw/source/ui/shells/textfld.cxx144
-rw-r--r--sw/source/ui/shells/textglos.cxx26
-rw-r--r--sw/source/ui/shells/textidx.cxx26
-rw-r--r--sw/source/ui/shells/textsh.cxx145
-rw-r--r--sw/source/ui/shells/textsh1.cxx194
-rw-r--r--sw/source/ui/shells/textsh2.cxx22
-rw-r--r--sw/source/ui/shells/txtattr.cxx86
-rw-r--r--sw/source/ui/shells/txtcrsr.cxx98
-rw-r--r--sw/source/ui/shells/txtnum.cxx36
-rw-r--r--sw/source/ui/smartmenu/stmenu.cxx14
-rw-r--r--sw/source/ui/table/chartins.cxx10
-rw-r--r--sw/source/ui/table/colwd.cxx12
-rw-r--r--sw/source/ui/table/convert.cxx24
-rw-r--r--sw/source/ui/table/instable.cxx16
-rw-r--r--sw/source/ui/table/mergetbl.cxx2
-rw-r--r--sw/source/ui/table/swtablerep.cxx38
-rw-r--r--sw/source/ui/table/tabledlg.cxx364
-rw-r--r--sw/source/ui/table/tablemgr.cxx48
-rw-r--r--sw/source/ui/table/tablepg.hxx40
-rw-r--r--sw/source/ui/table/tautofmt.cxx118
-rw-r--r--sw/source/ui/uiview/formatclipboard.cxx56
-rw-r--r--sw/source/ui/uiview/pview.cxx252
-rw-r--r--sw/source/ui/uiview/scroll.cxx26
-rw-r--r--sw/source/ui/uiview/srcview.cxx118
-rw-r--r--sw/source/ui/uiview/swcli.cxx6
-rw-r--r--sw/source/ui/uiview/uivwimp.cxx14
-rw-r--r--sw/source/ui/uiview/view.cxx74
-rw-r--r--sw/source/ui/uiview/view0.cxx18
-rw-r--r--sw/source/ui/uiview/view1.cxx20
-rw-r--r--sw/source/ui/uiview/view2.cxx306
-rw-r--r--sw/source/ui/uiview/viewcoll.cxx8
-rw-r--r--sw/source/ui/uiview/viewdlg.cxx12
-rw-r--r--sw/source/ui/uiview/viewdlg2.cxx20
-rw-r--r--sw/source/ui/uiview/viewdraw.cxx8
-rw-r--r--sw/source/ui/uiview/viewfunc.hxx10
-rwxr-xr-x[-rw-r--r--]sw/source/ui/uiview/viewling.cxx6
-rw-r--r--sw/source/ui/uiview/viewmdi.cxx70
-rw-r--r--sw/source/ui/uiview/viewport.cxx242
-rw-r--r--sw/source/ui/uiview/viewprt.cxx46
-rw-r--r--sw/source/ui/uiview/viewsrch.cxx143
-rw-r--r--sw/source/ui/uiview/viewstat.cxx19
-rw-r--r--sw/source/ui/uiview/viewtab.cxx376
-rw-r--r--sw/source/ui/uno/SwXDocumentSettings.cxx10
-rw-r--r--sw/source/ui/uno/swdet2.cxx6
-rw-r--r--sw/source/ui/uno/swdetect.cxx18
-rw-r--r--sw/source/ui/uno/swdetect.hxx4
-rw-r--r--sw/source/ui/uno/unoatxt.cxx26
-rw-r--r--sw/source/ui/uno/unomailmerge.cxx41
-rw-r--r--sw/source/ui/uno/unomod.cxx46
-rw-r--r--sw/source/ui/uno/unotxdoc.cxx174
-rw-r--r--sw/source/ui/uno/unotxvw.cxx28
-rw-r--r--sw/source/ui/utlui/attrdesc.cxx38
-rw-r--r--sw/source/ui/utlui/bookctrl.cxx18
-rw-r--r--sw/source/ui/utlui/condedit.cxx2
-rw-r--r--sw/source/ui/utlui/content.cxx52
-rw-r--r--sw/source/ui/utlui/glbltree.cxx230
-rw-r--r--sw/source/ui/utlui/gloslst.cxx76
-rw-r--r--sw/source/ui/utlui/initui.cxx18
-rw-r--r--sw/source/ui/utlui/navicfg.cxx4
-rw-r--r--sw/source/ui/utlui/navipi.cxx182
-rw-r--r--sw/source/ui/utlui/numfmtlb.cxx80
-rw-r--r--sw/source/ui/utlui/prcntfld.cxx10
-rw-r--r--sw/source/ui/utlui/shdwcrsr.cxx10
-rw-r--r--sw/source/ui/utlui/textcontrolcombo.cxx6
-rw-r--r--sw/source/ui/utlui/tmplctrl.cxx14
-rw-r--r--sw/source/ui/utlui/uiitems.cxx24
-rw-r--r--sw/source/ui/utlui/uitool.cxx104
-rw-r--r--sw/source/ui/utlui/unotools.cxx8
-rw-r--r--sw/source/ui/utlui/viewlayoutctrl.cxx14
-rw-r--r--sw/source/ui/utlui/zoomctrl.cxx6
-rw-r--r--sw/source/ui/vba/vbadocumentproperties.cxx2
-rw-r--r--sw/source/ui/vba/vbafield.cxx10
-rw-r--r--sw/source/ui/vba/vbaselection.cxx2
-rw-r--r--sw/source/ui/web/wview.cxx22
-rw-r--r--sw/source/ui/wrtsh/delete.cxx36
-rw-r--r--sw/source/ui/wrtsh/move.cxx180
-rw-r--r--sw/source/ui/wrtsh/select.cxx238
-rw-r--r--sw/source/ui/wrtsh/wrtsh1.cxx153
-rw-r--r--sw/source/ui/wrtsh/wrtsh2.cxx93
-rw-r--r--sw/source/ui/wrtsh/wrtsh3.cxx16
-rw-r--r--sw/source/ui/wrtsh/wrtsh4.cxx60
-rw-r--r--sw/source/ui/wrtsh/wrtundo.cxx69
395 files changed, 10113 insertions, 10345 deletions
diff --git a/sw/source/ui/app/appenv.cxx b/sw/source/ui/app/appenv.cxx
index b66be1e2a9..e850be37b3 100644
--- a/sw/source/ui/app/appenv.cxx
+++ b/sw/source/ui/app/appenv.cxx
@@ -105,16 +105,16 @@ String InsertLabEnvText( SwWrtShell& rSh, SwFldMgr& rFldMgr, const String& rText
aText.EraseAllChars( '\r' );
- USHORT nTokenPos = 0;
+ sal_uInt16 nTokenPos = 0;
while( STRING_NOTFOUND != nTokenPos )
{
String aLine = aText.GetToken( 0, '\n', nTokenPos );
while ( aLine.Len() )
{
String sTmpText;
- BOOL bField = FALSE;
+ sal_Bool bField = sal_False;
- USHORT nPos = aLine.Search( '<' );
+ sal_uInt16 nPos = aLine.Search( '<' );
if ( nPos )
{
sTmpText = aLine.Copy( 0, nPos );
@@ -138,14 +138,14 @@ String InsertLabEnvText( SwWrtShell& rSh, SwFldMgr& rFldMgr, const String& rText
// Datenbankfelder muesen mind. 3 Punkte beinhalten!
String sDBName( sTmpText.Copy( 1, sTmpText.Len() - 2));
- USHORT nCnt = sDBName.GetTokenCount('.');
+ sal_uInt16 nCnt = sDBName.GetTokenCount('.');
if (nCnt >= 3)
{
- ::ReplacePoint(sDBName, TRUE);
+ ::ReplacePoint(sDBName, sal_True);
SwInsertFld_Data aData(TYP_DBFLD, 0, sDBName, aEmptyStr, 0, &rSh );
rFldMgr.InsertFld( aData );
sRet = sDBName;
- bField = TRUE;
+ bField = sal_True;
}
}
}
@@ -162,11 +162,11 @@ String InsertLabEnvText( SwWrtShell& rSh, SwFldMgr& rFldMgr, const String& rText
// ----------------------------------------------------------------------------
-void lcl_CopyCollAttr(SwWrtShell* pOldSh, SwWrtShell* pNewSh, USHORT nCollId)
+void lcl_CopyCollAttr(SwWrtShell* pOldSh, SwWrtShell* pNewSh, sal_uInt16 nCollId)
{
- USHORT nCollCnt = pOldSh->GetTxtFmtCollCount();
+ sal_uInt16 nCollCnt = pOldSh->GetTxtFmtCollCount();
SwTxtFmtColl* pColl;
- for( USHORT nCnt = 0; nCnt < nCollCnt; ++nCnt )
+ for( sal_uInt16 nCnt = 0; nCnt < nCollCnt; ++nCnt )
if(nCollId == (pColl = &pOldSh->GetTxtFmtColl(nCnt))->GetPoolFmtId())
pNewSh->GetTxtCollFromPool(nCollId)->SetFmtAttr(pColl->GetAttrSet());
}
@@ -176,7 +176,7 @@ void lcl_CopyCollAttr(SwWrtShell* pOldSh, SwWrtShell* pNewSh, USHORT nCollId)
void SwModule::InsertEnv( SfxRequest& rReq )
{
-static USHORT nTitleNo = 0;
+static sal_uInt16 nTitleNo = 0;
SwDocShell *pMyDocSh;
SfxViewFrame *pFrame;
@@ -212,7 +212,7 @@ static USHORT nTitleNo = 0;
SwEnvCfgItem aEnvCfg;
//Haben wir schon einen Briefumschlag.
- BOOL bEnvChange = FALSE;
+ sal_Bool bEnvChange = sal_False;
SfxItemSet aSet(GetPool(), FN_ENVELOP, FN_ENVELOP, 0);
aSet.Put(aEnvCfg.GetItem());
@@ -260,7 +260,7 @@ static USHORT nTitleNo = 0;
if (nMode == ENV_NEWDOC || nMode == ENV_INSERT)
{
- SwWait aWait( (SwDocShell&)*xDocSh, TRUE );
+ SwWait aWait( (SwDocShell&)*xDocSh, sal_True );
// Dialog auslesen, Item in Config speichern
const SwEnvItem& rItem = pItem ? *pItem : (const SwEnvItem&) pDlg->GetOutputItemSet()->Get(FN_ENVELOP);
@@ -275,7 +275,7 @@ static USHORT nTitleNo = 0;
{
ASSERT(pOldSh, "Kein Dokument - war 'Einfuegen' nicht disabled???");
SvxPaperBinItem aItem( RES_PAPER_BIN );
- aItem.SetValue((BYTE)pSh->getIDocumentDeviceAccess()->getPrinter(true)->GetPaperBin());
+ aItem.SetValue((sal_uInt8)pSh->getIDocumentDeviceAccess()->getPrinter(true)->GetPaperBin());
pOldSh->GetPageDescFromPool(RES_POOLPAGE_JAKET)->GetMaster().SetFmtAttr(aItem);
}
@@ -300,7 +300,7 @@ static USHORT nTitleNo = 0;
// Los geht's (Einfuegen)
pSh->StartUndo(UNDO_UI_INSERT_ENVELOPE, NULL);
pSh->StartAllAction();
- pSh->SttEndDoc(TRUE);
+ pSh->SttEndDoc(sal_True);
if (bEnvChange)
{
@@ -308,8 +308,8 @@ static USHORT nTitleNo = 0;
pFollow = pSh->GetPageDesc(pSh->GetCurPageDesc()).GetFollow();
// Text der ersten Seite loeschen
- if ( !pSh->SttNxtPg(TRUE) )
- pSh->EndPg(TRUE);
+ if ( !pSh->SttNxtPg(sal_True) )
+ pSh->EndPg(sal_True);
pSh->DelRight();
// Rahmen der ersten Seite loeschen
if( pSh->GotoFly( rSendMark ) )
@@ -322,7 +322,7 @@ static USHORT nTitleNo = 0;
pSh->EnterSelFrmMode();
pSh->DelRight();
}
- pSh->SttEndDoc(TRUE);
+ pSh->SttEndDoc(sal_True);
}
else
// Folgevorlage: Seite 1
@@ -332,21 +332,21 @@ static USHORT nTitleNo = 0;
if ( pSh->IsCrsrInTbl() )
{
pSh->SplitNode();
- pSh->Right( CRSR_SKIP_CHARS, FALSE, 1, FALSE );
+ pSh->Right( CRSR_SKIP_CHARS, sal_False, 1, sal_False );
SfxItemSet aBreakSet( pSh->GetAttrPool(), RES_BREAK, RES_BREAK, 0 );
aBreakSet.Put( SvxFmtBreakItem(SVX_BREAK_PAGE_BEFORE, RES_BREAK) );
pSh->SetTblAttr( aBreakSet );
}
else
- pSh->InsertPageBreak(0, FALSE);
- pSh->SttEndDoc(TRUE);
+ pSh->InsertPageBreak(0, sal_False);
+ pSh->SttEndDoc(sal_True);
}
else
{
pFollow = &pSh->GetPageDesc(pSh->GetCurPageDesc());
// Los geht's (Drucken)
pSh->StartAllAction();
- pSh->DoUndo(FALSE);
+ pSh->DoUndo(sal_False);
// Neue Collections "Absender" und "Empfaenger" wieder in neues
// Dokument kopieren
@@ -383,8 +383,8 @@ static USHORT nTitleNo = 0;
long lLeft = rItem.lShiftRight,
lUpper = rItem.lShiftDown;
- USHORT nPageW = (USHORT) Max(rItem.lWidth, rItem.lHeight),
- nPageH = (USHORT) Min(rItem.lWidth, rItem.lHeight);
+ sal_uInt16 nPageW = (sal_uInt16) Max(rItem.lWidth, rItem.lHeight),
+ nPageH = (sal_uInt16) Min(rItem.lWidth, rItem.lHeight);
switch (rItem.eAlign)
{
@@ -401,18 +401,18 @@ static USHORT nTitleNo = 0;
}
SvxLRSpaceItem aLRMargin( RES_LR_SPACE );
SvxULSpaceItem aULMargin( RES_UL_SPACE );
- aLRMargin.SetLeft ((USHORT) lLeft );
- aULMargin.SetUpper((USHORT) lUpper);
+ aLRMargin.SetLeft ((sal_uInt16) lLeft );
+ aULMargin.SetUpper((sal_uInt16) lUpper);
aLRMargin.SetRight(0);
aULMargin.SetLower(0);
rFmt.SetFmtAttr(aLRMargin);
rFmt.SetFmtAttr(aULMargin);
// Kopf-, Fusszeilen
- rFmt.SetFmtAttr(SwFmtHeader(BOOL(FALSE)));
- pDesc->ChgHeaderShare(FALSE);
- rFmt.SetFmtAttr(SwFmtFooter(BOOL(FALSE)));
- pDesc->ChgFooterShare(FALSE);
+ rFmt.SetFmtAttr(SwFmtHeader(sal_Bool(sal_False)));
+ pDesc->ChgHeaderShare(sal_False);
+ rFmt.SetFmtAttr(SwFmtFooter(sal_Bool(sal_False)));
+ pDesc->ChgFooterShare(sal_False);
// Seitennumerierung
pDesc->SetUseOn(nsUseOnPage::PD_ALL);
@@ -436,9 +436,9 @@ static USHORT nTitleNo = 0;
// Page-Desc anwenden
- USHORT nPos;
+ sal_uInt16 nPos;
pSh->FindPageDescByName( pDesc->GetName(),
- FALSE,
+ sal_False,
&nPos );
@@ -446,7 +446,7 @@ static USHORT nTitleNo = 0;
pSh->ChgCurPageDesc(*pDesc);
// Rahmen einfuegen
- SwFlyFrmAttrMgr aMgr(FALSE, pSh, FRMMGR_TYPE_ENVELP);
+ SwFlyFrmAttrMgr aMgr(sal_False, pSh, FRMMGR_TYPE_ENVELP);
SwFldMgr aFldMgr;
aMgr.SetHeightSizeType(ATT_VAR_SIZE);
@@ -458,7 +458,7 @@ static USHORT nTitleNo = 0;
// Absender
if (rItem.bSend)
{
- pSh->SttEndDoc(TRUE);
+ pSh->SttEndDoc(sal_True);
aMgr.InsertFlyFrm(FLY_AT_PAGE,
Point(rItem.lSendFromLeft + lLeft, rItem.lSendFromTop + lUpper),
Size (rItem.lAddrFromLeft - rItem.lSendFromLeft, 0));
@@ -473,7 +473,7 @@ static USHORT nTitleNo = 0;
}
// Empfaenger
- pSh->SttEndDoc(TRUE);
+ pSh->SttEndDoc(sal_True);
aMgr.InsertFlyFrm(FLY_AT_PAGE,
Point(rItem.lAddrFromLeft + lLeft, rItem.lAddrFromTop + lUpper),
@@ -490,12 +490,12 @@ static USHORT nTitleNo = 0;
pSh->SetPageObjsNewPage(aFlyArr, 1);
// Fertig
- pSh->SttEndDoc(TRUE);
+ pSh->SttEndDoc(sal_True);
pSh->EndAllAction();
if (nMode == ENV_NEWDOC)
- pSh->DoUndo(TRUE);
+ pSh->DoUndo(sal_True);
else
pSh->EndUndo(UNDO_UI_INSERT_ENVELOPE);
@@ -505,7 +505,7 @@ static USHORT nTitleNo = 0;
if ( rItem.aAddrText.indexOf('<') >= 0 )
{
- static USHORT __READONLY_DATA aInva[] =
+ static sal_uInt16 __READONLY_DATA aInva[] =
{
SID_SBA_BRW_UPDATE,
SID_SBA_BRW_INSERT,
@@ -523,7 +523,7 @@ static USHORT nTitleNo = 0;
{
rReq.AppendItem( rItem );
if ( nMode == ENV_NEWDOC )
- rReq.AppendItem( SfxBoolItem( FN_PARAM_1, TRUE ) );
+ rReq.AppendItem( SfxBoolItem( FN_PARAM_1, sal_True ) );
}
rReq.Done();
diff --git a/sw/source/ui/app/apphdl.cxx b/sw/source/ui/app/apphdl.cxx
index 1ff2c23921..520205976e 100644
--- a/sw/source/ui/app/apphdl.cxx
+++ b/sw/source/ui/app/apphdl.cxx
@@ -27,6 +27,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
+
#include <hintids.hxx>
#include <tools/urlobj.hxx>
@@ -71,9 +72,7 @@
#include <srcview.hxx>
#include <wrtsh.hxx>
#include <docsh.hxx>
-#ifndef _CMDID_H
#include <cmdid.h> // Funktion-Ids
-#endif
#include <initui.hxx>
#include <uitool.hxx>
#include <swmodule.hxx>
@@ -83,13 +82,12 @@
#include <gloslst.hxx> // SwGlossaryList
#include <glosdoc.hxx> // SwGlossaryList
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <cfgitems.hxx>
#include <prtopt.hxx>
#include <modcfg.hxx>
#include <globals.h> // globale Konstanten z.B.
-#ifndef _APP_HRC
#include <app.hrc>
-#endif
#include <fontcfg.hxx>
#include <barcfg.hxx>
#include <uinums.hxx>
@@ -201,7 +199,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->
@@ -224,7 +222,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,
@@ -336,7 +334,7 @@ void SwMailMergeWizardExecutor::ExecuteMailMergeWizard( const SfxItemSet * pArgs
m_pMMConfig->SetSourceView( m_pView );
m_pView->SetMailMergeConfigItem(0, 0, sal_True);
SfxViewFrame* pViewFrame = m_pView->GetViewFrame();
- pViewFrame->ShowChildWindow(FN_MAILMERGE_CHILDWINDOW, FALSE);
+ pViewFrame->ShowChildWindow(FN_MAILMERGE_CHILDWINDOW, sal_False);
DBG_ASSERT(m_pMMConfig, "no MailMergeConfigItem available");
bRestoreWizard = true;
}
@@ -749,7 +747,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);
@@ -797,26 +795,22 @@ 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_Int32 const nNew = GetUndoOptions().GetUndoCount();
+ bool const bUndo = (nNew != 0);
+ // switch Undo for all DocShells
+ TypeId aType(TYPE(SwDocShell));
+ SwDocShell * pDocShell =
+ static_cast<SwDocShell *>(SfxObjectShell::GetFirst(&aType));
+ while (pDocShell)
{
- sal_Bool bUndo = nNew != 0;
- //ueber DocShells iterieren und Undo umschalten
-
- TypeId aType(TYPE(SwDocShell));
- SwDocShell* pDocShell = (SwDocShell*)SfxObjectShell::GetFirst(&aType);
- while( pDocShell )
- {
- pDocShell->GetDoc()->DoUndo( bUndo );
- pDocShell = (SwDocShell*)SfxObjectShell::GetNext(*pDocShell, &aType);
- }
+ 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 )
{
@@ -951,11 +945,11 @@ const SwMasterUsrPref *SwModule::GetUsrPref(sal_Bool bWeb) const
{
// im Load der SwMasterUsrPref wird der SpellChecker gebraucht, dort darf
// er aber nicht angelegt werden #58256#
- pNonConstModule->pWebUsrPref = new SwMasterUsrPref(TRUE);
+ pNonConstModule->pWebUsrPref = new SwMasterUsrPref(sal_True);
}
else if(!bWeb && !pUsrPref)
{
- pNonConstModule->pUsrPref = new SwMasterUsrPref(FALSE);
+ pNonConstModule->pUsrPref = new SwMasterUsrPref(sal_False);
}
return bWeb ? pWebUsrPref : pUsrPref;
}
diff --git a/sw/source/ui/app/appopt.cxx b/sw/source/ui/app/appopt.cxx
index ae6e4720b2..40cfb6b9e1 100644
--- a/sw/source/ui/app/appopt.cxx
+++ b/sw/source/ui/app/appopt.cxx
@@ -86,9 +86,9 @@ using namespace ::com::sun::star::lang;
*
* --------------------------------------------------*/
-SfxItemSet* SwModule::CreateItemSet( USHORT nId )
+SfxItemSet* SwModule::CreateItemSet( sal_uInt16 nId )
{
- BOOL bTextDialog = (nId == SID_SW_EDITOPTIONS) ? TRUE : FALSE;
+ sal_Bool bTextDialog = (nId == SID_SW_EDITOPTIONS) ? sal_True : sal_False;
// hier werden die Optionen fuer die Web- und den Textdialog zusmmengesetzt
SwViewOption aViewOpt = *GetUsrPref(!bTextDialog);
@@ -100,7 +100,7 @@ SfxItemSet* SwModule::CreateItemSet( USHORT nId )
if(pAppView)
{
// wenn Text dann nicht WebView und umgekehrt
- BOOL bWebView = 0 != PTR_CAST(SwWebView, pAppView);
+ sal_Bool bWebView = 0 != PTR_CAST(SwWebView, pAppView);
if( (bWebView && !bTextDialog) ||(!bWebView && bTextDialog))
{
aViewOpt = *pAppView->GetWrtShell().GetViewOptions();
@@ -197,20 +197,20 @@ SfxItemSet* SwModule::CreateItemSet( USHORT nId )
pRet->Put(SwPtrItem(FN_PARAM_STDFONTS, GetStdFontConfig()));
if( PTR_CAST( SwPagePreView, SfxViewShell::Current())!=0)
{
- SfxBoolItem aBool(SfxBoolItem(SID_PRINTPREVIEW, TRUE));
+ SfxBoolItem aBool(SfxBoolItem(SID_PRINTPREVIEW, sal_True));
pRet->Put(aBool);
}
FieldUnit eUnit = pPref->GetHScrollMetric();
if(pAppView)
pAppView->GetHLinealMetric(eUnit);
- pRet->Put(SfxUInt16Item( FN_HSCROLL_METRIC, static_cast< UINT16 >(eUnit)));
+ pRet->Put(SfxUInt16Item( FN_HSCROLL_METRIC, static_cast< sal_uInt16 >(eUnit)));
eUnit = pPref->GetVScrollMetric();
if(pAppView)
pAppView->GetVLinealMetric(eUnit);
- pRet->Put(SfxUInt16Item( FN_VSCROLL_METRIC, static_cast< UINT16 >(eUnit) ));
- pRet->Put(SfxUInt16Item( SID_ATTR_METRIC, static_cast< UINT16 >(pPref->GetMetric()) ));
+ pRet->Put(SfxUInt16Item( FN_VSCROLL_METRIC, static_cast< sal_uInt16 >(eUnit) ));
+ pRet->Put(SfxUInt16Item( SID_ATTR_METRIC, static_cast< sal_uInt16 >(pPref->GetMetric()) ));
if(bTextDialog)
{
if(pAppView)
@@ -218,10 +218,10 @@ SfxItemSet* SwModule::CreateItemSet( USHORT nId )
const SvxTabStopItem& rDefTabs =
(const SvxTabStopItem&)pAppView->GetWrtShell().
GetDefault(RES_PARATR_TABSTOP);
- pRet->Put( SfxUInt16Item( SID_ATTR_DEFTABSTOP, (USHORT)::GetTabDist(rDefTabs)));
+ pRet->Put( SfxUInt16Item( SID_ATTR_DEFTABSTOP, (sal_uInt16)::GetTabDist(rDefTabs)));
}
else
- pRet->Put(SfxUInt16Item( SID_ATTR_DEFTABSTOP, (UINT16)pPref->GetDefTab()));
+ pRet->Put(SfxUInt16Item( SID_ATTR_DEFTABSTOP, (sal_uInt16)pPref->GetDefTab()));
}
/*-----------------01.02.97 11.13-------------------
@@ -235,8 +235,8 @@ SfxItemSet* SwModule::CreateItemSet( USHORT nId )
aGridItem.SetGridVisible( aViewOpt.IsGridVisible());
const Size& rSnapSize = aViewOpt.GetSnapSize();
- aGridItem.SetFldDrawX( (USHORT) (rSnapSize.Width() ));
- aGridItem.SetFldDrawY( (USHORT) (rSnapSize.Height()));
+ aGridItem.SetFldDrawX( (sal_uInt16) (rSnapSize.Width() ));
+ aGridItem.SetFldDrawY( (sal_uInt16) (rSnapSize.Height()));
aGridItem.SetFldDivisionX( aViewOpt.GetDivisionX());
aGridItem.SetFldDivisionY( aViewOpt.GetDivisionY());
@@ -246,8 +246,8 @@ SfxItemSet* SwModule::CreateItemSet( USHORT nId )
/*-----------------01.02.97 13.02-------------------
Optionen fuer PrintTabPage
--------------------------------------------------*/
- SwPrintData* pOpt = pAppView ?
- pAppView->GetWrtShell().getIDocumentDeviceAccess()->getPrintData() :
+ const SwPrintData* pOpt = pAppView ?
+ &pAppView->GetWrtShell().getIDocumentDeviceAccess()->getPrintData() :
0;
if(!pOpt)
@@ -292,16 +292,16 @@ SfxItemSet* SwModule::CreateItemSet( USHORT nId )
/* -----------------12.02.99 12:28-------------------
*
* --------------------------------------------------*/
-void SwModule::ApplyItemSet( USHORT nId, const SfxItemSet& rSet )
+void SwModule::ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet )
{
- BOOL bTextDialog = nId == SID_SW_EDITOPTIONS;
+ sal_Bool bTextDialog = nId == SID_SW_EDITOPTIONS;
SwView* pAppView = GetView();
if(pAppView && pAppView->GetViewFrame() != SfxViewFrame::Current())
pAppView = 0;
if(pAppView)
{
// the text dialog mustn't apply data to the web view and vice versa
- BOOL bWebView = 0 != PTR_CAST(SwWebView, pAppView);
+ sal_Bool bWebView = 0 != PTR_CAST(SwWebView, pAppView);
if( (bWebView == bTextDialog))
pAppView = 0; //
}
@@ -316,18 +316,18 @@ void SwModule::ApplyItemSet( USHORT nId, const SfxItemSet& rSet )
/*---------------------------------------------------------------------
Seite Dokumentansicht auswerten
-----------------------------------------------------------------------*/
- if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_DOCDISP, FALSE, &pItem ))
+ if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_DOCDISP, sal_False, &pItem ))
{
const SwDocDisplayItem* pDocDispItem = (const SwDocDisplayItem*)pItem;
if(!aViewOpt.IsViewMetaChars())
{
- if( (!aViewOpt.IsTab( TRUE ) && pDocDispItem->bTab) ||
- (!aViewOpt.IsBlank( TRUE ) && pDocDispItem->bSpace) ||
- (!aViewOpt.IsParagraph( TRUE ) && pDocDispItem->bParagraphEnd) ||
- (!aViewOpt.IsLineBreak( TRUE ) && pDocDispItem->bManualBreak) )
+ if( (!aViewOpt.IsTab( sal_True ) && pDocDispItem->bTab) ||
+ (!aViewOpt.IsBlank( sal_True ) && pDocDispItem->bSpace) ||
+ (!aViewOpt.IsParagraph( sal_True ) && pDocDispItem->bParagraphEnd) ||
+ (!aViewOpt.IsLineBreak( sal_True ) && pDocDispItem->bManualBreak) )
{
- aViewOpt.SetViewMetaChars(TRUE);
+ aViewOpt.SetViewMetaChars(sal_True);
if(pBindings)
pBindings->Invalidate(FN_VIEW_META_CHARS);
}
@@ -345,20 +345,20 @@ void SwModule::ApplyItemSet( USHORT nId, const SfxItemSet& rSet )
Elemente - Item auswerten
-----------------------------------------------------------------------*/
- if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_ELEM, FALSE, &pItem ) )
+ if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_ELEM, sal_False, &pItem ) )
{
const SwElemItem* pElemItem = (const SwElemItem*)pItem;
pElemItem->FillViewOptions( aViewOpt );
}
- if( SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_METRIC, FALSE, &pItem ) )
+ if( SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_METRIC, sal_False, &pItem ) )
{
SFX_APP()->SetOptions(rSet);
const SfxUInt16Item* pMetricItem = (const SfxUInt16Item*)pItem;
::SetDfltMetric((FieldUnit)pMetricItem->GetValue(), !bTextDialog);
}
- if( SFX_ITEM_SET == rSet.GetItemState(FN_HSCROLL_METRIC, FALSE, &pItem ) )
+ if( SFX_ITEM_SET == rSet.GetItemState(FN_HSCROLL_METRIC, sal_False, &pItem ) )
{
const SfxUInt16Item* pMetricItem = (const SfxUInt16Item*)pItem;
FieldUnit eUnit = (FieldUnit)pMetricItem->GetValue();
@@ -367,7 +367,7 @@ void SwModule::ApplyItemSet( USHORT nId, const SfxItemSet& rSet )
pAppView->ChangeTabMetric(eUnit);
}
- if( SFX_ITEM_SET == rSet.GetItemState(FN_VSCROLL_METRIC, FALSE, &pItem ) )
+ if( SFX_ITEM_SET == rSet.GetItemState(FN_VSCROLL_METRIC, sal_False, &pItem ) )
{
const SfxUInt16Item* pMetricItem = (const SfxUInt16Item*)pItem;
FieldUnit eUnit = (FieldUnit)pMetricItem->GetValue();
@@ -376,9 +376,9 @@ void SwModule::ApplyItemSet( USHORT nId, const SfxItemSet& rSet )
pAppView->ChangeVLinealMetric(eUnit);
}
- if( SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_DEFTABSTOP, FALSE, &pItem ) )
+ if( SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_DEFTABSTOP, sal_False, &pItem ) )
{
- USHORT nTabDist = ((const SfxUInt16Item*)pItem)->GetValue();
+ sal_uInt16 nTabDist = ((const SfxUInt16Item*)pItem)->GetValue();
pPref->SetDefTab(nTabDist);
if(pAppView)
{
@@ -403,7 +403,7 @@ void SwModule::ApplyItemSet( USHORT nId, const SfxItemSet& rSet )
Seite Rastereinstellungen auswerten
----------------------------------------------------------------------*/
- if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_GRID_OPTIONS, FALSE, &pItem ))
+ if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_GRID_OPTIONS, sal_False, &pItem ))
{
const SvxGridItem* pGridItem = (const SvxGridItem*)pItem;
@@ -433,7 +433,7 @@ void SwModule::ApplyItemSet( USHORT nId, const SfxItemSet& rSet )
// Writer Drucker Zusatzeinstellungen auswerten
//----------------------------------------------------------------------------
- if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_ADDPRINTER, FALSE, &pItem ))
+ if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_ADDPRINTER, sal_False, &pItem ))
{
SwPrintOptions* pOpt = GetPrtOptions(!bTextDialog);
if (pOpt)
@@ -447,7 +447,7 @@ void SwModule::ApplyItemSet( USHORT nId, const SfxItemSet& rSet )
}
- if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_SHADOWCURSOR, FALSE, &pItem ))
+ if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_SHADOWCURSOR, sal_False, &pItem ))
{
((SwShadowCursorItem*)pItem)->FillViewOptions( aViewOpt );
if(pBindings)
@@ -465,7 +465,7 @@ void SwModule::ApplyItemSet( USHORT nId, const SfxItemSet& rSet )
rWrtSh.AlignAllFormulasToBaseline();
}
- if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_CRSR_IN_PROTECTED, FALSE, &pItem ))
+ if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_CRSR_IN_PROTECTED, sal_False, &pItem ))
{
aViewOpt.SetCursorInProtectedArea(((const SfxBoolItem*)pItem)->GetValue());
}
@@ -477,19 +477,19 @@ void SwModule::ApplyItemSet( USHORT nId, const SfxItemSet& rSet )
----------------------------------------------------------------------------*/
if( SFX_ITEM_SET == rSet.GetItemState(
- FN_PARAM_SWTEST, FALSE, &pItem ))
+ FN_PARAM_SWTEST, sal_False, &pItem ))
{
const SwTestItem* pTestItem = (const SwTestItem*)pItem;
- aViewOpt.SetTest1((BOOL)pTestItem->bTest1);
- aViewOpt.SetTest2((BOOL)pTestItem->bTest2);
- aViewOpt.SetTest3((BOOL)pTestItem->bTest3);
- aViewOpt.SetTest4((BOOL)pTestItem->bTest4);
- aViewOpt.SetTest5((BOOL)pTestItem->bTest5);
- aViewOpt.SetTest6((BOOL)pTestItem->bTest6);
- aViewOpt.SetTest7((BOOL)pTestItem->bTest7);
- aViewOpt.SetTest8((BOOL)pTestItem->bTest8);
- SwViewOption::SetTest9((BOOL)pTestItem->bTest9);
- aViewOpt.SetTest10((BOOL)pTestItem->bTest10);
+ aViewOpt.SetTest1((sal_Bool)pTestItem->bTest1);
+ aViewOpt.SetTest2((sal_Bool)pTestItem->bTest2);
+ aViewOpt.SetTest3((sal_Bool)pTestItem->bTest3);
+ aViewOpt.SetTest4((sal_Bool)pTestItem->bTest4);
+ aViewOpt.SetTest5((sal_Bool)pTestItem->bTest5);
+ aViewOpt.SetTest6((sal_Bool)pTestItem->bTest6);
+ aViewOpt.SetTest7((sal_Bool)pTestItem->bTest7);
+ aViewOpt.SetTest8((sal_Bool)pTestItem->bTest8);
+ SwViewOption::SetTest9((sal_Bool)pTestItem->bTest9);
+ aViewOpt.SetTest10((sal_Bool)pTestItem->bTest10);
}
#endif
// dann an der akt. View und Shell die entsp. Elemente setzen
@@ -498,7 +498,7 @@ void SwModule::ApplyItemSet( USHORT nId, const SfxItemSet& rSet )
/* -----------------12.02.99 12:28-------------------
*
* --------------------------------------------------*/
-SfxTabPage* SwModule::CreateTabPage( USHORT nId, Window* pParent, const SfxItemSet& rSet )
+SfxTabPage* SwModule::CreateTabPage( sal_uInt16 nId, Window* pParent, const SfxItemSet& rSet )
{
SfxTabPage* pRet = NULL;
SfxAllItemSet aSet(*(rSet.GetPool()));
@@ -567,7 +567,7 @@ SfxTabPage* SwModule::CreateTabPage( USHORT nId, Window* pParent, const SfxItemS
if(pCurrView)
{
// wenn Text dann nicht WebView und umgekehrt
- BOOL bWebView = 0 != PTR_CAST(SwWebView, pCurrView);
+ sal_Bool bWebView = 0 != PTR_CAST(SwWebView, pCurrView);
if( (bWebView && RID_SW_TP_HTML_OPTTABLE_PAGE == nId) ||
(!bWebView && RID_SW_TP_HTML_OPTTABLE_PAGE != nId) )
{
diff --git a/sw/source/ui/app/docsh.cxx b/sw/source/ui/app/docsh.cxx
index 2fc2301431..794b6032b7 100644
--- a/sw/source/ui/app/docsh.cxx
+++ b/sw/source/ui/app/docsh.cxx
@@ -81,6 +81,7 @@
#include <shellio.hxx> // I/O
#include <docstyle.hxx>
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <docstat.hxx>
#include <pagedesc.hxx>
#include <pview.hxx>
@@ -150,11 +151,11 @@ Reader* SwDocShell::StartConvertFrom(SfxMedium& rMedium, SwReader** ppRdr,
SwCrsrShell *pCrsrShell,
SwPaM* pPaM )
{
- BOOL bAPICall = FALSE;
+ sal_Bool bAPICall = sal_False;
const SfxPoolItem* pApiItem;
const SfxItemSet* pMedSet;
if( 0 != ( pMedSet = rMedium.GetItemSet() ) && SFX_ITEM_SET ==
- pMedSet->GetItemState( FN_API_CALL, TRUE, &pApiItem ) )
+ pMedSet->GetItemState( FN_API_CALL, sal_True, &pApiItem ) )
bAPICall = ((const SfxBoolItem*)pApiItem)->GetValue();
const SfxFilter* pFlt = rMedium.GetFilter();
@@ -198,7 +199,7 @@ Reader* SwDocShell::StartConvertFrom(SfxMedium& rMedium, SwReader** ppRdr,
{
const SfxItemSet* pSet = rMedium.GetItemSet();
const SfxPoolItem *pPassItem;
- if(pSet && SFX_ITEM_SET == pSet->GetItemState(SID_PASSWORD, TRUE, &pPassItem))
+ if(pSet && SFX_ITEM_SET == pSet->GetItemState(SID_PASSWORD, sal_True, &pPassItem))
aPasswd = ((const SfxStringItem *)pPassItem)->GetValue();
}
@@ -224,7 +225,7 @@ Reader* SwDocShell::StartConvertFrom(SfxMedium& rMedium, SwReader** ppRdr,
const SfxItemSet* pSet;
const SfxPoolItem* pItem;
if( 0 != ( pSet = rMedium.GetItemSet() ) && SFX_ITEM_SET ==
- pSet->GetItemState( SID_FILE_FILTEROPTIONS, TRUE, &pItem ) )
+ pSet->GetItemState( SID_FILE_FILTEROPTIONS, sal_True, &pItem ) )
aOpt.ReadUserData( ((const SfxStringItem*)pItem)->GetValue() );
if( pRead )
@@ -238,17 +239,17 @@ Reader* SwDocShell::StartConvertFrom(SfxMedium& rMedium, SwReader** ppRdr,
Beschreibung: Laden
--------------------------------------------------------------------*/
-BOOL SwDocShell::ConvertFrom( SfxMedium& rMedium )
+sal_Bool SwDocShell::ConvertFrom( SfxMedium& rMedium )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLog, "SW", "JP93722", "SwDocShell::ConvertFrom" );
SwReader* pRdr;
SwRead pRead = StartConvertFrom(rMedium, &pRdr);
if (!pRead)
- return FALSE; // #129881# return if no reader is found
+ return sal_False; // #129881# return if no reader is found
SotStorageRef pStg=pRead->getSotStorageRef(); // #i45333# save sot storage ref in case of recursive calls
- SwWait aWait( *this, TRUE );
+ SwWait aWait( *this, sal_True );
// SfxProgress unterdruecken, wenn man Embedded ist
SW_MOD()->SetEmbeddedLoadSave(
@@ -259,7 +260,7 @@ BOOL SwDocShell::ConvertFrom( SfxMedium& rMedium )
/* #106748# Restore the pool default if reading a saved document. */
pDoc->RemoveAllFmtLanguageDependencies();
- ULONG nErr = pRdr->Read( *pRead );
+ sal_uLong nErr = pRdr->Read( *pRead );
// Evtl. ein altes Doc weg
if ( pDoc != pRdr->GetDoc() )
@@ -279,10 +280,10 @@ BOOL SwDocShell::ConvertFrom( SfxMedium& rMedium )
delete pRdr;
- SW_MOD()->SetEmbeddedLoadSave( FALSE );
+ SW_MOD()->SetEmbeddedLoadSave( sal_False );
SetError( nErr, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) );
- BOOL bOk = !IsError( nErr );
+ sal_Bool bOk = !IsError( nErr );
// --> OD 2006-11-07 #i59688#
// // StartFinishedLoading rufen. Nicht bei asynchronen Filtern!
@@ -305,13 +306,13 @@ BOOL SwDocShell::ConvertFrom( SfxMedium& rMedium )
--------------------------------------------------------------------*/
-BOOL SwDocShell::Save()
+sal_Bool SwDocShell::Save()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLog, "SW", "JP93722", "SwDocShell::Save" );
//#i3370# remove quick help to prevent saving of autocorrection suggestions
if(pView)
pView->GetEditWin().StopQuickHelp();
- SwWait aWait( *this, TRUE );
+ SwWait aWait( *this, sal_True );
CalcLayoutForOLEObjects(); // format for OLE objets
// --> OD 2006-03-17 #i62875#
@@ -324,7 +325,7 @@ BOOL SwDocShell::Save()
}
// <--
- ULONG nErr = ERR_SWG_WRITE_ERROR, nVBWarning = ERRCODE_NONE;
+ sal_uLong nErr = ERR_SWG_WRITE_ERROR, nVBWarning = ERRCODE_NONE;
if( SfxObjectShell::Save() )
{
switch( GetCreateMode() )
@@ -337,16 +338,16 @@ BOOL SwDocShell::Save()
{
WriterRef xWrt;
::GetXMLWriter( aEmptyStr, GetMedium()->GetBaseURL( true ), xWrt );
- xWrt->SetOrganizerMode( TRUE );
+ xWrt->SetOrganizerMode( sal_True );
SwWriter aWrt( *GetMedium(), *pDoc );
nErr = aWrt.Write( xWrt );
- xWrt->SetOrganizerMode( FALSE );
+ xWrt->SetOrganizerMode( sal_False );
}
break;
case SFX_CREATE_MODE_EMBEDDED:
// SfxProgress unterdruecken, wenn man Embedded ist
- SW_MOD()->SetEmbeddedLoadSave( TRUE );
+ SW_MOD()->SetEmbeddedLoadSave( sal_True );
// kein break;
case SFX_CREATE_MODE_STANDARD:
@@ -357,10 +358,10 @@ BOOL SwDocShell::Save()
{
//TODO/MBA: it looks as that this code can be removed!
//SvxImportMSVBasic aTmp( *this, pIo->GetStorage() );
- //aTmp.SaveOrDelMSVBAStorage( FALSE, aEmptyStr );
+ //aTmp.SaveOrDelMSVBAStorage( sal_False, aEmptyStr );
if( SvtFilterOptions::Get()->IsLoadWordBasicStorage() )
nVBWarning = GetSaveWarningOfMSVBAStorage( (SfxObjectShell&) (*this) );
- pDoc->SetContainsMSVBasic( FALSE );
+ pDoc->SetContainsMSVBasic( sal_False );
}
// TabellenBox Edit beenden!
@@ -370,11 +371,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 +386,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 +407,7 @@ sal_Bool SwDocShell::SaveAs( SfxMedium& rMedium )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLog, "SW", "JP93722", "SwDocShell::SaveAs" );
- SwWait aWait( *this, TRUE );
+ SwWait aWait( *this, sal_True );
//#i3370# remove quick help to prevent saving of autocorrection suggestions
if(pView)
pView->GetEditWin().StopQuickHelp();
@@ -455,7 +456,7 @@ sal_Bool SwDocShell::SaveAs( SfxMedium& rMedium )
}
// <--
- ULONG nErr = ERR_SWG_WRITE_ERROR, nVBWarning = ERRCODE_NONE;
+ sal_uLong nErr = ERR_SWG_WRITE_ERROR, nVBWarning = ERRCODE_NONE;
uno::Reference < embed::XStorage > xStor = rMedium.GetOutputStorage();
if( SfxObjectShell::SaveAs( rMedium ) )
{
@@ -481,10 +482,10 @@ sal_Bool SwDocShell::SaveAs( SfxMedium& rMedium )
{
//TODO/MBA: it looks as that this code can be removed!
//SvxImportMSVBasic aTmp( *this, pIo->GetStorage() );
- //aTmp.SaveOrDelMSVBAStorage( FALSE, aEmptyStr );
+ //aTmp.SaveOrDelMSVBAStorage( sal_False, aEmptyStr );
if( SvtFilterOptions::Get()->IsLoadWordBasicStorage() )
nVBWarning = GetSaveWarningOfMSVBAStorage( (SfxObjectShell&) *this );
- pDoc->SetContainsMSVBasic( FALSE );
+ pDoc->SetContainsMSVBasic( sal_False );
}
// TabellenBox Edit beenden!
@@ -493,8 +494,8 @@ sal_Bool SwDocShell::SaveAs( SfxMedium& rMedium )
// Modified-Flag merken und erhalten ohne den Link zu Callen
// (fuer OLE; nach Anweisung von MM)
- BOOL bIsModified = pDoc->IsModified();
- SwUndoNoModifiedPosition aOldPos = pDoc->getUndoNoModifiedPosition();
+ sal_Bool bIsModified = pDoc->IsModified();
+ pDoc->GetIDocumentUndoRedo().LockUndoNoModifiedPosition();
Link aOldOLELnk( pDoc->GetOle2Link() );
pDoc->SetOle2Link( Link() );
@@ -505,11 +506,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 );
@@ -521,11 +522,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 ) ) );
@@ -543,12 +544,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 );
@@ -556,7 +557,7 @@ BOOL SwDocShell::ConvertTo( SfxMedium& rMedium )
{ // Der Filter ist nicht vorhanden
InfoBox( 0,
SW_RESSTR(STR_DLLNOTFOUND) ).Execute();
- return FALSE;
+ return sal_False;
}
//#i3370# remove quick help to prevent saving of autocorrection suggestions
@@ -571,22 +572,22 @@ BOOL SwDocShell::ConvertTo( SfxMedium& rMedium )
pView->GetPostItMgr()->UpdateDataOnActiveSidebarWin();
}
- ULONG nVBWarning = 0;
+ sal_uLong nVBWarning = 0;
if( pDoc->ContainsMSVBasic() )
{
- BOOL bSave = pFlt->GetUserData().EqualsAscii( "CWW8" )
+ sal_Bool bSave = pFlt->GetUserData().EqualsAscii( "CWW8" )
&& SvtFilterOptions::Get()->IsLoadWordBasicStorage();
if ( bSave )
{
- SvStorageRef xStg = new SotStorage( rMedium.GetOutStream(), FALSE );
+ SvStorageRef xStg = new SotStorage( rMedium.GetOutStream(), sal_False );
DBG_ASSERT( !xStg->GetError(), "No storage available for storing VBA macros!" );
if ( !xStg->GetError() )
{
nVBWarning = SaveOrDelMSVBAStorage( (SfxObjectShell&) *this, *xStg, bSave, String::CreateFromAscii("Macros") );
xStg->Commit();
- pDoc->SetContainsMSVBasic( TRUE );
+ pDoc->SetContainsMSVBasic( sal_True );
}
}
}
@@ -644,15 +645,15 @@ BOOL SwDocShell::ConvertTo( SfxMedium& rMedium )
pFlt->GetUserData().EqualsAscii( FILTER_XMLVW ) ) )
{
// eigenen Typ ermitteln
- BYTE nMyType = 0;
+ sal_uInt8 nMyType = 0;
if( ISA( SwWebDocShell) )
nMyType = 1;
else if( ISA( SwGlobalDocShell) )
nMyType = 2;
// gewuenschten Typ ermitteln
- BYTE nSaveType = 0;
- ULONG nSaveClipId = pFlt->GetFormat();
+ sal_uInt8 nSaveType = 0;
+ sal_uLong nSaveClipId = pFlt->GetFormat();
if( SOT_FORMATSTR_ID_STARWRITERWEB_8 == nSaveClipId ||
SOT_FORMATSTR_ID_STARWRITERWEB_60 == nSaveClipId ||
SOT_FORMATSTR_ID_STARWRITERWEB_50 == nSaveClipId ||
@@ -665,9 +666,9 @@ BOOL SwDocShell::ConvertTo( SfxMedium& rMedium )
nSaveType = 2;
// Flags am Dokument entsprechend umsetzen
- BOOL bIsHTMLModeSave = GetDoc()->get(IDocumentSettingAccess::HTML_MODE);
- BOOL bIsGlobalDocSave = GetDoc()->get(IDocumentSettingAccess::GLOBAL_DOCUMENT);
- BOOL bIsGlblDocSaveLinksSave = GetDoc()->get(IDocumentSettingAccess::GLOBAL_DOCUMENT_SAVE_LINKS);
+ sal_Bool bIsHTMLModeSave = GetDoc()->get(IDocumentSettingAccess::HTML_MODE);
+ sal_Bool bIsGlobalDocSave = GetDoc()->get(IDocumentSettingAccess::GLOBAL_DOCUMENT);
+ sal_Bool bIsGlblDocSaveLinksSave = GetDoc()->get(IDocumentSettingAccess::GLOBAL_DOCUMENT_SAVE_LINKS);
if( nMyType != nSaveType )
{
GetDoc()->set(IDocumentSettingAccess::HTML_MODE, 1 == nSaveType);
@@ -694,7 +695,7 @@ BOOL SwDocShell::ConvertTo( SfxMedium& rMedium )
}
// Jetzt das Dokument normal speichern
- BOOL bRet = SaveAs( rMedium );
+ sal_Bool bRet = SaveAs( rMedium );
if( nMyType != nSaveType )
{
@@ -716,7 +717,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())
@@ -730,26 +731,26 @@ BOOL SwDocShell::ConvertTo( SfxMedium& rMedium )
SFX_CREATE_MODE_EMBEDDED == GetCreateMode());
// Kontext aufspannen, um die Anzeige der Selektion zu unterbinden
- ULONG nErrno;
+ sal_uLong nErrno;
String aFileName( rMedium.GetName() );
//Keine View also das ganze Dokument!
if ( pWrtShell )
{
- SwWait aWait( *this, TRUE );
+ SwWait aWait( *this, sal_True );
// --> OD 2009-12-31 #i106906#
const sal_Bool bFormerLockView = pWrtShell->IsViewLocked();
pWrtShell->LockView( sal_True );
// <--
pWrtShell->StartAllAction();
pWrtShell->Push();
- SwWriter aWrt( rMedium, *pWrtShell, TRUE );
+ SwWriter aWrt( rMedium, *pWrtShell, sal_True );
nErrno = aWrt.Write( xWriter, &aFileName );
//JP 16.05.97: falls der SFX uns die View waehrend des speicherns
// entzieht
if( pWrtShell )
{
- pWrtShell->Pop(FALSE);
+ pWrtShell->Pop(sal_False);
pWrtShell->EndAllAction();
// --> OD 2009-12-31 #i106906#
pWrtShell->LockView( bFormerLockView );
@@ -772,7 +773,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();
@@ -786,14 +787,14 @@ BOOL SwDocShell::ConvertTo( SfxMedium& rMedium )
/*--------------------------------------------------------------------
- Beschreibung: ??? noch nicht zu aktivieren, muss TRUE liefern
+ Beschreibung: ??? noch nicht zu aktivieren, muss sal_True liefern
--------------------------------------------------------------------*/
sal_Bool SwDocShell::SaveCompleted( const uno::Reference < embed::XStorage >& xStor )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLog, "SW", "JP93722", "SwDocShell::SaveCompleted" );
- BOOL bRet = SfxObjectShell::SaveCompleted( xStor );
+ sal_Bool bRet = SfxObjectShell::SaveCompleted( xStor );
if( bRet )
{
// erst hier entscheiden, ob das Speichern geklappt hat oder nicht
@@ -805,9 +806,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-- )
@@ -824,7 +825,7 @@ sal_Bool SwDocShell::SaveCompleted( const uno::Reference < embed::XStorage >& xS
DELETEZ( pOLEChildList );
if( bResetModified )
- EnableSetModified( TRUE );
+ EnableSetModified( sal_True );
}
return bRet;
}
@@ -834,12 +835,12 @@ sal_Bool SwDocShell::SaveCompleted( const uno::Reference < embed::XStorage >& xS
--------------------------------------------------------------------*/
void SwDocShell::Draw( OutputDevice* pDev, const JobSetup& rSetup,
- USHORT nAspect )
+ sal_uInt16 nAspect )
{
//fix #25341# Draw sollte das Modified nicht beeinflussen
- BOOL bResetModified;
- if ( TRUE == (bResetModified = IsEnableSetModified()) )
- EnableSetModified( FALSE );
+ sal_Bool bResetModified;
+ if ( sal_True == (bResetModified = IsEnableSetModified()) )
+ EnableSetModified( sal_False );
//sollte am Document ein JobSetup haengen, dann kopieren wir uns diesen,
//um nach dem PrtOle2 diesen wieder am Doc zu verankern.
@@ -861,7 +862,7 @@ void SwDocShell::Draw( OutputDevice* pDev, const JobSetup& rSetup,
pDev->SetFillColor();
pDev->SetLineColor();
pDev->SetBackground();
- BOOL bWeb = 0 != PTR_CAST(SwWebDocShell, this);
+ sal_Bool bWeb = 0 != PTR_CAST(SwWebDocShell, this);
SwPrintData aOpts;
ViewShell::PrtOle2( pDoc, SW_MOD()->GetUsrPref(bWeb), aOpts, pDev, aRect );
pDev->Pop();
@@ -872,7 +873,7 @@ void SwDocShell::Draw( OutputDevice* pDev, const JobSetup& rSetup,
delete pOrig;
}
if ( bResetModified )
- EnableSetModified( TRUE );
+ EnableSetModified( sal_True );
}
@@ -894,14 +895,14 @@ void SwDocShell::SetVisArea( const Rectangle &rRect )
aRect.Move( nMoveX, nMoveY );
//Ruft das SfxInPlaceObject::SetVisArea()!
- pView->SetVisArea( aRect, TRUE );
+ pView->SetVisArea( aRect, sal_True );
}
else
SfxObjectShell::SetVisArea( aRect );
}
-Rectangle SwDocShell::GetVisArea( USHORT nAspect ) const
+Rectangle SwDocShell::GetVisArea( sal_uInt16 nAspect ) const
{
if ( nAspect == ASPECT_THUMBNAIL )
{
@@ -909,7 +910,7 @@ Rectangle SwDocShell::GetVisArea( USHORT nAspect ) const
SwNodeIndex aIdx( pDoc->GetNodes().GetEndOfExtras(), 1 );
SwCntntNode* pNd = pDoc->GetNodes().GoNext( &aIdx );
- const SwRect aPageRect = pNd->FindPageFrmRect( FALSE, 0, FALSE );
+ const SwRect aPageRect = pNd->FindPageFrmRect( sal_False, 0, sal_False );
return aPageRect.SVRect();
// Why does this have to be that complicated? I replaced this by the
@@ -922,8 +923,8 @@ Rectangle SwDocShell::GetVisArea( USHORT nAspect ) const
pDesc = &const_cast<const SwDoc *>(pDoc)->GetPageDesc( 0 );
//Das Format wird evtl. von der virtuellen Seitennummer bestimmt.
- const USHORT nPgNum = rDesc.GetNumOffset();
- const BOOL bOdd = nPgNum % 2 ? TRUE : FALSE;
+ const sal_uInt16 nPgNum = rDesc.GetNumOffset();
+ const sal_Bool bOdd = nPgNum % 2 ? sal_True : sal_False;
const SwFrmFmt *pFmt = bOdd ? pDesc->GetRightFmt() : pDesc->GetLeftFmt();
if ( !pFmt ) //#40568#
pFmt = bOdd ? pDesc->GetLeftFmt() : pDesc->GetRightFmt();
@@ -959,7 +960,7 @@ void SwDocShell::OnDocumentPrinterChanged( Printer * pNewPrinter )
GetDoc()->setPrinter( 0, true, true );
}
-ULONG SwDocShell::GetMiscStatus() const
+sal_uLong SwDocShell::GetMiscStatus() const
{
return SVOBJ_MISCSTATUS_RESIZEONPRINTERCHANGE;
}
@@ -1009,7 +1010,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)
{
@@ -1027,7 +1028,7 @@ void SwDocShell::GetState(SfxItemSet& rSet)
// break;
case SID_PRINTPREVIEW:
{
- BOOL bDisable = IsInPlaceActive();
+ sal_Bool bDisable = IsInPlaceActive();
if ( !bDisable )
{
SfxViewFrame *pTmpFrm = SfxViewFrame::GetFirst(this);
@@ -1036,7 +1037,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);
@@ -1046,9 +1047,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 );
}
}
@@ -1057,7 +1058,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;
@@ -1102,7 +1103,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()
@@ -1151,7 +1152,7 @@ IMPL_LINK( SwDocShell, Ole2ModifiedHdl, void *, p )
// Bit 1: -> neuer Zustand
long nStatus = (long)p;
if( IsEnableSetModified() )
- SetModified( (nStatus & 2) ? TRUE : FALSE );
+ SetModified( (nStatus & 2) ? sal_True : sal_False );
return 0;
}
@@ -1200,7 +1201,7 @@ void SwDocShell::LoadingFinished()
// if ( IsEnableSetModified() &&
// pDoc->IsModified() && pDoc->LinksUpdated() )
// {
-// EnableSetModified( FALSE );
+// EnableSetModified( sal_False );
// bResetEnableSetModified = true;
// }
// <--
@@ -1208,7 +1209,7 @@ void SwDocShell::LoadingFinished()
// // --> OD 2005-02-11 #i38810#
// if ( bResetEnableSetModified )
// {
-// EnableSetModified( TRUE );
+// EnableSetModified( sal_True );
// }
// // <--
SfxViewFrame* pVFrame = SfxViewFrame::GetFirst(this);
@@ -1291,7 +1292,7 @@ void SwDocShell::CalcLayoutForOLEObjects()
// read by the binary filter:
void SwDocShell::UpdateLinks()
{
- GetDoc()->UpdateLinks(TRUE);
+ GetDoc()->UpdateLinks(sal_True);
// --> FME 2005-07-27 #i50703# Update footnote numbers
SwTxtFtn::SetUniqueSeqRefNo( *GetDoc() );
SwNodeIndex aTmp( GetDoc()->GetNodes() );
@@ -1368,8 +1369,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);
}
@@ -1382,7 +1383,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;
@@ -1418,7 +1419,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 874c4f175d..1e8ffbbd38 100644
--- a/sw/source/ui/app/docsh2.cxx
+++ b/sw/source/ui/app/docsh2.cxx
@@ -44,9 +44,7 @@
#include <svl/zformat.hxx>
#include <unotools/pathoptions.hxx>
#include <svtools/transfer.hxx>
-#ifndef _SFXSIDS_HRC //autogen
#include <sfx2/dialogs.hrc>
-#endif
#include <sfx2/dinfdlg.hxx>
#include <sfx2/request.hxx>
#include <sfx2/dispatch.hxx>
@@ -57,9 +55,7 @@
#include <svtools/sfxecode.hxx>
#include <sfx2/docfile.hxx>
#include <sfx2/docfilt.hxx>
-#ifndef _SVX_SVXIDS_HRC //autogen
#include <svx/svxids.hrc>
-#endif
#include <svx/drawitem.hxx>
#include <editeng/svxacorr.hxx>
#include <editeng/langitem.hxx>
@@ -86,6 +82,7 @@
#include <redlndlg.hxx>
#include <docstyle.hxx>
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <pagedesc.hxx>
#include <shellio.hxx>
#include <pview.hxx>
@@ -103,15 +100,9 @@
#include <cmdid.h>
#include <globals.h>
#include <helpid.h>
-#ifndef _APP_HRC
#include <app.hrc>
-#endif
-#ifndef _POOLFMT_HRC
#include <poolfmt.hrc>
-#endif
-#ifndef _GLOBALS_HRC
#include <globals.hrc>
-#endif
#include <com/sun/star/ui/dialogs/XFilePicker.hpp>
#include <com/sun/star/ui/dialogs/XFilterManager.hpp>
#include <com/sun/star/ui/dialogs/XFilePickerControlAccess.hpp>
@@ -140,7 +131,7 @@ using namespace ::com::sun::star::uno;
using namespace ::com::sun::star;
using ::rtl::OUString;
using namespace ::sfx2;
-extern BOOL FindPhyStyle( SwDoc& , const String& , SfxStyleFamily );
+extern sal_Bool FindPhyStyle( SwDoc& , const String& , SfxStyleFamily );
/*--------------------------------------------------------------------
Beschreibung: DocInfo kreieren (virtuell)
@@ -176,7 +167,7 @@ void SwDocShell::DoFlushDocInfo()
bool bUnlockView(true);
if ( pWrtShell ) {
bUnlockView = !pWrtShell->IsViewLocked();
- pWrtShell->LockView( TRUE ); // lock visible section
+ pWrtShell->LockView( sal_True ); // lock visible section
pWrtShell->StartAllAction();
}
@@ -185,7 +176,7 @@ void SwDocShell::DoFlushDocInfo()
if ( pWrtShell ) {
pWrtShell->EndAllAction();
if ( bUnlockView ) {
- pWrtShell->LockView( FALSE );
+ pWrtShell->LockView( sal_False );
}
}
}
@@ -197,7 +188,7 @@ void lcl_processCompatibleSfxHint( const uno::Reference< script::vba::XVBAEventP
if ( rHint.ISA( SfxEventHint ) )
{
uno::Sequence< uno::Any > aArgs;
- ULONG nEventId = ((SfxEventHint&)rHint).GetEventId();
+ sal_uLong nEventId = ((SfxEventHint&)rHint).GetEventId();
switch( nEventId )
{
case SFX_EVENT_CREATEDOC:
@@ -230,7 +221,7 @@ void SwDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
lcl_processCompatibleSfxHint( xVbaEvents, rHint );
#endif
- USHORT nAction = 0;
+ sal_uInt16 nAction = 0;
if( rHint.ISA(SfxSimpleHint) )
{
// swithc for more actions
@@ -252,11 +243,11 @@ void SwDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
if( nAction )
{
- BOOL bUnlockView = sal_True; //initializing prevents warning
+ sal_Bool bUnlockView = sal_True; //initializing prevents warning
if( pWrtShell )
{
bUnlockView = !pWrtShell->IsViewLocked();
- pWrtShell->LockView( TRUE ); //lock visible section
+ pWrtShell->LockView( sal_True ); //lock visible section
pWrtShell->StartAllAction();
}
switch( nAction )
@@ -273,7 +264,7 @@ void SwDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
const bool bResetModified = IsEnableSetModified();
if ( bResetModified )
- EnableSetModified( FALSE );
+ EnableSetModified( sal_False );
// --> OD 2005-02-01 #i41679#
const bool bIsDocModified = pDoc->IsModified();
// <--
@@ -285,7 +276,7 @@ void SwDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
pDoc->ResetModified();
// <--
if ( bResetModified )
- EnableSetModified( TRUE );
+ EnableSetModified( sal_True );
}
break;
// <--
@@ -295,7 +286,7 @@ void SwDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
pWrtShell->EndAllAction();
if( bUnlockView )
- pWrtShell->LockView( FALSE );
+ pWrtShell->LockView( sal_False );
}
}
}
@@ -304,11 +295,11 @@ void SwDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
Beschreibung: Benachrichtigung Doc schliessen
--------------------------------------------------------------------*/
-USHORT SwDocShell::PrepareClose( BOOL bUI, BOOL bForBrowsing )
+sal_uInt16 SwDocShell::PrepareClose( sal_Bool bUI, sal_Bool bForBrowsing )
{
- USHORT nRet = SfxObjectShell::PrepareClose( bUI, bForBrowsing );
+ sal_uInt16 nRet = SfxObjectShell::PrepareClose( bUI, bForBrowsing );
- if( TRUE == nRet ) //Unbedingt auf TRUE abfragen! (RET_NEWTASK)
+ if( sal_True == nRet ) //Unbedingt auf sal_True abfragen! (RET_NEWTASK)
EndListening( *this );
#ifdef FUTURE_VBA
@@ -330,23 +321,22 @@ USHORT SwDocShell::PrepareClose( BOOL bUI, BOOL bForBrowsing )
Beschreibung: Organizer
--------------------------------------------------------------------*/
-BOOL SwDocShell::Insert( SfxObjectShell &rSource,
- USHORT nSourceIdx1, // SourcePool: oberste Inhaltsebene (Vorlagen/Makros)
- USHORT nSourceIdx2, // Index in den Inhalt
- USHORT nSourceIdx3, // Index in die Inhaltsebene
- USHORT &rIdx1, // und das gleiche fuer den DestinationPool
- USHORT &rIdx2, // ""
- USHORT &rIdx3, // ""
- USHORT &rRemovedIdx ) // falls doppelte geloescht werden, Pos zurueck
+sal_Bool SwDocShell::Insert( SfxObjectShell &rSource,
+ sal_uInt16 nSourceIdx1, // SourcePool: oberste Inhaltsebene (Vorlagen/Makros)
+ sal_uInt16 nSourceIdx2, // Index in den Inhalt
+ sal_uInt16 nSourceIdx3, // Index in die Inhaltsebene
+ sal_uInt16 &rIdx1, // und das gleiche fuer den DestinationPool
+ sal_uInt16 &rIdx2, // ""
+ sal_uInt16 &rIdx3, // ""
+ sal_uInt16 &rRemovedIdx ) // falls doppelte geloescht werden, Pos zurueck
{
// --> OD 2005-05-10 #i48949# - actions aren't undoable. Thus, allow no undo
// actions
// 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;
@@ -359,7 +349,7 @@ BOOL SwDocShell::Insert( SfxObjectShell &rSource,
// wir koennen nicht in uns selbst hin und her moven
if( pHisPool == pMyPool )
- return FALSE;
+ return sal_False;
if( INDEX_IGNORE == rIdx2 )
rIdx2 = pMyPool->Count();
@@ -379,10 +369,10 @@ BOOL SwDocShell::Insert( SfxObjectShell &rSource,
( SFX_STYLE_FAMILY_CHAR == eOldFamily &&
rOldName == *SwStyleNameMapper::GetTextUINameArray()[ RES_POOLCOLL_STANDARD -
RES_POOLCOLL_TEXT_BEGIN ] ))
- return FALSE;
+ return sal_False;
SfxStyleFamily eMyOldFamily( pMyPool->GetSearchFamily() );
- USHORT nMySrchMask = pMyPool->GetSearchMask();
+ sal_uInt16 nMySrchMask = pMyPool->GetSearchMask();
SfxStyleSheetBase* pExist;
if( ::FindPhyStyle( *pDoc, rOldName, eOldFamily ) )
@@ -391,7 +381,7 @@ BOOL SwDocShell::Insert( SfxObjectShell &rSource,
if( ERRCODE_BUTTON_OK != ErrorHandler::HandleError(
*new MessageInfo( ERRCODE_SFXMSG_STYLEREPLACE, rOldName )) )
{
- return FALSE;
+ return sal_False;
}
// Da Replace den aStyleSheet-Member selbst benoetigt, muss
@@ -405,7 +395,7 @@ BOOL SwDocShell::Insert( SfxObjectShell &rSource,
GetDoc()->SetModified();
- return TRUE;
+ return sal_True;
}
pMyPool->SetSearchMask( eOldFamily, nMySrchMask );
@@ -439,7 +429,7 @@ BOOL SwDocShell::Insert( SfxObjectShell &rSource,
// Dshalb muss hier der Index der neuen Vorlage im Pool
// ermittelt werden.
pExist = pMyPool->First();
- USHORT nIdx = 0;
+ sal_uInt16 nIdx = 0;
while( pExist )
{
if( pExist->GetName() == rOldName &&
@@ -467,7 +457,7 @@ BOOL SwDocShell::Insert( SfxObjectShell &rSource,
// wer bekommt den Neuen als Parent? wer benutzt den Neuen als Follow?
// (immer nur ueber die Instanziierten!!!)
pMyPool->SetSearchMask( eOldFamily, nMySrchMask );
- pMyPool->SetOrganizerMode( TRUE );
+ pMyPool->SetOrganizerMode( sal_True );
SfxStyleSheetBase* pTestSheet = pMyPool->First();
while (pTestSheet)
{
@@ -528,7 +518,7 @@ BOOL SwDocShell::Insert( SfxObjectShell &rSource,
ASSERT(pDoc, "Doc fehlt");
GetDoc()->SetModified();
- bRet = TRUE;
+ bRet = sal_True;
}
else
bRet = SfxObjectShell::Insert( rSource,
@@ -542,11 +532,10 @@ BOOL SwDocShell::Insert( SfxObjectShell &rSource,
// --> OD 2005-05-10 #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;
@@ -556,11 +545,11 @@ BOOL SwDocShell::Insert( SfxObjectShell &rSource,
Beschreibung: Vorlagen Remove
--------------------------------------------------------------------*/
-BOOL SwDocShell::Remove(USHORT nIdx1, // siehe Insert
- USHORT nIdx2,
- USHORT nIdx3)
+sal_Bool SwDocShell::Remove(sal_uInt16 nIdx1, // siehe Insert
+ sal_uInt16 nIdx2,
+ sal_uInt16 nIdx3)
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if (CONTENT_STYLE == nIdx1)
{
@@ -579,13 +568,13 @@ BOOL SwDocShell::Remove(USHORT nIdx1, // siehe Insert
( SFX_STYLE_FAMILY_CHAR == eFamily &&
aName == *SwStyleNameMapper::GetTextUINameArray()[ RES_POOLCOLL_STANDARD -
RES_POOLCOLL_TEXT_BEGIN ] ))
- return FALSE;
+ return sal_False;
// also loeschen
pMyPool->Remove( pMySheet );
// jetzt noch die Parents/Follows aller Instanziierten korrigieren
- pMyPool->SetOrganizerMode( TRUE );
+ pMyPool->SetOrganizerMode( sal_True );
SfxStyleSheetBase* pTestSheet = pMyPool->First();
while (pTestSheet)
{
@@ -607,7 +596,7 @@ BOOL SwDocShell::Remove(USHORT nIdx1, // siehe Insert
}
pMyPool->SetOrganizerMode( SFX_CREATE_MODE_ORGANIZER == GetCreateMode() );
- bRet = TRUE;
+ bRet = sal_True;
}
else
bRet = SfxObjectShell::Remove( nIdx1,
@@ -630,8 +619,8 @@ void SwDocShell::Execute(SfxRequest& rReq)
{
const SfxItemSet* pArgs = rReq.GetArgs();
const SfxPoolItem* pItem;
- USHORT nWhich = rReq.GetSlot();
- BOOL bDone = FALSE;
+ sal_uInt16 nWhich = rReq.GetSlot();
+ sal_Bool bDone = sal_False;
switch ( nWhich )
{
case SID_AUTO_CORRECT_DLG:
@@ -639,10 +628,10 @@ void SwDocShell::Execute(SfxRequest& rReq)
SvxSwAutoFmtFlags* pAFlags = &SvxAutoCorrCfg::Get()->GetAutoCorrect()->GetSwFlags();
SwAutoCompleteWord& rACW = SwDoc::GetAutoCompleteWords();
- BOOL bOldLocked = rACW.IsLockWordLstLocked(),
+ sal_Bool bOldLocked = rACW.IsLockWordLstLocked(),
bOldAutoCmpltCollectWords = pAFlags->bAutoCmpltCollectWords;
- rACW.SetLockWordLstLocked( TRUE );
+ rACW.SetLockWordLstLocked( sal_True );
SvStringsISortDtor aTmpLst;
aTmpLst.Insert( &rACW.GetWordList() );
@@ -650,7 +639,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
SfxApplication* pApp = SFX_APP();
SfxRequest aAppReq(SID_AUTO_CORRECT_DLG, SFX_CALLMODE_SYNCHRON, pApp->GetPool());
- SfxBoolItem aSwOptions( SID_AUTO_CORRECT_DLG, TRUE );
+ SfxBoolItem aSwOptions( SID_AUTO_CORRECT_DLG, sal_True );
aAppReq.AppendItem(aSwOptions);
// SMARTTAGS
@@ -662,7 +651,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
aSet.Put( aSwOptions );
const SfxPoolItem* pOpenSmartTagOptionsItem = 0;
- if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( SID_OPEN_SMARTTAGOPTIONS, FALSE, &pOpenSmartTagOptionsItem ) )
+ if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( SID_OPEN_SMARTTAGOPTIONS, sal_False, &pOpenSmartTagOptionsItem ) )
aSet.Put( *static_cast<const SfxBoolItem*>(pOpenSmartTagOptionsItem) );
SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
@@ -682,7 +671,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
pAFlags->pAutoCmpltList = 0;
}
// remove all pointer we never delete the strings
- aTmpLst.Remove( (USHORT)0, aTmpLst.Count() );
+ aTmpLst.Remove( (sal_uInt16)0, aTmpLst.Count() );
if( !bOldAutoCmpltCollectWords && bOldAutoCmpltCollectWords !=
pAFlags->bAutoCmpltCollectWords )
@@ -704,20 +693,20 @@ void SwDocShell::Execute(SfxRequest& rReq)
case SID_PRINTPREVIEW:
{
- BOOL bSet = FALSE, bFound = FALSE, bOnly = TRUE;
+ sal_Bool bSet = sal_False, bFound = sal_False, bOnly = sal_True;
SfxViewFrame *pTmpFrm = SfxViewFrame::GetFirst(this);
SfxViewShell* pViewShell = SfxViewShell::Current();
SwView* pCurrView = dynamic_cast< SwView *> ( pViewShell );
- BOOL bCurrent = IS_TYPE( SwPagePreView, pViewShell );
+ sal_Bool bCurrent = IS_TYPE( SwPagePreView, pViewShell );
while( pTmpFrm ) // search PreView
{
if( IS_TYPE( SwView, pTmpFrm->GetViewShell()) )
- bOnly = FALSE;
+ bOnly = sal_False;
else if( IS_TYPE( SwPagePreView, pTmpFrm->GetViewShell()))
{
pTmpFrm->GetFrame().Appear();
- bFound = TRUE;
+ bFound = sal_True;
}
if( bFound && !bOnly )
break;
@@ -725,12 +714,12 @@ void SwDocShell::Execute(SfxRequest& rReq)
}
if( pArgs && SFX_ITEM_SET ==
- pArgs->GetItemState( SID_PRINTPREVIEW, FALSE, &pItem ))
+ pArgs->GetItemState( SID_PRINTPREVIEW, sal_False, &pItem ))
bSet = ((SfxBoolItem*)pItem)->GetValue();
else
bSet = !bCurrent;
- USHORT nSlotId = 0;
+ sal_uInt16 nSlotId = 0;
if( bSet && !bFound ) // Keine gefunden, daher neue Preview anlegen
{
//Keine neue anlegen fuer BrowseView!
@@ -761,14 +750,14 @@ void SwDocShell::Execute(SfxRequest& rReq)
case SID_TEMPLATE_LOAD:
{
String aFileName;
- static BOOL bText = TRUE;
- static BOOL bFrame = FALSE;
- static BOOL bPage = FALSE;
- static BOOL bNum = FALSE;
- static BOOL bMerge = FALSE;
- USHORT nRet = USHRT_MAX;
-
- USHORT nFlags = bFrame ? SFX_LOAD_FRAME_STYLES : 0;
+ static sal_Bool bText = sal_True;
+ static sal_Bool bFrame = sal_False;
+ static sal_Bool bPage = sal_False;
+ static sal_Bool bNum = sal_False;
+ static sal_Bool bMerge = sal_False;
+ sal_uInt16 nRet = USHRT_MAX;
+
+ sal_uInt16 nFlags = bFrame ? SFX_LOAD_FRAME_STYLES : 0;
if(bPage)
nFlags|= SFX_LOAD_PAGE_STYLES;
if(bNum)
@@ -780,13 +769,13 @@ void SwDocShell::Execute(SfxRequest& rReq)
if ( pArgs )
{
- SFX_REQUEST_ARG( rReq, pTemplateItem, SfxStringItem, SID_TEMPLATE_NAME, FALSE );
+ SFX_REQUEST_ARG( rReq, pTemplateItem, SfxStringItem, SID_TEMPLATE_NAME, sal_False );
if ( pTemplateItem )
{
aFileName = pTemplateItem->GetValue();
- SFX_REQUEST_ARG( rReq, pFlagsItem, SfxInt32Item, SID_TEMPLATE_LOAD, FALSE );
+ SFX_REQUEST_ARG( rReq, pFlagsItem, SfxInt32Item, SID_TEMPLATE_LOAD, sal_False );
if ( pFlagsItem )
- nFlags = (USHORT) pFlagsItem->GetValue();
+ nFlags = (sal_uInt16) pFlagsItem->GetValue();
}
}
@@ -819,7 +808,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
}
pFlt = aIter.Next();
}
- BOOL bWeb = 0 != dynamic_cast< SwWebDocShell *>( this );
+ sal_Bool bWeb = 0 != dynamic_cast< SwWebDocShell *>( this );
const SfxFilter *pOwnFlt =
SwDocShell::Factory().GetFilterContainer()->
GetFilter4FilterName(String::CreateFromAscii("writer8"));
@@ -869,7 +858,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
bMerge = 0 != (nFlags&SFX_MERGE_STYLES);
aOpt.SetMerge( !bMerge );
- SetError( LoadStylesFromFile( aFileName, aOpt, FALSE ), ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ));
+ SetError( LoadStylesFromFile( aFileName, aOpt, sal_False ), ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ));
if ( !GetError() )
rReq.Done();
}
@@ -892,7 +881,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
SwIoSystem::GetFilterOfFormat(
String::CreateFromAscii("HTML"),
SwWebDocShell::Factory().GetFilterContainer() );
- BOOL bLocalHasName = HasName();
+ sal_Bool bLocalHasName = HasName();
if(bLocalHasName)
{
//check for filter type
@@ -901,7 +890,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
{
QueryBox aQuery(&pViewFrm->GetWindow(), SW_RES(MSG_SAVEAS_HTML_QUERY));
if(RET_YES == aQuery.Execute())
- bLocalHasName = FALSE;
+ bLocalHasName = sal_False;
else
break;
}
@@ -927,13 +916,13 @@ void SwDocShell::Execute(SfxRequest& rReq)
}
#ifdef DBG_UTIL
{
- BOOL bWeb = 0 != dynamic_cast<SwWebDocShell*>(this);
- DBG_ASSERT(bWeb == TRUE, "SourceView nur in der WebDocShell");
+ sal_Bool bWeb = 0 != dynamic_cast<SwWebDocShell*>(this);
+ DBG_ASSERT(bWeb == sal_True, "SourceView nur in der WebDocShell");
}
#endif
// die SourceView ist fuer die SwWebDocShell die 1
- USHORT nSlot = SID_VIEWSHELL1;
- BOOL bSetModified = FALSE;
+ sal_uInt16 nSlot = SID_VIEWSHELL1;
+ sal_Bool bSetModified = sal_False;
SfxPrinter* pSavePrinter = 0;
if( 0 != pSrcView)
{
@@ -946,13 +935,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;
}
@@ -965,7 +953,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
Export in den SourceMode und dem Speichern des Docs
else if(IsModified())
{
- USHORT nRet = QueryBox( SFX_APPWINDOW ,SW_RES(MSG_SAVE_HTML_QUERY)).Execute();
+ sal_uInt16 nRet = QueryBox( SFX_APPWINDOW ,SW_RES(MSG_SAVE_HTML_QUERY)).Execute();
if(RET_YES == nRet)
{
S F X _DISPATCHER().Execute(SID_SAVEDOC,
@@ -1010,13 +998,13 @@ void SwDocShell::Execute(SfxRequest& rReq)
DBG_ASSERT(pDlg, "Dialogdiet fail!");
if(RET_OK == pDlg->Execute())
{
- BYTE nLevel = pDlg->GetLevel();
- BYTE nPara = pDlg->GetPara();
+ sal_uInt8 nLevel = pDlg->GetLevel();
+ sal_uInt8 nPara = pDlg->GetPara();
SwDoc* pSmryDoc = new SwDoc();
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 )
{
@@ -1044,12 +1032,12 @@ void SwDocShell::Execute(SfxRequest& rReq)
pStrm->Seek( STREAM_SEEK_TO_BEGIN );
// Transfer ownership of stream to a lockbytes object
- SvLockBytes aLockBytes( pStrm, TRUE );
+ SvLockBytes aLockBytes( pStrm, sal_True );
SvLockBytesStat aStat;
if ( aLockBytes.Stat( &aStat, SVSTATFLAG_DEFAULT ) == ERRCODE_NONE )
{
sal_uInt32 nLen = aStat.nSize;
- ULONG nRead = 0;
+ sal_uLong nRead = 0;
uno::Sequence< sal_Int8 > aSeq( nLen );
aLockBytes.ReadAt( 0, aSeq.getArray(), nLen, &nRead );
@@ -1115,12 +1103,12 @@ void SwDocShell::Execute(SfxRequest& rReq)
pStrm->Seek( STREAM_SEEK_TO_BEGIN );
// Transfer ownership of stream to a lockbytes object
- SvLockBytes aLockBytes( pStrm, TRUE );
+ SvLockBytes aLockBytes( pStrm, sal_True );
SvLockBytesStat aStat;
if ( aLockBytes.Stat( &aStat, SVSTATFLAG_DEFAULT ) == ERRCODE_NONE )
{
sal_uInt32 nLen = aStat.nSize;
- ULONG nRead = 0;
+ sal_uLong nRead = 0;
uno::Sequence< sal_Int8 > aSeq( nLen );
aLockBytes.ReadAt( 0, aSeq.getArray(), nLen, &nRead );
@@ -1151,17 +1139,17 @@ void SwDocShell::Execute(SfxRequest& rReq)
}
break;
case SID_SPELLCHECKER_CHANGED:
- //! FALSE, TRUE, TRUE is on the save side but a probably overdone
- SW_MOD()->CheckSpellChanges(FALSE, TRUE, TRUE, FALSE );
+ //! sal_False, sal_True, sal_True is on the save side but a probably overdone
+ SW_MOD()->CheckSpellChanges(sal_False, sal_True, sal_True, sal_False );
break;
case SID_BROWSER_MODE:
case FN_PRINT_LAYOUT: //Fuer Web, genau umgekehrt zum BrowserMode
{
int eState = STATE_TOGGLE;
- BOOL bSet = sal_True;
+ sal_Bool bSet = sal_True;
const SfxPoolItem* pAttr=NULL;
- if ( pArgs && SFX_ITEM_SET == pArgs->GetItemState( nWhich , FALSE, &pAttr ))
+ if ( pArgs && SFX_ITEM_SET == pArgs->GetItemState( nWhich , sal_False, &pAttr ))
{
bSet = ((SfxBoolItem*)pAttr)->GetValue();
if ( nWhich == FN_PRINT_LAYOUT )
@@ -1175,7 +1163,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
ToggleBrowserMode(bSet, 0);
// OS: numerische Reihenfolge beachten!
- static USHORT __READONLY_DATA aInva[] =
+ static sal_uInt16 __READONLY_DATA aInva[] =
{
SID_NEWWINDOW,/*5620*/
SID_BROWSER_MODE, /*6313*/
@@ -1234,14 +1222,14 @@ void SwDocShell::Execute(SfxRequest& rReq)
case FN_NEW_HTML_DOC:
case FN_NEW_GLOBAL_DOC:
{
- bDone = FALSE;
- BOOL bCreateHtml = FN_NEW_HTML_DOC == nWhich;
+ bDone = sal_False;
+ sal_Bool bCreateHtml = FN_NEW_HTML_DOC == nWhich;
- BOOL bCreateByOutlineLevel = false; //#outline level,add by zhaojianwei
+ sal_Bool bCreateByOutlineLevel = false; //#outline level,add by zhaojianwei
sal_Int32 nTemplateOutlineLevel = 0 ; //#outline level,add by zhaojianwei
String aFileName, aTemplateName;
- if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( nWhich, FALSE, &pItem ) )
+ if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( nWhich, sal_False, &pItem ) )
{
aFileName = ((const SfxStringItem*)pItem)->GetValue();
SFX_ITEMSET_ARG( pArgs, pTemplItem, SfxStringItem, SID_TEMPLATE_NAME, sal_False );
@@ -1293,7 +1281,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
uno::Reference < XFilePicker > xFP = aDlgHelper.GetFilePicker();
const SfxFilter* pFlt;
- USHORT nStrId;
+ sal_uInt16 nStrId;
if( bCreateHtml )
{
@@ -1332,14 +1320,14 @@ void SwDocShell::Execute(SfxRequest& rReq)
//#removed by zhaojianwei
- // const USHORT nCount = pDoc->GetTxtFmtColls()->Count();
+ // const sal_uInt16 nCount = pDoc->GetTxtFmtColls()->Count();
// Sequence<OUString> aListBoxEntries(nCount);
// OUString* pEntries = aListBoxEntries.getArray();
// sal_Int32 nIdx = 0;
// sal_Int16 nSelect = 0;
// OUString sStartTemplate;
// SwTxtFmtColl *pFnd = 0, *pAny = 0;
- // for(USHORT i = 0; i < nCount; ++i)
+ // for(sal_uInt16 i = 0; i < nCount; ++i)
// {
// SwTxtFmtColl &rTxtColl =
// *pDoc->GetTxtFmtColls()->GetObject( i );
@@ -1373,7 +1361,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
if( rOutlNds.Count() )
{
int nLevel;
- for(USHORT n = 0; n < rOutlNds.Count(); ++n )
+ for(sal_uInt16 n = 0; n < rOutlNds.Count(); ++n )
if( ( nLevel = rOutlNds[n]->GetTxtNode()->GetAttrOutlineLevel()) > 0 &&
! bOutline[nLevel-1] )
{
@@ -1381,20 +1369,20 @@ void SwDocShell::Execute(SfxRequest& rReq)
}
}
- const USHORT nStyleCount = pDoc->GetTxtFmtColls()->Count();
+ const sal_uInt16 nStyleCount = pDoc->GetTxtFmtColls()->Count();
Sequence<OUString> aListBoxEntries( MAXLEVEL + nStyleCount);
OUString* pEntries = aListBoxEntries.getArray();
sal_Int32 nIdx = 0 ;
OUString sOutline( SW_RESSTR(STR_FDLG_OUTLINE_LEVEL) );
- for( USHORT i = 0; i < MAXLEVEL; ++i )
+ for( sal_uInt16 i = 0; i < MAXLEVEL; ++i )
{
if( bOutline[i] )
pEntries[nIdx++] = sOutline + String::CreateFromInt32( i+1 );
}
OUString sStyle( SW_RESSTR(STR_FDLG_STYLE) );
- for(USHORT i = 0; i < nStyleCount; ++i)
+ for(sal_uInt16 i = 0; i < nStyleCount; ++i)
{
SwTxtFmtColl &rTxtColl =
*pDoc->GetTxtFmtColls()->GetObject( i );
@@ -1469,9 +1457,9 @@ void SwDocShell::Execute(SfxRequest& rReq)
//<-end,zhaojianwei
if( aFileName.Len() )
{
- if( PrepareClose( FALSE ) )
+ if( PrepareClose( sal_False ) )
{
- SwWait aWait( *this, TRUE );
+ SwWait aWait( *this, sal_True );
//bDone = bCreateHtml //#outline level,removed by zhaojianwei
// ? pDoc->GenerateHTMLDoc( aFileName, pSplitColl )
@@ -1533,10 +1521,10 @@ void SwDocShell::Execute(SfxRequest& rReq)
break;
case SID_ATTR_YEAR2000:
- if ( pArgs && SFX_ITEM_SET == pArgs->GetItemState( nWhich , FALSE, &pItem ))
+ if ( pArgs && SFX_ITEM_SET == pArgs->GetItemState( nWhich , sal_False, &pItem ))
{
DBG_ASSERT(pItem->ISA(SfxUInt16Item), "falsches Item");
- USHORT nYear2K = ((SfxUInt16Item*)pItem)->GetValue();
+ sal_uInt16 nYear2K = ((SfxUInt16Item*)pItem)->GetValue();
//ueber Views iterieren und den State an den FormShells setzen
SfxViewFrame* pVFrame = SfxViewFrame::GetFirst( this );
@@ -1551,7 +1539,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
pViewShell = pVFrame ? pVFrame->GetViewShell() : 0;
pCurrView = dynamic_cast<SwView*>( pViewShell );
}
- pDoc->GetNumberFormatter(TRUE)->SetYear2000(nYear2K);
+ pDoc->GetNumberFormatter(sal_True)->SetYear2000(nYear2K);
}
break;
@@ -1624,25 +1612,27 @@ void SwDocShell::FillClass( SvGlobalName * pClassName,
Beschreibung:
--------------------------------------------------------------------*/
-void SwDocShell::SetModified( BOOL bSet )
+void SwDocShell::SetModified( sal_Bool bSet )
{
SfxObjectShell::SetModified( bSet );
if( IsEnableSetModified())
{
if (!pDoc->IsInCallModified() )
{
- EnableSetModified( FALSE );
+ EnableSetModified( sal_False );
if( bSet )
{
- BOOL bOld = pDoc->IsModified();
+ sal_Bool bOld = pDoc->IsModified();
pDoc->SetModified();
if( !bOld )
- pDoc->SetUndoNoResetModified();
+ {
+ pDoc->GetIDocumentUndoRedo().SetUndoNoResetModified();
+ }
}
else
pDoc->ResetModified();
- EnableSetModified( TRUE );
+ EnableSetModified( sal_True );
}
UpdateChildWindows();
@@ -1690,16 +1680,13 @@ class SwReloadFromHtmlReader : public SwReader
// <--
void SwDocShell::ReloadFromHtml( const String& rStreamName, SwSrcView* pSrcView )
{
- BOOL bModified = IsModified();
+ sal_Bool bModified = IsModified();
// MIB 23.6.97: Die HTTP-Header-Felder muessen geloescht werden,
// sonst gibt es welche aus Meta-Tags hinter doppelt und dreifach.
ClearHeaderAttributesForSourceViewHack();
// MIB 24.07.97: Das Dokument-Basic muss auch noch d'ran glauben ...
- // Ein EnterBasicCall braucht man hier nicht, weil man nichts ruft und
- // in HTML-Dokument kein Dok-Basic vorhanden sein kann, das noch nicht
- // geladen wurde.
SvxHtmlOptions* pHtmlOptions = SvxHtmlOptions::Get();
//#59620# HasBasic() zeigt an, dass es schon einen BasicManager an der DocShell
// gibt. Der wurde im HTML-Import immer angelegt, wenn Macros im Quelltext
@@ -1709,7 +1696,7 @@ void SwDocShell::ReloadFromHtml( const String& rStreamName, SwSrcView* pSrcView
BasicManager *pBasicMan = GetBasicManager();
if( pBasicMan && (pBasicMan != SFX_APP()->GetBasicManager()) )
{
- USHORT nLibCount = pBasicMan->GetLibCount();
+ sal_uInt16 nLibCount = pBasicMan->GetLibCount();
while( nLibCount )
{
StarBASIC *pBasic = pBasicMan->GetLib( --nLibCount );
@@ -1726,7 +1713,7 @@ void SwDocShell::ReloadFromHtml( const String& rStreamName, SwSrcView* pSrcView
// Aus der Standard-Lib werden nur die Module geloescht
if( nLibCount )
- pBasicMan->RemoveLib( nLibCount, TRUE );
+ pBasicMan->RemoveLib( nLibCount, sal_True );
else
pBasic->Clear();
}
@@ -1763,7 +1750,7 @@ void SwDocShell::ReloadFromHtml( const String& rStreamName, SwSrcView* pSrcView
SubInitNew();
- SfxMedium aMed( rStreamName, STREAM_READ, FALSE );
+ SfxMedium aMed( rStreamName, STREAM_READ, sal_False );
// --> OD 2005-08-01 #i48748# - use class <SwReloadFromHtmlReader>, because
// the base URL has to be set to the filename of the document <rMedname>
// and not to the base URL of the temporary file <aMed> in order to get
@@ -1779,7 +1766,7 @@ void SwDocShell::ReloadFromHtml( const String& rStreamName, SwSrcView* pSrcView
{
SwWrtShell& rWrtSh = pCurrView->GetWrtShell();
if( rWrtSh.GetLayout())
- rWrtSh.CheckBrowseView( TRUE );
+ rWrtSh.CheckBrowseView( sal_True );
}
@@ -1797,7 +1784,7 @@ void SwDocShell::ReloadFromHtml( const String& rStreamName, SwSrcView* pSrcView
/* -----------------------------14.12.99 16:52--------------------------------
---------------------------------------------------------------------------*/
-void SwDocShell::ToggleBrowserMode(BOOL bSet, SwView* _pView )
+void SwDocShell::ToggleBrowserMode(sal_Bool bSet, SwView* _pView )
{
GetDoc()->set(IDocumentSettingAccess::BROWSE_MODE, bSet );
UpdateFontList();
@@ -1822,15 +1809,15 @@ void SwDocShell::ToggleBrowserMode(BOOL bSet, SwView* _pView )
// Currently there can be only one view (layout) if the document is viewed in Web layout
// So if there are more views we are in print layout and for toggling to Web layout all other views must be closed
- SfxViewFrame *pTmpFrm = SfxViewFrame::GetFirst(this, FALSE);
+ SfxViewFrame *pTmpFrm = SfxViewFrame::GetFirst(this, sal_False);
do {
if( pTmpFrm != pTempView->GetViewFrame() )
{
pTmpFrm->DoClose();
- pTmpFrm = SfxViewFrame::GetFirst(this, FALSE);
+ pTmpFrm = SfxViewFrame::GetFirst(this, sal_False);
}
else
- pTmpFrm = pTmpFrm->GetNext(*pTmpFrm, this, FALSE);
+ pTmpFrm = pTmpFrm->GetNext(*pTmpFrm, this, sal_False);
} while ( pTmpFrm );
@@ -1839,7 +1826,7 @@ void SwDocShell::ToggleBrowserMode(BOOL bSet, SwView* _pView )
// set view columns before toggling:
if ( bSet )
{
- const USHORT nColumns = rViewOptions.GetViewLayoutColumns();
+ const sal_uInt16 nColumns = rViewOptions.GetViewLayoutColumns();
const bool bBookMode = rViewOptions.IsViewLayoutBookMode();
if ( 1 != nColumns || bBookMode )
{
@@ -1848,7 +1835,7 @@ void SwDocShell::ToggleBrowserMode(BOOL bSet, SwView* _pView )
}
// Triggeres a formatting:
- pTempView->GetWrtShell().CheckBrowseView( TRUE );
+ pTempView->GetWrtShell().CheckBrowseView( sal_True );
pTempView->CheckVisArea();
if( GetDoc()->get(IDocumentSettingAccess::BROWSE_MODE) )
@@ -1865,10 +1852,10 @@ void SwDocShell::ToggleBrowserMode(BOOL bSet, SwView* _pView )
}
}
-ULONG SwDocShell::LoadStylesFromFile( const String& rURL,
- SwgReaderOption& rOpt, BOOL bUnoCall )
+sal_uLong SwDocShell::LoadStylesFromFile( const String& rURL,
+ SwgReaderOption& rOpt, sal_Bool bUnoCall )
{
- ULONG nErr = 0;
+ sal_uLong nErr = 0;
// Create a URL from filename
INetURLObject aURLObj( rURL );
@@ -1884,14 +1871,14 @@ ULONG SwDocShell::LoadStylesFromFile( const String& rURL,
SfxFilterMatcher aMatcher( sFactory );
//#b6445961# search for filter in WebDocShell, too
- SfxMedium aMed( rURL, STREAM_STD_READ, FALSE );
+ SfxMedium aMed( rURL, STREAM_STD_READ, sal_False );
const SfxFilter* pFlt = 0;
- aMatcher.DetectFilter( aMed, &pFlt, FALSE, FALSE );
+ aMatcher.DetectFilter( aMed, &pFlt, sal_False, sal_False );
if(!pFlt)
{
String sWebFactory(String::CreateFromAscii(SwWebDocShell::Factory().GetShortName()));
SfxFilterMatcher aWebMatcher( sWebFactory );
- aWebMatcher.DetectFilter( aMed, &pFlt, FALSE, FALSE );
+ aWebMatcher.DetectFilter( aMed, &pFlt, sal_False, sal_False );
}
if( aMed.IsStorage() )
{
diff --git a/sw/source/ui/app/docshini.cxx b/sw/source/ui/app/docshini.cxx
index 3876f8e124..130c2cf124 100644
--- a/sw/source/ui/app/docshini.cxx
+++ b/sw/source/ui/app/docshini.cxx
@@ -170,30 +170,30 @@ sal_Bool SwDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor )
SfxPrinter* pPrt = pDoc->getPrinter( false );
String sEntry;
- USHORT aFontWhich[] =
+ sal_uInt16 aFontWhich[] =
{ RES_CHRATR_FONT,
RES_CHRATR_CJK_FONT,
RES_CHRATR_CTL_FONT
};
- USHORT aFontHeightWhich[] =
+ sal_uInt16 aFontHeightWhich[] =
{
RES_CHRATR_FONTSIZE,
RES_CHRATR_CJK_FONTSIZE,
RES_CHRATR_CTL_FONTSIZE
};
- USHORT aFontIds[] =
+ sal_uInt16 aFontIds[] =
{
FONT_STANDARD,
FONT_STANDARD_CJK,
FONT_STANDARD_CTL
};
- USHORT nFontTypes[] =
+ sal_uInt16 nFontTypes[] =
{
DEFAULTFONT_LATIN_TEXT,
DEFAULTFONT_CJK_TEXT,
DEFAULTFONT_CTL_TEXT
};
- USHORT aLangTypes[] =
+ sal_uInt16 aLangTypes[] =
{
RES_CHRATR_LANGUAGE,
RES_CHRATR_CJK_LANGUAGE,
@@ -202,8 +202,8 @@ sal_Bool SwDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor )
for(sal_uInt8 i = 0; i < 3; i++)
{
- USHORT nFontWhich = aFontWhich[i];
- USHORT nFontId = aFontIds[i];
+ sal_uInt16 nFontWhich = aFontWhich[i];
+ sal_uInt16 nFontId = aFontIds[i];
SvxFontItem* pFontItem = 0;
const SvxLanguageItem& rLang = (const SvxLanguageItem&)pDoc->GetDefault( aLangTypes[i] );
LanguageType eLanguage = rLang.GetLanguage();
@@ -260,7 +260,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,
@@ -276,8 +276,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)
{
@@ -338,14 +338,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
@@ -592,10 +592,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;
@@ -703,10 +703,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 );
}
}
}
@@ -723,7 +723,7 @@ sal_Bool SwDocShell::LoadFrom( SfxMedium& rMedium )
if( !pFltr || !pFltr->GetUserData().EqualsAscii( FILTER_SWG ))
break;
- SfxMedium aMed( rNm, STREAM_STD_READ, FALSE );
+ SfxMedium aMed( rNm, STREAM_STD_READ, sal_False );
if( 0 == ( nErr = aMed.GetInStream()->GetError() ) )
{
SwWait aWait( *this, sal_True );
@@ -786,12 +786,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 ) );
@@ -803,7 +803,7 @@ void SwDocShell::SubInitNew()
//default page mode for text grid
if(!bWeb)
{
- sal_Bool bSquaredPageMode = SW_MOD()->GetUsrPref(FALSE)->IsSquaredPageMode();
+ sal_Bool bSquaredPageMode = SW_MOD()->GetUsrPref(sal_False)->IsSquaredPageMode();
pDoc->SetDefaultPageMode( bSquaredPageMode );
}
diff --git a/sw/source/ui/app/docst.cxx b/sw/source/ui/app/docst.cxx
index 487d83b6f0..cd2dc95ed1 100644
--- a/sw/source/ui/app/docst.cxx
+++ b/sw/source/ui/app/docst.cxx
@@ -27,6 +27,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>
@@ -52,7 +53,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"
@@ -62,7 +64,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"
@@ -95,8 +98,8 @@ using namespace ::com::sun::star;
void SwDocShell::StateStyleSheet(SfxItemSet& rSet, SwWrtShell* pSh)
{
SfxWhichIter aIter(rSet);
- USHORT nWhich = aIter.FirstWhich();
- USHORT nActualFamily = USHRT_MAX;
+ sal_uInt16 nWhich = aIter.FirstWhich();
+ sal_uInt16 nActualFamily = USHRT_MAX;
SwWrtShell* pShell = pSh ? pSh : GetWrtShell();
if(!pShell)
@@ -113,7 +116,7 @@ void SwDocShell::StateStyleSheet(SfxItemSet& rSet, SwWrtShell* pSh)
SfxViewFrame* pFrame = pShell->GetView().GetViewFrame();
const ISfxTemplateCommon* pCommon = SFX_APP()->GetCurrentTemplateCommon(pFrame->GetBindings());
if( pCommon )
- nActualFamily = static_cast< USHORT >(pCommon->GetActualFamily());
+ nActualFamily = static_cast< sal_uInt16 >(pCommon->GetActualFamily());
}
while (nWhich)
@@ -163,12 +166,12 @@ void SwDocShell::StateStyleSheet(SfxItemSet& rSet, SwWrtShell* pSh)
SfxTemplateItem aItem(nWhich, aName);
- USHORT nMask = 0;
+ sal_uInt16 nMask = 0;
if( pDoc->get(IDocumentSettingAccess::HTML_MODE) )
nMask = SWSTYLEBIT_HTML;
else
{
- const int nSelection = pShell->GetFrmType(0,TRUE);
+ const int nSelection = pShell->GetFrmType(0,sal_True);
if(pShell->GetCurTOX())
nMask = SWSTYLEBIT_IDX ;
else if(nSelection & FRMTYPE_HEADER ||
@@ -210,7 +213,7 @@ void SwDocShell::StateStyleSheet(SfxItemSet& rSet, SwWrtShell* pSh)
rSet.DisableItem( nWhich );
else
{
- USHORT n = pShell->GetCurPageDesc( FALSE );
+ sal_uInt16 n = pShell->GetCurPageDesc( sal_False );
if( n < pShell->GetPageDescCnt() )
aName = pShell->GetPageDesc( n ).GetName();
@@ -271,42 +274,42 @@ void SwDocShell::StateStyleSheet(SfxItemSet& rSet, SwWrtShell* pSh)
void SwDocShell::ExecStyleSheet( SfxRequest& rReq )
{
- USHORT nSlot = rReq.GetSlot();
- USHORT nRet = 0xffff;
+ sal_uInt16 nSlot = rReq.GetSlot();
+ sal_uInt16 nRet = 0xffff;
const SfxItemSet* pArgs = rReq.GetArgs();
const SfxPoolItem* pItem;
SwWrtShell* pActShell = 0;
- BOOL bSetReturn = TRUE;
+ sal_Bool bSetReturn = sal_True;
switch (nSlot)
{
case SID_STYLE_NEW:
if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( SID_STYLE_FAMILY,
- FALSE, &pItem ))
+ sal_False, &pItem ))
{
- USHORT nFamily = ((const SfxUInt16Item*)pItem)->GetValue();
+ sal_uInt16 nFamily = ((const SfxUInt16Item*)pItem)->GetValue();
String sName;
- USHORT nMask = 0;
+ sal_uInt16 nMask = 0;
if( SFX_ITEM_SET == pArgs->GetItemState( SID_STYLE_NEW,
- FALSE, &pItem ))
+ sal_False, &pItem ))
sName = ((const SfxStringItem*)pItem)->GetValue();
if( SFX_ITEM_SET == pArgs->GetItemState( SID_STYLE_MASK,
- FALSE, &pItem ))
+ sal_False, &pItem ))
nMask = ((const SfxUInt16Item*)pItem)->GetValue();
String sParent;
if( SFX_ITEM_SET == pArgs->GetItemState( SID_STYLE_REFERENCE,
- FALSE, &pItem ))
+ sal_False, &pItem ))
sParent = ((const SfxStringItem*)pItem)->GetValue();
- nRet = Edit( sName, sParent, nFamily, nMask, TRUE, FALSE, 0, rReq.IsAPI() );
+ nRet = Edit( sName, sParent, nFamily, nMask, sal_True, sal_False, 0, rReq.IsAPI() );
}
break;
case SID_STYLE_APPLY:
if( !pArgs )
{
- GetView()->GetViewFrame()->GetDispatcher()->Execute(SID_STYLE_DESIGNER, FALSE);
+ GetView()->GetViewFrame()->GetDispatcher()->Execute(SID_STYLE_DESIGNER, sal_False);
break;
}
else
@@ -345,8 +348,8 @@ void SwDocShell::ExecStyleSheet( SfxRequest& rReq )
case SID_STYLE_NEW_BY_EXAMPLE:
{
String aParam;
- USHORT nFamily = SFX_STYLE_FAMILY_PARA;
- USHORT nMask = 0;
+ sal_uInt16 nFamily = SFX_STYLE_FAMILY_PARA;
+ sal_uInt16 nMask = 0;
if( !pArgs )
{
@@ -386,14 +389,14 @@ void SwDocShell::ExecStyleSheet( SfxRequest& rReq )
ASSERT( pArgs->Count(), "SfxBug ItemSet ist leer");
SwWrtShell* pShell = GetWrtShell();
- if( SFX_ITEM_SET == pArgs->GetItemState(nSlot, FALSE, &pItem ))
+ if( SFX_ITEM_SET == pArgs->GetItemState(nSlot, sal_False, &pItem ))
aParam = ((const SfxStringItem*)pItem)->GetValue();
if( SFX_ITEM_SET == pArgs->GetItemState(SID_STYLE_FAMILY,
- FALSE, &pItem ))
+ sal_False, &pItem ))
nFamily = ((const SfxUInt16Item*)pItem)->GetValue();
- if( SFX_ITEM_SET == pArgs->GetItemState(SID_STYLE_FAMILYNAME, FALSE, &pItem ))
+ if( SFX_ITEM_SET == pArgs->GetItemState(SID_STYLE_FAMILYNAME, sal_False, &pItem ))
{
String aFamily = ((const SfxStringItem*)pItem)->GetValue();
if(aFamily.CompareToAscii("CharacterStyles") == COMPARE_EQUAL)
@@ -413,10 +416,10 @@ void SwDocShell::ExecStyleSheet( SfxRequest& rReq )
}
if( SFX_ITEM_SET == pArgs->GetItemState(SID_STYLE_MASK,
- FALSE, &pItem ))
+ sal_False, &pItem ))
nMask = ((const SfxUInt16Item*)pItem)->GetValue();
if( SFX_ITEM_SET == pArgs->GetItemState(FN_PARAM_WRTSHELL,
- FALSE, &pItem ))
+ sal_False, &pItem ))
pActShell = pShell = (SwWrtShell*)((SwPtrItem*)pItem)->GetValue();
if( nSlot == SID_STYLE_UPDATE_BY_EXAMPLE )
@@ -445,7 +448,7 @@ void SwDocShell::ExecStyleSheet( SfxRequest& rReq )
}
break;
case SFX_STYLE_FAMILY_PSEUDO:
- if(SFX_ITEM_SET == pArgs->GetItemState(SID_STYLE_UPD_BY_EX_NAME, FALSE, &pItem))
+ if(SFX_ITEM_SET == pArgs->GetItemState(SID_STYLE_UPD_BY_EX_NAME, sal_False, &pItem))
{
aParam = ((const SfxStringItem*)pItem)->GetValue();
}
@@ -459,7 +462,7 @@ void SwDocShell::ExecStyleSheet( SfxRequest& rReq )
switch(nSlot)
{
case SID_STYLE_EDIT:
- nRet = Edit(aParam, aEmptyStr, nFamily, nMask, FALSE, FALSE, pActShell );
+ nRet = Edit(aParam, aEmptyStr, nFamily, nMask, sal_False, sal_False, pActShell );
break;
case SID_STYLE_DELETE:
nRet = Delete(aParam, nFamily);
@@ -497,7 +500,7 @@ void SwDocShell::ExecStyleSheet( SfxRequest& rReq )
if(bSetReturn)
{
- if(rReq.IsAPI()) // Basic bekommt nur TRUE oder FALSE
+ if(rReq.IsAPI()) // Basic bekommt nur sal_True oder sal_False
rReq.SetReturnValue(SfxUInt16Item(nSlot, nRet !=0));
else
rReq.SetReturnValue(SfxUInt16Item(nSlot, nRet));
@@ -510,15 +513,15 @@ void SwDocShell::ExecStyleSheet( SfxRequest& rReq )
--------------------------------------------------------------------*/
-USHORT SwDocShell::Edit( const String &rName, const String &rParent, USHORT nFamily, USHORT nMask,
- BOOL bNew, BOOL bColumn, SwWrtShell* pActShell,
- BOOL bBasic )
+sal_uInt16 SwDocShell::Edit( const String &rName, const String &rParent, sal_uInt16 nFamily, sal_uInt16 nMask,
+ sal_Bool bNew, sal_Bool bColumn, SwWrtShell* pActShell,
+ sal_Bool bBasic )
{
ASSERT(GetWrtShell(), "Keine Shell, keine Styles");
SfxStyleSheetBase *pStyle = 0;
- USHORT nRet = nMask;
- BOOL bModified = pDoc->IsModified();
+ sal_uInt16 nRet = nMask;
+ sal_Bool bModified = pDoc->IsModified();
if( bNew )
{
@@ -540,7 +543,7 @@ USHORT SwDocShell::Edit( const String &rName, const String &rParent, USHORT nFam
SwTxtFmtColl* pColl = pWrtShell->FindTxtFmtCollByName( rParent );
if(!pColl)
{
- USHORT nId = SwStyleNameMapper::GetPoolIdFromUIName(rParent, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL);
+ sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName(rParent, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL);
if(USHRT_MAX != nId)
pColl = pWrtShell->GetTxtCollFromPool( nId );
}
@@ -577,7 +580,7 @@ USHORT SwDocShell::Edit( const String &rName, const String &rParent, USHORT nFam
SwCharFmt* pCFmt = pWrtShell->FindCharFmtByName( rParent );
if(!pCFmt)
{
- USHORT nId = SwStyleNameMapper::GetPoolIdFromUIName(rParent, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT);
+ sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName(rParent, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT);
if(USHRT_MAX != nId)
pCFmt = pWrtShell->GetCharFmtFromPool( nId );
}
@@ -601,7 +604,7 @@ USHORT SwDocShell::Edit( const String &rName, const String &rParent, USHORT nFam
SwFrmFmt* pFFmt = pWrtShell->GetDoc()->FindFrmFmtByName( rParent );
if(!pFFmt)
{
- USHORT nId = SwStyleNameMapper::GetPoolIdFromUIName(rParent, nsSwGetPoolIdFromName::GET_POOLID_FRMFMT);
+ sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName(rParent, nsSwGetPoolIdFromName::GET_POOLID_FRMFMT);
if(USHRT_MAX != nId)
pFFmt = pWrtShell->GetFrmFmtFromPool( nId );
}
@@ -619,7 +622,7 @@ USHORT SwDocShell::Edit( const String &rName, const String &rParent, USHORT nFam
}
if(!pStyle)
- return FALSE;
+ return sal_False;
// Dialoge zusammenstoepseln
//
@@ -652,7 +655,7 @@ USHORT SwDocShell::Edit( const String &rName, const String &rParent, USHORT nFam
SfxItemSet& rSet = xTmp->GetItemSet();
const SfxPoolItem *pTmpBrush;
if( SFX_ITEM_SET == rSet.GetItemState( RES_CHRATR_BACKGROUND,
- TRUE, &pTmpBrush ) )
+ sal_True, &pTmpBrush ) )
{
SvxBrushItem aTmpBrush( *((SvxBrushItem*)pTmpBrush) );
aTmpBrush.SetWhich( RES_BACKGROUND );
@@ -662,7 +665,7 @@ USHORT SwDocShell::Edit( const String &rName, const String &rParent, USHORT nFam
if (!bBasic)
{
// vor dem Dialog wird der HtmlMode an der DocShell versenkt
- USHORT nHtmlMode = ::GetHtmlMode(this);
+ sal_uInt16 nHtmlMode = ::GetHtmlMode(this);
// In HTML mode, we do not always have a printer. In order to show
// the correct page size in the Format - Page dialog, we have to
@@ -674,7 +677,7 @@ USHORT SwDocShell::Edit( const String &rName, const String &rParent, USHORT nFam
PutItem(SfxUInt16Item(SID_HTML_MODE, nHtmlMode));
FieldUnit eMetric = ::GetDfltMetric(0 != (HTMLMODE_ON&nHtmlMode));
- SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< UINT16 >(eMetric)));
+ SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric)));
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
DBG_ASSERT(pFact, "Dialogdiet fail!");
SfxAbstractTabDialog* pDlg = pFact->CreateTemplateDialog( DLG_TEMPLATE_BASE,
@@ -709,7 +712,7 @@ USHORT SwDocShell::Edit( const String &rName, const String &rParent, USHORT nFam
{
if(SFX_STYLE_FAMILY_PAGE == nFamily)
{
- static const USHORT aInval[] = {
+ static const sal_uInt16 aInval[] = {
SID_IMAGE_ORIENTATION,
SID_ATTR_CHAR_FONT,
FN_INSERT_CTRL, FN_INSERT_OBJ_CTRL, 0};
@@ -720,7 +723,7 @@ USHORT SwDocShell::Edit( const String &rName, const String &rParent, USHORT nFam
{
const SfxPoolItem *pTmpBrush;
if( SFX_ITEM_SET == aTmpSet.GetItemState( RES_BACKGROUND,
- FALSE, &pTmpBrush ) )
+ sal_False, &pTmpBrush ) )
{
SvxBrushItem aTmpBrush( *((SvxBrushItem*)pTmpBrush) );
aTmpBrush.SetWhich( RES_CHRATR_BACKGROUND );
@@ -733,7 +736,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 );
}
}
@@ -751,7 +754,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();
}
@@ -761,8 +766,8 @@ USHORT SwDocShell::Edit( const String &rName, const String &rParent, USHORT nFam
{
// #116530#
//pBasePool->Erase( &aTmp );
- GetWrtShell()->Undo(UNDO_EMPTY, 1);
- pDoc->ClearRedo();
+ GetWrtShell()->Undo(1);
+ pDoc->GetIDocumentUndoRedo().ClearRedo();
}
if( !bModified )
@@ -796,7 +801,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 );
@@ -814,7 +819,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();
}
@@ -826,7 +833,7 @@ USHORT SwDocShell::Edit( const String &rName, const String &rParent, USHORT nFam
--------------------------------------------------------------------*/
-USHORT SwDocShell::Delete(const String &rName, USHORT nFamily)
+sal_uInt16 SwDocShell::Delete(const String &rName, sal_uInt16 nFamily)
{
SfxStyleSheetBase *pStyle = mxBasePool->Find(rName, (SfxStyleFamily)nFamily);
@@ -838,9 +845,9 @@ USHORT SwDocShell::Delete(const String &rName, USHORT nFamily)
mxBasePool->Remove(pStyle);
GetWrtShell()->EndAllAction();
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
/*--------------------------------------------------------------------
@@ -848,15 +855,15 @@ USHORT SwDocShell::Delete(const String &rName, USHORT nFamily)
--------------------------------------------------------------------*/
-USHORT SwDocShell::ApplyStyles(const String &rName, USHORT nFamily,
- SwWrtShell* pShell, USHORT nMode )
+sal_uInt16 SwDocShell::ApplyStyles(const String &rName, sal_uInt16 nFamily,
+ SwWrtShell* pShell, sal_uInt16 nMode )
{
SwDocStyleSheet* pStyle =
(SwDocStyleSheet*)mxBasePool->Find(rName, (SfxStyleFamily)nFamily);
ASSERT(pStyle, "Wo ist der StyleSheet");
if(!pStyle)
- return FALSE;
+ return sal_False;
SwWrtShell *pSh = pShell ? pShell : GetWrtShell();
@@ -919,15 +926,15 @@ USHORT SwDocShell::ApplyStyles(const String &rName, USHORT nFamily,
-USHORT SwDocShell::DoWaterCan(const String &rName, USHORT nFamily)
+sal_uInt16 SwDocShell::DoWaterCan(const String &rName, sal_uInt16 nFamily)
{
ASSERT(GetWrtShell(), "Keine Shell, keine Styles");
SwEditWin& rEdtWin = pView->GetEditWin();
SwApplyTemplate* pApply = rEdtWin.GetApplyTemplate();
- BOOL bWaterCan = !(pApply && pApply->eType != 0);
+ sal_Bool bWaterCan = !(pApply && pApply->eType != 0);
if( !rName.Len() )
- bWaterCan = FALSE;
+ bWaterCan = sal_False;
SwApplyTemplate aTemplate;
aTemplate.eType = nFamily;
@@ -975,7 +982,7 @@ USHORT SwDocShell::DoWaterCan(const String &rName, USHORT nFamily)
--------------------------------------------------------------------*/
-USHORT SwDocShell::UpdateStyle(const String &rName, USHORT nFamily, SwWrtShell* pShell)
+sal_uInt16 SwDocShell::UpdateStyle(const String &rName, sal_uInt16 nFamily, SwWrtShell* pShell)
{
SwWrtShell* pCurrWrtShell = pShell ? pShell : GetWrtShell();
ASSERT(GetWrtShell(), "Keine Shell, keine Styles");
@@ -1003,7 +1010,7 @@ USHORT SwDocShell::UpdateStyle(const String &rName, USHORT nFamily, SwWrtShell*
// Vorlage auch anwenden, um harte Attributierung
// zu entfernen
GetWrtShell()->SetTxtFmtColl( pColl );
- GetWrtShell()->EndUndo(UNDO_INSFMTATTR, NULL);
+ GetWrtShell()->EndUndo();
GetWrtShell()->EndAllAction();
}
break;
@@ -1026,7 +1033,7 @@ USHORT SwDocShell::UpdateStyle(const String &rName, USHORT nFamily, SwWrtShell*
// Vorlage auch anwenden, um harte Attributierung
// zu entfernen
- pCurrWrtShell->SetFrmFmt( pFrm, TRUE );
+ pCurrWrtShell->SetFrmFmt( pFrm, sal_True );
pCurrWrtShell->EndAllAction();
}
}
@@ -1069,8 +1076,8 @@ USHORT SwDocShell::UpdateStyle(const String &rName, USHORT nFamily, SwWrtShell*
--------------------------------------------------------------------*/
-USHORT SwDocShell::MakeByExample( const String &rName, USHORT nFamily,
- USHORT nMask, SwWrtShell* pShell )
+sal_uInt16 SwDocShell::MakeByExample( const String &rName, sal_uInt16 nFamily,
+ sal_uInt16 nMask, SwWrtShell* pShell )
{
SwWrtShell* pCurrWrtShell = pShell ? pShell : GetWrtShell();
SwDocStyleSheet* pStyle = (SwDocStyleSheet*)mxBasePool->Find(
@@ -1102,7 +1109,7 @@ USHORT SwDocShell::MakeByExample( const String &rName, USHORT nFamily,
pColl->SetDerivedFrom(pCurrWrtShell->GetCurTxtFmtColl());
// setze die Maske noch an der Collection:
- USHORT nId = pColl->GetPoolFmtId() & 0x87ff;
+ sal_uInt16 nId = pColl->GetPoolFmtId() & 0x87ff;
switch( nMask & 0x0fff )
{
case SWSTYLEBIT_TEXT:
@@ -1148,12 +1155,12 @@ USHORT SwDocShell::MakeByExample( const String &rName, USHORT nFamily,
/* #61359# jetzt auch wieder alle Orientierungen
const SfxPoolItem* pItem;
if( SFX_ITEM_SET == aSet.GetItemState( RES_VERT_ORIENT,
- FALSE, &pItem ) &&
+ sal_False, &pItem ) &&
text::VertOrientation::NONE == ((SwFmtVertOrient*)pItem)->GetVertOrient())
aSet.ClearItem( RES_VERT_ORIENT );
if( SFX_ITEM_SET == aSet.GetItemState( RES_HORI_ORIENT,
- FALSE, &pItem ) &&
+ sal_False, &pItem ) &&
text::HoriOrientation::NONE == ((SwFmtHoriOrient*)pItem)->GetHoriOrient())
aSet.ClearItem( RES_HORI_ORIENT );
*/
@@ -1184,13 +1191,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 );
@@ -1200,7 +1207,7 @@ USHORT SwDocShell::MakeByExample( const String &rName, USHORT nFamily,
rDest.SetPoolHlpFileId( nHFId );
// werden Kopf-/Fusszeilen angelegt, so gibt es kein Undo mehr!
- pCurrWrtShell->GetDoc()->DelAllUndoObj();
+ pCurrWrtShell->GetDoc()->GetIDocumentUndoRedo().DelAllUndoObj();
pCurrWrtShell->EndAllAction();
}
@@ -1230,7 +1237,7 @@ USHORT SwDocShell::MakeByExample( const String &rName, USHORT nFamily,
void SwDocShell::LoadStyles( SfxObjectShell& rSource )
{
- _LoadStyles(rSource, FALSE);
+ _LoadStyles(rSource, sal_False);
}
/* -----------------16.05.2003 15:45-----------------
bPreserveCurrentDocument determines whether SetFixFields() is called
@@ -1239,7 +1246,7 @@ void SwDocShell::LoadStyles( SfxObjectShell& rSource )
Calls of ::LoadStyles() normally use files especially loaded for the purpose
of importing styles.
--------------------------------------------------*/
-void SwDocShell::_LoadStyles( SfxObjectShell& rSource, BOOL bPreserveCurrentDocument )
+void SwDocShell::_LoadStyles( SfxObjectShell& rSource, sal_Bool bPreserveCurrentDocument )
{
/* [Beschreibung]
@@ -1268,13 +1275,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 )
{
// die View wird spaeter angelegt, ueberschreibt aber das
// Modify-Flag. Per Undo ist sowieso nichts mehr zu machen
- pDoc->SetUndoNoResetModified();
+ pDoc->GetIDocumentUndoRedo().SetUndoNoResetModified();
}
}
}
@@ -1283,9 +1290,9 @@ void SwDocShell::_LoadStyles( SfxObjectShell& rSource, BOOL bPreserveCurrentDocu
}
-void SwDocShell::FormatPage( const String& rPage, BOOL bColumn, SwWrtShell* pActShell )
+void SwDocShell::FormatPage( const String& rPage, sal_Bool bColumn, SwWrtShell* pActShell )
{
- Edit( rPage, aEmptyStr, SFX_STYLE_FAMILY_PAGE, 0, FALSE, bColumn, pActShell);
+ Edit( rPage, aEmptyStr, SFX_STYLE_FAMILY_PAGE, 0, sal_False, bColumn, pActShell);
}
Bitmap SwDocShell::GetStyleFamilyBitmap( SfxStyleFamily eFamily, BmpColorMode eColorMode )
diff --git a/sw/source/ui/app/docstyle.cxx b/sw/source/ui/app/docstyle.cxx
index b368f2fce6..15f8d5ef47 100644
--- a/sw/source/ui/app/docstyle.cxx
+++ b/sw/source/ui/app/docstyle.cxx
@@ -54,6 +54,7 @@
#include <docary.hxx>
#include <ccoll.hxx>
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <cmdid.h>
#include <swstyle.h>
#include <app.hrc>
@@ -68,7 +69,6 @@
#include <svx/svxids.hrc>
// --> OD 2008-02-12 #newlistlevelattrs#
#include <SwRewriter.hxx>
-#include <undobj.hxx>
// <--
// MD 06.02.95: Die Formatnamen in der Liste aller Namen haben als
@@ -84,7 +84,7 @@
// die Familie wird neu generiert.
// Ausserdem gibt es jetzt zusaetzlich das Bit bPhysical. Ist dieses Bit
-// TRUE, werden die Pool-Formatnamen NICHT mit eingetragen.
+// sal_True, werden die Pool-Formatnamen NICHT mit eingetragen.
class SwImplShellAction
{
@@ -129,7 +129,7 @@ SwImplShellAction::~SwImplShellAction()
SwCharFmt* lcl_FindCharFmt( SwDoc& rDoc,
const String& rName,
SwDocStyleSheet* pStyle = 0,
- BOOL bCreate = TRUE )
+ sal_Bool bCreate = sal_True )
{
SwCharFmt* pFmt = 0;
if( rName.Len() )
@@ -144,7 +144,7 @@ SwCharFmt* lcl_FindCharFmt( SwDoc& rDoc,
if( !pFmt && bCreate )
{ // Pool abklappern
- const USHORT nId = SwStyleNameMapper::GetPoolIdFromUIName(rName, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT);
+ const sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName(rName, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT);
if(nId != USHRT_MAX)
pFmt = rDoc.GetCharFmtFromPool(nId);
}
@@ -153,7 +153,7 @@ SwCharFmt* lcl_FindCharFmt( SwDoc& rDoc,
{
if(pFmt)
{
- pStyle->SetPhysical(TRUE);
+ pStyle->SetPhysical(sal_True);
SwFmt* p = pFmt->DerivedFrom();
if( p && !p->IsDefault() )
pStyle->PresetParent( p->GetName() );
@@ -161,7 +161,7 @@ SwCharFmt* lcl_FindCharFmt( SwDoc& rDoc,
pStyle->PresetParent( aEmptyStr );
}
else
- pStyle->SetPhysical(FALSE);
+ pStyle->SetPhysical(sal_False);
}
return pFmt;
}
@@ -175,7 +175,7 @@ SwCharFmt* lcl_FindCharFmt( SwDoc& rDoc,
SwTxtFmtColl* lcl_FindParaFmt( SwDoc& rDoc,
const String& rName,
SwDocStyleSheet* pStyle = 0,
- BOOL bCreate = TRUE )
+ sal_Bool bCreate = sal_True )
{
SwTxtFmtColl* pColl = 0;
@@ -184,7 +184,7 @@ SwTxtFmtColl* lcl_FindParaFmt( SwDoc& rDoc,
pColl = rDoc.FindTxtFmtCollByName( rName );
if( !pColl && bCreate )
{ // Pool abklappern
- const USHORT nId = SwStyleNameMapper::GetPoolIdFromUIName(rName, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL);
+ const sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName(rName, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL);
if(nId != USHRT_MAX)
pColl = rDoc.GetTxtCollFromPool(nId);
}
@@ -194,7 +194,7 @@ SwTxtFmtColl* lcl_FindParaFmt( SwDoc& rDoc,
{
if(pColl)
{
- pStyle->SetPhysical(TRUE);
+ pStyle->SetPhysical(sal_True);
if( pColl->DerivedFrom() && !pColl->DerivedFrom()->IsDefault() )
pStyle->PresetParent( pColl->DerivedFrom()->GetName() );
else
@@ -204,7 +204,7 @@ SwTxtFmtColl* lcl_FindParaFmt( SwDoc& rDoc,
pStyle->PresetFollow(rNext.GetName());
}
else
- pStyle->SetPhysical(FALSE);
+ pStyle->SetPhysical(sal_False);
}
return pColl;
}
@@ -218,7 +218,7 @@ SwTxtFmtColl* lcl_FindParaFmt( SwDoc& rDoc,
SwFrmFmt* lcl_FindFrmFmt( SwDoc& rDoc,
const String& rName,
SwDocStyleSheet* pStyle = 0,
- BOOL bCreate = TRUE )
+ sal_Bool bCreate = sal_True )
{
SwFrmFmt* pFmt = 0;
if( rName.Len() )
@@ -226,7 +226,7 @@ SwFrmFmt* lcl_FindFrmFmt( SwDoc& rDoc,
pFmt = rDoc.FindFrmFmtByName( rName );
if( !pFmt && bCreate )
{ // Pool abklappern
- const USHORT nId = SwStyleNameMapper::GetPoolIdFromUIName(rName, nsSwGetPoolIdFromName::GET_POOLID_FRMFMT);
+ const sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName(rName, nsSwGetPoolIdFromName::GET_POOLID_FRMFMT);
if(nId != USHRT_MAX)
pFmt = rDoc.GetFrmFmtFromPool(nId);
}
@@ -236,14 +236,14 @@ SwFrmFmt* lcl_FindFrmFmt( SwDoc& rDoc,
{
if(pFmt)
{
- pStyle->SetPhysical(TRUE);
+ pStyle->SetPhysical(sal_True);
if( pFmt->DerivedFrom() && !pFmt->DerivedFrom()->IsDefault() )
pStyle->PresetParent( pFmt->DerivedFrom()->GetName() );
else
pStyle->PresetParent( aEmptyStr );
}
else
- pStyle->SetPhysical(FALSE);
+ pStyle->SetPhysical(sal_False);
}
return pFmt;
}
@@ -256,7 +256,7 @@ SwFrmFmt* lcl_FindFrmFmt( SwDoc& rDoc,
const SwPageDesc* lcl_FindPageDesc( SwDoc& rDoc,
const String& rName,
SwDocStyleSheet* pStyle = 0,
- BOOL bCreate = TRUE )
+ sal_Bool bCreate = sal_True )
{
const SwPageDesc* pDesc = 0;
@@ -265,7 +265,7 @@ const SwPageDesc* lcl_FindPageDesc( SwDoc& rDoc,
pDesc = rDoc.FindPageDescByName( rName );
if( !pDesc && bCreate )
{
- USHORT nId = SwStyleNameMapper::GetPoolIdFromUIName(rName, nsSwGetPoolIdFromName::GET_POOLID_PAGEDESC);
+ sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName(rName, nsSwGetPoolIdFromName::GET_POOLID_PAGEDESC);
if(nId != USHRT_MAX)
pDesc = rDoc.GetPageDescFromPool(nId);
}
@@ -275,14 +275,14 @@ const SwPageDesc* lcl_FindPageDesc( SwDoc& rDoc,
{
if(pDesc)
{
- pStyle->SetPhysical(TRUE);
+ pStyle->SetPhysical(sal_True);
if(pDesc->GetFollow())
pStyle->PresetFollow(pDesc->GetFollow()->GetName());
else
pStyle->PresetParent( aEmptyStr );
}
else
- pStyle->SetPhysical(FALSE);
+ pStyle->SetPhysical(sal_False);
}
return pDesc;
}
@@ -290,7 +290,7 @@ const SwPageDesc* lcl_FindPageDesc( SwDoc& rDoc,
const SwNumRule* lcl_FindNumRule( SwDoc& rDoc,
const String& rName,
SwDocStyleSheet* pStyle = 0,
- BOOL bCreate = TRUE )
+ sal_Bool bCreate = sal_True )
{
const SwNumRule* pRule = 0;
@@ -299,7 +299,7 @@ const SwNumRule* lcl_FindNumRule( SwDoc& rDoc,
pRule = rDoc.FindNumRulePtr( rName );
if( !pRule && bCreate )
{
- USHORT nId = SwStyleNameMapper::GetPoolIdFromUIName(rName, nsSwGetPoolIdFromName::GET_POOLID_NUMRULE);
+ sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName(rName, nsSwGetPoolIdFromName::GET_POOLID_NUMRULE);
if(nId != USHRT_MAX)
pRule = rDoc.GetNumRuleFromPool(nId);
}
@@ -309,17 +309,17 @@ const SwNumRule* lcl_FindNumRule( SwDoc& rDoc,
{
if(pRule)
{
- pStyle->SetPhysical(TRUE);
+ pStyle->SetPhysical(sal_True);
pStyle->PresetParent( aEmptyStr );
}
else
- pStyle->SetPhysical(FALSE);
+ pStyle->SetPhysical(sal_False);
}
return pRule;
}
-USHORT lcl_FindName( const SwPoolFmtList& rLst, SfxStyleFamily eFam,
+sal_uInt16 lcl_FindName( const SwPoolFmtList& rLst, SfxStyleFamily eFam,
const String& rName )
{
if( rLst.Count() )
@@ -336,30 +336,30 @@ USHORT lcl_FindName( const SwPoolFmtList& rLst, SfxStyleFamily eFam,
default:; //prevent warning
}
sSrch += rName;
- for( USHORT i=0; i < rLst.Count(); ++i )
+ for( sal_uInt16 i=0; i < rLst.Count(); ++i )
if( *rLst[i] == sSrch )
return i;
}
return USHRT_MAX;
}
-BOOL FindPhyStyle( SwDoc& rDoc, const String& rName, SfxStyleFamily eFam )
+sal_Bool FindPhyStyle( SwDoc& rDoc, const String& rName, SfxStyleFamily eFam )
{
switch( eFam )
{
case SFX_STYLE_FAMILY_CHAR :
- return 0 != lcl_FindCharFmt( rDoc, rName, 0, FALSE );
+ return 0 != lcl_FindCharFmt( rDoc, rName, 0, sal_False );
case SFX_STYLE_FAMILY_PARA :
- return 0 != lcl_FindParaFmt( rDoc, rName, 0, FALSE );
+ return 0 != lcl_FindParaFmt( rDoc, rName, 0, sal_False );
case SFX_STYLE_FAMILY_FRAME:
- return 0 != lcl_FindFrmFmt( rDoc, rName, 0, FALSE );
+ return 0 != lcl_FindFrmFmt( rDoc, rName, 0, sal_False );
case SFX_STYLE_FAMILY_PAGE :
- return 0 != lcl_FindPageDesc( rDoc, rName, 0, FALSE );
+ return 0 != lcl_FindPageDesc( rDoc, rName, 0, sal_False );
case SFX_STYLE_FAMILY_PSEUDO:
- return 0 != lcl_FindNumRule( rDoc, rName, 0, FALSE );
+ return 0 != lcl_FindNumRule( rDoc, rName, 0, sal_False );
default:; //prevent warning
}
- return FALSE;
+ return sal_False;
}
@@ -372,7 +372,7 @@ void SwPoolFmtList::Append( char cChar, const String& rStr )
{
String* pStr = new String( cChar );
*pStr += rStr;
- for ( USHORT i=0; i < Count(); ++i )
+ for ( sal_uInt16 i=0; i < Count(); ++i )
{
if( *operator[](i) == *pStr )
{
@@ -404,7 +404,7 @@ SwDocStyleSheet::SwDocStyleSheet( SwDoc& rDocument,
const String& rName,
SwDocStyleSheetPool& _rPool,
SfxStyleFamily eFam,
- USHORT _nMask) :
+ sal_uInt16 _nMask) :
SfxStyleSheetBase( rName, _rPool, eFam, _nMask ),
pCharFmt(0),
@@ -436,7 +436,7 @@ SwDocStyleSheet::SwDocStyleSheet( SwDoc& rDocument,
SID_PARA_BACKGRND_DESTINATION, SID_ATTR_BRUSH_CHAR,
SID_ATTR_NUMBERING_RULE, SID_ATTR_NUMBERING_RULE,
0),
- bPhysical(FALSE)
+ bPhysical(sal_False)
{
nHelpId = UCHAR_MAX;
}
@@ -470,7 +470,7 @@ void SwDocStyleSheet::Reset()
aName.Erase();
aFollow.Erase();
aParent.Erase();
- SetPhysical(FALSE);
+ SetPhysical(sal_False);
}
/*--------------------------------------------------------------------
@@ -511,7 +511,7 @@ const String& SwDocStyleSheet::GetParent() const
String sTmp;
if( !pFmt ) // noch nicht vorhanden, also dflt. Parent
{
- USHORT i = SwStyleNameMapper::GetPoolIdFromUIName( aName, eGetType );
+ sal_uInt16 i = SwStyleNameMapper::GetPoolIdFromUIName( aName, eGetType );
i = ::GetPoolParent( i );
if( i && USHRT_MAX != i )
SwStyleNameMapper::FillUIName( i, sTmp );
@@ -548,19 +548,19 @@ const String& SwDocStyleSheet::GetFollow() const
--------------------------------------------------------------------*/
-BOOL SwDocStyleSheet::HasFollowSupport() const
+sal_Bool SwDocStyleSheet::HasFollowSupport() const
{
switch(nFamily)
{
case SFX_STYLE_FAMILY_PARA :
- case SFX_STYLE_FAMILY_PAGE : return TRUE;
+ case SFX_STYLE_FAMILY_PAGE : return sal_True;
case SFX_STYLE_FAMILY_FRAME:
case SFX_STYLE_FAMILY_CHAR :
- case SFX_STYLE_FAMILY_PSEUDO: return FALSE;
+ case SFX_STYLE_FAMILY_PSEUDO: return sal_False;
default:
ASSERT(!this, "unbekannte Style-Familie");
}
- return FALSE;
+ return sal_False;
}
/*--------------------------------------------------------------------
@@ -568,28 +568,28 @@ BOOL SwDocStyleSheet::HasFollowSupport() const
--------------------------------------------------------------------*/
-BOOL SwDocStyleSheet::HasParentSupport() const
+sal_Bool SwDocStyleSheet::HasParentSupport() const
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
switch(nFamily)
{
case SFX_STYLE_FAMILY_CHAR :
case SFX_STYLE_FAMILY_PARA :
- case SFX_STYLE_FAMILY_FRAME: bRet = TRUE;
+ case SFX_STYLE_FAMILY_FRAME: bRet = sal_True;
default:; //prevent warning
}
return bRet;
}
-BOOL SwDocStyleSheet::HasClearParentSupport() const
+sal_Bool SwDocStyleSheet::HasClearParentSupport() const
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
switch(nFamily)
{
case SFX_STYLE_FAMILY_PARA :
case SFX_STYLE_FAMILY_CHAR :
- case SFX_STYLE_FAMILY_FRAME: bRet = TRUE;
+ case SFX_STYLE_FAMILY_FRAME: bRet = sal_True;
default:; //prevent warning
}
return bRet;
@@ -655,8 +655,8 @@ String SwDocStyleSheet::GetDescription(SfxMapUnit eUnit)
const SfxPoolItem* pItem = aIter.FirstItem();
String sPageNum, sModel, sBreak;
- BOOL bHasWesternFontPrefix = FALSE;
- BOOL bHasCJKFontPrefix = FALSE;
+ sal_Bool bHasWesternFontPrefix = sal_False;
+ sal_Bool bHasCJKFontPrefix = sal_False;
SvtCJKOptions aCJKOptions;
while ( pItem )
@@ -682,7 +682,7 @@ String SwDocStyleSheet::GetDescription(SfxMapUnit eUnit)
*pItem, SFX_ITEM_PRESENTATION_COMPLETE,
eUnit, aItemPresentation, &aIntlWrapper ) )
{
- BOOL bIsDefault = FALSE;
+ sal_Bool bIsDefault = sal_False;
switch ( pItem->Which() )
{
case SID_ATTR_PARA_PAGENUM:
@@ -700,11 +700,11 @@ String SwDocStyleSheet::GetDescription(SfxMapUnit eUnit)
case RES_CHRATR_CJK_POSTURE:
case RES_CHRATR_CJK_WEIGHT:
if(aCJKOptions.IsCJKFontEnabled())
- bIsDefault = TRUE;
+ bIsDefault = sal_True;
if(!bHasCJKFontPrefix)
{
aItemPresentation.Insert(SW_RESSTR(STR_CJK_FONT), 0);
- bHasCJKFontPrefix = TRUE;
+ bHasCJKFontPrefix = sal_True;
}
break;
case RES_CHRATR_FONT:
@@ -715,12 +715,12 @@ String SwDocStyleSheet::GetDescription(SfxMapUnit eUnit)
if(!bHasWesternFontPrefix)
{
aItemPresentation.Insert(SW_RESSTR(STR_WESTERN_FONT), 0);
- bHasWesternFontPrefix = TRUE;
- bIsDefault = TRUE;
+ bHasWesternFontPrefix = sal_True;
+ bIsDefault = sal_True;
}
// no break;
default:
- bIsDefault = TRUE;
+ bIsDefault = sal_True;
}
if(bIsDefault)
{
@@ -778,20 +778,20 @@ String SwDocStyleSheet::GetDescription()
--------------------------------------------------------------------*/
-BOOL SwDocStyleSheet::SetName( const String& rStr)
+sal_Bool SwDocStyleSheet::SetName( const String& rStr)
{
if( !rStr.Len() )
- return FALSE;
+ return sal_False;
if( aName != rStr )
{
if( !SfxStyleSheetBase::SetName( rStr ))
- return FALSE;
+ return sal_False;
}
else if(!bPhysical)
FillStyleSheet( FillPhysical );
- int bChg = FALSE;
+ int bChg = sal_False;
switch(nFamily)
{
case SFX_STYLE_FAMILY_CHAR :
@@ -800,7 +800,7 @@ BOOL SwDocStyleSheet::SetName( const String& rStr)
if( pCharFmt && pCharFmt->GetName() != rStr )
{
pCharFmt->SetName( rStr );
- bChg = TRUE;
+ bChg = sal_True;
}
break;
}
@@ -814,7 +814,7 @@ BOOL SwDocStyleSheet::SetName( const String& rStr)
else
pColl->SetName(rStr);
- bChg = TRUE;
+ bChg = sal_True;
}
break;
}
@@ -828,7 +828,7 @@ BOOL SwDocStyleSheet::SetName( const String& rStr)
else
pFrmFmt->SetName( rStr );
- bChg = TRUE;
+ bChg = sal_True;
}
break;
}
@@ -844,15 +844,15 @@ 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);
// <- #116530#
rDoc.SetModified();
- bChg = TRUE;
+ bChg = sal_True;
}
break;
case SFX_STYLE_FAMILY_PSEUDO:
@@ -871,7 +871,7 @@ BOOL SwDocStyleSheet::SetName( const String& rStr)
pNumRule = rDoc.FindNumRulePtr(rStr);
rDoc.SetModified();
- bChg = TRUE;
+ bChg = sal_True;
}
}
else
@@ -881,7 +881,7 @@ BOOL SwDocStyleSheet::SetName( const String& rStr)
// <--
rDoc.SetModified();
- bChg = TRUE;
+ bChg = sal_True;
}
}
// <- #106897#
@@ -900,7 +900,7 @@ BOOL SwDocStyleSheet::SetName( const String& rStr)
if( pSh )
pSh->CallChgLnk();
}
- return TRUE;
+ return sal_True;
}
/*--------------------------------------------------------------------
@@ -908,7 +908,7 @@ BOOL SwDocStyleSheet::SetName( const String& rStr)
--------------------------------------------------------------------*/
-BOOL SwDocStyleSheet::SetParent( const String& rStr)
+sal_Bool SwDocStyleSheet::SetParent( const String& rStr)
{
SwFmt* pFmt = 0, *pParent = 0;
switch(nFamily)
@@ -938,7 +938,7 @@ BOOL SwDocStyleSheet::SetParent( const String& rStr)
ASSERT(!this, "unbekannte Style-Familie");
}
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( pFmt && pFmt->DerivedFrom() &&
pFmt->DerivedFrom()->GetName() != rStr )
{
@@ -963,10 +963,10 @@ BOOL SwDocStyleSheet::SetParent( const String& rStr)
--------------------------------------------------------------------*/
-BOOL SwDocStyleSheet::SetFollow( const String& rStr)
+sal_Bool SwDocStyleSheet::SetFollow( const String& rStr)
{
if( rStr.Len() && !SfxStyleSheetBase::SetFollow( rStr ))
- return FALSE;
+ return sal_False;
SwImplShellAction aTmpSh( rDoc );
switch(nFamily)
@@ -992,7 +992,7 @@ BOOL SwDocStyleSheet::SetFollow( const String& rStr)
const SwPageDesc* pFollowDesc = rStr.Len()
? lcl_FindPageDesc(rDoc, rStr)
: 0;
- USHORT nId;
+ sal_uInt16 nId;
if( pFollowDesc != pDesc->GetFollow() &&
rDoc.FindPageDescByName( pDesc->GetName(), &nId ) )
{
@@ -1012,7 +1012,7 @@ BOOL SwDocStyleSheet::SetFollow( const String& rStr)
ASSERT(!this, "unbekannte Style-Familie");
}
- return TRUE;
+ return sal_True;
}
/*--------------------------------------------------------------------
@@ -1038,12 +1038,12 @@ SfxItemSet& SwDocStyleSheet::GetItemSet()
case SFX_STYLE_FAMILY_FRAME:
{
SvxBoxInfoItem aBoxInfo( SID_ATTR_BORDER_INNER );
- aBoxInfo.SetTable( FALSE );
- aBoxInfo.SetDist( TRUE); // Abstandsfeld immer anzeigen
- aBoxInfo.SetMinDist( TRUE );// Minimalgroesse in Tabellen und Absaetzen setzen
+ aBoxInfo.SetTable( sal_False );
+ aBoxInfo.SetDist( sal_True); // Abstandsfeld immer anzeigen
+ aBoxInfo.SetMinDist( sal_True );// Minimalgroesse in Tabellen und Absaetzen setzen
aBoxInfo.SetDefDist( MIN_BORDER_DIST );// Default-Abstand immer setzen
// Einzelne Linien koennen nur in Tabellen DontCare-Status haben
- aBoxInfo.SetValid( VALID_DISABLE, TRUE );
+ aBoxInfo.SetValid( VALID_DISABLE, sal_True );
if ( nFamily == SFX_STYLE_FAMILY_PARA )
{
ASSERT(pColl, "Wo ist die Collektion");
@@ -1140,17 +1140,17 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet,
ASSERT( &rSet != &aCoreSet, "SetItemSet mit eigenem Set ist nicht erlaubt" );
// --> OD 2008-02-12 #newlistlevelattrs#
- 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)
{
@@ -1165,13 +1165,13 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet,
{
ASSERT(pColl, "Wo ist die Collection");
const SfxPoolItem* pAutoUpdate;
- if(SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_AUTO_STYLE_UPDATE,FALSE, &pAutoUpdate ))
+ if(SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_AUTO_STYLE_UPDATE,sal_False, &pAutoUpdate ))
{
pColl->SetAutoUpdateFmt(((const SfxBoolItem*)pAutoUpdate)->GetValue());
}
const SwCondCollItem* pCondItem;
- if( SFX_ITEM_SET != rSet.GetItemState( FN_COND_COLL, FALSE,
+ if( SFX_ITEM_SET != rSet.GetItemState( FN_COND_COLL, sal_False,
(const SfxPoolItem**)&pCondItem ))
pCondItem = 0;
@@ -1179,13 +1179,13 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet,
{
SwFmt* pFindFmt;
const CommandStruct* pCmds = SwCondCollItem::GetCmds();
- for(USHORT i = 0; i < COND_COMMAND_COUNT; i++)
+ for(sal_uInt16 i = 0; i < COND_COMMAND_COUNT; i++)
{
SwCollCondition aCond( 0, pCmds[ i ].nCnd, pCmds[ i ].nSubCond );
((SwConditionTxtFmtColl*)pColl)->RemoveCondition( aCond );
const String& rStyle = pCondItem->GetStyle( i );
if( rStyle.Len() &&
- 0 != ( pFindFmt = lcl_FindParaFmt( rDoc, rStyle, 0, TRUE )))
+ 0 != ( pFindFmt = lcl_FindParaFmt( rDoc, rStyle, 0, sal_True )))
{
pFindFmt->Add( &aCond );
((SwConditionTxtFmtColl*)pColl)->InsertCondition( aCond );
@@ -1215,11 +1215,11 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet,
SwTxtFmtColl* pFindFmt;
const CommandStruct* pCmds = SwCondCollItem::GetCmds();
- for( USHORT i = 0; i < COND_COMMAND_COUNT; ++i )
+ for( sal_uInt16 i = 0; i < COND_COMMAND_COUNT; ++i )
{
const String& rStyle = pCondItem->GetStyle( i );
if( rStyle.Len() &&
- 0 != ( pFindFmt = lcl_FindParaFmt( rDoc, rStyle, 0, TRUE )))
+ 0 != ( pFindFmt = lcl_FindParaFmt( rDoc, rStyle, 0, sal_True )))
{
pCColl->InsertCondition( SwCollCondition( pFindFmt,
pCmds[ i ].nCnd, pCmds[ i ].nSubCond ) );
@@ -1231,9 +1231,9 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet,
}
// --> OD 2008-02-12 #newlistlevelattrs#
if ( bResetIndentAttrsAtParagraphStyle &&
- rSet.GetItemState( RES_PARATR_NUMRULE, FALSE, 0 ) == SFX_ITEM_SET &&
- rSet.GetItemState( RES_LR_SPACE, FALSE, 0 ) != SFX_ITEM_SET &&
- pColl->GetItemState( RES_LR_SPACE, FALSE, 0 ) == SFX_ITEM_SET )
+ rSet.GetItemState( RES_PARATR_NUMRULE, sal_False, 0 ) == SFX_ITEM_SET &&
+ rSet.GetItemState( RES_LR_SPACE, sal_False, 0 ) != SFX_ITEM_SET &&
+ pColl->GetItemState( RES_LR_SPACE, sal_False, 0 ) == SFX_ITEM_SET )
{
rDoc.ResetAttrAtFormat( RES_LR_SPACE, *pColl );
}
@@ -1244,7 +1244,7 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet,
// neither the paragraph style nor the numbering style is used in the document
// the numbering style will not be saved with the document and the assignment got lost.
const SfxPoolItem* pNumRuleItem = 0;
- if( SFX_ITEM_SET == rSet.GetItemState( RES_PARATR_NUMRULE, FALSE, &pNumRuleItem ) )
+ if( SFX_ITEM_SET == rSet.GetItemState( RES_PARATR_NUMRULE, sal_False, &pNumRuleItem ) )
{ // Setting a numbering rule?
String sNumRule = ((SwNumRuleItem*)pNumRuleItem)->GetValue();
if( sNumRule.Len() )
@@ -1252,7 +1252,7 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet,
SwNumRule* pRule = rDoc.FindNumRulePtr( sNumRule );
if( !pRule )
{ // Numbering rule not in use yet.
- USHORT nPoolId = SwStyleNameMapper::GetPoolIdFromUIName( sNumRule, nsSwGetPoolIdFromName::GET_POOLID_NUMRULE );
+ sal_uInt16 nPoolId = SwStyleNameMapper::GetPoolIdFromUIName( sNumRule, nsSwGetPoolIdFromName::GET_POOLID_NUMRULE );
if( USHRT_MAX != nPoolId ) // It's a standard numbering rule
{
pRule = rDoc.GetNumRuleFromPool( nPoolId ); // Create numbering rule (physical)
@@ -1263,7 +1263,7 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet,
pFmt = pColl;
- USHORT nId = pColl->GetPoolFmtId() &
+ sal_uInt16 nId = pColl->GetPoolFmtId() &
~ ( COLL_GET_RANGE_BITS | POOLGRP_NOCOLLID );
switch( GetMask() & ( 0x0fff & ~SWSTYLEBIT_CONDCOLL ) )
{
@@ -1293,7 +1293,7 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet,
{
ASSERT(pFrmFmt, "Wo ist das FrmFmt");
const SfxPoolItem* pAutoUpdate;
- if(SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_AUTO_STYLE_UPDATE,FALSE, &pAutoUpdate ))
+ if(SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_AUTO_STYLE_UPDATE,sal_False, &pAutoUpdate ))
{
pFrmFmt->SetAutoUpdateFmt(((const SfxBoolItem*)pAutoUpdate)->GetValue());
}
@@ -1310,10 +1310,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();
@@ -1329,7 +1327,7 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet,
break;
const SfxPoolItem* pItem;
- switch( rSet.GetItemState( SID_ATTR_NUMBERING_RULE, FALSE, &pItem ))
+ switch( rSet.GetItemState( SID_ATTR_NUMBERING_RULE, sal_False, &pItem ))
{
case SFX_ITEM_SET:
{
@@ -1366,7 +1364,7 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet,
{
SfxItemIter aIter( rSet );
const SfxPoolItem* pItem = aIter.GetCurItem();
- while( TRUE )
+ while( sal_True )
{
if( IsInvalidItem( pItem ) ) // Clearen
{
@@ -1409,14 +1407,14 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet,
}
// --> OD 2008-02-12 #newlistlevelattrs#
- 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 )
{
@@ -1475,7 +1473,7 @@ void lcl_SaveStyles( USHORT nFamily, SvPtrarr& rArr, SwDoc& rDoc )
}
}
-void lcl_DeleteInfoStyles( USHORT nFamily, SvPtrarr& rArr, SwDoc& rDoc )
+void lcl_DeleteInfoStyles( sal_uInt16 nFamily, SvPtrarr& rArr, SwDoc& rDoc )
{
sal_uInt16 n, nCnt;
switch( nFamily )
@@ -1562,15 +1560,15 @@ void lcl_DeleteInfoStyles( USHORT nFamily, SvPtrarr& rArr, SwDoc& rDoc )
Beschreibung: Das Format ermitteln
--------------------------------------------------------------------*/
-BOOL SwDocStyleSheet::FillStyleSheet( FillStyleType eFType )
+sal_Bool SwDocStyleSheet::FillStyleSheet( FillStyleType eFType )
{
- BOOL bRet = FALSE;
- USHORT nPoolId = USHRT_MAX;
+ sal_Bool bRet = sal_False;
+ sal_uInt16 nPoolId = USHRT_MAX;
SwFmt* pFmt = 0;
- BOOL bCreate = FillPhysical == eFType;
- BOOL bDeleteInfo = FALSE;
- BOOL bFillOnlyInfo = FillAllInfo == eFType;
+ sal_Bool bCreate = FillPhysical == eFType;
+ sal_Bool bDeleteInfo = sal_False;
+ sal_Bool bFillOnlyInfo = FillAllInfo == eFType;
SvPtrarr aDelArr;
switch(nFamily)
@@ -1580,9 +1578,9 @@ BOOL SwDocStyleSheet::FillStyleSheet( FillStyleType eFType )
bPhysical = 0 != pCharFmt;
if( bFillOnlyInfo && !bPhysical )
{
- bDeleteInfo = TRUE;
- ::lcl_SaveStyles( static_cast< USHORT >(nFamily), aDelArr, rDoc );
- pCharFmt = lcl_FindCharFmt(rDoc, aName, this, TRUE );
+ bDeleteInfo = sal_True;
+ ::lcl_SaveStyles( static_cast< sal_uInt16 >(nFamily), aDelArr, rDoc );
+ pCharFmt = lcl_FindCharFmt(rDoc, aName, this, sal_True );
}
pFmt = pCharFmt;
@@ -1607,9 +1605,9 @@ BOOL SwDocStyleSheet::FillStyleSheet( FillStyleType eFType )
bPhysical = 0 != pColl;
if( bFillOnlyInfo && !bPhysical )
{
- bDeleteInfo = TRUE;
- ::lcl_SaveStyles( static_cast< USHORT >(nFamily), aDelArr, rDoc );
- pColl = lcl_FindParaFmt(rDoc, aName, this, TRUE );
+ bDeleteInfo = sal_True;
+ ::lcl_SaveStyles( static_cast< sal_uInt16 >(nFamily), aDelArr, rDoc );
+ pColl = lcl_FindParaFmt(rDoc, aName, this, sal_True );
}
pFmt = pColl;
@@ -1630,9 +1628,9 @@ BOOL SwDocStyleSheet::FillStyleSheet( FillStyleType eFType )
bPhysical = 0 != pFrmFmt;
if( bFillOnlyInfo && bPhysical )
{
- bDeleteInfo = TRUE;
- ::lcl_SaveStyles( static_cast< USHORT >(nFamily), aDelArr, rDoc );
- pFrmFmt = lcl_FindFrmFmt(rDoc, aName, this, TRUE );
+ bDeleteInfo = sal_True;
+ ::lcl_SaveStyles( static_cast< sal_uInt16 >(nFamily), aDelArr, rDoc );
+ pFrmFmt = lcl_FindFrmFmt(rDoc, aName, this, sal_True );
}
pFmt = pFrmFmt;
if( !bCreate && !pFmt )
@@ -1649,9 +1647,9 @@ BOOL SwDocStyleSheet::FillStyleSheet( FillStyleType eFType )
bPhysical = 0 != pDesc;
if( bFillOnlyInfo && !pDesc )
{
- bDeleteInfo = TRUE;
- ::lcl_SaveStyles( static_cast< USHORT >(nFamily), aDelArr, rDoc );
- pDesc = lcl_FindPageDesc( rDoc, aName, this, TRUE );
+ bDeleteInfo = sal_True;
+ ::lcl_SaveStyles( static_cast< sal_uInt16 >(nFamily), aDelArr, rDoc );
+ pDesc = lcl_FindPageDesc( rDoc, aName, this, sal_True );
}
if( pDesc )
@@ -1677,9 +1675,9 @@ BOOL SwDocStyleSheet::FillStyleSheet( FillStyleType eFType )
bPhysical = 0 != pNumRule;
if( bFillOnlyInfo && !pNumRule )
{
- bDeleteInfo = TRUE;
- ::lcl_SaveStyles( static_cast< USHORT >(nFamily), aDelArr, rDoc );
- pNumRule = lcl_FindNumRule( rDoc, aName, this, TRUE );
+ bDeleteInfo = sal_True;
+ ::lcl_SaveStyles( static_cast< sal_uInt16 >(nFamily), aDelArr, rDoc );
+ pNumRule = lcl_FindNumRule( rDoc, aName, this, sal_True );
}
if( pNumRule )
@@ -1710,7 +1708,7 @@ BOOL SwDocStyleSheet::FillStyleSheet( FillStyleType eFType )
if( pFmt )
nPoolId = pFmt->GetPoolFmtId();
- USHORT _nMask = 0;
+ sal_uInt16 _nMask = 0;
if( pFmt == rDoc.GetDfltCharFmt() )
_nMask |= SFXSTYLEBIT_READONLY;
else if( USER_FMT & nPoolId )
@@ -1743,7 +1741,7 @@ BOOL SwDocStyleSheet::FillStyleSheet( FillStyleType eFType )
SetMask( _nMask );
}
if( bDeleteInfo && bFillOnlyInfo )
- ::lcl_DeleteInfoStyles( static_cast< USHORT >(nFamily), aDelArr, rDoc );
+ ::lcl_DeleteInfoStyles( static_cast< sal_uInt16 >(nFamily), aDelArr, rDoc );
return bRet;
}
@@ -1761,7 +1759,7 @@ void SwDocStyleSheet::Create()
if( !pCharFmt )
pCharFmt = rDoc.MakeCharFmt(aName,
rDoc.GetDfltCharFmt());
- pCharFmt->SetAuto( FALSE );
+ pCharFmt->SetAuto( sal_False );
break;
case SFX_STYLE_FAMILY_PARA :
@@ -1779,7 +1777,7 @@ void SwDocStyleSheet::Create()
case SFX_STYLE_FAMILY_FRAME:
pFrmFmt = lcl_FindFrmFmt( rDoc, aName );
if( !pFrmFmt )
- pFrmFmt = rDoc.MakeFrmFmt(aName, rDoc.GetDfltFrmFmt(), FALSE, FALSE);
+ pFrmFmt = rDoc.MakeFrmFmt(aName, rDoc.GetDfltFrmFmt(), sal_False, sal_False);
break;
@@ -1787,7 +1785,7 @@ void SwDocStyleSheet::Create()
pDesc = lcl_FindPageDesc( rDoc, aName );
if( !pDesc )
{
- USHORT nId = rDoc.MakePageDesc(aName);
+ sal_uInt16 nId = rDoc.MakePageDesc(aName);
pDesc = &const_cast<const SwDoc &>(rDoc).GetPageDesc(nId);
}
break;
@@ -1803,12 +1801,12 @@ void SwDocStyleSheet::Create()
// --> OD 2008-02-11 #newlistlevelattrs#
SwNumRule* pRule = rDoc.GetNumRuleTbl()[
- rDoc.MakeNumRule( sTmpNm, 0, FALSE,
+ rDoc.MakeNumRule( sTmpNm, 0, sal_False,
// --> OD 2008-06-06 #i89178#
numfunc::GetDefaultPositionAndSpaceMode() ) ];
// <--
// <--
- pRule->SetAutoRule( FALSE );
+ pRule->SetAutoRule( sal_False );
if( !aName.Len() )
{
// --> OD 2008-07-08 #i91400#
@@ -1820,7 +1818,7 @@ void SwDocStyleSheet::Create()
break;
default:; //prevent warning
}
- bPhysical = TRUE;
+ bPhysical = sal_True;
aCoreSet.ClearItem();
}
@@ -1888,7 +1886,7 @@ void SwDocStyleSheet::PresetNameAndFamily(const String& rName)
--------------------------------------------------------------------*/
-void SwDocStyleSheet::SetPhysical(BOOL bPhys)
+void SwDocStyleSheet::SetPhysical(sal_Bool bPhys)
{
bPhysical = bPhys;
@@ -1909,7 +1907,7 @@ SwFrmFmt* SwDocStyleSheet::GetFrmFmt()
}
-BOOL SwDocStyleSheet::IsUsed() const
+sal_Bool SwDocStyleSheet::IsUsed() const
{
if( !bPhysical )
{
@@ -1919,7 +1917,7 @@ BOOL SwDocStyleSheet::IsUsed() const
// immer noch nicht ?
if( !bPhysical )
- return FALSE;
+ return sal_False;
const SwModify* pMod;
switch( nFamily )
@@ -1930,22 +1928,22 @@ BOOL SwDocStyleSheet::IsUsed() const
case SFX_STYLE_FAMILY_PAGE : pMod = pDesc; break;
case SFX_STYLE_FAMILY_PSEUDO:
- return pNumRule ? rDoc.IsUsed( *pNumRule ) : FALSE;
+ return pNumRule ? rDoc.IsUsed( *pNumRule ) : sal_False;
default:
ASSERT(!this, "unbekannte Style-Familie");
- return FALSE;
+ return sal_False;
}
return rDoc.IsUsed( *pMod );
}
-ULONG SwDocStyleSheet::GetHelpId( String& rFile )
+sal_uLong SwDocStyleSheet::GetHelpId( String& rFile )
{
static String sTemplateHelpFile = String::CreateFromAscii("swrhlppi.hlp");
- USHORT nId = 0;
- USHORT nPoolId = 0;
+ sal_uInt16 nId = 0;
+ sal_uInt16 nPoolId = 0;
unsigned char nFileId = UCHAR_MAX;
rFile = sTemplateHelpFile;
@@ -1955,7 +1953,7 @@ static String sTemplateHelpFile = String::CreateFromAscii("swrhlppi.hlp");
{
case SFX_STYLE_FAMILY_CHAR :
if( !pCharFmt &&
- 0 == (pCharFmt = lcl_FindCharFmt( rDoc, aName, 0, FALSE )) )
+ 0 == (pCharFmt = lcl_FindCharFmt( rDoc, aName, 0, sal_False )) )
{
nId = SwStyleNameMapper::GetPoolIdFromUIName( aName, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT );
return USHRT_MAX == nId ? 0 : nId;
@@ -1965,7 +1963,7 @@ static String sTemplateHelpFile = String::CreateFromAscii("swrhlppi.hlp");
case SFX_STYLE_FAMILY_PARA:
if( !pColl &&
- 0 == ( pColl = lcl_FindParaFmt( rDoc, aName, 0, FALSE )) )
+ 0 == ( pColl = lcl_FindParaFmt( rDoc, aName, 0, sal_False )) )
{
nId = SwStyleNameMapper::GetPoolIdFromUIName( aName, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL );
return USHRT_MAX == nId ? 0 : nId;
@@ -1975,7 +1973,7 @@ static String sTemplateHelpFile = String::CreateFromAscii("swrhlppi.hlp");
case SFX_STYLE_FAMILY_FRAME:
if( !pFrmFmt &&
- 0 == ( pFrmFmt = lcl_FindFrmFmt( rDoc, aName, 0, FALSE ) ) )
+ 0 == ( pFrmFmt = lcl_FindFrmFmt( rDoc, aName, 0, sal_False ) ) )
{
nId = SwStyleNameMapper::GetPoolIdFromUIName( aName, nsSwGetPoolIdFromName::GET_POOLID_FRMFMT );
return USHRT_MAX == nId ? 0 : nId;
@@ -1985,7 +1983,7 @@ static String sTemplateHelpFile = String::CreateFromAscii("swrhlppi.hlp");
case SFX_STYLE_FAMILY_PAGE:
if( !pDesc &&
- 0 == ( pDesc = lcl_FindPageDesc( rDoc, aName, 0, FALSE ) ) )
+ 0 == ( pDesc = lcl_FindPageDesc( rDoc, aName, 0, sal_False ) ) )
{
nId = SwStyleNameMapper::GetPoolIdFromUIName( aName, nsSwGetPoolIdFromName::GET_POOLID_PAGEDESC );
return USHRT_MAX == nId ? 0 : nId;
@@ -1998,7 +1996,7 @@ static String sTemplateHelpFile = String::CreateFromAscii("swrhlppi.hlp");
case SFX_STYLE_FAMILY_PSEUDO:
if( !pNumRule &&
- 0 == ( pNumRule = lcl_FindNumRule( rDoc, aName, 0, FALSE ) ) )
+ 0 == ( pNumRule = lcl_FindNumRule( rDoc, aName, 0, sal_False ) ) )
{
nId = SwStyleNameMapper::GetPoolIdFromUIName( aName, nsSwGetPoolIdFromName::GET_POOLID_NUMRULE );
return USHRT_MAX == nId ? 0 : nId;
@@ -2043,10 +2041,10 @@ static String sTemplateHelpFile = String::CreateFromAscii("swrhlppi.hlp");
}
-void SwDocStyleSheet::SetHelpId( const String& r, ULONG nId )
+void SwDocStyleSheet::SetHelpId( const String& r, sal_uLong nId )
{
- BYTE nFileId = static_cast< BYTE >(rDoc.SetDocPattern( r ));
- USHORT nHId = static_cast< USHORT >(nId); //!! SFX hat eigenmaechtig auf ULONG umgestellt!
+ sal_uInt8 nFileId = static_cast< sal_uInt8 >(rDoc.SetDocPattern( r ));
+ sal_uInt16 nHId = static_cast< sal_uInt16 >(nId); //!! SFX hat eigenmaechtig auf sal_uLong umgestellt!
SwFmt* pTmpFmt = 0;
switch( nFamily )
@@ -2082,7 +2080,7 @@ void SwDocStyleSheet::SetHelpId( const String& r, ULONG nId )
Beschreibung: Methoden fuer den DocStyleSheetPool
--------------------------------------------------------------------*/
-SwDocStyleSheetPool::SwDocStyleSheetPool( SwDoc& rDocument, BOOL bOrg )
+SwDocStyleSheetPool::SwDocStyleSheetPool( SwDoc& rDocument, sal_Bool bOrg )
: SfxStyleSheetBasePool( rDocument.GetAttrPool() )
, mxStyleSheet( new SwDocStyleSheet( rDocument, aEmptyStr, *this, SFX_STYLE_FAMILY_CHAR, 0 ) )
, rDoc( rDocument )
@@ -2107,15 +2105,15 @@ void SAL_CALL SwDocStyleSheetPool::release( ) throw ()
SfxStyleSheetBase& SwDocStyleSheetPool::Make(
const String& rName,
SfxStyleFamily eFam,
- USHORT _nMask,
- USHORT /*nPos*/ )
+ sal_uInt16 _nMask,
+ sal_uInt16 /*nPos*/ )
{
mxStyleSheet->PresetName(rName);
mxStyleSheet->PresetParent(aEmptyStr);
mxStyleSheet->PresetFollow(aEmptyStr);
mxStyleSheet->SetMask(_nMask) ;
mxStyleSheet->SetFamily(eFam);
- mxStyleSheet->SetPhysical(TRUE);
+ mxStyleSheet->SetPhysical(sal_True);
mxStyleSheet->Create();
return *mxStyleSheet.get();
@@ -2130,7 +2128,7 @@ SfxStyleSheetBase* SwDocStyleSheetPool::Create( const SfxStyleSheetBase& /*rOr
SfxStyleSheetBase* SwDocStyleSheetPool::Create( const String &,
- SfxStyleFamily, USHORT )
+ SfxStyleFamily, sal_uInt16 )
{
ASSERT( !this, "Create im SW-Stylesheet-Pool geht nicht" );
return NULL;
@@ -2163,7 +2161,7 @@ void SwDocStyleSheetPool::Replace( SfxStyleSheetBase& rSource,
SwImplShellAction aTmpSh( rDoc );
- BOOL bSwSrcPool = GetAppName() == rSource.GetPool().GetAppName();
+ sal_Bool bSwSrcPool = GetAppName() == rSource.GetPool().GetAppName();
if( SFX_STYLE_FAMILY_PAGE == eFamily && bSwSrcPool )
{
// gesondert behandeln!!
@@ -2177,7 +2175,7 @@ void SwDocStyleSheetPool::Replace( SfxStyleSheetBase& rSource,
{
const SwFmt *pSourceFmt = 0;
SwFmt *pTargetFmt = 0;
- USHORT nPgDscPos = USHRT_MAX;
+ sal_uInt16 nPgDscPos = USHRT_MAX;
switch( eFamily )
{
case SFX_STYLE_FAMILY_CHAR :
@@ -2237,7 +2235,7 @@ void SwDocStyleSheetPool::Replace( SfxStyleSheetBase& rSource,
}
SfxStyleSheetIterator* SwDocStyleSheetPool::CreateIterator(
- SfxStyleFamily eFam, USHORT _nMask )
+ SfxStyleFamily eFam, sal_uInt16 _nMask )
{
return new SwStyleSheetIterator( this, eFam, _nMask );
}
@@ -2252,35 +2250,35 @@ void SwDocStyleSheetPool::Remove( SfxStyleSheetBase* pStyle)
if( !pStyle )
return;
- BOOL bBroadcast = TRUE;
+ sal_Bool bBroadcast = sal_True;
SwImplShellAction aTmpSh( rDoc );
const String& rName = pStyle->GetName();
switch( pStyle->GetFamily() )
{
case SFX_STYLE_FAMILY_CHAR:
{
- SwCharFmt* pFmt = lcl_FindCharFmt(rDoc, rName, 0, FALSE );
+ SwCharFmt* pFmt = lcl_FindCharFmt(rDoc, rName, 0, sal_False );
if(pFmt)
rDoc.DelCharFmt(pFmt);
}
break;
case SFX_STYLE_FAMILY_PARA:
{
- SwTxtFmtColl* pColl = lcl_FindParaFmt(rDoc, rName, 0, FALSE );
+ SwTxtFmtColl* pColl = lcl_FindParaFmt(rDoc, rName, 0, sal_False );
if(pColl)
rDoc.DelTxtFmtColl(pColl);
}
break;
case SFX_STYLE_FAMILY_FRAME:
{
- SwFrmFmt* pFmt = lcl_FindFrmFmt(rDoc, rName, 0, FALSE );
+ SwFrmFmt* pFmt = lcl_FindFrmFmt(rDoc, rName, 0, sal_False );
if(pFmt)
rDoc.DelFrmFmt(pFmt);
}
break;
case SFX_STYLE_FAMILY_PAGE :
{
- USHORT nPos;
+ sal_uInt16 nPos;
if( rDoc.FindPageDescByName( rName, &nPos ))
rDoc.DelPageDesc( nPos );
}
@@ -2290,13 +2288,13 @@ void SwDocStyleSheetPool::Remove( SfxStyleSheetBase* pStyle)
{
if( !rDoc.DelNumRule( rName ) )
// Broadcast nur versenden, wenn etwas geloescht wurde
- bBroadcast = FALSE;
+ bBroadcast = sal_False;
}
break;
default:
ASSERT(!this, "unbekannte Style-Familie");
- bBroadcast = FALSE;
+ bBroadcast = sal_False;
}
if( bBroadcast )
@@ -2305,7 +2303,7 @@ void SwDocStyleSheetPool::Remove( SfxStyleSheetBase* pStyle)
-BOOL SwDocStyleSheetPool::SetParent( SfxStyleFamily eFam,
+sal_Bool SwDocStyleSheetPool::SetParent( SfxStyleFamily eFam,
const String &rStyle, const String &rParent )
{
SwFmt* pFmt = 0, *pParent = 0;
@@ -2334,7 +2332,7 @@ BOOL SwDocStyleSheetPool::SetParent( SfxStyleFamily eFam,
ASSERT(!this, "unbekannte Style-Familie");
}
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( pFmt && pFmt->DerivedFrom() &&
pFmt->DerivedFrom()->GetName() != rParent )
{
@@ -2363,9 +2361,9 @@ BOOL SwDocStyleSheetPool::SetParent( SfxStyleFamily eFam,
}
SfxStyleSheetBase* SwDocStyleSheetPool::Find( const String& rName,
- SfxStyleFamily eFam, USHORT n )
+ SfxStyleFamily eFam, sal_uInt16 n )
{
- USHORT nSMask = n;
+ sal_uInt16 nSMask = n;
if( SFX_STYLE_FAMILY_PARA == eFam && rDoc.get(IDocumentSettingAccess::HTML_MODE) )
{
// dann sind nur HTML-Vorlagen von Interesse
@@ -2378,14 +2376,14 @@ SfxStyleSheetBase* SwDocStyleSheetPool::Find( const String& rName,
nSMask = SWSTYLEBIT_HTML;
}
- const BOOL bSearchUsed = ( n != SFXSTYLEBIT_ALL &&
- n & SFXSTYLEBIT_USED ) ? TRUE : FALSE;
+ const sal_Bool bSearchUsed = ( n != SFXSTYLEBIT_ALL &&
+ n & SFXSTYLEBIT_USED ) ? sal_True : sal_False;
const SwModify* pMod = 0;
- mxStyleSheet->SetPhysical( FALSE );
+ mxStyleSheet->SetPhysical( sal_False );
mxStyleSheet->PresetName( rName );
mxStyleSheet->SetFamily( eFam );
- BOOL bFnd = mxStyleSheet->FillStyleSheet( SwDocStyleSheet::FillOnlyName );
+ sal_Bool bFnd = mxStyleSheet->FillStyleSheet( SwDocStyleSheet::FillOnlyName );
if( mxStyleSheet->IsPhysical() )
{
@@ -2416,7 +2414,7 @@ SfxStyleSheetBase* SwDocStyleSheetPool::Find( const String& rName,
? !(pRule->GetPoolFmtId() & USER_FMT)
// benutzte gesucht und keine gefunden
: bSearchUsed ))
- bFnd = FALSE;
+ bFnd = sal_False;
}
break;
@@ -2428,7 +2426,7 @@ SfxStyleSheetBase* SwDocStyleSheetPool::Find( const String& rName,
// dann noch die Maske auswerten:
if( pMod && !(bSearchUsed && (bOrganizer || rDoc.IsUsed(*pMod)) ) )
{
- const USHORT nId = SFX_STYLE_FAMILY_PAGE == eFam
+ const sal_uInt16 nId = SFX_STYLE_FAMILY_PAGE == eFam
? ((SwPageDesc*)pMod)->GetPoolFmtId()
: ((SwFmt*)pMod)->GetPoolFmtId();
@@ -2436,7 +2434,7 @@ SfxStyleSheetBase* SwDocStyleSheetPool::Find( const String& rName,
? !(nId & USER_FMT)
// benutzte gesucht und keine gefunden
: bSearchUsed )
- bFnd = FALSE;
+ bFnd = sal_False;
}
return bFnd ? mxStyleSheet.get() : 0;
}
@@ -2444,12 +2442,12 @@ SfxStyleSheetBase* SwDocStyleSheetPool::Find( const String& rName,
/* */
SwStyleSheetIterator::SwStyleSheetIterator( SwDocStyleSheetPool* pBase,
- SfxStyleFamily eFam, USHORT n )
+ SfxStyleFamily eFam, sal_uInt16 n )
: SfxStyleSheetIterator( pBase, eFam, n ),
mxIterSheet( new SwDocStyleSheet( pBase->GetDoc(), aEmptyStr, *pBase, SFX_STYLE_FAMILY_CHAR, 0 ) ),
mxStyleSheet( new SwDocStyleSheet( pBase->GetDoc(), aEmptyStr, *pBase, SFX_STYLE_FAMILY_CHAR, 0 ) )
{
- bFirstCalled = FALSE;
+ bFirstCalled = sal_False;
nLastPos = 0;
StartListening( *pBase );
}
@@ -2459,7 +2457,7 @@ SwStyleSheetIterator::SwStyleSheetIterator( SwDocStyleSheetPool* pBase,
EndListening( mxIterSheet->GetPool() );
}
-USHORT SwStyleSheetIterator::Count()
+sal_uInt16 SwStyleSheetIterator::Count()
{
// Liste richtig fuellen lassen !!
if( !bFirstCalled )
@@ -2467,13 +2465,13 @@ USHORT SwStyleSheetIterator::Count()
return aLst.Count();
}
-SfxStyleSheetBase* SwStyleSheetIterator::operator[]( USHORT nIdx )
+SfxStyleSheetBase* SwStyleSheetIterator::operator[]( sal_uInt16 nIdx )
{
// gefunden
if( !bFirstCalled )
First();
mxStyleSheet->PresetNameAndFamily( *aLst[ nIdx ] );
- mxStyleSheet->SetPhysical( FALSE );
+ mxStyleSheet->SetPhysical( sal_False );
mxStyleSheet->FillStyleSheet( SwDocStyleSheet::FillOnlyName );
return mxStyleSheet.get();
@@ -2482,7 +2480,7 @@ SfxStyleSheetBase* SwStyleSheetIterator::operator[]( USHORT nIdx )
SfxStyleSheetBase* SwStyleSheetIterator::First()
{
// Alte Liste loeschen
- bFirstCalled = TRUE;
+ bFirstCalled = sal_True;
nLastPos = 0;
aLst.Erase();
@@ -2490,27 +2488,27 @@ SfxStyleSheetBase* SwStyleSheetIterator::First()
mxIterSheet->Reset();
SwDoc& rDoc = ((SwDocStyleSheetPool*)pBasePool)->GetDoc();
- const USHORT nSrchMask = nMask;
- const BOOL bIsSearchUsed = SearchUsed();
+ const sal_uInt16 nSrchMask = nMask;
+ const sal_Bool bIsSearchUsed = SearchUsed();
- const BOOL bOrganizer = ((SwDocStyleSheetPool*)pBasePool)->IsOrganizerMode();
+ const sal_Bool bOrganizer = ((SwDocStyleSheetPool*)pBasePool)->IsOrganizerMode();
if( nSearchFamily == SFX_STYLE_FAMILY_CHAR
|| nSearchFamily == SFX_STYLE_FAMILY_ALL )
{
- const USHORT nArrLen = rDoc.GetCharFmts()->Count();
- for( USHORT i = 0; i < nArrLen; i++ )
+ const sal_uInt16 nArrLen = rDoc.GetCharFmts()->Count();
+ for( sal_uInt16 i = 0; i < nArrLen; i++ )
{
SwCharFmt* pFmt = (*rDoc.GetCharFmts())[ i ];
if( pFmt->IsDefault() && pFmt != rDoc.GetDfltCharFmt() )
continue;
- const BOOL bUsed = bIsSearchUsed && (bOrganizer || rDoc.IsUsed(*pFmt));
+ const sal_Bool bUsed = bIsSearchUsed && (bOrganizer || rDoc.IsUsed(*pFmt));
if( !bUsed )
{
// Standard ist keine Benutzervorlage #46181#
- const USHORT nId = rDoc.GetDfltCharFmt() == pFmt ?
- USHORT( RES_POOLCHR_INET_NORMAL ):
+ const sal_uInt16 nId = rDoc.GetDfltCharFmt() == pFmt ?
+ sal_uInt16( RES_POOLCHR_INET_NORMAL ):
pFmt->GetPoolFmtId();
if( (nSrchMask & ~SFXSTYLEBIT_USED) == SFXSTYLEBIT_USERDEF
? !(nId & USER_FMT)
@@ -2560,7 +2558,7 @@ SfxStyleSheetBase* SwStyleSheetIterator::First()
if( nSearchFamily == SFX_STYLE_FAMILY_PARA ||
nSearchFamily == SFX_STYLE_FAMILY_ALL )
{
- USHORT nSMask = nSrchMask;
+ sal_uInt16 nSMask = nSrchMask;
if( rDoc.get(IDocumentSettingAccess::HTML_MODE) )
{
// dann sind nur HTML-Vorlagen von Interesse
@@ -2574,18 +2572,18 @@ SfxStyleSheetBase* SwStyleSheetIterator::First()
nSMask = SWSTYLEBIT_HTML;
}
- const USHORT nArrLen = rDoc.GetTxtFmtColls()->Count();
- for( USHORT i = 0; i < nArrLen; i++ )
+ const sal_uInt16 nArrLen = rDoc.GetTxtFmtColls()->Count();
+ for( sal_uInt16 i = 0; i < nArrLen; i++ )
{
SwTxtFmtColl* pColl = (*rDoc.GetTxtFmtColls())[ i ];
if(pColl->IsDefault())
continue;
- const BOOL bUsed = bOrganizer || rDoc.IsUsed(*pColl);
+ const sal_Bool bUsed = bOrganizer || rDoc.IsUsed(*pColl);
if( !(bIsSearchUsed && bUsed ))
{
- const USHORT nId = pColl->GetPoolFmtId();
+ const sal_uInt16 nId = pColl->GetPoolFmtId();
switch ( (nSMask & ~SFXSTYLEBIT_USED) )
{
case SFXSTYLEBIT_USERDEF:
@@ -2615,7 +2613,7 @@ SfxStyleSheetBase* SwStyleSheetIterator::First()
if( (nId & COLL_GET_RANGE_BITS) != COLL_HTML_BITS)
{
// einige wollen wir aber auch in dieser Section sehen
- BOOL bWeiter = TRUE;
+ sal_Bool bWeiter = sal_True;
switch( nId )
{
case RES_POOLCOLL_SENDADRESS: // --> ADDRESS
@@ -2632,7 +2630,7 @@ SfxStyleSheetBase* SwStyleSheetIterator::First()
case RES_POOLCOLL_STANDARD: // --> P
case RES_POOLCOLL_FOOTNOTE:
case RES_POOLCOLL_ENDNOTE:
- bWeiter = FALSE;
+ bWeiter = sal_False;
break;
}
if( bWeiter )
@@ -2651,7 +2649,7 @@ SfxStyleSheetBase* SwStyleSheetIterator::First()
aLst.Append( cPARA, pColl->GetName() );
}
- const BOOL bAll = nSMask == SFXSTYLEBIT_ALL;
+ const sal_Bool bAll = nSMask == SFXSTYLEBIT_ALL;
if ( bAll || (nSMask & ~SFXSTYLEBIT_USED) == SWSTYLEBIT_TEXT )
AppendStyleList(SwStyleNameMapper::GetTextUINameArray(),
bIsSearchUsed, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, cPARA );
@@ -2684,7 +2682,7 @@ SfxStyleSheetBase* SwStyleSheetIterator::First()
if( !bAll )
{
// dann auch die, die wir mappen:
- static USHORT aPoolIds[] = {
+ static sal_uInt16 aPoolIds[] = {
RES_POOLCOLL_SENDADRESS, // --> ADDRESS
RES_POOLCOLL_TABLE_HDLN, // --> TH
RES_POOLCOLL_TABLE, // --> TD
@@ -2702,7 +2700,7 @@ SfxStyleSheetBase* SwStyleSheetIterator::First()
0
};
- USHORT* pPoolIds = aPoolIds;
+ sal_uInt16* pPoolIds = aPoolIds;
String s;
while( *pPoolIds )
{
@@ -2718,8 +2716,8 @@ SfxStyleSheetBase* SwStyleSheetIterator::First()
if( nSearchFamily == SFX_STYLE_FAMILY_FRAME ||
nSearchFamily == SFX_STYLE_FAMILY_ALL )
{
- const USHORT nArrLen = rDoc.GetFrmFmts()->Count();
- for( USHORT i = 0; i < nArrLen; i++ )
+ const sal_uInt16 nArrLen = rDoc.GetFrmFmts()->Count();
+ for( sal_uInt16 i = 0; i < nArrLen; i++ )
{
SwFrmFmt* pFmt = (*rDoc.GetFrmFmts())[ i ];
@@ -2728,8 +2726,8 @@ SfxStyleSheetBase* SwStyleSheetIterator::First()
continue;
}
- const USHORT nId = pFmt->GetPoolFmtId();
- BOOL bUsed = bIsSearchUsed && ( bOrganizer || rDoc.IsUsed(*pFmt));
+ const sal_uInt16 nId = pFmt->GetPoolFmtId();
+ sal_Bool bUsed = bIsSearchUsed && ( bOrganizer || rDoc.IsUsed(*pFmt));
if( !bUsed )
{
if( (nSrchMask & ~SFXSTYLEBIT_USED) == SFXSTYLEBIT_USERDEF
@@ -2754,13 +2752,13 @@ SfxStyleSheetBase* SwStyleSheetIterator::First()
if( nSearchFamily == SFX_STYLE_FAMILY_PAGE ||
nSearchFamily == SFX_STYLE_FAMILY_ALL )
{
- const USHORT nCount = rDoc.GetPageDescCnt();
- for(USHORT i = 0; i < nCount; ++i)
+ const sal_uInt16 nCount = rDoc.GetPageDescCnt();
+ for(sal_uInt16 i = 0; i < nCount; ++i)
{
const SwPageDesc& rDesc =
const_cast<const SwDoc &>(rDoc).GetPageDesc(i);
- const USHORT nId = rDesc.GetPoolFmtId();
- BOOL bUsed = bIsSearchUsed && ( bOrganizer || rDoc.IsUsed(rDesc));
+ const sal_uInt16 nId = rDesc.GetPoolFmtId();
+ sal_Bool bUsed = bIsSearchUsed && ( bOrganizer || rDoc.IsUsed(rDesc));
if( !bUsed )
{
if( (nSrchMask & ~SFXSTYLEBIT_USED) == SFXSTYLEBIT_USERDEF
@@ -2781,12 +2779,12 @@ SfxStyleSheetBase* SwStyleSheetIterator::First()
nSearchFamily == SFX_STYLE_FAMILY_ALL )
{
const SwNumRuleTbl& rNumTbl = rDoc.GetNumRuleTbl();
- for(USHORT i = 0; i < rNumTbl.Count(); ++i)
+ for(sal_uInt16 i = 0; i < rNumTbl.Count(); ++i)
{
const SwNumRule& rRule = *rNumTbl[ i ];
if( !rRule.IsAutoRule() )
{
- BOOL bUsed = bIsSearchUsed && ( bOrganizer || rDoc.IsUsed(rRule) );
+ sal_Bool bUsed = bIsSearchUsed && ( bOrganizer || rDoc.IsUsed(rRule) );
if( !bUsed )
{
if( (nSrchMask & ~SFXSTYLEBIT_USED) == SFXSTYLEBIT_USERDEF
@@ -2818,7 +2816,7 @@ SfxStyleSheetBase* SwStyleSheetIterator::Next()
if(aLst.Count() > 0 && nLastPos < aLst.Count())
{
mxIterSheet->PresetNameAndFamily(*aLst[nLastPos]);
- mxIterSheet->SetPhysical( FALSE );
+ mxIterSheet->SetPhysical( sal_False );
mxIterSheet->SetMask( nMask );
if(mxIterSheet->pSet)
{
@@ -2844,7 +2842,7 @@ SfxStyleSheetBase* SwStyleSheetIterator::Find( const UniString& rName )
// neuer Name gesetzt, also bestimme seine Daten
mxStyleSheet->FillStyleSheet( SwDocStyleSheet::FillOnlyName );
if( !mxStyleSheet->IsPhysical() )
- mxStyleSheet->SetPhysical( FALSE );
+ mxStyleSheet->SetPhysical( sal_False );
return mxStyleSheet.get();
}
@@ -2852,16 +2850,16 @@ SfxStyleSheetBase* SwStyleSheetIterator::Find( const UniString& rName )
}
void SwStyleSheetIterator::AppendStyleList(const SvStringsDtor& rList,
- BOOL bTestUsed,
- USHORT nSection, char cType )
+ sal_Bool bTestUsed,
+ sal_uInt16 nSection, char cType )
{
if( bTestUsed )
{
SwDoc& rDoc = ((SwDocStyleSheetPool*)pBasePool)->GetDoc();
- for ( USHORT i=0; i < rList.Count(); ++i )
+ for ( sal_uInt16 i=0; i < rList.Count(); ++i )
{
- BOOL bUsed = FALSE;
- USHORT nId = SwStyleNameMapper::GetPoolIdFromUIName(*rList[i], (SwGetPoolIdFromName)nSection);
+ sal_Bool bUsed = sal_False;
+ sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName(*rList[i], (SwGetPoolIdFromName)nSection);
switch ( nSection )
{
case nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL:
@@ -2883,7 +2881,7 @@ void SwStyleSheetIterator::AppendStyleList(const SvStringsDtor& rList,
}
}
else
- for ( USHORT i=0; i < rList.Count(); ++i )
+ for ( sal_uInt16 i=0; i < rList.Count(); ++i )
aLst.Append( cType, *rList[i] );
}
@@ -2897,7 +2895,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 052be9d6d8..875d371c67 100644
--- a/sw/source/ui/app/mainwn.cxx
+++ b/sw/source/ui/app/mainwn.cxx
@@ -58,7 +58,7 @@ static SvPtrarr *pProgressContainer = 0;
static SwProgress *lcl_SwFindProgress( SwDocShell *pDocShell )
{
- for ( USHORT i = 0; i < pProgressContainer->Count(); ++i )
+ for ( sal_uInt16 i = 0; i < pProgressContainer->Count(); ++i )
{
SwProgress *pTmp = (SwProgress*)(*pProgressContainer)[i];
if ( pTmp->pDocShell == pDocShell )
@@ -68,7 +68,7 @@ static SwProgress *lcl_SwFindProgress( SwDocShell *pDocShell )
}
-void StartProgress( USHORT nMessResId, long nStartValue, long nEndValue,
+void StartProgress( sal_uInt16 nMessResId, long nStartValue, long nEndValue,
SwDocShell *pDocShell )
{
if( !SW_MOD()->IsEmbeddedLoadSave() )
@@ -88,8 +88,8 @@ void StartProgress( USHORT nMessResId, long nStartValue, long nEndValue,
pProgress->pProgress = new SfxProgress( pDocShell,
SW_RESSTR(nMessResId),
nEndValue - nStartValue,
- FALSE,
- TRUE );
+ sal_False,
+ sal_True );
pProgress->nStartCount = 1;
pProgress->pDocShell = pDocShell;
pProgressContainer->Insert( (void*)pProgress, 0 );
@@ -115,7 +115,7 @@ void EndProgress( SwDocShell *pDocShell )
if( pProgressContainer && !SW_MOD()->IsEmbeddedLoadSave() )
{
SwProgress *pProgress = 0;
- USHORT i;
+ sal_uInt16 i;
for ( i = 0; i < pProgressContainer->Count(); ++i )
{
SwProgress *pTmp = (SwProgress*)(*pProgressContainer)[i];
@@ -141,7 +141,7 @@ void EndProgress( SwDocShell *pDocShell )
}
-void SetProgressText( USHORT nId, SwDocShell *pDocShell )
+void SetProgressText( sal_uInt16 nId, SwDocShell *pDocShell )
{
if( pProgressContainer && !SW_MOD()->IsEmbeddedLoadSave() )
{
diff --git a/sw/source/ui/app/swmodul1.cxx b/sw/source/ui/app/swmodul1.cxx
index cc3be1a93a..7787d3f8e3 100644
--- a/sw/source/ui/app/swmodul1.cxx
+++ b/sw/source/ui/app/swmodul1.cxx
@@ -160,7 +160,7 @@ SwView* SwModule::GetNextView(SwView* pView)
{
DBG_ASSERT(PTR_CAST(SwView, pView),"keine SwView uebergeben");
const TypeId aTypeId = TYPE(SwView);
- SwView* pNView = (SwView*)SfxViewShell::GetNext(*pView, &aTypeId, TRUE);
+ SwView* pNView = (SwView*)SfxViewShell::GetNext(*pView, &aTypeId, sal_True);
return pNView;
}
@@ -236,7 +236,7 @@ void SwModule::ApplyUsrPref(const SwViewOption &rUsrPref, SwView* pActView,
/* -----------------------------28.09.00 12:36--------------------------------
---------------------------------------------------------------------------*/
-void SwModule::ApplyUserMetric( FieldUnit eMetric, BOOL bWeb )
+void SwModule::ApplyUserMetric( FieldUnit eMetric, sal_Bool bWeb )
{
SwMasterUsrPref* pPref;
if(bWeb)
@@ -274,7 +274,7 @@ void SwModule::ApplyUserMetric( FieldUnit eMetric, BOOL bWeb )
/*-- 12.11.2008 14:47:58---------------------------------------------------
-----------------------------------------------------------------------*/
-void SwModule::ApplyRulerMetric( FieldUnit eMetric, BOOL bHorizontal, BOOL bWeb )
+void SwModule::ApplyRulerMetric( FieldUnit eMetric, sal_Bool bHorizontal, sal_Bool bWeb )
{
SwMasterUsrPref* pPref;
if(bWeb)
@@ -329,11 +329,11 @@ SwPrintOptions* SwModule::GetPrtOptions(sal_Bool bWeb)
{
if(bWeb && !pWebPrtOpt)
{
- pWebPrtOpt = new SwPrintOptions(TRUE);
+ pWebPrtOpt = new SwPrintOptions(sal_True);
}
else if(!bWeb && !pPrtOpt)
{
- pPrtOpt = new SwPrintOptions(FALSE);
+ pPrtOpt = new SwPrintOptions(sal_False);
}
return bWeb ? pWebPrtOpt : pPrtOpt;
@@ -353,7 +353,7 @@ SwChapterNumRules* SwModule::GetChapterNumRules()
Beschreibung:
--------------------------------------------------------------------*/
-void SwModule::ShowDBObj(SwView& rView, const SwDBData& rData, BOOL /*bOnlyIfAvailable*/)
+void SwModule::ShowDBObj(SwView& rView, const SwDBData& rData, sal_Bool /*bOnlyIfAvailable*/)
{
Reference<XFrame> xFrame = rView.GetViewFrame()->GetFrame().GetFrameInterface();
Reference<XDispatchProvider> xDP(xFrame, uno::UNO_QUERY);
diff --git a/sw/source/ui/app/swmodule.cxx b/sw/source/ui/app/swmodule.cxx
index b918edc3af..7990827782 100644
--- a/sw/source/ui/app/swmodule.cxx
+++ b/sw/source/ui/app/swmodule.cxx
@@ -468,7 +468,7 @@ void SwDLL::RegisterControls()
::avmedia::MediaPlayer::RegisterChildWindow(0, pMod);
SvxSmartTagsControl::RegisterControl(SID_OPEN_SMARTTAGMENU, pMod);
- ::sfx2::TaskPaneWrapper::RegisterChildWindow( FALSE, pMod );
+ ::sfx2::TaskPaneWrapper::RegisterChildWindow( sal_False, pMod );
}
diff --git a/sw/source/ui/app/swwait.cxx b/sw/source/ui/app/swwait.cxx
index 2f484b8eb4..e8bf2f15ad 100644
--- a/sw/source/ui/app/swwait.cxx
+++ b/sw/source/ui/app/swwait.cxx
@@ -36,31 +36,31 @@
#include <swwait.hxx>
-void SwDocShell::EnterWait( BOOL bLockDispatcher )
+void SwDocShell::EnterWait( sal_Bool bLockDispatcher )
{
- SfxViewFrame *pFrame = SfxViewFrame::GetFirst( this, FALSE );
+ SfxViewFrame *pFrame = SfxViewFrame::GetFirst( this, sal_False );
while ( pFrame )
{
pFrame->GetWindow().EnterWait();
if ( bLockDispatcher )
- pFrame->GetDispatcher()->Lock( TRUE );
- pFrame = SfxViewFrame::GetNext( *pFrame, this, FALSE );
+ pFrame->GetDispatcher()->Lock( sal_True );
+ pFrame = SfxViewFrame::GetNext( *pFrame, this, sal_False );
}
}
-void SwDocShell::LeaveWait( BOOL bLockDispatcher )
+void SwDocShell::LeaveWait( sal_Bool bLockDispatcher )
{
- SfxViewFrame *pFrame = SfxViewFrame::GetFirst( this, FALSE );
+ SfxViewFrame *pFrame = SfxViewFrame::GetFirst( this, sal_False );
while ( pFrame )
{
pFrame->GetWindow().LeaveWait();
if ( bLockDispatcher )
- pFrame->GetDispatcher()->Lock( FALSE );
- pFrame = SfxViewFrame::GetNext( *pFrame, this, FALSE );
+ pFrame->GetDispatcher()->Lock( sal_False );
+ pFrame = SfxViewFrame::GetNext( *pFrame, this, sal_False );
}
}
-SwWait::SwWait( SwDocShell &rDocShell, BOOL bLockDispatcher ) :
+SwWait::SwWait( SwDocShell &rDocShell, sal_Bool bLockDispatcher ) :
rDoc ( rDocShell ),
bLock( bLockDispatcher )
{
diff --git a/sw/source/ui/cctrl/actctrl.cxx b/sw/source/ui/cctrl/actctrl.cxx
index d9d813f918..2ff446673d 100644
--- a/sw/source/ui/cctrl/actctrl.cxx
+++ b/sw/source/ui/cctrl/actctrl.cxx
@@ -50,7 +50,7 @@ long NumEditAction::Notify( NotifyEvent& rNEvt )
{
const KeyEvent* pKEvt = rNEvt.GetKeyEvent();
const KeyCode aKeyCode = pKEvt->GetKeyCode();
- const USHORT nModifier = aKeyCode.GetModifier();
+ const sal_uInt16 nModifier = aKeyCode.GetModifier();
if( aKeyCode.GetCode() == KEY_RETURN &&
!nModifier)
{
@@ -80,12 +80,12 @@ NoSpaceEdit::~NoSpaceEdit()
void NoSpaceEdit::KeyInput(const KeyEvent& rEvt)
{
- BOOL bCallParent = TRUE;
+ sal_Bool bCallParent = sal_True;
if(rEvt.GetCharCode())
{
String sKey = rEvt.GetCharCode();
if( STRING_NOTFOUND != sForbiddenChars.Search(sKey))
- bCallParent = FALSE;
+ bCallParent = sal_False;
}
if(bCallParent)
Edit::KeyInput(rEvt);
@@ -97,11 +97,11 @@ void NoSpaceEdit::Modify()
{
Selection aSel = GetSelection();
String sTemp = GetText();
- for(USHORT i = 0; i < sForbiddenChars.Len(); i++)
+ for(sal_uInt16 i = 0; i < sForbiddenChars.Len(); i++)
{
sTemp.EraseAllChars( sForbiddenChars.GetChar(i) );
}
- USHORT nDiff = GetText().Len() - sTemp.Len();
+ sal_uInt16 nDiff = GetText().Len() - sTemp.Len();
if(nDiff)
{
aSel.setMin(aSel.getMin() - nDiff);
@@ -124,7 +124,7 @@ ReturnActionEdit::~ReturnActionEdit()
void ReturnActionEdit::KeyInput( const KeyEvent& rEvt)
{
const KeyCode aKeyCode = rEvt.GetKeyCode();
- const USHORT nModifier = aKeyCode.GetModifier();
+ const sal_uInt16 nModifier = aKeyCode.GetModifier();
if( aKeyCode.GetCode() == KEY_RETURN &&
!nModifier)
{
diff --git a/sw/source/ui/cctrl/popbox.cxx b/sw/source/ui/cctrl/popbox.cxx
index 2d4ff3cfc3..d5e3842a4f 100644
--- a/sw/source/ui/cctrl/popbox.cxx
+++ b/sw/source/ui/cctrl/popbox.cxx
@@ -67,8 +67,8 @@ long SwHelpToolBox::DoubleClick( ToolBox* pCaller )
{
// kein Doppelklick auf einen Button
if( 0 == pCaller->GetCurItemId() && aDoubleClickLink.Call(0) )
- return TRUE;
- return FALSE;
+ return sal_True;
+ return sal_False;
}
/*-----------------26.02.94 00:36-------------------
diff --git a/sw/source/ui/cctrl/swlbox.cxx b/sw/source/ui/cctrl/swlbox.cxx
index d43fd46df5..e732f2bf4a 100644
--- a/sw/source/ui/cctrl/swlbox.cxx
+++ b/sw/source/ui/cctrl/swlbox.cxx
@@ -45,16 +45,16 @@ SV_IMPL_PTRARR(SwEntryLst, SwBoxEntry*)
SwBoxEntry::SwBoxEntry() :
- bModified(FALSE),
- bNew(FALSE),
+ bModified(sal_False),
+ bNew(sal_False),
nId(LISTBOX_APPEND)
{
}
-SwBoxEntry::SwBoxEntry(const String& aNam, USHORT nIdx) :
- bModified(FALSE),
- bNew(FALSE),
+SwBoxEntry::SwBoxEntry(const String& aNam, sal_uInt16 nIdx) :
+ bModified(sal_False),
+ bNew(sal_False),
aName(aNam),
nId(nIdx)
{
@@ -72,13 +72,13 @@ SwBoxEntry::SwBoxEntry(const SwBoxEntry& rOld) :
-SwComboBox::SwComboBox(Window* pParent, const ResId& rId, USHORT nStyleBits ):
+SwComboBox::SwComboBox(Window* pParent, const ResId& rId, sal_uInt16 nStyleBits ):
ComboBox(pParent, rId),
nStyle(nStyleBits)
{
// Verwaltung fuer die Stringlist aus der Resource aufbauen
- USHORT nSize = GetEntryCount();
- for( USHORT i=0; i < nSize; ++i )
+ sal_uInt16 nSize = GetEntryCount();
+ for( sal_uInt16 i=0; i < nSize; ++i )
{
const SwBoxEntry* pTmp = new SwBoxEntry(ComboBox::GetEntry(i), i);
aEntryLst.Insert(pTmp, aEntryLst.Count() );
@@ -112,7 +112,7 @@ void SwComboBox::InsertEntry(const SwBoxEntry& rEntry)
--------------------------------------------------------------------*/
-void SwComboBox::RemoveEntry(USHORT nPos)
+void SwComboBox::RemoveEntry(sal_uInt16 nPos)
{
if(nPos >= aEntryLst.Count())
return;
@@ -136,7 +136,7 @@ void SwComboBox::RemoveEntry(USHORT nPos)
Beschreibung: Position by Name
--------------------------------------------------------------------*/
-USHORT SwComboBox::GetEntryPos(const SwBoxEntry& rEntry) const
+sal_uInt16 SwComboBox::GetEntryPos(const SwBoxEntry& rEntry) const
{
return ComboBox::GetEntryPos(rEntry.aName);
}
@@ -146,7 +146,7 @@ USHORT SwComboBox::GetEntryPos(const SwBoxEntry& rEntry) const
--------------------------------------------------------------------*/
-const SwBoxEntry& SwComboBox::GetEntry(USHORT nPos) const
+const SwBoxEntry& SwComboBox::GetEntry(sal_uInt16 nPos) const
{
if(nPos < aEntryLst.Count())
return *aEntryLst[nPos];
@@ -159,13 +159,13 @@ const SwBoxEntry& SwComboBox::GetEntry(USHORT nPos) const
--------------------------------------------------------------------*/
-USHORT SwComboBox::GetRemovedCount() const
+sal_uInt16 SwComboBox::GetRemovedCount() const
{
return aDelEntryLst.Count();
}
-const SwBoxEntry& SwComboBox::GetRemovedEntry(USHORT nPos) const
+const SwBoxEntry& SwComboBox::GetRemovedEntry(sal_uInt16 nPos) const
{
if(nPos < aDelEntryLst.Count())
return *aDelEntryLst[nPos];
@@ -181,7 +181,7 @@ const SwBoxEntry& SwComboBox::GetRemovedEntry(USHORT nPos) const
void SwComboBox::InsertSorted(SwBoxEntry* pEntry)
{
ComboBox::InsertEntry(pEntry->aName);
- USHORT nPos = ComboBox::GetEntryPos(pEntry->aName);
+ sal_uInt16 nPos = ComboBox::GetEntryPos(pEntry->aName);
aEntryLst.C40_INSERT(SwBoxEntry, pEntry, nPos);
}
@@ -193,7 +193,7 @@ void SwComboBox::InsertSorted(SwBoxEntry* pEntry)
void SwComboBox::KeyInput( const KeyEvent& rKEvt )
{
- USHORT nChar = rKEvt.GetCharCode();
+ sal_uInt16 nChar = rKEvt.GetCharCode();
if(nStyle & CBS_FILENAME)
{
diff --git a/sw/source/ui/chrdlg/break.cxx b/sw/source/ui/chrdlg/break.cxx
index ce476cebed..266ccd2a8b 100644
--- a/sw/source/ui/chrdlg/break.cxx
+++ b/sw/source/ui/chrdlg/break.cxx
@@ -74,11 +74,11 @@ void SwBreakDlg::Apply()
else if(aPageBtn.IsChecked())
{
nKind = 3;
- const USHORT nPos = aPageCollBox.GetSelectEntryPos();
+ const sal_uInt16 nPos = aPageCollBox.GetSelectEntryPos();
if(0 != nPos && LISTBOX_ENTRY_NOTFOUND != nPos)
{
aTemplate = aPageCollBox.GetSelectEntry();
- nPgNum = aPageNumBox.IsChecked() ? (USHORT)aPageNumEdit.GetValue() : 0;
+ nPgNum = aPageNumBox.IsChecked() ? (sal_uInt16)aPageNumEdit.GetValue() : 0;
}
}
}
@@ -125,18 +125,18 @@ IMPL_LINK( SwBreakDlg, OkHdl, Button *, EMPTYARG )
{
if(aPageNumBox.IsChecked()) {
// wenn unterschiedliche Seitenvorlagen, testen auf Gueltigkeit
- const USHORT nPos = aPageCollBox.GetSelectEntryPos();
+ const sal_uInt16 nPos = aPageCollBox.GetSelectEntryPos();
// auf Position 0 steht 'Ohne'.
const SwPageDesc *pPageDesc;
if ( 0 != nPos && LISTBOX_ENTRY_NOTFOUND != nPos )
pPageDesc = rSh.FindPageDescByName( aPageCollBox.GetSelectEntry(),
- TRUE );
+ sal_True );
else
pPageDesc = &rSh.GetPageDesc(rSh.GetCurPageDesc());
ASSERT(pPageDesc, Seitenvorlage nicht gefunden.);
- const USHORT nUserPage = USHORT(aPageNumEdit.GetValue());
- BOOL bOk = TRUE;
+ const sal_uInt16 nUserPage = sal_uInt16(aPageNumEdit.GetValue());
+ sal_Bool bOk = sal_True;
switch(pPageDesc->GetUseOn())
{
case nsUseOnPage::PD_MIRROR:
@@ -190,8 +190,8 @@ SwBreakDlg::SwBreakDlg( Window *pParent, SwWrtShell &rS ) :
// Einfuegen der vorhandenen Seitenvorlagen in die Listbox
- const USHORT nCount = rSh.GetPageDescCnt();
- USHORT i;
+ const sal_uInt16 nCount = rSh.GetPageDescCnt();
+ sal_uInt16 i;
for( i = 0; i < nCount; ++i)
{
@@ -216,22 +216,22 @@ SwBreakDlg::SwBreakDlg( Window *pParent, SwWrtShell &rS ) :
void SwBreakDlg::CheckEnable()
{
- BOOL bEnable = TRUE;
+ sal_Bool bEnable = sal_True;
if ( bHtmlMode )
{
- aColumnBtn .Enable(FALSE);
- aPageCollBox.Enable(FALSE);
- bEnable = FALSE;
+ aColumnBtn .Enable(sal_False);
+ aPageCollBox.Enable(sal_False);
+ bEnable = sal_False;
}
- else if(rSh.GetFrmType(0,TRUE)
+ else if(rSh.GetFrmType(0,sal_True)
& (FRMTYPE_FLY_ANY | FRMTYPE_HEADER | FRMTYPE_FOOTER | FRMTYPE_FOOTNOTE))
{
- aPageBtn.Enable(FALSE);
+ aPageBtn.Enable(sal_False);
if(aPageBtn.IsChecked())
- aLineBtn.Check(TRUE);
- bEnable = FALSE;
+ aLineBtn.Check(sal_True);
+ bEnable = sal_False;
}
- const BOOL bPage = aPageBtn.IsChecked();
+ const sal_Bool bPage = aPageBtn.IsChecked();
aPageCollText.Enable( bPage );
aPageCollBox.Enable ( bPage );
@@ -239,9 +239,9 @@ void SwBreakDlg::CheckEnable()
if ( bEnable )
{
// auf Position 0 steht 'Ohne' Seitenvorlage.
- const USHORT nPos = aPageCollBox.GetSelectEntryPos();
+ const sal_uInt16 nPos = aPageCollBox.GetSelectEntryPos();
if ( 0 == nPos || LISTBOX_ENTRY_NOTFOUND == nPos )
- bEnable = FALSE;
+ bEnable = sal_False;
}
aPageNumBox .Enable(bEnable);
aPageNumEdit.Enable(bEnable);
diff --git a/sw/source/ui/chrdlg/ccoll.cxx b/sw/source/ui/chrdlg/ccoll.cxx
index 7ac0680cbb..4c8cca1a1f 100644
--- a/sw/source/ui/chrdlg/ccoll.cxx
+++ b/sw/source/ui/chrdlg/ccoll.cxx
@@ -156,7 +156,7 @@ TYPEINIT1_AUTOFACTORY(SwCondCollItem, SfxPoolItem)
****************************************************************************/
-SwCondCollItem::SwCondCollItem(USHORT _nWhich ) :
+SwCondCollItem::SwCondCollItem(sal_uInt16 _nWhich ) :
SfxPoolItem(_nWhich)
{
@@ -188,11 +188,11 @@ SfxPoolItem* SwCondCollItem::Clone( SfxItemPool * /*pPool*/ ) const
int SwCondCollItem::operator==( const SfxPoolItem& rItem) const
{
DBG_ASSERT( SfxPoolItem::operator==(rItem), "unterschiedliche Typen" );
- BOOL bReturn = TRUE;
- for(USHORT i = 0; i < COND_COMMAND_COUNT; i++)
+ sal_Bool bReturn = sal_True;
+ for(sal_uInt16 i = 0; i < COND_COMMAND_COUNT; i++)
if(sStyles[i] != ((SwCondCollItem&)rItem).sStyles[i])
{
- bReturn = FALSE;
+ bReturn = sal_False;
break;
}
@@ -204,7 +204,7 @@ int SwCondCollItem::operator==( const SfxPoolItem& rItem) const
****************************************************************************/
-const String& SwCondCollItem::GetStyle(USHORT nPos) const
+const String& SwCondCollItem::GetStyle(sal_uInt16 nPos) const
{
return nPos < COND_COMMAND_COUNT ? sStyles[nPos] : aEmptyStr;
}
@@ -214,7 +214,7 @@ const String& SwCondCollItem::GetStyle(USHORT nPos) const
****************************************************************************/
-void SwCondCollItem::SetStyle(const String* pStyle, USHORT nPos)
+void SwCondCollItem::SetStyle(const String* pStyle, sal_uInt16 nPos)
{
if( nPos < COND_COMMAND_COUNT )
sStyles[nPos] = pStyle ? *pStyle : aEmptyStr;
diff --git a/sw/source/ui/chrdlg/chardlg.cxx b/sw/source/ui/chrdlg/chardlg.cxx
index 907db6eacf..9781310d43 100644
--- a/sw/source/ui/chrdlg/chardlg.cxx
+++ b/sw/source/ui/chrdlg/chardlg.cxx
@@ -99,7 +99,7 @@ using namespace ::sfx2;
SwCharDlg::SwCharDlg(Window* pParent, SwView& rVw, const SfxItemSet& rCoreSet,
- const String* pStr, BOOL bIsDrwTxtDlg) :
+ const String* pStr, sal_Bool bIsDrwTxtDlg) :
SfxTabDialog(pParent, SW_RES(DLG_CHAR), &rCoreSet, pStr != 0),
rView(rVw),
bIsDrwTxtMode(bIsDrwTxtDlg)
@@ -150,7 +150,7 @@ SwCharDlg::~SwCharDlg()
-void SwCharDlg::PageCreated( USHORT nId, SfxTabPage &rPage )
+void SwCharDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
{
SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool()));
switch( nId )
@@ -211,18 +211,18 @@ SwCharURLPage::SwCharURLPage( Window* pParent,
aNotVisitedFT( this, SW_RES(FT_NOT_VISITED)),
aNotVisitedLB( this, SW_RES(LB_NOT_VISITED)),
pINetItem(0),
- bModified(FALSE)
+ bModified(sal_False)
{
FreeResource();
const SfxPoolItem* pItem;
SfxObjectShell* pShell;
- if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_HTML_MODE, FALSE, &pItem) ||
+ if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_HTML_MODE, sal_False, &pItem) ||
( 0 != ( pShell = SfxObjectShell::Current()) &&
0 != (pItem = pShell->GetItem(SID_HTML_MODE))))
{
- USHORT nHtmlMode = ((const SfxUInt16Item*)pItem)->GetValue();
+ sal_uInt16 nHtmlMode = ((const SfxUInt16Item*)pItem)->GetValue();
if(HTMLMODE_ON & nHtmlMode)
{
aStyleFL.Hide();
@@ -243,10 +243,10 @@ SwCharURLPage::SwCharURLPage( Window* pParent,
TargetList* pList = new TargetList;
const SfxFrame& rFrame = pView->GetViewFrame()->GetTopFrame();
rFrame.GetTargetList(*pList);
- USHORT nCount = (USHORT)pList->Count();
+ sal_uInt16 nCount = (sal_uInt16)pList->Count();
if( nCount )
{
- USHORT i;
+ sal_uInt16 i;
for ( i = 0; i < nCount; i++ )
{
@@ -278,7 +278,7 @@ SwCharURLPage::~SwCharURLPage()
void SwCharURLPage::Reset(const SfxItemSet& rSet)
{
const SfxPoolItem* pItem;
- if(SFX_ITEM_SET == rSet.GetItemState(RES_TXTATR_INETFMT, FALSE, &pItem))
+ if(SFX_ITEM_SET == rSet.GetItemState(RES_TXTATR_INETFMT, sal_False, &pItem))
{
const SwFmtINetFmt* pINetFmt = (const SwFmtINetFmt*)pItem;
aURLED.SetText( INetURLObject::decode( pINetFmt->GetValue(),
@@ -305,11 +305,11 @@ void SwCharURLPage::Reset(const SfxItemSet& rSet)
if( pINetFmt->GetMacroTbl() )
pINetItem->SetMacroTable( *pINetFmt->GetMacroTbl() );
}
- if(SFX_ITEM_SET == rSet.GetItemState(FN_PARAM_SELECTION, FALSE, &pItem))
+ if(SFX_ITEM_SET == rSet.GetItemState(FN_PARAM_SELECTION, sal_False, &pItem))
{
aTextED.SetText(((const SfxStringItem*)pItem)->GetValue());
- aTextFT.Enable( FALSE );
- aTextED.Enable( FALSE );
+ aTextFT.Enable( sal_False );
+ aTextED.Enable( sal_False );
}
}
@@ -317,7 +317,7 @@ void SwCharURLPage::Reset(const SfxItemSet& rSet)
--------------------------------------------------*/
-BOOL SwCharURLPage::FillItemSet(SfxItemSet& rSet)
+sal_Bool SwCharURLPage::FillItemSet(SfxItemSet& rSet)
{
::rtl::OUString sURL = aURLED.GetText();
if(sURL.getLength())
@@ -338,7 +338,7 @@ BOOL SwCharURLPage::FillItemSet(SfxItemSet& rSet)
//zuerst die gueltigen Einstellungen setzen
String sEntry = aVisitedLB.GetSelectEntry();
- USHORT nId = SwStyleNameMapper::GetPoolIdFromUIName( sEntry, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT);
+ sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName( sEntry, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT);
aINetFmt.SetVisitedFmtId(nId);
aINetFmt.SetVisitedFmt(nId == RES_POOLCHR_INET_VISIT ? aEmptyStr : sEntry);
@@ -351,14 +351,14 @@ BOOL SwCharURLPage::FillItemSet(SfxItemSet& rSet)
aINetFmt.SetMacroTbl( &pINetItem->GetMacroTable() );
if(aVisitedLB.GetSavedValue() != aVisitedLB.GetSelectEntryPos())
- bModified = TRUE;
+ bModified = sal_True;
if(aNotVisitedLB.GetSavedValue() != aNotVisitedLB.GetSelectEntryPos())
- bModified = TRUE;
+ bModified = sal_True;
if(aTextED.IsModified())
{
- bModified = TRUE;
+ bModified = sal_True;
rSet.Put(SfxStringItem(FN_PARAM_SELECTION, aTextED.GetText()));
}
if(bModified)
diff --git a/sw/source/ui/chrdlg/drpcps.cxx b/sw/source/ui/chrdlg/drpcps.cxx
index f69fcc577f..83a63ea159 100644
--- a/sw/source/ui/chrdlg/drpcps.cxx
+++ b/sw/source/ui/chrdlg/drpcps.cxx
@@ -89,7 +89,7 @@ using namespace ::com::sun::star::lang;
// Globals ******************************************************************
-static USHORT __FAR_DATA aPageRg[] = {
+static sal_uInt16 __FAR_DATA aPageRg[] = {
RES_PARATR_DROP, RES_PARATR_DROP,
0
};
@@ -104,14 +104,14 @@ class SwDropCapsPict : public Control
String maScriptText;
Color maBackColor;
Color maTextLineColor;
- BYTE mnLines;
+ sal_uInt8 mnLines;
long mnTotLineH;
long mnLineH;
long mnTextH;
- USHORT mnDistance;
+ sal_uInt16 mnDistance;
sal_Int32 mnLeading;
Printer* mpPrinter;
- BOOL mbDelPrinter;
+ sal_Bool mbDelPrinter;
SvULongs maTextWidth;
SvXub_StrLens maScriptChg;
SvUShorts maScriptType;
@@ -126,19 +126,19 @@ class SwDropCapsPict : public Control
Size CalcTextSize( void );
inline void InitPrinter( void );
void _InitPrinter( void );
- void GetFontSettings( const SwDropCapsPage& _rPage, Font& _rFont, USHORT _nWhich );
+ void GetFontSettings( const SwDropCapsPage& _rPage, Font& _rFont, sal_uInt16 _nWhich );
public:
SwDropCapsPict(Window *pParent, const ResId &rResId) :
- Control(pParent, rResId), mpPrinter( NULL ), mbDelPrinter( FALSE ) {}
+ Control(pParent, rResId), mpPrinter( NULL ), mbDelPrinter( sal_False ) {}
~SwDropCapsPict();
void UpdatePaintSettings( void ); // also invalidates control!
inline void SetText( const String& rT );
- inline void SetLines( BYTE nL );
- inline void SetDistance( USHORT nD );
- inline void SetValues( const String& rText, BYTE nLines, USHORT nDistance );
+ inline void SetLines( sal_uInt8 nL );
+ inline void SetDistance( sal_uInt16 nD );
+ inline void SetValues( const String& rText, sal_uInt8 nLines, sal_uInt16 nDistance );
void DrawPrev( const Point& rPt );
};
@@ -149,19 +149,19 @@ inline void SwDropCapsPict::SetText( const String& rT )
UpdatePaintSettings();
}
-inline void SwDropCapsPict::SetLines( BYTE nL )
+inline void SwDropCapsPict::SetLines( sal_uInt8 nL )
{
mnLines = nL;
UpdatePaintSettings();
}
-inline void SwDropCapsPict::SetDistance( USHORT nD )
+inline void SwDropCapsPict::SetDistance( sal_uInt16 nD )
{
mnDistance = nD;
UpdatePaintSettings();
}
-inline void SwDropCapsPict::SetValues( const String& rText, BYTE nLines, USHORT nDistance )
+inline void SwDropCapsPict::SetValues( const String& rText, sal_uInt8 nLines, sal_uInt16 nDistance )
{
maText = rText;
mnLines = nLines;
@@ -181,10 +181,10 @@ Default-String aus Zeichenanzahl erzeugen (A, AB, ABC, ...)
****************************************************************************/
-String GetDefaultString(USHORT nChars)
+String GetDefaultString(sal_uInt16 nChars)
{
String aStr;
- for (USHORT i = 0; i < nChars; i++)
+ for (sal_uInt16 i = 0; i < nChars; i++)
aStr += String((char) (i + 65));
return aStr;
}
@@ -218,7 +218,7 @@ Pict: Update Font
#define LINES 10
#define BORDER 2
-void SwDropCapsPict::GetFontSettings( const SwDropCapsPage& _rPage, Font& _rFont, USHORT _nWhich )
+void SwDropCapsPict::GetFontSettings( const SwDropCapsPage& _rPage, Font& _rFont, sal_uInt16 _nWhich )
{
SfxItemSet aSet( _rPage.rSh.GetAttrPool(), _nWhich, _nWhich);
_rPage.rSh.GetCurAttr(aSet);
@@ -261,7 +261,7 @@ void SwDropCapsPict::UpdatePaintSettings( void )
// CTL
GetFontSettings( *pPage, maCTLFont, RES_CHRATR_CTL_FONT );
- pPage->rSh.Pop(FALSE);
+ pPage->rSh.Pop(sal_False);
pPage->rSh.EndCrsrMove();
}
else
@@ -285,9 +285,9 @@ void SwDropCapsPict::UpdatePaintSettings( void )
maCJKFont.SetSize(Size(0, mnTextH));
maCTLFont.SetSize(Size(0, mnTextH));
- aFont.SetTransparent(TRUE);
- maCJKFont.SetTransparent(TRUE);
- maCTLFont.SetTransparent(TRUE);
+ aFont.SetTransparent(sal_True);
+ maCJKFont.SetTransparent(sal_True);
+ maCTLFont.SetTransparent(sal_True);
aFont.SetColor( SwViewOption::GetFontColor() );
maCJKFont.SetColor( SwViewOption::GetFontColor() );
@@ -337,12 +337,12 @@ void SwDropCapsPict::Paint(const Rectangle &/*rRect*/)
ASSERT(mnLineH > 0, "So klein lassen wir uns nicht machen");
long nY0 = (aOutputSizePixel.Height() - (LINES * mnTotLineH)) / 2;
SetFillColor( maTextLineColor );
- for (USHORT i = 0; i < LINES; ++i)
+ for (sal_uInt16 i = 0; i < LINES; ++i)
DrawRect(Rectangle(Point(BORDER, nY0 + i * mnTotLineH), Size(aOutputSizePixel.Width() - 2 * BORDER, mnLineH)));
// Texthintergrund mit Abstand (240 twips ~ 1 Zeilenhoehe)
- ULONG lDistance = mnDistance;
- USHORT nDistW = (USHORT) (ULONG) (((lDistance * 100) / 240) * mnTotLineH) / 100;
+ sal_uLong lDistance = mnDistance;
+ sal_uInt16 nDistW = (sal_uInt16) (sal_uLong) (((lDistance * 100) / 240) * mnTotLineH) / 100;
SetFillColor( maBackColor );
if(((SwDropCapsPage*)GetParent())->aDropCapsBox.IsChecked())
{
@@ -363,7 +363,7 @@ void SwDropCapsPict::DrawPrev( const Point& rPt )
InitPrinter();
Font aOldFont = mpPrinter->GetFont();
- USHORT nScript;
+ sal_uInt16 nScript;
size_t nIdx = 0;
xub_StrLen nStart = 0;
xub_StrLen nEnd;
@@ -396,7 +396,7 @@ void SwDropCapsPict::DrawPrev( const Point& rPt )
else
break;
}
- while( TRUE );
+ while( sal_True );
mpPrinter->SetFont( aOldFont );
}
@@ -422,8 +422,8 @@ void SwDropCapsPict::CheckScript( void )
}
if( xBreak.is() )
{
- USHORT nScript = xBreak->getScriptType( maText, 0 );
- USHORT nChg = 0;
+ sal_uInt16 nScript = xBreak->getScriptType( maText, 0 );
+ sal_uInt16 nChg = 0;
if( I18N_SCRIPTTYPE::WEAK == nScript )
{
nChg = (xub_StrLen)xBreak->endOfScript( maText, nChg, nScript );
@@ -438,13 +438,13 @@ void SwDropCapsPict::CheckScript( void )
nChg = (xub_StrLen)xBreak->endOfScript( maText, nChg, nScript );
maScriptChg.push_back( nChg );
maScriptType.Insert( nScript, nCnt );
- maTextWidth.Insert( ULONG(0), nCnt++ );
+ maTextWidth.Insert( sal_uLong(0), nCnt++ );
if( nChg < maText.Len() )
nScript = xBreak->getScriptType( maText, nChg );
else
break;
- } while( TRUE );
+ } while( sal_True );
}
}
@@ -452,7 +452,7 @@ Size SwDropCapsPict::CalcTextSize( void )
{
InitPrinter();
- USHORT nScript;
+ sal_uInt16 nScript;
size_t nIdx = 0;
xub_StrLen nStart = 0;
xub_StrLen nEnd;
@@ -478,7 +478,7 @@ Size SwDropCapsPict::CalcTextSize( void )
{
SvxFont& rFnt = ( nScript == I18N_SCRIPTTYPE::ASIAN )? maCJKFont :
( ( nScript == I18N_SCRIPTTYPE::COMPLEX )? maCTLFont : maFont );
- ULONG nWidth = rFnt.GetTxtSize( mpPrinter, maText, nStart, nEnd-nStart ).Width();
+ sal_uLong nWidth = rFnt.GetTxtSize( mpPrinter, maText, nStart, nEnd-nStart ).Width();
if( nIdx < maTextWidth.Count() )
maTextWidth[ nIdx++ ] = nWidth;
@@ -504,7 +504,7 @@ Size SwDropCapsPict::CalcTextSize( void )
else
break;
}
- while( TRUE );
+ while( sal_True );
nHeight -= nAscent;
nCJKHeight -= nCJKAscent;
nCTLHeight -= nCTLAscent;
@@ -532,7 +532,7 @@ void SwDropCapsPict::_InitPrinter()
if ( !mpPrinter )
{
mpPrinter = new Printer;
- mbDelPrinter = TRUE;
+ mbDelPrinter = sal_True;
}
}
@@ -547,7 +547,7 @@ SwDropCapsDlg::SwDropCapsDlg(Window *pParent, const SfxItemSet &rSet ) :
{
SwDropCapsPage* pNewPage = (SwDropCapsPage*) SwDropCapsPage::Create(this, rSet);
- pNewPage->SetFormat(FALSE);
+ pNewPage->SetFormat(sal_False);
SetTabPage(pNewPage);
}
@@ -587,15 +587,15 @@ SwDropCapsPage::SwDropCapsPage(Window *pParent, const SfxItemSet &rSet) :
pPict (new SwDropCapsPict(this, SW_RES(CNT_PICT))),
- bModified(FALSE),
- bFormat(TRUE),
+ bModified(sal_False),
+ bFormat(sal_True),
rSh(::GetActiveView()->GetWrtShell())
{
FreeResource();
SetExchangeSupport();
- USHORT nHtmlMode = ::GetHtmlMode((const SwDocShell*)SfxObjectShell::Current());
- bHtmlMode = nHtmlMode & HTMLMODE_ON ? TRUE : FALSE;
+ sal_uInt16 nHtmlMode = ::GetHtmlMode((const SwDocShell*)SfxObjectShell::Current());
+ bHtmlMode = nHtmlMode & HTMLMODE_ON ? sal_True : sal_False;
//Im Vorlagendialog kann der Text nicht beeinflusst werden
aTextText.Enable( !bFormat );
@@ -652,7 +652,7 @@ Page: FillItemSet-Overload
****************************************************************************/
-BOOL SwDropCapsPage::FillItemSet(SfxItemSet &rSet)
+sal_Bool SwDropCapsPage::FillItemSet(SfxItemSet &rSet)
{
if(bModified)
FillSet(rSet);
@@ -682,7 +682,7 @@ void SwDropCapsPage::Reset(const SfxItemSet &rSet)
aDistanceField.SetValue(0);
}
- ::FillCharStyleListBox(aTemplateBox, rSh.GetView().GetDocShell(), TRUE);
+ ::FillCharStyleListBox(aTemplateBox, rSh.GetView().GetDocShell(), sal_True);
aTemplateBox.InsertEntry(SW_RESSTR(SW_STR_NONE), 0);
// Vorlage defaulten
@@ -692,7 +692,7 @@ void SwDropCapsPage::Reset(const SfxItemSet &rSet)
// Controls enablen
aDropCapsBox.Check(aFmtDrop.GetLines() > 1);
- const USHORT nVal = USHORT(aDropCapsField.GetValue());
+ const sal_uInt16 nVal = sal_uInt16(aDropCapsField.GetValue());
if (bFormat)
aTextEdit.SetText(GetDefaultString(nVal));
else
@@ -704,11 +704,11 @@ void SwDropCapsPage::Reset(const SfxItemSet &rSet)
// Preview
pPict->SetValues( aTextEdit.GetText(),
- BYTE( aLinesField.GetValue() ),
- USHORT( aDistanceField.Denormalize( aDistanceField.GetValue( FUNIT_TWIP ) ) ) );
+ sal_uInt8( aLinesField.GetValue() ),
+ sal_uInt16( aDistanceField.Denormalize( aDistanceField.GetValue( FUNIT_TWIP ) ) ) );
ClickHdl(&aDropCapsBox);
- bModified = FALSE;
+ bModified = sal_False;
}
/****************************************************************************
@@ -718,7 +718,7 @@ Page: Click-Handler der CheckBox
IMPL_LINK( SwDropCapsPage, ClickHdl, Button *, EMPTYARG )
{
- BOOL bChecked = aDropCapsBox.IsChecked();
+ sal_Bool bChecked = aDropCapsBox.IsChecked();
aWholeWordCB .Enable( bChecked && !bHtmlMode );
@@ -741,7 +741,7 @@ IMPL_LINK( SwDropCapsPage, ClickHdl, Button *, EMPTYARG )
else
pPict->SetText(aEmptyStr);
- bModified = TRUE;
+ bModified = sal_True;
return 0;
}
@@ -757,7 +757,7 @@ IMPL_LINK( SwDropCapsPage, WholeWordHdl, CheckBox *, EMPTYARG )
ModifyHdl(&aDropCapsField);
- bModified = TRUE;
+ bModified = sal_True;
return 0;
}
@@ -774,11 +774,11 @@ IMPL_LINK( SwDropCapsPage, ModifyHdl, Edit *, pEdit )
// Ggf. Text setzen
if (pEdit == &aDropCapsField)
{
- USHORT nVal;
- BOOL bSetText = FALSE;
+ sal_uInt16 nVal;
+ sal_Bool bSetText = sal_False;
if (!aWholeWordCB.IsChecked())
- nVal = (USHORT)aDropCapsField.GetValue();
+ nVal = (sal_uInt16)aDropCapsField.GetValue();
else
nVal = 0;
@@ -786,7 +786,7 @@ IMPL_LINK( SwDropCapsPage, ModifyHdl, Edit *, pEdit )
sPreview = GetDefaultString(nVal);
else
{
- bSetText = TRUE;
+ bSetText = sal_True;
sPreview = rSh.GetDropTxt(nVal);
}
@@ -795,7 +795,7 @@ IMPL_LINK( SwDropCapsPage, ModifyHdl, Edit *, pEdit )
if (sEdit.Len() && sPreview.CompareTo(sEdit, sEdit.Len()) != COMPARE_EQUAL)
{
sPreview = sEdit.Copy(0, sPreview.Len());
- bSetText = FALSE;
+ bSetText = sal_False;
}
if (bSetText)
@@ -803,8 +803,8 @@ IMPL_LINK( SwDropCapsPage, ModifyHdl, Edit *, pEdit )
}
else if (pEdit == &aTextEdit) // Ggf. Anzahl setzen
{
- USHORT nTmp = aTextEdit.GetText().Len();
- aDropCapsField.SetValue(Max((USHORT)1, nTmp));
+ sal_uInt16 nTmp = aTextEdit.GetText().Len();
+ aDropCapsField.SetValue(Max((sal_uInt16)1, nTmp));
sPreview = aTextEdit.GetText().Copy(0, nTmp);
}
@@ -813,11 +813,11 @@ IMPL_LINK( SwDropCapsPage, ModifyHdl, Edit *, pEdit )
if (pEdit == &aDropCapsField || pEdit == &aTextEdit)
pPict->SetText (sPreview);
else if (pEdit == &aLinesField)
- pPict->SetLines((BYTE)aLinesField.GetValue());
+ pPict->SetLines((sal_uInt8)aLinesField.GetValue());
else
- pPict->SetDistance((USHORT)aDistanceField.Denormalize(aDistanceField.GetValue(FUNIT_TWIP)));
+ pPict->SetDistance((sal_uInt16)aDistanceField.Denormalize(aDistanceField.GetValue(FUNIT_TWIP)));
- bModified = TRUE;
+ bModified = sal_True;
return 0;
}
@@ -830,13 +830,13 @@ Page: Select-Handler der Template-Box.
IMPL_LINK_INLINE_START( SwDropCapsPage, SelectHdl, ListBox *, EMPTYARG )
{
pPict->UpdatePaintSettings();
- bModified = TRUE;
+ bModified = sal_True;
return 0;
}
IMPL_LINK_INLINE_END( SwDropCapsPage, SelectHdl, ListBox *, EMPTYARG )
-USHORT* SwDropCapsPage::GetRanges()
+sal_uInt16* SwDropCapsPage::GetRanges()
{
return aPageRg;
}
@@ -848,13 +848,13 @@ void SwDropCapsPage::FillSet( SfxItemSet &rSet )
{
SwFmtDrop aFmt;
- BOOL bOn = aDropCapsBox.IsChecked();
+ sal_Bool bOn = aDropCapsBox.IsChecked();
if(bOn)
{
// Anzahl, Zeilen, Abstand
- aFmt.GetChars() = (BYTE) aDropCapsField.GetValue();
- aFmt.GetLines() = (BYTE) aLinesField.GetValue();
- aFmt.GetDistance() = (USHORT) aDistanceField.Denormalize(aDistanceField.GetValue(FUNIT_TWIP));
+ aFmt.GetChars() = (sal_uInt8) aDropCapsField.GetValue();
+ aFmt.GetLines() = (sal_uInt8) aLinesField.GetValue();
+ aFmt.GetDistance() = (sal_uInt16) aDistanceField.Denormalize(aDistanceField.GetValue(FUNIT_TWIP));
aFmt.GetWholeWord() = aWholeWordCB.IsChecked();
// Vorlage
diff --git a/sw/source/ui/chrdlg/numpara.cxx b/sw/source/ui/chrdlg/numpara.cxx
index 3742fd242c..4973595738 100644
--- a/sw/source/ui/chrdlg/numpara.cxx
+++ b/sw/source/ui/chrdlg/numpara.cxx
@@ -56,7 +56,7 @@
// Globals ******************************************************************
-static USHORT __FAR_DATA aPageRg[] = {
+static sal_uInt16 __FAR_DATA aPageRg[] = {
FN_NUMBER_NEWSTART, FN_NUMBER_NEWSTART_AT,
0
};
@@ -83,18 +83,18 @@ SwParagraphNumTabPage::SwParagraphNumTabPage(Window* pParent,
// --> OD 2008-04-14 #outlinelevel#
msOutlineNumbering( SW_RES( STR_OUTLINE_NUMBERING ) ),
// <--
- bModified(FALSE),
- bCurNumrule(FALSE)
+ bModified(sal_False),
+ bCurNumrule(sal_False)
{
FreeResource();
const SfxPoolItem* pItem;
SfxObjectShell* pObjSh;
- if(SFX_ITEM_SET == rAttr.GetItemState(SID_HTML_MODE, FALSE, &pItem) ||
+ if(SFX_ITEM_SET == rAttr.GetItemState(SID_HTML_MODE, sal_False, &pItem) ||
( 0 != ( pObjSh = SfxObjectShell::Current()) &&
0 != (pItem = pObjSh->GetItem(SID_HTML_MODE))))
{
- USHORT nHtmlMode = ((const SfxUInt16Item*)pItem)->GetValue();
+ sal_uInt16 nHtmlMode = ((const SfxUInt16Item*)pItem)->GetValue();
if(HTMLMODE_ON & nHtmlMode)
{
aCountParaFL .Hide();
@@ -131,7 +131,7 @@ SfxTabPage* SwParagraphNumTabPage::Create( Window* pParent,
/*-----------------31.01.98 08:38-------------------
--------------------------------------------------*/
-USHORT* SwParagraphNumTabPage::GetRanges()
+sal_uInt16* SwParagraphNumTabPage::GetRanges()
{
return aPageRg;
}
@@ -139,18 +139,18 @@ USHORT* SwParagraphNumTabPage::GetRanges()
/*-----------------31.01.98 08:38-------------------
--------------------------------------------------*/
-BOOL SwParagraphNumTabPage::FillItemSet( SfxItemSet& rSet )
+sal_Bool SwParagraphNumTabPage::FillItemSet( SfxItemSet& rSet )
{
//<-#outline level, added by zhaojianwei
if( aOutlineLvLB.GetSelectEntryPos() != aOutlineLvLB.GetSavedValue())
{
- USHORT aOutlineLv = aOutlineLvLB.GetSelectEntryPos();
+ sal_uInt16 aOutlineLv = aOutlineLvLB.GetSelectEntryPos();
const SfxUInt16Item* pOldOutlineLv = (const SfxUInt16Item*)GetOldItem( rSet, SID_ATTR_PARA_OUTLINE_LEVEL);
SfxUInt16Item* pOutlineLv = (SfxUInt16Item*)pOldOutlineLv->Clone();
pOutlineLv->SetValue( aOutlineLv );
rSet.Put(*pOutlineLv);
delete pOutlineLv;
- bModified = TRUE;
+ bModified = sal_True;
}
//<-end
if( aNumberStyleLB.GetSelectEntryPos() != aNumberStyleLB.GetSavedValue())
@@ -163,18 +163,18 @@ BOOL SwParagraphNumTabPage::FillItemSet( SfxItemSet& rSet )
pRule->SetValue(aStyle);
rSet.Put(*pRule);
delete pRule;
- bModified = TRUE;
+ bModified = sal_True;
}
if(aNewStartCB.GetState() != aNewStartCB.GetSavedValue() ||
aNewStartNumberCB.GetState() != aNewStartNumberCB.GetSavedValue()||
aNewStartNF.GetText() != aNewStartNF.GetSavedValue())
{
- bModified = TRUE;
- BOOL bNewStartChecked = STATE_CHECK == aNewStartCB.GetState();
- BOOL bNumberNewStartChecked = STATE_CHECK == aNewStartNumberCB.GetState();
+ bModified = sal_True;
+ sal_Bool bNewStartChecked = STATE_CHECK == aNewStartCB.GetState();
+ sal_Bool bNumberNewStartChecked = STATE_CHECK == aNewStartNumberCB.GetState();
rSet.Put(SfxBoolItem(FN_NUMBER_NEWSTART, bNewStartChecked));
rSet.Put(SfxUInt16Item(FN_NUMBER_NEWSTART_AT,
- bNumberNewStartChecked && bNewStartChecked ? (USHORT)aNewStartNF.GetValue() : USHRT_MAX));
+ bNumberNewStartChecked && bNewStartChecked ? (sal_uInt16)aNewStartNF.GetValue() : USHRT_MAX));
}
if(aCountParaCB.GetSavedValue() != aCountParaCB.GetState() ||
@@ -182,11 +182,11 @@ BOOL SwParagraphNumTabPage::FillItemSet( SfxItemSet& rSet )
aRestartNF.GetSavedValue() != aRestartNF.GetText() )
{
SwFmtLineNumber aFmt;
- aFmt.SetStartValue( static_cast< ULONG >(aRestartParaCountCB.GetState() == STATE_CHECK ?
+ aFmt.SetStartValue( static_cast< sal_uLong >(aRestartParaCountCB.GetState() == STATE_CHECK ?
aRestartNF.GetValue() : 0 ));
aFmt.SetCountLines( aCountParaCB.IsChecked() );
rSet.Put(aFmt);
- bModified = TRUE;
+ bModified = sal_True;
}
return bModified;
}
@@ -196,7 +196,7 @@ BOOL SwParagraphNumTabPage::FillItemSet( SfxItemSet& rSet )
--------------------------------------------------*/
void SwParagraphNumTabPage::Reset( const SfxItemSet& rSet )
{
- BOOL bHasNumberStyle = FALSE;
+ sal_Bool bHasNumberStyle = sal_False;
SfxItemState eItemState = rSet.GetItemState( GetWhich(SID_ATTR_PARA_OUTLINE_LEVEL) );
@@ -231,7 +231,7 @@ void SwParagraphNumTabPage::Reset( const SfxItemSet& rSet )
else
aNumberStyleLB.SelectEntry( aStyle );
- bHasNumberStyle = TRUE;
+ bHasNumberStyle = sal_True;
}
else
{
@@ -243,12 +243,12 @@ void SwParagraphNumTabPage::Reset( const SfxItemSet& rSet )
eItemState = rSet.GetItemState( FN_NUMBER_NEWSTART );
if(eItemState > SFX_ITEM_AVAILABLE )
{
- bCurNumrule = TRUE;
+ bCurNumrule = sal_True;
const SfxBoolItem& rStart = (const SfxBoolItem&)rSet.Get(FN_NUMBER_NEWSTART);
aNewStartCB.SetState(
rStart.GetValue() ?
STATE_CHECK : STATE_NOCHECK );
- aNewStartCB.EnableTriState(FALSE);
+ aNewStartCB.EnableTriState(sal_False);
}
else
aNewStartCB.SetState(bHasNumberStyle ? STATE_NOCHECK : STATE_DONTKNOW);
@@ -257,13 +257,13 @@ void SwParagraphNumTabPage::Reset( const SfxItemSet& rSet )
eItemState = rSet.GetItemState( FN_NUMBER_NEWSTART_AT);
if( eItemState > SFX_ITEM_AVAILABLE )
{
- USHORT nNewStart = ((const SfxUInt16Item&)rSet.Get(FN_NUMBER_NEWSTART_AT)).GetValue();
+ sal_uInt16 nNewStart = ((const SfxUInt16Item&)rSet.Get(FN_NUMBER_NEWSTART_AT)).GetValue();
aNewStartNumberCB.Check(USHRT_MAX != nNewStart);
if(USHRT_MAX == nNewStart)
nNewStart = 1;
aNewStartNF.SetValue(nNewStart);
- aNewStartNumberCB.EnableTriState(FALSE);
+ aNewStartNumberCB.EnableTriState(sal_False);
}
else
aNewStartCB.SetState(STATE_DONTKNOW);
@@ -274,14 +274,14 @@ void SwParagraphNumTabPage::Reset( const SfxItemSet& rSet )
if( SFX_ITEM_AVAILABLE <= rSet.GetItemState(RES_LINENUMBER))
{
SwFmtLineNumber& rNum = (SwFmtLineNumber&)rSet.Get(RES_LINENUMBER);
- ULONG nStartValue = rNum.GetStartValue();
- BOOL bCount = rNum.IsCount();
+ sal_uLong nStartValue = rNum.GetStartValue();
+ sal_Bool bCount = rNum.IsCount();
aCountParaCB.SetState( bCount ? STATE_CHECK : STATE_NOCHECK );
aRestartParaCountCB.SetState( 0 != nStartValue ? STATE_CHECK : STATE_NOCHECK );
aRestartNF.SetValue(nStartValue == 0 ? 1 : nStartValue);
LineCountHdl_Impl(&aCountParaCB);
- aCountParaCB.EnableTriState(FALSE);
- aRestartParaCountCB.EnableTriState(FALSE);
+ aCountParaCB.EnableTriState(sal_False);
+ aRestartParaCountCB.EnableTriState(sal_False);
}
else
{
@@ -292,7 +292,7 @@ void SwParagraphNumTabPage::Reset( const SfxItemSet& rSet )
aRestartParaCountCB.SaveValue();
aRestartNF.SaveValue();
- bModified = FALSE;
+ bModified = sal_False;
}
/*-----------------31.01.98 08:38-------------------
@@ -324,7 +324,7 @@ void SwParagraphNumTabPage::EnableNewStart()
--------------------------------------------------*/
IMPL_LINK( SwParagraphNumTabPage, NewStartHdl_Impl, CheckBox*, EMPTYARG )
{
- BOOL bEnable = aNewStartCB.IsChecked();
+ sal_Bool bEnable = aNewStartCB.IsChecked();
aNewStartNumberCB.Enable(bEnable);
aNewStartNF.Enable(bEnable && aNewStartNumberCB.IsChecked());
return 0;
@@ -337,7 +337,7 @@ IMPL_LINK( SwParagraphNumTabPage, LineCountHdl_Impl, CheckBox* , EMPTYARG)
{
aRestartParaCountCB.Enable(aCountParaCB.IsChecked());
- BOOL bEnableRestartValue = aRestartParaCountCB.IsEnabled() &&
+ sal_Bool bEnableRestartValue = aRestartParaCountCB.IsEnabled() &&
aRestartParaCountCB.IsChecked();
aRestartFT.Enable(bEnableRestartValue);
aRestartNF.Enable(bEnableRestartValue);
@@ -354,7 +354,7 @@ IMPL_LINK( SwParagraphNumTabPage, StyleHdl_Impl, ListBox*, pBox )
// if( msOutlineNumbering == dd)
{
}
- BOOL bEnable = bCurNumrule || pBox->GetSelectEntryPos() > 0;
+ sal_Bool bEnable = bCurNumrule || pBox->GetSelectEntryPos() > 0;
aNewStartCB.Enable(bEnable);
NewStartHdl_Impl(&aNewStartCB);
diff --git a/sw/source/ui/chrdlg/pardlg.cxx b/sw/source/ui/chrdlg/pardlg.cxx
index a7e1970a8b..a6b6d2e6ef 100644
--- a/sw/source/ui/chrdlg/pardlg.cxx
+++ b/sw/source/ui/chrdlg/pardlg.cxx
@@ -70,10 +70,10 @@
SwParaDlg::SwParaDlg(Window *pParent,
SwView& rVw,
const SfxItemSet& rCoreSet,
- BYTE nDialogMode,
+ sal_uInt8 nDialogMode,
const String *pTitle,
- BOOL bDraw,
- UINT16 nDefPage):
+ sal_Bool bDraw,
+ sal_uInt16 nDefPage):
SfxTabDialog(pParent, bDraw ? SW_RES(DLG_DRAWPARA) : SW_RES(DLG_PARA),
&rCoreSet, 0 != pTitle),
@@ -86,7 +86,7 @@ SwParaDlg::SwParaDlg(Window *pParent,
FreeResource();
nHtmlMode = ::GetHtmlMode(rVw.GetDocShell());
- BOOL bHtmlMode = static_cast< BOOL >(nHtmlMode & HTMLMODE_ON);
+ sal_Bool bHtmlMode = static_cast< sal_Bool >(nHtmlMode & HTMLMODE_ON);
if(pTitle)
{
// Update des Titels
@@ -127,8 +127,8 @@ SwParaDlg::SwParaDlg(Window *pParent,
else
RemoveTabPage(TP_PARA_ASIAN);
- USHORT nWhich(rCoreSet.GetPool()->GetWhich(SID_ATTR_LRSPACE));
- BOOL bLRValid = SFX_ITEM_AVAILABLE <= rCoreSet.GetItemState(nWhich);
+ sal_uInt16 nWhich(rCoreSet.GetPool()->GetWhich(SID_ATTR_LRSPACE));
+ sal_Bool bLRValid = SFX_ITEM_AVAILABLE <= rCoreSet.GetItemState(nWhich);
if(bHtmlMode || !bLRValid)
RemoveTabPage(TP_TABULATOR);
else
@@ -182,7 +182,7 @@ __EXPORT SwParaDlg::~SwParaDlg()
}
-void __EXPORT SwParaDlg::PageCreated(USHORT nId, SfxTabPage& rPage)
+void __EXPORT SwParaDlg::PageCreated(sal_uInt16 nId, SfxTabPage& rPage)
{
SwWrtShell& rSh = rView.GetWrtShell();
SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool()));
@@ -196,7 +196,7 @@ void __EXPORT SwParaDlg::PageCreated(USHORT nId, SfxTabPage& rPage)
else if( nId == TP_PARA_STD )
{
aSet.Put(SfxUInt16Item(SID_SVXSTDPARAGRAPHTABPAGE_PAGEWIDTH,
- static_cast< UINT16 >(rSh.GetAnyCurRect(RECT_PAGE_PRT).Width()) ));
+ static_cast< sal_uInt16 >(rSh.GetAnyCurRect(RECT_PAGE_PRT).Width()) ));
if (!bDrawParaDlg)
{
@@ -210,7 +210,7 @@ void __EXPORT SwParaDlg::PageCreated(USHORT nId, SfxTabPage& rPage)
{
if (!bDrawParaDlg)
{
- aSet.Put(SfxBoolItem(SID_SVXPARAALIGNTABPAGE_ENABLEJUSTIFYEXT,TRUE));
+ aSet.Put(SfxBoolItem(SID_SVXPARAALIGNTABPAGE_ENABLEJUSTIFYEXT,sal_True));
rPage.PageCreated(aSet);
}
}
@@ -218,17 +218,17 @@ void __EXPORT SwParaDlg::PageCreated(USHORT nId, SfxTabPage& rPage)
{
// Seitenumbruch nur, wenn der Cursor im Body-Bereich und nicht in
// einer Tabelle steht
- const USHORT eType = rSh.GetFrmType(0,TRUE);
+ const sal_uInt16 eType = rSh.GetFrmType(0,sal_True);
if( !(FRMTYPE_BODY & eType) ||
rSh.GetSelectionType() & nsSelectionType::SEL_TBL )
{
- aSet.Put(SfxBoolItem(SID_DISABLE_SVXEXTPARAGRAPHTABPAGE_PAGEBREAK,TRUE));
+ aSet.Put(SfxBoolItem(SID_DISABLE_SVXEXTPARAGRAPHTABPAGE_PAGEBREAK,sal_True));
rPage.PageCreated(aSet);
}
}
else if( TP_DROPCAPS == nId )
{
- ((SwDropCapsPage&)rPage).SetFormat(FALSE);
+ ((SwDropCapsPage&)rPage).SetFormat(sal_False);
}
else if( TP_BACKGROUND == nId )
{
@@ -259,7 +259,7 @@ void __EXPORT SwParaDlg::PageCreated(USHORT nId, SfxTabPage& rPage)
aNames.Insert(new String(pBase->GetName()));
pBase = pPool->Next();
}
- for(USHORT i = 0; i < aNames.Count(); i++)
+ for(sal_uInt16 i = 0; i < aNames.Count(); i++)
rBox.InsertEntry(*aNames.GetObject(i));
}
diff --git a/sw/source/ui/chrdlg/swuiccoll.cxx b/sw/source/ui/chrdlg/swuiccoll.cxx
index f5e8c1e4ef..df6edad2db 100644
--- a/sw/source/ui/chrdlg/swuiccoll.cxx
+++ b/sw/source/ui/chrdlg/swuiccoll.cxx
@@ -59,7 +59,7 @@
#include "swuiccoll.hxx"
-static USHORT __FAR_DATA aPageRg[] = {
+static sal_uInt16 __FAR_DATA aPageRg[] = {
FN_COND_COLL, FN_COND_COLL,
0
};
@@ -94,7 +94,7 @@ SwCondCollPage::SwCondCollPage(Window *pParent, const SfxItemSet &rSet)
pCmds( SwCondCollItem::GetCmds() ),
pFmt(0),
- bNewTemplate(FALSE)
+ bNewTemplate(sal_False)
{
FreeResource();
SetExchangeSupport();
@@ -118,12 +118,12 @@ SwCondCollPage::SwCondCollPage(Window *pParent, const SfxItemSet &rSet)
SfxStyleFamilies aFamilies(SW_RES(DLG_STYLE_DESIGNER));
const SfxStyleFamilyItem* pFamilyItem = 0;
- USHORT nCount = aFamilies.Count();
- USHORT i;
+ sal_uInt16 nCount = aFamilies.Count();
+ sal_uInt16 i;
for( i = 0; i < nCount; ++i)
{
- if(SFX_STYLE_FAMILY_PARA == (USHORT)(pFamilyItem = aFamilies.GetObject(i))->GetFamily())
+ if(SFX_STYLE_FAMILY_PARA == (sal_uInt16)(pFamilyItem = aFamilies.GetObject(i))->GetFamily())
break;
}
@@ -131,7 +131,7 @@ SwCondCollPage::SwCondCollPage(Window *pParent, const SfxItemSet &rSet)
for( i = 0; i < rFilterList.Count(); ++i)
{
aFilterLB.InsertEntry(rFilterList.GetObject(i)->aName);
- USHORT* pFilter = new USHORT(rFilterList.GetObject(i)->nFlags);
+ sal_uInt16* pFilter = new sal_uInt16(rFilterList.GetObject(i)->nFlags);
aFilterLB.SetEntryData(i, pFilter);
}
aFilterLB.SelectEntryPos(1);
@@ -147,8 +147,8 @@ Page: Dtor
__EXPORT SwCondCollPage::~SwCondCollPage()
{
- for(USHORT i = 0; i < aFilterLB.GetEntryCount(); ++i)
- delete (USHORT*)aFilterLB.GetEntryData(i);
+ for(sal_uInt16 i = 0; i < aFilterLB.GetEntryCount(); ++i)
+ delete (sal_uInt16*)aFilterLB.GetEntryData(i);
}
@@ -176,11 +176,11 @@ Page: FillItemSet-Overload
****************************************************************************/
-BOOL __EXPORT SwCondCollPage::FillItemSet(SfxItemSet &rSet)
+sal_Bool __EXPORT SwCondCollPage::FillItemSet(SfxItemSet &rSet)
{
- BOOL bModified = TRUE;
+ sal_Bool bModified = sal_True;
SwCondCollItem aCondItem;
- for(USHORT i = 0; i < aStrArr.Count(); i++)
+ for(sal_uInt16 i = 0; i < aStrArr.Count(); i++)
{
String sEntry = aTbLinks.GetEntryText(i, 1);
aCondItem.SetStyle( &sEntry, i);
@@ -216,7 +216,7 @@ void __EXPORT SwCondCollPage::Reset(const SfxItemSet &/*rSet*/)
}
aStyleLB.SelectEntryPos(0);
- for( USHORT n = 0; n < aStrArr.Count(); n++)
+ for( sal_uInt16 n = 0; n < aStrArr.Count(); n++)
{
String aEntry( aStrArr.GetString(n) );
aEntry += '\t';
@@ -242,7 +242,7 @@ void __EXPORT SwCondCollPage::Reset(const SfxItemSet &/*rSet*/)
****************************************************************************/
-USHORT* __EXPORT SwCondCollPage::GetRanges()
+sal_uInt16* __EXPORT SwCondCollPage::GetRanges()
{
return aPageRg;
}
@@ -255,10 +255,10 @@ USHORT* __EXPORT SwCondCollPage::GetRanges()
IMPL_LINK( SwCondCollPage, OnOffHdl, CheckBox*, pBox )
{
- const BOOL bEnable = pBox->IsChecked();
+ const sal_Bool bEnable = pBox->IsChecked();
aContextFT.Enable( bEnable );
aUsedFT .Enable( bEnable );
- aTbLinks .EnableList( bEnable != FALSE );
+ aTbLinks .EnableList( bEnable != sal_False );
aStyleFT .Enable( bEnable );
aStyleLB .Enable( bEnable );
aFilterLB .Enable( bEnable );
@@ -277,7 +277,7 @@ IMPL_LINK( SwCondCollPage, OnOffHdl, CheckBox*, pBox )
IMPL_LINK( SwCondCollPage, AssignRemoveHdl, PushButton*, pBtn)
{
SvLBoxEntry* pE = aTbLinks.FirstSelected();
- ULONG nPos;
+ sal_uLong nPos;
if( !pE || LISTBOX_ENTRY_NOTFOUND ==
( nPos = aTbLinks.GetModel()->GetAbsPos( pE ) ) )
{
@@ -285,21 +285,21 @@ IMPL_LINK( SwCondCollPage, AssignRemoveHdl, PushButton*, pBtn)
return 0;
}
- String sSel = aStrArr.GetString( USHORT(nPos) );
+ String sSel = aStrArr.GetString( sal_uInt16(nPos) );
sSel += '\t';
- const BOOL bAssEnabled = pBtn != &aRemovePB && aAssignPB.IsEnabled();
+ const sal_Bool bAssEnabled = pBtn != &aRemovePB && aAssignPB.IsEnabled();
aAssignPB.Enable( !bAssEnabled );
aRemovePB.Enable( bAssEnabled );
if ( bAssEnabled )
sSel += aStyleLB.GetSelectEntry();
- aTbLinks.SetUpdateMode(FALSE);
+ aTbLinks.SetUpdateMode(sal_False);
aTbLinks.GetModel()->Remove(pE);
pE = aTbLinks.InsertEntryToColumn(sSel, nPos);
aTbLinks.Select(pE);
aTbLinks.MakeVisible(pE);
- aTbLinks.SetUpdateMode(TRUE);
+ aTbLinks.SetUpdateMode(sal_True);
return 0;
}
@@ -313,8 +313,8 @@ IMPL_LINK( SwCondCollPage, SelectHdl, ListBox*, pBox)
if(pBox == &aFilterLB)
{
aStyleLB.Clear();
- USHORT nSearchFlags = pBox->GetSelectEntryPos();
- nSearchFlags = *(USHORT*)aFilterLB.GetEntryData(nSearchFlags);
+ sal_uInt16 nSearchFlags = pBox->GetSelectEntryPos();
+ nSearchFlags = *(sal_uInt16*)aFilterLB.GetEntryData(nSearchFlags);
SfxStyleSheetBasePool* pPool = rSh.GetView().GetDocShell()->GetStyleSheetPool();
pPool->SetSearchMask(SFX_STYLE_FAMILY_PARA, nSearchFlags);
const SfxStyleSheetBase* pBase = pPool->First();
@@ -350,7 +350,7 @@ IMPL_LINK( SwCondCollPage, SelectHdl, ListBox*, pBox)
****************************************************************************/
-void SwCondCollPage::SetCollection( SwFmt* pFormat, BOOL bNew )
+void SwCondCollPage::SetCollection( SwFmt* pFormat, sal_Bool bNew )
{
pFmt = pFormat;
bNewTemplate = bNew;
diff --git a/sw/source/ui/config/barcfg.cxx b/sw/source/ui/config/barcfg.cxx
index 91731c9e0a..a22695cafa 100644
--- a/sw/source/ui/config/barcfg.cxx
+++ b/sw/source/ui/config/barcfg.cxx
@@ -50,11 +50,11 @@ using namespace com::sun::star::uno;
/* ---------------------------------------------------------------------------
---------------------------------------------------------------------------*/
-SwToolbarConfigItem::SwToolbarConfigItem( BOOL bWeb ) :
+SwToolbarConfigItem::SwToolbarConfigItem( sal_Bool bWeb ) :
ConfigItem(bWeb ? C2U("Office.WriterWeb/ObjectBar") : C2U("Office.Writer/ObjectBar"),
CONFIG_MODE_DELAYED_UPDATE|CONFIG_MODE_RELEASE_TREE)
{
- for(USHORT i = 0; i <= SEL_TYPE_GRAPHIC; i++ )
+ for(sal_uInt16 i = 0; i <= SEL_TYPE_GRAPHIC; i++ )
aTbxIdArray[i] = -1;
Sequence<OUString> aNames = GetPropertyNames();
diff --git a/sw/source/ui/config/caption.cxx b/sw/source/ui/config/caption.cxx
index d311a677cf..dfb258ef96 100644
--- a/sw/source/ui/config/caption.cxx
+++ b/sw/source/ui/config/caption.cxx
@@ -42,15 +42,15 @@
--------------------------------------------------------------------*/
InsCaptionOpt::InsCaptionOpt(const SwCapObjType eType, const SvGlobalName* pOleId) :
- bUseCaption(FALSE),
+ bUseCaption(sal_False),
eObjType(eType),
nNumType(SVX_NUM_ARABIC),
sNumberSeparator( ::rtl::OUString::createFromAscii(". ") ),
nPos(1),
nLevel(0),
sSeparator( String::CreateFromAscii( ": " ) ),
- bIgnoreSeqOpts(FALSE),
- bCopyAttributes(FALSE)
+ bIgnoreSeqOpts(sal_False),
+ bCopyAttributes(sal_False)
{
if (pOleId)
aOleId = *pOleId;
@@ -100,7 +100,7 @@ InsCaptionOpt& InsCaptionOpt::operator=( const InsCaptionOpt& rOpt )
Beschreibung:
--------------------------------------------------------------------*/
-BOOL InsCaptionOpt::operator==( const InsCaptionOpt& rOpt ) const
+sal_Bool InsCaptionOpt::operator==( const InsCaptionOpt& rOpt ) const
{
return (eObjType == rOpt.eObjType &&
aOleId == rOpt.aOleId); // Damit gleiche Ole-IDs nicht mehrfach eingefuegt
@@ -127,9 +127,9 @@ BOOL InsCaptionOpt::operator==( const InsCaptionOpt& rOpt ) const
/*SvStream& operator>>( SvStream& rIStream, InsCaptionOpt& rCapOpt )
{
rtl_TextEncoding eEncoding = gsl_getSystemTextEncoding();
- UINT16 nVal;
- BYTE cVal;
- BYTE nVersion;
+ sal_uInt16 nVal;
+ sal_uInt8 cVal;
+ sal_uInt8 nVersion;
rIStream >> nVersion;
rIStream >> cVal; rCapOpt.UseCaption() = cVal != 0;
@@ -160,20 +160,20 @@ BOOL InsCaptionOpt::operator==( const InsCaptionOpt& rOpt ) const
/*SvStream& operator<<( SvStream& rOStream, const InsCaptionOpt& rCapOpt )
{
rtl_TextEncoding eEncoding = gsl_getSystemTextEncoding();
- rOStream << (BYTE)CAPTION_VERSION
- << (BYTE)rCapOpt.UseCaption()
- << (UINT16)rCapOpt.eObjType
+ rOStream << (sal_uInt8)CAPTION_VERSION
+ << (sal_uInt8)rCapOpt.UseCaption()
+ << (sal_uInt16)rCapOpt.eObjType
<< rCapOpt.aOleId;
rOStream.WriteByteString( rCapOpt.sCategory, eEncoding );
- rOStream << (UINT16)rCapOpt.nNumType;
+ rOStream << (sal_uInt16)rCapOpt.nNumType;
rOStream.WriteByteString( rCapOpt.sCaption, eEncoding );
- BYTE cSep = ByteString(rCapOpt.sSeparator, eEncoding).GetChar(0);
- rOStream << (UINT16)rCapOpt.nPos
- << (UINT16)rCapOpt.nLevel
+ sal_uInt8 cSep = ByteString(rCapOpt.sSeparator, eEncoding).GetChar(0);
+ rOStream << (sal_uInt16)rCapOpt.nPos
+ << (sal_uInt16)rCapOpt.nLevel
<< cSep;
return rOStream;
diff --git a/sw/source/ui/config/cfgitems.cxx b/sw/source/ui/config/cfgitems.cxx
index 6fa2666579..ecf6769733 100644
--- a/sw/source/ui/config/cfgitems.cxx
+++ b/sw/source/ui/config/cfgitems.cxx
@@ -54,7 +54,7 @@ TYPEINIT1_AUTOFACTORY(SwAddPrinterItem, SfxPoolItem)
TYPEINIT1_AUTOFACTORY(SwShadowCursorItem, SfxPoolItem)
-SwDocDisplayItem::SwDocDisplayItem( USHORT _nWhich ) :
+SwDocDisplayItem::SwDocDisplayItem( sal_uInt16 _nWhich ) :
SfxPoolItem(_nWhich),
aIndexBackgrndCol(COL_GRAY)
{
@@ -66,7 +66,7 @@ SwDocDisplayItem::SwDocDisplayItem( USHORT _nWhich ) :
bFldHiddenText =
bCharHiddenText =
bManualBreak =
- bShowHiddenPara = FALSE;
+ bShowHiddenPara = sal_False;
};
@@ -84,17 +84,17 @@ SwDocDisplayItem::SwDocDisplayItem( const SwDocDisplayItem& rDocDisplayItem ):
--------------------------------------------------------------------*/
-SwDocDisplayItem::SwDocDisplayItem(const SwViewOption& rVOpt, USHORT _nWhich ) :
+SwDocDisplayItem::SwDocDisplayItem(const SwViewOption& rVOpt, sal_uInt16 _nWhich ) :
SfxPoolItem( _nWhich )
{
- bParagraphEnd = rVOpt.IsParagraph(TRUE);
- bTab = rVOpt.IsTab(TRUE);
- bSpace = rVOpt.IsBlank(TRUE);
+ bParagraphEnd = rVOpt.IsParagraph(sal_True);
+ bTab = rVOpt.IsTab(sal_True);
+ bSpace = rVOpt.IsBlank(sal_True);
bNonbreakingSpace = rVOpt.IsHardBlank();
bSoftHyphen = rVOpt.IsSoftHyph();
- bCharHiddenText = rVOpt.IsShowHiddenChar(TRUE);
+ bCharHiddenText = rVOpt.IsShowHiddenChar(sal_True);
bFldHiddenText = rVOpt.IsShowHiddenField();
- bManualBreak = rVOpt.IsLineBreak(TRUE);
+ bManualBreak = rVOpt.IsLineBreak(sal_True);
bShowHiddenPara = rVOpt.IsShowHiddenPara();
}
@@ -167,7 +167,7 @@ void SwDocDisplayItem::FillViewOptions( SwViewOption& rVOpt) const
/*--------------------------------------------------------------------
Beschreibung:
--------------------------------------------------------------------*/
-SwElemItem::SwElemItem( USHORT _nWhich ) :
+SwElemItem::SwElemItem( sal_uInt16 _nWhich ) :
SfxPoolItem(_nWhich)
{
bHorzScrollbar =
@@ -184,7 +184,7 @@ SwElemItem::SwElemItem( USHORT _nWhich ) :
bGraphic =
bDrawing =
bFieldName =
- bNotes = FALSE;
+ bNotes = sal_False;
}
/*--------------------------------------------------------------------
Beschreibung:
@@ -199,14 +199,14 @@ SwElemItem::SwElemItem( const SwElemItem& rElemItem ):
Beschreibung:
--------------------------------------------------------------------*/
-SwElemItem::SwElemItem(const SwViewOption& rVOpt, USHORT _nWhich) :
+SwElemItem::SwElemItem(const SwViewOption& rVOpt, sal_uInt16 _nWhich) :
SfxPoolItem( _nWhich )
{
bHorzScrollbar = rVOpt.IsViewHScrollBar();
bVertScrollbar = rVOpt.IsViewVScrollBar();
bAnyRuler = rVOpt.IsViewAnyRuler();
- bHorzRuler = rVOpt.IsViewHRuler(TRUE);
- bVertRuler = rVOpt.IsViewVRuler(TRUE);
+ bHorzRuler = rVOpt.IsViewHRuler(sal_True);
+ bVertRuler = rVOpt.IsViewVRuler(sal_True);
bVertRulerRight = rVOpt.IsVRulerRight();
bCrosshair = rVOpt.IsCrossHair();
bHandles = rVOpt.IsSolidMarkHdl();
@@ -319,7 +319,7 @@ SwAddPrinterItem::SwAddPrinterItem( const SwAddPrinterItem& rAddPrinterItem ):
Beschreibung: CTOR fuer leeres Item
--------------------------------------------------------------------*/
-SwAddPrinterItem::SwAddPrinterItem( USHORT _nWhich):
+SwAddPrinterItem::SwAddPrinterItem( sal_uInt16 _nWhich):
SfxPoolItem(_nWhich)
{
}
@@ -327,7 +327,7 @@ SwAddPrinterItem::SwAddPrinterItem( USHORT _nWhich):
Beschreibung: CTOR aus SwPrintOptions
--------------------------------------------------------------------*/
-SwAddPrinterItem::SwAddPrinterItem( USHORT _nWhich, const SwPrintData& rPrtData ) :
+SwAddPrinterItem::SwAddPrinterItem( sal_uInt16 _nWhich, const SwPrintData& rPrtData ) :
SfxPoolItem(_nWhich)
{
SwPrintData::operator=(rPrtData);
@@ -357,10 +357,10 @@ int SwAddPrinterItem::operator==( const SfxPoolItem& rAttr ) const
Item fuer Einstellungsdialog, ShadowCursorSeite
--------------------------------------------------*/
-SwShadowCursorItem::SwShadowCursorItem( USHORT _nWhich )
+SwShadowCursorItem::SwShadowCursorItem( sal_uInt16 _nWhich )
: SfxPoolItem( _nWhich ),
eMode( FILL_TAB )
- ,bOn( FALSE )
+ ,bOn( sal_False )
{
}
@@ -372,7 +372,7 @@ SwShadowCursorItem::SwShadowCursorItem( const SwShadowCursorItem& rCpy )
{
}
-SwShadowCursorItem::SwShadowCursorItem( const SwViewOption& rVOpt, USHORT _nWhich )
+SwShadowCursorItem::SwShadowCursorItem( const SwViewOption& rVOpt, sal_uInt16 _nWhich )
: SfxPoolItem( _nWhich ),
eMode( rVOpt.GetShdwCrsrFillMode() )
,bOn( rVOpt.IsShadowCursor() )
diff --git a/sw/source/ui/config/fontcfg.cxx b/sw/source/ui/config/fontcfg.cxx
index 48455b77bb..4d4ee89d37 100644
--- a/sw/source/ui/config/fontcfg.cxx
+++ b/sw/source/ui/config/fontcfg.cxx
@@ -192,9 +192,9 @@ SwStdFontConfig::~SwStdFontConfig()
/*-----------------18.01.97 10.05-------------------
--------------------------------------------------*/
-BOOL SwStdFontConfig::IsFontDefault(USHORT nFontType) const
+sal_Bool SwStdFontConfig::IsFontDefault(sal_uInt16 nFontType) const
{
- BOOL bSame = sal_False;
+ sal_Bool bSame = sal_False;
SvtLinguOptions aLinguOpt;
SvtLinguConfig().GetOptions( aLinguOpt );
@@ -234,7 +234,7 @@ BOOL SwStdFontConfig::IsFontDefault(USHORT nFontType) const
case FONT_CAPTION_CJK :
case FONT_INDEX_CJK :
{
- BOOL b1 = sDefaultFonts[FONT_STANDARD_CJK] == sDefFontCJK;
+ sal_Bool b1 = sDefaultFonts[FONT_STANDARD_CJK] == sDefFontCJK;
bSame = b1 && sDefaultFonts[nFontType] == sDefFontCJK;
}
break;
@@ -242,7 +242,7 @@ BOOL SwStdFontConfig::IsFontDefault(USHORT nFontType) const
case FONT_CAPTION_CTL :
case FONT_INDEX_CTL :
{
- BOOL b1 = sDefaultFonts[FONT_STANDARD_CJK] == sDefFontCTL;
+ sal_Bool b1 = sDefaultFonts[FONT_STANDARD_CJK] == sDefFontCTL;
bSame = b1 && sDefaultFonts[nFontType] == sDefFontCTL;
}
break;
@@ -253,10 +253,10 @@ BOOL SwStdFontConfig::IsFontDefault(USHORT nFontType) const
/* -----------------11.01.99 13:16-------------------
* Standards auslesen
* --------------------------------------------------*/
-String SwStdFontConfig::GetDefaultFor(USHORT nFontType, LanguageType eLang)
+String SwStdFontConfig::GetDefaultFor(sal_uInt16 nFontType, LanguageType eLang)
{
String sRet;
- USHORT nFontId;
+ sal_uInt16 nFontId;
switch( nFontType )
{
case FONT_OUTLINE :
@@ -294,7 +294,7 @@ String SwStdFontConfig::GetDefaultFor(USHORT nFontType, LanguageType eLang)
/*-- 11.10.2005 10:43:43---------------------------------------------------
-----------------------------------------------------------------------*/
-sal_Int32 SwStdFontConfig::GetDefaultHeightFor(USHORT nFontType, LanguageType eLang)
+sal_Int32 SwStdFontConfig::GetDefaultHeightFor(sal_uInt16 nFontType, LanguageType eLang)
{
sal_Int32 nRet = FONTSIZE_DEFAULT;
switch( nFontType )
@@ -315,7 +315,7 @@ sal_Int32 SwStdFontConfig::GetDefaultHeightFor(USHORT nFontType, LanguageType eL
/*-- 11.10.2005 10:50:06---------------------------------------------------
-----------------------------------------------------------------------*/
-void SwStdFontConfig::ChangeInt( USHORT nFontType, sal_Int32 nHeight )
+void SwStdFontConfig::ChangeInt( sal_uInt16 nFontType, sal_Int32 nHeight )
{
DBG_ASSERT( nFontType < DEF_FONT_COUNT, "invalid index in SwStdFontConfig::ChangInt()");
if( nFontType < DEF_FONT_COUNT && nDefaultFontHeight[nFontType] != nHeight)
diff --git a/sw/source/ui/config/mailconfigpage.cxx b/sw/source/ui/config/mailconfigpage.cxx
index c48a8b64fe..e7d3a0c233 100644
--- a/sw/source/ui/config/mailconfigpage.cxx
+++ b/sw/source/ui/config/mailconfigpage.cxx
@@ -198,7 +198,7 @@ SfxTabPage* SwMailConfigPage::Create( Window* pParent, const SfxItemSet& rAttrS
/*-- 06.05.2004 10:59:41---------------------------------------------------
-----------------------------------------------------------------------*/
-BOOL SwMailConfigPage::FillItemSet( SfxItemSet& /*rSet*/ )
+sal_Bool SwMailConfigPage::FillItemSet( SfxItemSet& /*rSet*/ )
{
if(m_aDisplayNameED.GetText() != m_aDisplayNameED.GetSavedValue())
m_pConfigItem->SetMailDisplayName(m_aDisplayNameED.GetText());
diff --git a/sw/source/ui/config/modcfg.cxx b/sw/source/ui/config/modcfg.cxx
index 1143d433c8..b0e2b25058 100644
--- a/sw/source/ui/config/modcfg.cxx
+++ b/sw/source/ui/config/modcfg.cxx
@@ -69,7 +69,7 @@ SV_IMPL_PTRARR_SORT(InsCapOptArr, InsCaptionOptPtr)
* --------------------------------------------------*/
InsCaptionOpt* InsCaptionOptArr::Find(const SwCapObjType eType, const SvGlobalName *pOleId) const
{
- for (USHORT i = 0; i < Count(); i++ )
+ for (sal_uInt16 i = 0; i < Count(); i++ )
{
InsCaptionOpt* pObj = GetObject(i);
if (pObj->GetObjType() == eType &&
@@ -87,7 +87,7 @@ InsCaptionOpt* InsCaptionOptArr::Find(const SwCapObjType eType, const SvGlobalNa
* --------------------------------------------------*/
const InsCaptionOpt* SwModuleOptions::GetCapOption(
- BOOL bHTML, const SwCapObjType eType, const SvGlobalName *pOleId)
+ sal_Bool bHTML, const SwCapObjType eType, const SvGlobalName *pOleId)
{
if(bHTML)
{
@@ -96,10 +96,10 @@ const InsCaptionOpt* SwModuleOptions::GetCapOption(
}
else
{
- sal_Bool bFound = FALSE;
+ sal_Bool bFound = sal_False;
if(eType == OLE_CAP && pOleId)
{
- for( USHORT nId = 0; nId <= GLOB_NAME_CHART && !bFound; nId++)
+ for( sal_uInt16 nId = 0; nId <= GLOB_NAME_CHART && !bFound; nId++)
bFound = *pOleId == aInsertConfig.aGlobalNames[nId ];
if(!bFound)
return aInsertConfig.pOLEMiscOpt;
@@ -112,9 +112,9 @@ const InsCaptionOpt* SwModuleOptions::GetCapOption(
*
* --------------------------------------------------*/
-BOOL SwModuleOptions::SetCapOption(BOOL bHTML, const InsCaptionOpt* pOpt)
+sal_Bool SwModuleOptions::SetCapOption(sal_Bool bHTML, const InsCaptionOpt* pOpt)
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if(bHTML)
{
@@ -122,10 +122,10 @@ BOOL SwModuleOptions::SetCapOption(BOOL bHTML, const InsCaptionOpt* pOpt)
}
else if (pOpt)
{
- sal_Bool bFound = FALSE;
+ sal_Bool bFound = sal_False;
if(pOpt->GetObjType() == OLE_CAP && &pOpt->GetOleId())
{
- for( USHORT nId = 0; nId <= GLOB_NAME_CHART; nId++)
+ for( sal_uInt16 nId = 0; nId <= GLOB_NAME_CHART; nId++)
bFound = pOpt->GetOleId() == aInsertConfig.aGlobalNames[nId ];
if(!bFound)
{
@@ -147,7 +147,7 @@ BOOL SwModuleOptions::SetCapOption(BOOL bHTML, const InsCaptionOpt* pOpt)
rArr.Insert(new InsCaptionOpt(*pOpt));
aInsertConfig.SetModified();
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
@@ -156,17 +156,17 @@ BOOL SwModuleOptions::SetCapOption(BOOL bHTML, const InsCaptionOpt* pOpt)
--------------------------------------------------*/
SwModuleOptions::SwModuleOptions() :
- aInsertConfig(FALSE),
- aWebInsertConfig(TRUE),
- aTableConfig(FALSE),
- aWebTableConfig(TRUE),
- bHideFieldTips(FALSE)
+ aInsertConfig(sal_False),
+ aWebInsertConfig(sal_True),
+ aTableConfig(sal_False),
+ aWebTableConfig(sal_True),
+ bHideFieldTips(sal_False)
{
}
/* -----------------------------19.01.01 12:26--------------------------------
---------------------------------------------------------------------------*/
-String SwModuleOptions::ConvertWordDelimiter(const String& rDelim, BOOL bFromUI)
+String SwModuleOptions::ConvertWordDelimiter(const String& rDelim, sal_Bool bFromUI)
{
String sReturn;
if(bFromUI)
@@ -193,7 +193,7 @@ String SwModuleOptions::ConvertWordDelimiter(const String& rDelim, BOOL bFromUI)
case 'x':
{
sal_Unicode nVal, nChar;
- BOOL bValidData = TRUE;
+ sal_Bool bValidData = sal_True;
xub_StrLen n;
for( n = 0, nChar = 0; n < 2 && i < rDelim.Len(); ++n, ++i )
{
@@ -206,7 +206,7 @@ String SwModuleOptions::ConvertWordDelimiter(const String& rDelim, BOOL bFromUI)
else
{
DBG_ERROR( "ungueltiger Hex-Wert" );
- bValidData = FALSE;
+ bValidData = sal_False;
break;
}
@@ -967,7 +967,7 @@ void SwInsertConfig::Load()
else if(!bIsWeb)
return;
- USHORT nInsTblFlags = 0;
+ sal_uInt16 nInsTblFlags = 0;
for(int nProp = 0; nProp < aNames.getLength(); nProp++)
{
if(pValues[nProp].hasValue())
@@ -1251,10 +1251,10 @@ void SwTableConfig::Load()
sal_Int32 nTemp = 0;
switch(nProp)
{
- case 0 : pValues[nProp] >>= nTemp; nTblHMove = (USHORT)MM100_TO_TWIP(nTemp); break; //"Shift/Row",
- case 1 : pValues[nProp] >>= nTemp; nTblVMove = (USHORT)MM100_TO_TWIP(nTemp); break; //"Shift/Column",
- case 2 : pValues[nProp] >>= nTemp; nTblHInsert = (USHORT)MM100_TO_TWIP(nTemp); break; //"Insert/Row",
- case 3 : pValues[nProp] >>= nTemp; nTblVInsert = (USHORT)MM100_TO_TWIP(nTemp); break; //"Insert/Column",
+ case 0 : pValues[nProp] >>= nTemp; nTblHMove = (sal_uInt16)MM100_TO_TWIP(nTemp); break; //"Shift/Row",
+ case 1 : pValues[nProp] >>= nTemp; nTblVMove = (sal_uInt16)MM100_TO_TWIP(nTemp); break; //"Shift/Column",
+ case 2 : pValues[nProp] >>= nTemp; nTblHInsert = (sal_uInt16)MM100_TO_TWIP(nTemp); break; //"Insert/Row",
+ case 3 : pValues[nProp] >>= nTemp; nTblVInsert = (sal_uInt16)MM100_TO_TWIP(nTemp); break; //"Insert/Column",
case 4 : pValues[nProp] >>= nTemp; eTblChgMode = (TblChgMode)nTemp; break; //"Change/Effect",
case 5 : bInsTblFormatNum = *(sal_Bool*)pValues[nProp].getValue(); break; //"Input/NumberRecognition",
case 6 : bInsTblChangeNumFormat = *(sal_Bool*)pValues[nProp].getValue(); break; //"Input/NumberFormatRecognition",
diff --git a/sw/source/ui/config/optcomp.cxx b/sw/source/ui/config/optcomp.cxx
index 0dbd938359..6e982f62b7 100644
--- a/sw/source/ui/config/optcomp.cxx
+++ b/sw/source/ui/config/optcomp.cxx
@@ -137,7 +137,7 @@ SwCompatibilityOptPage::SwCompatibilityOptPage( Window* pParent, const SfxItemSe
{
// init options strings with local resource ids -> so do it before FreeResource()
- for ( USHORT nResId = STR_COMP_OPTIONS_START; nResId < STR_COMP_OPTIONS_END; ++nResId )
+ for ( sal_uInt16 nResId = STR_COMP_OPTIONS_START; nResId < STR_COMP_OPTIONS_END; ++nResId )
{
String sEntry = String( SW_RES( nResId ) );
if ( STR_TAB_ALIGNMENT == nResId ||
@@ -149,7 +149,7 @@ SwCompatibilityOptPage::SwCompatibilityOptPage( Window* pParent, const SfxItemSe
if ( pEntry )
{
m_aOptionsLB.SetCheckButtonState( pEntry, SV_BUTTON_UNCHECKED );
- pEntry->SetUserData( (void*)(ULONG)nResId );
+ pEntry->SetUserData( (void*)(sal_uLong)nResId );
}
}
m_aOptionsLB.SetStyle( m_aOptionsLB.GetStyle() | WB_HSCROLL | WB_HIDESELECTION );
@@ -218,7 +218,7 @@ void SwCompatibilityOptPage::ReplaceFormatName( String& rEntry )
// -----------------------------------------------------------------------
-ULONG convertBools2Ulong_Impl
+sal_uLong convertBools2Ulong_Impl
(
bool _bUsePrtMetrics,
bool _bAddSpacing,
@@ -233,8 +233,8 @@ ULONG convertBools2Ulong_Impl
bool _bExpandWordSpace
)
{
- ULONG nRet = 0;
- ULONG nSetBit = 1;
+ sal_uLong nRet = 0;
+ sal_uLong nSetBit = 1;
if ( _bUsePrtMetrics )
nRet |= nSetBit;
@@ -280,7 +280,7 @@ void SwCompatibilityOptPage::InitControls( const SfxItemSet& rSet )
String sDocTitle;
const SfxPoolItem* pItem = NULL;
SfxObjectShell* pObjShell = NULL;
- if ( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_WRTSHELL, FALSE, &pItem ) )
+ if ( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_WRTSHELL, sal_False, &pItem ) )
m_pWrtShell = (SwWrtShell*)( (const SwPtrItem*)pItem )->GetValue();
if ( m_pWrtShell )
{
@@ -378,8 +378,8 @@ void SwCompatibilityOptPage::InitControls( const SfxItemSet& rSet )
if ( sNewEntry.Len() == 0 )
sNewEntry = sName;
- USHORT nPos = m_aFormattingLB.InsertEntry( sNewEntry );
- ULONG nOptions = convertBools2Ulong_Impl(
+ sal_uInt16 nPos = m_aFormattingLB.InsertEntry( sNewEntry );
+ sal_uLong nOptions = convertBools2Ulong_Impl(
bUsePrtMetrics, bAddSpacing, bAddSpacingAtPages,
bUseOurTabStops, bNoExtLeading, bUseLineSpacing,
bAddTableSpacing, bUseObjPos, bUseOurTextWrapping,
@@ -410,8 +410,8 @@ void SwCompatibilityOptPage::InitControls( const SfxItemSet& rSet )
IMPL_LINK( SwCompatibilityOptPage, SelectHdl, ListBox*, EMPTYARG )
{
- USHORT nPos = m_aFormattingLB.GetSelectEntryPos();
- ULONG nOptions = (ULONG)(void*)m_aFormattingLB.GetEntryData( nPos );
+ sal_uInt16 nPos = m_aFormattingLB.GetSelectEntryPos();
+ sal_uLong nOptions = (sal_uLong)(void*)m_aFormattingLB.GetEntryData( nPos );
SetCurrentOptions( nOptions );
return 0;
@@ -429,10 +429,10 @@ IMPL_LINK( SwCompatibilityOptPage, UseAsDefaultHdl, PushButton*, EMPTYARG )
{
if ( pItem->m_bIsDefault )
{
- USHORT nCount = static_cast< USHORT >( m_aOptionsLB.GetEntryCount() );
- for ( USHORT i = 0; i < nCount; ++i )
+ sal_uInt16 nCount = static_cast< sal_uInt16 >( m_aOptionsLB.GetEntryCount() );
+ for ( sal_uInt16 i = 0; i < nCount; ++i )
{
- bool bChecked = ( m_aOptionsLB.IsChecked(i) != FALSE );
+ bool bChecked = ( m_aOptionsLB.IsChecked(i) != sal_False );
CompatibilityOptions eOption = static_cast< CompatibilityOptions >(i);
switch ( eOption )
{
@@ -465,13 +465,13 @@ IMPL_LINK( SwCompatibilityOptPage, UseAsDefaultHdl, PushButton*, EMPTYARG )
// -----------------------------------------------------------------------
-void SwCompatibilityOptPage::SetCurrentOptions( ULONG nOptions )
+void SwCompatibilityOptPage::SetCurrentOptions( sal_uLong nOptions )
{
- ULONG nCount = m_aOptionsLB.GetEntryCount();
+ sal_uLong nCount = m_aOptionsLB.GetEntryCount();
DBG_ASSERT( nCount <= 32, "SwCompatibilityOptPage::Reset(): entry overflow" );
- for ( USHORT i = 0; i < nCount; ++i )
+ for ( sal_uInt16 i = 0; i < nCount; ++i )
{
- BOOL bChecked = ( ( nOptions & 0x00000001 ) == 0x00000001 );
+ sal_Bool bChecked = ( ( nOptions & 0x00000001 ) == 0x00000001 );
m_aOptionsLB.CheckEntryPos( i, bChecked );
nOptions = nOptions >> 1;
}
@@ -479,9 +479,9 @@ void SwCompatibilityOptPage::SetCurrentOptions( ULONG nOptions )
// -----------------------------------------------------------------------
-ULONG SwCompatibilityOptPage::GetDocumentOptions() const
+sal_uLong SwCompatibilityOptPage::GetDocumentOptions() const
{
- ULONG nRet = 0;
+ sal_uLong nRet = 0;
if ( m_pWrtShell )
{
const IDocumentSettingAccess& rIDocumentSettingAccess = *m_pWrtShell->getIDocumentSettingAccess();
@@ -526,75 +526,75 @@ SfxTabPage* SwCompatibilityOptPage::Create( Window* pParent, const SfxItemSet& r
// -----------------------------------------------------------------------
-BOOL SwCompatibilityOptPage::FillItemSet( SfxItemSet& )
+sal_Bool SwCompatibilityOptPage::FillItemSet( SfxItemSet& )
{
- BOOL bModified = FALSE;
+ sal_Bool bModified = sal_False;
if ( m_pWrtShell )
{
- ULONG nSavedOptions = m_nSavedOptions;
- ULONG nCount = m_aOptionsLB.GetEntryCount();
+ sal_uLong nSavedOptions = m_nSavedOptions;
+ sal_uLong nCount = m_aOptionsLB.GetEntryCount();
DBG_ASSERT( nCount <= 32, "SwCompatibilityOptPage::Reset(): entry overflow" );
bool bSetParaSpaceMax = false;
- for ( USHORT i = 0; i < nCount; ++i )
+ for ( sal_uInt16 i = 0; i < nCount; ++i )
{
CompatibilityOptions nOption = static_cast< CompatibilityOptions >(i);
- BOOL bChecked = m_aOptionsLB.IsChecked(i);
- BOOL bSavedChecked = ( ( nSavedOptions & 0x00000001 ) == 0x00000001 );
+ sal_Bool bChecked = m_aOptionsLB.IsChecked(i);
+ sal_Bool bSavedChecked = ( ( nSavedOptions & 0x00000001 ) == 0x00000001 );
if ( bChecked != bSavedChecked )
{
if ( COPT_USE_PRINTERDEVICE == nOption )
{
m_pWrtShell->SetUseVirDev( !bChecked );
- bModified = TRUE;
+ bModified = sal_True;
}
else if ( ( COPT_ADD_SPACING == nOption || COPT_ADD_SPACING_AT_PAGES == nOption ) && !bSetParaSpaceMax )
bSetParaSpaceMax = true;
else if ( COPT_USE_OUR_TABSTOPS == nOption )
{
m_pWrtShell->SetTabCompat( !bChecked );
- bModified = TRUE;
+ bModified = sal_True;
}
else if ( COPT_NO_EXTLEADING == nOption )
{
m_pWrtShell->SetAddExtLeading( !bChecked );
- bModified = TRUE;
+ bModified = sal_True;
}
else if ( COPT_USE_LINESPACING == nOption )
{
m_pWrtShell->SetUseFormerLineSpacing( bChecked );
- bModified = TRUE;
+ bModified = sal_True;
}
else if ( COPT_ADD_TABLESPACING == nOption )
{
m_pWrtShell->SetAddParaSpacingToTableCells( bChecked );
- bModified = TRUE;
+ bModified = sal_True;
}
else if ( COPT_ADD_TABLESPACING == nOption )
{
m_pWrtShell->SetAddParaSpacingToTableCells( bChecked );
- bModified = TRUE;
+ bModified = sal_True;
}
else if ( COPT_USE_OBJECTPOSITIONING == nOption )
{
m_pWrtShell->SetUseFormerObjectPositioning( bChecked );
- bModified = TRUE;
+ bModified = sal_True;
}
else if ( COPT_USE_OUR_TEXTWRAPPING == nOption )
{
m_pWrtShell->SetUseFormerTextWrapping( bChecked );
- bModified = TRUE;
+ bModified = sal_True;
}
else if ( COPT_CONSIDER_WRAPPINGSTYLE == nOption )
{
m_pWrtShell->SetConsiderWrapOnObjPos( bChecked );
- bModified = TRUE;
+ bModified = sal_True;
}
else if ( COPT_EXPAND_WORDSPACE == nOption )
{
m_pWrtShell->SetDoNotJustifyLinesWithManualBreak( !bChecked );
- bModified = TRUE;
+ bModified = sal_True;
}
}
@@ -603,9 +603,9 @@ BOOL SwCompatibilityOptPage::FillItemSet( SfxItemSet& )
if ( bSetParaSpaceMax )
{
- m_pWrtShell->SetParaSpaceMax( m_aOptionsLB.IsChecked( (USHORT)COPT_ADD_SPACING ) );
- m_pWrtShell->SetParaSpaceMaxAtPages( m_aOptionsLB.IsChecked( (USHORT)COPT_ADD_SPACING_AT_PAGES ) );
- bModified = TRUE;
+ m_pWrtShell->SetParaSpaceMax( m_aOptionsLB.IsChecked( (sal_uInt16)COPT_ADD_SPACING ) );
+ m_pWrtShell->SetParaSpaceMaxAtPages( m_aOptionsLB.IsChecked( (sal_uInt16)COPT_ADD_SPACING_AT_PAGES ) );
+ bModified = sal_True;
}
}
@@ -621,7 +621,7 @@ void SwCompatibilityOptPage::Reset( const SfxItemSet& )
{
m_aOptionsLB.SelectEntryPos( 0 );
- ULONG nOptions = GetDocumentOptions();
+ sal_uLong nOptions = GetDocumentOptions();
SetCurrentOptions( nOptions );
m_nSavedOptions = nOptions;
}
diff --git a/sw/source/ui/config/optload.cxx b/sw/source/ui/config/optload.cxx
index 808ad95fcd..7853676af6 100644
--- a/sw/source/ui/config/optload.cxx
+++ b/sw/source/ui/config/optload.cxx
@@ -34,13 +34,9 @@
#include <tools/shl.hxx>
#include <swtypes.hxx>
-#ifndef _HELPID_H
#include <helpid.h>
-#endif
#include <uiitems.hxx>
-#ifndef _MODCFG_HXX
#include <modcfg.hxx>
-#endif
#include "swmodule.hxx"
#include "usrpref.hxx"
#include "wrtsh.hxx"
@@ -65,9 +61,7 @@
#include <sot/clsids.hxx>
#include <unotools/configmgr.hxx>
#include <docsh.hxx>
-#ifndef _CONFIG_HRC
#include <config.hrc>
-#endif
#include <SwStyleNameMapper.hxx>
#include <numrule.hxx>
#include <SwNodeNum.hxx>
@@ -102,7 +96,7 @@ SwLoadOptPage::SwLoadOptPage( Window* pParent, const SfxItemSet& rSet ) :
aUseSquaredPageMode ( this, SW_RES( CB_USE_SQUARE_PAGE_MODE ) ),
pWrtShell ( NULL ),
- bHTMLMode ( FALSE ),
+ bHTMLMode ( sal_False ),
nLastTab ( 0 ),
nOldLinkMode( MANUAL )
@@ -110,7 +104,7 @@ SwLoadOptPage::SwLoadOptPage( Window* pParent, const SfxItemSet& rSet ) :
FreeResource();
SvxStringArray aMetricArr( SW_RES( STR_ARR_METRIC ) );
- for ( USHORT i = 0; i < aMetricArr.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < aMetricArr.Count(); ++i )
{
String sMetric = aMetricArr.GetStringByPos( i );
FieldUnit eFUnit = (FieldUnit)aMetricArr.GetValue( i );
@@ -124,7 +118,7 @@ SwLoadOptPage::SwLoadOptPage( Window* pParent, const SfxItemSet& rSet ) :
case FUNIT_INCH:
{
// nur diese Metriken benutzen
- USHORT nPos = aMetricLB.InsertEntry( sMetric );
+ sal_uInt16 nPos = aMetricLB.InsertEntry( sMetric );
aMetricLB.SetEntryData( nPos, (void*)(long)eFUnit );
}
default:; //prevent warning
@@ -133,7 +127,7 @@ SwLoadOptPage::SwLoadOptPage( Window* pParent, const SfxItemSet& rSet ) :
aMetricLB.SetSelectHdl(LINK(this, SwLoadOptPage, MetricHdl));
const SfxPoolItem* pItem;
- if(SFX_ITEM_SET == rSet.GetItemState(SID_HTML_MODE, FALSE, &pItem )
+ if(SFX_ITEM_SET == rSet.GetItemState(SID_HTML_MODE, sal_False, &pItem )
&& ((SfxUInt16Item*)pItem)->GetValue() & HTMLMODE_ON)
{
aTabFT.Hide();
@@ -167,12 +161,12 @@ SfxTabPage* __EXPORT SwLoadOptPage::Create( Window* pParent,
--------------------------------------------------*/
-BOOL __EXPORT SwLoadOptPage::FillItemSet( SfxItemSet& rSet )
+sal_Bool __EXPORT SwLoadOptPage::FillItemSet( SfxItemSet& rSet )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
SwModule* pMod = SW_MOD();
- USHORT nNewLinkMode = AUTOMATIC;
+ sal_uInt16 nNewLinkMode = AUTOMATIC;
if (aNeverRB.IsChecked())
nNewLinkMode = NEVER;
else if (aRequestRB.IsChecked())
@@ -201,23 +195,23 @@ BOOL __EXPORT SwLoadOptPage::FillItemSet( SfxItemSet& rSet )
pWrtShell->SetModified();
}
- bRet = TRUE;
+ bRet = sal_True;
}
- const USHORT nMPos = aMetricLB.GetSelectEntryPos();
+ const sal_uInt16 nMPos = aMetricLB.GetSelectEntryPos();
if ( nMPos != aMetricLB.GetSavedValue() )
{
// Doppel-Cast fuer VA3.0
- USHORT nFieldUnit = (USHORT)(long)aMetricLB.GetEntryData( nMPos );
- rSet.Put( SfxUInt16Item( SID_ATTR_METRIC, (UINT16)nFieldUnit ) );
- bRet = TRUE;
+ sal_uInt16 nFieldUnit = (sal_uInt16)(long)aMetricLB.GetEntryData( nMPos );
+ rSet.Put( SfxUInt16Item( SID_ATTR_METRIC, (sal_uInt16)nFieldUnit ) );
+ bRet = sal_True;
}
if(aTabMF.IsVisible() && aTabMF.GetText() != aTabMF.GetSavedValue())
{
rSet.Put(SfxUInt16Item(SID_ATTR_DEFTABSTOP,
- (USHORT)aTabMF.Denormalize(aTabMF.GetValue(FUNIT_TWIP))));
- bRet = TRUE;
+ (sal_uInt16)aTabMF.Denormalize(aTabMF.GetValue(FUNIT_TWIP))));
+ bRet = sal_True;
}
sal_Bool bIsSquaredPageModeFlag = aUseSquaredPageMode.IsChecked();
@@ -230,7 +224,7 @@ BOOL __EXPORT SwLoadOptPage::FillItemSet( SfxItemSet& rSet )
pDoc->SetDefaultPageMode( bIsSquaredPageModeFlag );
pWrtShell->SetModified();
}
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
@@ -240,18 +234,18 @@ BOOL __EXPORT SwLoadOptPage::FillItemSet( SfxItemSet& rSet )
--------------------------------------------------*/
void __EXPORT SwLoadOptPage::Reset( const SfxItemSet& rSet)
{
- const SwMasterUsrPref* pUsrPref = SW_MOD()->GetUsrPref(FALSE);
+ const SwMasterUsrPref* pUsrPref = SW_MOD()->GetUsrPref(sal_False);
const SfxPoolItem* pItem;
- if(SFX_ITEM_SET == rSet.GetItemState(FN_PARAM_WRTSHELL, FALSE, &pItem))
+ if(SFX_ITEM_SET == rSet.GetItemState(FN_PARAM_WRTSHELL, sal_False, &pItem))
pWrtShell = (SwWrtShell*)((const SwPtrItem*)pItem)->GetValue();
SwFldUpdateFlags eFldFlags = AUTOUPD_GLOBALSETTING;
nOldLinkMode = GLOBALSETTING;
if (pWrtShell)
{
- eFldFlags = pWrtShell->GetFldUpdateFlags(TRUE);
- nOldLinkMode = pWrtShell->GetLinkUpdMode(TRUE);
+ eFldFlags = pWrtShell->GetFldUpdateFlags(sal_True);
+ nOldLinkMode = pWrtShell->GetLinkUpdMode(sal_True);
}
if(GLOBALSETTING == nOldLinkMode)
nOldLinkMode = pUsrPref->GetUpdateLinkMode();
@@ -276,7 +270,7 @@ void __EXPORT SwLoadOptPage::Reset( const SfxItemSet& rSet)
const SfxUInt16Item& rItem = (SfxUInt16Item&)rSet.Get( SID_ATTR_METRIC );
FieldUnit eFieldUnit = (FieldUnit)rItem.GetValue();
- for ( USHORT i = 0; i < aMetricLB.GetEntryCount(); ++i )
+ for ( sal_uInt16 i = 0; i < aMetricLB.GetEntryCount(); ++i )
{
if ( (int)(sal_IntPtr)aMetricLB.GetEntryData( i ) == (int)eFieldUnit )
{
@@ -287,14 +281,14 @@ void __EXPORT SwLoadOptPage::Reset( const SfxItemSet& rSet)
::SetFieldUnit(aTabMF, eFieldUnit);
}
aMetricLB.SaveValue();
- if(SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_DEFTABSTOP, FALSE, &pItem))
+ if(SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_DEFTABSTOP, sal_False, &pItem))
{
nLastTab = ((SfxUInt16Item*)pItem)->GetValue();
aTabMF.SetValue(aTabMF.Normalize(nLastTab), FUNIT_TWIP);
}
aTabMF.SaveValue();
- if(SFX_ITEM_SET == rSet.GetItemState(SID_HTML_MODE, FALSE, &pItem))
+ if(SFX_ITEM_SET == rSet.GetItemState(SID_HTML_MODE, sal_False, &pItem))
{
bHTMLMode = 0 != (((const SfxUInt16Item*)pItem)->GetValue() & HTMLMODE_ON);
}
@@ -313,12 +307,12 @@ void __EXPORT SwLoadOptPage::Reset( const SfxItemSet& rSet)
IMPL_LINK(SwLoadOptPage, MetricHdl, ListBox*, EMPTYARG)
{
- const USHORT nMPos = aMetricLB.GetSelectEntryPos();
+ const sal_uInt16 nMPos = aMetricLB.GetSelectEntryPos();
if(nMPos != USHRT_MAX)
{
// Doppel-Cast fuer VA3.0
FieldUnit eFieldUnit = (FieldUnit)(long)aMetricLB.GetEntryData( nMPos );
- BOOL bModified = aTabMF.IsModified();
+ sal_Bool bModified = aTabMF.IsModified();
long nVal = bModified ?
sal::static_int_cast<sal_Int32, sal_Int64 >( aTabMF.Denormalize( aTabMF.GetValue( FUNIT_TWIP ) )) :
nLastTab;
@@ -438,7 +432,7 @@ SwCaptionOptPage::SwCaptionOptPage( Window* pParent, const SfxItemSet& rSet )
sNone (SW_RESSTR( STR_CATEGORY_NONE )),
pMgr (new SwFldMgr()),
- bHTMLMode(FALSE)
+ bHTMLMode(sal_False)
{
Wallpaper aBack( GetSettings().GetStyleSettings().GetWindowColor() );
aPreview.SetBackground( aBack );
@@ -448,11 +442,11 @@ SwCaptionOptPage::SwCaptionOptPage( Window* pParent, const SfxItemSet& rSet )
SwStyleNameMapper::FillUIName( RES_POOLCOLL_LABEL_FRAME, sText );
SwStyleNameMapper::FillUIName( RES_POOLCOLL_LABEL_DRAWING, sDrawing );
- USHORT i, nCount;
+ sal_uInt16 i, nCount;
SwWrtShell *pSh = ::GetActiveWrtShell();
// aFormatBox
- USHORT nSelFmt = SVX_NUM_ARABIC;
+ sal_uInt16 nSelFmt = SVX_NUM_ARABIC;
if (pSh)
{
nCount = pMgr->GetFldTypeCount();
@@ -461,19 +455,19 @@ SwCaptionOptPage::SwCaptionOptPage( Window* pParent, const SfxItemSet& rSet )
if( ( pFldType = pMgr->GetFldType(USHRT_MAX, --i))->GetName() ==
aCategoryBox.GetText() )
{
- nSelFmt = (USHORT)((SwSetExpFieldType*)pFldType)->GetSeqFormat();
+ nSelFmt = (sal_uInt16)((SwSetExpFieldType*)pFldType)->GetSeqFormat();
break;
}
- ::FillCharStyleListBox( aCharStyleLB, pSh->GetView().GetDocShell(), TRUE, TRUE );
+ ::FillCharStyleListBox( aCharStyleLB, pSh->GetView().GetDocShell(), sal_True, sal_True );
}
- nCount = pMgr->GetFormatCount(TYP_SEQFLD, FALSE);
+ nCount = pMgr->GetFormatCount(TYP_SEQFLD, sal_False);
for ( i = 0; i < nCount; ++i )
{
aFormatBox.InsertEntry( pMgr->GetFormatStr(TYP_SEQFLD, i) );
- USHORT nFmtId = pMgr->GetFormatId(TYP_SEQFLD, i);
+ sal_uInt16 nFmtId = pMgr->GetFormatId(TYP_SEQFLD, i);
aFormatBox.SetEntryData( i, reinterpret_cast<void*>(nFmtId) );
if( nFmtId == nSelFmt )
aFormatBox.SelectEntryPos( i );
@@ -543,9 +537,9 @@ SfxTabPage* SwCaptionOptPage::Create( Window* pParent,
--------------------------------------------------*/
-BOOL SwCaptionOptPage::FillItemSet( SfxItemSet& )
+sal_Bool SwCaptionOptPage::FillItemSet( SfxItemSet& )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
SwModuleOptions* pModOpt = SW_MOD()->GetModuleConfig();
SaveEntry(aCheckLB.FirstSelected()); // Aktuellen Eintrag uebernehmen
@@ -559,7 +553,7 @@ BOOL SwCaptionOptPage::FillItemSet( SfxItemSet& )
pEntry = aCheckLB.Next(pEntry);
}
- USHORT nCheckCount = aCheckLB.GetCheckedEntryCount();
+ sal_uInt16 nCheckCount = aCheckLB.GetCheckedEntryCount();
pModOpt->SetInsWithCaption( bHTMLMode, nCheckCount > 0 );
sal_Int32 nPos = aLbCaptionOrder.GetSelectEntryPos();
@@ -575,7 +569,7 @@ BOOL SwCaptionOptPage::FillItemSet( SfxItemSet& )
void SwCaptionOptPage::Reset( const SfxItemSet& rSet)
{
const SfxPoolItem* pItem;
- if(SFX_ITEM_SET == rSet.GetItemState(SID_HTML_MODE, FALSE, &pItem))
+ if(SFX_ITEM_SET == rSet.GetItemState(SID_HTML_MODE, sal_False, &pItem))
{
bHTMLMode = 0 != (((const SfxUInt16Item*)pItem)->GetValue() & HTMLMODE_ON);
}
@@ -584,7 +578,7 @@ void SwCaptionOptPage::Reset( const SfxItemSet& rSet)
aCheckLB.GetModel()->Clear(); // remove all entries
// Writer objects
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
aCheckLB.InsertEntry(sSWTable);
SetOptions(nPos++, TABLE_CAP);
aCheckLB.InsertEntry(sSWFrame);
@@ -621,7 +615,7 @@ void SwCaptionOptPage::Reset( const SfxItemSet& rSet)
aObjS.FillInsertObjects();
aObjS.Remove( SvGlobalName( SO3_SW_CLASSID ) ); // remove Writer-ID
- for ( ULONG i = 0; i < aObjS.Count(); ++i )
+ for ( sal_uLong i = 0; i < aObjS.Count(); ++i )
{
const SvGlobalName &rOleId = aObjS[i].GetClassName();
const String* pClassName = &aObjS[i].GetHumanName();
@@ -642,7 +636,7 @@ void SwCaptionOptPage::Reset( const SfxItemSet& rSet)
--------------------------------------------------*/
-void SwCaptionOptPage::SetOptions(const USHORT nPos,
+void SwCaptionOptPage::SetOptions(const sal_uInt16 nPos,
const SwCapObjType eObjType, const SvGlobalName *pOleId)
{
SwModuleOptions* pModOpt = SW_MOD()->GetModuleConfig();
@@ -683,7 +677,7 @@ IMPL_LINK( SwCaptionOptPage, ShowEntryHdl, SvxCheckListBox *, EMPTYARG )
if (pSelEntry)
{
- sal_Bool bChecked = aCheckLB.IsChecked((USHORT)aCheckLB.GetModel()->GetAbsPos(pSelEntry));
+ sal_Bool bChecked = aCheckLB.IsChecked((sal_uInt16)aCheckLB.GetModel()->GetAbsPos(pSelEntry));
aSettingsGroupFL.Enable( bChecked );
aCategoryText.Enable( bChecked );
@@ -716,9 +710,9 @@ IMPL_LINK( SwCaptionOptPage, ShowEntryHdl, SvxCheckListBox *, EMPTYARG )
aCategoryBox.InsertEntry( sNone );
if (pSh)
{
- USHORT nCount = pMgr->GetFldTypeCount();
+ sal_uInt16 nCount = pMgr->GetFldTypeCount();
- for (USHORT i = 0; i < nCount; i++)
+ for (sal_uInt16 i = 0; i < nCount; i++)
{
SwFieldType *pType = pMgr->GetFldType( USHRT_MAX, i );
if( pType->Which() == RES_SETEXPFLD &&
@@ -743,7 +737,7 @@ IMPL_LINK( SwCaptionOptPage, ShowEntryHdl, SvxCheckListBox *, EMPTYARG )
aCategoryBox.InsertEntry(pOpt->GetCategory());
if (!aCategoryBox.GetText().Len())
{
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
switch(pOpt->GetObjType())
{
case OLE_CAP:
@@ -754,9 +748,9 @@ IMPL_LINK( SwCaptionOptPage, ShowEntryHdl, SvxCheckListBox *, EMPTYARG )
aCategoryBox.SetText(aCategoryBox.GetEntry(nPos).GetName());
}
- for (USHORT i = 0; i < aFormatBox.GetEntryCount(); i++)
+ for (sal_uInt16 i = 0; i < aFormatBox.GetEntryCount(); i++)
{
- if (pOpt->GetNumType() == (USHORT)(ULONG)aFormatBox.GetEntryData(i))
+ if (pOpt->GetNumType() == (sal_uInt16)(sal_uLong)aFormatBox.GetEntryData(i))
{
aFormatBox.SelectEntryPos(i);
break;
@@ -784,7 +778,7 @@ IMPL_LINK( SwCaptionOptPage, ShowEntryHdl, SvxCheckListBox *, EMPTYARG )
aPosText.IsEnabled() );
aPosBox.SelectEntryPos(pOpt->GetPos());
- USHORT nLevelPos = ( pOpt->GetLevel() < MAXLEVEL ) ? pOpt->GetLevel() + 1 : 0;
+ sal_uInt16 nLevelPos = ( pOpt->GetLevel() < MAXLEVEL ) ? pOpt->GetLevel() + 1 : 0;
aLbLevel.SelectEntryPos( nLevelPos );
aEdDelim.SetText(pOpt->GetSeparator());
aNumberingSeparatorED.SetText( pOpt->GetNumSeparator() );
@@ -826,7 +820,7 @@ void SwCaptionOptPage::SaveEntry(SvLBoxEntry* pEntry)
{
InsCaptionOpt* pOpt = (InsCaptionOpt*)pEntry->GetUserData();
- pOpt->UseCaption() = aCheckLB.IsChecked((USHORT)aCheckLB.GetModel()->GetAbsPos(pEntry));
+ pOpt->UseCaption() = aCheckLB.IsChecked((sal_uInt16)aCheckLB.GetModel()->GetAbsPos(pEntry));
String aName( aCategoryBox.GetText() );
if(aName == sNone)
pOpt->SetCategory(aEmptyStr);
@@ -836,11 +830,11 @@ void SwCaptionOptPage::SaveEntry(SvLBoxEntry* pEntry)
aName.EraseTrailingChars(' ');
pOpt->SetCategory(aName);
}
- pOpt->SetNumType((USHORT)(ULONG)aFormatBox.GetEntryData(aFormatBox.GetSelectEntryPos()));
+ pOpt->SetNumType((sal_uInt16)(sal_uLong)aFormatBox.GetEntryData(aFormatBox.GetSelectEntryPos()));
pOpt->SetCaption(aTextEdit.IsEnabled() ? aTextEdit.GetText() : aEmptyStr );
pOpt->SetPos(aPosBox.GetSelectEntryPos());
- USHORT nPos = aLbLevel.GetSelectEntryPos();
- USHORT nLevel = ( nPos > 0 && nPos != LISTBOX_ENTRY_NOTFOUND ) ? nPos - 1 : MAXLEVEL;
+ sal_uInt16 nPos = aLbLevel.GetSelectEntryPos();
+ sal_uInt16 nLevel = ( nPos > 0 && nPos != LISTBOX_ENTRY_NOTFOUND ) ? nPos - 1 : MAXLEVEL;
pOpt->SetLevel(nLevel);
pOpt->SetSeparator(aEdDelim.GetText());
pOpt->SetNumSeparator( aNumberingSeparatorED.GetText());
@@ -914,7 +908,7 @@ void SwCaptionOptPage::DrawSample()
//#i61007# order of captions
bool bOrderNumberingFirst = aLbCaptionOrder.GetSelectEntryPos() == 1;
// Nummer
- USHORT nNumFmt = (USHORT)(ULONG)aFormatBox.GetEntryData(
+ sal_uInt16 nNumFmt = (sal_uInt16)(sal_uLong)aFormatBox.GetEntryData(
aFormatBox.GetSelectEntryPos() );
if( SVX_NUM_NUMBER_NONE != nNumFmt )
{
@@ -934,13 +928,13 @@ void SwCaptionOptPage::DrawSample()
RES_SETEXPFLD, sFldTypeName );
if( pFldType && pFldType->GetOutlineLvl() < MAXLEVEL )
{
- BYTE nLvl = pFldType->GetOutlineLvl();
+ sal_uInt8 nLvl = pFldType->GetOutlineLvl();
SwNumberTree::tNumberVector aNumVector;
- for( BYTE i = 0; i <= nLvl; ++i )
+ for( sal_uInt8 i = 0; i <= nLvl; ++i )
aNumVector.push_back(1);
String sNumber( pSh->GetOutlineNumRule()->MakeNumString(
- aNumVector, FALSE ));
+ aNumVector, sal_False ));
if( sNumber.Len() )
(aStr += sNumber) += pFldType->GetDelimiter();
}
diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx
index 0a2b04acc5..6ab390ff90 100644
--- a/sw/source/ui/config/optpage.cxx
+++ b/sw/source/ui/config/optpage.cxx
@@ -127,7 +127,7 @@ SwContentOptPage::SwContentOptPage( Window* pParent,
{
FreeResource();
const SfxPoolItem* pItem;
- if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_HTML_MODE, FALSE, &pItem )
+ if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_HTML_MODE, sal_False, &pItem )
&& ((SfxUInt16Item*)pItem)->GetValue() & HTMLMODE_ON)
{
aMetricLB.Show();
@@ -147,7 +147,7 @@ SwContentOptPage::SwContentOptPage( Window* pParent,
aAnyRulerCB.SetClickHdl(LINK(this, SwContentOptPage, AnyRulerHdl));
SvxStringArray aMetricArr( SW_RES( STR_ARR_METRIC ) );
- for ( USHORT i = 0; i < aMetricArr.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < aMetricArr.Count(); ++i )
{
String sMetric = aMetricArr.GetStringByPos( i );
FieldUnit eFUnit = (FieldUnit)aMetricArr.GetValue( i );
@@ -161,7 +161,7 @@ SwContentOptPage::SwContentOptPage( Window* pParent,
case FUNIT_INCH:
{
// nur diese Metriken benutzen
- USHORT nPos = aMetricLB.InsertEntry( sMetric );
+ sal_uInt16 nPos = aMetricLB.InsertEntry( sMetric );
aMetricLB.SetEntryData( nPos, (void*)(long)eFUnit );
aVMetric.InsertEntry( sMetric );
aVMetric.SetEntryData( nPos, (void*)(long)eFUnit );
@@ -191,13 +191,13 @@ SfxTabPage* SwContentOptPage::Create( Window* pParent,
/* -----------------------------07.04.01 16:57--------------------------------
---------------------------------------------------------------------------*/
-static void lcl_SelectMetricLB(ListBox& rMetric, USHORT nSID, const SfxItemSet& rSet)
+static void lcl_SelectMetricLB(ListBox& rMetric, sal_uInt16 nSID, const SfxItemSet& rSet)
{
const SfxPoolItem* pItem;
- if( rSet.GetItemState( nSID, FALSE, &pItem ) >= SFX_ITEM_AVAILABLE )
+ if( rSet.GetItemState( nSID, sal_False, &pItem ) >= SFX_ITEM_AVAILABLE )
{
FieldUnit eFieldUnit = (FieldUnit)((SfxUInt16Item*)pItem)->GetValue();
- for ( USHORT i = 0; i < rMetric.GetEntryCount(); ++i )
+ for ( sal_uInt16 i = 0; i < rMetric.GetEntryCount(); ++i )
{
if ( (int)(sal_IntPtr)rMetric.GetEntryData( i ) == (int)eFieldUnit )
{
@@ -215,7 +215,7 @@ void SwContentOptPage::Reset(const SfxItemSet& rSet)
{
const SwElemItem* pElemAttr = 0;
- rSet.GetItemState( FN_PARAM_ELEM , FALSE,
+ rSet.GetItemState( FN_PARAM_ELEM , sal_False,
(const SfxPoolItem**)&pElemAttr );
if(pElemAttr)
{
@@ -245,7 +245,7 @@ void SwContentOptPage::Reset(const SfxItemSet& rSet)
/*-----------------31.08.96 13.58-------------------
--------------------------------------------------*/
-BOOL SwContentOptPage::FillItemSet(SfxItemSet& rSet)
+sal_Bool SwContentOptPage::FillItemSet(SfxItemSet& rSet)
{
const SwElemItem* pOldAttr = (const SwElemItem*)
GetOldItem(GetItemSet(), FN_PARAM_ELEM);
@@ -270,34 +270,34 @@ BOOL SwContentOptPage::FillItemSet(SfxItemSet& rSet)
aElem.bSmoothScroll = aSmoothCBox.IsChecked();
- BOOL bRet = !pOldAttr || aElem != *pOldAttr;
+ sal_Bool bRet = !pOldAttr || aElem != *pOldAttr;
if(bRet)
bRet = 0 != rSet.Put(aElem);
- USHORT nMPos = aMetricLB.GetSelectEntryPos();
- USHORT nGlobalMetricPos = nMPos;
+ sal_uInt16 nMPos = aMetricLB.GetSelectEntryPos();
+ sal_uInt16 nGlobalMetricPos = nMPos;
if ( nMPos != aMetricLB.GetSavedValue() )
{
// Doppel-Cast fuer VA3.0
- USHORT nFieldUnit = (USHORT)(long)aMetricLB.GetEntryData( nMPos );
- rSet.Put( SfxUInt16Item( SID_ATTR_METRIC, (UINT16)nFieldUnit ) );
- bRet = TRUE;
+ sal_uInt16 nFieldUnit = (sal_uInt16)(long)aMetricLB.GetEntryData( nMPos );
+ rSet.Put( SfxUInt16Item( SID_ATTR_METRIC, (sal_uInt16)nFieldUnit ) );
+ bRet = sal_True;
}
nMPos = aHMetric.GetSelectEntryPos();
if ( nMPos != aHMetric.GetSavedValue() || nMPos != nGlobalMetricPos )
{
// Doppel-Cast fuer VA3.0
- USHORT nFieldUnit = (USHORT)(long)aHMetric.GetEntryData( nMPos );
- rSet.Put( SfxUInt16Item( FN_HSCROLL_METRIC, (UINT16)nFieldUnit ) );
- bRet = TRUE;
+ sal_uInt16 nFieldUnit = (sal_uInt16)(long)aHMetric.GetEntryData( nMPos );
+ rSet.Put( SfxUInt16Item( FN_HSCROLL_METRIC, (sal_uInt16)nFieldUnit ) );
+ bRet = sal_True;
}
nMPos = aVMetric.GetSelectEntryPos();
if ( nMPos != aVMetric.GetSavedValue() || nMPos != nGlobalMetricPos )
{
// Doppel-Cast fuer VA3.0
- USHORT nFieldUnit = (USHORT)(long)aVMetric.GetEntryData( nMPos );
- rSet.Put( SfxUInt16Item( FN_VSCROLL_METRIC, (UINT16)nFieldUnit ) );
- bRet = TRUE;
+ sal_uInt16 nFieldUnit = (sal_uInt16)(long)aVMetric.GetEntryData( nMPos );
+ rSet.Put( SfxUInt16Item( FN_VSCROLL_METRIC, (sal_uInt16)nFieldUnit ) );
+ bRet = sal_True;
}
return bRet;
}
@@ -314,7 +314,7 @@ IMPL_LINK(SwContentOptPage, VertRulerHdl, CheckBox*, pBox)
* --------------------------------------------------*/
IMPL_LINK( SwContentOptPage, AnyRulerHdl, CheckBox*, pBox)
{
- BOOL bChecked = pBox->IsChecked();
+ sal_Bool bChecked = pBox->IsChecked();
aHRulerCBox .Enable(bChecked);
aHMetric .Enable(bChecked);
aVRulerCBox .Enable(bChecked);
@@ -357,8 +357,8 @@ SwAddPrinterTabPage::SwAddPrinterTabPage( Window* pParent,
aFaxFT (this, SW_RES(FT_FAX)),
aFaxLB (this, SW_RES(LB_FAX)),
sNone(SW_RES(ST_NONE)),
- bAttrModified( FALSE ),
- bPreview ( FALSE )
+ bAttrModified( sal_False ),
+ bPreview ( sal_False )
{
Init();
FreeResource();
@@ -386,7 +386,7 @@ SwAddPrinterTabPage::SwAddPrinterTabPage( Window* pParent,
aFaxLB.SetSelectHdl( LINK( this, SwAddPrinterTabPage, SelectHdl ) );
const SfxPoolItem* pItem;
- if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_HTML_MODE, FALSE, &pItem )
+ if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_HTML_MODE, sal_False, &pItem )
&& ((SfxUInt16Item*)pItem)->GetValue() & HTMLMODE_ON)
{
// aDrawCB .Hide();
@@ -424,7 +424,7 @@ SwAddPrinterTabPage::SwAddPrinterTabPage( Window* pParent,
//------------------------------------------------------------------------
-void SwAddPrinterTabPage::SetPreview(BOOL bPrev)
+void SwAddPrinterTabPage::SetPreview(sal_Bool bPrev)
{
bPreview = bPrev;
@@ -452,13 +452,13 @@ SfxTabPage* SwAddPrinterTabPage::Create( Window* pParent,
//------------------------------------------------------------------------
-BOOL SwAddPrinterTabPage::FillItemSet( SfxItemSet& rCoreSet )
+sal_Bool SwAddPrinterTabPage::FillItemSet( SfxItemSet& rCoreSet )
{
if ( bAttrModified )
{
SwAddPrinterItem aAddPrinterAttr (FN_PARAM_ADDPRINTER);
aAddPrinterAttr.bPrintGraphic = aGrfCB.IsChecked();
- aAddPrinterAttr.bPrintTable = TRUE; // always enabled since CWS printerpullgpages /*aTabCB.IsChecked();*/
+ aAddPrinterAttr.bPrintTable = sal_True; // always enabled since CWS printerpullgpages /*aTabCB.IsChecked();*/
aAddPrinterAttr.bPrintDraw = aGrfCB.IsChecked(); // UI merged with aGrfCB in CWS printerpullgpages /*aDrawCB.IsChecked()*/;
aAddPrinterAttr.bPrintControl = aCtrlFldCB.IsChecked();
aAddPrinterAttr.bPrintPageBackground = aBackgroundCB.IsChecked();
@@ -468,12 +468,12 @@ BOOL SwAddPrinterTabPage::FillItemSet( SfxItemSet& rCoreSet )
aAddPrinterAttr.bPrintLeftPages = aLeftPageCB.IsChecked();
aAddPrinterAttr.bPrintRightPages = aRightPageCB.IsChecked();
- aAddPrinterAttr.bPrintReverse = FALSE; // handled by vcl itself since CWS printerpullpages /*aReverseCB.IsChecked()*/;
+ aAddPrinterAttr.bPrintReverse = sal_False; // handled by vcl itself since CWS printerpullpages /*aReverseCB.IsChecked()*/;
aAddPrinterAttr.bPrintProspect = aProspectCB.IsChecked();
aAddPrinterAttr.bPrintProspectRTL = aProspectCB_RTL.IsChecked();
aAddPrinterAttr.bPaperFromSetup = aPaperFromSetupCB.IsChecked();
aAddPrinterAttr.bPrintEmptyPages = aPrintEmptyPagesCB.IsChecked();
- aAddPrinterAttr.bPrintSingleJobs = TRUE; // handled by vcl in new print dialog since CWS printerpullpages /*aSingleJobsCB.IsChecked()*/;
+ aAddPrinterAttr.bPrintSingleJobs = sal_True; // handled by vcl in new print dialog since CWS printerpullpages /*aSingleJobsCB.IsChecked()*/;
if (aNoRB.IsChecked()) aAddPrinterAttr.nPrintPostIts =
POSTITS_NONE;
@@ -498,7 +498,7 @@ void SwAddPrinterTabPage::Reset( const SfxItemSet& )
const SfxItemSet& rSet = GetItemSet();
const SwAddPrinterItem* pAddPrinterAttr = 0;
- if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_ADDPRINTER , FALSE,
+ if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_ADDPRINTER , sal_False,
(const SfxPoolItem**)&pAddPrinterAttr ))
{
aGrfCB.Check( pAddPrinterAttr->bPrintGraphic || pAddPrinterAttr->bPrintDraw );
@@ -526,14 +526,14 @@ void SwAddPrinterTabPage::Reset( const SfxItemSet& )
}
if (aProspectCB.IsChecked())
{
- aProspectCB_RTL.Enable(TRUE);
- aNoRB.Enable( FALSE );
- aOnlyRB.Enable( FALSE );
- aEndRB.Enable( FALSE );
- aEndPageRB.Enable( FALSE );
+ aProspectCB_RTL.Enable(sal_True);
+ aNoRB.Enable( sal_False );
+ aOnlyRB.Enable( sal_False );
+ aEndRB.Enable( sal_False );
+ aEndPageRB.Enable( sal_False );
}
else
- aProspectCB_RTL.Enable( FALSE );
+ aProspectCB_RTL.Enable( sal_False );
}
//-----------------------------------------------------------------------
@@ -547,10 +547,10 @@ void SwAddPrinterTabPage::Init()
IMPL_LINK_INLINE_START( SwAddPrinterTabPage, AutoClickHdl, CheckBox *, EMPTYARG )
{
- bAttrModified = TRUE;
+ bAttrModified = sal_True;
bool bIsProspect = aProspectCB.IsChecked();
if (!bIsProspect)
- aProspectCB_RTL.Check( FALSE );
+ aProspectCB_RTL.Check( sal_False );
aProspectCB_RTL.Enable( bIsProspect );
aNoRB.Enable( !bIsProspect );
aOnlyRB.Enable( !bIsProspect );
@@ -566,7 +566,7 @@ IMPL_LINK_INLINE_END( SwAddPrinterTabPage, AutoClickHdl, CheckBox *, EMPTYARG )
void SwAddPrinterTabPage::SetFax( const SvStringsDtor& rFaxLst )
{
aFaxLB.InsertEntry(sNone);
- for ( USHORT i = 0; i < rFaxLst.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rFaxLst.Count(); ++i )
aFaxLB.InsertEntry( *rFaxLst.GetObject(i) );
aFaxLB.SelectEntryPos(0);
}
@@ -576,7 +576,7 @@ void SwAddPrinterTabPage::SetFax( const SvStringsDtor& rFaxLst )
IMPL_LINK_INLINE_START( SwAddPrinterTabPage, SelectHdl, ListBox *, EMPTYARG )
{
- bAttrModified=TRUE;
+ bAttrModified=sal_True;
return 0;
}
IMPL_LINK_INLINE_END( SwAddPrinterTabPage, SelectHdl, ListBox *, EMPTYARG )
@@ -656,20 +656,20 @@ SwStdFontTabPage::SwStdFontTabPage( Window* pParent,
pWrtShell(0),
eLanguage( GetAppLanguage() ),
- bListDefault(FALSE),
- bSetListDefault(TRUE),
- bLabelDefault(FALSE),
- bSetLabelDefault(TRUE),
- bIdxDefault(FALSE),
- bSetIdxDefault(TRUE),
- bDeletePrinter(FALSE),
-
- bListHeightDefault (FALSE),
- bSetListHeightDefault (FALSE),
- bLabelHeightDefault (FALSE),
- bSetLabelHeightDefault(FALSE),
- bIndexHeightDefault (FALSE),
- bSetIndexHeightDefault (FALSE),
+ bListDefault(sal_False),
+ bSetListDefault(sal_True),
+ bLabelDefault(sal_False),
+ bSetLabelDefault(sal_True),
+ bIdxDefault(sal_False),
+ bSetIdxDefault(sal_True),
+ bDeletePrinter(sal_False),
+
+ bListHeightDefault (sal_False),
+ bSetListHeightDefault (sal_False),
+ bLabelHeightDefault (sal_False),
+ bSetLabelHeightDefault(sal_False),
+ bIndexHeightDefault (sal_False),
+ bSetIndexHeightDefault (sal_False),
nFontGroup(FONT_GROUP_DEFAULT),
@@ -722,9 +722,9 @@ SfxTabPage* SwStdFontTabPage::Create( Window* pParent,
/*-----------------03.09.96 11.53-------------------
--------------------------------------------------*/
-void lcl_SetColl(SwWrtShell* pWrtShell, USHORT nType,
+void lcl_SetColl(SwWrtShell* pWrtShell, sal_uInt16 nType,
SfxPrinter* pPrt, const String& rStyle,
- USHORT nFontWhich)
+ sal_uInt16 nFontWhich)
{
Font aFont( rStyle, Size( 0, 10 ) );
if( pPrt )
@@ -736,8 +736,8 @@ void lcl_SetColl(SwWrtShell* pWrtShell, USHORT nType,
/*-- 11.10.2005 15:47:52---------------------------------------------------
-----------------------------------------------------------------------*/
-void lcl_SetColl(SwWrtShell* pWrtShell, USHORT nType,
- sal_Int32 nHeight, USHORT nFontHeightWhich)
+void lcl_SetColl(SwWrtShell* pWrtShell, sal_uInt16 nType,
+ sal_Int32 nHeight, sal_uInt16 nFontHeightWhich)
{
float fSize = (float)nHeight / 10;
nHeight = CalcToUnit( fSize, SFX_MAPUNIT_TWIP );
@@ -747,9 +747,9 @@ void lcl_SetColl(SwWrtShell* pWrtShell, USHORT nType,
/*-----------------03.09.96 11.53-------------------
--------------------------------------------------*/
-BOOL SwStdFontTabPage::FillItemSet( SfxItemSet& )
+sal_Bool SwStdFontTabPage::FillItemSet( SfxItemSet& )
{
- BOOL bNotDocOnly = !aDocOnlyCB.IsChecked();
+ sal_Bool bNotDocOnly = !aDocOnlyCB.IsChecked();
SW_MOD()->GetModuleConfig()->SetDefaultFontInCurrDocOnly(!bNotDocOnly);
String sStandard = aStandardBox.GetText();
@@ -805,11 +805,11 @@ 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)
@@ -822,7 +822,7 @@ BOOL SwStdFontTabPage::FillItemSet( SfxItemSet& )
SwTxtFmtColl *pColl = pWrtShell->GetTxtCollFromPool(RES_POOLCOLL_STANDARD);
pColl->ResetFmtAttr(nFontWhich);
// lcl_SetColl(pWrtShell, RES_POOLCOLL_STANDARD, pPrinter, sStandard);
- bMod = TRUE;
+ bMod = sal_True;
}
if(bStandardHeightChanged)
{
@@ -830,59 +830,59 @@ BOOL SwStdFontTabPage::FillItemSet( SfxItemSet& )
pWrtShell->SetDefault(SvxFontHeightItem( CalcToUnit( fSize, SFX_MAPUNIT_TWIP ), 100, nFontHeightWhich ) );
SwTxtFmtColl *pColl = pWrtShell->GetTxtCollFromPool(RES_POOLCOLL_STANDARD);
pColl->ResetFmtAttr(nFontHeightWhich);
- bMod = TRUE;
+ bMod = sal_True;
}
if(sTitle != sShellTitle )
{
lcl_SetColl(pWrtShell, RES_POOLCOLL_HEADLINE_BASE, pPrinter, sTitle, nFontWhich);
- bMod = TRUE;
+ bMod = sal_True;
}
if(bTitleHeightChanged)
{
lcl_SetColl(pWrtShell, RES_POOLCOLL_HEADLINE_BASE,
sal::static_int_cast< sal_uInt16, sal_Int64 >(aTitleHeightLB.GetValue()), nFontHeightWhich);
- bMod = TRUE;
+ bMod = sal_True;
}
if(sList != sShellList && (!bListDefault || !bSetListDefault ))
{
lcl_SetColl(pWrtShell, RES_POOLCOLL_NUMBUL_BASE, pPrinter, sList, nFontWhich);
- bMod = TRUE;
+ bMod = sal_True;
}
if(bListHeightChanged)
{
lcl_SetColl(pWrtShell, RES_POOLCOLL_NUMBUL_BASE,
sal::static_int_cast< sal_uInt16, sal_Int64 >(aListHeightLB.GetValue()), nFontHeightWhich);
- bMod = TRUE;
+ bMod = sal_True;
}
if(sLabel != sShellLabel && (!bLabelDefault || !bSetLabelDefault))
{
lcl_SetColl(pWrtShell, RES_POOLCOLL_LABEL, pPrinter, sLabel, nFontWhich);
- bMod = TRUE;
+ bMod = sal_True;
}
if(bLabelHeightChanged)
{
lcl_SetColl(pWrtShell, RES_POOLCOLL_LABEL,
sal::static_int_cast< sal_uInt16, sal_Int64 >(aLabelHeightLB.GetValue()), nFontHeightWhich);
- bMod = TRUE;
+ bMod = sal_True;
}
if(sIdx != sShellIndex && (!bIdxDefault || !bSetIdxDefault))
{
lcl_SetColl(pWrtShell, RES_POOLCOLL_REGISTER_BASE, pPrinter, sIdx, nFontWhich);
- bMod = TRUE;
+ bMod = sal_True;
}
if(bIndexHeightChanged)
{
lcl_SetColl(pWrtShell, RES_POOLCOLL_REGISTER_BASE,
sal::static_int_cast< sal_uInt16, sal_Int64 >(aIndexHeightLB.GetValue()), nFontHeightWhich);
- bMod = TRUE;
+ bMod = sal_True;
}
if ( bMod )
pWrtShell->SetModified();
pWrtShell->EndAllAction();
}
- return FALSE;
+ return sal_False;
}
/*-----------------03.09.96 11.53-------------------
@@ -891,11 +891,11 @@ BOOL SwStdFontTabPage::FillItemSet( SfxItemSet& )
void SwStdFontTabPage::Reset( const SfxItemSet& rSet)
{
const SfxPoolItem* pLang;
- USHORT nLangSlot = nFontGroup == FONT_GROUP_DEFAULT ? SID_ATTR_LANGUAGE :
+ sal_uInt16 nLangSlot = nFontGroup == FONT_GROUP_DEFAULT ? SID_ATTR_LANGUAGE :
FONT_GROUP_CJK == nFontGroup ? SID_ATTR_CHAR_CJK_LANGUAGE : SID_ATTR_CHAR_CTL_LANGUAGE;
- if( SFX_ITEM_SET == rSet.GetItemState(nLangSlot, FALSE, &pLang))
+ if( SFX_ITEM_SET == rSet.GetItemState(nLangSlot, sal_False, &pLang))
eLanguage = ((const SvxLanguageItem*)pLang)->GetValue();
String sTmp(aStdChrFL.GetText());
@@ -909,7 +909,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();
}
@@ -920,7 +920,7 @@ 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
@@ -946,12 +946,12 @@ void SwStdFontTabPage::Reset( const SfxItemSet& rSet)
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();
}
@@ -989,7 +989,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
{
@@ -998,7 +998,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);
@@ -1012,37 +1012,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 );
@@ -1136,15 +1136,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;
}
@@ -1166,15 +1166,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;
}
@@ -1259,7 +1259,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();
@@ -1291,22 +1291,22 @@ SfxTabPage* SwTableOptionsTabPage::Create( Window* pParent,
--------------------------------------------------*/
-BOOL SwTableOptionsTabPage::FillItemSet( SfxItemSet& )
+sal_Bool SwTableOptionsTabPage::FillItemSet( SfxItemSet& )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
SwModuleOptions* pModOpt = SW_MOD()->GetModuleConfig();
if(aRowMoveMF.IsModified())
- pModOpt->SetTblHMove( (USHORT)aRowMoveMF.Denormalize( aRowMoveMF.GetValue(FUNIT_TWIP)));
+ pModOpt->SetTblHMove( (sal_uInt16)aRowMoveMF.Denormalize( aRowMoveMF.GetValue(FUNIT_TWIP)));
if(aColMoveMF.IsModified())
- pModOpt->SetTblVMove( (USHORT)aColMoveMF.Denormalize( aColMoveMF.GetValue(FUNIT_TWIP)));
+ pModOpt->SetTblVMove( (sal_uInt16)aColMoveMF.Denormalize( aColMoveMF.GetValue(FUNIT_TWIP)));
if(aRowInsertMF.IsModified())
- pModOpt->SetTblHInsert((USHORT)aRowInsertMF.Denormalize( aRowInsertMF.GetValue(FUNIT_TWIP)));
+ pModOpt->SetTblHInsert((sal_uInt16)aRowInsertMF.Denormalize( aRowInsertMF.GetValue(FUNIT_TWIP)));
if(aColInsertMF.IsModified())
- pModOpt->SetTblVInsert((USHORT)aColInsertMF.Denormalize( aColInsertMF.GetValue(FUNIT_TWIP)));
+ pModOpt->SetTblVInsert((sal_uInt16)aColInsertMF.Denormalize( aColInsertMF.GetValue(FUNIT_TWIP)));
TblChgMode eMode;
if(aFixRB.IsChecked())
@@ -1323,7 +1323,7 @@ BOOL SwTableOptionsTabPage::FillItemSet( SfxItemSet& )
if(pWrtShell && nsSelectionType::SEL_TBL & pWrtShell->GetSelectionType())
{
pWrtShell->SetTblChgMode(eMode);
- static USHORT __READONLY_DATA aInva[] =
+ static sal_uInt16 __READONLY_DATA aInva[] =
{ FN_TABLE_MODE_FIX,
FN_TABLE_MODE_FIX_PROP,
FN_TABLE_MODE_VARIABLE,
@@ -1332,7 +1332,7 @@ BOOL SwTableOptionsTabPage::FillItemSet( SfxItemSet& )
pWrtShell->GetView().GetViewFrame()->GetBindings().Invalidate( aInva );
}
- bRet = TRUE;
+ bRet = sal_True;
}
SwInsertTableOptions aInsOpts( 0, 0 );
@@ -1360,19 +1360,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;
@@ -1405,7 +1405,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);
}
@@ -1454,7 +1454,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);
@@ -1532,17 +1532,17 @@ SwShdwCrsrOptionsTabPage::SwShdwCrsrOptionsTabPage( Window* pParent,
const SfxPoolItem* pItem = 0;
SwShadowCursorItem aOpt;
- if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_SHADOWCURSOR, FALSE, &pItem ))
+ if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_SHADOWCURSOR, sal_False, &pItem ))
aOpt = *(SwShadowCursorItem*)pItem;
aOnOffCB.Check( aOpt.IsOn() );
- BYTE eMode = aOpt.GetMode();
+ sal_uInt8 eMode = aOpt.GetMode();
aFillIndentRB.Check( FILL_INDENT == eMode );
aFillMarginRB.Check( FILL_MARGIN == eMode );
aFillTabRB.Check( FILL_TAB == eMode );
aFillSpaceRB.Check( FILL_SPACE == eMode );
- if(SFX_ITEM_SET == rSet.GetItemState(SID_HTML_MODE, FALSE, &pItem )
+ if(SFX_ITEM_SET == rSet.GetItemState(SID_HTML_MODE, sal_False, &pItem )
&& ((SfxUInt16Item*)pItem)->GetValue() & HTMLMODE_ON)
{
aTabCB .Hide();
@@ -1587,12 +1587,12 @@ void SwShdwCrsrOptionsTabPage::PageCreated( SfxAllItemSet aSet )
}
-BOOL SwShdwCrsrOptionsTabPage::FillItemSet( SfxItemSet& rSet )
+sal_Bool SwShdwCrsrOptionsTabPage::FillItemSet( SfxItemSet& rSet )
{
SwShadowCursorItem aOpt;
aOpt.SetOn( aOnOffCB.IsChecked() );
- BYTE eMode;
+ sal_uInt8 eMode;
if( aFillIndentRB.IsChecked() )
eMode= FILL_INDENT;
else if( aFillMarginRB.IsChecked() )
@@ -1603,13 +1603,13 @@ BOOL SwShdwCrsrOptionsTabPage::FillItemSet( SfxItemSet& rSet )
eMode = FILL_SPACE;
aOpt.SetMode( eMode );
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
const SfxPoolItem* pItem = 0;
- if( SFX_ITEM_SET != rSet.GetItemState( FN_PARAM_SHADOWCURSOR, FALSE, &pItem )
+ if( SFX_ITEM_SET != rSet.GetItemState( FN_PARAM_SHADOWCURSOR, sal_False, &pItem )
|| ((SwShadowCursorItem&)*pItem) != aOpt )
{
rSet.Put( aOpt );
- bRet = TRUE;
+ bRet = sal_True;
}
m_pWrtShell->GetDoc()->set( IDocumentSettingAccess::MATH_BASELINE_ALIGNMENT,
@@ -1619,7 +1619,7 @@ BOOL SwShdwCrsrOptionsTabPage::FillItemSet( SfxItemSet& rSet )
if( aCrsrInProtCB.IsChecked() != aCrsrInProtCB.GetSavedValue())
{
rSet.Put(SfxBoolItem(FN_PARAM_CRSR_IN_PROTECTED, aCrsrInProtCB.IsChecked()));
- bRet |= TRUE;
+ bRet |= sal_True;
}
const SwDocDisplayItem* pOldAttr = (const SwDocDisplayItem*)
@@ -1651,11 +1651,11 @@ void SwShdwCrsrOptionsTabPage::Reset( const SfxItemSet& rSet )
const SfxPoolItem* pItem = 0;
SwShadowCursorItem aOpt;
- if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_SHADOWCURSOR, FALSE, &pItem ))
+ if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_SHADOWCURSOR, sal_False, &pItem ))
aOpt = *(SwShadowCursorItem*)pItem;
aOnOffCB.Check( aOpt.IsOn() );
- BYTE eMode = aOpt.GetMode();
+ sal_uInt8 eMode = aOpt.GetMode();
aFillIndentRB.Check( FILL_INDENT == eMode );
aFillMarginRB.Check( FILL_MARGIN == eMode );
aFillTabRB.Check( FILL_TAB == eMode );
@@ -1664,13 +1664,13 @@ void SwShdwCrsrOptionsTabPage::Reset( const SfxItemSet& rSet )
m_aMathBaselineAlignmentCB.Check( m_pWrtShell->GetDoc()->get( IDocumentSettingAccess::MATH_BASELINE_ALIGNMENT ) );
m_aMathBaselineAlignmentCB.SaveValue();
- if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_CRSR_IN_PROTECTED, FALSE, &pItem ))
+ if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_CRSR_IN_PROTECTED, sal_False, &pItem ))
aCrsrInProtCB.Check(((const SfxBoolItem*)pItem)->GetValue());
aCrsrInProtCB.SaveValue();
const SwDocDisplayItem* pDocDisplayAttr = 0;
- rSet.GetItemState( FN_PARAM_DOCDISP, FALSE,
+ rSet.GetItemState( FN_PARAM_DOCDISP, sal_False,
(const SfxPoolItem**)&pDocDisplayAttr );
if(pDocDisplayAttr)
{
@@ -1692,8 +1692,8 @@ void SwShdwCrsrOptionsTabPage::Reset( const SfxItemSet& rSet )
struct CharAttr
{
- USHORT nItemId;
- USHORT nAttr;
+ sal_uInt16 nItemId;
+ sal_uInt16 nAttr;
};
// Editieren entspricht Einfuegen-Attributen
@@ -1713,15 +1713,15 @@ static CharAttr __FAR_DATA aRedlineAttr[] =
};
// Items from aRedlineAttr relevant for InsertAttr: strikethrough is
// not used
-static USHORT aInsertAttrMap[] = { 0, 1, 2, 3, 4, 6, 7, 8, 9, 10 };
+static sal_uInt16 aInsertAttrMap[] = { 0, 1, 2, 3, 4, 6, 7, 8, 9, 10 };
// Items from aRedlineAttr relevant for DeleteAttr: underline and
// double underline is not used
-static USHORT aDeletedAttrMap[] = { 0, 1, 2, 5, 6, 7, 8, 9, 10 };
+static sal_uInt16 aDeletedAttrMap[] = { 0, 1, 2, 5, 6, 7, 8, 9, 10 };
// Items from aRedlineAttr relevant for ChangeAttr: strikethrough is
// not used
-static USHORT aChangedAttrMap[] = { 0, 1, 2, 3, 4, 6, 7, 8, 9, 10 };
+static sal_uInt16 aChangedAttrMap[] = { 0, 1, 2, 3, 4, 6, 7, 8, 9, 10 };
/*-----------------------------------------------------------------------
Beschreibung: Markierungsvorschau
@@ -1743,18 +1743,18 @@ SwMarkPreview::SwMarkPreview( Window *pParent, const ResId& rResID ) :
// Seite
aPage.SetSize(Size(aSz.Width() - 3, aSz.Height() - 3));
- ULONG nOutWPix = aPage.GetWidth();
- ULONG nOutHPix = aPage.GetHeight();
+ sal_uLong nOutWPix = aPage.GetWidth();
+ sal_uLong nOutHPix = aPage.GetHeight();
// PrintArea
- ULONG nLBorder = 8;
- ULONG nRBorder = 8;
- ULONG nTBorder = 4;
- ULONG nBBorder = 4;
+ sal_uLong nLBorder = 8;
+ sal_uLong nRBorder = 8;
+ sal_uLong nTBorder = 4;
+ sal_uLong nBBorder = 4;
aLeftPagePrtArea = Rectangle(Point(nLBorder, nTBorder), Point((nOutWPix - 1) - nRBorder, (nOutHPix - 1) - nBBorder));
- USHORT nWidth = (USHORT)aLeftPagePrtArea.GetWidth();
- USHORT nKorr = (nWidth & 1) != 0 ? 0 : 1;
+ sal_uInt16 nWidth = (sal_uInt16)aLeftPagePrtArea.GetWidth();
+ sal_uInt16 nKorr = (nWidth & 1) != 0 ? 0 : 1;
aLeftPagePrtArea.SetSize(Size(nWidth / 2 - (nLBorder + nRBorder) / 2 + nKorr, aLeftPagePrtArea.GetHeight()));
aRightPagePrtArea = aLeftPagePrtArea;
@@ -1772,7 +1772,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 );
@@ -1841,9 +1841,9 @@ void SwMarkPreview::PaintPage(const Rectangle &rRect)
DrawRect(rRect, m_aTransCol, m_aPrintAreaCol );
// Testabsatz zeichnen
- ULONG nLTxtBorder = 4;
- ULONG nRTxtBorder = 4;
- ULONG nTTxtBorder = 4;
+ sal_uLong nLTxtBorder = 4;
+ sal_uLong nRTxtBorder = 4;
+ sal_uLong nTTxtBorder = 4;
Rectangle aTextLine = rRect;
aTextLine.SetSize(Size(aTextLine.GetWidth(), 2));
@@ -1852,14 +1852,14 @@ void SwMarkPreview::PaintPage(const Rectangle &rRect)
aTextLine.Move(0, nTTxtBorder);
sal_Int32 nStep;
- USHORT nLines;
+ sal_uInt16 nLines;
nStep = aTextLine.GetHeight() + 2;
- nLines = (USHORT)(rRect.GetHeight() / (aTextLine.GetHeight() + 2)) - 1;
+ nLines = (sal_uInt16)(rRect.GetHeight() / (aTextLine.GetHeight() + 2)) - 1;
// Text simulieren
//
- for (USHORT i = 0; i < nLines; ++i)
+ for (sal_uInt16 i = 0; i < nLines; ++i)
{
if (i == (nLines - 1))
aTextLine.SetSize(Size(aTextLine.GetWidth() / 2, aTextLine.GetHeight()));
@@ -1883,9 +1883,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);
@@ -1937,7 +1937,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);
@@ -1975,7 +1975,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();
@@ -1989,9 +1989,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);
@@ -2099,7 +2099,7 @@ BOOL SwRedlineOptionsTabPage::FillItemSet( SfxItemSet& )
}
}
- return FALSE;
+ return sal_False;
}
void SwRedlineOptionsTabPage::Reset( const SfxItemSet& )
@@ -2117,10 +2117,10 @@ void SwRedlineOptionsTabPage::Reset( const SfxItemSet& )
// Farblistboxen initialisieren
String sColor;
- aInsertColorLB.SetUpdateMode(FALSE);
- aDeletedColorLB.SetUpdateMode(FALSE);
- aChangedColorLB.SetUpdateMode(FALSE);
- aMarkColorLB.SetUpdateMode(FALSE);
+ aInsertColorLB.SetUpdateMode(sal_False);
+ aDeletedColorLB.SetUpdateMode(sal_False);
+ aChangedColorLB.SetUpdateMode(sal_False);
+ aMarkColorLB.SetUpdateMode(sal_False);
aInsertColorLB.InsertEntry(sNone);
aDeletedColorLB.InsertEntry(sNone);
@@ -2131,7 +2131,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 );
@@ -2143,10 +2143,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;
@@ -2197,13 +2197,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;
@@ -2260,7 +2260,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 )
{
@@ -2355,7 +2355,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;
@@ -2482,7 +2482,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));
@@ -2535,7 +2535,7 @@ SfxTabPage* SwTestTabPage::Create( Window* pParent,
//------------------------------------------------------------------------
-BOOL SwTestTabPage::FillItemSet( SfxItemSet& rCoreSet )
+sal_Bool SwTestTabPage::FillItemSet( SfxItemSet& rCoreSet )
{
if ( bAttrModified )
@@ -2563,7 +2563,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);
@@ -2601,7 +2601,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 188db077cf..8b7f3af37f 100644
--- a/sw/source/ui/config/prtopt.cxx
+++ b/sw/source/ui/config/prtopt.cxx
@@ -158,7 +158,7 @@ void SwPrintOptions::Commit()
Any* pValues = aValues.getArray();
const Type& rType = ::getBooleanCppuType();
- BOOL bVal;
+ sal_Bool bVal;
for(int nProp = 0; nProp < aNames.getLength(); nProp++)
{
switch(nProp)
diff --git a/sw/source/ui/config/uinums.cxx b/sw/source/ui/config/uinums.cxx
index 424df12405..39f09c2e9b 100644
--- a/sw/source/ui/config/uinums.cxx
+++ b/sw/source/ui/config/uinums.cxx
@@ -56,11 +56,11 @@
using namespace ::com::sun::star;
-#define VERSION_30B ((USHORT)250)
-#define VERSION_31B ((USHORT)326)
-#define VERSION_40A ((USHORT)364)
-#define VERSION_50A ((USHORT)373)
-#define VERSION_53A ((USHORT)596)
+#define VERSION_30B ((sal_uInt16)250)
+#define VERSION_31B ((sal_uInt16)326)
+#define VERSION_40A ((sal_uInt16)364)
+#define VERSION_50A ((sal_uInt16)373)
+#define VERSION_53A ((sal_uInt16)596)
#define ACT_NUM_VERSION VERSION_53A
#define NUMRULE_FILENAME "numrule.cfg"
@@ -87,7 +87,7 @@ SwBaseNumRules::SwBaseNumRules( const String& rFileName )
:
sFileName( rFileName ),
nVersion(0),
- bModified( FALSE )
+ bModified( sal_False )
{
Init();
}
@@ -106,11 +106,11 @@ SwBaseNumRules::~SwBaseNumRules()
INetURLObject aTempObj(sNm);
sNm = aTempObj.GetFull();
SfxMedium aStrm( sNm, STREAM_WRITE | STREAM_TRUNC |
- STREAM_SHARE_DENYALL, TRUE );
+ STREAM_SHARE_DENYALL, sal_True );
Store( *aStrm.GetOutStream() );
}
- for( USHORT i = 0; i < nMaxRules; ++i )
+ for( sal_uInt16 i = 0; i < nMaxRules; ++i )
delete pNumRules[i];
}
@@ -119,14 +119,14 @@ SwBaseNumRules::~SwBaseNumRules()
------------------------------------------------------------------------*/
void SwBaseNumRules::Init()
{
- for(USHORT i = 0; i < nMaxRules; ++i )
+ for(sal_uInt16 i = 0; i < nMaxRules; ++i )
pNumRules[i] = 0;
String sNm( sFileName );
SvtPathOptions aOpt;
if( aOpt.SearchFile( sNm, SvtPathOptions::PATH_USERCONFIG ))
{
- SfxMedium aStrm( sNm, STREAM_STD_READ, TRUE );
+ SfxMedium aStrm( sNm, STREAM_STD_READ, sal_True );
Load( *aStrm.GetInStream() );
}
}
@@ -135,7 +135,7 @@ void SwBaseNumRules::Init()
--------------------------------------------------*/
-void SwBaseNumRules::ApplyNumRules(const SwNumRulesWithName &rCopy, USHORT nIdx)
+void SwBaseNumRules::ApplyNumRules(const SwNumRulesWithName &rCopy, sal_uInt16 nIdx)
{
ASSERT(nIdx < nMaxRules, Array der NumRules ueberindiziert.);
if( !pNumRules[nIdx] )
@@ -149,22 +149,22 @@ void SwBaseNumRules::ApplyNumRules(const SwNumRulesWithName &rCopy, USHORT nIdx)
Beschreibung: Speichern
------------------------------------------------------------------------*/
-BOOL /**/ SwBaseNumRules::Store(SvStream &rStream)
+sal_Bool /**/ SwBaseNumRules::Store(SvStream &rStream)
{
rStream << ACT_NUM_VERSION;
// Schreiben, welche Positionen durch eine Regel belegt sind
// Anschliessend Schreiben der einzelnen Rules
- for(USHORT i = 0; i < nMaxRules; ++i)
+ for(sal_uInt16 i = 0; i < nMaxRules; ++i)
{
if(pNumRules[i])
{
- rStream << (unsigned char) TRUE;
+ rStream << (unsigned char) sal_True;
pNumRules[i]->Store( rStream );
}
else
- rStream << (unsigned char) FALSE;
+ rStream << (unsigned char) sal_False;
}
- return TRUE;
+ return sal_True;
}
@@ -189,8 +189,8 @@ int SwBaseNumRules::Load(SvStream &rStream)
else if( VERSION_30B == nVersion || VERSION_31B == nVersion ||
ACT_NUM_VERSION >= nVersion )
{
- unsigned char bRule = FALSE;
- for(USHORT i = 0; i < nMaxRules; ++i)
+ unsigned char bRule = sal_False;
+ for(sal_uInt16 i = 0; i < nMaxRules; ++i)
{
rStream >> bRule;
if(bRule)
@@ -226,9 +226,9 @@ SwChapterNumRules::SwChapterNumRules() :
/*-----------------26.06.97 08.23-------------------
--------------------------------------------------*/
-void SwChapterNumRules::ApplyNumRules(const SwNumRulesWithName &rCopy, USHORT nIdx)
+void SwChapterNumRules::ApplyNumRules(const SwNumRulesWithName &rCopy, sal_uInt16 nIdx)
{
- bModified = TRUE;
+ bModified = sal_True;
SwBaseNumRules::ApplyNumRules(rCopy, nIdx);
}
@@ -238,7 +238,7 @@ SwNumRulesWithName::SwNumRulesWithName( const SwNumRule &rCopy,
const String &rName )
: aName(rName)
{
- for( USHORT n = 0; n < MAXLEVEL; ++n )
+ for( sal_uInt16 n = 0; n < MAXLEVEL; ++n )
{
const SwNumFmt* pFmt = rCopy.GetNumFmt( n );
if( pFmt )
@@ -292,13 +292,13 @@ const SwNumRulesWithName& SwNumRulesWithName::operator=(const SwNumRulesWithName
/*------------------------------------------------------------------------
Beschreibung:
------------------------------------------------------------------------*/
-SwNumRulesWithName::SwNumRulesWithName( SvStream &rStream, USHORT nVersion )
+SwNumRulesWithName::SwNumRulesWithName( SvStream &rStream, sal_uInt16 nVersion )
{
CharSet eEncoding = gsl_getSystemTextEncoding();
rStream.ReadByteString(aName, eEncoding);
char c;
- for(USHORT n = 0; n < MAXLEVEL; ++n )
+ for(sal_uInt16 n = 0; n < MAXLEVEL; ++n )
{
if( VERSION_30B == nVersion )
c = 1;
@@ -327,9 +327,9 @@ void SwNumRulesWithName::MakeNumRule( SwWrtShell& rSh, SwNumRule& rChg ) const
// --> OD 2008-06-06 #i89178#
rChg = SwNumRule( aName, numfunc::GetDefaultPositionAndSpaceMode() );
// <--
- rChg.SetAutoRule( FALSE );
+ rChg.SetAutoRule( sal_False );
_SwNumFmtGlobal* pFmt;
- for( USHORT n = 0; n < MAXLEVEL; ++n )
+ for( sal_uInt16 n = 0; n < MAXLEVEL; ++n )
if( 0 != ( pFmt = aFmts[ n ] ) )
{
SwNumFmt aNew;
@@ -346,7 +346,7 @@ void SwNumRulesWithName::Store( SvStream &rStream )
CharSet eEncoding = gsl_getSystemTextEncoding();
rStream.WriteByteString(aName, eEncoding);
- for( USHORT n = 0; n < MAXLEVEL; ++n )
+ for( sal_uInt16 n = 0; n < MAXLEVEL; ++n )
{
_SwNumFmtGlobal* pFmt = aFmts[ n ];
if( pFmt )
@@ -377,7 +377,7 @@ SwNumRulesWithName::_SwNumFmtGlobal::_SwNumFmtGlobal( const SwNumFmt& rFmt )
{
SfxItemIter aIter( pFmt->GetAttrSet() );
const SfxPoolItem *pCurr = aIter.GetCurItem();
- while( TRUE )
+ while( sal_True )
{
aItems.Insert( pCurr->Clone(), aItems.Count() );
if( aIter.IsAtEnd() )
@@ -400,7 +400,7 @@ SwNumRulesWithName::_SwNumFmtGlobal::_SwNumFmtGlobal( const _SwNumFmtGlobal& rFm
sCharFmtName( rFmt.sCharFmtName ),
nCharPoolId( rFmt.nCharPoolId )
{
- for( USHORT n = rFmt.aItems.Count(); n; )
+ for( sal_uInt16 n = rFmt.aItems.Count(); n; )
aItems.Insert( rFmt.aItems[ --n ]->Clone(), aItems.Count() );
}
@@ -409,15 +409,15 @@ SwNumRulesWithName::_SwNumFmtGlobal::_SwNumFmtGlobal( const _SwNumFmtGlobal& rFm
------------------------------------------------------------------------*/
SwNumRulesWithName::_SwNumFmtGlobal::_SwNumFmtGlobal( SvStream& rStream,
- USHORT nVersion )
+ sal_uInt16 nVersion )
: nCharPoolId( USHRT_MAX )
{
CharSet eEncoding = gsl_getSystemTextEncoding();
{
- USHORT nUS;
+ sal_uInt16 nUS;
sal_Char cChar;
short nShort;
- BOOL bFlag;
+ sal_Bool bFlag;
String sStr;
rStream >> nUS; aFmt.SetNumberingType((sal_Int16)nUS );
@@ -435,7 +435,7 @@ SwNumRulesWithName::_SwNumFmtGlobal::_SwNumFmtGlobal( SvStream& rStream,
if( VERSION_30B == nVersion )
{
long nL;
- rStream >> cChar; aFmt.SetStart( (USHORT)cChar );
+ rStream >> cChar; aFmt.SetStart( (sal_uInt16)cChar );
rStream.ReadByteString(sStr, eEncoding);
aFmt.SetPrefix( sStr );
@@ -460,11 +460,11 @@ SwNumRulesWithName::_SwNumFmtGlobal::_SwNumFmtGlobal( SvStream& rStream,
rStream >> bFlag;
}
- USHORT nFamily;
- USHORT nCharSet;
+ sal_uInt16 nFamily;
+ sal_uInt16 nCharSet;
short nWidth;
short nHeight;
- USHORT nPitch;
+ sal_uInt16 nPitch;
String aName;
rStream.ReadByteString(aName, eEncoding);
@@ -489,14 +489,14 @@ SwNumRulesWithName::_SwNumFmtGlobal::_SwNumFmtGlobal( SvStream& rStream,
if( VERSION_30B != nVersion )
{
- USHORT nItemCount;
+ sal_uInt16 nItemCount;
rStream >> nCharPoolId;
rStream.ReadByteString(sCharFmtName, eEncoding);
rStream >> nItemCount;
while( nItemCount-- )
{
- USHORT nWhich, nVers;
+ sal_uInt16 nWhich, nVers;
rStream >> nWhich >> nVers;
aItems.Insert( GetDfltAttr( nWhich )->Create( rStream, nVers ),
aItems.Count() );
@@ -505,7 +505,7 @@ SwNumRulesWithName::_SwNumFmtGlobal::_SwNumFmtGlobal( SvStream& rStream,
if( VERSION_40A == nVersion && SVX_NUM_BITMAP == aFmt.GetNumberingType() )
{
- BYTE cF;
+ sal_uInt8 cF;
Size aSz;
rStream >> aSz.Width() >> aSz.Height();
@@ -515,7 +515,7 @@ SwNumRulesWithName::_SwNumFmtGlobal::_SwNumFmtGlobal( SvStream& rStream,
{
SvxBrushItem* pBrush = 0;
SwFmtVertOrient* pVOrient = 0;
- USHORT nVer;
+ sal_uInt16 nVer;
if( cF & 1 )
{
@@ -556,32 +556,32 @@ void SwNumRulesWithName::_SwNumFmtGlobal::Store( SvStream& rStream )
CharSet eEncoding = gsl_getSystemTextEncoding();
{
String aName;
- USHORT nFamily = FAMILY_DONTKNOW, nCharSet = 0, nPitch = 0;
+ sal_uInt16 nFamily = FAMILY_DONTKNOW, nCharSet = 0, nPitch = 0;
short nWidth = 0, nHeight = 0;
const Font* pFnt = aFmt.GetBulletFont();
if( pFnt )
{
aName = pFnt->GetName();
- nFamily = (USHORT)pFnt->GetFamily();
- nCharSet = (USHORT)pFnt->GetCharSet();
+ nFamily = (sal_uInt16)pFnt->GetFamily();
+ nCharSet = (sal_uInt16)pFnt->GetCharSet();
nWidth = (short)pFnt->GetSize().Width();
nHeight = (short)pFnt->GetSize().Height();
- nPitch = (USHORT)pFnt->GetPitch();
+ nPitch = (sal_uInt16)pFnt->GetPitch();
}
- rStream << USHORT(aFmt.GetNumberingType())
+ rStream << sal_uInt16(aFmt.GetNumberingType())
<< aFmt.GetBulletChar()
<< (aFmt.GetIncludeUpperLevels() > 0)
<< aFmt.GetStart();
rStream.WriteByteString( aFmt.GetPrefix(), eEncoding );
rStream.WriteByteString( aFmt.GetSuffix(), eEncoding );
- rStream << USHORT( aFmt.GetNumAdjust() )
+ rStream << sal_uInt16( aFmt.GetNumAdjust() )
<< aFmt.GetAbsLSpace()
<< aFmt.GetFirstLineOffset()
<< aFmt.GetCharTextDistance()
<< aFmt.GetLSpace()
- << FALSE;//aFmt.IsRelLSpace();
+ << sal_False;//aFmt.IsRelLSpace();
rStream.WriteByteString( aName, eEncoding );
rStream << nFamily
<< nCharSet
@@ -593,10 +593,10 @@ void SwNumRulesWithName::_SwNumFmtGlobal::Store( SvStream& rStream )
rStream.WriteByteString( sCharFmtName, eEncoding );
rStream << aItems.Count();
- for( USHORT n = aItems.Count(); n; )
+ for( sal_uInt16 n = aItems.Count(); n; )
{
SfxPoolItem* pItem = aItems[ --n ];
- USHORT nIVers = pItem->GetVersion( SOFFICE_FILEFORMAT_50 );
+ sal_uInt16 nIVers = pItem->GetVersion( SOFFICE_FILEFORMAT_50 );
ASSERT( nIVers != USHRT_MAX,
"Was'n das: Item-Version USHRT_MAX in der aktuellen Version" );
rStream << pItem->Which()
@@ -608,21 +608,21 @@ void SwNumRulesWithName::_SwNumFmtGlobal::Store( SvStream& rStream )
if( SVX_NUM_BITMAP == aFmt.GetNumberingType() )
{
- rStream << (INT32)aFmt.GetGraphicSize().Width()
- << (INT32)aFmt.GetGraphicSize().Height();
- BYTE cFlg = ( 0 != aFmt.GetBrush() ? 1 : 0 ) +
+ rStream << (sal_Int32)aFmt.GetGraphicSize().Width()
+ << (sal_Int32)aFmt.GetGraphicSize().Height();
+ sal_uInt8 cFlg = ( 0 != aFmt.GetBrush() ? 1 : 0 ) +
( 0 != aFmt.GetGraphicOrientation() ? 2 : 0 );
rStream << cFlg;
if( aFmt.GetBrush() )
{
- USHORT nVersion = aFmt.GetBrush()->GetVersion( SOFFICE_FILEFORMAT_50 );
+ sal_uInt16 nVersion = aFmt.GetBrush()->GetVersion( SOFFICE_FILEFORMAT_50 );
rStream << nVersion;
aFmt.GetBrush()->Store( rStream, nVersion );
}
if( aFmt.GetGraphicOrientation() )
{
- USHORT nVersion = aFmt.GetGraphicOrientation()->GetVersion( SOFFICE_FILEFORMAT_50 );
+ sal_uInt16 nVersion = aFmt.GetGraphicOrientation()->GetVersion( SOFFICE_FILEFORMAT_50 );
rStream << nVersion;
aFmt.GetGraphicOrientation()->Store( rStream, nVersion );
}
@@ -640,8 +640,8 @@ void SwNumRulesWithName::_SwNumFmtGlobal::ChgNumFmt( SwWrtShell& rSh,
if( sCharFmtName.Len() )
{
// suche erstmal ueber den Namen
- USHORT nArrLen = rSh.GetCharFmtCount();
- for( USHORT i = 1; i < nArrLen; ++i )
+ sal_uInt16 nArrLen = rSh.GetCharFmtCount();
+ for( sal_uInt16 i = 1; i < nArrLen; ++i )
{
pFmt = &rSh.GetCharFmt( i );
if( COMPARE_EQUAL == pFmt->GetName().CompareTo( sCharFmtName ))
@@ -655,13 +655,13 @@ void SwNumRulesWithName::_SwNumFmtGlobal::ChgNumFmt( SwWrtShell& rSh,
if( IsPoolUserFmt( nCharPoolId ) )
{
pFmt = rSh.MakeCharFmt( sCharFmtName );
- pFmt->SetAuto( FALSE );
+ pFmt->SetAuto( sal_False );
}
else
pFmt = rSh.GetCharFmtFromPool( nCharPoolId );
if( !pFmt->GetDepends() ) // Attribute setzen
- for( USHORT n = aItems.Count(); n; )
+ for( sal_uInt16 n = aItems.Count(); n; )
pFmt->SetFmtAttr( *aItems[ --n ] );
}
}
diff --git a/sw/source/ui/config/usrpref.cxx b/sw/source/ui/config/usrpref.cxx
index 46cd317ed1..e97c1adace 100644
--- a/sw/source/ui/config/usrpref.cxx
+++ b/sw/source/ui/config/usrpref.cxx
@@ -56,7 +56,7 @@ void SwMasterUsrPref::SetUsrPref(const SwViewOption &rCopy)
*((SwViewOption*)this) = rCopy;
}
-SwMasterUsrPref::SwMasterUsrPref(BOOL bWeb) :
+SwMasterUsrPref::SwMasterUsrPref(sal_Bool bWeb) :
eFldUpdateFlags(AUTOUPD_OFF),
nLinkUpdateMode(0),
bIsHScrollMetricSet(sal_False),
@@ -129,7 +129,7 @@ Sequence<OUString> SwContentViewConfig::GetPropertyNames()
/*-- 28.09.00 09:55:33---------------------------------------------------
-----------------------------------------------------------------------*/
-SwContentViewConfig::SwContentViewConfig(BOOL bIsWeb, SwMasterUsrPref& rPar) :
+SwContentViewConfig::SwContentViewConfig(sal_Bool bIsWeb, SwMasterUsrPref& rPar) :
ConfigItem(bIsWeb ? C2U("Office.WriterWeb/Content") : C2U("Office.Writer/Content")),
rParent(rPar),
bWeb(bIsWeb)
@@ -162,7 +162,7 @@ void SwContentViewConfig::Commit()
for(int nProp = 0; nProp < aNames.getLength(); nProp++)
{
- sal_Bool bVal = FALSE;
+ sal_Bool bVal = sal_False;
switch(nProp)
{
case 0: bVal = rParent.IsGraphic(); break;// "Display/GraphicObject",
@@ -228,11 +228,11 @@ void SwContentViewConfig::Load()
{
sal_Int32 nSet = 0;
pValues[nProp] >>= nSet;
- rParent.SetUpdateLinkMode(nSet, TRUE);
+ rParent.SetUpdateLinkMode(nSet, sal_True);
}
break;// "Update/Link",
- case 17: rParent.SetUpdateFields(bSet, TRUE); break;// "Update/Field",
- case 18: rParent.SetUpdateCharts(bSet, TRUE); break;// "Update/Chart"
+ case 17: rParent.SetUpdateFields(bSet, sal_True); break;// "Update/Field",
+ case 18: rParent.SetUpdateCharts(bSet, sal_True); break;// "Update/Chart"
}
}
}
@@ -279,7 +279,7 @@ Sequence<OUString> SwLayoutViewConfig::GetPropertyNames()
/*-- 28.09.00 09:55:34---------------------------------------------------
-----------------------------------------------------------------------*/
-SwLayoutViewConfig::SwLayoutViewConfig(BOOL bIsWeb, SwMasterUsrPref& rPar) :
+SwLayoutViewConfig::SwLayoutViewConfig(sal_Bool bIsWeb, SwMasterUsrPref& rPar) :
ConfigItem(bIsWeb ? C2U("Office.WriterWeb/Layout") : C2U("Office.Writer/Layout"),
CONFIG_MODE_DELAYED_UPDATE|CONFIG_MODE_RELEASE_TREE),
rParent(rPar),
@@ -313,10 +313,10 @@ void SwLayoutViewConfig::Commit()
case 3: rVal <<= (sal_Bool) rParent.IsViewHScrollBar(); break; // "Window/HorizontalScroll",
case 4: rVal <<= (sal_Bool) rParent.IsViewVScrollBar(); break; // "Window/VerticalScroll",
case 5: rVal <<= (sal_Bool) rParent.IsViewAnyRuler(); break; // "Window/ShowRulers"
- // #i14593# use IsView*Ruler(TRUE) instead of IsView*Ruler()
+ // #i14593# use IsView*Ruler(sal_True) instead of IsView*Ruler()
// this preserves the single ruler states even if "Window/ShowRulers" is off
- case 6: rVal <<= (sal_Bool) rParent.IsViewHRuler(TRUE); break; // "Window/HorizontalRuler",
- case 7: rVal <<= (sal_Bool) rParent.IsViewVRuler(TRUE); break; // "Window/VerticalRuler",
+ case 6: rVal <<= (sal_Bool) rParent.IsViewHRuler(sal_True); break; // "Window/HorizontalRuler",
+ case 7: rVal <<= (sal_Bool) rParent.IsViewVRuler(sal_True); break; // "Window/VerticalRuler",
case 8:
if(rParent.bIsHScrollMetricSet)
rVal <<= (sal_Int32)rParent.eHScrollMetric; // "Window/HorizontalRulerUnit"
@@ -382,15 +382,15 @@ void SwLayoutViewConfig::Load()
}
break;
case 10: rParent.SetSmoothScroll(bSet); break;// "Window/SmoothScroll",
- case 11: rParent.SetZoom( static_cast< USHORT >(nInt32Val) ); break;// "Zoom/Value",
+ case 11: rParent.SetZoom( static_cast< sal_uInt16 >(nInt32Val) ); break;// "Zoom/Value",
case 12: rParent.SetZoomType( static_cast< SvxZoomType >(nInt32Val) ); break;// "Zoom/Type",
case 13: rParent.SetAlignMathObjectsToBaseline(bSet); break;// "Other/IsAlignMathObjectsToBaseline"
- case 14: rParent.SetMetric((FieldUnit)nInt32Val, TRUE); break;// "Other/MeasureUnit",
- case 15: rParent.SetDefTab(MM100_TO_TWIP(nInt32Val), TRUE); break;// "Other/TabStop",
+ case 14: rParent.SetMetric((FieldUnit)nInt32Val, sal_True); break;// "Other/MeasureUnit",
+ case 15: rParent.SetDefTab(MM100_TO_TWIP(nInt32Val), sal_True); break;// "Other/TabStop",
case 16: rParent.SetVRulerRight(bSet); break;// "Window/IsVerticalRulerRight",
- case 17: rParent.SetViewLayoutColumns( static_cast<USHORT>(nInt32Val) ); break;// "ViewLayout/Columns",
+ case 17: rParent.SetViewLayoutColumns( static_cast<sal_uInt16>(nInt32Val) ); break;// "ViewLayout/Columns",
case 18: rParent.SetViewLayoutBookMode(bSet); break;// "ViewLayout/BookMode",
- case 19: rParent.SetDefaultPageMode(bSet,TRUE); break;// "Other/IsSquaredPageMode",
+ case 19: rParent.SetDefaultPageMode(bSet,sal_True); break;// "Other/IsSquaredPageMode",
}
}
}
@@ -426,7 +426,7 @@ Sequence<OUString> SwGridConfig::GetPropertyNames()
/* -----------------------------19.01.01 13:07--------------------------------
---------------------------------------------------------------------------*/
-SwGridConfig::SwGridConfig(BOOL bIsWeb, SwMasterUsrPref& rPar) :
+SwGridConfig::SwGridConfig(sal_Bool bIsWeb, SwMasterUsrPref& rPar) :
ConfigItem(bIsWeb ? C2U("Office.WriterWeb/Grid") : C2U("Office.Writer/Grid"),
CONFIG_MODE_DELAYED_UPDATE|CONFIG_MODE_RELEASE_TREE),
rParent(rPar),
@@ -587,7 +587,7 @@ void SwCursorConfig::Load()
switch(nProp)
{
case 0: rParent.SetShadowCursor(bSet); break;// "DirectCursor/UseDirectCursor",
- case 1: rParent.SetShdwCrsrFillMode((BYTE)nSet); break;// "DirectCursor/Insert",
+ case 1: rParent.SetShdwCrsrFillMode((sal_uInt8)nSet); break;// "DirectCursor/Insert",
case 2: rParent.SetCursorInProtectedArea(bSet); break;// "Option/ProtectedArea"
}
}
diff --git a/sw/source/ui/config/viewopt.cxx b/sw/source/ui/config/viewopt.cxx
index 6960e56ceb..ffcbc7de29 100644
--- a/sw/source/ui/config/viewopt.cxx
+++ b/sw/source/ui/config/viewopt.cxx
@@ -60,7 +60,7 @@
#include <editeng/acorrcfg.hxx>
#ifdef DBG_UTIL
-BOOL SwViewOption::bTest9 = FALSE; //DrawingLayerNotLoading
+sal_Bool SwViewOption::bTest9 = sal_False; //DrawingLayerNotLoading
#endif
Color SwViewOption::aDocBoundColor(COL_LIGHTGRAY);
Color SwViewOption::aObjectBoundColor(COL_LIGHTGRAY);
@@ -81,7 +81,7 @@ Color SwViewOption::aPageBreakColor(COL_BLUE);
Color SwViewOption::aScriptIndicatorColor(COL_GREEN);
sal_Int32 SwViewOption::nAppearanceFlags = VIEWOPT_DOC_BOUNDARIES|VIEWOPT_OBJECT_BOUNDARIES;
-USHORT SwViewOption::nPixelTwips = 0; //ein Pixel auf dem Bildschirm
+sal_uInt16 SwViewOption::nPixelTwips = 0; //ein Pixel auf dem Bildschirm
#define LINEBREAK_SIZE 12, 8
@@ -98,7 +98,7 @@ static const char __FAR_DATA aPostItStr[] = " ";
* SwViewOption::IsEqualFlags()
*************************************************************************/
-BOOL SwViewOption::IsEqualFlags( const SwViewOption &rOpt ) const
+sal_Bool SwViewOption::IsEqualFlags( const SwViewOption &rOpt ) const
{
return nCoreOptions == rOpt.nCoreOptions
&& nCore2Options == rOpt.nCore2Options
@@ -167,10 +167,10 @@ void SwViewOption::DrawRectPrinter( OutputDevice *pOut,
* SwViewOption::GetPostItsWidth()
*************************************************************************/
-USHORT SwViewOption::GetPostItsWidth( const OutputDevice *pOut ) const
+sal_uInt16 SwViewOption::GetPostItsWidth( const OutputDevice *pOut ) const
{
ASSERT( pOut, "no Outdev" );
- return USHORT(pOut->GetTextWidth( String::CreateFromAscii(aPostItStr )));
+ return sal_uInt16(pOut->GetTextWidth( String::CreateFromAscii(aPostItStr )));
}
/*************************************************************************
@@ -184,7 +184,7 @@ void SwViewOption::PaintPostIts( OutputDevice *pOut, const SwRect &rRect, sal_Bo
Color aOldLineColor( pOut->GetLineColor() );
pOut->SetLineColor( Color(COL_GRAY ) );
// Wir ziehen ueberall zwei Pixel ab, damit es schick aussieht
- USHORT nPix = GetPixelTwips() * 2;
+ sal_uInt16 nPix = GetPixelTwips() * 2;
if( rRect.Width() <= 2 * nPix || rRect.Height() <= 2 * nPix )
nPix = 0;
const Point aTopLeft( rRect.Left() + nPix, rRect.Top() + nPix );
@@ -210,15 +210,15 @@ SwViewOption::SwViewOption() :
nPagePrevRow( 1 ),
nPagePrevCol( 2 ),
nShdwCrsrFillMode( FILL_TAB ),
- bReadonly(FALSE),
- bStarOneSetting(FALSE),
- bIsPagePreview(FALSE),
- bSelectionInReadonly(FALSE),
+ bReadonly(sal_False),
+ bStarOneSetting(sal_False),
+ bIsPagePreview(sal_False),
+ bSelectionInReadonly(sal_False),
// --> FME 2004-06-29 #114856# Formular view
- bFormView(FALSE),
+ bFormView(sal_False),
// <--
- bBookview(FALSE),
- mbViewLayoutBookMode(FALSE),
+ bBookview(sal_False),
+ mbViewLayoutBookMode(sal_False),
bShowPlaceHolderFields( sal_True ),
nZoom( 100 ),
@@ -249,14 +249,14 @@ SwViewOption::SwViewOption() :
#ifdef DBG_UTIL
// korrespondieren zu den Angaben in ui/config/cfgvw.src
bTest1 = bTest2 = bTest3 = bTest4 =
- bTest5 = bTest6 = bTest7 = bTest8 = bTest10 = FALSE;
+ bTest5 = bTest6 = bTest7 = bTest8 = bTest10 = sal_False;
#endif
}
SwViewOption::SwViewOption(const SwViewOption& rVOpt)
{
- bReadonly = FALSE;
- bSelectionInReadonly = FALSE;
+ bReadonly = sal_False;
+ bSelectionInReadonly = sal_False;
// --> FME 2004-06-29 #114856# Formular view
bFormView = rVOpt.bFormView;
// <--
@@ -354,11 +354,11 @@ void SwViewOption::Init( Window *pWin )
{
if( !nPixelTwips && pWin )
{
- nPixelTwips = (USHORT)pWin->PixelToLogic( Size(1,1) ).Height();
+ nPixelTwips = (sal_uInt16)pWin->PixelToLogic( Size(1,1) ).Height();
}
}
-BOOL SwViewOption::IsAutoCompleteWords() const
+sal_Bool SwViewOption::IsAutoCompleteWords() const
{
const SvxSwAutoFmtFlags& rFlags = SvxAutoCorrCfg::Get()->GetAutoCorrect()->GetSwFlags();
return /*rFlags.bAutoCompleteWords &&*/ rFlags.bAutoCmpltCollectWords;
@@ -379,9 +379,9 @@ AuthorCharAttr::AuthorCharAttr() :
--------------------------------------------------*/
-USHORT GetHtmlMode(const SwDocShell* pShell)
+sal_uInt16 GetHtmlMode(const SwDocShell* pShell)
{
- USHORT nRet = 0;
+ sal_uInt16 nRet = 0;
if(!pShell || PTR_CAST(SwWebDocShell, pShell))
{
nRet = HTMLMODE_ON;
@@ -593,7 +593,7 @@ void SwViewOption::ApplyColorConfigValues(const svtools::ColorConfig& rConfig )
/* -----------------------------23.04.2002 17:48------------------------------
---------------------------------------------------------------------------*/
-void SwViewOption::SetAppearanceFlag(sal_Int32 nFlag, BOOL bSet, BOOL bSaveInConfig )
+void SwViewOption::SetAppearanceFlag(sal_Int32 nFlag, sal_Bool bSet, sal_Bool bSaveInConfig )
{
if(bSet)
nAppearanceFlags |= nFlag;
@@ -636,7 +636,7 @@ void SwViewOption::SetAppearanceFlag(sal_Int32 nFlag, BOOL bSet, BOOL bSaveInCon
/* -----------------------------24.04.2002 10:42------------------------------
---------------------------------------------------------------------------*/
-BOOL SwViewOption::IsAppearanceFlag(sal_Int32 nFlag)
+sal_Bool SwViewOption::IsAppearanceFlag(sal_Int32 nFlag)
{
return 0 != (nAppearanceFlags & nFlag);
}
diff --git a/sw/source/ui/dbui/addresslistdialog.cxx b/sw/source/ui/dbui/addresslistdialog.cxx
index 4ddc467655..96a75cfb38 100644
--- a/sw/source/ui/dbui/addresslistdialog.cxx
+++ b/sw/source/ui/dbui/addresslistdialog.cxx
@@ -236,7 +236,7 @@ SwAddressListDialog::SwAddressListDialog(SwMailMergeAddressBlockPage* pParent) :
DBG_ASSERT(m_xDBContext.is(), "service 'com.sun.star.sdb.DatabaseContext' not found!");
sal_Bool bEnableEdit = sal_False;
sal_Bool bEnableOK = sal_True;
- m_aListLB.SelectAll( FALSE );
+ m_aListLB.SelectAll( sal_False );
if(m_xDBContext.is())
{
@@ -461,7 +461,7 @@ IMPL_LINK(SwAddressListDialog, CreateHdl_Impl, PushButton*, pButton)
pUserData->sURL = sURL;
m_pCreatedDataSource->SetUserData(pUserData);
m_aListLB.Select(m_pCreatedDataSource);
- m_aCreateListPB.Enable(FALSE);
+ m_aCreateListPB.Enable(sal_False);
}
catch(Exception& )
@@ -531,7 +531,7 @@ IMPL_STATIC_LINK(SwAddressListDialog, StaticListBoxSelectHdl_Impl, SvLBoxEntry*,
pThis->m_aListLB.SetEntryText(pThis->m_sConnecting, pSelect, ITEMID_TABLE - 1);
// allow painting of the new entry
pThis->m_aListLB.Window::Invalidate(INVALIDATE_UPDATE);
- for (USHORT i = 0; i < 10; i++)
+ for (sal_uInt16 i = 0; i < 10; i++)
Application::Reschedule();
}
@@ -689,7 +689,7 @@ IMPL_LINK(SwAddressListDialog, TableSelectHdl_Impl, PushButton*, pButton)
-----------------------------------------------------------------------*/
IMPL_LINK(SwAddressListDialog, OKHdl_Impl, PushButton*, EMPTYARG)
{
- EndDialog(TRUE);
+ EndDialog(sal_True);
return 0;
}
diff --git a/sw/source/ui/dbui/createaddresslistdialog.cxx b/sw/source/ui/dbui/createaddresslistdialog.cxx
index 2d0c1d0a00..f1f995cfa1 100644
--- a/sw/source/ui/dbui/createaddresslistdialog.cxx
+++ b/sw/source/ui/dbui/createaddresslistdialog.cxx
@@ -223,11 +223,11 @@ void SwAddressControl_Impl::SetData(SwCSVData& rDBData)
if(nContentHeight < m_aScrollBar.GetSizePixel().Height())
{
nContentHeight = m_aScrollBar.GetSizePixel().Height();
- m_aScrollBar.Enable(FALSE);
+ m_aScrollBar.Enable(sal_False);
}
else
{
- m_aScrollBar.Enable(TRUE);
+ m_aScrollBar.Enable(sal_True);
m_aScrollBar.SetRange(Range(0, nLines));
m_aScrollBar.SetThumbPos(0);
m_aScrollBar.SetVisibleSize(nVisibleLines);
@@ -366,7 +366,7 @@ long SwAddressControl_Impl::PreNotify( NotifyEvent& rNEvt )
if(rNEvt.GetType() == EVENT_COMMAND)
{
const CommandEvent* pCEvt = rNEvt.GetCommandEvent();
- USHORT nCmd = pCEvt->GetCommand();
+ sal_uInt16 nCmd = pCEvt->GetCommand();
if( COMMAND_WHEEL == nCmd )
{
Command(*pCEvt);
@@ -428,7 +428,7 @@ SwCreateAddressListDialog::SwCreateAddressListDialog(
if(m_sURL.Len())
{
//file exists, has to be loaded here
- SfxMedium aMedium( m_sURL, STREAM_READ, TRUE );
+ SfxMedium aMedium( m_sURL, STREAM_READ, sal_True );
SvStream* pStream = aMedium.GetInStream();
if(pStream)
{
@@ -442,7 +442,7 @@ SwCreateAddressListDialog::SwCreateAddressListDialog(
OUString sMiddle(sTempMiddle);
String sLine;
- BOOL bRead = pStream->ReadUniOrByteStringLine( sLine, RTL_TEXTENCODING_UTF8 );
+ sal_Bool bRead = pStream->ReadUniOrByteStringLine( sLine, RTL_TEXTENCODING_UTF8 );
if(bRead)
{
@@ -487,7 +487,7 @@ SwCreateAddressListDialog::SwCreateAddressListDialog(
//database has to be created
const ResStringArray& rAddressHeader = rConfig.GetDefaultAddressHeaders();
sal_uInt32 nCount = rAddressHeader.Count();
- for(USHORT nHeader = 0; nHeader < nCount; ++nHeader)
+ for(sal_uInt16 nHeader = 0; nHeader < nCount; ++nHeader)
m_pCSVData->aDBColumnHeaders.push_back( rAddressHeader.GetString(nHeader));
::std::vector<OUString> aNewData;
String sTemp;
@@ -545,7 +545,7 @@ IMPL_LINK(SwCreateAddressListDialog, DeleteHdl_Impl, PushButton*, EMPTYARG)
// if only one set is available then clear the data
String sTemp;
m_pCSVData->aDBData[0].assign(m_pCSVData->aDBData[0].size(), sTemp);
- m_aDeletePB.Enable(FALSE);
+ m_aDeletePB.Enable(sal_False);
}
m_pAddressControl->SetCurrentDataSet(nCurrent);
m_aSetNoNF.SetMax(m_pCSVData->aDBData.size());
@@ -629,7 +629,7 @@ IMPL_LINK(SwCreateAddressListDialog, OkHdl_Impl, PushButton*, EMPTYARG)
}
if(m_sURL.Len())
{
- SfxMedium aMedium( m_sURL, STREAM_READWRITE|STREAM_TRUNC, TRUE );
+ SfxMedium aMedium( m_sURL, STREAM_READWRITE|STREAM_TRUNC, sal_True );
SvStream* pStream = aMedium.GetOutStream();
pStream->SetLineDelimiter( LINEEND_LF );
pStream->SetStreamCharSet(RTL_TEXTENCODING_UTF8);
@@ -830,6 +830,6 @@ IMPL_LINK(SwFindEntryDialog, FindEnableHdl_Impl, Edit*, EMPTYARG)
-----------------------------------------------------------------------*/
IMPL_LINK(SwFindEntryDialog, CloseHdl_Impl, PushButton*, EMPTYARG)
{
- Show(FALSE);
+ Show(sal_False);
return 0;
}
diff --git a/sw/source/ui/dbui/customizeaddresslistdialog.cxx b/sw/source/ui/dbui/customizeaddresslistdialog.cxx
index e1787da26d..adc71a69f7 100644
--- a/sw/source/ui/dbui/customizeaddresslistdialog.cxx
+++ b/sw/source/ui/dbui/customizeaddresslistdialog.cxx
@@ -107,7 +107,7 @@ IMPL_LINK(SwCustomizeAddressListDialog, ListBoxSelectHdl_Impl, ListBox*, EMPTYAR
IMPL_LINK(SwCustomizeAddressListDialog, AddRenameHdl_Impl, PushButton*, pButton)
{
bool bRename = pButton == &m_aRenamePB;
- USHORT nPos = m_aFieldsLB.GetSelectEntryPos();
+ sal_uInt16 nPos = m_aFieldsLB.GetSelectEntryPos();
if(nPos == LISTBOX_ENTRY_NOTFOUND)
nPos = 0;
@@ -152,7 +152,7 @@ IMPL_LINK(SwCustomizeAddressListDialog, AddRenameHdl_Impl, PushButton*, pButton)
-----------------------------------------------------------------------*/
IMPL_LINK(SwCustomizeAddressListDialog, DeleteHdl_Impl, PushButton*, EMPTYARG)
{
- USHORT nPos = m_aFieldsLB.GetSelectEntryPos();
+ sal_uInt16 nPos = m_aFieldsLB.GetSelectEntryPos();
m_aFieldsLB.RemoveEntry(m_aFieldsLB.GetSelectEntryPos());
m_aFieldsLB.SelectEntryPos(nPos > m_aFieldsLB.GetEntryCount() - 1 ? nPos - 1 : nPos);
@@ -171,8 +171,8 @@ IMPL_LINK(SwCustomizeAddressListDialog, DeleteHdl_Impl, PushButton*, EMPTYARG)
-----------------------------------------------------------------------*/
IMPL_LINK(SwCustomizeAddressListDialog, UpDownHdl_Impl, PushButton*, pButton)
{
- USHORT nPos;
- USHORT nOldPos = nPos = m_aFieldsLB.GetSelectEntryPos();
+ sal_uInt16 nPos;
+ sal_uInt16 nOldPos = nPos = m_aFieldsLB.GetSelectEntryPos();
String aTemp = m_aFieldsLB.GetEntry(nPos);
m_aFieldsLB.RemoveEntry( nPos );
if(pButton == &m_aUpPB)
@@ -201,8 +201,8 @@ IMPL_LINK(SwCustomizeAddressListDialog, UpDownHdl_Impl, PushButton*, pButton)
-----------------------------------------------------------------------*/
void SwCustomizeAddressListDialog::UpdateButtons()
{
- USHORT nPos = m_aFieldsLB.GetSelectEntryPos();
- USHORT nEntries = m_aFieldsLB.GetEntryCount();
+ sal_uInt16 nPos = m_aFieldsLB.GetSelectEntryPos();
+ sal_uInt16 nEntries = m_aFieldsLB.GetEntryCount();
m_aUpPB.Enable(nPos > 0 && nEntries > 0);
m_aDownPB.Enable(nPos < nEntries -1);
m_aDeletePB.Enable(nEntries > 0);
@@ -255,7 +255,7 @@ SwAddRenameEntryDialog::~SwAddRenameEntryDialog()
IMPL_LINK(SwAddRenameEntryDialog, ModifyHdl_Impl, Edit*, pEdit)
{
::rtl::OUString sEntry = pEdit->GetText();
- BOOL bFound = sEntry.getLength() ? FALSE : TRUE;
+ sal_Bool bFound = sEntry.getLength() ? sal_False : sal_True;
if(!bFound)
{
@@ -265,7 +265,7 @@ IMPL_LINK(SwAddRenameEntryDialog, ModifyHdl_Impl, Edit*, pEdit)
++aHeaderIter)
if(*aHeaderIter == sEntry)
{
- bFound = TRUE;
+ bFound = sal_True;
break;
}
}
diff --git a/sw/source/ui/dbui/dbinsdlg.cxx b/sw/source/ui/dbui/dbinsdlg.cxx
index 42d4db33f0..a70d8b5226 100644
--- a/sw/source/ui/dbui/dbinsdlg.cxx
+++ b/sw/source/ui/dbui/dbinsdlg.cxx
@@ -136,7 +136,7 @@ struct _DB_Column
union {
String* pText;
SwField* pField;
- ULONG nFormat;
+ sal_uLong nFormat;
} DB_ColumnData;
const SwInsDBColumn* pColInfo;
@@ -154,7 +154,7 @@ struct _DB_Column
eColType = DB_FILLTEXT;
}
- _DB_Column( const SwInsDBColumn& rInfo, ULONG nFormat )
+ _DB_Column( const SwInsDBColumn& rInfo, sal_uLong nFormat )
{
pColInfo = &rInfo;
DB_ColumnData.nFormat = nFormat;
@@ -193,15 +193,15 @@ struct _DB_ColumnConfigData
{
SwInsDBColumns aDBColumns;
rtl::OUString sSource, sTable, sEdit, sTblList, sTmplNm, sTAutoFmtNm;
- BOOL bIsTable : 1,
+ sal_Bool bIsTable : 1,
bIsField : 1,
bIsHeadlineOn : 1,
bIsEmptyHeadln : 1;
_DB_ColumnConfigData()
{
- bIsTable = bIsHeadlineOn = TRUE;
- bIsField = bIsEmptyHeadln = FALSE;
+ bIsTable = bIsHeadlineOn = sal_True;
+ bIsField = bIsEmptyHeadln = sal_False;
}
~_DB_ColumnConfigData();
@@ -308,7 +308,7 @@ SwInsertDBColAutoPilot::SwInsertDBColAutoPilot( SwView& rView,
long nCount = aColNames.getLength();
for (long n = 0; n < nCount; n++)
{
- SwInsDBColumn* pNew = new SwInsDBColumn( pColNames[n], (USHORT)n );
+ SwInsDBColumn* pNew = new SwInsDBColumn( pColNames[n], (sal_uInt16)n );
Any aCol = xCols->getByName(pColNames[n]);
Reference <XPropertySet> xCol;
aCol >>= xCol;
@@ -332,7 +332,7 @@ SwInsertDBColAutoPilot::SwInsertDBColAutoPilot( SwView& rView,
case DataType::TIME:
case DataType::TIMESTAMP:
{
- pNew->bHasFmt = TRUE;
+ pNew->bHasFmt = sal_True;
Any aFormat = xCol->getPropertyValue(C2U("FormatKey"));
if(aFormat.hasValue())
{
@@ -397,16 +397,16 @@ SwInsertDBColAutoPilot::SwInsertDBColAutoPilot( SwView& rView,
// steht der Cursor in einer Tabelle, darf NIE Tabelle auswaehlbar sein
if( pView->GetWrtShell().GetTableFmt() )
{
- aRbAsTable.Enable( FALSE );
- aRbAsField.Check( TRUE );
- aRbDbFmtFromDb.Check( TRUE );
+ aRbAsTable.Enable( sal_False );
+ aRbAsField.Check( sal_True );
+ aRbDbFmtFromDb.Check( sal_True );
}
else
{
- aRbAsTable.Check( TRUE );
- aRbDbFmtFromDb.Check( TRUE );
- aIbDbcolOneFrom.Enable( FALSE );
- aIbDbcolAllFrom.Enable( FALSE );
+ aRbAsTable.Check( sal_True );
+ aRbDbFmtFromDb.Check( sal_True );
+ aIbDbcolOneFrom.Enable( sal_False );
+ aIbDbcolAllFrom.Enable( sal_False );
}
aRbAsTable.SetClickHdl( LINK(this, SwInsertDBColAutoPilot, PageHdl ));
@@ -438,7 +438,7 @@ SwInsertDBColAutoPilot::SwInsertDBColAutoPilot( SwView& rView,
aLbTblDbColumn.SetDoubleClickHdl( LINK( this, SwInsertDBColAutoPilot, DblClickHdl ));
aLbTableCol.SetDoubleClickHdl( LINK( this, SwInsertDBColAutoPilot, DblClickHdl ));
- for( USHORT n = 0; n < aDBColumns.Count(); ++n )
+ for( sal_uInt16 n = 0; n < aDBColumns.Count(); ++n )
{
const String& rS = aDBColumns[ n ]->sColumn;
aLbTblDbColumn.InsertEntry( rS, n );
@@ -469,7 +469,7 @@ SwInsertDBColAutoPilot::~SwInsertDBColAutoPilot()
---------------------------------------------------------------------------*/
IMPL_LINK( SwInsertDBColAutoPilot, PageHdl, Button*, pButton )
{
- BOOL bShowTbl = pButton == &aRbAsTable;
+ sal_Bool bShowTbl = pButton == &aRbAsTable;
String sTxt( pButton->GetText() );
aFlHead.SetText( MnemonicGenerator::EraseAllMnemonicChars( sTxt ) );
@@ -505,7 +505,7 @@ IMPL_LINK( SwInsertDBColAutoPilot, PageHdl, Button*, pButton )
---------------------------------------------------------------------------*/
IMPL_LINK( SwInsertDBColAutoPilot, DBFormatHdl, Button*, pButton )
{
- USHORT nFndPos;
+ sal_uInt16 nFndPos;
ListBox& rBox = aRbAsTable.IsChecked()
? ( 0 == aLbTableCol.GetEntryData( 0 )
? aLbTblDbColumn
@@ -515,7 +515,7 @@ IMPL_LINK( SwInsertDBColAutoPilot, DBFormatHdl, Button*, pButton )
SwInsDBColumn aSrch( rBox.GetSelectEntry(), 0 );
aDBColumns.Seek_Entry( &aSrch, &nFndPos );
- BOOL bFromDB = &aRbDbFmtFromDb == pButton;
+ sal_Bool bFromDB = &aRbDbFmtFromDb == pButton;
aDBColumns[ nFndPos ]->bIsDBFmt = bFromDB;
aLbDbFmtFromUsr.Enable( !bFromDB );
@@ -526,15 +526,15 @@ IMPL_LINK( SwInsertDBColAutoPilot, DBFormatHdl, Button*, pButton )
---------------------------------------------------------------------------*/
IMPL_LINK( SwInsertDBColAutoPilot, TblToFromHdl, Button*, pButton )
{
- BOOL bChgEnable = TRUE, bEnableTo = TRUE, bEnableFrom = TRUE;
- aLbTblDbColumn.SetUpdateMode( FALSE );
- aLbTableCol.SetUpdateMode( FALSE );
+ sal_Bool bChgEnable = sal_True, bEnableTo = sal_True, bEnableFrom = sal_True;
+ aLbTblDbColumn.SetUpdateMode( sal_False );
+ aLbTableCol.SetUpdateMode( sal_False );
if( pButton == &aIbDbcolAllTo )
{
- bEnableTo = FALSE;
+ bEnableTo = sal_False;
- USHORT n, nInsPos = aLbTableCol.GetSelectEntryPos(),
+ sal_uInt16 n, nInsPos = aLbTableCol.GetSelectEntryPos(),
nCnt = aLbTblDbColumn.GetEntryCount();
if( LISTBOX_APPEND == nInsPos )
for( n = 0; n < nCnt; ++n )
@@ -550,7 +550,7 @@ IMPL_LINK( SwInsertDBColAutoPilot, TblToFromHdl, Button*, pButton )
else if( pButton == &aIbDbcolOneTo &&
LISTBOX_ENTRY_NOTFOUND != aLbTblDbColumn.GetSelectEntryPos() )
{
- USHORT nInsPos = aLbTableCol.GetSelectEntryPos(),
+ sal_uInt16 nInsPos = aLbTableCol.GetSelectEntryPos(),
nDelPos = aLbTblDbColumn.GetSelectEntryPos(),
nTopPos = aLbTblDbColumn.GetTopEntry();
aLbTableCol.InsertEntry( aLbTblDbColumn.GetEntry( nDelPos ), nInsPos );
@@ -568,7 +568,7 @@ IMPL_LINK( SwInsertDBColAutoPilot, TblToFromHdl, Button*, pButton )
{
if( LISTBOX_ENTRY_NOTFOUND != aLbTableCol.GetSelectEntryPos() )
{
- USHORT nFndPos, nInsPos,
+ sal_uInt16 nFndPos, nInsPos,
nDelPos = aLbTableCol.GetSelectEntryPos(),
nTopPos = aLbTableCol.GetTopEntry();
@@ -605,24 +605,24 @@ IMPL_LINK( SwInsertDBColAutoPilot, TblToFromHdl, Button*, pButton )
}
else if( pButton == &aIbDbcolAllFrom )
{
- bEnableFrom = FALSE;
+ bEnableFrom = sal_False;
aLbTblDbColumn.Clear();
aLbTableCol.Clear();
- for( USHORT n = 0; n < aDBColumns.Count(); ++n )
+ for( sal_uInt16 n = 0; n < aDBColumns.Count(); ++n )
aLbTblDbColumn.InsertEntry( aDBColumns[ n ]->sColumn, n );
aLbTblDbColumn.SelectEntryPos( 0 );
}
else if( pButton == &aIbDbcolToEdit )
{
- bChgEnable = FALSE;
+ bChgEnable = sal_False;
// Daten ins Edit moven:
String aFld( aLbTxtDbColumn.GetSelectEntry() );
if( aFld.Len() )
{
String aStr( aEdDbText.GetText() );
- USHORT nPos = (USHORT)aEdDbText.GetSelection().Min();
- USHORT nSel = USHORT(aEdDbText.GetSelection().Max()) - nPos;
+ sal_uInt16 nPos = (sal_uInt16)aEdDbText.GetSelection().Min();
+ sal_uInt16 nSel = sal_uInt16(aEdDbText.GetSelection().Max()) - nPos;
if( nSel )
// dann loesche erstmal die bestehende Selektion
aStr.Erase( nPos, nSel );
@@ -659,14 +659,14 @@ IMPL_LINK( SwInsertDBColAutoPilot, TblToFromHdl, Button*, pButton )
aIbDbcolOneFrom.Enable( bEnableFrom );
aIbDbcolAllFrom.Enable( bEnableFrom );
- aRbDbFmtFromDb.Enable( FALSE );
- aRbDbFmtFromUsr.Enable( FALSE );
- aLbDbFmtFromUsr.Enable( FALSE );
+ aRbDbFmtFromDb.Enable( sal_False );
+ aRbDbFmtFromUsr.Enable( sal_False );
+ aLbDbFmtFromUsr.Enable( sal_False );
aPbTblFormat.Enable( bEnableFrom );
}
- aLbTblDbColumn.SetUpdateMode( TRUE );
- aLbTableCol.SetUpdateMode( TRUE );
+ aLbTblDbColumn.SetUpdateMode( sal_True );
+ aLbTableCol.SetUpdateMode( sal_True );
return 0;
}
@@ -694,10 +694,10 @@ IMPL_LINK( SwInsertDBColAutoPilot, DblClickHdl, ListBox*, pBox )
IMPL_LINK( SwInsertDBColAutoPilot, TblFmtHdl, PushButton*, pButton )
{
SwWrtShell& rSh = pView->GetWrtShell();
- BOOL bNewSet = FALSE;
+ sal_Bool bNewSet = sal_False;
if( !pTblSet )
{
- bNewSet = TRUE;
+ bNewSet = sal_True;
pTblSet = new SfxItemSet( rSh.GetAttrPool(), SwuiGetUITableAttrRange() );
//Ersteinmal die einfachen Attribute besorgen.
@@ -714,19 +714,19 @@ IMPL_LINK( SwInsertDBColAutoPilot, TblFmtHdl, PushButton*, pButton )
SvxBoxInfoItem aBoxInfo( SID_ATTR_BORDER_INNER );
// Tabellenvariante, wenn mehrere Tabellenzellen selektiert
- aBoxInfo.SetTable( TRUE );
+ aBoxInfo.SetTable( sal_True );
// Abstandsfeld immer anzeigen
- aBoxInfo.SetDist( TRUE);
+ aBoxInfo.SetDist( sal_True);
// Minimalgroesse in Tabellen und Absaetzen setzen
- aBoxInfo.SetMinDist( FALSE );
+ aBoxInfo.SetMinDist( sal_False );
// Default-Abstand immer setzen
aBoxInfo.SetDefDist( MIN_BORDER_DIST );
// Einzelne Linien koennen nur in Tabellen DontCare-Status haben
- aBoxInfo.SetValid( VALID_DISABLE, TRUE );
+ aBoxInfo.SetValid( VALID_DISABLE, sal_True );
pTblSet->Put( aBoxInfo );
SwGetCurColNumPara aPara;
- const USHORT nNum = rSh.GetCurColNum( &aPara );
+ const sal_uInt16 nNum = rSh.GetCurColNum( &aPara );
long nWidth;
if( nNum )
@@ -739,11 +739,11 @@ IMPL_LINK( SwInsertDBColAutoPilot, TblFmtHdl, PushButton*, pButton )
long nWidth1 = 0,
nStart1 = 0,
nEnd1 = nWidth;
- for( USHORT i = 0; i < nNum; ++i )
+ for( sal_uInt16 i = 0; i < nNum; ++i )
{
SwColumn* pCol = rCols[i];
nStart1 = pCol->GetLeft() + nWidth1;
- nWidth1 += (long)rCol.CalcColWidth( i, (USHORT)nWidth );
+ nWidth1 += (long)rCol.CalcColWidth( i, (sal_uInt16)nWidth );
nEnd1 = nWidth1 - pCol->GetRight();
}
if(nStart1 || nEnd1 != nWidth)
@@ -751,14 +751,14 @@ IMPL_LINK( SwInsertDBColAutoPilot, TblFmtHdl, PushButton*, pButton )
}
else
nWidth = rSh.GetAnyCurRect(
- FRMTYPE_FLY_ANY & rSh.GetFrmType( 0, TRUE )
+ FRMTYPE_FLY_ANY & rSh.GetFrmType( 0, sal_True )
? RECT_FLY_PRT_EMBEDDED
: RECT_PAGE_PRT ).Width();
SwTabCols aTabCols;
aTabCols.SetRight( nWidth );
aTabCols.SetRightMax( nWidth );
- pRep = new SwTableRep( aTabCols, FALSE );
+ pRep = new SwTableRep( aTabCols, sal_False );
pRep->SetAlign( text::HoriOrientation::NONE );
pRep->SetSpace( nWidth );
pRep->SetWidth( nWidth );
@@ -774,18 +774,18 @@ IMPL_LINK( SwInsertDBColAutoPilot, TblFmtHdl, PushButton*, pButton )
// Anzahl der Spalten hat sich geaendert: dann muessen die
// TabCols angepasst werden
long nWidth = pRep->GetWidth();
- USHORT nCols = aLbTableCol.GetEntryCount() - 1;
+ sal_uInt16 nCols = aLbTableCol.GetEntryCount() - 1;
SwTabCols aTabCols( nCols );
aTabCols.SetRight( nWidth );
aTabCols.SetRightMax( nWidth );
if( nCols )
- for( USHORT n = 0, nStep = (USHORT)(nWidth / (nCols+1)), nW = nStep;
+ for( sal_uInt16 n = 0, nStep = (sal_uInt16)(nWidth / (nCols+1)), nW = nStep;
n < nCols; ++n, nW = nW + nStep )
{
- aTabCols.Insert( nW, FALSE, n );
+ aTabCols.Insert( nW, sal_False, n );
}
delete pRep;
- pRep = new SwTableRep( aTabCols, FALSE );
+ pRep = new SwTableRep( aTabCols, sal_False );
pRep->SetAlign( text::HoriOrientation::NONE );
pRep->SetSpace( nWidth );
pRep->SetWidth( nWidth );
@@ -817,7 +817,7 @@ IMPL_LINK( SwInsertDBColAutoPilot, AutoFmtHdl, PushButton*, pButton )
SwAbstractDialogFactory* pFact = swui::GetFactory();
DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!");
- AbstractSwAutoFormatDlg* pDlg = pFact->CreateSwAutoFormatDlg(pButton, pView->GetWrtShellPtr(),DLG_AUTOFMT_TABLE, FALSE, pTAutoFmt);
+ AbstractSwAutoFormatDlg* pDlg = pFact->CreateSwAutoFormatDlg(pButton, pView->GetWrtShellPtr(),DLG_AUTOFMT_TABLE, sal_False, pTAutoFmt);
DBG_ASSERT(pDlg, "Dialogdiet fail!");
if( RET_OK == pDlg->Execute())
pDlg->FillAutoFmtOfIndex( pTAutoFmt );
@@ -837,7 +837,7 @@ IMPL_LINK( SwInsertDBColAutoPilot, SelectHdl, ListBox*, pBox )
: &aLbTxtDbColumn )
: pBox;
- USHORT nFndPos;
+ sal_uInt16 nFndPos;
SwInsDBColumn aSrch( pGetBox->GetSelectEntry(), 0 );
aDBColumns.Seek_Entry( &aSrch, &nFndPos );
@@ -856,13 +856,13 @@ IMPL_LINK( SwInsertDBColAutoPilot, SelectHdl, ListBox*, pBox )
String sTxt( aFlFormat.GetText().Copy( 0, nGBFmtLen ));
if( !aSrch.sColumn.getLength() )
{
- aRbDbFmtFromDb.Enable( FALSE );
- aRbDbFmtFromUsr.Enable( FALSE );
- aLbDbFmtFromUsr.Enable( FALSE );
+ aRbDbFmtFromDb.Enable( sal_False );
+ aRbDbFmtFromUsr.Enable( sal_False );
+ aLbDbFmtFromUsr.Enable( sal_False );
}
else
{
- BOOL bEnableFmt = aDBColumns[ nFndPos ]->bHasFmt;
+ sal_Bool bEnableFmt = aDBColumns[ nFndPos ]->bHasFmt;
aRbDbFmtFromDb.Enable( bEnableFmt );
aRbDbFmtFromUsr.Enable( bEnableFmt );
@@ -871,7 +871,7 @@ IMPL_LINK( SwInsertDBColAutoPilot, SelectHdl, ListBox*, pBox )
(( sTxt += C2S(" (" )) += String(aSrch.sColumn) ) += (sal_Unicode)')';
}
- BOOL bIsDBFmt = aDBColumns[ nFndPos ]->bIsDBFmt;
+ sal_Bool bIsDBFmt = aDBColumns[ nFndPos ]->bIsDBFmt;
aRbDbFmtFromDb.Check( bIsDBFmt );
aRbDbFmtFromUsr.Check( !bIsDBFmt );
aLbDbFmtFromUsr.Enable( !bIsDBFmt );
@@ -895,7 +895,7 @@ IMPL_LINK( SwInsertDBColAutoPilot, HeaderHdl, Button*, pButton )
{
if( pButton == &aCbTableHeadon )
{
- BOOL bEnable = aCbTableHeadon.IsChecked();
+ sal_Bool bEnable = aCbTableHeadon.IsChecked();
aRbHeadlColnms.Enable( bEnable );
aRbHeadlEmpty.Enable( bEnable );
@@ -908,7 +908,7 @@ IMPL_LINK( SwInsertDBColAutoPilot, HeaderHdl, Button*, pButton )
static void lcl_InsTextInArr( const String& rTxt, _DB_Columns& rColArr )
{
_DB_Column* pNew;
- USHORT nSttPos = 0, nFndPos;
+ sal_uInt16 nSttPos = 0, nFndPos;
while( STRING_NOTFOUND != ( nFndPos = rTxt.Search( '\x0A', nSttPos )) )
{
if( 1 < nFndPos )
@@ -929,16 +929,16 @@ static void lcl_InsTextInArr( const String& rTxt, _DB_Columns& rColArr )
/* ---------------------------------------------------------------------------
---------------------------------------------------------------------------*/
-BOOL SwInsertDBColAutoPilot::SplitTextToColArr( const String& rTxt,
+sal_Bool SwInsertDBColAutoPilot::SplitTextToColArr( const String& rTxt,
_DB_Columns& rColArr,
- BOOL bInsField )
+ sal_Bool bInsField )
{
// aus dem Text wieder die einzelnen Datenbank - Spalten erzeugen
// und dann in einem Array speichern
// Die Datenbankspalten stehen in <> und muessen im Array der Spalten
// vorhanden sein:
String sTxt( rTxt );
- USHORT nFndPos, nEndPos, nSttPos = 0;
+ sal_uInt16 nFndPos, nEndPos, nSttPos = 0;
while( STRING_NOTFOUND != ( nFndPos = sTxt.Search( cDBFldStart, nSttPos )))
{
@@ -964,8 +964,8 @@ BOOL SwInsertDBColAutoPilot::SplitTextToColArr( const String& rTxt,
sTxt.Erase( 0, (xub_StrLen)(rFndCol.sColumn.getLength() + 2) );
nSttPos = 0;
- USHORT nSubType = 0;
- ULONG nFormat;
+ sal_uInt16 nSubType = 0;
+ sal_uLong nFormat;
if( rFndCol.bHasFmt )
{
if( rFndCol.bIsDBFmt )
@@ -1016,7 +1016,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
SwWrtShell& rSh = pView->GetWrtShell();
//with the drag and drop interface no result set is initially available
- BOOL bDisposeResultSet = FALSE;
+ sal_Bool bDisposeResultSet = sal_False;
// we don't have a cursor, so we have to create our own RowSet
if ( !xResultSet.is() )
{
@@ -1029,11 +1029,11 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
return;
rSh.StartAllAction();
- BOOL bUndo = rSh.DoesUndo();
+ sal_Bool bUndo = rSh.DoesUndo();
if( bUndo )
rSh.StartUndo( UNDO_EMPTY );
- BOOL bAsTable = aRbAsTable.IsChecked();
+ sal_Bool bAsTable = aRbAsTable.IsChecked();
SvNumberFormatter& rNumFmtr = *rSh.GetNumberFormatter();
if( rSh.HasSelection() )
@@ -1047,22 +1047,22 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
do{ // middle checked loop!!
if( bAsTable ) // Daten als Tabelle einfuegen
{
- rSh.DoUndo( FALSE );
+ rSh.DoUndo( sal_False );
- USHORT n, nRows = 0, nCols = aLbTableCol.GetEntryCount();
+ sal_uInt16 n, nRows = 0, nCols = aLbTableCol.GetEntryCount();
if( aCbTableHeadon.IsChecked() )
nRows++;
if( pSelection )
- nRows = nRows + (USHORT)rSelection.getLength();
+ nRows = nRows + (sal_uInt16)rSelection.getLength();
else
++nRows;
// bereite das Array fuer die ausgewaehlten Spalten auf
- SwInsDBColumns_SAR aColFlds( 255 >= nCols ? (BYTE)nCols : 255, 5 );
+ SwInsDBColumns_SAR aColFlds( 255 >= nCols ? (sal_uInt8)nCols : 255, 5 );
for( n = 0; n < nCols; ++n )
{
- USHORT nFndPos;
+ sal_uInt16 nFndPos;
SwInsDBColumn aSrch( aLbTableCol.GetEntry( n ), 0 );
if( aDBColumns.Seek_Entry( &aSrch, &nFndPos ) )
aColFlds.Insert( aDBColumns[ nFndPos ], n );
@@ -1085,7 +1085,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
const SwModuleOptions* pModOpt = SW_MOD()->GetModuleConfig();
- BOOL bHTML = 0 != (::GetHtmlMode( pView->GetDocShell() ) & HTMLMODE_ON);
+ sal_Bool bHTML = 0 != (::GetHtmlMode( pView->GetDocShell() ) & HTMLMODE_ON);
rSh.InsertTable(
pModOpt->GetInsTblFlags(bHTML),
nRows, nCols, text::HoriOrientation::FULL, (pSelection ? pTAutoFmt : 0) );
@@ -1096,8 +1096,8 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
SfxItemSet aTblSet( rSh.GetAttrPool(), RES_BOXATR_FORMAT,
RES_BOXATR_VALUE );
- BOOL bIsAutoUpdateCells = rSh.IsAutoUpdateCells();
- rSh.SetAutoUpdateCells( FALSE );
+ sal_Bool bIsAutoUpdateCells = rSh.IsAutoUpdateCells();
+ rSh.SetAutoUpdateCells( sal_False );
if( aCbTableHeadon.IsChecked() )
@@ -1116,7 +1116,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
for( sal_Int32 i = 0 ; ; ++i )
{
- BOOL bBreak = FALSE;
+ sal_Bool bBreak = sal_False;
try
{
if(pSelection)
@@ -1130,7 +1130,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
}
catch(const Exception& )
{
- bBreak = TRUE;
+ bBreak = sal_True;
}
if(bBreak)
break;
@@ -1227,7 +1227,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
break;
if( 10 == i )
- pWait = ::std::auto_ptr<SwWait>(new SwWait( *pView->GetDocShell(), TRUE ));
+ pWait = ::std::auto_ptr<SwWait>(new SwWait( *pView->GetDocShell(), sal_True ));
}
rSh.MoveTable( GetfnTableCurr(), GetfnTableStart() );
@@ -1257,7 +1257,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
rSh.SwCrsrShell::Left(1,CRSR_SKIP_CHARS);
}
- rSh.DoUndo( FALSE );
+ rSh.DoUndo( sal_False );
SwTxtFmtColl* pColl = 0;
{
@@ -1267,7 +1267,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
pColl = rSh.FindTxtFmtCollByName( sTmplNm );
if( !pColl )
{
- USHORT nId = SwStyleNameMapper::GetPoolIdFromUIName( sTmplNm, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL );
+ sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName( sTmplNm, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL );
if( USHRT_MAX != nId )
pColl = rSh.GetTxtCollFromPool( nId );
else
@@ -1311,12 +1311,12 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
C2S("1"), aEmptyStr, aDBData );
- BOOL bSetCrsr = TRUE;
- USHORT n = 0, nCols = aColArr.Count();
+ sal_Bool bSetCrsr = sal_True;
+ sal_uInt16 n = 0, nCols = aColArr.Count();
::sw::mark::IMark* pMark = NULL;
for( sal_Int32 i = 0 ; ; ++i )
{
- BOOL bBreak = FALSE;
+ sal_Bool bBreak = sal_False;
try
{
if(pSelection)
@@ -1330,7 +1330,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
}
catch(Exception&)
{
- bBreak = TRUE;
+ bBreak = sal_True;
}
if(bBreak)
@@ -1384,7 +1384,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
if(aStandard != aCompare)
nValue += (aStandard - aCompare);
}
- pFld->ChgValue( nValue, TRUE );
+ pFld->ChgValue( nValue, sal_True );
}
pFld->SetInitialized();
@@ -1439,13 +1439,13 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
// rSh.SwCrsrShell::MovePara( fnParaCurr, fnParaEnd );
rSh.SwCrsrShell::MovePara(
GetfnParaCurr(), GetfnParaEnd() );
- bSetCrsr = FALSE;
+ bSetCrsr = sal_False;
}
}
if( !pSelection )
{
- BOOL bNext = xResultSet->next();
+ sal_Bool bNext = xResultSet->next();
if(!bNext)
break;
}
@@ -1459,7 +1459,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
rSh.SwEditShell::SplitNode();
if( 10 == i )
- pWait = ::std::auto_ptr<SwWait>(new SwWait( *pView->GetDocShell(), TRUE ));
+ pWait = ::std::auto_ptr<SwWait>(new SwWait( *pView->GetDocShell(), sal_True ));
}
if( !bSetCrsr && pMark != NULL)
@@ -1473,11 +1473,11 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
}
// write configuration
Commit();
- }while( FALSE ); // middle checked loop
+ }while( sal_False ); // middle checked loop
if( bUndo )
{
- rSh.DoUndo( TRUE );
+ rSh.DoUndo( sal_True );
rSh.AppendUndoForInsertFromDB( bAsTable );
rSh.EndUndo( UNDO_EMPTY );
}
@@ -1511,15 +1511,15 @@ void SwInsertDBColAutoPilot::SetTabSet()
{
// die Defaults wieder entfernen, es macht keinen Sinn sie zu setzen
SvxBrushItem aBrush( RES_BACKGROUND );
- static USHORT __READONLY_DATA aIds[3] =
+ static sal_uInt16 __READONLY_DATA aIds[3] =
{ RES_BACKGROUND, SID_ATTR_BRUSH_ROW, SID_ATTR_BRUSH_TABLE };
for( int i = 0; i < 3; ++i )
if( SFX_ITEM_SET == pTblSet->GetItemState( aIds[ i ],
- FALSE, &pItem ) && *pItem == aBrush )
+ sal_False, &pItem ) && *pItem == aBrush )
pTblSet->ClearItem( aIds[ i ] );
}
- if( SFX_ITEM_SET == pTblSet->GetItemState( FN_PARAM_TABLE_NAME, FALSE,
+ if( SFX_ITEM_SET == pTblSet->GetItemState( FN_PARAM_TABLE_NAME, sal_False,
&pItem ) && ((const SfxStringItem*)pItem)->GetValue() ==
rSh.GetTableFmt()->GetName() )
pTblSet->ClearItem( FN_PARAM_TABLE_NAME );
@@ -1672,7 +1672,7 @@ void SwInsertDBColAutoPilot::Commit()
pValues[3].Value <<= rtl::OUString(aEdDbText.GetText());
String sTmp;
- for( USHORT n = 0, nCnt = aLbTableCol.GetEntryCount(); n < nCnt; ++n )
+ for( sal_uInt16 n = 0, nCnt = aLbTableCol.GetEntryCount(); n < nCnt; ++n )
( sTmp += aLbTableCol.GetEntry( n ) ) += '\x0a';
if( sTmp.Len() )
@@ -1706,7 +1706,7 @@ void SwInsertDBColAutoPilot::Commit()
rtl::OUString sPrevLang;
SvNumberFormatter& rNFmtr = *pView->GetWrtShell().GetNumberFormatter();
- for(USHORT nCol = 0; nCol < aDBColumns.Count(); nCol++)
+ for(sal_uInt16 nCol = 0; nCol < aDBColumns.Count(); nCol++)
{
rtl::OUString sColumnNode = sNewNode;
SwInsDBColumn* pColumn = aDBColumns[nCol];
@@ -1817,7 +1817,7 @@ void SwInsertDBColAutoPilot::Load()
sal_Bool bFound = sal_False;
for(sal_Int32 nRealColumn = 0; nRealColumn < aDBColumns.Count(); nRealColumn++)
{
- if(aDBColumns[(USHORT)nRealColumn]->sColumn == sColumn)
+ if(aDBColumns[(sal_uInt16)nRealColumn]->sColumn == sColumn)
{
bFound = sal_True;
break;
@@ -1849,7 +1849,7 @@ void SwInsertDBColAutoPilot::Load()
pNewData->aDBColumns.Insert(pInsDBColumn);
}
- USHORT n = 0;
+ sal_uInt16 n = 0;
String sTmp( pNewData->sTblList );
if( sTmp.Len() )
{
@@ -1865,11 +1865,11 @@ void SwInsertDBColAutoPilot::Load()
if( !aLbTblDbColumn.GetEntryCount() )
{
- aIbDbcolAllTo.Enable( FALSE );
- aIbDbcolOneTo.Enable( FALSE );
+ aIbDbcolAllTo.Enable( sal_False );
+ aIbDbcolOneTo.Enable( sal_False );
}
- aIbDbcolOneFrom.Enable( TRUE );
- aIbDbcolAllFrom.Enable( TRUE );
+ aIbDbcolOneFrom.Enable( sal_True );
+ aIbDbcolAllFrom.Enable( sal_True );
}
aEdDbText.SetText( pNewData->sEdit );
@@ -1887,7 +1887,7 @@ void SwInsertDBColAutoPilot::Load()
// dann erstmal die AutoFmt-Datei laden und das Autoformat suchen
SwTableAutoFmtTbl aAutoFmtTbl;
aAutoFmtTbl.Load();
- for( USHORT nAutoFmt = aAutoFmtTbl.Count(); nAutoFmt; )
+ for( sal_uInt16 nAutoFmt = aAutoFmtTbl.Count(); nAutoFmt; )
if( sTmp == aAutoFmtTbl[ --nAutoFmt ]->GetName() )
{
pTAutoFmt = new SwTableAutoFmt( *aAutoFmtTbl[ nAutoFmt ] );
@@ -1909,14 +1909,14 @@ void SwInsertDBColAutoPilot::Load()
for( n = 0; n < aDBColumns.Count() ; ++n )
{
SwInsDBColumn& rSet = *aDBColumns[ n ];
- for( USHORT m = 0; m < pNewData->aDBColumns.Count() ; ++m )
+ for( sal_uInt16 m = 0; m < pNewData->aDBColumns.Count() ; ++m )
{
SwInsDBColumn& rGet = *pNewData->aDBColumns[ m ];
if(rGet.sColumn == rSet.sColumn)
{
if( rGet.bHasFmt && !rGet.bIsDBFmt )
{
- rSet.bIsDBFmt = FALSE;
+ rSet.bIsDBFmt = sal_False;
rSet.nUsrNumFmt = rNFmtr.GetEntryKey( rGet.sUsrNumFmt,
rGet.eUsrNumFmtLng );
if( NUMBERFORMAT_ENTRY_NOT_FOUND == rSet.nUsrNumFmt )
@@ -1936,7 +1936,7 @@ void SwInsertDBColAutoPilot::Load()
// steht der Cursor in einer Tabelle, darf NIE Tabelle auswaehlbar sein
if( !aRbAsTable.IsEnabled() && aRbAsTable.IsChecked() )
- aRbAsField.Check( TRUE );
+ aRbAsField.Check( sal_True );
delete pNewData;
break;
}
diff --git a/sw/source/ui/dbui/dbmgr.cxx b/sw/source/ui/dbui/dbmgr.cxx
index c93145a640..7b303d4850 100644
--- a/sw/source/ui/dbui/dbmgr.cxx
+++ b/sw/source/ui/dbui/dbmgr.cxx
@@ -277,9 +277,9 @@ void lcl_InitNumberFormatter(SwDSParam& rParam, uno::Reference<XDataSource> xSou
/* -----------------------------17.07.00 17:04--------------------------------
---------------------------------------------------------------------------*/
-BOOL lcl_MoveAbsolute(SwDSParam* pParam, long nAbsPos)
+sal_Bool lcl_MoveAbsolute(SwDSParam* pParam, long nAbsPos)
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
try
{
if(pParam->bScrollable)
@@ -299,7 +299,7 @@ BOOL lcl_MoveAbsolute(SwDSParam* pParam, long nAbsPos)
/* -----------------------------17.07.00 17:23--------------------------------
---------------------------------------------------------------------------*/
-BOOL lcl_GetColumnCnt(SwDSParam* pParam,
+sal_Bool lcl_GetColumnCnt(SwDSParam* pParam,
const String& rColumnName, long nLanguage, String& rResult, double* pNumber)
{
uno::Reference< XColumnsSupplier > xColsSupp( pParam->xResultSet, UNO_QUERY );
@@ -312,7 +312,7 @@ BOOL lcl_GetColumnCnt(SwDSParam* pParam,
{
}
if(!xCols.is() || !xCols->hasByName(rColumnName))
- return FALSE;
+ return sal_False;
Any aCol = xCols->getByName(rColumnName);
uno::Reference< XPropertySet > xColumnProps;
aCol >>= xColumnProps;
@@ -330,12 +330,12 @@ BOOL lcl_GetColumnCnt(SwDSParam* pParam,
MsLangId::convertLanguageToLocale( (LanguageType)nLanguage, aFormatData.aLocale );
rResult = SwNewDBMgr::GetDBField( xColumnProps, aFormatData, pNumber);
- return TRUE;
+ return sal_True;
};
/*--------------------------------------------------------------------
Beschreibung: Daten importieren
--------------------------------------------------------------------*/
-BOOL SwNewDBMgr::MergeNew(const SwMergeDescriptor& rMergeDesc )
+sal_Bool SwNewDBMgr::MergeNew(const SwMergeDescriptor& rMergeDesc )
{
SetMergeType( rMergeDesc.nMergeType );
@@ -360,11 +360,11 @@ BOOL SwNewDBMgr::MergeNew(const SwMergeDescriptor& rMergeDesc )
if(!aData.sDataSource.getLength() || !aData.sCommand.getLength() || !xResSet.is())
{
- return FALSE;
+ return sal_False;
}
pImpl->pMergeData = new SwDSParam(aData, xResSet, aSelection);
- SwDSParam* pTemp = FindDSData(aData, FALSE);
+ SwDSParam* pTemp = FindDSData(aData, sal_False);
if(pTemp)
*pTemp = *pImpl->pMergeData;
else
@@ -374,7 +374,7 @@ BOOL SwNewDBMgr::MergeNew(const SwMergeDescriptor& rMergeDesc )
//DSData and set the correct CommandType
SwDBData aTempData(aData);
aData.nCommandType = -1;
- pTemp = FindDSData(aData, FALSE);
+ pTemp = FindDSData(aData, sal_False);
if(pTemp)
*pTemp = *pImpl->pMergeData;
else
@@ -405,7 +405,7 @@ BOOL SwNewDBMgr::MergeNew(const SwMergeDescriptor& rMergeDesc )
pImpl->pMergeData->bEndOfDB = !pImpl->pMergeData->xResultSet->absolute( nPos );
pImpl->pMergeData->CheckEndOfDB();
if(pImpl->pMergeData->nSelectionIndex >= pImpl->pMergeData->aSelection.getLength())
- pImpl->pMergeData->bEndOfDB = TRUE;
+ pImpl->pMergeData->bEndOfDB = sal_True;
}
else
{
@@ -415,7 +415,7 @@ BOOL SwNewDBMgr::MergeNew(const SwMergeDescriptor& rMergeDesc )
}
catch(Exception&)
{
- pImpl->pMergeData->bEndOfDB = TRUE;
+ pImpl->pMergeData->bEndOfDB = sal_True;
pImpl->pMergeData->CheckEndOfDB();
DBG_ERROR("exception in MergeNew()");
}
@@ -425,7 +425,7 @@ BOOL SwNewDBMgr::MergeNew(const SwMergeDescriptor& rMergeDesc )
lcl_InitNumberFormatter(*pImpl->pMergeData, xSource);
rMergeDesc.rSh.ChgDBData(aData);
- bInMerge = TRUE;
+ bInMerge = sal_True;
if (IsInitDBFields())
{
@@ -439,10 +439,10 @@ BOOL SwNewDBMgr::MergeNew(const SwMergeDescriptor& rMergeDesc )
sDBName += DB_DELIM;
sDBName += String::CreateFromInt32(aInsertData.nCommandType);
rMergeDesc.rSh.ChangeDBFields( aDBNames, sDBName);
- SetInitDBFields(FALSE);
+ SetInitDBFields(sal_False);
}
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
switch(rMergeDesc.nMergeType)
{
case DBMGR_MERGE:
@@ -473,16 +473,16 @@ BOOL SwNewDBMgr::MergeNew(const SwMergeDescriptor& rMergeDesc )
--------------------------------------------------------------------*/
-BOOL SwNewDBMgr::Merge(SwWrtShell* pSh)
+sal_Bool SwNewDBMgr::Merge(SwWrtShell* pSh)
{
pSh->StartAllAction();
- pSh->ViewShell::UpdateFlds(TRUE);
+ pSh->ViewShell::UpdateFlds(sal_True);
pSh->SetModified();
pSh->EndAllAction();
- return TRUE;
+ return sal_True;
}
/*--------------------------------------------------------------------
@@ -495,8 +495,8 @@ void SwNewDBMgr::ImportFromConnection( SwWrtShell* pSh )
{
pSh->StartAllAction();
pSh->StartUndo(UNDO_EMPTY);
- BOOL bGroupUndo(pSh->DoesGroupUndo());
- pSh->DoGroupUndo(FALSE);
+ sal_Bool bGroupUndo(pSh->DoesGroupUndo());
+ pSh->DoGroupUndo(sal_False);
if( pSh->HasSelection() )
pSh->DelRight();
@@ -504,12 +504,12 @@ void SwNewDBMgr::ImportFromConnection( SwWrtShell* pSh )
SwWait *pWait = 0;
{
- ULONG i = 0;
+ sal_uLong i = 0;
do {
ImportDBEntry(pSh);
if( 10 == ++i )
- pWait = new SwWait( *pSh->GetView().GetDocShell(), TRUE);
+ pWait = new SwWait( *pSh->GetView().GetDocShell(), sal_True);
} while(ToNextMergeRecord());
}
@@ -525,10 +525,10 @@ void SwNewDBMgr::ImportFromConnection( SwWrtShell* pSh )
--------------------------------------------------*/
-String lcl_FindColumn(const String& sFormatStr,USHORT &nUsedPos, BYTE &nSeparator)
+String lcl_FindColumn(const String& sFormatStr,sal_uInt16 &nUsedPos, sal_uInt8 &nSeparator)
{
String sReturn;
- USHORT nLen = sFormatStr.Len();
+ sal_uInt16 nLen = sFormatStr.Len();
nSeparator = 0xff;
while(nUsedPos < nLen && nSeparator == 0xff)
{
@@ -566,13 +566,13 @@ void SwNewDBMgr::ImportDBEntry(SwWrtShell* pSh)
uno::Reference< XColumnsSupplier > xColsSupp( pImpl->pMergeData->xResultSet, UNO_QUERY );
uno::Reference<XNameAccess> xCols = xColsSupp->getColumns();
String sFormatStr;
- USHORT nFmtLen = sFormatStr.Len();
+ sal_uInt16 nFmtLen = sFormatStr.Len();
if( nFmtLen )
{
const char cSpace = ' ';
const char cTab = '\t';
- USHORT nUsedPos = 0;
- BYTE nSeparator;
+ sal_uInt16 nUsedPos = 0;
+ sal_uInt8 nSeparator;
String sColumn = lcl_FindColumn(sFormatStr, nUsedPos, nSeparator);
while( sColumn.Len() )
{
@@ -631,19 +631,20 @@ void SwNewDBMgr::ImportDBEntry(SwWrtShell* pSh)
/*--------------------------------------------------------------------
Beschreibung: Listbox mit Tabellenliste fuellen
--------------------------------------------------------------------*/
-BOOL SwNewDBMgr::GetTableNames(ListBox* pListBox, const String& rDBName)
+sal_Bool SwNewDBMgr::GetTableNames(ListBox* pListBox, const String& rDBName)
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
String sOldTableName(pListBox->GetSelectEntry());
pListBox->Clear();
- SwDSParam* pParam = FindDSConnection(rDBName, FALSE);
+ SwDSParam* pParam = FindDSConnection(rDBName, sal_False);
uno::Reference< XConnection> xConnection;
if(pParam && pParam->xConnection.is())
xConnection = pParam->xConnection;
else
{
rtl::OUString sDBName(rDBName);
- xConnection = RegisterConnection( sDBName );
+ if ( sDBName.getLength() )
+ xConnection = RegisterConnection( sDBName );
}
if(xConnection.is())
{
@@ -655,7 +656,7 @@ BOOL SwNewDBMgr::GetTableNames(ListBox* pListBox, const String& rDBName)
const rtl::OUString* pTbls = aTbls.getConstArray();
for(long i = 0; i < aTbls.getLength(); i++)
{
- USHORT nEntry = pListBox->InsertEntry(pTbls[i]);
+ sal_uInt16 nEntry = pListBox->InsertEntry(pTbls[i]);
pListBox->SetEntryData(nEntry, (void*)0);
}
}
@@ -667,13 +668,13 @@ BOOL SwNewDBMgr::GetTableNames(ListBox* pListBox, const String& rDBName)
const rtl::OUString* pQueries = aQueries.getConstArray();
for(long i = 0; i < aQueries.getLength(); i++)
{
- USHORT nEntry = pListBox->InsertEntry(pQueries[i]);
+ sal_uInt16 nEntry = pListBox->InsertEntry(pQueries[i]);
pListBox->SetEntryData(nEntry, (void*)1);
}
}
if (sOldTableName.Len())
pListBox->SelectEntry(sOldTableName);
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
}
@@ -681,8 +682,8 @@ BOOL SwNewDBMgr::GetTableNames(ListBox* pListBox, const String& rDBName)
/*--------------------------------------------------------------------
Beschreibung: Listbox mit Spaltennamen einer Datenbank fuellen
--------------------------------------------------------------------*/
-BOOL SwNewDBMgr::GetColumnNames(ListBox* pListBox,
- const String& rDBName, const String& rTableName, BOOL bAppend)
+sal_Bool SwNewDBMgr::GetColumnNames(ListBox* pListBox,
+ const String& rDBName, const String& rTableName, sal_Bool bAppend)
{
if (!bAppend)
pListBox->Clear();
@@ -690,7 +691,7 @@ BOOL SwNewDBMgr::GetColumnNames(ListBox* pListBox,
aData.sDataSource = rDBName;
aData.sCommand = rTableName;
aData.nCommandType = -1;
- SwDSParam* pParam = FindDSData(aData, FALSE);
+ SwDSParam* pParam = FindDSData(aData, sal_False);
uno::Reference< XConnection> xConnection;
if(pParam && pParam->xConnection.is())
xConnection = pParam->xConnection;
@@ -711,14 +712,14 @@ BOOL SwNewDBMgr::GetColumnNames(ListBox* pListBox,
}
::comphelper::disposeComponent( xColsSupp );
}
- return(TRUE);
+ return(sal_True);
}
/* -----------------------------08.06.01 15:11--------------------------------
---------------------------------------------------------------------------*/
-BOOL SwNewDBMgr::GetColumnNames(ListBox* pListBox,
+sal_Bool SwNewDBMgr::GetColumnNames(ListBox* pListBox,
uno::Reference< XConnection> xConnection,
- const String& rTableName, BOOL bAppend)
+ const String& rTableName, sal_Bool bAppend)
{
if (!bAppend)
pListBox->Clear();
@@ -734,7 +735,7 @@ BOOL SwNewDBMgr::GetColumnNames(ListBox* pListBox,
}
::comphelper::disposeComponent( xColsSupp );
}
- return(TRUE);
+ return(sal_True);
}
/*--------------------------------------------------------------------
@@ -743,10 +744,10 @@ BOOL SwNewDBMgr::GetColumnNames(ListBox* pListBox,
SwNewDBMgr::SwNewDBMgr() :
nMergeType(DBMGR_INSERT),
- bInitDBFields(FALSE),
- bInMerge(FALSE),
- bMergeSilent(FALSE),
- bMergeLock(FALSE),
+ bInitDBFields(sal_False),
+ bInMerge(sal_False),
+ bMergeSilent(sal_False),
+ bMergeLock(sal_False),
pImpl(new SwNewDBMgr_Impl(*this)),
pMergeEvtSrc(NULL)
{
@@ -756,7 +757,7 @@ SwNewDBMgr::SwNewDBMgr() :
---------------------------------------------------------------------------*/
SwNewDBMgr::~SwNewDBMgr()
{
- for(USHORT nPos = 0; nPos < aDataSourceParams.Count(); nPos++)
+ for(sal_uInt16 nPos = 0; nPos < aDataSourceParams.Count(); nPos++)
{
SwDSParam* pParam = aDataSourceParams[nPos];
if(pParam->xConnection.is())
@@ -779,7 +780,7 @@ SwNewDBMgr::~SwNewDBMgr()
/*--------------------------------------------------------------------
Beschreibung: Serienbriefe als einzelne Dokumente speichern
--------------------------------------------------------------------*/
-String lcl_FindUniqueName(SwWrtShell* pTargetShell, const String& rStartingPageDesc, ULONG nDocNo )
+String lcl_FindUniqueName(SwWrtShell* pTargetShell, const String& rStartingPageDesc, sal_uLong nDocNo )
{
do
{
@@ -792,7 +793,7 @@ String lcl_FindUniqueName(SwWrtShell* pTargetShell, const String& rStartingPageD
}
void lcl_CopyDynamicDefaults( const SwDoc& rSource, SwDoc& rTarget )
{
- USHORT __FAR_DATA aRangeOfDefaults[] = {
+ sal_uInt16 __FAR_DATA aRangeOfDefaults[] = {
RES_FRMATR_BEGIN, RES_FRMATR_END-1,
RES_CHRATR_BEGIN, RES_CHRATR_END-1,
RES_PARATR_BEGIN, RES_PARATR_END-1,
@@ -805,8 +806,8 @@ void lcl_CopyDynamicDefaults( const SwDoc& rSource, SwDoc& rTarget )
SfxItemSet aNewDefaults( rTarget.GetAttrPool(), aRangeOfDefaults );
- USHORT nWhich;
- USHORT nRange = 0;
+ sal_uInt16 nWhich;
+ sal_uInt16 nRange = 0;
while( aRangeOfDefaults[nRange] != 0)
{
for( nWhich = aRangeOfDefaults[nRange]; nWhich < aRangeOfDefaults[nRange + 1]; ++nWhich )
@@ -824,7 +825,7 @@ void lcl_CopyFollowPageDesc(
SwWrtShell& rTargetShell,
const SwPageDesc& rSourcePageDesc,
const SwPageDesc& rTargetPageDesc,
- const ULONG nDocNo )
+ const sal_uLong nDocNo )
{
//now copy the follow page desc, too
const SwPageDesc* pFollowPageDesc = rSourcePageDesc.GetFollow();
@@ -846,8 +847,8 @@ void lcl_CopyFollowPageDesc(
void lcl_RemoveSectionLinks( SwWrtShell& rWorkShell )
{
//reset all links of the sections of synchronized labels
- USHORT nSections = rWorkShell.GetSectionFmtCount();
- for( USHORT nSection = 0; nSection < nSections; ++nSection )
+ sal_uInt16 nSections = rWorkShell.GetSectionFmtCount();
+ for( sal_uInt16 nSection = 0; nSection < nSections; ++nSection )
{
SwSectionData aSectionData( *rWorkShell.GetSectionFmt( nSection ).GetSection() );
if( aSectionData.GetType() == FILE_LINK_SECTION )
@@ -860,13 +861,13 @@ void lcl_RemoveSectionLinks( SwWrtShell& rWorkShell )
rWorkShell.SetLabelDoc( sal_False );
}
-BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
+sal_Bool SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
const SwMergeDescriptor& rMergeDescriptor)
{
//check if the doc is synchronized and contains at least one linked section
- BOOL bSynchronizedDoc = pSourceShell->IsLabelDoc() && pSourceShell->GetSectionFmtCount() > 1;
- BOOL bLoop = TRUE;
- BOOL bEMail = rMergeDescriptor.nMergeType == DBMGR_MERGE_MAILING;
+ sal_Bool bSynchronizedDoc = pSourceShell->IsLabelDoc() && pSourceShell->GetSectionFmtCount() > 1;
+ sal_Bool bLoop = sal_True;
+ sal_Bool bEMail = rMergeDescriptor.nMergeType == DBMGR_MERGE_MAILING;
const bool bAsSingleFile = rMergeDescriptor.nMergeType == DBMGR_MERGE_SINGLE_FILE;
::rtl::Reference< MailDispatcher > xMailDispatcher;
@@ -891,14 +892,14 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
uno::Reference< XPropertySet > xColumnProp;
{
- BOOL bColumnName = sEMailAddrFld.Len() > 0;
+ sal_Bool bColumnName = sEMailAddrFld.Len() > 0;
if (bColumnName)
{
uno::Reference< XColumnsSupplier > xColsSupp( pImpl->pMergeData->xResultSet, UNO_QUERY );
uno::Reference<XNameAccess> xCols = xColsSupp->getColumns();
if(!xCols->hasByName(sEMailAddrFld))
- return FALSE;
+ return sal_False;
Any aCol = xCols->getByName(sEMailAddrFld);
aCol >>= xColumnProp;
}
@@ -934,7 +935,7 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
pStoreToFilterOptions = &rMergeDescriptor.sSaveToFilterOptions;
}
}
- bCancel = FALSE;
+ bCancel = sal_False;
// in case of creating a single resulting file this has to be created here
SwWrtShell* pTargetShell = 0;
@@ -947,7 +948,7 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
std::auto_ptr< utl::TempFile > aTempFile;
String sModifiedStartingPageDesc;
String sStartingPageDesc;
- USHORT nStartingPageNo = 0;
+ sal_uInt16 nStartingPageNo = 0;
bool bPageStylesWithHeaderFooter = false;
if(bAsSingleFile || rMergeDescriptor.bCreateSingleFile)
{
@@ -971,7 +972,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();
@@ -1001,10 +1002,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
@@ -1050,8 +1051,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
{
@@ -1063,13 +1064,13 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
aPrtMonDlg.aPrintInfo.SetText(sStat);
// Rechenzeit fuer Save-Monitor:
- for (USHORT i = 0; i < 10; i++)
+ for (sal_uInt16 i = 0; i < 10; i++)
Application::Reschedule();
// 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, TRUE );
+ SfxMedium* pWorkMed = new SfxMedium( sSourceDocumentURL, STREAM_STD_READ, sal_True );
pWorkMed->SetFilter( pSfxFlt );
if (xWorkDocSh->DoLoad(pWorkMed))
@@ -1111,10 +1112,10 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
}
// insert the document into the target document
- rWorkShell.SttEndDoc(FALSE);
- rWorkShell.SttEndDoc(TRUE);
+ rWorkShell.SttEndDoc(sal_False);
+ rWorkShell.SttEndDoc(sal_True);
rWorkShell.SelAll();
- pTargetShell->SwCrsrShell::SttEndDoc( FALSE );
+ pTargetShell->SwCrsrShell::SttEndDoc( sal_False );
//#i72517# the headers and footers are still those from the source - update in case of fields inside header/footer
if( !nDocNo && bPageStylesWithHeaderFooter )
pTargetShell->GetView().GetDocShell()->_LoadStyles( *rWorkShell.GetView().GetDocShell(), sal_True );
@@ -1168,7 +1169,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())
{
@@ -1188,8 +1189,8 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
{
// error message ??
ErrorHandler::HandleError( xWorkDocSh->GetError() );
- bCancel = TRUE;
- bLoop = FALSE;
+ bCancel = sal_True;
+ bLoop = sal_False;
}
if( bEMail )
{
@@ -1226,7 +1227,7 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
{
{
//read in the temporary file and use it as mail body
- SfxMedium aMedium( sFileURL, STREAM_READ, TRUE);
+ SfxMedium aMedium( sFileURL, STREAM_READ, sal_True);
SvStream* pInStream = aMedium.GetInStream();
DBG_ASSERT(pInStream, "no output file created?");
if(pInStream)
@@ -1280,7 +1281,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)
@@ -1291,7 +1292,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())
{
@@ -1307,7 +1308,7 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
{
// error message ??
ErrorHandler::HandleError( xTargetDocShell->GetError() );
- bLoop = FALSE;
+ bLoop = sal_False;
}
}
else if( pTargetView ) // must be available!
@@ -1334,7 +1335,7 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
aOptions.realloc( nOpts + 1 );
aOptions[ nOpts ].Name = rtl::OUString::createFromAscii( "Wait" );
aOptions[ nOpts ].Value <<= sal_True ;
-// aPrintArgs.Put(SfxBoolItem(FN_QRY_MERGE, TRUE) );
+// aPrintArgs.Put(SfxBoolItem(FN_QRY_MERGE, sal_True) );
// // #i52629# aynchronous printing should only be done in silent mode - otherwise
// // the printer dialog does not come up
// aPrintArgs.Put( SfxBoolItem( SID_ASYNCHRON, rMergeDescriptor.bPrintAsync ));
@@ -1376,7 +1377,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);
}
@@ -1403,7 +1404,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 )
@@ -1414,13 +1415,13 @@ IMPL_LINK_INLINE_END( SwNewDBMgr, PrtCancelHdl, Button *, pButton )
den uebergebenen Formatter uebertragen
--------------------------------------------------------------------*/
-ULONG SwNewDBMgr::GetColumnFmt( const String& rDBName,
+sal_uLong SwNewDBMgr::GetColumnFmt( const String& rDBName,
const String& rTableName,
const String& rColNm,
SvNumberFormatter* pNFmtr,
long nLanguage )
{
- ULONG nRet = 0;
+ sal_uLong nRet = 0;
if(pNFmtr)
{
uno::Reference< XDataSource> xSource;
@@ -1442,7 +1443,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;
@@ -1496,14 +1497,14 @@ ULONG SwNewDBMgr::GetColumnFmt( const String& rDBName,
/* -----------------------------07.06.01 15:43--------------------------------
---------------------------------------------------------------------------*/
-ULONG SwNewDBMgr::GetColumnFmt( uno::Reference< XDataSource> xSource,
+sal_uLong SwNewDBMgr::GetColumnFmt( uno::Reference< XDataSource> xSource,
uno::Reference< XConnection> xConnection,
uno::Reference< XPropertySet> xColumn,
SvNumberFormatter* pNFmtr,
long nLanguage )
{
//JP 12.01.99: ggfs. das NumberFormat im Doc setzen
- ULONG nRet = 0;
+ sal_uLong nRet = 0;
if(!xSource.is())
{
@@ -1590,7 +1591,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;
@@ -1654,7 +1655,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
@@ -1750,7 +1751,7 @@ String SwNewDBMgr::GetDBField(uno::Reference<XPropertySet> xColumnProps,
try
{
SwDbtoolsClient& aClient = SwNewDBMgr::GetDbtoolsClient();
- sRet = aClient.getValue(
+ sRet = aClient.getFormattedValue(
xColumnProps,
rDBFormatData.xFormatter,
rDBFormatData.aLocale,
@@ -1800,14 +1801,14 @@ String SwNewDBMgr::GetDBField(uno::Reference<XPropertySet> xColumnProps,
void SwNewDBMgr::EndMerge()
{
DBG_ASSERT(bInMerge, "merge is not active");
- bInMerge = FALSE;
+ bInMerge = sal_False;
delete pImpl->pMergeData;
pImpl->pMergeData = 0;
}
/* -----------------------------06.07.00 14:28--------------------------------
checks if a desired data source table or query is open
---------------------------------------------------------------------------*/
-BOOL SwNewDBMgr::IsDataSourceOpen(const String& rDataSource,
+sal_Bool SwNewDBMgr::IsDataSourceOpen(const String& rDataSource,
const String& rTableOrQuery, sal_Bool bMergeOnly)
{
if(pImpl->pMergeData)
@@ -1825,7 +1826,7 @@ BOOL SwNewDBMgr::IsDataSourceOpen(const String& rDataSource,
aData.sDataSource = rDataSource;
aData.sCommand = rTableOrQuery;
aData.nCommandType = -1;
- SwDSParam* pFound = FindDSData(aData, FALSE);
+ SwDSParam* pFound = FindDSData(aData, sal_False);
return (pFound && pFound->xResultSet.is());
}
return sal_False;
@@ -1833,12 +1834,12 @@ BOOL SwNewDBMgr::IsDataSourceOpen(const String& rDataSource,
/* -----------------------------17.07.00 16:44--------------------------------
read column data a a specified position
---------------------------------------------------------------------------*/
-BOOL SwNewDBMgr::GetColumnCnt(const String& rSourceName, const String& rTableName,
+sal_Bool SwNewDBMgr::GetColumnCnt(const String& rSourceName, const String& rTableName,
const String& rColumnName, sal_uInt32 nAbsRecordId,
long nLanguage,
String& rResult, double* pNumber)
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
SwDSParam* pFound = 0;
//check if it's the merge data source
if(pImpl->pMergeData &&
@@ -1853,7 +1854,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())
@@ -1869,7 +1870,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)
{
@@ -1880,10 +1881,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)
@@ -1898,22 +1899,22 @@ BOOL SwNewDBMgr::GetColumnCnt(const String& rSourceName, const String& rTableNam
/* -----------------------------06.07.00 16:47--------------------------------
reads the column data at the current position
---------------------------------------------------------------------------*/
-BOOL SwNewDBMgr::GetMergeColumnCnt(const String& rColumnName, USHORT nLanguage,
+sal_Bool SwNewDBMgr::GetMergeColumnCnt(const String& rColumnName, sal_uInt16 nLanguage,
String &rResult, double *pNumber, sal_uInt32 * /*pFormat*/)
{
if(!pImpl->pMergeData || !pImpl->pMergeData->xResultSet.is() || pImpl->pMergeData->bAfterSelection )
{
rResult.Erase();
- return FALSE;
+ return sal_False;
}
- BOOL bRet = lcl_GetColumnCnt(pImpl->pMergeData, rColumnName, nLanguage, rResult, pNumber);
+ sal_Bool bRet = lcl_GetColumnCnt(pImpl->pMergeData, rColumnName, nLanguage, rResult, pNumber);
return bRet;
}
/* -----------------------------07.07.00 14:28--------------------------------
---------------------------------------------------------------------------*/
-BOOL SwNewDBMgr::ToNextMergeRecord()
+sal_Bool SwNewDBMgr::ToNextMergeRecord()
{
DBG_ASSERT(pImpl->pMergeData && pImpl->pMergeData->xResultSet.is(), "no data source in merge");
return ToNextRecord(pImpl->pMergeData);
@@ -1921,7 +1922,7 @@ BOOL SwNewDBMgr::ToNextMergeRecord()
/* -----------------------------10.07.01 14:28--------------------------------
---------------------------------------------------------------------------*/
-BOOL SwNewDBMgr::ToNextRecord(
+sal_Bool SwNewDBMgr::ToNextRecord(
const String& rDataSource, const String& rCommand, sal_Int32 /*nCommandType*/)
{
SwDSParam* pFound = 0;
@@ -1935,22 +1936,22 @@ BOOL SwNewDBMgr::ToNextRecord(
aData.sDataSource = rDataSource;
aData.sCommand = rCommand;
aData.nCommandType = -1;
- pFound = FindDSData(aData, FALSE);
+ pFound = FindDSData(aData, sal_False);
}
return ToNextRecord(pFound);
}
/* -----------------------------10.07.01 14:38--------------------------------
---------------------------------------------------------------------------*/
-BOOL SwNewDBMgr::ToNextRecord(SwDSParam* pParam)
+sal_Bool SwNewDBMgr::ToNextRecord(SwDSParam* pParam)
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
if(!pParam || !pParam->xResultSet.is() || pParam->bEndOfDB ||
(pParam->aSelection.getLength() && pParam->aSelection.getLength() <= pParam->nSelectionIndex))
{
if(pParam)
pParam->CheckEndOfDB();
- return FALSE;
+ return sal_False;
}
try
{
@@ -1962,7 +1963,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
{
@@ -1990,7 +1991,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;
}
@@ -2002,7 +2003,7 @@ sal_uInt32 SwNewDBMgr::GetSelectedRecordId()
sal_uInt32 nRet = 0;
DBG_ASSERT(pImpl->pMergeData && pImpl->pMergeData->xResultSet.is(), "no data source in merge");
if(!pImpl->pMergeData || !pImpl->pMergeData->xResultSet.is())
- return FALSE;
+ return sal_False;
try
{
nRet = pImpl->pMergeData->xResultSet->getRow();
@@ -2019,8 +2020,8 @@ sal_Bool SwNewDBMgr::ToRecordId(sal_Int32 nSet)
{
DBG_ASSERT(pImpl->pMergeData && pImpl->pMergeData->xResultSet.is(), "no data source in merge");
if(!pImpl->pMergeData || !pImpl->pMergeData->xResultSet.is()|| nSet < 0)
- return FALSE;
- sal_Bool bRet = FALSE;
+ return sal_False;
+ sal_Bool bRet = sal_False;
sal_Int32 nAbsPos = nSet;
if(nAbsPos >= 0)
@@ -2035,7 +2036,7 @@ sal_Bool SwNewDBMgr::ToRecordId(sal_Int32 nSet)
/* -----------------------------17.07.00 14:17--------------------------------
---------------------------------------------------------------------------*/
-BOOL SwNewDBMgr::OpenDataSource(const String& rDataSource, const String& rTableOrQuery,
+sal_Bool SwNewDBMgr::OpenDataSource(const String& rDataSource, const String& rTableOrQuery,
sal_Int32 nCommandType, bool bCreate)
{
SwDBData aData;
@@ -2043,11 +2044,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;
@@ -2069,7 +2070,7 @@ BOOL SwNewDBMgr::OpenDataSource(const String& rDataSource, const String& rTableO
catch(Exception&)
{
//#98373# DB driver may not be ODBC 3.0 compliant
- pFound->bScrollable = TRUE;
+ pFound->bScrollable = sal_True;
}
pFound->xStatement = pFound->xConnection->createStatement();
rtl::OUString aQuoteChar = xMetaData->getIdentifierQuoteString();
@@ -2100,7 +2101,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())
{
@@ -2136,7 +2137,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
@@ -2161,11 +2162,11 @@ sal_uInt32 SwNewDBMgr::GetSelectedRecordId(
/* -----------------------------17.07.00 14:18--------------------------------
close all data sources - after fields were updated
---------------------------------------------------------------------------*/
-void SwNewDBMgr::CloseAll(BOOL bIncludingMerge)
+void SwNewDBMgr::CloseAll(sal_Bool bIncludingMerge)
{
//the only thing done here is to reset the selection index
//all connections stay open
- for(USHORT nPos = 0; nPos < aDataSourceParams.Count(); nPos++)
+ for(sal_uInt16 nPos = 0; nPos < aDataSourceParams.Count(); nPos++)
{
SwDSParam* pParam = aDataSourceParams[nPos];
if(bIncludingMerge || pParam != pImpl->pMergeData)
@@ -2186,7 +2187,7 @@ void SwNewDBMgr::CloseAll(BOOL bIncludingMerge)
/* -----------------------------17.07.00 14:54--------------------------------
---------------------------------------------------------------------------*/
-SwDSParam* SwNewDBMgr::FindDSData(const SwDBData& rData, BOOL bCreate)
+SwDSParam* SwNewDBMgr::FindDSData(const SwDBData& rData, sal_Bool bCreate)
{
//prefer merge data if available
if(pImpl->pMergeData && rData.sDataSource == pImpl->pMergeData->sDataSource &&
@@ -2198,7 +2199,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 &&
@@ -2238,7 +2239,7 @@ SwDSParam* SwNewDBMgr::FindDSData(const SwDBData& rData, BOOL bCreate)
---------------------------------------------------------------------------*/
-SwDSParam* SwNewDBMgr::FindDSConnection(const rtl::OUString& rDataSource, BOOL bCreate)
+SwDSParam* SwNewDBMgr::FindDSConnection(const rtl::OUString& rDataSource, sal_Bool bCreate)
{
//prefer merge data if available
if(pImpl->pMergeData && rDataSource == pImpl->pMergeData->sDataSource )
@@ -2246,7 +2247,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)
@@ -2497,7 +2498,7 @@ String SwNewDBMgr::LoadAndRegisterDataSource()
---------------------------------------------------------------------------*/
void SwNewDBMgr::ExecuteFormLetter( SwWrtShell& rSh,
const Sequence<PropertyValue>& rProperties,
- BOOL bWithDataSourceBrowser)
+ sal_Bool bWithDataSourceBrowser)
{
//prevent second call
if(pImpl->pMergeDialog)
@@ -2529,7 +2530,7 @@ void SwNewDBMgr::ExecuteFormLetter( SwWrtShell& rSh,
if(!xConnection.is())
{
xConnection = SwNewDBMgr::RegisterConnection(sDataSource);
- pFound = FindDSConnection(sDataSource, TRUE);
+ pFound = FindDSConnection(sDataSource, sal_True);
}
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
DBG_ASSERT(pFact, "Dialogdiet fail!");
@@ -2583,7 +2584,7 @@ void SwNewDBMgr::ExecuteFormLetter( SwWrtShell& rSh,
// 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, TRUE );
+ SfxMedium* pWorkMed = new SfxMedium( sTempURL, STREAM_STD_READ, sal_True );
pWorkMed->SetFilter( pSfxFlt );
if( xWorkDocSh->DoLoad(pWorkMed) )
{
@@ -2628,7 +2629,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)
@@ -2660,7 +2661,7 @@ void SwNewDBMgr::InsertText(SwWrtShell& rSh,
rtl::OUString sDataSource, sDataTableOrQuery;
uno::Reference<XResultSet> xResSet;
Sequence<Any> aSelection;
- BOOL bHasSelectionProperty = FALSE;
+ sal_Bool bHasSelectionProperty = sal_False;
sal_Int32 nSelectionPos = 0;
sal_Int16 nCmdType = CommandType::TABLE;
const PropertyValue* pValues = rProperties.getConstArray();
@@ -2675,7 +2676,7 @@ void SwNewDBMgr::InsertText(SwWrtShell& rSh,
pValues[nPos].Value >>= xResSet;
else if(pValues[nPos].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(cSelection)))
{
- bHasSelectionProperty = TRUE;
+ bHasSelectionProperty = sal_True;
nSelectionPos = nPos;
pValues[nPos].Value >>= aSelection;
}
@@ -2821,7 +2822,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());
@@ -2835,7 +2836,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
{
@@ -2845,13 +2846,13 @@ sal_Int32 SwNewDBMgr::MergeDocuments( SwMailMergeConfigItem& rMMConfig,
}
catch(Exception&)
{
- pImpl->pMergeData->bEndOfDB = TRUE;
+ pImpl->pMergeData->bEndOfDB = sal_True;
pImpl->pMergeData->CheckEndOfDB();
DBG_ERROR("exception in MergeNew()");
}
//bCancel is set from the PrintMonitor
- bCancel = FALSE;
+ bCancel = sal_False;
CreateMonitor aMonitorDlg(&rSourceView.GetEditWin());
aMonitorDlg.SetCancelHdl(LINK(this, SwNewDBMgr, PrtCancelHdl));
@@ -2861,15 +2862,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();
@@ -2906,7 +2907,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 );
@@ -2920,7 +2921,7 @@ sal_Int32 SwNewDBMgr::MergeDocuments( SwMailMergeConfigItem& rMMConfig,
aMonitorDlg.Invalidate();
aMonitorDlg.Update();
// the print monitor needs some time to act
- for( USHORT i = 0; i < 25; i++)
+ for( sal_uInt16 i = 0; i < 25; i++)
Application::Reschedule();
}
@@ -2948,8 +2949,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
@@ -2969,10 +2976,10 @@ sal_Int32 SwNewDBMgr::MergeDocuments( SwMailMergeConfigItem& rMMConfig,
}
// insert the document into the target document
- rWorkShell.SttEndDoc(FALSE);
- rWorkShell.SttEndDoc(TRUE);
+ rWorkShell.SttEndDoc(sal_False);
+ rWorkShell.SttEndDoc(sal_True);
rWorkShell.SelAll();
- pTargetShell->SttEndDoc(FALSE);
+ pTargetShell->SttEndDoc(sal_False);
//#i63806# put the styles to the target document
//if the source uses headers or footers each new copy need to copy a new page styles
@@ -3006,7 +3013,7 @@ sal_Int32 SwNewDBMgr::MergeDocuments( SwMailMergeConfigItem& rMMConfig,
{
pTargetShell->SetPageStyle(sModifiedStartingPageDesc);
}
- USHORT nPageCountBefore = pTargetShell->GetPageCnt();
+ sal_uInt16 nPageCountBefore = pTargetShell->GetPageCnt();
DBG_ASSERT(!pTargetShell->GetTableFmt(),"target document ends with a table - paragraph should be appended");
//#i51359# add a second paragraph in case there's only one
{
@@ -3037,7 +3044,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
@@ -3068,7 +3075,7 @@ sal_Int32 SwNewDBMgr::MergeDocuments( SwMailMergeConfigItem& rMMConfig,
DBG_ERROR("exception caught in SwNewDBMgr::MergeDocuments");
}
DELETEZ(pImpl->pMergeData);
- bInMerge = FALSE;
+ bInMerge = sal_False;
return nRet;
}
/* -----------------09.12.2002 12:38-----------------
@@ -3090,7 +3097,7 @@ void SwConnectionDisposedListener_Impl::disposing( const EventObject& rSource )
{
::vos::OGuard aGuard(Application::GetSolarMutex());
uno::Reference<XConnection> xSource(rSource.Source, UNO_QUERY);
- for(USHORT nPos = rDBMgr.aDataSourceParams.Count(); nPos; nPos--)
+ for(sal_uInt16 nPos = rDBMgr.aDataSourceParams.Count(); nPos; nPos--)
{
SwDSParam* pParam = rDBMgr.aDataSourceParams[nPos - 1];
if(pParam->xConnection.is() &&
diff --git a/sw/source/ui/dbui/dbtree.cxx b/sw/source/ui/dbui/dbtree.cxx
index ba6c6bd225..8e786e460c 100644
--- a/sw/source/ui/dbui/dbtree.cxx
+++ b/sw/source/ui/dbui/dbtree.cxx
@@ -110,7 +110,7 @@ class SwDBTreeList_Impl : public cppu::WeakImplHelper1 < XContainerListener >
virtual void SAL_CALL elementReplaced( const ContainerEvent& Event ) throw (RuntimeException);
virtual void SAL_CALL disposing( const EventObject& Source ) throw (RuntimeException);
- BOOL HasContext();
+ sal_Bool HasContext();
SwWrtShell* GetWrtShell() { return pWrtSh;}
void SetWrtShell(SwWrtShell& rSh) { pWrtSh = &rSh;}
Reference< XNameAccess > GetContext() {return xDBContext;}
@@ -148,7 +148,7 @@ void SwDBTreeList_Impl::elementRemoved( const ContainerEvent& rEvent ) throw (Ru
vos::OGuard aGuard(Application::GetSolarMutex());
::rtl::OUString sSource;
rEvent.Accessor >>= sSource;
- for(USHORT i = 0; i < aConnections.Count(); i++)
+ for(sal_uInt16 i = 0; i < aConnections.Count(); i++)
{
SwConnectionDataPtr pPtr = aConnections[i];
if(pPtr->sSourceName == sSource)
@@ -179,7 +179,7 @@ void SwDBTreeList_Impl::elementReplaced( const ContainerEvent& rEvent ) throw (R
/* -----------------------------17.07.01 13:24--------------------------------
---------------------------------------------------------------------------*/
-BOOL SwDBTreeList_Impl::HasContext()
+sal_Bool SwDBTreeList_Impl::HasContext()
{
if(!xDBContext.is())
{
@@ -203,7 +203,7 @@ BOOL SwDBTreeList_Impl::HasContext()
Reference<XConnection> SwDBTreeList_Impl::GetConnection(const rtl::OUString& rSourceName)
{
Reference<XConnection> xRet;
- for(USHORT i = 0; i < aConnections.Count(); i++)
+ for(sal_uInt16 i = 0; i < aConnections.Count(); i++)
{
SwConnectionDataPtr pPtr = aConnections[i];
if(pPtr->sSourceName == rSourceName)
@@ -226,13 +226,13 @@ Reference<XConnection> SwDBTreeList_Impl::GetConnection(const rtl::OUString& rS
------------------------------------------------------------------------*/
SwDBTreeList::SwDBTreeList(Window *pParent, const ResId& rResId,
SwWrtShell* pSh,
- const String& rDefDBName, const BOOL bShowCol):
+ const String& rDefDBName, const sal_Bool bShowCol):
SvTreeListBox (pParent, rResId),
aImageList (SW_RES(ILIST_DB_DLG )),
aImageListHC (SW_RES(ILIST_DB_DLG_HC )),
sDefDBName (rDefDBName),
- bInitialized (FALSE),
+ bInitialized (sal_False),
bShowColumns (bShowCol),
pImpl(new SwDBTreeList_Impl(pSh))
{
@@ -281,7 +281,7 @@ void SwDBTreeList::InitTreeList()
for(long i = 0; i < nCount; i++)
{
String sDBName(pDBNames[i]);
- SvLBoxEntry* pEntry = InsertEntry(sDBName, aImg, aImg, NULL, TRUE);
+ SvLBoxEntry* pEntry = InsertEntry(sDBName, aImg, aImg, NULL, sal_True);
SetExpandedEntryBmp(pEntry, aHCImg, BMP_COLOR_HIGHCONTRAST);
SetCollapsedEntryBmp(pEntry, aHCImg, BMP_COLOR_HIGHCONTRAST);
}
@@ -291,7 +291,7 @@ void SwDBTreeList::InitTreeList()
Select(sDBName, sTableName, sColumnName);
- bInitialized = TRUE;
+ bInitialized = sal_True;
}
/*-- 27.05.2004 09:19:09---------------------------------------------------
@@ -300,7 +300,7 @@ void SwDBTreeList::AddDataSource(const String& rSource)
{
Image aImg = aImageList.GetImage(IMG_DB);
Image aHCImg = aImageListHC.GetImage(IMG_DB);
- SvLBoxEntry* pEntry = InsertEntry(rSource, aImg, aImg, NULL, TRUE);
+ SvLBoxEntry* pEntry = InsertEntry(rSource, aImg, aImg, NULL, sal_True);
SetExpandedEntryBmp(pEntry, aHCImg, BMP_COLOR_HIGHCONTRAST);
SetCollapsedEntryBmp(pEntry, aHCImg, BMP_COLOR_HIGHCONTRAST);
SvTreeListBox::Select(pEntry);
@@ -309,7 +309,7 @@ void SwDBTreeList::AddDataSource(const String& rSource)
Beschreibung:
------------------------------------------------------------------------*/
-void SwDBTreeList::ShowColumns(BOOL bShowCol)
+void SwDBTreeList::ShowColumns(sal_Bool bShowCol)
{
if (bShowCol != bShowColumns)
{
@@ -317,7 +317,7 @@ void SwDBTreeList::ShowColumns(BOOL bShowCol)
String sTableName, sColumnName;
String sDBName(GetDBName(sTableName, sColumnName));
- SetUpdateMode(FALSE);
+ SetUpdateMode(sal_False);
SvLBoxEntry* pEntry = First();
@@ -337,7 +337,7 @@ void SwDBTreeList::ShowColumns(BOOL bShowCol)
{
Select(sDBName, sTableName, sColumnName); // force RequestingChilds
}
- SetUpdateMode(TRUE);
+ SetUpdateMode(sal_True);
}
}
@@ -360,7 +360,7 @@ void SwDBTreeList::RequestingChilds(SvLBoxEntry* pParent)
if(!pImpl->GetContext()->hasByName(sSourceName))
return;
Reference<XConnection> xConnection = pImpl->GetConnection(sSourceName);
- BOOL bTable = pParent->GetUserData() == 0;
+ sal_Bool bTable = pParent->GetUserData() == 0;
Reference<XColumnsSupplier> xColsSupplier;
if(bTable)
{
@@ -496,7 +496,7 @@ IMPL_LINK( SwDBTreeList, DBCompare, SvSortData*, pData )
Beschreibung:
------------------------------------------------------------------------*/
-String SwDBTreeList::GetDBName(String& rTableName, String& rColumnName, BOOL* pbIsTable)
+String SwDBTreeList::GetDBName(String& rTableName, String& rColumnName, sal_Bool* pbIsTable)
{
String sDBName;
SvLBoxEntry* pEntry = FirstSelected();
@@ -527,8 +527,8 @@ void SwDBTreeList::Select(const String& rDBName, const String& rTableName, const
{
SvLBoxEntry* pParent;
SvLBoxEntry* pChild;
- USHORT nParent = 0;
- USHORT nChild = 0;
+ sal_uInt16 nParent = 0;
+ sal_uInt16 nChild = 0;
while ((pParent = GetEntry(nParent++)) != NULL)
{
diff --git a/sw/source/ui/dbui/mailmergechildwindow.cxx b/sw/source/ui/dbui/mailmergechildwindow.cxx
index 94fd53a80f..6d110e1fe8 100644
--- a/sw/source/ui/dbui/mailmergechildwindow.cxx
+++ b/sw/source/ui/dbui/mailmergechildwindow.cxx
@@ -64,7 +64,7 @@ SFX_IMPL_FLOATINGWINDOW( SwMailMergeChildWindow, FN_MAILMERGE_CHILDWINDOW )
------------------------------------------------------------------------*/
SwMailMergeChildWindow::SwMailMergeChildWindow( Window* _pParent,
- USHORT nId,
+ sal_uInt16 nId,
SfxBindings* pBindings,
SfxChildWinInfo* pInfo ) :
SfxChildWindow( _pParent, nId )
@@ -781,7 +781,7 @@ void SwSendMailDialog::UpdateTransferStatus()
m_aErrorStatusFT.SetText(sStatus);
if(m_pImpl->aDescriptors.size())
- m_aProgressBar.SetValue((USHORT)(m_nSendCount * 100 / m_pImpl->aDescriptors.size()));
+ m_aProgressBar.SetValue((sal_uInt16)(m_nSendCount * 100 / m_pImpl->aDescriptors.size()));
else
m_aProgressBar.SetValue(0);
}
diff --git a/sw/source/ui/dbui/mailmergehelper.cxx b/sw/source/ui/dbui/mailmergehelper.cxx
index d9a56fa166..cb779e85d2 100644
--- a/sw/source/ui/dbui/mailmergehelper.cxx
+++ b/sw/source/ui/dbui/mailmergehelper.cxx
@@ -271,7 +271,7 @@ void SwAddressPreview::SetAddress(const ::rtl::OUString& rAddress)
{
pImpl->aAdresses.clear();
pImpl->aAdresses.push_back(rAddress);
- aVScrollBar.Show(FALSE);
+ aVScrollBar.Show(sal_False);
Invalidate();
}
/*-- 27.04.2004 14:01:23---------------------------------------------------
@@ -436,7 +436,7 @@ void SwAddressPreview::MouseButtonDown( const MouseEvent& rMEvt )
-----------------------------------------------------------------------*/
void SwAddressPreview::KeyInput( const KeyEvent& rKEvt )
{
- USHORT nKey = rKEvt.GetKeyCode().GetCode();
+ sal_uInt16 nKey = rKEvt.GetKeyCode().GetCode();
if(pImpl->nRows || pImpl->nColumns)
{
sal_uInt32 nSelectedRow = (pImpl->nSelectedAddress + 1)/ pImpl->nColumns;
@@ -555,7 +555,7 @@ String SwAddressPreview::FillData(
//find the appropriate assignment
String sConvertedColumn = aItem.sText;
- for(USHORT nColumn = 0;
+ for(sal_uInt16 nColumn = 0;
nColumn < rDefHeaders.Count() && nColumn < aAssignment.getLength();
++nColumn)
{
@@ -805,7 +805,7 @@ uno::Any SwMailTransferable::getTransferData( const datatransfer::DataFlavor& /*
else
{
Sequence<sal_Int8> aData;
- SfxMedium aMedium( m_aURL, STREAM_STD_READ, FALSE );
+ SfxMedium aMedium( m_aURL, STREAM_STD_READ, sal_False );
SvStream* pStream = aMedium.GetInStream();
if ( aMedium.GetErrorCode() == ERRCODE_NONE && pStream)
{
diff --git a/sw/source/ui/dbui/mmaddressblockpage.cxx b/sw/source/ui/dbui/mmaddressblockpage.cxx
index 8d32644b12..617ad65ccb 100644
--- a/sw/source/ui/dbui/mmaddressblockpage.cxx
+++ b/sw/source/ui/dbui/mmaddressblockpage.cxx
@@ -321,16 +321,16 @@ IMPL_LINK(SwMailMergeAddressBlockPage, InsertDataHdl_Impl, ImageButton*, pButton
}
else
{
- BOOL bNext = pButton == &m_aNextSetIB;
+ sal_Bool bNext = pButton == &m_aNextSetIB;
sal_Int32 nPos = rConfig.GetResultSetPosition();
rConfig.MoveResultSet( bNext ? ++nPos : --nPos);
}
m_pWizard->LeaveWait();
sal_Int32 nPos = rConfig.GetResultSetPosition();
- BOOL bEnable = TRUE;
+ sal_Bool bEnable = sal_True;
if(nPos < 1)
{
- bEnable = FALSE;
+ bEnable = sal_False;
nPos = 1;
}
else
@@ -557,12 +557,12 @@ SwRestrictedComboBox::~SwRestrictedComboBox()
---------------------------------------------------------------------------*/
void SwRestrictedComboBox::KeyInput(const KeyEvent& rEvt)
{
- BOOL bCallParent = TRUE;
+ sal_Bool bCallParent = sal_True;
if(rEvt.GetCharCode())
{
String sKey = rEvt.GetCharCode();
if( STRING_NOTFOUND != sForbiddenChars.Search(sKey))
- bCallParent = FALSE;
+ bCallParent = sal_False;
}
if(bCallParent)
ComboBox::KeyInput(rEvt);
@@ -574,11 +574,11 @@ void SwRestrictedComboBox::Modify()
{
Selection aSel = GetSelection();
String sTemp = GetText();
- for(USHORT i = 0; i < sForbiddenChars.Len(); i++)
+ for(sal_uInt16 i = 0; i < sForbiddenChars.Len(); i++)
{
sTemp.EraseAllChars( sForbiddenChars.GetChar(i) );
}
- USHORT nDiff = GetText().Len() - sTemp.Len();
+ sal_uInt16 nDiff = GetText().Len() - sTemp.Len();
if(nDiff)
{
aSel.setMin(aSel.getMin() - nDiff);
@@ -672,7 +672,7 @@ SwCustomizeAddressBlockDialog::SwCustomizeAddressBlockDialog(
}
FreeResource();
const ResStringArray& rHeaders = m_rConfigItem.GetDefaultAddressHeaders();
- for(USHORT i = 0; i < rHeaders.Count(); ++i)
+ for(sal_uInt16 i = 0; i < rHeaders.Count(); ++i)
{
const XubString& rHeader = rHeaders.GetString( i );
SvLBoxEntry* pEntry = m_aAddressElementsLB.InsertEntry(rHeader);
@@ -772,7 +772,7 @@ sal_Int32 SwCustomizeAddressBlockDialog::GetSelectedItem_Impl()
sal_Int32 nRet = USER_DATA_NONE;
String sSelected = m_aDragED.GetCurrentItem();
if(sSelected.Len())
- for(ULONG i = 0; i < m_aAddressElementsLB.GetEntryCount(); ++i)
+ for(sal_uLong i = 0; i < m_aAddressElementsLB.GetEntryCount(); ++i)
{
SvLBoxEntry* pEntry = m_aAddressElementsLB.GetEntry(i);
String sEntry = m_aAddressElementsLB.GetEntryText(pEntry);
@@ -791,7 +791,7 @@ bool SwCustomizeAddressBlockDialog::HasItem_Impl(sal_Int32 nUserData)
{
//get the entry from the ListBox
String sEntry;
- for(ULONG i = 0; i < m_aAddressElementsLB.GetEntryCount(); ++i)
+ for(sal_uLong i = 0; i < m_aAddressElementsLB.GetEntryCount(); ++i)
{
SvLBoxEntry* pEntry = m_aAddressElementsLB.GetEntry(i);
if((sal_Int32)(sal_IntPtr)pEntry->GetUserData() == nUserData)
@@ -921,7 +921,7 @@ void SwCustomizeAddressBlockDialog::SetAddress(const ::rtl::OUString& rAddress)
//remove placeholders by the actual content
if(m_aFieldFT.IsVisible())
{
- for(ULONG i = 0; i < m_aAddressElementsLB.GetEntryCount(); ++i)
+ for(sal_uLong i = 0; i < m_aAddressElementsLB.GetEntryCount(); ++i)
{
SvLBoxEntry* pEntry = m_aAddressElementsLB.GetEntry(i);
String sEntry = m_aAddressElementsLB.GetEntryText(pEntry);
@@ -1117,7 +1117,7 @@ SwAssignFieldsControl::SwAssignFieldsControl(
};
//fill the controls
- for(USHORT i = 0; i < rHeaders.Count(); ++i)
+ for(sal_uInt16 i = 0; i < rHeaders.Count(); ++i)
{
const XubString& rHeader = rHeaders.GetString( i );
FixedInfo* pNewText = new FixedInfo(&m_aWindow, ResId( FT_FIELDS, *rResId.GetResMgr()));
@@ -1231,7 +1231,7 @@ long SwAssignFieldsControl::PreNotify( NotifyEvent& rNEvt )
if(rNEvt.GetType() == EVENT_COMMAND)
{
const CommandEvent* pCEvt = rNEvt.GetCommandEvent();
- USHORT nCmd = pCEvt->GetCommand();
+ sal_uInt16 nCmd = pCEvt->GetCommand();
if( COMMAND_WHEEL == nCmd )
{
Command(*pCEvt);
@@ -1267,7 +1267,7 @@ IMPL_LINK(SwAssignFieldsControl, ScrollHdl_Impl, ScrollBar*, pScroll)
// The first line has to be -(nThumb * m_nYOffset) in the negative
long nMove = m_nFirstYPos - (*m_aMatches.begin())->GetPosPixel().Y() - (nThumb * m_nYOffset);
- SetUpdateMode(FALSE);
+ SetUpdateMode(sal_False);
long nIndex;
::std::vector<FixedInfo*>::iterator aFIIter;
for(nIndex = 0, aFIIter = m_aFieldNames.begin(); aFIIter != m_aFieldNames.end(); ++aFIIter, ++nIndex)
@@ -1277,7 +1277,7 @@ IMPL_LINK(SwAssignFieldsControl, ScrollHdl_Impl, ScrollBar*, pScroll)
lcl_Move(*aLBIter, nMove);
for(nIndex = 0, aFIIter = m_aPreviews.begin(); aFIIter != m_aPreviews.end(); ++aFIIter, ++nIndex)
lcl_Move(*aFIIter, nMove);
- SetUpdateMode(TRUE);
+ SetUpdateMode(sal_True);
return 0;
}
@@ -1458,7 +1458,7 @@ DDListBox::DDListBox(SwCustomizeAddressBlockDialog* pParent, const ResId rResId)
// SetSpaceBetweenEntries(3);
SetSelectionMode( SINGLE_SELECTION );
SetDragDropMode( SV_DRAGDROP_CTRL_COPY );
- EnableAsyncDrag(TRUE);
+ EnableAsyncDrag(sal_True);
SetHelpId(HID_MM_CUSTOMFIELDS);
// expand selection to the complete width of the ListBox
SetHighlightRange();
@@ -1512,7 +1512,7 @@ AddressMultiLineEdit::AddressMultiLineEdit(SwCustomizeAddressBlockDialog* pParen
GetTextView()->SupportProtectAttribute(sal_True);
StartListening(*GetTextEngine());
//DisableSelectionOnFocus();
- EnableFocusSelectionHide(FALSE);
+ EnableFocusSelectionHide(sal_False);
}
/*-- 26.05.2004 13:14:53---------------------------------------------------
@@ -1570,8 +1570,8 @@ void AddressMultiLineEdit::SetText( const String& rStr )
ExtTextEngine* pTextEngine = GetTextEngine();
TextAttribProtect aProtectAttr;
- ULONG nParaCount = pTextEngine->GetParagraphCount();
- for(ULONG nPara = 0; nPara < nParaCount; ++nPara)
+ sal_uLong nParaCount = pTextEngine->GetParagraphCount();
+ for(sal_uLong nPara = 0; nPara < nParaCount; ++nPara)
{
xub_StrLen nIndex = 0;
String sPara = pTextEngine->GetText( nPara );
@@ -1582,11 +1582,11 @@ void AddressMultiLineEdit::SetText( const String& rStr )
}
while(true)
{
- USHORT nStart = sPara.Search( '<', nIndex );
- USHORT nEnd = sPara.Search( '>', nStart );
+ sal_uInt16 nStart = sPara.Search( '<', nIndex );
+ sal_uInt16 nEnd = sPara.Search( '>', nStart );
nIndex = nEnd;
if(nStart != STRING_NOTFOUND && nEnd != STRING_NOTFOUND)
- pTextEngine->SetAttrib( aProtectAttr, nPara, nStart, nEnd + 1, FALSE );
+ pTextEngine->SetAttrib( aProtectAttr, nPara, nStart, nEnd + 1, sal_False );
else
break;
}
@@ -1614,8 +1614,8 @@ void AddressMultiLineEdit::InsertNewEntry( const String& rStr )
// insert new entry after current selected one.
ExtTextView* pTextView = GetTextView();
const TextSelection& rSelection = pTextView->GetSelection();
- ULONG nPara = rSelection.GetStart().GetPara();
- USHORT nIndex = rSelection.GetEnd().GetIndex();
+ sal_uLong nPara = rSelection.GetStart().GetPara();
+ sal_uInt16 nIndex = rSelection.GetEnd().GetIndex();
ExtTextEngine *pTextEngine = GetTextEngine();
const TextCharAttrib *pAttrib;
if(0 != (pAttrib = pTextEngine->FindCharAttrib( rSelection.GetStart(), TEXTATTR_PROTECTED )))
@@ -1630,7 +1630,7 @@ void AddressMultiLineEdit::InsertNewEntry( const String& rStr )
Modify();
}
-void AddressMultiLineEdit::InsertNewEntryAtPosition( const String& rStr, ULONG nPara, USHORT nIndex )
+void AddressMultiLineEdit::InsertNewEntryAtPosition( const String& rStr, sal_uLong nPara, sal_uInt16 nIndex )
{
ExtTextEngine* pTextEngine = GetTextEngine();
TextPaM aInsertPos( nPara, nIndex );
@@ -1659,7 +1659,7 @@ void AddressMultiLineEdit::RemoveCurrentEntry()
(pBeginAttrib->GetStart() <= rSelection.GetStart().GetIndex()
&& pBeginAttrib->GetEnd() >= rSelection.GetEnd().GetIndex()))
{
- ULONG nPara = rSelection.GetStart().GetPara();
+ sal_uLong nPara = rSelection.GetStart().GetPara();
TextSelection aEntrySel(TextPaM( nPara, pBeginAttrib->GetStart()), TextPaM(nPara, pBeginAttrib->GetEnd()));
pTextEngine->ReplaceText(aEntrySel, String());
//restore the attributes
@@ -1681,8 +1681,8 @@ void AddressMultiLineEdit::MoveCurrentItem(sal_uInt16 nMove)
&& pBeginAttrib->GetEnd() >= rSelection.GetEnd().GetIndex()))
{
//current item has been found
- ULONG nPara = rSelection.GetStart().GetPara();
- USHORT nIndex = pBeginAttrib->GetStart();
+ sal_uLong nPara = rSelection.GetStart().GetPara();
+ sal_uInt16 nIndex = pBeginAttrib->GetStart();
TextSelection aEntrySel(TextPaM( nPara, pBeginAttrib->GetStart()), TextPaM(nPara, pBeginAttrib->GetEnd()));
String sCurrentItem = pTextEngine->GetText(aEntrySel);
pTextEngine->RemoveAttrib( nPara, *pBeginAttrib );
@@ -1793,7 +1793,7 @@ String AddressMultiLineEdit::GetCurrentItem()
(pBeginAttrib->GetStart() <= rSelection.GetStart().GetIndex()
&& pBeginAttrib->GetEnd() >= rSelection.GetEnd().GetIndex()))
{
- ULONG nPara = rSelection.GetStart().GetPara();
+ sal_uLong nPara = rSelection.GetStart().GetPara();
TextSelection aEntrySel(TextPaM( nPara, pBeginAttrib->GetStart()), TextPaM(nPara, pBeginAttrib->GetEnd()));
sRet = pTextEngine->GetText( aEntrySel );
}
@@ -1812,7 +1812,7 @@ void AddressMultiLineEdit::SelectCurrentItem()
(pBeginAttrib->GetStart() <= rSelection.GetStart().GetIndex()
&& pBeginAttrib->GetEnd() >= rSelection.GetEnd().GetIndex()))
{
- ULONG nPara = rSelection.GetStart().GetPara();
+ sal_uLong nPara = rSelection.GetStart().GetPara();
TextSelection aEntrySel(TextPaM( nPara, pBeginAttrib->GetStart()), TextPaM(nPara, pBeginAttrib->GetEnd()));
pTextView->SetSelection(aEntrySel);
Invalidate();
@@ -1827,8 +1827,8 @@ String AddressMultiLineEdit::GetAddress()
{
String sRet;
ExtTextEngine* pTextEngine = GetTextEngine();
- ULONG nParaCount = pTextEngine->GetParagraphCount();
- for(ULONG nPara = nParaCount; nPara; --nPara)
+ sal_uLong nParaCount = pTextEngine->GetParagraphCount();
+ for(sal_uLong nPara = nParaCount; nPara; --nPara)
{
String sPara = pTextEngine->GetText( nPara - 1);
sPara.EraseTrailingChars(' ');
diff --git a/sw/source/ui/dbui/mmaddressblockpage.hxx b/sw/source/ui/dbui/mmaddressblockpage.hxx
index 2436a170d4..085cd67bc5 100644
--- a/sw/source/ui/dbui/mmaddressblockpage.hxx
+++ b/sw/source/ui/dbui/mmaddressblockpage.hxx
@@ -197,7 +197,7 @@ public:
String GetAddress();
void InsertNewEntry( const String& rStr );
- void InsertNewEntryAtPosition( const String& rStr, ULONG nPara, USHORT nIndex );
+ void InsertNewEntryAtPosition( const String& rStr, sal_uLong nPara, sal_uInt16 nIndex );
void RemoveCurrentEntry();
void MoveCurrentItem(sal_uInt16 nMove);
diff --git a/sw/source/ui/dbui/mmconfigitem.cxx b/sw/source/ui/dbui/mmconfigitem.cxx
index 09c4b01d63..db8db04543 100644
--- a/sw/source/ui/dbui/mmconfigitem.cxx
+++ b/sw/source/ui/dbui/mmconfigitem.cxx
@@ -426,7 +426,7 @@ void lcl_ConvertToNumbers(OUString& rBlock, const ResStringArray& rHeaders )
//convert the strings used for UI to numbers used for the configuration
String sBlock(rBlock);
sBlock.SearchAndReplaceAllAscii("\n", String::CreateFromAscii("\\n"));
- for(USHORT i = 0; i < rHeaders.Count(); ++i)
+ for(sal_uInt16 i = 0; i < rHeaders.Count(); ++i)
{
String sHeader = rHeaders.GetString( i );
sHeader.Insert('<', 0);
@@ -1083,7 +1083,7 @@ sal_Int32 SwMailMergeConfigItem::MoveResultSet(sal_Int32 nTarget)
{
if(nTarget > 0)
{
- BOOL bMoved = m_pImpl->xResultSet->absolute(nTarget);
+ sal_Bool bMoved = m_pImpl->xResultSet->absolute(nTarget);
if(!bMoved)
{
if(nTarget > 1)
@@ -1460,7 +1460,7 @@ bool SwMailMergeConfigItem::IsAddressFieldsAssigned() const
if(aItem.bIsColumn)
{
String sConvertedColumn = aItem.sText;
- for(USHORT nColumn = 0;
+ for(sal_uInt16 nColumn = 0;
nColumn < rHeaders.Count() && nColumn < aAssignment.getLength();
++nColumn)
{
@@ -1521,7 +1521,7 @@ bool SwMailMergeConfigItem::IsGreetingFieldsAssigned() const
if(aItem.bIsColumn)
{
String sConvertedColumn = aItem.sText;
- for(USHORT nColumn = 0;
+ for(sal_uInt16 nColumn = 0;
nColumn < rHeaders.Count() && nColumn < aAssignment.getLength();
++nColumn)
{
@@ -1880,13 +1880,13 @@ sal_uInt32 SwMailMergeConfigItem::GetMergedDocumentCount() const
SwView* lcl_ExistsView(SwView* pView)
{
const TypeId aType(TYPE(SwView));
- SfxViewShell* pViewShell = SfxViewShell::GetFirst( &aType, FALSE );
+ SfxViewShell* pViewShell = SfxViewShell::GetFirst( &aType, sal_False );
while(pViewShell)
{
if(pViewShell == pView)
return pView;
- pViewShell = SfxViewShell::GetNext( *pViewShell, &aType, FALSE );
+ pViewShell = SfxViewShell::GetNext( *pViewShell, &aType, sal_False );
}
return 0;
}
diff --git a/sw/source/ui/dbui/mmdocselectpage.cxx b/sw/source/ui/dbui/mmdocselectpage.cxx
index 7427bfc687..db618364f7 100644
--- a/sw/source/ui/dbui/mmdocselectpage.cxx
+++ b/sw/source/ui/dbui/mmdocselectpage.cxx
@@ -145,7 +145,7 @@ IMPL_LINK(SwMailMergeDocSelectPage, FileSelectHdl, PushButton*, pButton)
m_aLoadTemplateRB.Check();
SfxNewFileDialog* pNewFileDlg = new SfxNewFileDialog(this, 0);
//pNewFileDlg->SetTemplateFlags(nFlags);
- USHORT nRet = pNewFileDlg->Execute();
+ sal_uInt16 nRet = pNewFileDlg->Execute();
if(RET_TEMPLATE_LOAD == nRet)
bTemplate = false;
else if(RET_CANCEL != nRet)
diff --git a/sw/source/ui/dbui/mmgreetingspage.cxx b/sw/source/ui/dbui/mmgreetingspage.cxx
index db0038274a..c17c1ec8ee 100644
--- a/sw/source/ui/dbui/mmgreetingspage.cxx
+++ b/sw/source/ui/dbui/mmgreetingspage.cxx
@@ -55,7 +55,7 @@ void lcl_FillGreetingsBox(ListBox& rBox,
const Sequence< ::rtl::OUString> rEntries = rConfig.GetGreetings(eType);
for(sal_Int32 nEntry = 0; nEntry < rEntries.getLength(); ++nEntry)
rBox.InsertEntry(rEntries[nEntry]);
- rBox.SelectEntryPos((USHORT)rConfig.GetCurrentGreeting(eType));
+ rBox.SelectEntryPos((sal_uInt16)rConfig.GetCurrentGreeting(eType));
}
// -----------------------------------------------------------------------
void lcl_FillGreetingsBox(ComboBox& rBox,
@@ -65,7 +65,7 @@ void lcl_FillGreetingsBox(ComboBox& rBox,
const Sequence< ::rtl::OUString> rEntries = rConfig.GetGreetings(eType);
for(sal_Int32 nEntry = 0; nEntry < rEntries.getLength(); ++nEntry)
rBox.InsertEntry(rEntries[nEntry]);
- rBox.SelectEntryPos((USHORT)rConfig.GetCurrentGreeting(eType));
+ rBox.SelectEntryPos((sal_uInt16)rConfig.GetCurrentGreeting(eType));
}
// -----------------------------------------------------------------------
void lcl_StoreGreetingsBox(ListBox& rBox,
@@ -74,7 +74,7 @@ void lcl_StoreGreetingsBox(ListBox& rBox,
{
Sequence< ::rtl::OUString> aEntries(rBox.GetEntryCount());
::rtl::OUString* pEntries = aEntries.getArray();
- for(USHORT nEntry = 0; nEntry < rBox.GetEntryCount(); ++nEntry)
+ for(sal_uInt16 nEntry = 0; nEntry < rBox.GetEntryCount(); ++nEntry)
pEntries[nEntry] = rBox.GetEntry(nEntry);
rConfig.SetGreetings(eType, aEntries);
rConfig.SetCurrentGreeting(eType, rBox.GetSelectEntryPos());
@@ -86,7 +86,7 @@ void lcl_StoreGreetingsBox(ComboBox& rBox,
{
Sequence< ::rtl::OUString> aEntries(rBox.GetEntryCount());
::rtl::OUString* pEntries = aEntries.getArray();
- for(USHORT nEntry = 0; nEntry < rBox.GetEntryCount(); ++nEntry)
+ for(sal_uInt16 nEntry = 0; nEntry < rBox.GetEntryCount(); ++nEntry)
pEntries[nEntry] = rBox.GetEntry(nEntry);
rConfig.SetGreetings(eType, aEntries);
rConfig.SetCurrentGreeting(eType, rBox.GetSelectEntryPos());
@@ -96,7 +96,7 @@ void lcl_StoreGreetingsBox(ComboBox& rBox,
-----------------------------------------------------------------------*/
IMPL_LINK(SwGreetingsHandler, IndividualHdl_Impl, CheckBox*, EMPTYARG)
{
- BOOL bIndividual = m_pPersonalizedCB->IsEnabled() && m_pPersonalizedCB->IsChecked();
+ sal_Bool bIndividual = m_pPersonalizedCB->IsEnabled() && m_pPersonalizedCB->IsChecked();
m_pFemaleFT->Enable(bIndividual);
m_pFemaleLB->Enable(bIndividual);
m_pFemalePB->Enable(bIndividual);
@@ -409,10 +409,10 @@ sal_Bool SwMailMergeGreetingsPage::commitPage( ::svt::WizardTypes::CommitPage
lcl_StoreGreetingsBox(m_aFemaleLB, rConfig, SwMailMergeConfigItem::FEMALE);
lcl_StoreGreetingsBox(m_aMaleLB, rConfig, SwMailMergeConfigItem::MALE);
- USHORT nCurrentTextPos = m_aNeutralCB.GetEntryPos( m_aNeutralCB.GetText() );
+ sal_uInt16 nCurrentTextPos = m_aNeutralCB.GetEntryPos( m_aNeutralCB.GetText() );
if(LISTBOX_ENTRY_NOTFOUND == nCurrentTextPos)
{
- USHORT nCount = m_aNeutralCB.GetEntryCount();
+ sal_uInt16 nCount = m_aNeutralCB.GetEntryCount();
m_aNeutralCB.InsertEntry( m_aNeutralCB.GetText(), nCount );
m_aNeutralCB.SelectEntryPos(nCount);
}
@@ -452,15 +452,15 @@ IMPL_LINK(SwMailMergeGreetingsPage, InsertDataHdl_Impl, ImageButton*, pButton)
}
else
{
- BOOL bNext = pButton == &m_aNextSetIB;
+ sal_Bool bNext = pButton == &m_aNextSetIB;
sal_Int32 nPos = rConfig.GetResultSetPosition();
rConfig.MoveResultSet( bNext ? ++nPos : --nPos);
}
sal_Int32 nPos = rConfig.GetResultSetPosition();
- BOOL bEnable = TRUE;
+ sal_Bool bEnable = sal_True;
if(nPos < 1)
{
- bEnable = FALSE;
+ bEnable = sal_False;
nPos = 1;
}
else
diff --git a/sw/source/ui/dbui/mmlayoutpage.cxx b/sw/source/ui/dbui/mmlayoutpage.cxx
index 91312c9914..97d923f495 100644
--- a/sw/source/ui/dbui/mmlayoutpage.cxx
+++ b/sw/source/ui/dbui/mmlayoutpage.cxx
@@ -149,8 +149,8 @@ SwMailMergeLayoutPage::SwMailMergeLayoutPage( SwMailMergeWizard* _pParent) :
m_pExampleFrame = new SwOneExampleFrame( m_aExampleWIN,
EX_SHOW_DEFAULT_PAGE, &aLink, &m_sExampleURL );
- m_aExampleWIN.Show( FALSE );
- m_aExampleContainerWIN.Show(TRUE);
+ m_aExampleWIN.Show( sal_False );
+ m_aExampleContainerWIN.Show(sal_True);
m_aLeftMF.SetValue(m_aLeftMF.Normalize(DEFAULT_LEFT_DISTANCE), FUNIT_TWIP);
m_aTopMF.SetValue(m_aTopMF.Normalize(DEFAULT_TOP_DISTANCE), FUNIT_TWIP);
@@ -236,7 +236,7 @@ void SwMailMergeLayoutPage::ActivatePage()
m_pExampleWrtShell->GotoFly( m_pAddressBlockFormat->GetName() );
m_pExampleWrtShell->DelRight();
m_pAddressBlockFormat = 0;
- m_pExampleWrtShell->Pop(FALSE);
+ m_pExampleWrtShell->Pop(sal_False);
}
else
{
@@ -380,7 +380,7 @@ SwFrmFmt* SwMailMergeLayoutPage::InsertAddressFrame(
if(aItem.bIsColumn)
{
String sConvertedColumn = aItem.sText;
- for(USHORT nColumn = 0;
+ for(sal_uInt16 nColumn = 0;
nColumn < rHeaders.Count() && nColumn < aAssignment.getLength();
++nColumn)
{
@@ -474,7 +474,7 @@ void SwMailMergeLayoutPage::InsertGreeting(SwWrtShell& rShell, SwMailMergeConfig
{
//there's already text at the desired position
//go to start of the doc, directly!
- rShell.SttEndDoc(TRUE);
+ rShell.SttEndDoc(sal_True);
//and go by paragraph until the position is reached
long nYPos = rShell.GetCharRect().Top();
while(nYPos < GREETING_TOP_DISTANCE)
@@ -641,7 +641,7 @@ void SwMailMergeLayoutPage::InsertGreeting(SwWrtShell& rShell, SwMailMergeConfig
{
String sDB(sDBName);
String sConvertedColumn = aItem.sText;
- for(USHORT nColumn = 0;
+ for(sal_uInt16 nColumn = 0;
nColumn < rHeaders.Count() && nColumn < aAssignment.getLength();
++nColumn)
{
@@ -682,7 +682,7 @@ void SwMailMergeLayoutPage::InsertGreeting(SwWrtShell& rShell, SwMailMergeConfig
{
rShell.Push();
rShell.SplitNode();
- rShell.Pop(FALSE);
+ rShell.Pop(sal_False);
}
//put the cursor to the start of the paragraph
rShell.SttPara();
@@ -694,8 +694,8 @@ void SwMailMergeLayoutPage::InsertGreeting(SwWrtShell& rShell, SwMailMergeConfig
-----------------------------------------------------------------------*/
IMPL_LINK(SwMailMergeLayoutPage, PreviewLoadedHdl_Impl, void*, EMPTYARG)
{
- m_aExampleWIN.Show( TRUE );
- m_aExampleContainerWIN.Show(FALSE);
+ m_aExampleWIN.Show( sal_True );
+ m_aExampleContainerWIN.Show(sal_False);
Reference< XModel > & xModel = m_pExampleFrame->GetModel();
//now the ViewOptions should be set properly
@@ -792,7 +792,7 @@ IMPL_LINK(SwMailMergeLayoutPage, ChangeAddressHdl_Impl, MetricField*, EMPTYARG)
IMPL_LINK(SwMailMergeLayoutPage, GreetingsHdl_Impl, PushButton*, pButton)
{
bool bDown = pButton == &m_aDownPB;
- BOOL bMoved = m_pExampleWrtShell->MoveParagraph( bDown ? 1 : -1 );
+ sal_Bool bMoved = m_pExampleWrtShell->MoveParagraph( bDown ? 1 : -1 );
if (bMoved || bDown)
m_pWizard->GetConfigItem().MoveGreeting(bDown ? 1 : -1 );
if(!bMoved && bDown)
diff --git a/sw/source/ui/dbui/mmoutputpage.cxx b/sw/source/ui/dbui/mmoutputpage.cxx
index 4d3cd4d19d..66e8b5496e 100644
--- a/sw/source/ui/dbui/mmoutputpage.cxx
+++ b/sw/source/ui/dbui/mmoutputpage.cxx
@@ -105,7 +105,7 @@ using namespace ::com::sun::star::uno;
/*-- 01.07.2004 16:47:49---------------------------------------------------
-----------------------------------------------------------------------*/
-String lcl_GetExtensionForDocType(ULONG nDocType)
+String lcl_GetExtensionForDocType(sal_uLong nDocType)
{
String sExtension;
switch( nDocType )
@@ -507,7 +507,7 @@ IMPL_LINK(SwMailMergeOutputPage, OutputTypeHdl_Impl, RadioButton*, pButton)
&m_aSendAllRB, &m_aSendDocumentsPB,
0
};
- SetUpdateMode(TRUE);
+ SetUpdateMode(sal_True);
Control** pControl = aControls;
do
{
@@ -603,7 +603,7 @@ IMPL_LINK(SwMailMergeOutputPage, OutputTypeHdl_Impl, RadioButton*, pButton)
String sAttach( m_sDefaultAttachmentST );
sAttach += '.';
sAttach += lcl_GetExtensionForDocType(
- (ULONG)m_aSendAsLB.GetEntryData(m_aSendAsLB.GetSelectEntryPos()));
+ (sal_uLong)m_aSendAsLB.GetEntryData(m_aSendAsLB.GetSelectEntryPos()));
m_aAttachmentED.SetText( sAttach );
}
@@ -649,7 +649,7 @@ IMPL_LINK(SwMailMergeOutputPage, OutputTypeHdl_Impl, RadioButton*, pButton)
}
m_aFromRB.GetClickHdl().Call(m_aFromRB.IsChecked() ? &m_aFromRB : 0);
- SetUpdateMode(FALSE);
+ SetUpdateMode(sal_False);
return 0;
}
/*-- 22.08.2005 12:15:10---------------------------------------------------
@@ -714,9 +714,9 @@ IMPL_LINK(SwMailMergeOutputPage, SaveStartHdl_Impl, PushButton*, pButton)
rConfigItem.AddSavedDocument(
aURL.GetMainURL(INetURLObject::DECODE_TO_IURI));
- pButton->Enable(FALSE);
+ pButton->Enable(sal_False);
m_pWizard->enableButtons(WZB_FINISH, sal_True);
- pButton->Enable(FALSE);
+ pButton->Enable(sal_False);
}
}
@@ -870,7 +870,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);
@@ -988,7 +988,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);
@@ -1041,7 +1041,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 );
@@ -1095,7 +1095,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());
@@ -1127,7 +1127,7 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton)
rtl_TextEncoding eEncoding = ::gsl_getSystemTextEncoding();
SfxFilterContainer* pFilterContainer = SwDocShell::Factory().GetFilterContainer();
const SfxFilter *pSfxFlt = 0;
- ULONG nDocType = (ULONG)m_aSendAsLB.GetEntryData(m_aSendAsLB.GetSelectEntryPos());
+ sal_uLong nDocType = (sal_uLong)m_aSendAsLB.GetEntryData(m_aSendAsLB.GetSelectEntryPos());
String sExtension = lcl_GetExtensionForDocType(nDocType);
switch( nDocType )
{
@@ -1217,7 +1217,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
@@ -1235,8 +1235,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 );
@@ -1288,7 +1288,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
@@ -1335,7 +1335,7 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton)
{
{
//read in the temporary file and use it as mail body
- SfxMedium aMedium( aName.GetValue(), STREAM_READ, TRUE);
+ SfxMedium aMedium( aName.GetValue(), STREAM_READ, sal_True);
SvStream* pInStream = aMedium.GetInStream();
if(pInStream)
pInStream->SetStreamCharSet( eEncoding );
diff --git a/sw/source/ui/dbui/selectdbtabledialog.cxx b/sw/source/ui/dbui/selectdbtabledialog.cxx
index 049b99e611..a4e26be870 100644
--- a/sw/source/ui/dbui/selectdbtabledialog.cxx
+++ b/sw/source/ui/dbui/selectdbtabledialog.cxx
@@ -113,7 +113,7 @@ SwSelectDBTableDialog::SwSelectDBTableDialog(Window* pParent,
m_aTableLB.SetSpaceBetweenEntries(3);
m_aTableLB.SetSelectionMode( SINGLE_SELECTION );
m_aTableLB.SetDragDropMode( 0 );
- m_aTableLB.EnableAsyncDrag(FALSE);
+ m_aTableLB.EnableAsyncDrag(sal_False);
m_aPreviewPB.SetClickHdl(LINK(this, SwSelectDBTableDialog, PreviewHdl));
diff --git a/sw/source/ui/dbui/swdbtoolsclient.cxx b/sw/source/ui/dbui/swdbtoolsclient.cxx
index 786c60be65..e45e2c5ae6 100644
--- a/sw/source/ui/dbui/swdbtoolsclient.cxx
+++ b/sw/source/ui/dbui/swdbtoolsclient.cxx
@@ -230,7 +230,7 @@ sal_Int32 SwDbtoolsClient::getDefaultNumberFormat(
/* -----------------------------30.08.2001 12:38------------------------------
---------------------------------------------------------------------------*/
-::rtl::OUString SwDbtoolsClient::getValue(
+::rtl::OUString SwDbtoolsClient::getFormattedValue(
const uno::Reference< beans::XPropertySet>& _rxColumn,
const uno::Reference< util::XNumberFormatter>& _rxFormatter,
const lang::Locale& _rLocale,
@@ -242,7 +242,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 b7fd189741..a05b114987 100644
--- a/sw/source/ui/dialog/SwSpellDialogChildWindow.cxx
+++ b/sw/source/ui/dialog/SwSpellDialogChildWindow.cxx
@@ -80,7 +80,7 @@ struct SpellState
bool m_bLostFocus;
//restart and progress information
- USHORT m_SpellStartPosition;
+ sal_uInt16 m_SpellStartPosition;
bool m_bBodySpelled; //body already spelled
bool m_bOtherSpelled; //frames, footnotes, headers and footers spelled
bool m_bStartedInOther; //started the spelling insided of the _other_ area
@@ -151,7 +151,7 @@ void lcl_LeaveDrawText(SwWrtShell& rSh)
{
if(rSh.GetDrawView())
{
- rSh.GetDrawView()->SdrEndTextEdit( TRUE );
+ rSh.GetDrawView()->SdrEndTextEdit( sal_True );
Point aPt(LONG_MIN, LONG_MIN);
//go out of the frame
rSh.SelectObj(aPt, SW_LEAVE_FRAME);
@@ -164,7 +164,7 @@ void lcl_LeaveDrawText(SwWrtShell& rSh)
-----------------------------------------------------------------------*/
SwSpellDialogChildWindow::SwSpellDialogChildWindow (
Window* _pParent,
- USHORT nId,
+ sal_uInt16 nId,
SfxBindings* pBindings,
SfxChildWinInfo* pInfo) :
svx::SpellDialogChildWindow (
@@ -192,7 +192,7 @@ SwSpellDialogChildWindow::~SwSpellDialogChildWindow ()
SfxChildWinInfo SwSpellDialogChildWindow::GetInfo (void) const
{
SfxChildWinInfo aInfo = svx::SpellDialogChildWindow::GetInfo();
- aInfo.bVisible = FALSE;
+ aInfo.bVisible = sal_False;
return aInfo;
}
@@ -255,7 +255,7 @@ svx::SpellPortions SwSpellDialogChildWindow::GetNextWrongSentence(bool bRecheck)
{
m_pSpellState->pOtherCursor = new SwPaM(*pWrtShell->GetCrsr()->GetPoint());
m_pSpellState->m_bStartedInOther = true;
- pWrtShell->SpellStart( DOCPOS_OTHERSTART, DOCPOS_OTHEREND, DOCPOS_CURR, FALSE );
+ pWrtShell->SpellStart( DOCPOS_OTHERSTART, DOCPOS_OTHEREND, DOCPOS_CURR, sal_False );
}
else
{
@@ -268,7 +268,7 @@ svx::SpellPortions SwSpellDialogChildWindow::GetNextWrongSentence(bool bRecheck)
*pWrtShell->GetDoc(),
*pCrsr->Start(), pCrsr->End());
}
- pWrtShell->SpellStart( DOCPOS_START, DOCPOS_END, DOCPOS_CURR, FALSE );
+ pWrtShell->SpellStart( DOCPOS_START, DOCPOS_END, DOCPOS_CURR, sal_False );
}
}
else
@@ -313,7 +313,7 @@ The code below would only be part of the solution.
//if there's any that has not been spelled yet
if(!m_pSpellState->m_bOtherSpelled && pWrtShell->HasOtherCnt())
{
- pWrtShell->SpellStart(DOCPOS_OTHERSTART, DOCPOS_OTHEREND, DOCPOS_OTHERSTART, FALSE );
+ pWrtShell->SpellStart(DOCPOS_OTHERSTART, DOCPOS_OTHEREND, DOCPOS_OTHERSTART, sal_False );
if(!pWrtShell->SpellSentence(aRet, m_bIsGrammarCheckingOn))
{
pWrtShell->SpellEnd();
@@ -325,7 +325,7 @@ The code below would only be part of the solution.
//if no result has been found try at the body text - completely
if(!m_pSpellState->m_bBodySpelled && !aRet.size())
{
- pWrtShell->SpellStart(DOCPOS_START, DOCPOS_END, DOCPOS_START, FALSE );
+ pWrtShell->SpellStart(DOCPOS_START, DOCPOS_END, DOCPOS_START, sal_False );
if(!pWrtShell->SpellSentence(aRet, m_bIsGrammarCheckingOn))
{
m_pSpellState->m_bBodySpelled = true;
@@ -354,7 +354,7 @@ The code below would only be part of the solution.
pWrtShell->SpellEnd();
delete m_pSpellState->pOtherCursor;
m_pSpellState->pOtherCursor = 0;
- pWrtShell->SpellStart(DOCPOS_OTHERSTART, DOCPOS_CURR, DOCPOS_OTHERSTART, FALSE );
+ pWrtShell->SpellStart(DOCPOS_OTHERSTART, DOCPOS_CURR, DOCPOS_OTHERSTART, sal_False );
pWrtShell->SpellSentence(aRet, m_bIsGrammarCheckingOn);
}
if(!aRet.size())
@@ -367,7 +367,7 @@ The code below would only be part of the solution.
//has the body been spelled?
if(!m_pSpellState->m_bBodySpelled)
{
- pWrtShell->SpellStart(DOCPOS_START, DOCPOS_END, DOCPOS_START, FALSE );
+ pWrtShell->SpellStart(DOCPOS_START, DOCPOS_END, DOCPOS_START, sal_False );
if(!pWrtShell->SpellSentence(aRet, m_bIsGrammarCheckingOn))
{
m_pSpellState->m_bBodySpelled = true;
@@ -380,7 +380,7 @@ The code below would only be part of the solution.
m_pSpellState->m_bBodySpelled = true;
if(!m_pSpellState->m_bOtherSpelled && pWrtShell->HasOtherCnt())
{
- pWrtShell->SpellStart(DOCPOS_OTHERSTART, DOCPOS_OTHEREND, DOCPOS_OTHERSTART, FALSE );
+ pWrtShell->SpellStart(DOCPOS_OTHERSTART, DOCPOS_OTHEREND, DOCPOS_OTHERSTART, sal_False );
if(!pWrtShell->SpellSentence(aRet, m_bIsGrammarCheckingOn))
{
pWrtShell->SpellEnd();
@@ -415,7 +415,7 @@ The code below would only be part of the solution.
if(m_pSpellState->m_xStartRange.is())
{
LockFocusNotification( true );
- USHORT nRet = QueryBox( GetWindow(), SW_RES(RID_QB_SPELL_CONTINUE)).Execute();
+ sal_uInt16 nRet = QueryBox( GetWindow(), SW_RES(RID_QB_SPELL_CONTINUE)).Execute();
if(RET_YES == nRet)
{
SwUnoInternalPaM aPam(*pWrtShell->GetDoc());
@@ -583,8 +583,8 @@ void SwSpellDialogChildWindow::GetFocus()
case SHELL_MODE_TABLE_LIST_TEXT:
{
SwPaM* pCursor = pWrtShell->GetCrsr();
- if(m_pSpellState->m_pPointNode != pCursor->GetNode(TRUE) ||
- m_pSpellState->m_pMarkNode != pCursor->GetNode(FALSE)||
+ if(m_pSpellState->m_pPointNode != pCursor->GetNode(sal_True) ||
+ m_pSpellState->m_pMarkNode != pCursor->GetNode(sal_False)||
m_pSpellState->m_nPointPos != pCursor->GetPoint()->nContent.GetIndex()||
m_pSpellState->m_nMarkPos != pCursor->GetMark()->nContent.GetIndex())
bInvalidate = true;
@@ -642,8 +642,8 @@ void SwSpellDialogChildWindow::LoseFocus()
{
//store a node pointer and a pam-position to be able to check on next GetFocus();
SwPaM* pCursor = pWrtShell->GetCrsr();
- m_pSpellState->m_pPointNode = pCursor->GetNode(TRUE);
- m_pSpellState->m_pMarkNode = pCursor->GetNode(FALSE);
+ m_pSpellState->m_pPointNode = pCursor->GetNode(sal_True);
+ m_pSpellState->m_pMarkNode = pCursor->GetNode(sal_False);
m_pSpellState->m_nPointPos = pCursor->GetPoint()->nContent.GetIndex();
m_pSpellState->m_nMarkPos = pCursor->GetMark()->nContent.GetIndex();
@@ -689,7 +689,7 @@ SwWrtShell* SwSpellDialogChildWindow::GetWrtShell_Impl()
SwView* pView = 0;
if(pDispatch)
{
- USHORT nShellIdx = 0;
+ sal_uInt16 nShellIdx = 0;
SfxShell* pShell;
while(0 != (pShell = pDispatch->GetShell(nShellIdx++)))
if(pShell->ISA(SwView))
@@ -877,13 +877,13 @@ bool SwSpellDialogChildWindow::FindNextDrawTextError_Impl(SwWrtShell& rSh)
{
//now the current one has to be deselected
if(pCurrentTextObj)
- pDrView->SdrEndTextEdit( TRUE );
+ pDrView->SdrEndTextEdit( sal_True );
//and the found one should be activated
rSh.MakeVisible(pTextObj->GetLogicRect());
Point aTmp( 0,0 );
rSh.SelectObj( aTmp, 0, pTextObj );
SdrPageView* pPV = pDrView->GetSdrPageView();
- rView.BeginTextEdit( pTextObj, pPV, &rView.GetEditWin(), FALSE, TRUE );
+ rView.BeginTextEdit( pTextObj, pPV, &rView.GetEditWin(), sal_False, sal_True );
rView.AttrChangedNotify(&rSh);
bNextDoc = true;
}
diff --git a/sw/source/ui/dialog/abstract.cxx b/sw/source/ui/dialog/abstract.cxx
index a265d03af1..53af6b6625 100644
--- a/sw/source/ui/dialog/abstract.cxx
+++ b/sw/source/ui/dialog/abstract.cxx
@@ -72,17 +72,17 @@ SwInsertAbstractDlg::~SwInsertAbstractDlg()
--------------------------------------------------*/
-BYTE SwInsertAbstractDlg::GetLevel() const
+sal_uInt8 SwInsertAbstractDlg::GetLevel() const
{
- return static_cast< BYTE >(aLevelNF.GetValue() - 1);
+ return static_cast< sal_uInt8 >(aLevelNF.GetValue() - 1);
}
/*-----------------22.02.97 15.34-------------------
--------------------------------------------------*/
-BYTE SwInsertAbstractDlg::GetPara() const
+sal_uInt8 SwInsertAbstractDlg::GetPara() const
{
- return (BYTE) aParaNF.GetValue();
+ return (sal_uInt8) aParaNF.GetValue();
}
diff --git a/sw/source/ui/dialog/ascfldlg.cxx b/sw/source/ui/dialog/ascfldlg.cxx
index f8333902be..5be1d1978d 100644
--- a/sw/source/ui/dialog/ascfldlg.cxx
+++ b/sw/source/ui/dialog/ascfldlg.cxx
@@ -66,7 +66,7 @@ using namespace ::com::sun::star;
const sal_Unicode cDialogExtraDataClose = '}';
const char __FAR_DATA sDialogImpExtraData[] = "EncImpDlg:{";
const char __FAR_DATA sDialogExpExtraData[] = "EncExpDlg:{";
-const USHORT nDialogExtraDataLen = 11; // 12345678901
+const sal_uInt16 nDialogExtraDataLen = 11; // 12345678901
SwAsciiFilterDlg::SwAsciiFilterDlg( Window* pParent, SwDocShell& rDocSh,
SvStream* pStream )
@@ -86,7 +86,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();
@@ -95,7 +95,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;
@@ -113,8 +113,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 )
@@ -125,20 +125,20 @@ SwAsciiFilterDlg::SwAsciiFilterDlg( Window* pParent, SwDocShell& rDocSh,
aBuffer[ nBytesRead + 2 ] = '0';
}
- BOOL bCR = FALSE, bLF = FALSE, bNoNormalChar = FALSE,
- bNullChar = FALSE;
- for( USHORT nCnt = 0; nCnt < nBytesRead; ++nCnt )
+ sal_Bool bCR = sal_False, bLF = sal_False, bNoNormalChar = sal_False,
+ bNullChar = sal_False;
+ for( sal_uInt16 nCnt = 0; nCnt < nBytesRead; ++nCnt )
switch( aBuffer[ nCnt ] )
{
- case 0x0: bNullChar = TRUE; break;
- case 0xA: bLF = TRUE; break;
- case 0xD: bCR = TRUE; break;
+ case 0x0: bNullChar = sal_True; break;
+ case 0xA: bLF = sal_True; break;
+ case 0xD: bCR = sal_True; break;
case 0xC:
case 0x1A:
case 0x9: break;
default:
if( 0x20 > aBuffer[ nCnt ] )
- bNoNormalChar = TRUE;
+ bNoNormalChar = sal_True;
}
if( !bNullChar )
@@ -168,9 +168,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 )
{
@@ -179,7 +179,7 @@ SwAsciiFilterDlg::SwAsciiFilterDlg( Window* pParent, SwDocShell& rDocSh,
SID_PRINTER_CHANGESTODOC, SID_PRINTER_CHANGESTODOC,
0 );
pPrt = new SfxPrinter( pSet );
- bDelPrinter = TRUE;
+ bDelPrinter = sal_True;
}
@@ -203,7 +203,7 @@ SwAsciiFilterDlg::SwAsciiFilterDlg( Window* pParent, SwDocShell& rDocSh,
{
if(pDoc)
{
- USHORT nFontRes = RES_CHRATR_FONT;
+ sal_uInt16 nFontRes = RES_CHRATR_FONT;
if(SCRIPTTYPE_ASIAN == nAppScriptType)
nFontRes = RES_CHRATR_CJK_FONT;
else if(SCRIPTTYPE_COMPLEX == nAppScriptType)
@@ -214,7 +214,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)
@@ -234,7 +234,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());
}
@@ -257,7 +257,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() );
}
}
@@ -315,18 +315,18 @@ SwAsciiFilterDlg::~SwAsciiFilterDlg()
void SwAsciiFilterDlg::FillOptions( SwAsciiOptions& rOptions )
{
- ULONG nCCode = aCharSetLB.GetSelectTextEncoding();
+ sal_uLong nCCode = aCharSetLB.GetSelectTextEncoding();
String sFont;
- ULONG nLng = 0;
+ sal_uLong nLng = 0;
if( aFontLB.IsVisible() )
{
sFont = aFontLB.GetSelectEntry();
- nLng = (ULONG)aLanguageLB.GetSelectLanguage();
+ nLng = (sal_uLong)aLanguageLB.GetSelectLanguage();
}
rOptions.SetFontName( sFont );
rOptions.SetCharSet( rtl_TextEncoding( nCCode ) );
- rOptions.SetLanguage( USHORT( nLng ) );
+ rOptions.SetLanguage( sal_uInt16( nLng ) );
rOptions.SetParaFlags( GetCRLF() );
// JP: Task #71802# save the user settings
@@ -337,7 +337,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
@@ -431,7 +431,7 @@ IMPL_LINK( SwAsciiFilterDlg, CharSetSelHdl, SvxTextEncodingBox*, pBox )
}
}
- bSaveLineStatus = FALSE;
+ bSaveLineStatus = sal_False;
if( eEnd != (LineEnd)-1 ) // changed?
{
if( eOldEnd != eEnd )
@@ -444,7 +444,7 @@ IMPL_LINK( SwAsciiFilterDlg, CharSetSelHdl, SvxTextEncodingBox*, pBox )
aCR_RB.Check( aCR_RB.GetSavedValue() );
aLF_RB.Check( aLF_RB.GetSavedValue() );
}
- bSaveLineStatus = TRUE;
+ bSaveLineStatus = sal_True;
if( nOldLng != nLng && aFontLB.IsVisible() )
aLanguageLB.SelectLanguage( nLng );
diff --git a/sw/source/ui/dialog/docstdlg.cxx b/sw/source/ui/dialog/docstdlg.cxx
index b96fa4f1ee..a38af089e8 100644
--- a/sw/source/ui/dialog/docstdlg.cxx
+++ b/sw/source/ui/dialog/docstdlg.cxx
@@ -110,9 +110,9 @@ SwDocStatPage::SwDocStatPage(Window *pParent, const SfxItemSet &rSet) :
SwFEShell* pFEShell = pDocShell->GetFEShell();
if(!pFEShell)
{
- aUpdatePB.Show(FALSE);
- aLineLbl.Show(FALSE);
- aLineNo .Show(FALSE);
+ aUpdatePB.Show(sal_False);
+ aLineLbl.Show(sal_False);
+ aLineNo .Show(sal_False);
}
}
@@ -127,9 +127,9 @@ SwDocStatPage::SwDocStatPage(Window *pParent, const SfxItemSet &rSet) :
--------------------------------------------------------------------*/
-BOOL SwDocStatPage::FillItemSet(SfxItemSet & /*rSet*/)
+sal_Bool SwDocStatPage::FillItemSet(SfxItemSet & /*rSet*/)
{
- return FALSE;
+ return sal_False;
}
/*--------------------------------------------------------------------
@@ -172,7 +172,7 @@ void SwDocStatPage::Update()
ASSERT( pSh, "Shell not found" );
- SwWait aWait( *pSh->GetDoc()->GetDocShell(), TRUE );
+ SwWait aWait( *pSh->GetDoc()->GetDocShell(), sal_True );
pSh->StartAction();
aDocStat = pSh->GetDoc()->GetDocStat();
pSh->GetDoc()->UpdateDocStat( aDocStat );
@@ -190,7 +190,7 @@ IMPL_LINK( SwDocStatPage, UpdateHdl, PushButton*, EMPTYARG)
SwDocShell* pDocShell = (SwDocShell*) SfxObjectShell::Current();
SwFEShell* pFEShell = pDocShell->GetFEShell();
if(pFEShell)
- aLineNo.SetText( String::CreateFromInt32( pFEShell->GetLineCount(FALSE)));
+ aLineNo.SetText( String::CreateFromInt32( pFEShell->GetLineCount(sal_False)));
//pButton->Disable();
return 0;
}
diff --git a/sw/source/ui/dialog/macassgn.cxx b/sw/source/ui/dialog/macassgn.cxx
index ef83dba1a3..2e7bb7e52b 100644
--- a/sw/source/ui/dialog/macassgn.cxx
+++ b/sw/source/ui/dialog/macassgn.cxx
@@ -61,16 +61,14 @@
using ::com::sun::star::uno::Reference;
using ::com::sun::star::frame::XFrame;
-// SvStringsDtor* __EXPORT _GetRangeHdl( _SfxMacroTabPage*, const String& );
-
SfxEventNamesItem SwMacroAssignDlg::AddEvents( DlgEventType eType )
{
// const SfxItemSet& rSet = rPg.GetItemSet();
SfxEventNamesItem aItem(SID_EVENTCONFIG);
- BOOL bHtmlMode = FALSE;
- USHORT nHtmlMode = ::GetHtmlMode((const SwDocShell*)SfxObjectShell::Current());
- bHtmlMode = nHtmlMode & HTMLMODE_ON ? TRUE : FALSE;
+ sal_Bool bHtmlMode = sal_False;
+ sal_uInt16 nHtmlMode = ::GetHtmlMode((const SwDocShell*)SfxObjectShell::Current());
+ bHtmlMode = nHtmlMode & HTMLMODE_ON ? sal_True : sal_False;
switch( eType )
{
@@ -133,10 +131,10 @@ SfxEventNamesItem SwMacroAssignDlg::AddEvents( DlgEventType eType )
}
-BOOL SwMacroAssignDlg::INetFmtDlg( Window* pParent, SwWrtShell& rSh,
+sal_Bool SwMacroAssignDlg::INetFmtDlg( Window* pParent, SwWrtShell& rSh,
SvxMacroItem*& rpINetItem )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
SfxItemSet aSet( rSh.GetAttrPool(), RES_FRMMACRO, RES_FRMMACRO, SID_EVENTCONFIG, SID_EVENTCONFIG, 0 );
SvxMacroItem aItem( RES_FRMMACRO );
if( !rpINetItem )
@@ -155,42 +153,11 @@ 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;
}
-
-/*
-SvStringsDtor* __EXPORT _GetRangeHdl( _SfxMacroTabPage* , const String& rLanguage )
-{
- SvStringsDtor* pNew = new SvStringsDtor;
-
- SfxApplication* pSfxApp = SFX_APP();
- if ( !rLanguage.EqualsAscii(SVX_MACRO_LANGUAGE_JAVASCRIPT) )
- {
- pSfxApp->EnterBasicCall();
-
- String* pNewEntry = new String( pSfxApp->GetName() );
- pNew->Insert( pNewEntry, pNew->Count() );
-
- TypeId aType( TYPE( SwDocShell ));
- SfxObjectShell* pDoc = SfxObjectShell::GetFirst( &aType );
- while( pDoc )
- {
- pNewEntry = new String( pDoc->GetTitle() );
- pNew->Insert( pNewEntry, pNew->Count() );
- pDoc = SfxObjectShell::GetNext( *pDoc, &aType );
- }
- pSfxApp->LeaveBasicCall();
- }
-
- return pNew;
-}
-*/
-
-
-
diff --git a/sw/source/ui/dialog/regionsw.cxx b/sw/source/ui/dialog/regionsw.cxx
index b9ebb07f83..e1c8f636d8 100644
--- a/sw/source/ui/dialog/regionsw.cxx
+++ b/sw/source/ui/dialog/regionsw.cxx
@@ -111,7 +111,7 @@ void SwBaseShell::InsertRegionDialog(SfxRequest& rReq)
const SfxPoolItem *pItem = 0;
String aTmpStr;
if ( SFX_ITEM_SET ==
- pSet->GetItemState(FN_PARAM_REGION_NAME, TRUE, &pItem) )
+ pSet->GetItemState(FN_PARAM_REGION_NAME, sal_True, &pItem) )
aTmpStr = rSh.GetUniqueSectionName(
&((const SfxStringItem *)pItem)->GetValue() );
else
@@ -121,36 +121,36 @@ void SwBaseShell::InsertRegionDialog(SfxRequest& rReq)
rReq.SetReturnValue(SfxStringItem(FN_INSERT_REGION, aTmpStr));
aSet.Put( *pSet );
- if(SFX_ITEM_SET == pSet->GetItemState(SID_ATTR_COLUMNS, FALSE, &pItem)||
- SFX_ITEM_SET == pSet->GetItemState(FN_INSERT_REGION, FALSE, &pItem))
+ if(SFX_ITEM_SET == pSet->GetItemState(SID_ATTR_COLUMNS, sal_False, &pItem)||
+ SFX_ITEM_SET == pSet->GetItemState(FN_INSERT_REGION, sal_False, &pItem))
{
SwFmtCol aCol;
SwRect aRect;
rSh.CalcBoundRect(aRect, FLY_AS_CHAR);
long nWidth = aRect.Width();
- USHORT nCol = ((SfxUInt16Item *)pItem)->GetValue();
+ sal_uInt16 nCol = ((SfxUInt16Item *)pItem)->GetValue();
if(nCol)
{
- aCol.Init( nCol, 0, static_cast< USHORT >(nWidth) );
+ aCol.Init( nCol, 0, static_cast< sal_uInt16 >(nWidth) );
aSet.Put(aCol);
}
}
- else if(SFX_ITEM_SET == pSet->GetItemState(RES_COL, FALSE, &pItem))
+ else if(SFX_ITEM_SET == pSet->GetItemState(RES_COL, sal_False, &pItem))
{
aSet.Put(*pItem);
}
- const BOOL bHidden = SFX_ITEM_SET ==
- pSet->GetItemState(FN_PARAM_REGION_HIDDEN, TRUE, &pItem)?
- (BOOL)((const SfxBoolItem *)pItem)->GetValue():FALSE;
- const BOOL bProtect = SFX_ITEM_SET ==
- pSet->GetItemState(FN_PARAM_REGION_PROTECT, TRUE, &pItem)?
- (BOOL)((const SfxBoolItem *)pItem)->GetValue():FALSE;
+ const sal_Bool bHidden = SFX_ITEM_SET ==
+ pSet->GetItemState(FN_PARAM_REGION_HIDDEN, sal_True, &pItem)?
+ (sal_Bool)((const SfxBoolItem *)pItem)->GetValue():sal_False;
+ const sal_Bool bProtect = SFX_ITEM_SET ==
+ pSet->GetItemState(FN_PARAM_REGION_PROTECT, sal_True, &pItem)?
+ (sal_Bool)((const SfxBoolItem *)pItem)->GetValue():sal_False;
// --> FME 2004-06-22 #114856# edit in readonly sections
- const BOOL bEditInReadonly = SFX_ITEM_SET ==
- pSet->GetItemState(FN_PARAM_REGION_EDIT_IN_READONLY, TRUE, &pItem)?
- (BOOL)((const SfxBoolItem *)pItem)->GetValue():FALSE;
+ const sal_Bool bEditInReadonly = SFX_ITEM_SET ==
+ pSet->GetItemState(FN_PARAM_REGION_EDIT_IN_READONLY, sal_True, &pItem)?
+ (sal_Bool)((const SfxBoolItem *)pItem)->GetValue():sal_False;
// <--
aSection.SetProtectFlag(bProtect);
@@ -160,16 +160,16 @@ void SwBaseShell::InsertRegionDialog(SfxRequest& rReq)
// <--
if(SFX_ITEM_SET ==
- pSet->GetItemState(FN_PARAM_REGION_CONDITION, TRUE, &pItem))
+ pSet->GetItemState(FN_PARAM_REGION_CONDITION, sal_True, &pItem))
aSection.SetCondition(((const SfxStringItem *)pItem)->GetValue());
String aFile, aSub;
if(SFX_ITEM_SET ==
- pSet->GetItemState(FN_PARAM_1, TRUE, &pItem))
+ pSet->GetItemState(FN_PARAM_1, sal_True, &pItem))
aFile = ((const SfxStringItem *)pItem)->GetValue();
if(SFX_ITEM_SET ==
- pSet->GetItemState(FN_PARAM_3, TRUE, &pItem))
+ pSet->GetItemState(FN_PARAM_3, sal_True, &pItem))
aSub = ((const SfxStringItem *)pItem)->GetValue();
@@ -180,7 +180,7 @@ void SwBaseShell::InsertRegionDialog(SfxRequest& rReq)
sLinkFileName.SetToken(0, sfx2::cTokenSeperator,aFile);
if(SFX_ITEM_SET ==
- pSet->GetItemState(FN_PARAM_2, TRUE, &pItem))
+ pSet->GetItemState(FN_PARAM_2, sal_True, &pItem))
sLinkFileName.SetToken(1, sfx2::cTokenSeperator,
((const SfxStringItem *)pItem)->GetValue());
@@ -230,10 +230,10 @@ IMPL_STATIC_LINK( SwWrtShell, InsertRegionDialog, SwSectionData*, pSect )
void SwBaseShell::EditRegionDialog(SfxRequest& rReq)
{
const SfxItemSet* pArgs = rReq.GetArgs();
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
const SfxPoolItem* pItem = 0;
if(pArgs)
- pArgs->GetItemState(nSlot, FALSE, &pItem);
+ pArgs->GetItemState(nSlot, sal_False, &pItem);
SwWrtShell& rWrtShell = GetShell();
switch ( nSlot )
@@ -241,7 +241,7 @@ void SwBaseShell::EditRegionDialog(SfxRequest& rReq)
case FN_EDIT_REGION:
{
Window* pParentWin = &GetView().GetViewFrame()->GetWindow();
- BOOL bStart = TRUE;
+ sal_Bool bStart = sal_True;
if(bStart)
{
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
diff --git a/sw/source/ui/dialog/swabstdlg.cxx b/sw/source/ui/dialog/swabstdlg.cxx
index 2e092a07f7..1cf7463d85 100644
--- a/sw/source/ui/dialog/swabstdlg.cxx
+++ b/sw/source/ui/dialog/swabstdlg.cxx
@@ -42,7 +42,7 @@ SwAbstractDialogFactory* SwAbstractDialogFactory::Create()
{
SwFuncPtrCreateDialogFactory fp = 0;
static ::osl::Module aDialogLibrary;
- static const ::rtl::OUString sLibName(::vcl::unohelper::CreateLibraryName("swui", TRUE));
+ static const ::rtl::OUString sLibName(::vcl::unohelper::CreateLibraryName("swui", sal_True));
if ( aDialogLibrary.is() || aDialogLibrary.loadRelative( &thisModule, String( sLibName ) ) )
fp = ( SwAbstractDialogFactory* (__LOADONCALLAPI*)() )
aDialogLibrary.getFunctionSymbol( ::rtl::OUString::createFromAscii("CreateDialogFactory") );
diff --git a/sw/source/ui/dialog/swdlgfact.cxx b/sw/source/ui/dialog/swdlgfact.cxx
index 284b26135a..fa885838d2 100644
--- a/sw/source/ui/dialog/swdlgfact.cxx
+++ b/sw/source/ui/dialog/swdlgfact.cxx
@@ -146,7 +146,7 @@ IMPL_ABSTDLG_BASE(AbstractIndexMarkFloatDlg_Impl);
IMPL_ABSTDLG_BASE(AbstractAuthMarkFloatDlg_Impl);
// AbstractTabDialog_Impl begin
-void AbstractTabDialog_Impl::SetCurPageId( USHORT nId )
+void AbstractTabDialog_Impl::SetCurPageId( sal_uInt16 nId )
{
pDlg->SetCurPageId( nId );
}
@@ -156,7 +156,7 @@ const SfxItemSet* AbstractTabDialog_Impl::GetOutputItemSet() const
return pDlg->GetOutputItemSet();
}
-const USHORT* AbstractTabDialog_Impl::GetInputRanges(const SfxItemPool& pItem )
+const sal_uInt16* AbstractTabDialog_Impl::GetInputRanges(const SfxItemPool& pItem )
{
return pDlg->GetInputRanges( pItem );
}
@@ -183,11 +183,11 @@ void AbstractSwWordCountDialog_Impl::SetValues(const SwDocStat& rCurrent, con
}
//add for SwInsertAbstractDlg begin
-BYTE AbstractSwInsertAbstractDlg_Impl::GetLevel() const
+sal_uInt8 AbstractSwInsertAbstractDlg_Impl::GetLevel() const
{
return pDlg->GetLevel();
}
-BYTE AbstractSwInsertAbstractDlg_Impl::GetPara() const
+sal_uInt8 AbstractSwInsertAbstractDlg_Impl::GetPara() const
{
return pDlg->GetPara();
}
@@ -228,12 +228,12 @@ String AbstractSwBreakDlg_Impl::GetTemplateName()
return pDlg->GetTemplateName();
}
-USHORT AbstractSwBreakDlg_Impl:: GetKind()
+sal_uInt16 AbstractSwBreakDlg_Impl:: GetKind()
{
return pDlg->GetKind();
}
-USHORT AbstractSwBreakDlg_Impl:: GetPageNumber()
+sal_uInt16 AbstractSwBreakDlg_Impl:: GetPageNumber()
{
return pDlg->GetPageNumber();
}
@@ -258,7 +258,7 @@ void AbstractSwInsertDBColAutoPilot_Impl::DataToDoc( const uno::Sequence< uno::A
//add for SwInsertDBColAutoPilot end
// add for DropDownFieldDialog begin
-ByteString AbstractDropDownFieldDialog_Impl::GetWindowState( ULONG nMask ) const
+ByteString AbstractDropDownFieldDialog_Impl::GetWindowState( sal_uLong nMask ) const
{
return pDlg->GetWindowState(nMask);
}
@@ -270,7 +270,7 @@ void AbstractDropDownFieldDialog_Impl::SetWindowState( const ByteString& r
//add for SwLabDlg begin
-void AbstarctSwLabDlg_Impl::SetCurPageId( USHORT nId )
+void AbstarctSwLabDlg_Impl::SetCurPageId( sal_uInt16 nId )
{
pDlg->SetCurPageId( nId );
}
@@ -280,7 +280,7 @@ const SfxItemSet* AbstarctSwLabDlg_Impl::GetOutputItemSet() const
return pDlg->GetOutputItemSet();
}
-const USHORT* AbstarctSwLabDlg_Impl::GetInputRanges(const SfxItemPool& pItem )
+const sal_uInt16* AbstarctSwLabDlg_Impl::GetInputRanges(const SfxItemPool& pItem )
{
return pDlg->GetInputRanges( pItem );
}
@@ -315,11 +315,11 @@ void AbstarctSwSelGlossaryDlg_Impl::InsertGlos(const String &rRegion, const Stri
{
pDlg->InsertGlos( rRegion, rGlosName );
}
-USHORT AbstarctSwSelGlossaryDlg_Impl::GetSelectedIdx() const
+sal_uInt16 AbstarctSwSelGlossaryDlg_Impl::GetSelectedIdx() const
{
return pDlg->GetSelectedIdx();
}
-void AbstarctSwSelGlossaryDlg_Impl::SelectEntryPos(USHORT nIdx)
+void AbstarctSwSelGlossaryDlg_Impl::SelectEntryPos(sal_uInt16 nIdx)
{
pDlg->SelectEntryPos( nIdx );
}
@@ -335,7 +335,7 @@ void AbstractSwAutoFormatDlg_Impl::FillAutoFmtOfIndex( SwTableAutoFmt*& rToFill
//add for SwAutoFormatDlg end
//add for SwFldDlg begin
-void AbstractSwFldDlg_Impl::SetCurPageId( USHORT nId )
+void AbstractSwFldDlg_Impl::SetCurPageId( sal_uInt16 nId )
{
pDlg->SetCurPageId( nId );
}
@@ -345,7 +345,7 @@ const SfxItemSet* AbstractSwFldDlg_Impl::GetOutputItemSet() const
return pDlg->GetOutputItemSet();
}
-const USHORT* AbstractSwFldDlg_Impl::GetInputRanges(const SfxItemPool& pItem )
+const sal_uInt16* AbstractSwFldDlg_Impl::GetInputRanges(const SfxItemPool& pItem )
{
return pDlg->GetInputRanges( pItem );
}
@@ -363,7 +363,7 @@ String AbstractSwFldDlg_Impl::GetText() const
{
return pDlg->GetText();
}
-void AbstractSwFldDlg_Impl::Start( BOOL bShowl )
+void AbstractSwFldDlg_Impl::Start( sal_Bool bShowl )
{
pDlg->Start( bShowl );
}
@@ -385,7 +385,7 @@ Window* AbstractSwFldDlg_Impl::GetWindow()
{
return (Window*)pDlg;
}
-void AbstractSwFldDlg_Impl::ShowPage( USHORT nId )
+void AbstractSwFldDlg_Impl::ShowPage( sal_uInt16 nId )
{
pDlg->ShowPage(nId);
}
@@ -408,7 +408,7 @@ void AbstractSwRenameXNamedDlg_Impl::SetAlternativeAccess(
//add for SwModalRedlineAcceptDlg begin
-void AbstractSwModalRedlineAcceptDlg_Impl::AcceptAll( BOOL bAccept )
+void AbstractSwModalRedlineAcceptDlg_Impl::AcceptAll( sal_Bool bAccept )
{
pDlg->AcceptAll( bAccept);
}
@@ -432,7 +432,7 @@ void AbstractFldInputDlg_Impl::SetWindowState( const ByteString& rStr )
pDlg->SetWindowState( rStr );
}
-ByteString AbstractFldInputDlg_Impl::GetWindowState( ULONG nMask ) const
+ByteString AbstractFldInputDlg_Impl::GetWindowState( sal_uLong nMask ) const
{
return pDlg->GetWindowState( nMask );
}
@@ -443,7 +443,7 @@ String AbstractInsFootNoteDlg_Impl::GetFontName()
{
return pDlg->GetFontName();
}
-BOOL AbstractInsFootNoteDlg_Impl::IsEndNote()
+sal_Bool AbstractInsFootNoteDlg_Impl::IsEndNote()
{
return pDlg->IsEndNote();
}
@@ -466,18 +466,18 @@ String AbstractInsertGrfRulerDlg_Impl::GetGraphicName()
{
return pDlg->GetGraphicName();
}
-BOOL AbstractInsertGrfRulerDlg_Impl::IsSimpleLine()
+sal_Bool AbstractInsertGrfRulerDlg_Impl::IsSimpleLine()
{
return pDlg->IsSimpleLine();
}
-BOOL AbstractInsertGrfRulerDlg_Impl::HasImages() const
+sal_Bool AbstractInsertGrfRulerDlg_Impl::HasImages() const
{
return pDlg->HasImages();
}
// AbstractInsertGrfRulerDlg_Impl end
// AbstractInsTableDlg_Impl begin
-void AbstractInsTableDlg_Impl::GetValues( String& rName, USHORT& rRow, USHORT& rCol,
+void AbstractInsTableDlg_Impl::GetValues( String& rName, sal_uInt16& rRow, sal_uInt16& rCol,
SwInsertTableOptions& rInsTblFlags, String& rTableAutoFmtName,
SwTableAutoFmt *& prTAFmt )
{
@@ -494,22 +494,22 @@ String AbstractJavaEditDialog_Impl::GetType()
{
return pDlg->GetType();
}
-BOOL AbstractJavaEditDialog_Impl::IsUrl()
+sal_Bool AbstractJavaEditDialog_Impl::IsUrl()
{
return pDlg->IsUrl();
}
-BOOL AbstractJavaEditDialog_Impl::IsNew()
+sal_Bool AbstractJavaEditDialog_Impl::IsNew()
{
return pDlg->IsNew();
}
-BOOL AbstractJavaEditDialog_Impl::IsUpdate()
+sal_Bool AbstractJavaEditDialog_Impl::IsUpdate()
{
return pDlg->IsUpdate();
}
// AbstractJavaEditDialog_Impl end
// AbstractMailMergeDlg_Impl begin
-USHORT AbstractMailMergeDlg_Impl::GetMergeType()
+sal_uInt16 AbstractMailMergeDlg_Impl::GetMergeType()
{
return pDlg->GetMergeType();
}
@@ -528,13 +528,13 @@ uno::Reference< sdbc::XResultSet> AbstractMailMergeDlg_Impl::GetResultSet() cons
}
// AbstractMailMergeDlg_Impl end
// AbstractMailMergeCreateFromDlg_Impl begin
-BOOL AbstractMailMergeCreateFromDlg_Impl::IsThisDocument() const
+sal_Bool AbstractMailMergeCreateFromDlg_Impl::IsThisDocument() const
{
return pDlg->IsThisDocument();
}
// AbstractMailMergeCreateFromDlg_Impl end
//AbstractMailMergeFieldConnectionsDlg_Impl begin
-BOOL AbstractMailMergeFieldConnectionsDlg_Impl::IsUseExistingConnections() const
+sal_Bool AbstractMailMergeFieldConnectionsDlg_Impl::IsUseExistingConnections() const
{
return pDlg->IsUseExistingConnections();
}
@@ -634,7 +634,7 @@ const String& AbstractMailMergeWizard_Impl::GetReloadDocument() const
{
return pDlg->GetReloadDocument();
}
-BOOL AbstractMailMergeWizard_Impl::ShowPage( USHORT nLevel )
+sal_Bool AbstractMailMergeWizard_Impl::ShowPage( sal_uInt16 nLevel )
{
return pDlg->skipUntil(nLevel);
}
@@ -795,7 +795,7 @@ VclAbstractDialog * SwAbstractDialogFactory_Impl::CreateSwChangeDBDlg( SwView& r
// add for SwCharDlg begin
SfxAbstractTabDialog * SwAbstractDialogFactory_Impl::CreateSwCharDlg(Window* pParent, SwView& pVw, const SfxItemSet& rCoreSet, int nResId, // add for SwCharDlg
- const String* pFmtStr , BOOL bIsDrwTxtDlg )
+ const String* pFmtStr , sal_Bool bIsDrwTxtDlg )
{
SfxTabDialog* pDlg=NULL;
@@ -903,7 +903,7 @@ SfxAbstractTabDialog * SwAbstractDialogFactory_Impl::CreateSwFootNoteOptionDlg(
//add for DropDownFieldDialog begin
AbstractDropDownFieldDialog * SwAbstractDialogFactory_Impl::CreateDropDownFieldDialog ( Window *pParent, SwWrtShell &rSh, //add for DropDownFieldDialog
- SwField* pField,int nResId, BOOL bNextButton )
+ SwField* pField,int nResId, sal_Bool bNextButton )
{
sw::DropDownFieldDialog* pDlg=NULL;
switch ( nResId )
@@ -925,7 +925,7 @@ AbstractDropDownFieldDialog * SwAbstractDialogFactory_Impl::CreateDropDownField
//add for SwEnvDlg begin
SfxAbstractTabDialog* SwAbstractDialogFactory_Impl::CreateSwEnvDlg ( Window* pParent, const SfxItemSet& rSet,
SwWrtShell* pWrtSh, Printer* pPrt,
- BOOL bInsert,int nResId ) //add for SwEnvDlg
+ sal_Bool bInsert,int nResId ) //add for SwEnvDlg
{
SfxTabDialog* pDlg=NULL;
switch ( nResId )
@@ -947,7 +947,7 @@ SfxAbstractTabDialog* SwAbstractDialogFactory_Impl::CreateSwEnvDlg ( Window* pPa
//add for SwLabDlg begin
AbstarctSwLabDlg* SwAbstractDialogFactory_Impl::CreateSwLabDlg ( Window* pParent, const SfxItemSet& rSet, //add for SwLabDlg
- SwNewDBMgr* pNewDBMgr, BOOL bLabel,int nResId )
+ SwNewDBMgr* pNewDBMgr, sal_Bool bLabel,int nResId )
{
SwLabDlg* pDlg=NULL;
switch ( nResId )
@@ -975,10 +975,10 @@ SwLabDlgMethod SwAbstractDialogFactory_Impl::GetSwLabDlgStaticMethod ()
//add for SwParaDlg begin
SfxAbstractTabDialog* SwAbstractDialogFactory_Impl::CreateSwParaDlg ( Window *pParent, SwView& rVw,
const SfxItemSet& rCoreSet ,
- BYTE nDialogMode,
+ sal_uInt8 nDialogMode,
int nResId,
const String *pCollName,
- BOOL bDraw , UINT16 nDefPage)
+ sal_Bool bDraw , sal_uInt16 nDefPage)
{
SfxTabDialog* pDlg=NULL;
switch ( nResId )
@@ -1057,7 +1057,7 @@ AbstarctSwSelGlossaryDlg * SwAbstractDialogFactory_Impl::CreateSwSelGlossaryDlg
//add for SwAutoFormatDlg begin
AbstractSwAutoFormatDlg * SwAbstractDialogFactory_Impl::CreateSwAutoFormatDlg( Window* pParent, SwWrtShell* pShell,
int nResId,
- BOOL bSetAutoFmt,
+ sal_Bool bSetAutoFmt,
const SwTableAutoFmt* pSelFmt )
{
SwAutoFormatDlg* pDlg=NULL;
@@ -1078,7 +1078,7 @@ AbstractSwAutoFormatDlg * SwAbstractDialogFactory_Impl::CreateSwAutoFormatDlg( W
//add for SwAutoFormatDlg end
//add for SwBorderDlg begin
-SfxAbstractDialog * SwAbstractDialogFactory_Impl::CreateSwBorderDlg (Window* pParent, SfxItemSet& rSet, USHORT nType,int nResId )
+SfxAbstractDialog * SwAbstractDialogFactory_Impl::CreateSwBorderDlg (Window* pParent, SfxItemSet& rSet, sal_uInt16 nType,int nResId )
{
SfxModalDialog* pDlg=NULL;
switch ( nResId )
@@ -1097,7 +1097,7 @@ SfxAbstractDialog * SwAbstractDialogFactory_Impl::CreateSwBorderDlg (Window* pPa
//add for SwBorderDlg end
//add for SwWrapDlg begin
-SfxAbstractDialog* SwAbstractDialogFactory_Impl::CreateSwWrapDlg ( Window* pParent, SfxItemSet& rSet, SwWrtShell* pSh, BOOL bDrawMode, int nResId )
+SfxAbstractDialog* SwAbstractDialogFactory_Impl::CreateSwWrapDlg ( Window* pParent, SfxItemSet& rSet, SwWrtShell* pSh, sal_Bool bDrawMode, int nResId )
{
SfxModalDialog* pDlg=NULL;
switch ( nResId )
@@ -1237,7 +1237,7 @@ AbstractSwModalRedlineAcceptDlg * SwAbstractDialogFactory_Impl::CreateSwModalRed
//add for SwModalRedlineAcceptDlg end
VclAbstractDialog * SwAbstractDialogFactory_Impl::CreateSwVclDialog( int nResId,
- Window* pParent, BOOL& rWithPrev ) //add for SwMergeTblDlg
+ Window* pParent, sal_Bool& rWithPrev ) //add for SwMergeTblDlg
{
Dialog* pDlg=NULL;
switch ( nResId )
@@ -1255,10 +1255,10 @@ VclAbstractDialog * SwAbstractDialogFactory_Impl::CreateSwVclDialog( int nResId,
SfxAbstractTabDialog* SwAbstractDialogFactory_Impl::CreateFrmTabDialog( int nResId,
SfxViewFrame *pFrame, Window *pParent,
const SfxItemSet& rCoreSet,
- BOOL bNewFrm,
- USHORT nResType,
- BOOL bFmt,
- UINT16 nDefPage,
+ sal_Bool bNewFrm,
+ sal_uInt16 nResType,
+ sal_Bool bFmt,
+ sal_uInt16 nDefPage,
const String* pFmtStr ) //add for SwFrmDlg
{
SfxTabDialog* pDlg=NULL;
@@ -1281,10 +1281,10 @@ SfxAbstractTabDialog* SwAbstractDialogFactory_Impl::CreateFrmTabDialog( int nRes
SfxAbstractTabDialog* SwAbstractDialogFactory_Impl::CreateTemplateDialog( int nResId,
Window* pParent,
SfxStyleSheetBase& rBase,
- USHORT nRegion,
- BOOL bColumn,
+ sal_uInt16 nRegion,
+ sal_Bool bColumn,
SwWrtShell* pActShell,
- BOOL bNew ) //add for SwTemplateDlg
+ sal_Bool bNew ) //add for SwTemplateDlg
{
SfxTabDialog* pDlg=NULL;
switch ( nResId )
@@ -1322,7 +1322,7 @@ AbstractGlossaryDlg* SwAbstractDialogFactory_Impl::CreateGlossaryDlg( int nResId
AbstractFldInputDlg* SwAbstractDialogFactory_Impl::CreateFldInputDlg( int nResId,
Window *pParent, SwWrtShell &rSh,
- SwField* pField, BOOL bNextButton ) //add for SwFldInputDlg
+ SwField* pField, sal_Bool bNextButton ) //add for SwFldInputDlg
{
SwFldInputDlg* pDlg=NULL;
switch ( nResId )
@@ -1339,7 +1339,7 @@ AbstractFldInputDlg* SwAbstractDialogFactory_Impl::CreateFldInputDlg( int nResId
}
AbstractInsFootNoteDlg* SwAbstractDialogFactory_Impl::CreateInsFootNoteDlg( int nResId,
- Window * pParent, SwWrtShell &rSh, BOOL bEd ) //add for SwInsFootNoteDlg
+ Window * pParent, SwWrtShell &rSh, sal_Bool bEd ) //add for SwInsFootNoteDlg
{
SwInsFootNoteDlg* pDlg=NULL;
switch ( nResId )
@@ -1356,7 +1356,7 @@ AbstractInsFootNoteDlg* SwAbstractDialogFactory_Impl::CreateInsFootNoteDlg( int
}
VclAbstractDialog * SwAbstractDialogFactory_Impl::CreateVclSwViewDialog( int nResId,
- SwView& rView, BOOL /*bCol*/ ) //add for SwInsRowColDlg, SwLineNumberingDlg
+ SwView& rView, sal_Bool /*bCol*/ ) //add for SwInsRowColDlg, SwLineNumberingDlg
{
Dialog* pDlg=NULL;
switch ( nResId )
@@ -1520,8 +1520,8 @@ SfxAbstractTabDialog* SwAbstractDialogFactory_Impl::CreateSwTabDialog( int nResI
AbstractMultiTOXTabDialog * SwAbstractDialogFactory_Impl::CreateMultiTOXTabDialog( int nResId,
Window* pParent, const SfxItemSet& rSet,
SwWrtShell &rShell,
- SwTOXBase* pCurTOX, USHORT nToxType,
- BOOL bGlobal ) //add for SwMultiTOXTabDialog
+ SwTOXBase* pCurTOX, sal_uInt16 nToxType,
+ sal_Bool bGlobal ) //add for SwMultiTOXTabDialog
{
SwMultiTOXTabDialog* pDlg=NULL;
switch ( nResId )
@@ -1640,7 +1640,7 @@ AbstractMailMergeWizard* SwAbstractDialogFactory_Impl::CreateMailMergeWizard(
}
//add for static func in SwGlossaryDlg
-GlossaryGetCurrGroup SwAbstractDialogFactory_Impl::GetGlossaryCurrGroupFunc( USHORT nId )
+GlossaryGetCurrGroup SwAbstractDialogFactory_Impl::GetGlossaryCurrGroupFunc( sal_uInt16 nId )
{
switch ( nId )
{
@@ -1651,7 +1651,7 @@ GlossaryGetCurrGroup SwAbstractDialogFactory_Impl::GetGlossaryCurrGroupFunc( USH
}
return 0;
}
-GlossarySetActGroup SwAbstractDialogFactory_Impl::SetGlossaryActGroupFunc( USHORT nId )
+GlossarySetActGroup SwAbstractDialogFactory_Impl::SetGlossaryActGroupFunc( sal_uInt16 nId )
{
switch ( nId )
{
@@ -1664,7 +1664,7 @@ GlossarySetActGroup SwAbstractDialogFactory_Impl::SetGlossaryActGroupFunc( USHOR
}
//------------------ Factories for TabPages
-CreateTabPage SwAbstractDialogFactory_Impl::GetTabPageCreatorFunc( USHORT nId )
+CreateTabPage SwAbstractDialogFactory_Impl::GetTabPageCreatorFunc( sal_uInt16 nId )
{
CreateTabPage pRet = 0;
switch ( nId )
@@ -1727,7 +1727,7 @@ CreateTabPage SwAbstractDialogFactory_Impl::GetTabPageCreatorFunc( USHORT nId )
return pRet;
}
-GetTabPageRanges SwAbstractDialogFactory_Impl::GetTabPageRangesFunc( USHORT nId )
+GetTabPageRanges SwAbstractDialogFactory_Impl::GetTabPageRangesFunc( sal_uInt16 nId )
{
switch ( nId )
{
diff --git a/sw/source/ui/dialog/swdlgfact.hxx b/sw/source/ui/dialog/swdlgfact.hxx
index 3793d6c57f..e2fe53ae36 100644
--- a/sw/source/ui/dialog/swdlgfact.hxx
+++ b/sw/source/ui/dialog/swdlgfact.hxx
@@ -64,7 +64,7 @@ public: \
{} \
virtual ~Class(); \
virtual short Execute() ;
-// virtual void Show( BOOL bVisible = TRUE, USHORT nFlags = 0 )
+// virtual void Show( sal_Bool bVisible = sal_True, sal_uInt16 nFlags = 0 )
#define IMPL_ABSTDLG_BASE(Class) \
Class::~Class() \
@@ -87,8 +87,8 @@ class AbstractSwWordCountDialog_Impl : public AbstractSwWordCountDialog
class AbstractSwInsertAbstractDlg_Impl : public AbstractSwInsertAbstractDlg
{
DECL_ABSTDLG_BASE(AbstractSwInsertAbstractDlg_Impl,SwInsertAbstractDlg)
- virtual BYTE GetLevel() const ;
- virtual BYTE GetPara() const ;
+ virtual sal_uInt8 GetLevel() const ;
+ virtual sal_uInt8 GetPara() const ;
};
//add for SwInsertAbstractDlg end
@@ -125,8 +125,8 @@ class AbstractSwBreakDlg_Impl : public AbstractSwBreakDlg // add for SwBreakDlg
{
DECL_ABSTDLG_BASE(AbstractSwBreakDlg_Impl,SwBreakDlg)
virtual String GetTemplateName();
- virtual USHORT GetKind();
- virtual USHORT GetPageNumber();
+ virtual sal_uInt16 GetKind();
+ virtual sal_uInt16 GetPageNumber();
};
class AbstractSplitTableDialog_Impl : public AbstractSplitTableDialog // add for
@@ -141,9 +141,9 @@ class AbstractSplitTableDialog_Impl : public AbstractSplitTableDialog // add for
class AbstractTabDialog_Impl : public SfxAbstractTabDialog
{
DECL_ABSTDLG_BASE( AbstractTabDialog_Impl,SfxTabDialog )
- virtual void SetCurPageId( USHORT nId );
+ virtual void SetCurPageId( sal_uInt16 nId );
virtual const SfxItemSet* GetOutputItemSet() const;
- virtual const USHORT* GetInputRanges( const SfxItemPool& pItem );
+ virtual const sal_uInt16* GetInputRanges( const SfxItemPool& pItem );
virtual void SetInputSet( const SfxItemSet* pInSet );
//From class Window.
virtual void SetText( const XubString& rStr );
@@ -175,7 +175,7 @@ class AbstractSwInsertDBColAutoPilot_Impl : public AbstractSwInsertDBColAutoPil
class AbstractDropDownFieldDialog_Impl : public AbstractDropDownFieldDialog //add for DropDownFieldDialog
{
DECL_ABSTDLG_BASE(AbstractDropDownFieldDialog_Impl, sw::DropDownFieldDialog)
- virtual ByteString GetWindowState( ULONG nMask = WINDOWSTATE_MASK_ALL ) const; //this method inherit from SystemWindow
+ virtual ByteString GetWindowState( sal_uLong nMask = WINDOWSTATE_MASK_ALL ) const; //this method inherit from SystemWindow
virtual void SetWindowState( const ByteString& rStr );//this method inherit from SystemWindow
};
//add for DropDownFieldDialog end
@@ -184,9 +184,9 @@ class AbstractDropDownFieldDialog_Impl : public AbstractDropDownFieldDialog //ad
class AbstarctSwLabDlg_Impl : public AbstarctSwLabDlg
{
DECL_ABSTDLG_BASE(AbstarctSwLabDlg_Impl,SwLabDlg)
- virtual void SetCurPageId( USHORT nId );
+ virtual void SetCurPageId( sal_uInt16 nId );
virtual const SfxItemSet* GetOutputItemSet() const;
- virtual const USHORT* GetInputRanges( const SfxItemPool& pItem );
+ virtual const sal_uInt16* GetInputRanges( const SfxItemPool& pItem );
virtual void SetInputSet( const SfxItemSet* pInSet );
//From class Window.
virtual void SetText( const XubString& rStr );
@@ -201,8 +201,8 @@ class AbstarctSwSelGlossaryDlg_Impl : public AbstarctSwSelGlossaryDlg
{
DECL_ABSTDLG_BASE(AbstarctSwSelGlossaryDlg_Impl,SwSelGlossaryDlg)
virtual void InsertGlos(const String &rRegion, const String &rGlosName); // inline
- virtual USHORT GetSelectedIdx() const; // inline
- virtual void SelectEntryPos(USHORT nIdx); // inline
+ virtual sal_uInt16 GetSelectedIdx() const; // inline
+ virtual void SelectEntryPos(sal_uInt16 nIdx); // inline
};
//add for SwSelGlossaryDlg end
@@ -219,15 +219,15 @@ class AbstractSwAutoFormatDlg_Impl : public AbstractSwAutoFormatDlg
class AbstractSwFldDlg_Impl : public AbstractSwFldDlg //add for SwFldDlg
{
DECL_ABSTDLG_BASE(AbstractSwFldDlg_Impl,SwFldDlg )
- virtual void SetCurPageId( USHORT nId );
+ virtual void SetCurPageId( sal_uInt16 nId );
virtual const SfxItemSet* GetOutputItemSet() const;
- virtual const USHORT* GetInputRanges( const SfxItemPool& pItem );
+ virtual const sal_uInt16* GetInputRanges( const SfxItemPool& pItem );
virtual void SetInputSet( const SfxItemSet* pInSet );
//From class Window.
virtual void SetText( const XubString& rStr );
virtual String GetText() const;
- virtual void Start( BOOL bShow = TRUE ); //this method from SfxTabDialog
- virtual void ShowPage( USHORT nId );// this method from SfxTabDialog
+ virtual void Start( sal_Bool bShow = sal_True ); //this method from SfxTabDialog
+ virtual void ShowPage( sal_uInt16 nId );// this method from SfxTabDialog
virtual void Initialize(SfxChildWinInfo *pInfo);
virtual void ReInitDlg();
virtual void ActivateDatabasePage();
@@ -249,7 +249,7 @@ class AbstractSwRenameXNamedDlg_Impl : public AbstractSwRenameXNamedDlg
class AbstractSwModalRedlineAcceptDlg_Impl : public AbstractSwModalRedlineAcceptDlg
{
DECL_ABSTDLG_BASE(AbstractSwModalRedlineAcceptDlg_Impl,SwModalRedlineAcceptDlg )
- virtual void AcceptAll( BOOL bAccept );
+ virtual void AcceptAll( sal_Bool bAccept );
};
//add for SwModalRedlineAcceptDlg end
@@ -270,7 +270,7 @@ class AbstractFldInputDlg_Impl : public AbstractFldInputDlg
DECL_ABSTDLG_BASE(AbstractFldInputDlg_Impl,SwFldInputDlg)
//from class SalFrame
virtual void SetWindowState( const ByteString& rStr ) ;
- virtual ByteString GetWindowState( ULONG nMask = WINDOWSTATE_MASK_ALL ) const ;
+ virtual ByteString GetWindowState( sal_uLong nMask = WINDOWSTATE_MASK_ALL ) const ;
};
//for SwFldInputDlg end
@@ -280,7 +280,7 @@ class AbstractInsFootNoteDlg_Impl : public AbstractInsFootNoteDlg
{
DECL_ABSTDLG_BASE(AbstractInsFootNoteDlg_Impl,SwInsFootNoteDlg)
virtual String GetFontName();
- virtual BOOL IsEndNote();
+ virtual sal_Bool IsEndNote();
virtual String GetStr();
//from class Window
virtual void SetHelpId( const rtl::OString& sHelpId );
@@ -294,8 +294,8 @@ class AbstractInsertGrfRulerDlg_Impl : public AbstractInsertGrfRulerDlg
{
DECL_ABSTDLG_BASE(AbstractInsertGrfRulerDlg_Impl,SwInsertGrfRulerDlg)
virtual String GetGraphicName();
- virtual BOOL IsSimpleLine();
- virtual BOOL HasImages() const ;
+ virtual sal_Bool IsSimpleLine();
+ virtual sal_Bool HasImages() const ;
};
//for SwInsertGrfRulerDlg end
@@ -304,7 +304,7 @@ class SwInsTableDlg;
class AbstractInsTableDlg_Impl : public AbstractInsTableDlg
{
DECL_ABSTDLG_BASE(AbstractInsTableDlg_Impl,SwInsTableDlg)
- virtual void GetValues( String& rName, USHORT& rRow, USHORT& rCol,
+ virtual void GetValues( String& rName, sal_uInt16& rRow, sal_uInt16& rCol,
SwInsertTableOptions& rInsTblFlags, String& rTableAutoFmtName,
SwTableAutoFmt *& prTAFmt );
};
@@ -317,9 +317,9 @@ class AbstractJavaEditDialog_Impl : public AbstractJavaEditDialog
DECL_ABSTDLG_BASE(AbstractJavaEditDialog_Impl,SwJavaEditDialog)
virtual String GetText();
virtual String GetType();
- virtual BOOL IsUrl();
- virtual BOOL IsNew();
- virtual BOOL IsUpdate();
+ virtual sal_Bool IsUrl();
+ virtual sal_Bool IsNew();
+ virtual sal_Bool IsUpdate();
};
//for SwJavaEditDialog end
@@ -328,7 +328,7 @@ class SwMailMergeDlg;
class AbstractMailMergeDlg_Impl : public AbstractMailMergeDlg
{
DECL_ABSTDLG_BASE(AbstractMailMergeDlg_Impl,SwMailMergeDlg)
- virtual USHORT GetMergeType() ;
+ virtual sal_uInt16 GetMergeType() ;
virtual const ::rtl::OUString& GetSaveFilter() const;
virtual const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > GetSelection() const ;
virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet> GetResultSet() const;
@@ -339,7 +339,7 @@ class SwMailMergeCreateFromDlg;
class AbstractMailMergeCreateFromDlg_Impl : public AbstractMailMergeCreateFromDlg
{
DECL_ABSTDLG_BASE(AbstractMailMergeCreateFromDlg_Impl,SwMailMergeCreateFromDlg)
- virtual BOOL IsThisDocument() const ;
+ virtual sal_Bool IsThisDocument() const ;
};
//for SwMailMergeCreateFromDlg end
//for SwMailMergeFieldConnectionsDlg begin
@@ -347,7 +347,7 @@ class SwMailMergeFieldConnectionsDlg;
class AbstractMailMergeFieldConnectionsDlg_Impl : public AbstractMailMergeFieldConnectionsDlg
{
DECL_ABSTDLG_BASE(AbstractMailMergeFieldConnectionsDlg_Impl,SwMailMergeFieldConnectionsDlg)
- virtual BOOL IsUseExistingConnections() const ;
+ virtual sal_Bool IsUseExistingConnections() const ;
};
//for SwMailMergeFieldConnectionsDlg end
@@ -418,7 +418,7 @@ public:
virtual void SetReloadDocument(const String& rURL);
virtual const String& GetReloadDocument() const;
- virtual BOOL ShowPage( USHORT nLevel );
+ virtual sal_Bool ShowPage( sal_uInt16 nLevel );
virtual sal_uInt16 GetRestartPage() const;
};
@@ -441,7 +441,7 @@ public:
virtual AbstractSwBreakDlg * CreateSwBreakDlg ( Window *pParent, SwWrtShell &rSh,int nResId ); // add for SwBreakDlg
virtual VclAbstractDialog * CreateSwChangeDBDlg( SwView& rVw, int nResId ); //add for SwChangeDBDlg
virtual SfxAbstractTabDialog * CreateSwCharDlg( Window* pParent, SwView& pVw, const SfxItemSet& rCoreSet, int nResId, // add for SwCharDlg
- const String* pFmtStr = 0, BOOL bIsDrwTxtDlg = FALSE);
+ const String* pFmtStr = 0, sal_Bool bIsDrwTxtDlg = sal_False);
virtual AbstractSwConvertTableDlg* CreateSwConvertTableDlg ( SwView& rView, int nResId, bool bToTable ); //add for SwConvertTableDlg
virtual VclAbstractDialog * CreateSwCaptionDialog ( Window *pParent, SwView &rV,int nResId); //add for SwCaptionDialog
@@ -452,20 +452,20 @@ public:
virtual SfxAbstractTabDialog * CreateSwFootNoteOptionDlg( Window *pParent, SwWrtShell &rSh,int nResId);//add for SwFootNoteOptionDlg
virtual AbstractDropDownFieldDialog * CreateDropDownFieldDialog ( Window *pParent, SwWrtShell &rSh, //add for DropDownFieldDialog
- SwField* pField,int nResId, BOOL bNextButton = FALSE );
- virtual SfxAbstractTabDialog* CreateSwEnvDlg ( Window* pParent, const SfxItemSet& rSet, SwWrtShell* pWrtSh, Printer* pPrt, BOOL bInsert,int nResId ); //add for SwEnvDlg
+ SwField* pField,int nResId, sal_Bool bNextButton = sal_False );
+ virtual SfxAbstractTabDialog* CreateSwEnvDlg ( Window* pParent, const SfxItemSet& rSet, SwWrtShell* pWrtSh, Printer* pPrt, sal_Bool bInsert,int nResId ); //add for SwEnvDlg
virtual AbstarctSwLabDlg* CreateSwLabDlg ( Window* pParent, const SfxItemSet& rSet, //add for SwLabDlg
- SwNewDBMgr* pNewDBMgr, BOOL bLabel,int nResId );
+ SwNewDBMgr* pNewDBMgr, sal_Bool bLabel,int nResId );
virtual SwLabDlgMethod GetSwLabDlgStaticMethod (); //add for SwLabDlg
virtual SfxAbstractTabDialog* CreateSwParaDlg ( Window *pParent, //add for SwParaDlg
SwView& rVw,
const SfxItemSet& rCoreSet,
- BYTE nDialogMode,
+ sal_uInt8 nDialogMode,
int nResId,
const String *pCollName = 0,
- BOOL bDraw = FALSE,
- UINT16 nDefPage = 0);
+ sal_Bool bDraw = sal_False,
+ sal_uInt16 nDefPage = 0);
virtual AbstarctSwSelGlossaryDlg * CreateSwSelGlossaryDlg ( Window * pParent, const String &rShortName, int nResId ); //add for SwSelGlossaryDlg
virtual VclAbstractDialog * CreateVclAbstractDialog ( Window * pParent, SwWrtShell &rSh, int nResId ); //add for SwTableHeightDlg SwSortDlg
@@ -473,11 +473,11 @@ public:
virtual AbstractSwAutoFormatDlg * CreateSwAutoFormatDlg( Window* pParent, SwWrtShell* pShell, //add for SwAutoFormatDlg
int nResId,
- BOOL bSetAutoFmt = TRUE,
+ sal_Bool bSetAutoFmt = sal_True,
const SwTableAutoFmt* pSelFmt = 0 );
- virtual SfxAbstractDialog * CreateSwBorderDlg (Window* pParent, SfxItemSet& rSet, USHORT nType,int nResId );//add for SwBorderDlg
+ virtual SfxAbstractDialog * CreateSwBorderDlg (Window* pParent, SfxItemSet& rSet, sal_uInt16 nType,int nResId );//add for SwBorderDlg
- virtual SfxAbstractDialog * CreateSwWrapDlg ( Window* pParent, SfxItemSet& rSet, SwWrtShell* pSh, BOOL bDrawMode, int nResId ); //add for SwWrapDlg
+ virtual SfxAbstractDialog * CreateSwWrapDlg ( Window* pParent, SfxItemSet& rSet, SwWrtShell* pSh, sal_Bool bDrawMode, int nResId ); //add for SwWrapDlg
virtual VclAbstractDialog * CreateSwTableWidthDlg ( Window *pParent, SwTableFUNC &rFnc , int nResId ); //add for SwTableWidthDlg
virtual SfxAbstractTabDialog* CreateSwTableTabDlg( Window* pParent, SfxItemPool& Pool,
const SfxItemSet* pItemSet, SwWrtShell* pSh,int nResId ); //add for SwTableTabDlg
@@ -489,33 +489,33 @@ public:
virtual AbstractSwModalRedlineAcceptDlg * CreateSwModalRedlineAcceptDlg ( Window *pParent, int nResId ); //add for SwModalRedlineAcceptDlg
virtual VclAbstractDialog* CreateSwVclDialog( int nResId,
- Window* pParent, BOOL& rWithPrev ); //add for SwMergeTblDlg
+ Window* pParent, sal_Bool& rWithPrev ); //add for SwMergeTblDlg
virtual SfxAbstractTabDialog* CreateFrmTabDialog( int nResId,
SfxViewFrame *pFrame, Window *pParent,
const SfxItemSet& rCoreSet,
- BOOL bNewFrm = TRUE,
- USHORT nResType = DLG_FRM_STD,
- BOOL bFmt = FALSE,
- UINT16 nDefPage = 0,
+ sal_Bool bNewFrm = sal_True,
+ sal_uInt16 nResType = DLG_FRM_STD,
+ sal_Bool bFmt = sal_False,
+ sal_uInt16 nDefPage = 0,
const String* pFmtStr = 0); //add for SwFrmDlg
virtual SfxAbstractTabDialog* CreateTemplateDialog( int nResId,
Window* pParent,
SfxStyleSheetBase& rBase,
- USHORT nRegion,
- BOOL bColumn = FALSE,
+ sal_uInt16 nRegion,
+ sal_Bool bColumn = sal_False,
SwWrtShell* pActShell = 0,
- BOOL bNew = FALSE ); //add for SwTemplateDlg
+ sal_Bool bNew = sal_False ); //add for SwTemplateDlg
virtual AbstractGlossaryDlg* CreateGlossaryDlg( int nResId,
SfxViewFrame* pViewFrame,
SwGlossaryHdl* pGlosHdl,
SwWrtShell *pWrtShell); //add for SwGlossaryDlg
virtual AbstractFldInputDlg* CreateFldInputDlg( int nResId,
Window *pParent, SwWrtShell &rSh,
- SwField* pField, BOOL bNextButton = FALSE ); //add for SwFldInputDlg
+ SwField* pField, sal_Bool bNextButton = sal_False ); //add for SwFldInputDlg
virtual AbstractInsFootNoteDlg* CreateInsFootNoteDlg( int nResId,
- Window * pParent, SwWrtShell &rSh, BOOL bEd = FALSE); //add for SwInsFootNoteDlg
+ Window * pParent, SwWrtShell &rSh, sal_Bool bEd = sal_False); //add for SwInsFootNoteDlg
virtual VclAbstractDialog * CreateVclSwViewDialog( int nResId,
- SwView& rView, BOOL bCol = FALSE ); //add for SwInsRowColDlg, SwLineNumberingDlg
+ SwView& rView, sal_Bool bCol = sal_False ); //add for SwInsRowColDlg, SwLineNumberingDlg
virtual AbstractInsertGrfRulerDlg* CreateInsertGrfRulerDlg( int nResId,
Window * pParent ); //add for SwInsertGrfRulerDlg
virtual AbstractInsTableDlg* CreateInsTableDlg( int nResId,
@@ -542,8 +542,8 @@ public:
virtual AbstractMultiTOXTabDialog* CreateMultiTOXTabDialog( int nResId,
Window* pParent, const SfxItemSet& rSet,
SwWrtShell &rShell,
- SwTOXBase* pCurTOX, USHORT nToxType = USHRT_MAX,
- BOOL bGlobal = FALSE); //add for SwMultiTOXTabDialog
+ SwTOXBase* pCurTOX, sal_uInt16 nToxType = USHRT_MAX,
+ sal_Bool bGlobal = sal_False); //add for SwMultiTOXTabDialog
virtual AbstractEditRegionDlg* CreateEditRegionDlg( int nResId,
Window* pParent, SwWrtShell& rWrtSh ); //add for SwEditRegionDlg
virtual AbstractInsertSectionTabDialog* CreateInsertSectionTabDialog( int nResId,
@@ -566,13 +566,13 @@ public:
virtual AbstractMailMergeWizard* CreateMailMergeWizard(SwView& rView, SwMailMergeConfigItem& rConfigItem);
//add for static func in SwGlossaryDlg
- virtual GlossaryGetCurrGroup GetGlossaryCurrGroupFunc( USHORT nId );
- virtual GlossarySetActGroup SetGlossaryActGroupFunc( USHORT nId );
+ virtual GlossaryGetCurrGroup GetGlossaryCurrGroupFunc( sal_uInt16 nId );
+ virtual GlossarySetActGroup SetGlossaryActGroupFunc( sal_uInt16 nId );
// For TabPage
- virtual CreateTabPage GetTabPageCreatorFunc( USHORT nId );
+ virtual CreateTabPage GetTabPageCreatorFunc( sal_uInt16 nId );
- virtual GetTabPageRanges GetTabPageRangesFunc( USHORT nId );
+ virtual GetTabPageRanges GetTabPageRangesFunc( sal_uInt16 nId );
};
diff --git a/sw/source/ui/dialog/swwrtshitem.cxx b/sw/source/ui/dialog/swwrtshitem.cxx
index 7c0ef68bd2..6a890ce3b6 100644
--- a/sw/source/ui/dialog/swwrtshitem.cxx
+++ b/sw/source/ui/dialog/swwrtshitem.cxx
@@ -29,7 +29,7 @@
#include "precompiled_sw.hxx"
#include "swwrtshitem.hxx"
TYPEINIT1(SwWrtShellItem,SfxPoolItem);
-SwWrtShellItem::SwWrtShellItem( USHORT _nWhich, SwWrtShell* pSh )
+SwWrtShellItem::SwWrtShellItem( sal_uInt16 _nWhich, SwWrtShell* pSh )
: SfxPoolItem( _nWhich ), pWrtSh( pSh )
{
diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx
index 01c8abcbbe..932bdcbadc 100644
--- a/sw/source/ui/dialog/uiregionsw.cxx
+++ b/sw/source/ui/dialog/uiregionsw.cxx
@@ -93,8 +93,8 @@ void lcl_FillList( SwWrtShell& rSh, ComboBox& rSubRegions, ComboBox* pAvailNames
const SwSectionFmt* pFmt;
if( !pNewFmt )
{
- USHORT nCount = rSh.GetSectionFmtCount();
- for(USHORT i=0;i<nCount;i++)
+ sal_uInt16 nCount = rSh.GetSectionFmtCount();
+ for(sal_uInt16 i=0;i<nCount;i++)
{
SectionType eTmpType;
if( !(pFmt = &rSh.GetSectionFmt(i))->GetParent() &&
@@ -114,11 +114,11 @@ void lcl_FillList( SwWrtShell& rSh, ComboBox& rSubRegions, ComboBox* pAvailNames
else
{
SwSections aTmpArr;
- USHORT nCnt = pNewFmt->GetChildSections(aTmpArr,SORTSECT_POS);
+ sal_uInt16 nCnt = pNewFmt->GetChildSections(aTmpArr,SORTSECT_POS);
if( nCnt )
{
SectionType eTmpType;
- for( USHORT n = 0; n < nCnt; ++n )
+ for( sal_uInt16 n = 0; n < nCnt; ++n )
if( (pFmt = aTmpArr[n]->GetFmt())->IsInNodesArr()&&
(eTmpType = pFmt->GetSection()->GetType()) != TOX_CONTENT_SECTION
&& TOX_HEADER_SECTION != eTmpType )
@@ -176,7 +176,7 @@ private:
SwFmtNoBalancedColumns m_Balance;
SvxFrameDirectionItem m_FrmDirItem;
SvxLRSpaceItem m_LRSpaceItem;
- USHORT m_nArrPos;
+ sal_uInt16 m_nArrPos;
// zeigt an, ob evtl. Textinhalt im Bereich ist
bool m_bContent : 1;
// fuer Multiselektion erst markieren, dann mit der TreeListBox arbeiten!
@@ -184,7 +184,7 @@ private:
uno::Sequence<sal_Int8> m_TempPasswd;
public:
- SectRepr(USHORT nPos, SwSection& rSect);
+ SectRepr(sal_uInt16 nPos, SwSection& rSect);
bool operator==(SectRepr& rSectRef) const
{ return m_nArrPos == rSectRef.GetArrPos(); }
@@ -201,7 +201,7 @@ public:
SvxFrameDirectionItem& GetFrmDir() { return m_FrmDirItem; }
SvxLRSpaceItem& GetLRSpace() { return m_LRSpaceItem; }
- USHORT GetArrPos() const { return m_nArrPos; }
+ sal_uInt16 GetArrPos() const { return m_nArrPos; }
String GetFile() const;
String GetSubRegion() const;
void SetFile(String const& rFile);
@@ -222,7 +222,7 @@ public:
SV_IMPL_OP_PTRARR_SORT( SectReprArr, SectReprPtr )
-SectRepr::SectRepr( USHORT nPos, SwSection& rSect )
+SectRepr::SectRepr( sal_uInt16 nPos, SwSection& rSect )
: m_SectionData( rSect )
, m_Brush( RES_BACKGROUND )
, m_FrmDirItem( FRMDIR_ENVIRONMENT, RES_FRAMEDIR )
@@ -327,7 +327,7 @@ String SectRepr::GetFile() const
{
if (DDE_LINK_SECTION == m_SectionData.GetType())
{
- USHORT n = sLinkFile.SearchAndReplace( sfx2::cTokenSeperator, ' ' );
+ sal_uInt16 n = sLinkFile.SearchAndReplace( sfx2::cTokenSeperator, ' ' );
sLinkFile.SearchAndReplace( sfx2::cTokenSeperator, ' ', n );
}
else
@@ -461,11 +461,11 @@ SwEditRegionDlg::SwEditRegionDlg( Window* pParent, SwWrtShell& rWrtSh )
/* -----------------------------26.04.01 14:56--------------------------------
---------------------------------------------------------------------------*/
-BOOL SwEditRegionDlg::CheckPasswd(CheckBox* pBox)
+sal_Bool SwEditRegionDlg::CheckPasswd(CheckBox* pBox)
{
if(bDontCheckPasswd)
- return TRUE;
- sal_Bool bRet = TRUE;
+ return sal_True;
+ sal_Bool bRet = sal_True;
SvLBoxEntry* pEntry = aTree.FirstSelected();
while( pEntry )
{
@@ -474,7 +474,7 @@ BOOL SwEditRegionDlg::CheckPasswd(CheckBox* pBox)
&& pRepr->GetSectionData().GetPassword().getLength())
{
SwTestPasswdDlg aPasswdDlg(this);
- bRet = FALSE;
+ bRet = sal_False;
if (aPasswdDlg.Execute())
{
String sNewPasswd( aPasswdDlg.GetPassword() );
@@ -484,7 +484,7 @@ BOOL SwEditRegionDlg::CheckPasswd(CheckBox* pBox)
pRepr->GetSectionData().GetPassword(), sNewPasswd))
{
pRepr->SetTempPasswd(aNewPasswd);
- bRet = TRUE;
+ bRet = sal_True;
}
else
{
@@ -516,8 +516,8 @@ void SwEditRegionDlg::RecurseList( const SwSectionFmt* pFmt, SvLBoxEntry* pEntry
if (!pFmt)
{
- USHORT nCount=rSh.GetSectionFmtCount();
- for ( USHORT n=0; n < nCount; n++ )
+ sal_uInt16 nCount=rSh.GetSectionFmtCount();
+ for ( sal_uInt16 n=0; n < nCount; n++ )
{
SectionType eTmpType;
if( !( pFmt = &rSh.GetSectionFmt(n))->GetParent() &&
@@ -527,9 +527,9 @@ void SwEditRegionDlg::RecurseList( const SwSectionFmt* pFmt, SvLBoxEntry* pEntry
{
SectRepr* pSectRepr = new SectRepr( n,
*(pSect=pFmt->GetSection()) );
- Image aImg = BuildBitmap( pSect->IsProtect(),pSect->IsHidden(), FALSE);
+ Image aImg = BuildBitmap( pSect->IsProtect(),pSect->IsHidden(), sal_False);
pEntry = aTree.InsertEntry(pSect->GetSectionName(), aImg, aImg);
- Image aHCImg = BuildBitmap( pSect->IsProtect(),pSect->IsHidden(), TRUE);
+ Image aHCImg = BuildBitmap( pSect->IsProtect(),pSect->IsHidden(), sal_True);
aTree.SetExpandedEntryBmp(pEntry, aHCImg, BMP_COLOR_HIGHCONTRAST);
aTree.SetCollapsedEntryBmp(pEntry, aHCImg, BMP_COLOR_HIGHCONTRAST);
pEntry->SetUserData(pSectRepr);
@@ -545,10 +545,10 @@ void SwEditRegionDlg::RecurseList( const SwSectionFmt* pFmt, SvLBoxEntry* pEntry
{
SwSections aTmpArr;
SvLBoxEntry* pNEntry;
- USHORT nCnt = pFmt->GetChildSections(aTmpArr,SORTSECT_POS);
+ sal_uInt16 nCnt = pFmt->GetChildSections(aTmpArr,SORTSECT_POS);
if( nCnt )
{
- for( USHORT n = 0; n < nCnt; ++n )
+ for( sal_uInt16 n = 0; n < nCnt; ++n )
{
SectionType eTmpType;
pFmt = aTmpArr[n]->GetFmt();
@@ -560,10 +560,10 @@ void SwEditRegionDlg::RecurseList( const SwSectionFmt* pFmt, SvLBoxEntry* pEntry
SectRepr* pSectRepr=new SectRepr(
FindArrPos( pSect->GetFmt() ), *pSect );
Image aImage = BuildBitmap( pSect->IsProtect(),
- pSect->IsHidden(), FALSE);
+ pSect->IsHidden(), sal_False);
pNEntry = aTree.InsertEntry(
pSect->GetSectionName(), aImage, aImage, pEntry);
- Image aHCImg = BuildBitmap( pSect->IsProtect(),pSect->IsHidden(), TRUE);
+ Image aHCImg = BuildBitmap( pSect->IsProtect(),pSect->IsHidden(), sal_True);
aTree.SetExpandedEntryBmp(pEntry, aHCImg, BMP_COLOR_HIGHCONTRAST);
aTree.SetCollapsedEntryBmp(pEntry, aHCImg, BMP_COLOR_HIGHCONTRAST);
pNEntry->SetUserData(pSectRepr);
@@ -586,10 +586,10 @@ void SwEditRegionDlg::RecurseList( const SwSectionFmt* pFmt, SvLBoxEntry* pEntry
---------------------------------------------------------------------*/
-USHORT SwEditRegionDlg::FindArrPos(const SwSectionFmt* pFmt )
+sal_uInt16 SwEditRegionDlg::FindArrPos(const SwSectionFmt* pFmt )
{
- USHORT nCount=rSh.GetSectionFmtCount();
- for (USHORT i=0;i<nCount;i++)
+ sal_uInt16 nCount=rSh.GetSectionFmtCount();
+ for (sal_uInt16 i=0;i<nCount;i++)
if (pFmt==&rSh.GetSectionFmt(i))
return i;
@@ -627,7 +627,7 @@ void SwEditRegionDlg::SelectSection(const String& rSectionName)
}
if(pEntry)
{
- aTree.SelectAll( FALSE);
+ aTree.SelectAll( sal_False);
aTree.Select(pEntry);
aTree.MakeVisible(pEntry);
}
@@ -642,21 +642,21 @@ IMPL_LINK( SwEditRegionDlg, GetFirstEntryHdl, SvTreeListBox *, pBox )
{
bDontCheckPasswd = sal_True;
SvLBoxEntry* pEntry=pBox->FirstSelected();
- aHideCB .Enable(TRUE);
+ aHideCB .Enable(sal_True);
// --> FME 2004-06-22 #114856# edit in readonly sections
- aEditInReadonlyCB.Enable(TRUE);
+ aEditInReadonlyCB.Enable(sal_True);
// <--
- aProtectCB .Enable(TRUE);
- aFileCB .Enable(TRUE);
+ aProtectCB .Enable(sal_True);
+ aFileCB .Enable(sal_True);
UNO_NMSPC::Sequence <sal_Int8> aCurPasswd;
if( 1 < pBox->GetSelectionCount() )
{
- aHideCB.EnableTriState( TRUE );
- aProtectCB.EnableTriState( TRUE );
+ aHideCB.EnableTriState( sal_True );
+ aProtectCB.EnableTriState( sal_True );
// --> FME 2004-06-22 #114856# edit in readonly sections
- aEditInReadonlyCB.EnableTriState ( TRUE );
+ aEditInReadonlyCB.EnableTriState ( sal_True );
// <--
- aFileCB.EnableTriState( TRUE );
+ aFileCB.EnableTriState( sal_True );
bool bHiddenValid = true;
bool bProtectValid = true;
@@ -668,10 +668,10 @@ IMPL_LINK( SwEditRegionDlg, GetFirstEntryHdl, SvTreeListBox *, pBox )
bool bHidden = true;
bool bProtect = true;
String sCondition;
- BOOL bFirst = TRUE;
- BOOL bFileValid = TRUE;
- BOOL bFile = TRUE;
- BOOL bPasswdValid = TRUE;
+ sal_Bool bFirst = sal_True;
+ sal_Bool bFileValid = sal_True;
+ sal_Bool bFile = sal_True;
+ sal_Bool bPasswdValid = sal_True;
while( pEntry )
{
@@ -692,7 +692,7 @@ IMPL_LINK( SwEditRegionDlg, GetFirstEntryHdl, SvTreeListBox *, pBox )
{
String sTemp(rData.GetCondition());
if(sCondition != sTemp)
- bConditionValid = FALSE;
+ bConditionValid = sal_False;
bHiddenValid = (bHidden == rData.IsHidden());
bProtectValid = (bProtect == rData.IsProtectFlag());
// --> FME 2004-06-22 #114856# edit in readonly sections
@@ -704,7 +704,7 @@ IMPL_LINK( SwEditRegionDlg, GetFirstEntryHdl, SvTreeListBox *, pBox )
bPasswdValid = (aCurPasswd == rData.GetPassword());
}
pEntry = pBox->NextSelected(pEntry);
- bFirst = FALSE;
+ bFirst = sal_False;
}
aHideCB.SetState( !bHiddenValid ? STATE_DONTKNOW :
@@ -723,27 +723,27 @@ IMPL_LINK( SwEditRegionDlg, GetFirstEntryHdl, SvTreeListBox *, pBox )
else
{
// aConditionED.SetText(aEmptyStr);
- aConditionFT.Enable(FALSE);
- aConditionED.Enable(FALSE);
+ aConditionFT.Enable(sal_False);
+ aConditionED.Enable(sal_False);
}
- aFilePB.Enable(FALSE);
- aFileNameFT .Enable(FALSE);
- aFileNameED .Enable(FALSE);
- aSubRegionFT.Enable(FALSE);
- aSubRegionED.Enable(FALSE);
-// aNameFT .Enable(FALSE);
- aCurName .Enable(FALSE);
- aOptionsPB .Enable(FALSE);
- aDDECB .Enable(FALSE);
- aDDECommandFT .Enable(FALSE);
- BOOL bPasswdEnabled = aProtectCB.GetState() == STATE_CHECK;
+ aFilePB.Enable(sal_False);
+ aFileNameFT .Enable(sal_False);
+ aFileNameED .Enable(sal_False);
+ aSubRegionFT.Enable(sal_False);
+ aSubRegionED.Enable(sal_False);
+// aNameFT .Enable(sal_False);
+ aCurName .Enable(sal_False);
+ aOptionsPB .Enable(sal_False);
+ aDDECB .Enable(sal_False);
+ aDDECommandFT .Enable(sal_False);
+ sal_Bool bPasswdEnabled = aProtectCB.GetState() == STATE_CHECK;
aPasswdCB.Enable(bPasswdEnabled);
aPasswdPB.Enable(bPasswdEnabled);
if(!bPasswdValid)
{
pEntry = pBox->FirstSelected();
- pBox->SelectAll( FALSE );
+ pBox->SelectAll( sal_False );
pBox->Select( pEntry );
GetFirstEntryHdl(pBox);
return 0;
@@ -753,15 +753,15 @@ IMPL_LINK( SwEditRegionDlg, GetFirstEntryHdl, SvTreeListBox *, pBox )
}
else if (pEntry )
{
-// aNameFT .Enable(TRUE);
- aCurName .Enable(TRUE);
- aOptionsPB .Enable(TRUE);
+// aNameFT .Enable(sal_True);
+ aCurName .Enable(sal_True);
+ aOptionsPB .Enable(sal_True);
SectRepr* pRepr=(SectRepr*) pEntry->GetUserData();
SwSectionData const& rData( pRepr->GetSectionData() );
aConditionED.SetText(rData.GetCondition());
aHideCB.Enable();
aHideCB.SetState((rData.IsHidden()) ? STATE_CHECK : STATE_NOCHECK);
- BOOL bHide = STATE_CHECK == aHideCB.GetState();
+ sal_Bool bHide = STATE_CHECK == aHideCB.GetState();
aConditionED.Enable(bHide);
aConditionFT.Enable(bHide);
aPasswdCB.Check(rData.GetPassword().getLength() > 0);
@@ -777,17 +777,17 @@ IMPL_LINK( SwEditRegionDlg, GetFirstEntryHdl, SvTreeListBox *, pBox )
aSubRegionED.Clear();
if(aFile.Len()||sSub.Len())
{
- aFileCB.Check(TRUE);
+ aFileCB.Check(sal_True);
aFileNameED.SetText(aFile);
aSubRegionED.SetText(sSub);
aDDECB.Check(rData.GetType() == DDE_LINK_SECTION);
}
else
{
- aFileCB.Check(FALSE);
+ aFileCB.Check(sal_False);
aFileNameED.SetText(aFile);
- aDDECB.Enable(FALSE);
- aDDECB.Check(FALSE);
+ aDDECB.Enable(sal_False);
+ aDDECB.Check(sal_False);
}
UseFileHdl(&aFileCB);
DDEHdl( &aDDECB );
@@ -801,7 +801,7 @@ IMPL_LINK( SwEditRegionDlg, GetFirstEntryHdl, SvTreeListBox *, pBox )
aEditInReadonlyCB.Enable();
// <--
- BOOL bPasswdEnabled = aProtectCB.IsChecked();
+ sal_Bool bPasswdEnabled = aProtectCB.IsChecked();
aPasswdCB.Enable(bPasswdEnabled);
aPasswdPB.Enable(bPasswdEnabled);
}
@@ -815,25 +815,25 @@ IMPL_LINK( SwEditRegionDlg, DeselectHdl, SvTreeListBox *, pBox )
{
if( !pBox->GetSelectionCount() )
{
- aHideCB .Enable(FALSE);
- aProtectCB .Enable(FALSE);
+ aHideCB .Enable(sal_False);
+ aProtectCB .Enable(sal_False);
// --> FME 2004-06-22 #114856# edit in readonly sections
- aEditInReadonlyCB.Enable(FALSE);
+ aEditInReadonlyCB.Enable(sal_False);
// <--
- aPasswdCB .Enable(FALSE);
- aPasswdCB .Enable(FALSE);
- aConditionFT .Enable(FALSE);
- aConditionED.Enable(FALSE);
- aFileCB .Enable(FALSE);
- aFilePB .Enable(FALSE);
- aFileNameFT .Enable(FALSE);
- aFileNameED .Enable(FALSE);
- aSubRegionFT .Enable(FALSE);
- aSubRegionED .Enable(FALSE);
-// aNameFT .Enable(FALSE);
- aCurName .Enable(FALSE);
- aDDECB .Enable(FALSE);
- aDDECommandFT .Enable(FALSE);
+ aPasswdCB .Enable(sal_False);
+ aPasswdCB .Enable(sal_False);
+ aConditionFT .Enable(sal_False);
+ aConditionED.Enable(sal_False);
+ aFileCB .Enable(sal_False);
+ aFilePB .Enable(sal_False);
+ aFileNameFT .Enable(sal_False);
+ aFileNameED .Enable(sal_False);
+ aSubRegionFT .Enable(sal_False);
+ aSubRegionED .Enable(sal_False);
+// aNameFT .Enable(sal_False);
+ aCurName .Enable(sal_False);
+ aDDECB .Enable(sal_False);
+ aDDECommandFT .Enable(sal_False);
UseFileHdl(&aFileCB);
DDEHdl( &aDDECB );
@@ -862,7 +862,7 @@ IMPL_LINK( SwEditRegionDlg, OkHdl, CheckBox *, EMPTYARG )
rSh.StartAllAction();
rSh.StartUndo();
- rSh.ResetSelect( 0,FALSE );
+ rSh.ResetSelect( 0,sal_False );
SvLBoxEntry* pEntry = aTree.First();
while( pEntry )
@@ -873,20 +873,20 @@ IMPL_LINK( SwEditRegionDlg, OkHdl, CheckBox *, EMPTYARG )
{
pRepr->GetSectionData().SetPassword(uno::Sequence<sal_Int8 >());
}
- USHORT nNewPos = rDocFmts.GetPos( pFmt );
+ sal_uInt16 nNewPos = rDocFmts.GetPos( pFmt );
if( USHRT_MAX != nNewPos )
{
- SfxItemSet* pSet = pFmt->GetAttrSet().Clone( FALSE );
+ SfxItemSet* pSet = pFmt->GetAttrSet().Clone( sal_False );
if( pFmt->GetCol() != pRepr->GetCol() )
pSet->Put( pRepr->GetCol() );
- if( pFmt->GetBackground(FALSE) != pRepr->GetBackground() )
+ if( pFmt->GetBackground(sal_False) != pRepr->GetBackground() )
pSet->Put( pRepr->GetBackground() );
- if( pFmt->GetFtnAtTxtEnd(FALSE) != pRepr->GetFtnNtAtEnd() )
+ if( pFmt->GetFtnAtTxtEnd(sal_False) != pRepr->GetFtnNtAtEnd() )
pSet->Put( pRepr->GetFtnNtAtEnd() );
- if( pFmt->GetEndAtTxtEnd(FALSE) != pRepr->GetEndNtAtEnd() )
+ if( pFmt->GetEndAtTxtEnd(sal_False) != pRepr->GetEndNtAtEnd() )
pSet->Put( pRepr->GetEndNtAtEnd() );
if( pFmt->GetBalancedColumns() != pRepr->GetBalance() )
@@ -905,10 +905,10 @@ IMPL_LINK( SwEditRegionDlg, OkHdl, CheckBox *, EMPTYARG )
pEntry = aTree.Next( pEntry );
}
- for(USHORT i = aSectReprArr.Count(); i; )
+ for(sal_uInt16 i = aSectReprArr.Count(); i; )
{
SwSectionFmt* pFmt = aOrigArray[ aSectReprArr[ --i ]->GetArrPos() ];
- USHORT nNewPos = rDocFmts.GetPos( pFmt );
+ sal_uInt16 nNewPos = rDocFmts.GetPos( pFmt );
if( USHRT_MAX != nNewPos )
rSh.DelSectionFmt( nNewPos );
}
@@ -933,19 +933,19 @@ IMPL_LINK( SwEditRegionDlg, ChangeProtectHdl, TriStateBox *, pBox )
{
if(!CheckPasswd(pBox))
return 0;
- pBox->EnableTriState( FALSE );
+ pBox->EnableTriState( sal_False );
SvLBoxEntry* pEntry=aTree.FirstSelected();
DBG_ASSERT(pEntry,"kein Entry gefunden");
- BOOL bCheck = STATE_CHECK == pBox->GetState();
+ sal_Bool bCheck = STATE_CHECK == pBox->GetState();
while( pEntry )
{
SectReprPtr pRepr = (SectReprPtr) pEntry->GetUserData();
pRepr->GetSectionData().SetProtectFlag(bCheck);
Image aImage = BuildBitmap( bCheck,
- STATE_CHECK == aHideCB.GetState(), FALSE);
+ STATE_CHECK == aHideCB.GetState(), sal_False);
aTree.SetExpandedEntryBmp(pEntry, aImage, BMP_COLOR_NORMAL);
aTree.SetCollapsedEntryBmp(pEntry, aImage, BMP_COLOR_NORMAL);
- Image aHCImg = BuildBitmap( bCheck, STATE_CHECK == aHideCB.GetState(), TRUE);
+ Image aHCImg = BuildBitmap( bCheck, STATE_CHECK == aHideCB.GetState(), sal_True);
aTree.SetExpandedEntryBmp(pEntry, aHCImg, BMP_COLOR_HIGHCONTRAST);
aTree.SetCollapsedEntryBmp(pEntry, aHCImg, BMP_COLOR_HIGHCONTRAST);
pEntry = aTree.NextSelected(pEntry);
@@ -962,7 +962,7 @@ IMPL_LINK( SwEditRegionDlg, ChangeHideHdl, TriStateBox *, pBox )
{
if(!CheckPasswd(pBox))
return 0;
- pBox->EnableTriState( FALSE );
+ pBox->EnableTriState( sal_False );
SvLBoxEntry* pEntry=aTree.FirstSelected();
DBG_ASSERT(pEntry,"kein Entry gefunden");
while( pEntry )
@@ -970,18 +970,18 @@ IMPL_LINK( SwEditRegionDlg, ChangeHideHdl, TriStateBox *, pBox )
SectReprPtr pRepr = (SectReprPtr) pEntry->GetUserData();
pRepr->GetSectionData().SetHidden(STATE_CHECK == pBox->GetState());
Image aImage = BuildBitmap(STATE_CHECK == aProtectCB.GetState(),
- STATE_CHECK == pBox->GetState(), FALSE);
+ STATE_CHECK == pBox->GetState(), sal_False);
aTree.SetExpandedEntryBmp(pEntry, aImage, BMP_COLOR_NORMAL);
aTree.SetCollapsedEntryBmp(pEntry, aImage, BMP_COLOR_NORMAL);
Image aHCImg = BuildBitmap( STATE_CHECK == aProtectCB.GetState(),
- STATE_CHECK == pBox->GetState(), TRUE);
+ STATE_CHECK == pBox->GetState(), sal_True);
aTree.SetExpandedEntryBmp(pEntry, aHCImg, BMP_COLOR_HIGHCONTRAST);
aTree.SetCollapsedEntryBmp(pEntry, aHCImg, BMP_COLOR_HIGHCONTRAST);
pEntry = aTree.NextSelected(pEntry);
}
- BOOL bHide = STATE_CHECK == pBox->GetState();
+ sal_Bool bHide = STATE_CHECK == pBox->GetState();
aConditionED.Enable(bHide);
aConditionFT.Enable(bHide);
return 0;
@@ -995,7 +995,7 @@ IMPL_LINK( SwEditRegionDlg, ChangeEditInReadonlyHdl, TriStateBox *, pBox )
{
if(!CheckPasswd(pBox))
return 0;
- pBox->EnableTriState( FALSE );
+ pBox->EnableTriState( sal_False );
SvLBoxEntry* pEntry=aTree.FirstSelected();
DBG_ASSERT(pEntry,"kein Entry gefunden");
while( pEntry )
@@ -1033,14 +1033,14 @@ IMPL_LINK( SwEditRegionDlg, ChangeDismissHdl, CheckBox *, EMPTYARG )
{
const SectReprPtr pSectRepr = (SectRepr*)pEntry->GetUserData();
SvLBoxEntry* pRemove = 0;
- BOOL bRestart = FALSE;
+ sal_Bool bRestart = sal_False;
if(pSectRepr->IsSelected())
{
aSectReprArr.Insert( pSectRepr );
while( (pChild = aTree.FirstChild(pEntry) )!= 0 )
{
//durch das Umhaengen muss wieder am Anfang aufgesetzt werden
- bRestart = TRUE;
+ bRestart = sal_True;
pParent=aTree.GetParent(pEntry);
aTree.GetModel()->Move(pChild, pParent, aTree.GetModel()->GetRelPos(pEntry));
}
@@ -1056,21 +1056,21 @@ IMPL_LINK( SwEditRegionDlg, ChangeDismissHdl, CheckBox *, EMPTYARG )
if ( (pEntry=aTree.FirstSelected()) == 0 )
{
- aConditionFT. Enable(FALSE);
- aConditionED. Enable(FALSE);
- aDismiss. Enable(FALSE);
- aCurName. Enable(FALSE);
- aProtectCB. Enable(FALSE);
- aPasswdCB. Enable(FALSE);
- aHideCB. Enable(FALSE);
+ aConditionFT. Enable(sal_False);
+ aConditionED. Enable(sal_False);
+ aDismiss. Enable(sal_False);
+ aCurName. Enable(sal_False);
+ aProtectCB. Enable(sal_False);
+ aPasswdCB. Enable(sal_False);
+ aHideCB. Enable(sal_False);
// --> FME 2004-06-22 #114856# edit in readonly sections
- aEditInReadonlyCB.Enable(FALSE);
+ aEditInReadonlyCB.Enable(sal_False);
aEditInReadonlyCB.SetState(STATE_NOCHECK);
// <--
aProtectCB. SetState(STATE_NOCHECK);
- aPasswdCB. Check(FALSE);
+ aPasswdCB. Check(sal_False);
aHideCB. SetState(STATE_NOCHECK);
- aFileCB. Check(FALSE);
+ aFileCB. Check(sal_False);
//sonst liegt der Focus auf dem HelpButton
aOK.GrabFocus();
UseFileHdl(&aFileCB);
@@ -1086,22 +1086,22 @@ IMPL_LINK( SwEditRegionDlg, UseFileHdl, CheckBox *, pBox )
if(!CheckPasswd(pBox))
return 0;
SvLBoxEntry* pEntry = aTree.FirstSelected();
- pBox->EnableTriState(FALSE);
- BOOL bMulti = 1 < aTree.GetSelectionCount();
- BOOL bFile = pBox->IsChecked();
+ pBox->EnableTriState(sal_False);
+ sal_Bool bMulti = 1 < aTree.GetSelectionCount();
+ sal_Bool bFile = pBox->IsChecked();
if(pEntry)
{
while(pEntry)
{
const SectReprPtr pSectRepr = (SectRepr*)pEntry->GetUserData();
- BOOL bContent = pSectRepr->IsContent();
+ sal_Bool bContent = pSectRepr->IsContent();
if( pBox->IsChecked() && bContent && rSh.HasSelection() )
{
if( RET_NO == QueryBox( this, SW_RES(QB_CONNECT) ).Execute() )
- pBox->Check( FALSE );
+ pBox->Check( sal_False );
}
if( bFile )
- pSectRepr->SetContent(FALSE);
+ pSectRepr->SetContent(sal_False);
else
{
pSectRepr->SetFile(aEmptyStr);
@@ -1126,7 +1126,7 @@ IMPL_LINK( SwEditRegionDlg, UseFileHdl, CheckBox *, pBox )
}
else
{
- aDDECB.Check(FALSE);
+ aDDECB.Check(sal_False);
DDEHdl(&aDDECB);
// aFileNameED.SetText(aEmptyStr);
aSubRegionED.SetText(aEmptyStr);
@@ -1134,16 +1134,16 @@ IMPL_LINK( SwEditRegionDlg, UseFileHdl, CheckBox *, pBox )
}
else
{
- pBox->Check(FALSE);
- pBox->Enable(FALSE);
- aFilePB.Enable(FALSE);
- aFileNameED.Enable(FALSE);
- aFileNameFT.Enable(FALSE);
- aSubRegionED.Enable(FALSE);
- aSubRegionFT.Enable(FALSE);
- aDDECB.Check(FALSE);
- aDDECB.Enable(FALSE);
- aDDECommandFT.Enable(FALSE);
+ pBox->Check(sal_False);
+ pBox->Enable(sal_False);
+ aFilePB.Enable(sal_False);
+ aFileNameED.Enable(sal_False);
+ aFileNameFT.Enable(sal_False);
+ aSubRegionED.Enable(sal_False);
+ aSubRegionFT.Enable(sal_False);
+ aDDECB.Check(sal_False);
+ aDDECB.Enable(sal_False);
+ aDDECommandFT.Enable(sal_False);
}
return 0;
}
@@ -1220,19 +1220,19 @@ IMPL_LINK( SwEditRegionDlg, OptionsHdl, PushButton *, EMPTYARG )
*pFtnItem, *pEndItem, *pBalanceItem,
*pFrmDirItem, *pLRSpaceItem;
SfxItemState eColState = pOutSet->GetItemState(
- RES_COL, FALSE, &pColItem );
+ RES_COL, sal_False, &pColItem );
SfxItemState eBrushState = pOutSet->GetItemState(
- RES_BACKGROUND, FALSE, &pBrushItem );
+ RES_BACKGROUND, sal_False, &pBrushItem );
SfxItemState eFtnState = pOutSet->GetItemState(
- RES_FTN_AT_TXTEND, FALSE, &pFtnItem );
+ RES_FTN_AT_TXTEND, sal_False, &pFtnItem );
SfxItemState eEndState = pOutSet->GetItemState(
- RES_END_AT_TXTEND, FALSE, &pEndItem );
+ RES_END_AT_TXTEND, sal_False, &pEndItem );
SfxItemState eBalanceState = pOutSet->GetItemState(
- RES_COLUMNBALANCE, FALSE, &pBalanceItem );
+ RES_COLUMNBALANCE, sal_False, &pBalanceItem );
SfxItemState eFrmDirState = pOutSet->GetItemState(
- RES_FRAMEDIR, FALSE, &pFrmDirItem );
+ RES_FRAMEDIR, sal_False, &pFrmDirItem );
SfxItemState eLRState = pOutSet->GetItemState(
- RES_LR_SPACE, FALSE, &pLRSpaceItem);
+ RES_LR_SPACE, sal_False, &pLRSpaceItem);
if( SFX_ITEM_SET == eColState ||
SFX_ITEM_SET == eBrushState ||
@@ -1292,7 +1292,7 @@ IMPL_LINK( SwEditRegionDlg, FileNameHdl, Edit *, pEdit )
if( aDDECB.IsChecked() )
{
String sLink( pEdit->GetText() );
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
while( STRING_NOTFOUND != (nPos = sLink.SearchAscii( " ", nPos )) )
sLink.Erase( nPos--, 1 );
@@ -1335,10 +1335,10 @@ IMPL_LINK( SwEditRegionDlg, DDEHdl, CheckBox*, pBox )
SvLBoxEntry* pEntry=aTree.FirstSelected();
if(pEntry)
{
- BOOL bFile = aFileCB.IsChecked();
+ sal_Bool bFile = aFileCB.IsChecked();
SectReprPtr pSectRepr = (SectRepr*)pEntry->GetUserData();
SwSectionData & rData( pSectRepr->GetSectionData() );
- BOOL bDDE = pBox->IsChecked();
+ sal_Bool bDDE = pBox->IsChecked();
if(bDDE)
{
aFileNameFT.Hide();
@@ -1418,7 +1418,7 @@ IMPL_LINK( SwEditRegionDlg, ChangePasswdHdl, Button *, pBox )
else
{
if(!bChange)
- aPasswdCB.Check(FALSE);
+ aPasswdCB.Check(sal_False);
break;
}
}
@@ -1487,7 +1487,7 @@ IMPL_LINK( SwEditRegionDlg, DlgClosedHdl, sfx2::FileDialogHelper *, _pFileDlg )
sFileName = pMedium->GetURLObject().GetMainURL( INetURLObject::NO_DECODE );
sFilterName = pMedium->GetFilter()->GetFilterName();
const SfxPoolItem* pItem;
- if ( SFX_ITEM_SET == pMedium->GetItemSet()->GetItemState( SID_PASSWORD, FALSE, &pItem ) )
+ if ( SFX_ITEM_SET == pMedium->GetItemSet()->GetItemState( SID_PASSWORD, sal_False, &pItem ) )
sPassword = ( (SfxStringItem*)pItem )->GetValue();
::lcl_ReadSections( *pMedium, aSubRegionED );
delete pMedium;
@@ -1542,7 +1542,7 @@ IMPL_LINK( SwEditRegionDlg, SubRegionEventHdl, VclWindowEvent *, pEvent )
/* -----------------------------08.05.2002 15:00------------------------------
---------------------------------------------------------------------------*/
-Image SwEditRegionDlg::BuildBitmap(BOOL bProtect,BOOL bHidden, BOOL bHighContrast)
+Image SwEditRegionDlg::BuildBitmap(sal_Bool bProtect,sal_Bool bHidden, sal_Bool bHighContrast)
{
ImageList& rImgLst = bHighContrast ? aImageILH : aImageIL;
return rImgLst.GetImage((!bHidden+(bProtect<<1)) + 1);
@@ -1564,7 +1564,7 @@ static void lcl_ReadSections( SfxMedium& rMedium, ComboBox& rBox )
nFormat == SOT_FORMATSTR_ID_STARWRITER_8 || nFormat == SOT_FORMATSTR_ID_STARWRITERGLOB_8)
SwGetReaderXML()->GetSectionList( rMedium, aArr );
- for( USHORT n = 0; n < aArr.Count(); ++n )
+ for( sal_uInt16 n = 0; n < aArr.Count(); ++n )
rBox.InsertEntry( *aArr[ n ] );
aArr.DeleteAndDestroy(0, aArr.Count());
@@ -1593,7 +1593,7 @@ SwInsertSectionTabDialog::SwInsertSectionTabDialog(
SvxHtmlOptions* pHtmlOpt = SvxHtmlOptions::Get();
long nHtmlMode = pHtmlOpt->GetExportMode();
- BOOL bWeb = 0 != PTR_CAST( SwWebDocShell, rSh.GetView().GetDocShell() );
+ sal_Bool bWeb = 0 != PTR_CAST( SwWebDocShell, rSh.GetView().GetDocShell() );
if(bWeb)
{
RemoveTabPage(TP_SECTION_FTNENDNOTES);
@@ -1612,7 +1612,7 @@ SwInsertSectionTabDialog::~SwInsertSectionTabDialog()
/* -----------------21.05.99 10:23-------------------
*
* --------------------------------------------------*/
-void SwInsertSectionTabDialog::PageCreated( USHORT nId, SfxTabPage &rPage )
+void SwInsertSectionTabDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
{
if(TP_INSERT_SECTION == nId)
((SwInsertSectionTabPage&)rPage).SetWrtShell(rWrtSh);
@@ -1626,8 +1626,8 @@ void SwInsertSectionTabDialog::PageCreated( USHORT nId, SfxTabPage &rPage )
{
const SwFmtFrmSize& rSize = (const SwFmtFrmSize&)GetInputSetImpl()->Get(RES_FRM_SIZE);
((SwColumnPage&)rPage).SetPageWidth(rSize.GetWidth());
- ((SwColumnPage&)rPage).ShowBalance(TRUE);
- ((SwColumnPage&)rPage).SetInSection(TRUE);
+ ((SwColumnPage&)rPage).ShowBalance(sal_True);
+ ((SwColumnPage&)rPage).SetInSection(sal_True);
}
else if(TP_SECTION_INDENTS == nId)
((SwSectionIndentTabPage&)rPage).SetWrtShell(rWrtSh);
@@ -1657,7 +1657,7 @@ short SwInsertSectionTabDialog::Ok()
{
SfxRequest aRequest( pViewFrm, FN_INSERT_REGION);
const SfxPoolItem* pCol;
- if(SFX_ITEM_SET == pOutputItemSet->GetItemState(RES_COL, FALSE, &pCol))
+ if(SFX_ITEM_SET == pOutputItemSet->GetItemState(RES_COL, sal_False, &pCol))
{
aRequest.AppendItem(SfxUInt16Item(SID_ATTR_COLUMNS,
((const SwFmtCol*)pCol)->GetColumns().Count()));
@@ -1748,7 +1748,7 @@ void SwInsertSectionTabPage::SetWrtShell(SwWrtShell& rSh)
{
m_pWrtSh = &rSh;
- BOOL bWeb = 0 != PTR_CAST(SwWebDocShell, m_pWrtSh->GetView().GetDocShell());
+ sal_Bool bWeb = 0 != PTR_CAST(SwWebDocShell, m_pWrtSh->GetView().GetDocShell());
if(bWeb)
{
aHideCB .Hide();
@@ -1782,11 +1782,11 @@ void SwInsertSectionTabPage::SetWrtShell(SwWrtShell& rSh)
/* -----------------21.05.99 10:32-------------------
*
* --------------------------------------------------*/
-BOOL SwInsertSectionTabPage::FillItemSet( SfxItemSet& )
+sal_Bool SwInsertSectionTabPage::FillItemSet( SfxItemSet& )
{
SwSectionData aSection(CONTENT_SECTION, aCurName.GetText());
aSection.SetCondition(aConditionED.GetText());
- BOOL bProtected = aProtectCB.IsChecked();
+ sal_Bool bProtected = aProtectCB.IsChecked();
aSection.SetProtectFlag(bProtected);
aSection.SetHidden(aHideCB.IsChecked());
// --> FME 2004-06-22 #114856# edit in readonly sections
@@ -1798,7 +1798,7 @@ BOOL SwInsertSectionTabPage::FillItemSet( SfxItemSet& )
}
String sFileName = aFileNameED.GetText();
String sSubRegion = aSubRegionED.GetText();
- BOOL bDDe = aDDECB.IsChecked();
+ sal_Bool bDDe = aDDECB.IsChecked();
if(aFileCB.IsChecked() && (sFileName.Len() || sSubRegion.Len() || bDDe))
{
String aLinkFile;
@@ -1806,7 +1806,7 @@ BOOL SwInsertSectionTabPage::FillItemSet( SfxItemSet& )
{
aLinkFile = sFileName;
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
while( STRING_NOTFOUND != (nPos = aLinkFile.SearchAscii( " ", nPos )) )
aLinkFile.Erase( nPos--, 1 );
@@ -1841,7 +1841,7 @@ BOOL SwInsertSectionTabPage::FillItemSet( SfxItemSet& )
}
}
((SwInsertSectionTabDialog*)GetTabDialog())->SetSectionData(aSection);
- return TRUE;
+ return sal_True;
}
/* -----------------21.05.99 10:32-------------------
*
@@ -1863,7 +1863,7 @@ SfxTabPage* SwInsertSectionTabPage::Create( Window* pParent,
IMPL_LINK( SwInsertSectionTabPage, ChangeHideHdl, CheckBox *, pBox )
{
- BOOL bHide = pBox->IsChecked();
+ sal_Bool bHide = pBox->IsChecked();
aConditionED.Enable(bHide);
aConditionFT.Enable(bHide);
return 0;
@@ -1913,7 +1913,7 @@ IMPL_LINK( SwInsertSectionTabPage, ChangePasswdHdl, Button *, pButton )
}
}
else if(!bChange)
- aPasswdCB.Check(FALSE);
+ aPasswdCB.Check(sal_False);
}
}
else
@@ -1942,10 +1942,10 @@ IMPL_LINK( SwInsertSectionTabPage, UseFileHdl, CheckBox *, pBox )
{
if( m_pWrtSh->HasSelection() &&
RET_NO == QueryBox( this, SW_RES(QB_CONNECT) ).Execute() )
- pBox->Check( FALSE );
+ pBox->Check( sal_False );
}
- BOOL bFile = pBox->IsChecked();
+ sal_Bool bFile = pBox->IsChecked();
aFileNameFT.Enable(bFile);
aFileNameED.Enable(bFile);
aFilePB.Enable(bFile);
@@ -1957,11 +1957,11 @@ IMPL_LINK( SwInsertSectionTabPage, UseFileHdl, CheckBox *, pBox )
{
// aFileNameED.SetText( aFileName );
aFileNameED.GrabFocus();
- aProtectCB.Check( TRUE );
+ aProtectCB.Check( sal_True );
}
else
{
- aDDECB.Check(FALSE);
+ aDDECB.Check(sal_False);
DDEHdl(&aDDECB);
// aFileNameED.SetText(aEmptyStr);
}
@@ -1989,8 +1989,8 @@ IMPL_LINK( SwInsertSectionTabPage, FileSearchHdl, PushButton *, EMPTYARG )
IMPL_LINK( SwInsertSectionTabPage, DDEHdl, CheckBox*, pBox )
{
- BOOL bDDE = pBox->IsChecked();
- BOOL bFile = aFileCB.IsChecked();
+ sal_Bool bDDE = pBox->IsChecked();
+ sal_Bool bFile = aFileCB.IsChecked();
aFilePB.Enable(!bDDE && bFile);
if(bDDE)
{
@@ -2022,7 +2022,7 @@ IMPL_LINK( SwInsertSectionTabPage, DlgClosedHdl, sfx2::FileDialogHelper *, _pFil
m_sFileName = pMedium->GetURLObject().GetMainURL( INetURLObject::NO_DECODE );
m_sFilterName = pMedium->GetFilter()->GetFilterName();
const SfxPoolItem* pItem;
- if ( SFX_ITEM_SET == pMedium->GetItemSet()->GetItemState( SID_PASSWORD, FALSE, &pItem ) )
+ if ( SFX_ITEM_SET == pMedium->GetItemSet()->GetItemState( SID_PASSWORD, sal_False, &pItem ) )
m_sFilePasswd = ( (SfxStringItem*)pItem )->GetValue();
aFileNameED.SetText( INetURLObject::decode(
m_sFileName, INET_HEX_ESCAPE, INetURLObject::DECODE_UNAMBIGUOUS, RTL_TEXTENCODING_UTF8 ) );
@@ -2049,12 +2049,12 @@ IMPL_LINK( SwInsertSectionTabPage, DlgClosedHdl, sfx2::FileDialogHelper *, _pFil
// 5 - A, .., AA, .., - 9
// 6 - a, .., aa, .., - 10
-inline USHORT GetNumPos( USHORT n )
+inline sal_uInt16 GetNumPos( sal_uInt16 n )
{
return SVX_NUM_ARABIC < n ? n - 4 : n;
}
-inline SvxExtNumType GetNumType( USHORT n )
+inline SvxExtNumType GetNumType( sal_uInt16 n )
{
return (SvxExtNumType)(4 < n ? n + 4 : n );
}
@@ -2105,7 +2105,7 @@ SwSectionFtnEndTabPage::~SwSectionFtnEndTabPage()
{
}
-BOOL SwSectionFtnEndTabPage::FillItemSet( SfxItemSet& rSet )
+sal_Bool SwSectionFtnEndTabPage::FillItemSet( SfxItemSet& rSet )
{
SwFmtFtnAtTxtEnd aFtn( aFtnNtAtTextEndCB.IsChecked()
? ( aFtnNtNumCB.IsChecked()
@@ -2124,7 +2124,7 @@ BOOL SwSectionFtnEndTabPage::FillItemSet( SfxItemSet& rSet )
// no break;
case FTNEND_ATTXTEND_OWNNUMSEQ:
- aFtn.SetOffset( static_cast< USHORT >( aFtnOffsetFld.GetValue()-1 ) );
+ aFtn.SetOffset( static_cast< sal_uInt16 >( aFtnOffsetFld.GetValue()-1 ) );
// no break;
}
@@ -2145,17 +2145,17 @@ BOOL SwSectionFtnEndTabPage::FillItemSet( SfxItemSet& rSet )
// no break;
case FTNEND_ATTXTEND_OWNNUMSEQ:
- aEnd.SetOffset( static_cast< USHORT >( aEndOffsetFld.GetValue()-1 ) );
+ aEnd.SetOffset( static_cast< sal_uInt16 >( aEndOffsetFld.GetValue()-1 ) );
// no break;
}
rSet.Put( aFtn );
rSet.Put( aEnd );
- return TRUE;
+ return sal_True;
}
-void SwSectionFtnEndTabPage::ResetState( BOOL bFtn,
+void SwSectionFtnEndTabPage::ResetState( sal_Bool bFtn,
const SwFmtFtnEndAtTxtEnd& rAttr )
{
CheckBox *pNtAtTextEndCB, *pNtNumCB, *pNtNumFmtCB;
@@ -2192,7 +2192,7 @@ void SwSectionFtnEndTabPage::ResetState( BOOL bFtn,
pOffsetFld = &aEndOffsetFld;
}
- USHORT eState = rAttr.GetValue();
+ sal_uInt16 eState = rAttr.GetValue();
switch( eState )
{
// case FTNEND_ATPGORDOCEND:
@@ -2217,31 +2217,31 @@ void SwSectionFtnEndTabPage::ResetState( BOOL bFtn,
switch( eState )
{
case FTNEND_ATPGORDOCEND:
- pNtNumCB->Enable( FALSE );
+ pNtNumCB->Enable( sal_False );
// no break;
case FTNEND_ATTXTEND:
- pNtNumFmtCB->Enable( FALSE );
- pOffsetFld->Enable( FALSE );
- pOffsetTxt->Enable( FALSE );
+ pNtNumFmtCB->Enable( sal_False );
+ pOffsetFld->Enable( sal_False );
+ pOffsetTxt->Enable( sal_False );
// no break;
case FTNEND_ATTXTEND_OWNNUMSEQ:
- pNumViewBox->Enable( FALSE );
- pPrefixFT->Enable( FALSE );
- pPrefixED->Enable( FALSE );
- pSuffixFT->Enable( FALSE );
- pSuffixED->Enable( FALSE );
+ pNumViewBox->Enable( sal_False );
+ pPrefixFT->Enable( sal_False );
+ pPrefixED->Enable( sal_False );
+ pSuffixFT->Enable( sal_False );
+ pSuffixED->Enable( sal_False );
// no break;
}
}
void SwSectionFtnEndTabPage::Reset( const SfxItemSet& rSet )
{
- ResetState( TRUE, (const SwFmtFtnAtTxtEnd&)rSet.Get(
- RES_FTN_AT_TXTEND, FALSE ));
- ResetState( FALSE, (const SwFmtEndAtTxtEnd&)rSet.Get(
- RES_END_AT_TXTEND, FALSE ));
+ ResetState( sal_True, (const SwFmtFtnAtTxtEnd&)rSet.Get(
+ RES_FTN_AT_TXTEND, sal_False ));
+ ResetState( sal_False, (const SwFmtEndAtTxtEnd&)rSet.Get(
+ RES_END_AT_TXTEND, sal_False ));
}
SfxTabPage* SwSectionFtnEndTabPage::Create( Window* pParent,
@@ -2252,8 +2252,8 @@ SfxTabPage* SwSectionFtnEndTabPage::Create( Window* pParent,
IMPL_LINK( SwSectionFtnEndTabPage, FootEndHdl, CheckBox *, pBox )
{
-// pBox->EnableTriState( FALSE );
- BOOL bFoot = &aFtnNtAtTextEndCB == pBox || &aFtnNtNumCB == pBox ||
+// pBox->EnableTriState( sal_False );
+ sal_Bool bFoot = &aFtnNtAtTextEndCB == pBox || &aFtnNtNumCB == pBox ||
&aFtnNtNumFmtCB == pBox ;
CheckBox *pNumBox, *pNumFmtBox, *pEndBox;
@@ -2290,9 +2290,9 @@ IMPL_LINK( SwSectionFtnEndTabPage, FootEndHdl, CheckBox *, pBox )
pSuffixED = &aEndSuffixED;
}
- BOOL bEnableAtEnd = STATE_CHECK == pEndBox->GetState();
- BOOL bEnableNum = bEnableAtEnd && STATE_CHECK == pNumBox->GetState();
- BOOL bEnableNumFmt = bEnableNum && STATE_CHECK == pNumFmtBox->GetState();
+ sal_Bool bEnableAtEnd = STATE_CHECK == pEndBox->GetState();
+ sal_Bool bEnableNum = bEnableAtEnd && STATE_CHECK == pNumBox->GetState();
+ sal_Bool bEnableNumFmt = bEnableNum && STATE_CHECK == pNumFmtBox->GetState();
pNumBox->Enable( bEnableAtEnd );
pOffsetTxt->Enable( bEnableNum );
@@ -2325,7 +2325,7 @@ SwSectionPropertyTabDialog::SwSectionPropertyTabDialog(
SvxHtmlOptions* pHtmlOpt = SvxHtmlOptions::Get();
long nHtmlMode = pHtmlOpt->GetExportMode();
- BOOL bWeb = 0 != PTR_CAST( SwWebDocShell, rSh.GetView().GetDocShell() );
+ sal_Bool bWeb = 0 != PTR_CAST( SwWebDocShell, rSh.GetView().GetDocShell() );
if(bWeb)
{
RemoveTabPage(TP_SECTION_FTNENDNOTES);
@@ -2343,7 +2343,7 @@ SwSectionPropertyTabDialog::~SwSectionPropertyTabDialog()
/* -----------------21.05.99 13:59-------------------
*
* --------------------------------------------------*/
-void SwSectionPropertyTabDialog::PageCreated( USHORT nId, SfxTabPage &rPage )
+void SwSectionPropertyTabDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
{
if( TP_BACKGROUND == nId )
{
@@ -2353,8 +2353,8 @@ void SwSectionPropertyTabDialog::PageCreated( USHORT nId, SfxTabPage &rPage )
}
else if( TP_COLUMN == nId )
{
- ((SwColumnPage&)rPage).ShowBalance(TRUE);
- ((SwColumnPage&)rPage).SetInSection(TRUE);
+ ((SwColumnPage&)rPage).ShowBalance(sal_True);
+ ((SwColumnPage&)rPage).SetInSection(sal_True);
}
else if(TP_SECTION_INDENTS == nId)
((SwSectionIndentTabPage&)rPage).SetWrtShell(rWrtSh);
@@ -2385,7 +2385,7 @@ SwSectionIndentTabPage::~SwSectionIndentTabPage()
/*-- 13.06.2003 09:59:23---------------------------------------------------
-----------------------------------------------------------------------*/
-BOOL SwSectionIndentTabPage::FillItemSet( SfxItemSet& rSet)
+sal_Bool SwSectionIndentTabPage::FillItemSet( SfxItemSet& rSet)
{
if(aBeforeMF.IsValueModified() ||
aAfterMF.IsValueModified())
@@ -2395,7 +2395,7 @@ BOOL SwSectionIndentTabPage::FillItemSet( SfxItemSet& rSet)
static_cast< long >(aAfterMF.Denormalize(aAfterMF.GetValue(FUNIT_TWIP))), 0, 0, RES_LR_SPACE);
rSet.Put(aLRSpace);
}
- return TRUE;
+ return sal_True;
}
/*-- 13.06.2003 09:59:24---------------------------------------------------
@@ -2403,7 +2403,7 @@ BOOL SwSectionIndentTabPage::FillItemSet( SfxItemSet& rSet)
void SwSectionIndentTabPage::Reset( const SfxItemSet& rSet)
{
//this page doesn't show up in HTML mode
- FieldUnit aMetric = ::GetDfltMetric(FALSE);
+ FieldUnit aMetric = ::GetDfltMetric(sal_False);
SetMetric(aBeforeMF, aMetric);
SetMetric(aAfterMF , aMetric);
@@ -2451,7 +2451,7 @@ IMPL_LINK(SwSectionIndentTabPage, IndentModifyHdl, MetricField*, EMPTYARG)
{
aPreviewWin.SetLeftMargin( static_cast< long >(aBeforeMF.Denormalize(aBeforeMF.GetValue(FUNIT_TWIP))) );
aPreviewWin.SetRightMargin( static_cast< long >(aAfterMF.Denormalize(aAfterMF.GetValue(FUNIT_TWIP))) );
- aPreviewWin.Draw(TRUE);
+ aPreviewWin.Draw(sal_True);
return 0;
}
diff --git a/sw/source/ui/dochdl/gloshdl.cxx b/sw/source/ui/dochdl/gloshdl.cxx
index c19fb0bd9d..8e75f16fec 100644..100755
--- a/sw/source/ui/dochdl/gloshdl.cxx
+++ b/sw/source/ui/dochdl/gloshdl.cxx
@@ -139,7 +139,7 @@ void SwGlossaryHdl::GlossaryDlg()
------------------------------------------------------------------------*/
-void SwGlossaryHdl::SetCurGroup(const String &rGrp, BOOL bApi, BOOL bAlwaysCreateNew )
+void SwGlossaryHdl::SetCurGroup(const String &rGrp, sal_Bool bApi, sal_Bool bAlwaysCreateNew )
{
String sGroup(rGrp);
if(STRING_NOTFOUND == sGroup.Search(GLOS_DELIM) && !FindGroupName(sGroup))
@@ -149,7 +149,7 @@ void SwGlossaryHdl::SetCurGroup(const String &rGrp, BOOL bApi, BOOL bAlwaysCreat
}
if(pCurGrp)
{
- BOOL bPathEqual = FALSE;
+ sal_Bool bPathEqual = sal_False;
if(!bAlwaysCreateNew)
{
INetURLObject aTemp( pCurGrp->GetFileName() );
@@ -157,8 +157,8 @@ void SwGlossaryHdl::SetCurGroup(const String &rGrp, BOOL bApi, BOOL bAlwaysCreat
aTemp.removeSegment();
const String sCurEntryPath = aTemp.GetMainURL(INetURLObject::NO_DECODE);
const SvStrings* pPathArr = rStatGlossaries.GetPathArray();
- USHORT nCurrentPath = USHRT_MAX;
- for(USHORT nPath = 0; nPath < pPathArr->Count(); nPath++)
+ sal_uInt16 nCurrentPath = USHRT_MAX;
+ for(sal_uInt16 nPath = 0; nPath < pPathArr->Count(); nPath++)
{
if(sCurEntryPath == *(*pPathArr)[nPath])
{
@@ -167,10 +167,10 @@ void SwGlossaryHdl::SetCurGroup(const String &rGrp, BOOL bApi, BOOL bAlwaysCreat
}
}
String sPath = sGroup.GetToken(1, GLOS_DELIM);
- USHORT nComparePath = (USHORT)sPath.ToInt32();
+ sal_uInt16 nComparePath = (sal_uInt16)sPath.ToInt32();
if(nCurrentPath == nComparePath &&
sGroup.GetToken(0, GLOS_DELIM) == sCurBase)
- bPathEqual = TRUE;
+ bPathEqual = sal_True;
}
// const String aMac_Tmp(pCurGrp->GetName());
// Beim Pfadwechsel kann man sich auf den Namen nicht verlassen
@@ -188,7 +188,7 @@ void SwGlossaryHdl::SetCurGroup(const String &rGrp, BOOL bApi, BOOL bAlwaysCreat
rStatGlossaries.PutGroupDoc(pCurGrp);
pCurGrp = 0;
}
- pCurGrp = rStatGlossaries.GetGroupDoc(aCurGrp, TRUE);
+ pCurGrp = rStatGlossaries.GetGroupDoc(aCurGrp, sal_True);
}
}
@@ -197,7 +197,7 @@ void SwGlossaryHdl::SetCurGroup(const String &rGrp, BOOL bApi, BOOL bAlwaysCreat
------------------------------------------------------------------------*/
-USHORT SwGlossaryHdl::GetGroupCnt() const
+sal_uInt16 SwGlossaryHdl::GetGroupCnt() const
{
return rStatGlossaries.GetGroupCnt();
}
@@ -207,12 +207,12 @@ USHORT SwGlossaryHdl::GetGroupCnt() const
------------------------------------------------------------------------*/
-String SwGlossaryHdl::GetGroupName( USHORT nId, String* pTitle )
+String SwGlossaryHdl::GetGroupName( sal_uInt16 nId, String* pTitle )
{
String sRet = rStatGlossaries.GetGroupName(nId);
if(pTitle)
{
- SwTextBlocks* pGroup = rStatGlossaries.GetGroupDoc(sRet, FALSE);
+ SwTextBlocks* pGroup = rStatGlossaries.GetGroupDoc(sRet, sal_False);
if(pGroup && !pGroup->GetError())
{
*pTitle = pGroup->GetName();
@@ -233,7 +233,7 @@ String SwGlossaryHdl::GetGroupName( USHORT nId, String* pTitle )
------------------------------------------------------------------------*/
-BOOL SwGlossaryHdl::NewGroup(String &rGrpName, const String& rTitle)
+sal_Bool SwGlossaryHdl::NewGroup(String &rGrpName, const String& rTitle)
{
if(STRING_NOTFOUND == rGrpName.Search(GLOS_DELIM))
FindGroupName(rGrpName);
@@ -242,20 +242,20 @@ BOOL SwGlossaryHdl::NewGroup(String &rGrpName, const String& rTitle)
/* -----------------23.11.98 13:10-------------------
* Umbenennen eines Textbausteins
* --------------------------------------------------*/
-BOOL SwGlossaryHdl::RenameGroup(const String & rOld, String& rNew, const String& rNewTitle)
+sal_Bool SwGlossaryHdl::RenameGroup(const String & rOld, String& rNew, const String& rNewTitle)
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
String sOldGroup(rOld);
if(STRING_NOTFOUND == rOld.Search(GLOS_DELIM))
FindGroupName(sOldGroup);
if(rOld == rNew)
{
- SwTextBlocks* pGroup = rStatGlossaries.GetGroupDoc(sOldGroup, FALSE);
+ SwTextBlocks* pGroup = rStatGlossaries.GetGroupDoc(sOldGroup, sal_False);
if(pGroup)
{
pGroup->SetName(rNewTitle);
rStatGlossaries.PutGroupDoc( pGroup );
- bRet = TRUE;
+ bRet = sal_True;
}
}
else
@@ -274,23 +274,23 @@ BOOL SwGlossaryHdl::RenameGroup(const String & rOld, String& rNew, const String&
/* -----------------27.11.98 13:49-------------------
*
* --------------------------------------------------*/
-BOOL SwGlossaryHdl::CopyOrMove( const String& rSourceGroupName, String& rSourceShortName,
- const String& rDestGroupName, const String& rLongName, BOOL bMove )
+sal_Bool SwGlossaryHdl::CopyOrMove( const String& rSourceGroupName, String& rSourceShortName,
+ const String& rDestGroupName, const String& rLongName, sal_Bool bMove )
{
- SwTextBlocks* pSourceGroup = rStatGlossaries.GetGroupDoc(rSourceGroupName, FALSE);
+ SwTextBlocks* pSourceGroup = rStatGlossaries.GetGroupDoc(rSourceGroupName, sal_False);
- SwTextBlocks* pDestGroup = rStatGlossaries.GetGroupDoc(rDestGroupName, FALSE);
+ SwTextBlocks* pDestGroup = rStatGlossaries.GetGroupDoc(rDestGroupName, sal_False);
if(pDestGroup->IsReadOnly() || (bMove && pSourceGroup->IsReadOnly()) )
- return FALSE;
+ return sal_False;
/*if(pDestGroup->IsOld()&& 0!= pDestGroup->ConvertToNew())
- return FALSE;
+ return sal_False;
if(bMove && pSourceGroup->IsOld() && 0 != pSourceGroup->ConvertToNew())
- return FALSE;*/
+ return sal_False;*/
//Der Index muss hier ermittelt werden, weil rSourceShortName in CopyBlock evtl veraendert wird
- USHORT nDeleteIdx = pSourceGroup->GetIndex( rSourceShortName );
+ sal_uInt16 nDeleteIdx = pSourceGroup->GetIndex( rSourceShortName );
DBG_ASSERT(USHRT_MAX != nDeleteIdx, "Eintrag nicht gefunden");
- ULONG nRet = pSourceGroup->CopyBlock( *pDestGroup, rSourceShortName, rLongName );
+ sal_uLong nRet = pSourceGroup->CopyBlock( *pDestGroup, rSourceShortName, rLongName );
if(!nRet && bMove)
{
// der Index muss existieren
@@ -306,7 +306,7 @@ BOOL SwGlossaryHdl::CopyOrMove( const String& rSourceGroupName, String& rSource
------------------------------------------------------------------------*/
-BOOL SwGlossaryHdl::DelGroup(const String &rGrpName)
+sal_Bool SwGlossaryHdl::DelGroup(const String &rGrpName)
{
String sGroup(rGrpName);
if(STRING_NOTFOUND == sGroup.Search(GLOS_DELIM))
@@ -319,9 +319,9 @@ BOOL SwGlossaryHdl::DelGroup(const String &rGrpName)
if(aMac_Tmp == sGroup)
DELETEZ(pCurGrp);
}
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
/*------------------------------------------------------------------------
@@ -329,7 +329,7 @@ BOOL SwGlossaryHdl::DelGroup(const String &rGrpName)
------------------------------------------------------------------------*/
-USHORT SwGlossaryHdl::GetGlossaryCnt()
+sal_uInt16 SwGlossaryHdl::GetGlossaryCnt()
{
return pCurGrp ? pCurGrp->GetCount() : 0;
}
@@ -339,7 +339,7 @@ USHORT SwGlossaryHdl::GetGlossaryCnt()
------------------------------------------------------------------------*/
-String SwGlossaryHdl::GetGlossaryName( USHORT nId )
+String SwGlossaryHdl::GetGlossaryName( sal_uInt16 nId )
{
ASSERT(nId < GetGlossaryCnt(), Textbausteinarray ueberindiziert.);
return pCurGrp->GetLongName( nId );
@@ -347,7 +347,7 @@ String SwGlossaryHdl::GetGlossaryName( USHORT nId )
/* -----------------30.11.98 13:18-------------------
*
* --------------------------------------------------*/
-String SwGlossaryHdl::GetGlossaryShortName(USHORT nId)
+String SwGlossaryHdl::GetGlossaryShortName(sal_uInt16 nId)
{
ASSERT(nId < GetGlossaryCnt(), Textbausteinarray ueberindiziert.);
return pCurGrp->GetShortName( nId );
@@ -363,11 +363,11 @@ String SwGlossaryHdl::GetGlossaryShortName(const String &rName)
{
String sReturn;
SwTextBlocks *pTmp =
- pCurGrp ? pCurGrp: rStatGlossaries.GetGroupDoc( aCurGrp, FALSE );
+ pCurGrp ? pCurGrp: rStatGlossaries.GetGroupDoc( aCurGrp, sal_False );
if(pTmp)
{
- USHORT nIdx = pTmp->GetLongIndex( rName );
- if( nIdx != (USHORT) -1 )
+ sal_uInt16 nIdx = pTmp->GetLongIndex( rName );
+ if( nIdx != (sal_uInt16) -1 )
sReturn = pTmp->GetShortName( nIdx );
if( !pCurGrp )
rStatGlossaries.PutGroupDoc( pTmp );
@@ -380,11 +380,11 @@ String SwGlossaryHdl::GetGlossaryShortName(const String &rName)
------------------------------------------------------------------------*/
-BOOL SwGlossaryHdl::HasShortName(const String& rShortName) const
+sal_Bool SwGlossaryHdl::HasShortName(const String& rShortName) const
{
SwTextBlocks *pBlock = pCurGrp ? pCurGrp
: rStatGlossaries.GetGroupDoc( aCurGrp );
- BOOL bRet = pBlock->GetIndex( rShortName ) != (USHORT) -1;
+ sal_Bool bRet = pBlock->GetIndex( rShortName ) != (sal_uInt16) -1;
if( !pCurGrp )
rStatGlossaries.PutGroupDoc( pBlock );
return bRet;
@@ -393,7 +393,7 @@ BOOL SwGlossaryHdl::HasShortName(const String& rShortName) const
/* -----------------------------20.03.01 10:52--------------------------------
---------------------------------------------------------------------------*/
-BOOL SwGlossaryHdl::ConvertToNew(SwTextBlocks& /*rOld*/)
+sal_Bool SwGlossaryHdl::ConvertToNew(SwTextBlocks& /*rOld*/)
{
/*if( rOld.IsOld() )
{
@@ -403,70 +403,70 @@ BOOL SwGlossaryHdl::ConvertToNew(SwTextBlocks& /*rOld*/)
if( rOld.ConvertToNew() )
{
InfoBox(pWrtShell->GetView().GetWindow(), SW_RES(MSG_ERR_INSERT_GLOS)).Execute();
- return FALSE;
+ return sal_False;
}
}
else
- return FALSE;
+ return sal_False;
}*/
- return TRUE;
+ return sal_True;
}
/*------------------------------------------------------------------------
Beschreibung: Erzeugen eines Textbausteines
------------------------------------------------------------------------*/
-BOOL SwGlossaryHdl::NewGlossary(const String& rName, const String& rShortName,
- BOOL bCreateGroup, BOOL bNoAttr)
+sal_Bool SwGlossaryHdl::NewGlossary(const String& rName, const String& rShortName,
+ sal_Bool bCreateGroup, sal_Bool bNoAttr)
{
SwTextBlocks *pTmp =
pCurGrp ? pCurGrp: rStatGlossaries.GetGroupDoc( aCurGrp, bCreateGroup );
//pTmp == 0 if the AutoText path setting is wrong
if(!pTmp)
- return FALSE;
+ return sal_False;
if(!ConvertToNew(*pTmp))
- return FALSE;
+ return sal_False;
String sOnlyTxt;
String* pOnlyTxt = 0;
if( bNoAttr )
{
if( !pWrtShell->GetSelectedText( sOnlyTxt, GETSELTXT_PARABRK_TO_ONLYCR ))
- return FALSE;
+ return sal_False;
pOnlyTxt = &sOnlyTxt;
}
const SvxAutoCorrCfg* pCfg = SvxAutoCorrCfg::Get();
- const USHORT nSuccess = pWrtShell->MakeGlossary( *pTmp, rName, rShortName,
+ const sal_uInt16 nSuccess = pWrtShell->MakeGlossary( *pTmp, rName, rShortName,
pCfg->IsSaveRelFile(), pOnlyTxt );
- if(nSuccess == (USHORT) -1 )
+ if(nSuccess == (sal_uInt16) -1 )
{
InfoBox(pWrtShell->GetView().GetWindow(), SW_RES(MSG_ERR_INSERT_GLOS)).Execute();
}
if( !pCurGrp )
rStatGlossaries.PutGroupDoc( pTmp );
- return BOOL( nSuccess != (USHORT) -1 );
+ return sal_Bool( nSuccess != (sal_uInt16) -1 );
}
/*------------------------------------------------------------------------
Beschreibung: Loeschen eines Textbausteines
------------------------------------------------------------------------*/
-BOOL SwGlossaryHdl::DelGlossary(const String &rShortName)
+sal_Bool SwGlossaryHdl::DelGlossary(const String &rShortName)
{
SwTextBlocks *pGlossary = pCurGrp ? pCurGrp
: rStatGlossaries.GetGroupDoc(aCurGrp);
//pTmp == 0 if the AutoText path setting is wrong
if(!pGlossary || !ConvertToNew(*pGlossary))
- return FALSE;
+ return sal_False;
- USHORT nIdx = pGlossary->GetIndex( rShortName );
- if( nIdx != (USHORT) -1 )
+ sal_uInt16 nIdx = pGlossary->GetIndex( rShortName );
+ if( nIdx != (sal_uInt16) -1 )
pGlossary->Delete( nIdx );
if( !pCurGrp )
rStatGlossaries.PutGroupDoc( pGlossary );
- return TRUE;
+ return sal_True;
}
/*------------------------------------------------------------------------
@@ -474,7 +474,7 @@ BOOL SwGlossaryHdl::DelGlossary(const String &rShortName)
------------------------------------------------------------------------*/
-BOOL SwGlossaryHdl::ExpandGlossary()
+sal_Bool SwGlossaryHdl::ExpandGlossary()
{
ASSERT(pWrtShell->CanInsert(), illegal);
SwTextBlocks *pGlossary;
@@ -508,37 +508,37 @@ BOOL SwGlossaryHdl::ExpandGlossary()
if(pWrtShell->IsSelection())
aShortName = pWrtShell->GetSelTxt();
}
- return pGlossary ? Expand( aShortName, &rStatGlossaries, pGlossary ) : FALSE;
+ return pGlossary ? Expand( aShortName, &rStatGlossaries, pGlossary ) : sal_False;
}
-BOOL SwGlossaryHdl::Expand( const String& rShortName,
+sal_Bool SwGlossaryHdl::Expand( const String& rShortName,
SwGlossaries *pGlossaries,
SwTextBlocks *pGlossary )
{
TextBlockInfoArr aFoundArr;
String aShortName( rShortName );
- BOOL bCancel = FALSE;
+ sal_Bool bCancel = sal_False;
// search for text block
//#b6633427# - don't prefer current group depending on configuration setting
const SvxAutoCorrCfg* pCfg = SvxAutoCorrCfg::Get();
- USHORT nFound = !pCfg->IsSearchInAllCategories() ? pGlossary->GetIndex( aShortName ) : -1;
+ sal_uInt16 nFound = !pCfg->IsSearchInAllCategories() ? pGlossary->GetIndex( aShortName ) : -1;
// if not found then search in all groups
- if( nFound == (USHORT) -1 )
+ if( nFound == (sal_uInt16) -1 )
{
const ::utl::TransliterationWrapper& rSCmp = GetAppCmpStrIgnore();
SwGlossaryList* pGlossaryList = ::GetGlossaryList();
- USHORT nGroupCount = pGlossaryList->GetGroupCount();
- for(USHORT i = 1; i <= nGroupCount; i++)
+ sal_uInt16 nGroupCount = pGlossaryList->GetGroupCount();
+ for(sal_uInt16 i = 1; i <= nGroupCount; i++)
{
// Gruppenname mit Pfad-Extension besorgen
String sTitle;
- String sGroupName = pGlossaryList->GetGroupName(i - 1, FALSE, &sTitle);
+ String sGroupName = pGlossaryList->GetGroupName(i - 1, sal_False, &sTitle);
if(sGroupName == pGlossary->GetName())
continue;
- USHORT nBlockCount = pGlossaryList->GetBlockCount(i -1);
+ sal_uInt16 nBlockCount = pGlossaryList->GetBlockCount(i -1);
if(nBlockCount)
{
- for(USHORT j = 0; j < nBlockCount; j++)
+ for(sal_uInt16 j = 0; j < nBlockCount; j++)
{
String sEntry;
String sLongName(pGlossaryList->GetBlockName(i - 1, j, sEntry));
@@ -569,13 +569,13 @@ BOOL SwGlossaryHdl::Expand( const String& rShortName,
AbstarctSwSelGlossaryDlg* pDlg = pFact->CreateSwSelGlossaryDlg( 0, aShortName, DLG_SEL_GLOS );
DBG_ASSERT(pDlg, "Dialogdiet fail!");
- for(USHORT i = 0; i < aFoundArr.Count(); ++i)
+ for(sal_uInt16 i = 0; i < aFoundArr.Count(); ++i)
{
TextBlockInfo_Impl* pData = aFoundArr.GetObject(i);
pDlg->InsertGlos(pData->sTitle, pData->sLongName);
}
pDlg->SelectEntryPos(0);
- const USHORT nRet = RET_OK == pDlg->Execute()?
+ const sal_uInt16 nRet = RET_OK == pDlg->Execute()?
pDlg->GetSelectedIdx():
LISTBOX_ENTRY_NOTFOUND;
delete pDlg;
@@ -587,21 +587,21 @@ BOOL SwGlossaryHdl::Expand( const String& rShortName,
}
else
{
- nFound = (USHORT) -1;
- bCancel = TRUE;
+ nFound = (sal_uInt16) -1;
+ bCancel = sal_True;
}
}
}
}
// nicht gefunden
- if( nFound == (USHORT) -1 )
+ if( nFound == (sal_uInt16) -1 )
{
if( !bCancel )
{
pGlossaries->PutGroupDoc(pGlossary);
- const USHORT nMaxLen = 50;
+ const sal_uInt16 nMaxLen = 50;
if(pWrtShell->IsSelection() && aShortName.Len() > nMaxLen)
{
aShortName.Erase(nMaxLen);
@@ -612,7 +612,7 @@ BOOL SwGlossaryHdl::Expand( const String& rShortName,
InfoBox( pWrtShell->GetView().GetWindow(), aTmp ).Execute();
}
- return FALSE;
+ return sal_False;
}
else
{
@@ -633,7 +633,7 @@ BOOL SwGlossaryHdl::Expand( const String& rShortName,
pWrtShell->StartAllAction();
// alle InputFelder zwischenspeichern
- SwInputFieldList aFldLst( pWrtShell, TRUE );
+ SwInputFieldList aFldLst( pWrtShell, sal_True );
pWrtShell->InsertGlossary(*pGlossary, aShortName);
pWrtShell->EndAllAction();
@@ -648,7 +648,7 @@ BOOL SwGlossaryHdl::Expand( const String& rShortName,
pWrtShell->UpdateInputFlds( &aFldLst );
}
pGlossaries->PutGroupDoc(pGlossary);
- return TRUE;
+ return sal_True;
}
/*------------------------------------------------------------------------
@@ -656,7 +656,7 @@ BOOL SwGlossaryHdl::Expand( const String& rShortName,
------------------------------------------------------------------------*/
-BOOL SwGlossaryHdl::InsertGlossary(const String &rName)
+sal_Bool SwGlossaryHdl::InsertGlossary(const String &rName)
{
ASSERT(pWrtShell->CanInsert(), illegal);
@@ -664,7 +664,7 @@ BOOL SwGlossaryHdl::InsertGlossary(const String &rName)
pCurGrp? pCurGrp: rStatGlossaries.GetGroupDoc(aCurGrp);
if (!pGlos)
- return FALSE;
+ return sal_False;
SvxMacro aStartMacro(aEmptyStr, aEmptyStr, STARBASIC);
SvxMacro aEndMacro(aEmptyStr, aEmptyStr, STARBASIC);
@@ -681,7 +681,7 @@ BOOL SwGlossaryHdl::InsertGlossary(const String &rName)
pWrtShell->StartAllAction();
// alle InputFelder zwischenspeichern
- SwInputFieldList aFldLst( pWrtShell, TRUE );
+ SwInputFieldList aFldLst( pWrtShell, sal_True );
pWrtShell->InsertGlossary(*pGlos, rName);
pWrtShell->EndAllAction();
@@ -696,7 +696,7 @@ BOOL SwGlossaryHdl::InsertGlossary(const String &rName)
if(!pCurGrp)
rStatGlossaries.PutGroupDoc(pGlos);
- return TRUE;
+ return sal_True;
}
/*------------------------------------------------------------------------
@@ -717,7 +717,7 @@ void SwGlossaryHdl::SetMacros(const String& rShortName,
aMacroTbl.Insert( SW_EVENT_START_INS_GLOSSARY, new SvxMacro(*pStart));
if( pEnd )
aMacroTbl.Insert( SW_EVENT_END_INS_GLOSSARY, new SvxMacro(*pEnd));
- USHORT nIdx = pGlos->GetIndex( rShortName );
+ sal_uInt16 nIdx = pGlos->GetIndex( rShortName );
if( !pGlos->SetMacroTable( nIdx, aMacroTbl ) && pGlos->GetError() )
ErrorHandler::HandleError( pGlos->GetError() );
@@ -733,7 +733,7 @@ void SwGlossaryHdl::GetMacros( const String &rShortName,
SwTextBlocks *pGlos = pGlossary ? pGlossary
: pCurGrp ? pCurGrp
: rStatGlossaries.GetGroupDoc(aCurGrp);
- USHORT nIndex = pGlos->GetIndex( rShortName );
+ sal_uInt16 nIndex = pGlos->GetIndex( rShortName );
if( nIndex != USHRT_MAX )
{
SvxMacroTableDtor aMacroTbl;
@@ -780,20 +780,20 @@ SwGlossaryHdl::~SwGlossaryHdl()
------------------------------------------------------------------------*/
-BOOL SwGlossaryHdl::Rename(const String& rOldShort, const String& rNewShortName,
+sal_Bool SwGlossaryHdl::Rename(const String& rOldShort, const String& rNewShortName,
const String& rNewName )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
SwTextBlocks *pGlossary = pCurGrp ? pCurGrp
: rStatGlossaries.GetGroupDoc(aCurGrp);
if(pGlossary)
{
if(!ConvertToNew(*pGlossary))
- return FALSE;
+ return sal_False;
- USHORT nIdx = pGlossary->GetIndex( rOldShort );
- USHORT nOldLongIdx = pGlossary->GetLongIndex( rNewName );
- USHORT nOldIdx = pGlossary->GetIndex( rNewShortName );
+ sal_uInt16 nIdx = pGlossary->GetIndex( rOldShort );
+ sal_uInt16 nOldLongIdx = pGlossary->GetLongIndex( rNewName );
+ sal_uInt16 nOldIdx = pGlossary->GetIndex( rNewShortName );
if( nIdx != USHRT_MAX &&
(nOldLongIdx == USHRT_MAX || nOldLongIdx == nIdx )&&
@@ -811,7 +811,7 @@ BOOL SwGlossaryHdl::Rename(const String& rOldShort, const String& rNewShortName,
}
-BOOL SwGlossaryHdl::IsReadOnly( const String* pGrpNm ) const
+sal_Bool SwGlossaryHdl::IsReadOnly( const String* pGrpNm ) const
{
SwTextBlocks *pGlossary = 0;
@@ -822,18 +822,18 @@ BOOL SwGlossaryHdl::IsReadOnly( const String* pGrpNm ) const
else
pGlossary = rStatGlossaries.GetGroupDoc(aCurGrp);
- BOOL bRet = pGlossary ? pGlossary->IsReadOnly() : TRUE;
+ sal_Bool bRet = pGlossary ? pGlossary->IsReadOnly() : sal_True;
if( pGrpNm || !pCurGrp )
delete pGlossary;
return bRet;
}
-BOOL SwGlossaryHdl::IsOld() const
+sal_Bool SwGlossaryHdl::IsOld() const
{
SwTextBlocks *pGlossary = pCurGrp ? pCurGrp
: rStatGlossaries.GetGroupDoc(aCurGrp);
- BOOL bRet = pGlossary ? pGlossary->IsOld() : FALSE;
+ sal_Bool bRet = pGlossary ? pGlossary->IsOld() : sal_False;
if( !pCurGrp )
delete pGlossary;
return bRet;
@@ -842,7 +842,7 @@ BOOL SwGlossaryHdl::IsOld() const
/*-----------------09.06.97 16:15-------------------
Gruppe ohne Pfadindex finden
--------------------------------------------------*/
-BOOL SwGlossaryHdl::FindGroupName(String & rGroup)
+sal_Bool SwGlossaryHdl::FindGroupName(String & rGroup)
{
return rStatGlossaries.FindGroupName(rGroup);
}
@@ -850,7 +850,7 @@ BOOL SwGlossaryHdl::FindGroupName(String & rGroup)
/* -----------------29.07.99 08:34-------------------
--------------------------------------------------*/
-BOOL SwGlossaryHdl::CopyToClipboard(SwWrtShell& rSh, const String& rShortName)
+sal_Bool SwGlossaryHdl::CopyToClipboard(SwWrtShell& rSh, const String& rShortName)
{
SwTextBlocks *pGlossary = pCurGrp ? pCurGrp
: rStatGlossaries.GetGroupDoc(aCurGrp);
@@ -865,16 +865,16 @@ BOOL SwGlossaryHdl::CopyToClipboard(SwWrtShell& rSh, const String& rShortName)
return 0 != nRet;
}
-BOOL SwGlossaryHdl::ImportGlossaries( const String& rName )
+sal_Bool SwGlossaryHdl::ImportGlossaries( const String& rName )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( rName.Len() )
{
const SfxFilter* pFilter = 0;
- SfxMedium* pMed = new SfxMedium( rName, STREAM_READ, TRUE, 0, 0 );
+ SfxMedium* pMed = new SfxMedium( rName, STREAM_READ, sal_True, 0, 0 );
SfxFilterMatcher aMatcher( String::CreateFromAscii("swriter") );
- pMed->UseInteractionHandler( TRUE );
- if( !aMatcher.GuessFilter( *pMed, &pFilter, FALSE ) )
+ pMed->UseInteractionHandler( sal_True );
+ if( !aMatcher.GuessFilter( *pMed, &pFilter, sal_False ) )
{
SwTextBlocks *pGlossary;
pMed->SetFilter( pFilter );
diff --git a/sw/source/ui/dochdl/swdtflvr.cxx b/sw/source/ui/dochdl/swdtflvr.cxx
index db789ec828..9ce88fffaf 100644
--- a/sw/source/ui/dochdl/swdtflvr.cxx
+++ b/sw/source/ui/dochdl/swdtflvr.cxx
@@ -88,6 +88,7 @@
#include <shellio.hxx>
#include <ddefld.hxx>
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <pagedesc.hxx>
#include <IMark.hxx>
#include <docary.hxx>
@@ -132,15 +133,14 @@
// #109590#
#include <swcrsr.hxx>
#include <SwRewriter.hxx>
-#include <undobj.hxx>
#include <globals.hrc>
#include <vos/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
@@ -187,11 +187,11 @@ class SwTrnsfrDdeLink : public ::sfx2::SvBaseLink
::sfx2::SvLinkSourceRef refObj;
SwTransferable& rTrnsfr;
SwDocShell* pDocShell;
- ULONG nOldTimeOut;
- BOOL bDelBookmrk : 1;
- BOOL bInDisconnect : 1;
+ sal_uLong nOldTimeOut;
+ sal_Bool bDelBookmrk : 1;
+ sal_Bool bInDisconnect : 1;
- BOOL FindDocShell();
+ sal_Bool FindDocShell();
using sfx2::SvBaseLink::Disconnect;
@@ -205,9 +205,9 @@ public:
const uno::Any & rValue );
virtual void Closed();
- BOOL WriteData( SvStream& rStrm );
+ sal_Bool WriteData( SvStream& rStrm );
- void Disconnect( BOOL bRemoveDataAdvise );
+ void Disconnect( sal_Bool bRemoveDataAdvise );
};
// helper class for Action and Undo enclosing
@@ -218,7 +218,7 @@ class SwTrnsfrActionAndUndo
public:
SwTrnsfrActionAndUndo( SwWrtShell *pS, SwUndoId nId,
const SwRewriter * pRewriter = 0,
- BOOL bDelSel = FALSE)
+ sal_Bool bDelSel = sal_False)
: pSh( pS ), eUndoId( nId )
{
pSh->StartUndo( eUndoId, pRewriter );
@@ -228,7 +228,7 @@ public:
}
~SwTrnsfrActionAndUndo()
{
- pSh->EndUndo( eUndoId );
+ pSh->EndUndo();
pSh->EndAllAction();
}
};
@@ -275,7 +275,7 @@ SwTransferable::~SwTransferable()
// der DDELink braucht noch die WrtShell!
if( refDdeLink.Is() )
{
- ((SwTrnsfrDdeLink*)&refDdeLink)->Disconnect( TRUE );
+ ((SwTrnsfrDdeLink*)&refDdeLink)->Disconnect( sal_True );
refDdeLink.Clear();
}
@@ -469,7 +469,7 @@ sal_Bool SwTransferable::GetData( const DATA_FLAVOR& rFlavor )
Point aPos( SwEditWin::GetDDStartPosX(), SwEditWin::GetDDStartPosY());
- BOOL bSelect = bExecuteDrag &&
+ sal_Bool bSelect = bExecuteDrag &&
pWrtShell->GetView().GetDocShell() &&
!pWrtShell->GetView().GetDocShell()->IsReadOnly();
if( pWrtShell->GetContentAtPos( aPos, aCntntAtPos, bSelect ) )
@@ -688,7 +688,7 @@ sal_Bool SwTransferable::WriteObject( SotStorageStreamRef& xStream,
pEmbObj->SetupStorage( xWorkStore, SOFFICE_FILEFORMAT_CURRENT, sal_False );
// mba: no BaseURL for clipboard
SfxMedium aMedium( xWorkStore, String() );
- bRet = pEmbObj->DoSaveObjectAs( aMedium, FALSE );
+ bRet = pEmbObj->DoSaveObjectAs( aMedium, sal_False );
pEmbObj->DoSaveCompleted();
uno::Reference< embed::XTransactedObject > xTransact( xWorkStore, uno::UNO_QUERY );
@@ -703,7 +703,7 @@ sal_Bool SwTransferable::WriteObject( SotStorageStreamRef& xStream,
delete pSrcStm;
}
- bRet = TRUE;
+ bRet = sal_True;
xWorkStore->dispose();
xWorkStore = uno::Reference < embed::XStorage >();
@@ -746,7 +746,7 @@ sal_Bool SwTransferable::WriteObject( SotStorageStreamRef& xStream,
xWrt->SetAsciiOptions( aAOpt );
// #102841# no start char for clipboard
- xWrt->bUCS2_WithStartChar = FALSE;
+ xWrt->bUCS2_WithStartChar = sal_False;
}
break;
}
@@ -754,9 +754,9 @@ sal_Bool SwTransferable::WriteObject( SotStorageStreamRef& xStream,
if( xWrt.Is() )
{
SwDoc* pDoc = (SwDoc*)pObject;
- xWrt->bWriteClipboardDoc = TRUE;
+ xWrt->bWriteClipboardDoc = sal_True;
xWrt->bWriteOnlyFirstTable = 0 != (TRNSFR_TABELLE & eBufferType);
- xWrt->SetShowProgress( FALSE );
+ xWrt->SetShowProgress( sal_False );
SwWriter aWrt( *xStream, *pDoc );
if( !IsError( aWrt.Write( xWrt )) )
{
@@ -773,7 +773,7 @@ sal_Bool SwTransferable::WriteObject( SotStorageStreamRef& xStream,
int SwTransferable::Cut()
{
- int nRet = Copy( TRUE );
+ int nRet = Copy( sal_True );
if( nRet )
DeleteSelection();
return nRet;
@@ -796,7 +796,7 @@ void SwTransferable::DeleteSelection()
// -----------------------------------------------------------------------
-int SwTransferable::PrepareForCopy( BOOL bIsCut )
+int SwTransferable::PrepareForCopy( sal_Bool bIsCut )
{
int nRet = 1;
if(!pWrtShell)
@@ -856,7 +856,7 @@ int SwTransferable::PrepareForCopy( BOOL bIsCut )
{
SwWait *pWait = 0;
if( pWrtShell->ShouldWait() )
- pWait = new SwWait( *pWrtShell->GetView().GetDocShell(), TRUE );
+ pWait = new SwWait( *pWrtShell->GetView().GetDocShell(), sal_True );
pClpDocFac = new SwDocFac;
@@ -901,7 +901,7 @@ int SwTransferable::PrepareForCopy( BOOL bIsCut )
else
{
eBufferType = TRNSFR_DOCUMENT;
- if (pWrtShell->IntelligentCut(nSelection, FALSE) != SwWrtShell::NO_WORD)
+ if (pWrtShell->IntelligentCut(nSelection, sal_False) != SwWrtShell::NO_WORD)
eBufferType = (TransferBufferType)(TRNSFR_DOCUMENT_WORD | eBufferType);
}
@@ -970,7 +970,7 @@ int SwTransferable::PrepareForCopy( BOOL bIsCut )
//ObjectDescriptor wurde bereits aus der alten DocShell gefuellt.
//Jetzt noch anpassen. Dadurch kann im GetData die erste Anfrage
//auch noch mit delayed rendering beantwortet werden.
- aObjDesc.mbCanLink = FALSE;
+ aObjDesc.mbCanLink = sal_False;
Size aSz( OLESIZE );
aObjDesc.maSize = OutputDevice::LogicToLogic( aSz, MAP_TWIP, MAP_100TH_MM );
@@ -1004,7 +1004,7 @@ int SwTransferable::PrepareForCopy( BOOL bIsCut )
return nRet;
}
-int SwTransferable::Copy( BOOL bIsCut )
+int SwTransferable::Copy( sal_Bool bIsCut )
{
int nRet = PrepareForCopy( bIsCut );
if ( nRet )
@@ -1020,7 +1020,7 @@ int SwTransferable::CalculateAndCopy()
{
if(!pWrtShell)
return 0;
- SwWait aWait( *pWrtShell->GetView().GetDocShell(), TRUE );
+ SwWait aWait( *pWrtShell->GetView().GetDocShell(), sal_True );
String aStr( pWrtShell->Calculate() );
@@ -1042,7 +1042,7 @@ int SwTransferable::CopyGlossary( SwTextBlocks& rGlossary,
{
if(!pWrtShell)
return 0;
- SwWait aWait( *pWrtShell->GetView().GetDocShell(), TRUE );
+ SwWait aWait( *pWrtShell->GetView().GetDocShell(), sal_True );
pClpDocFac = new SwDocFac;
SwDoc *const pCDoc = lcl_GetDoc(*pClpDocFac);
@@ -1073,7 +1073,7 @@ int SwTransferable::CopyGlossary( SwTextBlocks& rGlossary,
//ObjectDescriptor wurde bereits aus der alten DocShell gefuellt.
//Jetzt noch anpassen. Dadurch kann im GetData die erste Anfrage
//auch noch mit delayed rendering beantwortet werden.
- aObjDesc.mbCanLink = FALSE;
+ aObjDesc.mbCanLink = sal_False;
Size aSz( OLESIZE );
aObjDesc.maSize = OutputDevice::LogicToLogic( aSz, MAP_TWIP, MAP_100TH_MM );
@@ -1091,7 +1091,7 @@ static inline uno::Reference < XTransferable > * lcl_getTransferPointer ( uno::R
}
// -----------------------------------------------------------------------
-BOOL SwTransferable::IsPaste( const SwWrtShell& rSh,
+sal_Bool SwTransferable::IsPaste( const SwWrtShell& rSh,
const TransferableDataHelper& rData )
{
// Check the common case first: We can always paste our own data!
@@ -1106,8 +1106,8 @@ BOOL SwTransferable::IsPaste( const SwWrtShell& rSh,
// determine the proper paste action, and return true if we find one
uno::Reference<XTransferable> xTransferable( rData.GetXTransferable() );
- USHORT nDestination = SwTransferable::GetSotDestination( rSh );
- USHORT nSourceOptions =
+ sal_uInt16 nDestination = SwTransferable::GetSotDestination( rSh );
+ sal_uInt16 nSourceOptions =
(( EXCHG_DEST_DOC_TEXTFRAME == nDestination ||
EXCHG_DEST_SWDOC_FREE_AREA == nDestination ||
EXCHG_DEST_DOC_TEXTFRAME_WEB == nDestination ||
@@ -1115,9 +1115,9 @@ BOOL SwTransferable::IsPaste( const SwWrtShell& rSh,
? EXCHG_IN_ACTION_COPY
: EXCHG_IN_ACTION_MOVE);
- ULONG nFormat; // output param for GetExchangeAction
- USHORT nEventAction; // output param for GetExchangeAction
- USHORT nAction = SotExchange::GetExchangeAction(
+ sal_uLong nFormat; // output param for GetExchangeAction
+ sal_uInt16 nEventAction; // output param for GetExchangeAction
+ sal_uInt16 nAction = SotExchange::GetExchangeAction(
rData.GetDataFlavorExVector(),
nDestination,
nSourceOptions, /* ?? */
@@ -1136,9 +1136,9 @@ BOOL SwTransferable::IsPaste( const SwWrtShell& rSh,
int SwTransferable::Paste( SwWrtShell& rSh, TransferableDataHelper& rData )
{
- USHORT nEventAction, nAction=0,
+ sal_uInt16 nEventAction, nAction=0,
nDestination = SwTransferable::GetSotDestination( rSh );
- ULONG nFormat = 0;
+ sal_uLong nFormat = 0;
if( GetSwTransferable( rData ) )
{
@@ -1146,7 +1146,7 @@ int SwTransferable::Paste( SwWrtShell& rSh, TransferableDataHelper& rData )
}
else
{
- USHORT nSourceOptions =
+ sal_uInt16 nSourceOptions =
(( EXCHG_DEST_DOC_TEXTFRAME == nDestination ||
EXCHG_DEST_SWDOC_FREE_AREA == nDestination ||
EXCHG_DEST_DOC_TEXTFRAME_WEB == nDestination ||
@@ -1175,20 +1175,20 @@ int SwTransferable::Paste( SwWrtShell& rSh, TransferableDataHelper& rData )
return EXCHG_INOUT_ACTION_NONE != nAction &&
SwTransferable::PasteData( rData, rSh, nAction, nFormat,
- nDestination, FALSE, FALSE );
+ nDestination, sal_False, sal_False );
}
// -----------------------------------------------------------------------
int SwTransferable::PasteData( TransferableDataHelper& rData,
- SwWrtShell& rSh, USHORT nAction, ULONG nFormat,
- USHORT nDestination, BOOL bIsPasteFmt,
+ SwWrtShell& rSh, sal_uInt16 nAction, sal_uLong nFormat,
+ sal_uInt16 nDestination, sal_Bool bIsPasteFmt,
sal_Bool bIsDefault,
const Point* pPt, sal_Int8 nDropAction,
- BOOL bPasteSelection )
+ sal_Bool bPasteSelection )
{
SwWait aWait( *rSh.GetView().
- GetDocShell(), FALSE );
+ GetDocShell(), sal_False );
SwTrnsfrActionAndUndo* pAction = 0;
SwModule* pMod = SW_MOD();
@@ -1211,14 +1211,14 @@ int SwTransferable::PasteData( TransferableDataHelper& rData,
case EXCHG_DEST_DOC_URLBUTTON:
case EXCHG_DEST_DOC_GROUPOBJ:
// Rahmen/Objecte selektieren
- SwTransferable::SetSelInShell( rSh, TRUE, pPt );
+ SwTransferable::SetSelInShell( rSh, sal_True, pPt );
break;
// case EXCHG_DEST_DOC_TEXTFRAME:
// case EXCHG_DEST_SWDOC_FREE_AREA:
// case EXCHG_DEST_DOC_URLFIELD:
default:
- SwTransferable::SetSelInShell( rSh, FALSE, pPt );
+ SwTransferable::SetSelInShell( rSh, sal_False, pPt );
break;
}
}
@@ -1233,21 +1233,21 @@ int SwTransferable::PasteData( TransferableDataHelper& rData,
// - nicht bei ReRead einer Grafik/DDEDaten
// - nicht bei D&D, fuer die richtige Selektion wurde im
// Drop-Handler gesorgt
- BOOL bDelSel = FALSE;
+ sal_Bool bDelSel = sal_False;
switch( nDestination )
{
case EXCHG_DEST_DOC_TEXTFRAME:
case EXCHG_DEST_SWDOC_FREE_AREA:
case EXCHG_DEST_DOC_TEXTFRAME_WEB:
case EXCHG_DEST_SWDOC_FREE_AREA_WEB:
- bDelSel = TRUE;
+ bDelSel = sal_True;
break;
}
if( bDelSel )
// --> FME 2004-10-19 #i34830#
pAction = new SwTrnsfrActionAndUndo( &rSh, UNDO_PASTE_CLIPBOARD, NULL,
- TRUE );
+ sal_True );
// <--
}
@@ -1282,10 +1282,10 @@ int SwTransferable::PasteData( TransferableDataHelper& rData,
}
// im Drag&Drop duerfen keine MessageBoxen angezeigt werden
- BOOL bMsg = 0 == pPt;
- BYTE nActionFlags = static_cast< BYTE >(( nAction >> 8 ) & 0xFF);
+ sal_Bool bMsg = 0 == pPt;
+ sal_uInt8 nActionFlags = static_cast< sal_uInt8 >(( nAction >> 8 ) & 0xFF);
- USHORT nClearedAction = ( nAction & EXCHG_ACTION_MASK );
+ sal_uInt16 nClearedAction = ( nAction & EXCHG_ACTION_MASK );
// Selektionen loeschen
switch( nClearedAction )
@@ -1405,7 +1405,7 @@ ASSERT( pPt, "EXCHG_OUT_ACTION_MOVE_PRIVATE: was soll hier passieren?" );
case SOT_FORMATSTR_ID_NETSCAPE_IMAGE:
nRet = SwTransferable::_PasteTargetURL( rData, rSh,
SW_PASTESDR_INSERT,
- pPt, TRUE );
+ pPt, sal_True );
break;
default:
@@ -1428,7 +1428,7 @@ ASSERT( pPt, "EXCHG_OUT_ACTION_MOVE_PRIVATE: was soll hier passieren?" );
case EXCHG_OUT_ACTION_INSERT_DDE:
{
- BOOL bReRead = 0 != CNT_HasGrf( rSh.GetCntType() );
+ sal_Bool bReRead = 0 != CNT_HasGrf( rSh.GetCntType() );
nRet = SwTransferable::_PasteDDE( rData, rSh, bReRead, bMsg );
}
break;
@@ -1485,7 +1485,7 @@ ASSERT( pPt, "EXCHG_OUT_ACTION_MOVE_PRIVATE: was soll hier passieren?" );
nActionFlags, bMsg );
break;
default:
- ASSERT( FALSE, "unbekanntes Format" );
+ ASSERT( sal_False, "unbekanntes Format" );
}
break;
@@ -1524,7 +1524,7 @@ ASSERT( pPt, "EXCHG_OUT_ACTION_MOVE_PRIVATE: was soll hier passieren?" );
break;
default:
- ASSERT( FALSE, "unbekannte Action" );
+ ASSERT( sal_False, "unbekannte Action" );
}
}
@@ -1545,10 +1545,10 @@ ASSERT( pPt, "EXCHG_OUT_ACTION_MOVE_PRIVATE: was soll hier passieren?" );
// -----------------------------------------------------------------------
-USHORT SwTransferable::GetSotDestination( const SwWrtShell& rSh,
+sal_uInt16 SwTransferable::GetSotDestination( const SwWrtShell& rSh,
const Point* pPt )
{
- USHORT nRet = EXCHG_INOUT_ACTION_NONE;
+ sal_uInt16 nRet = EXCHG_INOUT_ACTION_NONE;
ObjCntType eOType;
if( pPt )
@@ -1563,7 +1563,7 @@ USHORT SwTransferable::GetSotDestination( const SwWrtShell& rSh,
{
case OBJCNT_GRF:
{
- BOOL bIMap, bLink;
+ sal_Bool bIMap, bLink;
if( pPt )
{
bIMap = 0 != rSh.GetFmtFromObj( *pPt )->GetURL().GetMap();
@@ -1613,7 +1613,7 @@ JP 13.07.98: Bug 52637: es wird ein URL-Feld erkannt also werden nur die
SwContentAtPos aCntntAtPos( SwContentAtPos::SW_INETATTR );
SfxItemSet aSet( (SfxItemPool&)rSh.GetAttrPool(),
RES_TXTATR_INETFMT, RES_TXTATR_INETFMT );
- if( pPt ? ((SwWrtShell&)rSh).GetContentAtPos( *pPt, aCntntAtPos, FALSE )
+ if( pPt ? ((SwWrtShell&)rSh).GetContentAtPos( *pPt, aCntntAtPos, sal_False )
: (rSh.GetAttr( aSet ) && aSet.Count()) )
nRet = EXCHG_DEST_DOC_URLFIELD;
else
@@ -1631,9 +1631,9 @@ JP 13.07.98: Bug 52637: es wird ein URL-Feld erkannt also werden nur die
// -----------------------------------------------------------------------
int SwTransferable::_PasteFileContent( TransferableDataHelper& rData,
- SwWrtShell& rSh, ULONG nFmt, BOOL bMsg )
+ SwWrtShell& rSh, sal_uLong nFmt, sal_Bool bMsg )
{
- USHORT nResId = MSG_CLPBRD_FORMAT_ERROR;
+ sal_uInt16 nResId = MSG_CLPBRD_FORMAT_ERROR;
int nRet = 0;
MSE40HTMLClipFormatObj aMSE40ClpObj;
@@ -1674,10 +1674,10 @@ int SwTransferable::_PasteFileContent( TransferableDataHelper& rData,
{
pStream = aMSE40ClpObj.IsValid( *xStrm );
pRead = ReadHTML;
- pRead->SetReadUTF8( TRUE );
+ pRead->SetReadUTF8( sal_True );
//pRead->SetBaseURL( aMSE40ClpObj.GetBaseURL() );
- BOOL bNoComments =
+ sal_Bool bNoComments =
( nFmt == SOT_FORMATSTR_ID_HTML_NO_COMMENT );
pRead->SetIgnoreHTMLComments( bNoComments );
}
@@ -1689,7 +1689,7 @@ int SwTransferable::_PasteFileContent( TransferableDataHelper& rData,
else if( !pRead )
{
pRead = ReadHTML;
- pRead->SetReadUTF8( TRUE );
+ pRead->SetReadUTF8( sal_True );
}
}
}
@@ -1728,7 +1728,7 @@ int SwTransferable::_PasteFileContent( TransferableDataHelper& rData,
// -----------------------------------------------------------------------
int SwTransferable::_PasteOLE( TransferableDataHelper& rData, SwWrtShell& rSh,
- ULONG nFmt, BYTE nActionFlags, BOOL bMsg )
+ sal_uLong nFmt, sal_uInt8 nActionFlags, sal_Bool bMsg )
{
int nRet = 0;
TransferableObjectDescriptor aObjDesc;
@@ -1851,7 +1851,7 @@ int SwTransferable::_PasteOLE( TransferableDataHelper& rData, SwWrtShell& rSh,
// try to get the replacement image from the clipboard
Graphic aGraphic;
- ULONG nGrFormat = 0;
+ sal_uLong nGrFormat = 0;
// (wg. Selection Manager bei Trustet Solaris)
#ifndef SOLARIS
@@ -1939,7 +1939,7 @@ int SwTransferable::_PasteOLE( TransferableDataHelper& rData, SwWrtShell& rSh,
if( nRet && ( nActionFlags &
( EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL >> 8) ))
- SwTransferable::_PasteTargetURL( rData, rSh, 0, 0, FALSE );
+ SwTransferable::_PasteTargetURL( rData, rSh, 0, 0, sal_False );
// let the object be unloaded if possible
SwOLEObj::UnloadObject( xObj, rSh.GetDoc(), embed::Aspects::MSOLE_CONTENT );
@@ -1954,8 +1954,8 @@ int SwTransferable::_PasteOLE( TransferableDataHelper& rData, SwWrtShell& rSh,
// -----------------------------------------------------------------------
int SwTransferable::_PasteTargetURL( TransferableDataHelper& rData,
- SwWrtShell& rSh, USHORT nAction,
- const Point* pPt, BOOL bInsertGRF )
+ SwWrtShell& rSh, sal_uInt16 nAction,
+ const Point* pPt, sal_Bool bInsertGRF )
{
int nRet = 0;
INetImage aINetImg;
@@ -1979,7 +1979,7 @@ int SwTransferable::_PasteTargetURL( TransferableDataHelper& rData,
switch( nAction )
{
case SW_PASTESDR_INSERT:
- SwTransferable::SetSelInShell( rSh, FALSE, pPt );
+ SwTransferable::SetSelInShell( rSh, sal_False, pPt );
rSh.Insert( sURL, aEmptyStr, aGrf );
break;
@@ -1988,7 +1988,7 @@ int SwTransferable::_PasteTargetURL( TransferableDataHelper& rData,
{
rSh.ReplaceSdrObj( sURL, aEmptyStr, &aGrf );
Point aPt( pPt ? *pPt : rSh.GetCrsrDocPos() );
- SwTransferable::SetSelInShell( rSh, TRUE, &aPt );
+ SwTransferable::SetSelInShell( rSh, sal_True, &aPt );
}
else
rSh.ReRead( sURL, aEmptyStr, &aGrf );
@@ -2001,7 +2001,7 @@ int SwTransferable::_PasteTargetURL( TransferableDataHelper& rData,
rSh.ReRead( sURL, aEmptyStr, &aGrf );
else
{
- SwTransferable::SetSelInShell( rSh, FALSE, pPt );
+ SwTransferable::SetSelInShell( rSh, sal_False, pPt );
rSh.Insert( sURL, aEmptyStr, aGrf );
}
break;
@@ -2023,7 +2023,7 @@ int SwTransferable::_PasteTargetURL( TransferableDataHelper& rData,
if( aURL.GetURL() != aINetImg.GetTargetURL() ||
aURL.GetTargetFrameName() != aINetImg.GetTargetFrame() )
{
- aURL.SetURL( aINetImg.GetTargetURL(), FALSE );
+ aURL.SetURL( aINetImg.GetTargetURL(), sal_False );
aURL.SetTargetFrameName( aINetImg.GetTargetFrame() );
aSet.Put( aURL );
rSh.SetFlyFrmAttr( aSet );
@@ -2035,7 +2035,7 @@ int SwTransferable::_PasteTargetURL( TransferableDataHelper& rData,
// -----------------------------------------------------------------------
-void SwTransferable::SetSelInShell( SwWrtShell& rSh, BOOL bSelectFrm,
+void SwTransferable::SetSelInShell( SwWrtShell& rSh, sal_Bool bSelectFrm,
const Point* pPt )
{
if( bSelectFrm )
@@ -2048,7 +2048,7 @@ void SwTransferable::SetSelInShell( SwWrtShell& rSh, BOOL bSelectFrm,
{
rSh.HideCrsr();
rSh.EnterSelFrmMode( pPt );
- bFrmDrag = TRUE;
+ bFrmDrag = sal_True;
}
}
}
@@ -2059,22 +2059,22 @@ void SwTransferable::SetSelInShell( SwWrtShell& rSh, BOOL bSelectFrm,
rSh.UnSelectFrm();
rSh.LeaveSelFrmMode();
rSh.GetView().GetEditWin().StopInsFrm();
- bFrmDrag = FALSE;
+ bFrmDrag = sal_False;
}
else if( rSh.GetView().GetDrawFuncPtr() )
rSh.GetView().GetEditWin().StopInsFrm();
rSh.EnterStdMode();
if( pPt )
- rSh.SwCrsrShell::SetCrsr( *pPt, TRUE );
+ rSh.SwCrsrShell::SetCrsr( *pPt, sal_True );
}
}
// -----------------------------------------------------------------------
int SwTransferable::_PasteDDE( TransferableDataHelper& rData,
- SwWrtShell& rWrtShell, BOOL bReReadGrf,
- BOOL bMsg )
+ SwWrtShell& rWrtShell, sal_Bool bReReadGrf,
+ sal_Bool bMsg )
{
// Daten aus dem Clipboardformat
String aApp, aTopic, aItem;
@@ -2097,7 +2097,7 @@ int SwTransferable::_PasteDDE( TransferableDataHelper& rData,
sfx2::MakeLnkName( aCmd, &aApp, aTopic, aItem );
// wollen wir jetzt eine Grafik einlesen ?
- ULONG nFormat;
+ sal_uLong nFormat;
if( !rData.HasFormat( FORMAT_RTF ) &&
!rData.HasFormat( SOT_FORMATSTR_ID_HTML ) &&
!rData.HasFormat( FORMAT_STRING ) &&
@@ -2119,10 +2119,10 @@ int SwTransferable::_PasteDDE( TransferableDataHelper& rData,
}
SwFieldType* pTyp = 0;
- USHORT i = 1,j;
+ sal_uInt16 i = 1,j;
String aName;
- BOOL bAlreadyThere = FALSE, bDoublePaste = FALSE;
- USHORT nSize = rWrtShell.GetFldTypeCount();
+ sal_Bool bAlreadyThere = sal_False, bDoublePaste = sal_False;
+ sal_uInt16 nSize = rWrtShell.GetFldTypeCount();
const ::utl::TransliterationWrapper& rColl = ::GetAppCmpStrIgnore();
do {
@@ -2138,7 +2138,7 @@ int SwTransferable::_PasteDDE( TransferableDataHelper& rData,
sfx2::LINKUPDATE_ALWAYS == ((SwDDEFieldType*)pTyp)->GetType() )
{
aName = pTyp->GetName();
- bDoublePaste = TRUE;
+ bDoublePaste = sal_True;
break;
}
else if( rColl.isEqual( aName, pTyp->GetName() ) )
@@ -2146,10 +2146,10 @@ int SwTransferable::_PasteDDE( TransferableDataHelper& rData,
}
}
if( j == nSize )
- bAlreadyThere = FALSE;
+ bAlreadyThere = sal_False;
else
{
- bAlreadyThere = TRUE;
+ bAlreadyThere = sal_True;
i++;
}
}
@@ -2217,7 +2217,7 @@ int SwTransferable::_PasteDDE( TransferableDataHelper& rData,
rWrtShell.Insert( aSwDDEField );
}
- } while( FALSE );
+ } while( sal_False );
}
else
pDDETyp = 0; // FeldTypen wieder entfernen
@@ -2239,8 +2239,8 @@ int SwTransferable::_PasteDDE( TransferableDataHelper& rData,
// -----------------------------------------------------------------------
int SwTransferable::_PasteSdrFormat( TransferableDataHelper& rData,
- SwWrtShell& rSh, USHORT nAction,
- const Point* pPt, BYTE nActionFlags )
+ SwWrtShell& rSh, sal_uInt16 nAction,
+ const Point* pPt, sal_uInt8 nActionFlags )
{
int nRet = 0;
SotStorageStreamRef xStrm;
@@ -2252,7 +2252,7 @@ int SwTransferable::_PasteSdrFormat( TransferableDataHelper& rData,
if( nRet && ( nActionFlags &
( EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL >> 8) ))
- SwTransferable::_PasteTargetURL( rData, rSh, 0, 0, FALSE );
+ SwTransferable::_PasteTargetURL( rData, rSh, 0, 0, sal_False );
}
return nRet;
}
@@ -2260,14 +2260,14 @@ int SwTransferable::_PasteSdrFormat( TransferableDataHelper& rData,
// -----------------------------------------------------------------------
int SwTransferable::_PasteGrf( TransferableDataHelper& rData, SwWrtShell& rSh,
- ULONG nFmt, USHORT nAction, const Point* pPt,
- BYTE nActionFlags, BOOL /*bMsg*/ )
+ sal_uLong nFmt, sal_uInt16 nAction, const Point* pPt,
+ sal_uInt8 nActionFlags, sal_Bool /*bMsg*/ )
{
int nRet = 0;
Graphic aGrf;
INetBookmark aBkmk;
- BOOL bCheckForGrf = FALSE, bCheckForImageMap = FALSE;
+ sal_Bool bCheckForGrf = sal_False, bCheckForImageMap = sal_False;
switch( nFmt )
{
@@ -2291,7 +2291,7 @@ int SwTransferable::_PasteGrf( TransferableDataHelper& rData, SwWrtShell& rSh,
if( SW_PASTESDR_SETATTR == nAction )
nFmt = SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK;
else
- bCheckForGrf = TRUE;
+ bCheckForGrf = sal_True;
}
break;
@@ -2306,7 +2306,7 @@ int SwTransferable::_PasteGrf( TransferableDataHelper& rData, SwWrtShell& rSh,
aBkmk = INetBookmark(
URIHelper::SmartRel2Abs(INetURLObject(), sTxt, Link(), false ),
sDesc );
- bCheckForGrf = TRUE;
+ bCheckForGrf = sal_True;
bCheckForImageMap = SW_PASTESDR_REPLACE == nAction;
}
}
@@ -2331,7 +2331,7 @@ int SwTransferable::_PasteGrf( TransferableDataHelper& rData, SwWrtShell& rSh,
{
// dann als Hyperlink hinter die Grafik setzen
nFmt = SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK;
- nRet = TRUE;
+ nRet = sal_True;
}
}
@@ -2344,7 +2344,7 @@ int SwTransferable::_PasteGrf( TransferableDataHelper& rData, SwWrtShell& rSh,
switch( nAction )
{
case SW_PASTESDR_INSERT:
- SwTransferable::SetSelInShell( rSh, FALSE, pPt );
+ SwTransferable::SetSelInShell( rSh, sal_False, pPt );
rSh.Insert( sURL, aEmptyStr, aGrf );
break;
@@ -2353,7 +2353,7 @@ int SwTransferable::_PasteGrf( TransferableDataHelper& rData, SwWrtShell& rSh,
{
rSh.ReplaceSdrObj( sURL, aEmptyStr, &aGrf );
Point aPt( pPt ? *pPt : rSh.GetCrsrDocPos() );
- SwTransferable::SetSelInShell( rSh, TRUE, &aPt );
+ SwTransferable::SetSelInShell( rSh, sal_True, &aPt );
}
else
rSh.ReRead( sURL, aEmptyStr, &aGrf );
@@ -2367,7 +2367,7 @@ int SwTransferable::_PasteGrf( TransferableDataHelper& rData, SwWrtShell& rSh,
SfxItemSet aSet( rSh.GetAttrPool(), RES_URL, RES_URL );
rSh.GetFlyFrmAttr( aSet );
SwFmtURL aURL( (SwFmtURL&)aSet.Get( RES_URL ) );
- aURL.SetURL( aBkmk.GetURL(), FALSE );
+ aURL.SetURL( aBkmk.GetURL(), sal_False );
aSet.Put( aURL );
rSh.SetFlyFrmAttr( aSet );
}
@@ -2378,7 +2378,7 @@ int SwTransferable::_PasteGrf( TransferableDataHelper& rData, SwWrtShell& rSh,
rSh.ReRead( sURL, aEmptyStr, &aGrf );
else
{
- SwTransferable::SetSelInShell( rSh, FALSE, pPt );
+ SwTransferable::SetSelInShell( rSh, sal_False, pPt );
rSh.Insert( aBkmk.GetURL(), aEmptyStr, aGrf );
}
break;
@@ -2397,14 +2397,14 @@ int SwTransferable::_PasteGrf( TransferableDataHelper& rData, SwWrtShell& rSh,
if( nActionFlags &
( EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL >> 8) )
- SwTransferable::_PasteTargetURL( rData, rSh, 0, 0, FALSE );
+ SwTransferable::_PasteTargetURL( rData, rSh, 0, 0, sal_False );
}
else if( bCheckForImageMap )
{
// oder sollte das File ein ImageMap-File sein?
ImageMap aMap;
SfxMedium aMed( INetURLObject(aBkmk.GetURL()).GetFull(),
- STREAM_STD_READ, FALSE );
+ STREAM_STD_READ, sal_False );
SvStream* pStream = aMed.GetInStream();
if( pStream != NULL &&
!pStream->GetError() &&
@@ -2455,7 +2455,7 @@ int SwTransferable::_PasteImageMap( TransferableDataHelper& rData,
// -----------------------------------------------------------------------
int SwTransferable::_PasteAsHyperlink( TransferableDataHelper& rData,
- SwWrtShell& rSh, ULONG nFmt )
+ SwWrtShell& rSh, sal_uLong nFmt )
{
int nRet = 0;
String sFile;
@@ -2479,7 +2479,7 @@ int SwTransferable::_PasteAsHyperlink( TransferableDataHelper& rData,
SfxItemSet aSet( rSh.GetAttrPool(), RES_URL, RES_URL );
rSh.GetFlyFrmAttr( aSet );
SwFmtURL aURL2( (SwFmtURL&)aSet.Get( RES_URL ) );
- aURL2.SetURL( sFile, FALSE );
+ aURL2.SetURL( sFile, sal_False );
if( !aURL2.GetName().Len() )
aURL2.SetName( sFile );
aSet.Put( aURL2 );
@@ -2493,7 +2493,7 @@ int SwTransferable::_PasteAsHyperlink( TransferableDataHelper& rData,
sDesc.Len() ? sDesc : sFile );
}
}
- nRet = TRUE;
+ nRet = sal_True;
}
return nRet;
}
@@ -2501,9 +2501,9 @@ int SwTransferable::_PasteAsHyperlink( TransferableDataHelper& rData,
// -----------------------------------------------------------------------
int SwTransferable::_PasteFileName( TransferableDataHelper& rData,
- SwWrtShell& rSh, ULONG nFmt,
- USHORT nAction, const Point* pPt,
- BYTE nActionFlags, BOOL bMsg )
+ SwWrtShell& rSh, sal_uLong nFmt,
+ sal_uInt16 nAction, const Point* pPt,
+ sal_uInt8 nActionFlags, sal_Bool bMsg )
{
int nRet = SwTransferable::_PasteGrf( rData, rSh, nFmt, nAction,
pPt, nActionFlags, bMsg );
@@ -2528,7 +2528,7 @@ int SwTransferable::_PasteFileName( TransferableDataHelper& rData,
}
else
{
- BOOL bIsURLFile = SwTransferable::_CheckForURLOrLNKFile( rData, sFile, &sDesc );
+ sal_Bool bIsURLFile = SwTransferable::_CheckForURLOrLNKFile( rData, sFile, &sDesc );
//Eigenes FileFormat? -->Einfuegen, nicht fuer StarWriter/Web
String sFileURL = URIHelper::SmartRel2Abs(INetURLObject(), sFile, Link(), false );
@@ -2577,7 +2577,7 @@ int SwTransferable::_PasteFileName( TransferableDataHelper& rData,
SfxItemSet aSet( rSh.GetAttrPool(), RES_URL, RES_URL );
rSh.GetFlyFrmAttr( aSet );
SwFmtURL aURL2( (SwFmtURL&)aSet.Get( RES_URL ) );
- aURL2.SetURL( sFile, FALSE );
+ aURL2.SetURL( sFile, sal_False );
if( !aURL2.GetName().Len() )
aURL2.SetName( sFile );
aSet.Put( aURL2 );
@@ -2591,7 +2591,7 @@ int SwTransferable::_PasteFileName( TransferableDataHelper& rData,
sDesc.Len() ? sDesc : sFile );
}
}
- nRet = TRUE;
+ nRet = sal_True;
}
}
}
@@ -2602,14 +2602,14 @@ int SwTransferable::_PasteFileName( TransferableDataHelper& rData,
// -----------------------------------------------------------------------
int SwTransferable::_PasteDBData( TransferableDataHelper& rData,
- SwWrtShell& rSh, ULONG nFmt, BOOL bLink,
- const Point* pDragPt, BOOL bMsg )
+ SwWrtShell& rSh, sal_uLong nFmt, sal_Bool bLink,
+ const Point* pDragPt, sal_Bool bMsg )
{
int nRet = 0;
String sTxt;
if( rData.GetString( nFmt, sTxt ) && sTxt.Len() )
{
- USHORT nWh = SOT_FORMATSTR_ID_SBA_CTRLDATAEXCHANGE == nFmt
+ sal_uInt16 nWh = SOT_FORMATSTR_ID_SBA_CTRLDATAEXCHANGE == nFmt
? 0
: SOT_FORMATSTR_ID_SBA_DATAEXCHANGE == nFmt
? (bLink
@@ -2644,14 +2644,14 @@ int SwTransferable::_PasteDBData( TransferableDataHelper& rData,
SfxUsrAnyItem* pColumnNameItem = 0;
SfxUsrAnyItem* pSelectionItem = 0;
- BOOL bDataAvailable = TRUE;
+ sal_Bool bDataAvailable = sal_True;
ODataAccessDescriptor aDesc;
if(bHaveColumnDescriptor)
aDesc = OColumnTransferable::extractColumnDescriptor(rData);
else if(ODataAccessObjectTransferable::canExtractObjectDescriptor(rVector) )
aDesc = ODataAccessObjectTransferable::extractObjectDescriptor(rData);
else
- bDataAvailable = FALSE;
+ bDataAvailable = sal_False;
if ( bDataAvailable )
{
@@ -2706,30 +2706,30 @@ int SwTransferable::_PasteDBData( TransferableDataHelper& rData,
// -----------------------------------------------------------------------
int SwTransferable::_PasteFileList( TransferableDataHelper& rData,
- SwWrtShell& rSh, BOOL bLink,
- const Point* pPt, BOOL bMsg )
+ SwWrtShell& rSh, sal_Bool bLink,
+ const Point* pPt, sal_Bool bMsg )
{
int nRet = 0;
FileList aFileList;
if( rData.GetFileList( SOT_FORMAT_FILE_LIST, aFileList ) &&
aFileList.Count() )
{
- USHORT nAct = bLink ? SW_PASTESDR_SETATTR : SW_PASTESDR_INSERT;
+ sal_uInt16 nAct = bLink ? SW_PASTESDR_SETATTR : SW_PASTESDR_INSERT;
String sFlyNm;
// iterate over the filelist
- for( ULONG n = 0, nEnd = aFileList.Count(); n < nEnd; ++n )
+ for( sal_uLong n = 0, nEnd = aFileList.Count(); n < nEnd; ++n )
{
TransferDataContainer* pHlp = new TransferDataContainer;
pHlp->CopyString( FORMAT_FILE, aFileList.GetFile( n ));
TransferableDataHelper aData( pHlp );
if( SwTransferable::_PasteFileName( aData, rSh, SOT_FORMAT_FILE, nAct,
- pPt, FALSE, bMsg ))
+ pPt, sal_False, bMsg ))
{
if( bLink )
{
sFlyNm = rSh.GetFlyName();
- SwTransferable::SetSelInShell( rSh, FALSE, pPt );
+ SwTransferable::SetSelInShell( rSh, sal_False, pPt );
}
nRet = 1;
}
@@ -2746,17 +2746,17 @@ int SwTransferable::_PasteFileList( TransferableDataHelper& rData,
// -----------------------------------------------------------------------
-BOOL SwTransferable::_CheckForURLOrLNKFile( TransferableDataHelper& rData,
+sal_Bool SwTransferable::_CheckForURLOrLNKFile( TransferableDataHelper& rData,
String& rFileName, String* pTitle )
{
- BOOL bIsURLFile = FALSE;
+ sal_Bool bIsURLFile = sal_False;
INetBookmark aBkmk;
if( rData.GetINetBookmark( SOT_FORMATSTR_ID_SOLK, aBkmk ) )
{
rFileName = aBkmk.GetURL();
if( pTitle )
*pTitle = aBkmk.GetDescription();
- bIsURLFile = TRUE;
+ bIsURLFile = sal_True;
}
else
{
@@ -2775,7 +2775,7 @@ ASSERT( !&rFileName, "how do we read today .URL - Files?" );
// -----------------------------------------------------------------------
-BOOL SwTransferable::IsPasteSpecial( const SwWrtShell& rWrtShell,
+sal_Bool SwTransferable::IsPasteSpecial( const SwWrtShell& rWrtShell,
const TransferableDataHelper& rData )
{
// we can paste-special if there's an entry in the paste-special-format list
@@ -2788,12 +2788,12 @@ BOOL SwTransferable::IsPasteSpecial( const SwWrtShell& rWrtShell,
int SwTransferable::PasteFormat( SwWrtShell& rSh,
TransferableDataHelper& rData,
- ULONG nFormat )
+ sal_uLong nFormat )
{
- SwWait aWait( *rSh.GetView().GetDocShell(), FALSE );
+ SwWait aWait( *rSh.GetView().GetDocShell(), sal_False );
int nRet = 0;
- ULONG nPrivateFmt = FORMAT_PRIVATE;
+ sal_uLong nPrivateFmt = FORMAT_PRIVATE;
SwTransferable *pClipboard = GetSwTransferable( rData );
if( pClipboard &&
((TRNSFR_DOCUMENT|TRNSFR_GRAPHIC|TRNSFR_OLE) & pClipboard->eBufferType ))
@@ -2804,7 +2804,7 @@ int SwTransferable::PasteFormat( SwWrtShell& rSh,
else if( rData.HasFormat( nFormat ) )
{
uno::Reference<XTransferable> xTransferable( rData.GetXTransferable() );
- USHORT nEventAction,
+ sal_uInt16 nEventAction,
nDestination = SwTransferable::GetSotDestination( rSh ),
nSourceOptions =
(( EXCHG_DEST_DOC_TEXTFRAME == nDestination ||
@@ -2823,7 +2823,7 @@ int SwTransferable::PasteFormat( SwWrtShell& rSh,
if( EXCHG_INOUT_ACTION_NONE != nAction )
nRet = SwTransferable::PasteData( rData, rSh, nAction, nFormat,
- nDestination, TRUE, FALSE );
+ nDestination, sal_True, sal_False );
}
return nRet;
}
@@ -2831,9 +2831,9 @@ int SwTransferable::PasteFormat( SwWrtShell& rSh,
// -----------------------------------------------------------------------
int SwTransferable::_TestAllowedFormat( const TransferableDataHelper& rData,
- ULONG nFormat, USHORT nDestination )
+ sal_uLong nFormat, sal_uInt16 nDestination )
{
- USHORT nAction = EXCHG_INOUT_ACTION_NONE, nEventAction;
+ sal_uInt16 nAction = EXCHG_INOUT_ACTION_NONE, nEventAction;
if( rData.HasFormat( nFormat )) {
uno::Reference<XTransferable> xTransferable( rData.GetXTransferable() );
nAction = SotExchange::GetExchangeAction(
@@ -2852,7 +2852,7 @@ int SwTransferable::_TestAllowedFormat( const TransferableDataHelper& rData,
* the list of formats which will be offered to the user in the 'Paste
* Special...' dialog and the paste button menu
*/
-static USHORT aPasteSpecialIds[] =
+static sal_uInt16 aPasteSpecialIds[] =
{
SOT_FORMATSTR_ID_HTML,
SOT_FORMATSTR_ID_HTML_SIMPLE,
@@ -2879,7 +2879,7 @@ int SwTransferable::PasteUnformatted( SwWrtShell& rSh, TransferableDataHelper& r
// -----------------------------------------------------------------------
-int SwTransferable::PasteSpecial( SwWrtShell& rSh, TransferableDataHelper& rData, ULONG& rFormatUsed )
+int SwTransferable::PasteSpecial( SwWrtShell& rSh, TransferableDataHelper& rData, sal_uLong& rFormatUsed )
{
int nRet = 0;
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
@@ -2888,13 +2888,13 @@ int SwTransferable::PasteSpecial( SwWrtShell& rSh, TransferableDataHelper& rData
DataFlavorExVector aFormats( rData.GetDataFlavorExVector() );
TransferableObjectDescriptor aDesc;
- USHORT nDest = SwTransferable::GetSotDestination( rSh );
+ sal_uInt16 nDest = SwTransferable::GetSotDestination( rSh );
SwTransferable *pClipboard = GetSwTransferable( rData );
if( pClipboard )
{
aDesc = pClipboard->aObjDesc;
- USHORT nResId;
+ sal_uInt16 nResId;
if( pClipboard->eBufferType & TRNSFR_DOCUMENT )
nResId = STR_PRIVATETEXT;
else if( pClipboard->eBufferType & TRNSFR_GRAPHIC )
@@ -2934,11 +2934,11 @@ int SwTransferable::PasteSpecial( SwWrtShell& rSh, TransferableDataHelper& rData
if( SwTransferable::_TestAllowedFormat( rData, SOT_FORMATSTR_ID_LINK, nDest ))
pDlg->Insert( SOT_FORMATSTR_ID_LINK, SW_RES(STR_DDEFORMAT) );
- for( USHORT* pIds = aPasteSpecialIds; *pIds; ++pIds )
+ for( sal_uInt16* pIds = aPasteSpecialIds; *pIds; ++pIds )
if( SwTransferable::_TestAllowedFormat( rData, *pIds, nDest ))
pDlg->Insert( *pIds, aEmptyStr );
- ULONG nFormat = pDlg->GetFormat( rData.GetTransferable() );
+ sal_uLong nFormat = pDlg->GetFormat( rData.GetTransferable() );
if( nFormat )
nRet = SwTransferable::PasteFormat( rSh, rData, nFormat );
@@ -2955,12 +2955,12 @@ void SwTransferable::FillClipFmtItem( const SwWrtShell& rSh,
const TransferableDataHelper& rData,
SvxClipboardFmtItem & rToFill )
{
- USHORT nDest = SwTransferable::GetSotDestination( rSh );
+ sal_uInt16 nDest = SwTransferable::GetSotDestination( rSh );
SwTransferable *pClipboard = GetSwTransferable( rData );
if( pClipboard )
{
- USHORT nResId;
+ sal_uInt16 nResId;
if( pClipboard->eBufferType & TRNSFR_DOCUMENT )
nResId = STR_PRIVATETEXT;
else if( pClipboard->eBufferType & TRNSFR_GRAPHIC )
@@ -2999,7 +2999,7 @@ void SwTransferable::FillClipFmtItem( const SwWrtShell& rSh,
if( SwTransferable::_TestAllowedFormat( rData, SOT_FORMATSTR_ID_LINK, nDest ))
rToFill.AddClipbrdFormat( SOT_FORMATSTR_ID_LINK, SW_RES(STR_DDEFORMAT) );
- for( USHORT* pIds = aPasteSpecialIds; *pIds; ++pIds )
+ for( sal_uInt16* pIds = aPasteSpecialIds; *pIds; ++pIds )
if( SwTransferable::_TestAllowedFormat( rData, *pIds, nDest ))
rToFill.AddClipbrdFormat( *pIds, aEmptyStr );
}
@@ -3042,7 +3042,7 @@ void SwTransferable::SetDataForDragAndDrop( const Point& rSttPos )
{
eBufferType = TRNSFR_DOCUMENT;
if( SwWrtShell::NO_WORD !=
- pWrtShell->IntelligentCut( nSelection, FALSE ))
+ pWrtShell->IntelligentCut( nSelection, sal_False ))
eBufferType = TransferBufferType( TRNSFR_DOCUMENT_WORD
| eBufferType);
}
@@ -3096,7 +3096,7 @@ void SwTransferable::SetDataForDragAndDrop( const Point& rSttPos )
//ObjectDescriptor wurde bereits aus der alten DocShell gefuellt.
//Jetzt noch anpassen. Dadurch kann im GetData die erste Anfrage
//auch noch mit delayed rendering beantwortet werden.
- aObjDesc.mbCanLink = FALSE;
+ aObjDesc.mbCanLink = sal_False;
aObjDesc.maDragStartPos = rSttPos;
aObjDesc.maSize = OutputDevice::LogicToLogic( Size( OLESIZE ),
MAP_TWIP, MAP_100TH_MM );
@@ -3146,9 +3146,9 @@ void SwTransferable::StartDrag( Window* pWin, const Point& rPos )
if(!pWrtShell)
return;
bOldIdle = pWrtShell->GetViewOptions()->IsIdle();
- bCleanUp = TRUE;
+ bCleanUp = sal_True;
- ((SwViewOption *)pWrtShell->GetViewOptions())->SetIdle( FALSE );
+ ((SwViewOption *)pWrtShell->GetViewOptions())->SetIdle( sal_False );
if( pWrtShell->IsSelFrmMode() )
pWrtShell->ShowCrsr();
@@ -3183,7 +3183,7 @@ void SwTransferable::DragFinished( sal_Int8 nAction )
{
if ( !(pWrtShell->IsSelFrmMode() || pWrtShell->IsObjSelected()) )
//SmartCut, eines der Blanks mitnehmen.
- pWrtShell->IntelligentCut( pWrtShell->GetSelectionType(), TRUE );
+ pWrtShell->IntelligentCut( pWrtShell->GetSelectionType(), sal_True );
pWrtShell->DelRight();
}
pWrtShell->EndUndo( UNDO_UI_DRAG_AND_MOVE );
@@ -3226,7 +3226,7 @@ int SwTransferable::PrivatePaste( SwWrtShell& rShell )
// (sonst wird nicht in eine TabellenSelektion gepastet!!!)
ASSERT( !rShell.ActionPend(), "Paste darf nie eine Actionklammerung haben" );
if ( !pClpDocFac )
- return sal_False; // the return value of the SwFEShell::Paste also is BOOL!
+ return sal_False; // the return value of the SwFEShell::Paste also is sal_Bool!
const int nSelection = rShell.GetSelectionType();
@@ -3252,12 +3252,12 @@ int SwTransferable::PrivatePaste( SwWrtShell& rShell )
{
// den Cursor wieder positionieren
Point aPt( rShell.GetCharRect().Pos() );
- rShell.SwCrsrShell::SetCrsr( aPt, TRUE );
+ rShell.SwCrsrShell::SetCrsr( aPt, sal_True );
}
rShell.SetRetainSelection( false );
}
- BOOL bInWrd = FALSE, bEndWrd = FALSE, bSttWrd = FALSE,
+ sal_Bool bInWrd = sal_False, bEndWrd = sal_False, bSttWrd = sal_False,
bSmart = 0 != (TRNSFR_DOCUMENT_WORD & eBufferType);
if( bSmart )
{
@@ -3266,7 +3266,7 @@ int SwTransferable::PrivatePaste( SwWrtShell& rShell )
// beginning and end'. In this case we definitely want these spaces to be inserted
// here.
// if( SCRIPTTYPE_LATIN != rShell.GetScriptType() )
-// bSmart = FALSE;
+// bSmart = sal_False;
// else
// {
bInWrd = rShell.IsInWrd();
@@ -3294,15 +3294,15 @@ int SwTransferable::PrivatePaste( SwWrtShell& rShell )
}
int SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt,
- BOOL bMove, BOOL bIsXSelection )
+ sal_Bool bMove, sal_Bool bIsXSelection )
{
int cWord = 0;
- BOOL bInWrd = FALSE;
- BOOL bEndWrd = FALSE;
- BOOL bSttWrd = FALSE;
- BOOL bSttPara= FALSE;
- BOOL bTblSel = FALSE;
- BOOL bFrmSel = FALSE;
+ sal_Bool bInWrd = sal_False;
+ sal_Bool bEndWrd = sal_False;
+ sal_Bool bSttWrd = sal_False;
+ sal_Bool bSttPara= sal_False;
+ sal_Bool bTblSel = sal_False;
+ sal_Bool bFrmSel = sal_False;
SwWrtShell& rSrcSh = *GetShell();
@@ -3321,7 +3321,7 @@ int SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt,
{
rSh.HideCrsr();
rSh.EnterSelFrmMode( &rDragPt );
- bFrmDrag = TRUE;
+ bFrmDrag = sal_True;
}
const int nSelection = rSh.GetSelectionType();
@@ -3332,7 +3332,7 @@ int SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt,
SfxItemSet aSet( rSh.GetAttrPool(), RES_URL, RES_URL );
rSh.GetFlyFrmAttr( aSet );
SwFmtURL aURL( (SwFmtURL&)aSet.Get( RES_URL ) );
- aURL.SetURL( aTmp.GetURL(), FALSE );
+ aURL.SetURL( aTmp.GetURL(), sal_False );
aSet.Put( aURL );
rSh.SetFlyFrmAttr( aSet );
return 1;
@@ -3343,7 +3343,7 @@ int SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt,
rSh.LeaveSelFrmMode();
rSh.UnSelectFrm();
rSh.ShowCrsr();
- bFrmDrag = FALSE;
+ bFrmDrag = sal_False;
}
}
}
@@ -3364,14 +3364,14 @@ int SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt,
return 0;
if( rSrcSh.IsTableMode() )
- bTblSel = TRUE;
+ bTblSel = sal_True;
else if( rSrcSh.IsSelFrmMode() || rSrcSh.IsObjSelected() )
{
// keine positionsgeschuetzten Objecte verschieben!
if( bMove && rSrcSh.IsSelObjProtected( FLYPROTECT_POS ) )
return 0;
- bFrmSel = TRUE;
+ bFrmSel = sal_True;
}
const int nSel = rSrcSh.GetSelectionType();
@@ -3393,8 +3393,8 @@ int SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt,
if( &rSrcSh != &rSh )
{
rSh.EnterStdMode();
- rSh.SwCrsrShell::SetCrsr( rDragPt, TRUE );
- cWord = rSrcSh.IntelligentCut( nSel, FALSE );
+ rSh.SwCrsrShell::SetCrsr( rDragPt, sal_True );
+ cWord = rSrcSh.IntelligentCut( nSel, sal_False );
}
else if( !bTblSel && !bFrmSel )
{
@@ -3409,9 +3409,9 @@ int SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt,
// <--
rSh.SwCrsrShell::CreateCrsr();
}
- rSh.SwCrsrShell::SetCrsr( rDragPt, TRUE, false );
+ rSh.SwCrsrShell::SetCrsr( rDragPt, sal_True, false );
rSh.GoPrevCrsr();
- cWord = rSh.IntelligentCut( rSh.GetSelectionType(), FALSE );
+ cWord = rSh.IntelligentCut( rSh.GetSelectionType(), sal_False );
rSh.GoNextCrsr();
}
@@ -3428,13 +3428,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 ) )
{
// nicht in sich selbst kopieren/verschieben
rSh.DestroyCrsr();
- rSh.EndUndo( eUndoId );
+ rSh.EndUndo();
rSh.EndAction();
rSh.EndAction();
return 0;
@@ -3443,14 +3443,14 @@ int SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt,
}
else
{
- rSrcSh.SwCrsrShell::SetCrsr( aSttPt, TRUE );
+ rSrcSh.SwCrsrShell::SetCrsr( aSttPt, sal_True );
rSrcSh.SelectTxtAttr( RES_TXTATR_INETFMT );
}
// ist am Einfuege Punkt ein URL-Attribut? Dann das ersetzen,
// also einfach eine Selektion aufspannen?
rSh.DelINetAttrWithText();
- bDDINetAttr = TRUE;
+ bDDINetAttr = sal_True;
}
if ( rSrcSh.IsSelFrmMode() )
@@ -3459,7 +3459,7 @@ int SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt,
aSttPt -= aSttPt - rSrcSh.GetObjRect().Pos();
}
- BOOL bRet = rSrcSh.SwFEShell::Copy( &rSh, aSttPt, rDragPt, bMove,
+ sal_Bool bRet = rSrcSh.SwFEShell::Copy( &rSh, aSttPt, rDragPt, bMove,
!bIsXSelection );
if( !bIsXSelection )
@@ -3477,14 +3477,14 @@ int SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt,
//SmartCut, eines der Blank mitnehmen.
rSh.SwCrsrShell::DestroyCrsr();
if ( cWord == SwWrtShell::WORD_SPACE_BEFORE )
- rSh.ExtendSelection( FALSE );
+ rSh.ExtendSelection( sal_False );
else if ( cWord == SwWrtShell::WORD_SPACE_AFTER )
rSh.ExtendSelection();
rSrcSh.DelRight();
}
}
rSrcSh.KillPams();
- rSrcSh.Pop( FALSE );
+ rSrcSh.Pop( sal_False );
/* #109590# after dragging a table selection inside one shell
set cursor to the drop position. */
@@ -3542,8 +3542,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();
// Shell in den richtigen Status versetzen
if( &rSrcSh != &rSh && ( rSh.IsFrmSelected() || rSh.IsObjSelected() ))
@@ -3635,7 +3635,7 @@ SwTransferable* SwTransferable::GetSwTransferable( const TransferableDataHelper&
SwTrnsfrDdeLink::SwTrnsfrDdeLink( SwTransferable& rTrans, SwWrtShell& rSh )
: rTrnsfr( rTrans ), pDocShell( 0 ),
- bDelBookmrk( FALSE ), bInDisconnect( FALSE )
+ bDelBookmrk( sal_False ), bInDisconnect( sal_False )
{
// hier kommen wir nur bei Tabellen- oder Text-Selection an
const int nSelection = rSh.GetSelectionType();
@@ -3648,9 +3648,9 @@ SwTrnsfrDdeLink::SwTrnsfrDdeLink( SwTransferable& rTrans, SwWrtShell& rSh )
else
{
// creating a temp. bookmark without undo
- BOOL bUndo = rSh.DoesUndo();
- rSh.DoUndo( FALSE );
- BOOL bIsModified = rSh.IsModified();
+ sal_Bool bUndo = rSh.DoesUndo();
+ rSh.DoUndo( sal_False );
+ sal_Bool bIsModified = rSh.IsModified();
::sw::mark::IMark* pMark = rSh.SetBookmark(
KeyCode(),
@@ -3660,7 +3660,7 @@ SwTrnsfrDdeLink::SwTrnsfrDdeLink( SwTransferable& rTrans, SwWrtShell& rSh )
if(pMark)
{
sName = pMark->GetName();
- bDelBookmrk = TRUE;
+ bDelBookmrk = sal_True;
if( !bIsModified )
rSh.ResetModified();
}
@@ -3693,7 +3693,7 @@ SwTrnsfrDdeLink::SwTrnsfrDdeLink( SwTransferable& rTrans, SwWrtShell& rSh )
SwTrnsfrDdeLink::~SwTrnsfrDdeLink()
{
if( refObj.Is() )
- Disconnect( TRUE );
+ Disconnect( sal_True );
}
// -----------------------------------------------------------------------
@@ -3706,16 +3706,16 @@ void SwTrnsfrDdeLink::DataChanged( const String& ,
{
if( FindDocShell() && pDocShell->GetView() )
rTrnsfr.RemoveDDELinkFormat( pDocShell->GetView()->GetEditWin() );
- Disconnect( FALSE );
+ Disconnect( sal_False );
}
}
// -----------------------------------------------------------------------
-BOOL SwTrnsfrDdeLink::WriteData( SvStream& rStrm )
+sal_Bool SwTrnsfrDdeLink::WriteData( SvStream& rStrm )
{
if( !refObj.Is() || !FindDocShell() )
- return FALSE;
+ return sal_False;
rtl_TextEncoding eEncoding = DDE_TXT_ENCODING;
const ByteString aAppNm( GetpApp()->GetAppName(), eEncoding );
@@ -3784,27 +3784,26 @@ BOOL SwTrnsfrDdeLink::WriteData( SvStream& rStrm )
// -----------------------------------------------------------------------
-void SwTrnsfrDdeLink::Disconnect( BOOL bRemoveDataAdvise )
+void SwTrnsfrDdeLink::Disconnect( sal_Bool bRemoveDataAdvise )
{
//JP 29.01.96 Bug 24432:
// kein DataChanged mehr entgegen nehmen, wenn man
// sich schon im Disconnet befindet!
// (DTOR vom Bookmark verschickt einen DataChanged!)
- BOOL bOldDisconnect = bInDisconnect;
- bInDisconnect = TRUE;
+ sal_Bool bOldDisconnect = bInDisconnect;
+ bInDisconnect = sal_True;
// den nicht verwendeten Bookmark wieder zerstoeren (ohne Undo!)?
if( bDelBookmrk && refObj.Is() && FindDocShell() )
{
SwDoc* pDoc = pDocShell->GetDoc();
- BOOL bUndo = pDoc->DoesUndo();
- pDoc->DoUndo( FALSE );
+ ::sw::UndoGuard const undoGuard(pDoc->GetIDocumentUndoRedo());
// --> OD, CD, OS 2005-11-25 #i58448#
Link aSavedOle2Link( pDoc->GetOle2Link() );
pDoc->SetOle2Link( Link() );
// <--
- BOOL bIsModified = pDoc->IsModified();
+ sal_Bool bIsModified = pDoc->IsModified();
IDocumentMarkAccess* const pMarkAccess = pDoc->getIDocumentMarkAccess();
pMarkAccess->deleteMark(pMarkAccess->findMark(sName));
@@ -3815,8 +3814,7 @@ void SwTrnsfrDdeLink::Disconnect( BOOL bRemoveDataAdvise )
pDoc->SetOle2Link( aSavedOle2Link );
// <--
- pDoc->DoUndo( bUndo );
- bDelBookmrk = FALSE;
+ bDelBookmrk = sal_False;
}
if( refObj.Is() )
@@ -3836,7 +3834,7 @@ void SwTrnsfrDdeLink::Disconnect( BOOL bRemoveDataAdvise )
// -----------------------------------------------------------------------
-BOOL SwTrnsfrDdeLink::FindDocShell()
+sal_Bool SwTrnsfrDdeLink::FindDocShell()
{
TypeId aType( TYPE( SwDocShell ) );
SfxObjectShell* pTmpSh = SfxObjectShell::GetFirst( &aType );
@@ -3845,14 +3843,14 @@ BOOL SwTrnsfrDdeLink::FindDocShell()
if( pTmpSh == pDocShell ) // die wollen wir haben
{
if( pDocShell->GetDoc() )
- return TRUE;
+ return sal_True;
break; // das Doc ist nicht mehr vorhanden, also raus!
}
pTmpSh = SfxObjectShell::GetNext( *pTmpSh, &aType );
}
pDocShell = 0;
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
diff --git a/sw/source/ui/docvw/AnnotationMenuButton.cxx b/sw/source/ui/docvw/AnnotationMenuButton.cxx
index c49c689851..8cef565545 100644
--- a/sw/source/ui/docvw/AnnotationMenuButton.cxx
+++ b/sw/source/ui/docvw/AnnotationMenuButton.cxx
@@ -49,13 +49,13 @@
namespace sw { namespace annotation {
-Color ColorFromAlphaColor( const UINT8 aTransparency,
+Color ColorFromAlphaColor( const sal_uInt8 aTransparency,
const Color &aFront,
const Color &aBack )
{
- return Color((UINT8)(aFront.GetRed() * aTransparency/(double)255 + aBack.GetRed() * (1-aTransparency/(double)255)),
- (UINT8)(aFront.GetGreen() * aTransparency/(double)255 + aBack.GetGreen() * (1-aTransparency/(double)255)),
- (UINT8)(aFront.GetBlue() * aTransparency/(double)255 + aBack.GetBlue() * (1-aTransparency/(double)255)));
+ return Color((sal_uInt8)(aFront.GetRed() * aTransparency/(double)255 + aBack.GetRed() * (1-aTransparency/(double)255)),
+ (sal_uInt8)(aFront.GetGreen() * aTransparency/(double)255 + aBack.GetGreen() * (1-aTransparency/(double)255)),
+ (sal_uInt8)(aFront.GetBlue() * aTransparency/(double)255 + aBack.GetBlue() * (1-aTransparency/(double)255)));
}
AnnotationMenuButton::AnnotationMenuButton( sw::sidebarwindows::SwSidebarWin& rSidebarWin )
@@ -199,7 +199,7 @@ void AnnotationMenuButton::Paint( const Rectangle& /*rRect*/ )
void AnnotationMenuButton::KeyInput( const KeyEvent& rKeyEvt )
{
const KeyCode& rKeyCode = rKeyEvt.GetKeyCode();
- const USHORT nKey = rKeyCode.GetCode();
+ const sal_uInt16 nKey = rKeyCode.GetCode();
if ( nKey == KEY_TAB )
{
mrSidebarWin.ActivatePostIt();
diff --git a/sw/source/ui/docvw/AnnotationWin.cxx b/sw/source/ui/docvw/AnnotationWin.cxx
index 08fb91dcc3..4675805e52 100644
--- a/sw/source/ui/docvw/AnnotationWin.cxx
+++ b/sw/source/ui/docvw/AnnotationWin.cxx
@@ -28,7 +28,6 @@
*
************************************************************************/
-
#include "precompiled_sw.hxx"
#include <AnnotationWin.hxx>
@@ -62,8 +61,10 @@
#include <wrtsh.hxx>
#include <docsh.hxx>
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <SwUndoField.hxx>
+
namespace sw { namespace annotation {
SwAnnotationWin::SwAnnotationWin( SwEditWin& rEditWin,
@@ -88,7 +89,7 @@ void SwAnnotationWin::SetPostItText()
{
// get text from SwPostItField and insert into our textview
Engine()->SetModifyHdl( Link() );
- Engine()->EnableUndo( FALSE );
+ Engine()->EnableUndo( sal_False );
mpFld = static_cast<SwPostItField*>(mpFmtFld->GetFld());
if( mpFld->GetTextObject() )
Engine()->SetText( *mpFld->GetTextObject() );
@@ -101,7 +102,7 @@ void SwAnnotationWin::SetPostItText()
Engine()->ClearModifyFlag();
Engine()->GetUndoManager().Clear();
- Engine()->EnableUndo( TRUE );
+ Engine()->EnableUndo( sal_True );
Engine()->SetModifyHdl( LINK( this, SwAnnotationWin, ModifyHdl ) );
Invalidate();
}
@@ -116,7 +117,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();
@@ -246,7 +248,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();
@@ -256,8 +259,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 35067b2947..f2a2afce41 100644
--- a/sw/source/ui/docvw/PostItMgr.cxx
+++ b/sw/source/ui/docvw/PostItMgr.cxx
@@ -59,16 +59,12 @@
#include <redline.hxx>
#include <docary.hxx>
#include <SwRewriter.hxx>
-#include <undobj.hxx>
#include <tools/color.hxx>
#include <swmodule.hxx>
#include <annotation.hrc>
#include "cmdid.h"
-#include <SwRewriter.hxx>
-#include <undobj.hxx>
-
#include <sfx2/request.hxx>
#include <sfx2/event.hxx>
#include <svl/srchitem.hxx>
@@ -423,8 +419,8 @@ void SwPostItMgr::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
{
if ((*i)->pPostIt)
{
- USHORT nScriptType = SvtLanguageOptions::GetScriptTypeOfLanguage( (*i)->GetFmtFld()->GetFld()->GetLanguage() );
- USHORT nLangWhichId = 0;
+ sal_uInt16 nScriptType = SvtLanguageOptions::GetScriptTypeOfLanguage( (*i)->GetFmtFld()->GetFld()->GetLanguage() );
+ sal_uInt16 nLangWhichId = 0;
switch (nScriptType)
{
case SCRIPTTYPE_LATIN : nLangWhichId = EE_CHAR_LANGUAGE ; break;
@@ -962,7 +958,7 @@ void SwPostItMgr::MakeVisible(const SwSidebarWin* pPostIt,long aPage )
mpWrtShell->MakeVisible(SwRect(mpEditWin->PixelToLogic(aNoteRect)));
}
-bool SwPostItMgr::ArrowEnabled(USHORT aDirection,unsigned long aPage) const
+bool SwPostItMgr::ArrowEnabled(sal_uInt16 aDirection,unsigned long aPage) const
{
switch (aDirection)
{
@@ -978,7 +974,7 @@ bool SwPostItMgr::ArrowEnabled(USHORT aDirection,unsigned long aPage) const
}
}
-Color SwPostItMgr::GetArrowColor(USHORT aDirection,unsigned long aPage) const
+Color SwPostItMgr::GetArrowColor(sal_uInt16 aDirection,unsigned long aPage) const
{
if (ArrowEnabled(aDirection,aPage))
{
@@ -1172,7 +1168,7 @@ void SwPostItMgr::AddRedlineComments(bool bCheckExistance, bool bFocus)
{
bool bEmpty = mvPostItFlds.empty();
const SwRedlineTbl& aTable = mpView->GetDocShell()->GetDoc()->GetRedlineTbl();
- for( USHORT i = 0; i < aTable.Count(); ++i )
+ for( sal_uInt16 i = 0; i < aTable.Count(); ++i )
{
SwRedline* pRedline = const_cast<SwRedline*>((aTable)[i]);
if ( pRedline->GetComment() != String(rtl::OUString::createFromAscii("")) )
@@ -1251,7 +1247,7 @@ void SwPostItMgr::Delete(String aAuthor)
mpWrtShell->GotoField( *(*i) );
mpWrtShell->DelRight();
}
- mpWrtShell->EndUndo( UNDO_DELETE );
+ mpWrtShell->EndUndo();
PrepareView();
mpWrtShell->EndAllAction();
mbLayout = true;
@@ -1297,7 +1293,7 @@ void SwPostItMgr::Delete()
mvPostItFlds.clear();
*/
- mpWrtShell->EndUndo( UNDO_DELETE );
+ mpWrtShell->EndUndo();
PrepareView();
mpWrtShell->EndAllAction();
mbLayout = true;
@@ -1398,7 +1394,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 8353511e76..3dd1417840 100644
--- a/sw/source/ui/docvw/SidebarTxtControl.cxx
+++ b/sw/source/ui/docvw/SidebarTxtControl.cxx
@@ -64,7 +64,6 @@
#include <wrtsh.hxx>
#include <shellres.hxx>
#include <SwRewriter.hxx>
-#include <undobj.hxx>
namespace css = ::com::sun::star;
@@ -116,7 +115,7 @@ void SidebarTxtControl::LoseFocus()
void SidebarTxtControl::RequestHelp(const HelpEvent &rEvt)
{
- USHORT nResId = 0;
+ sal_uInt16 nResId = 0;
switch( mrSidebarWin.GetLayoutStatus() )
{
case SwPostItHelper::INSERTED: nResId = STR_REDLINE_INSERT; break;
@@ -181,7 +180,7 @@ void SidebarTxtControl::Paint( const Rectangle& rRect)
void SidebarTxtControl::KeyInput( const KeyEvent& rKeyEvt )
{
const KeyCode& rKeyCode = rKeyEvt.GetKeyCode();
- USHORT nKey = rKeyCode.GetCode();
+ sal_uInt16 nKey = rKeyCode.GetCode();
if ( ( rKeyCode.IsMod1() && rKeyCode.IsMod2() ) &&
( (nKey == KEY_PAGEUP) || (nKey == KEY_PAGEDOWN) ) )
{
@@ -236,7 +235,7 @@ void SidebarTxtControl::KeyInput( const KeyEvent& rKeyEvt )
}
}
- mrDocView.GetViewFrame()->GetBindings().InvalidateAll(FALSE);
+ mrDocView.GetViewFrame()->GetBindings().InvalidateAll(sal_False);
}
void SidebarTxtControl::MouseMove( const MouseEvent& rMEvt )
@@ -303,7 +302,7 @@ void SidebarTxtControl::MouseButtonDown( const MouseEvent& rMEvt )
{
GetTextView()->MouseButtonDown( rMEvt );
}
- mrDocView.GetViewFrame()->GetBindings().InvalidateAll(FALSE);
+ mrDocView.GetViewFrame()->GetBindings().InvalidateAll(sal_False);
}
void SidebarTxtControl::MouseButtonUp( const MouseEvent& rMEvt )
@@ -333,7 +332,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 bd613fc7c0..66b0bc8833 100644
--- a/sw/source/ui/docvw/SidebarTxtControlAcc.cxx
+++ b/sw/source/ui/docvw/SidebarTxtControlAcc.cxx
@@ -80,7 +80,7 @@ class SidebarTextEditSource : public SvxEditSource,
SidebarTextEditSource::SidebarTextEditSource( SidebarTxtControl& rSidebarTxtControl )
: SvxEditSource()
, mrSidebarTxtControl( rSidebarTxtControl )
- , mTextForwarder( *(rSidebarTxtControl.GetTextView()->GetOutliner()), FALSE )
+ , mTextForwarder( *(rSidebarTxtControl.GetTextView()->GetOutliner()), sal_False )
, mViewForwarder( *(rSidebarTxtControl.GetTextView()) )
{
if ( mrSidebarTxtControl.GetTextView() )
diff --git a/sw/source/ui/docvw/SidebarWin.cxx b/sw/source/ui/docvw/SidebarWin.cxx
index 8ce45ae318..24bae48eee 100644
--- a/sw/source/ui/docvw/SidebarWin.cxx
+++ b/sw/source/ui/docvw/SidebarWin.cxx
@@ -331,7 +331,7 @@ void SwSidebarWin::InitControls()
SwDocShell* aShell = mrView.GetDocShell();
mpOutliner = new Outliner(&aShell->GetPool(),OUTLINERMODE_TEXTOBJECT);
aShell->GetDoc()->SetCalcFieldValueHdl( mpOutliner );
- mpOutliner->SetUpdateMode( TRUE );
+ mpOutliner->SetUpdateMode( sal_True );
Rescale();
mpOutlinerView = new OutlinerView ( mpOutliner, mpSidebarTxtControl );
@@ -354,7 +354,7 @@ void SwSidebarWin::InitControls()
mpVScrollbar->AddEventListener( LINK( this, SwSidebarWin, WindowEventListener ) );
const SwViewOption* pVOpt = mrView.GetWrtShellPtr()->GetViewOptions();
- ULONG nCntrl = mpOutliner->GetControlWord();
+ sal_uLong nCntrl = mpOutliner->GetControlWord();
// TODO: crash when AUTOCOMPLETE enabled
nCntrl |= EE_CNTRL_MARKFIELDS | EE_CNTRL_PASTESPECIAL | EE_CNTRL_AUTOCORRECT | EV_CNTRL_AUTOSCROLL | EE_CNTRL_URLSFXEXECUTE; // | EE_CNTRL_AUTOCOMPLETE;
if (pVOpt->IsFieldShadings())
@@ -770,7 +770,7 @@ void SwSidebarWin::SetSidebarPosition(sw::sidebarwindows::SidebarPosition eSideb
meSidebarPosition = eSidebarPosition;
}
-void SwSidebarWin::SetReadonly(BOOL bSet)
+void SwSidebarWin::SetReadonly(sal_Bool bSet)
{
mbReadonly = bSet;
GetOutlinerView()->SetReadOnly(bSet);
@@ -782,7 +782,7 @@ void SwSidebarWin::SetLanguage(const SvxLanguageItem aNewItem)
Engine()->SetModifyHdl( Link() );
ESelection aOld = GetOutlinerView()->GetSelection();
- ESelection aNewSelection( 0, 0, (USHORT)Engine()->GetParagraphCount()-1, USHRT_MAX );
+ ESelection aNewSelection( 0, 0, (sal_uInt16)Engine()->GetParagraphCount()-1, USHRT_MAX );
GetOutlinerView()->SetSelection( aNewSelection );
SfxItemSet aEditAttr(GetOutlinerView()->GetAttribs());
aEditAttr.Put(aNewItem);
@@ -792,7 +792,7 @@ void SwSidebarWin::SetLanguage(const SvxLanguageItem aNewItem)
Engine()->SetModifyHdl( pLink );
const SwViewOption* pVOpt = mrView.GetWrtShellPtr()->GetViewOptions();
- ULONG nCntrl = Engine()->GetControlWord();
+ sal_uLong nCntrl = Engine()->GetControlWord();
// turn off
if (!pVOpt->IsOnlineSpell())
nCntrl &= ~EE_CNTRL_ONLINESPELLING;
@@ -912,7 +912,7 @@ void SwSidebarWin::ToggleInsMode()
}
}
-void SwSidebarWin::ExecuteCommand(USHORT nSlot)
+void SwSidebarWin::ExecuteCommand(sal_uInt16 nSlot)
{
mrMgr.AssureStdModeAtShell();
@@ -970,7 +970,7 @@ long SwSidebarWin::GetPostItTextHeight()
return mpOutliner ? LogicToPixel(mpOutliner->CalcTextSize()).Height() : 0;
}
-void SwSidebarWin::SwitchToPostIt(USHORT aDirection)
+void SwSidebarWin::SwitchToPostIt(sal_uInt16 aDirection)
{
SwSidebarWin* pPostIt = mrMgr.GetNextPostIt(aDirection, this);
if (pPostIt)
@@ -1014,8 +1014,8 @@ IMPL_LINK( SwSidebarWin, WindowEventListener, VclSimpleEvent*, pEvent )
else if ( pWinEvent->GetId() == VCLEVENT_WINDOW_ACTIVATE &&
pWinEvent->GetWindow() == mpSidebarTxtControl )
{
- const BOOL bLockView = mrView.GetWrtShell().IsViewLocked();
- mrView.GetWrtShell().LockView( TRUE );
+ const sal_Bool bLockView = mrView.GetWrtShell().IsViewLocked();
+ mrView.GetWrtShell().LockView( sal_True );
if ( !IsPreview() )
{
@@ -1075,8 +1075,8 @@ IMPL_LINK(SwSidebarWin, DeleteHdl, void*, pVoid)
void SwSidebarWin::ResetAttributes()
{
- mpOutlinerView->RemoveAttribsKeepLanguages(TRUE);
- mpOutliner->RemoveFields(TRUE);
+ mpOutlinerView->RemoveAttribsKeepLanguages(sal_True);
+ mpOutliner->RemoveFields(sal_True);
mpOutlinerView->SetAttribs(DefaultItem());
}
@@ -1114,7 +1114,7 @@ sal_Int32 SwSidebarWin::GetMinimumSizeWithoutMeta()
void SwSidebarWin::SetSpellChecking()
{
const SwViewOption* pVOpt = mrView.GetWrtShellPtr()->GetViewOptions();
- ULONG nCntrl = mpOutliner->GetControlWord();
+ sal_uLong nCntrl = mpOutliner->GetControlWord();
if (pVOpt->IsOnlineSpell())
nCntrl |= EE_CNTRL_ONLINESPELLING;
else
@@ -1210,7 +1210,7 @@ void SwSidebarWin::SwitchToFieldPos()
GotoPos();
sal_uInt32 aCount = MoveCaret();
if (aCount)
- mrView.GetDocShell()->GetWrtShell()->SwCrsrShell::Right(aCount, 0, FALSE);
+ mrView.GetDocShell()->GetWrtShell()->SwCrsrShell::Right(aCount, 0, sal_False);
GrabFocusToDocument();
}
@@ -1313,7 +1313,7 @@ void SwRedComment::UpdateData()
void SwRedComment::SetPostItText()
{
Engine()->SetModifyHdl( Link() );
- Engine()->EnableUndo( FALSE );
+ Engine()->EnableUndo( sal_False );
Engine()->Clear();
View()->SetAttribs(DefaultItem());
@@ -1321,7 +1321,7 @@ void SwRedComment::SetPostItText()
Engine()->ClearModifyFlag();
Engine()->GetUndoManager().Clear();
- Engine()->EnableUndo( TRUE );
+ Engine()->EnableUndo( sal_True );
Engine()->SetModifyHdl( LINK( this, SwSidebarWin, ModifyHdl ) );
Invalidate();
}
diff --git a/sw/source/ui/docvw/edtdd.cxx b/sw/source/ui/docvw/edtdd.cxx
index 8174d81b65..001940b542 100644
--- a/sw/source/ui/docvw/edtdd.cxx
+++ b/sw/source/ui/docvw/edtdd.cxx
@@ -63,27 +63,27 @@ using namespace ::com::sun::star;
// no include "dbgoutsw.hxx" here!!!!!!
-extern BOOL bNoInterrupt;
-extern BOOL bFrmDrag;
-extern BOOL bDDTimerStarted;
+extern sal_Bool bNoInterrupt;
+extern sal_Bool bFrmDrag;
+extern sal_Bool bDDTimerStarted;
-BOOL bExecuteDrag = FALSE;
+sal_Bool bExecuteDrag = sal_False;
void SwEditWin::StartDDTimer()
{
aTimer.SetTimeoutHdl(LINK(this, SwEditWin, DDHandler));
aTimer.SetTimeout(480);
aTimer.Start();
- bDDTimerStarted = TRUE;
+ bDDTimerStarted = sal_True;
}
void SwEditWin::StopDDTimer(SwWrtShell *pSh, const Point &rPt)
{
aTimer.Stop();
- bDDTimerStarted = FALSE;
+ bDDTimerStarted = sal_False;
if(!pSh->IsSelFrmMode())
- (pSh->*pSh->fnSetCrsr)(&rPt,FALSE);
+ (pSh->*pSh->fnSetCrsr)(&rPt,sal_False);
aTimer.SetTimeoutHdl(LINK(this,SwEditWin, TimerHandler));
}
@@ -92,37 +92,37 @@ void SwEditWin::StartDrag( sal_Int8 /*nAction*/, const Point& rPosPixel )
SwWrtShell &rSh = rView.GetWrtShell();
if( rSh.GetDrawView() )
{
- CommandEvent aDragEvent( rPosPixel, COMMAND_STARTDRAG, TRUE );
+ CommandEvent aDragEvent( rPosPixel, COMMAND_STARTDRAG, sal_True );
if( rSh.GetDrawView()->Command( aDragEvent, this ) )
{
- rView.GetViewFrame()->GetBindings().InvalidateAll(FALSE);
+ rView.GetViewFrame()->GetBindings().InvalidateAll(sal_False);
return; // Event von der SdrView ausgewertet
}
}
if ( !pApplyTempl && !rSh.IsDrawCreate() && !IsDrawAction())
{
- BOOL bStart = FALSE, bDelSelect = FALSE;
+ sal_Bool bStart = sal_False, bDelSelect = sal_False;
SdrObject *pObj = NULL;
Point aDocPos( PixelToLogic( rPosPixel ) );
- if ( !rSh.IsInSelect() && rSh.ChgCurrPam( aDocPos, TRUE, TRUE))
+ if ( !rSh.IsInSelect() && rSh.ChgCurrPam( aDocPos, sal_True, sal_True))
//Wir sind nicht beim Selektieren und stehen auf einer
//Selektion
- bStart = TRUE;
+ bStart = sal_True;
else if ( !bFrmDrag && rSh.IsSelFrmMode() &&
rSh.IsInsideSelectedObj( aDocPos ) )
{
//Wir sind nicht am internen Draggen und stehen auf
//einem Objekt (Rahmen, Zeichenobjekt)
- bStart = TRUE;
+ bStart = sal_True;
}
else if( !bFrmDrag && rView.GetDocShell()->IsReadOnly() &&
OBJCNT_NONE != rSh.GetObjCntType( aDocPos, pObj ))
{
rSh.LockPaint();
if( rSh.SelectObj( aDocPos, 0, pObj ))
- bStart = bDelSelect = TRUE;
+ bStart = bDelSelect = sal_True;
else
rSh.UnlockPaint();
}
@@ -131,15 +131,15 @@ void SwEditWin::StartDrag( sal_Int8 /*nAction*/, const Point& rPosPixel )
SwContentAtPos aSwContentAtPos( SwContentAtPos::SW_INETATTR );
bStart = rSh.GetContentAtPos( aDocPos,
aSwContentAtPos,
- FALSE );
+ sal_False );
}
if ( bStart && !bIsInDrag )
{
- bMBPressed = FALSE;
+ bMBPressed = sal_False;
ReleaseMouse();
- bFrmDrag = FALSE;
- bExecuteDrag = TRUE;
+ bFrmDrag = sal_False;
+ bExecuteDrag = sal_True;
SwEditWin::nDDStartPosY = aDocPos.Y();
SwEditWin::nDDStartPosX = aDocPos.X();
aMovePos = aDocPos;
@@ -158,7 +158,7 @@ void SwEditWin::StartExecuteDrag()
if( !bExecuteDrag || bIsInDrag )
return;
- bIsInDrag = TRUE;
+ bIsInDrag = sal_True;
SwTransferable* pTransfer = new SwTransferable( rView.GetWrtShell() );
uno::Reference<
@@ -171,7 +171,7 @@ void SwEditWin::DragFinished()
{
DropCleanup();
aTimer.SetTimeoutHdl( LINK(this,SwEditWin, TimerHandler) );
- bIsInDrag = FALSE;
+ bIsInDrag = sal_False;
}
@@ -180,11 +180,11 @@ void SwEditWin::DropCleanup()
SwWrtShell &rSh = rView.GetWrtShell();
// Stati zuruecksetzen
- bNoInterrupt = FALSE;
+ bNoInterrupt = sal_False;
if ( bOldIdleSet )
{
((SwViewOption*)rSh.GetViewOptions())->SetIdle( bOldIdle );
- bOldIdleSet = FALSE;
+ bOldIdleSet = sal_False;
}
if ( pUserMarker )
CleanupDropUserMarker();
@@ -246,7 +246,7 @@ sal_Int8 SwEditWin::ExecuteDrop( const ExecuteDropEvent& rEvt )
// (according to KA due to Java D&D), we'll have to
// reevaluate the drop action once more _with_ the
// Transferable.
- USHORT nEventAction;
+ sal_uInt16 nEventAction;
sal_Int8 nUserOpt = rEvt.mbDefault ? EXCHG_IN_ACTION_DEFAULT
: rEvt.mnAction;
m_nDropAction = SotExchange::GetExchangeAction(
@@ -261,18 +261,18 @@ sal_Int8 SwEditWin::ExecuteDrop( const ExecuteDropEvent& rEvt )
TransferableDataHelper aData( rEvt.maDropEvent.Transferable );
nRet = rEvt.mnAction;
if( !SwTransferable::PasteData( aData, rSh, m_nDropAction, m_nDropFormat,
- m_nDropDestination, FALSE, rEvt.mbDefault, &aDocPt, nRet))
+ m_nDropDestination, sal_False, rEvt.mbDefault, &aDocPt, nRet))
//!! nRet = SFX_APP()->ExecuteDrop( rEvt );
nRet = DND_ACTION_NONE;
else if ( SW_MOD()->pDragDrop )
//Bei internem D&D nicht mehr aufraeumen!
- SW_MOD()->pDragDrop->SetCleanUp( FALSE );
+ SW_MOD()->pDragDrop->SetCleanUp( sal_False );
return nRet;
}
-USHORT SwEditWin::GetDropDestination( const Point& rPixPnt, SdrObject ** ppObj )
+sal_uInt16 SwEditWin::GetDropDestination( const Point& rPixPnt, SdrObject ** ppObj )
{
SwWrtShell &rSh = rView.GetWrtShell();
const Point aDocPt( PixelToLogic( rPixPnt ) );
@@ -297,7 +297,7 @@ USHORT SwEditWin::GetDropDestination( const Point& rPixPnt, SdrObject ** ppObj )
}
//Auf was wollen wir denn gerade droppen?
- USHORT nDropDestination = 0;
+ sal_uInt16 nDropDestination = 0;
//Sonst etwas aus der DrawingEngine getroffen?
if( OBJCNT_NONE != eType )
@@ -306,7 +306,7 @@ USHORT SwEditWin::GetDropDestination( const Point& rPixPnt, SdrObject ** ppObj )
{
case OBJCNT_GRF:
{
- BOOL bLink,
+ sal_Bool bLink,
bIMap = 0 != rSh.GetFmtFromObj( aDocPt )->GetURL().GetMap();
String aDummy;
rSh.GetGrfAtPos( aDocPt, aDummy, bLink );
@@ -372,14 +372,14 @@ sal_Int8 SwEditWin::AcceptDrop( const AcceptDropEvent& rEvt )
aWin.Right() -= nMargin;
aWin.Bottom() -= nMargin;
if(!aWin.IsInside(aPixPt)) {
- static ULONG last_tick = 0;
- ULONG current_tick = Time::GetSystemTicks();
+ static sal_uLong last_tick = 0;
+ sal_uLong current_tick = Time::GetSystemTicks();
if((current_tick-last_tick) > 500) {
last_tick = current_tick;
if(!bOldIdleSet) {
bOldIdle = rSh.GetViewOptions()->IsIdle();
- ((SwViewOption *)rSh.GetViewOptions())->SetIdle(FALSE);
- bOldIdleSet = TRUE;
+ ((SwViewOption *)rSh.GetViewOptions())->SetIdle(sal_False);
+ bOldIdleSet = sal_True;
}
CleanupDropUserMarker();
if(aPixPt.X() > aWin.Right()) aPixPt.X() += nMargin;
@@ -394,7 +394,7 @@ sal_Int8 SwEditWin::AcceptDrop( const AcceptDropEvent& rEvt )
if(bOldIdleSet) {
((SwViewOption *)rSh.GetViewOptions())->SetIdle( bOldIdle );
- bOldIdleSet = FALSE;
+ bOldIdleSet = sal_False;
}
SdrObject *pObj = NULL;
@@ -402,7 +402,7 @@ sal_Int8 SwEditWin::AcceptDrop( const AcceptDropEvent& rEvt )
if( !m_nDropDestination )
return DND_ACTION_NONE;
- USHORT nEventAction;
+ sal_uInt16 nEventAction;
sal_Int8 nUserOpt = rEvt.mbDefault ? EXCHG_IN_ACTION_DEFAULT
: rEvt.mnAction;
@@ -421,21 +421,21 @@ sal_Int8 SwEditWin::AcceptDrop( const AcceptDropEvent& rEvt )
SwModule *pMod = SW_MOD();
if( pMod->pDragDrop )
{
- BOOL bCleanup = FALSE;
+ sal_Bool bCleanup = sal_False;
//Zeichenobjekte in Kopf-/Fusszeilen sind nicht erlaubt
SwWrtShell *pSrcSh = pMod->pDragDrop->GetShell();
if( (pSrcSh->GetSelFrmType() == FRMTYPE_DRAWOBJ) &&
pSrcSh->IsSelContainsControl() &&
- (rSh.GetFrmType( &aDocPt, FALSE ) & (FRMTYPE_HEADER|FRMTYPE_FOOTER)) )
+ (rSh.GetFrmType( &aDocPt, sal_False ) & (FRMTYPE_HEADER|FRMTYPE_FOOTER)) )
{
- bCleanup = TRUE;
+ bCleanup = sal_True;
}
// keine positionsgeschuetzten Objecte verschieben!
else if( DND_ACTION_MOVE == rEvt.mnAction &&
pSrcSh->IsSelObjProtected( FLYPROTECT_POS ) )
{
- bCleanup = TRUE;
+ bCleanup = sal_True;
}
else if( rEvt.mbDefault )
{
@@ -508,16 +508,16 @@ sal_Int8 SwEditWin::AcceptDrop( const AcceptDropEvent& rEvt )
IMPL_LINK( SwEditWin, DDHandler, Timer *, EMPTYARG )
{
- bDDTimerStarted = FALSE;
+ bDDTimerStarted = sal_False;
aTimer.Stop();
aTimer.SetTimeout(240);
- bMBPressed = FALSE;
+ bMBPressed = sal_False;
ReleaseMouse();
- bFrmDrag = FALSE;
+ bFrmDrag = sal_False;
if ( rView.GetViewFrame() )
{
- bExecuteDrag = TRUE;
+ bExecuteDrag = sal_True;
StartExecuteDrag();
}
return 0;
diff --git a/sw/source/ui/docvw/edtwin.cxx b/sw/source/ui/docvw/edtwin.cxx
index 6578142a2e..c404f77739 100644
--- a/sw/source/ui/docvw/edtwin.cxx
+++ b/sw/source/ui/docvw/edtwin.cxx
@@ -154,7 +154,7 @@ using namespace ::com::sun::star;
--------------------------------------------------------------------*/
static bool bInputLanguageSwitched = false;
-extern BOOL bNoInterrupt; // in mainwn.cxx
+extern sal_Bool bNoInterrupt; // in mainwn.cxx
//Normalerweise wird im MouseButtonUp eine Selektion aufgehoben wenn die
//Selektion nicht gerade aufgezogen wird. Leider wird im MouseButtonDown
@@ -162,15 +162,15 @@ extern BOOL bNoInterrupt; // in mainwn.cxx
//komplett abgeschlossen und kann deshalb im Up nicht mehr unterschieden
//werden. Um dies Aufzuloese wird bHoldSelection im Down gesetzt und im
//Up ausgewertet.
-static BOOL bHoldSelection = FALSE;
-
-BOOL bFrmDrag = FALSE;
-BOOL bValidCrsrPos = FALSE;
-BOOL bModePushed = FALSE;
-BOOL bDDTimerStarted = FALSE;
-BOOL bFlushCharBuffer = FALSE;
-BOOL SwEditWin::bReplaceQuote = FALSE;
-BOOL bDDINetAttr = FALSE;
+static sal_Bool bHoldSelection = sal_False;
+
+sal_Bool bFrmDrag = sal_False;
+sal_Bool bValidCrsrPos = sal_False;
+sal_Bool bModePushed = sal_False;
+sal_Bool bDDTimerStarted = sal_False;
+sal_Bool bFlushCharBuffer = sal_False;
+sal_Bool SwEditWin::bReplaceQuote = sal_False;
+sal_Bool bDDINetAttr = sal_False;
SdrHdlKind eSdrMoveHdl = HDL_USER;
QuickHelpData* SwEditWin::pQuickHlpData = 0;
@@ -179,10 +179,10 @@ long SwEditWin::nDDStartPosY = 0;
long SwEditWin::nDDStartPosX = 0;
Color SwEditWin::aTextBackColor(COL_YELLOW);
Color SwEditWin::aTextColor(COL_RED);
-BOOL SwEditWin::bTransparentBackColor = FALSE; // Hintergrund nicht transparent
+sal_Bool SwEditWin::bTransparentBackColor = sal_False; // Hintergrund nicht transparent
-extern BOOL bExecuteDrag;
+extern sal_Bool bExecuteDrag;
SfxShell* lcl_GetShellFromDispatcher( SwView& rView, TypeId nType );
@@ -243,27 +243,27 @@ public:
struct QuickHelpData
{
SvStringsISortDtor aArr;
- USHORT* pAttrs;
+ sal_uInt16* pAttrs;
CommandExtTextInputData* pCETID;
- ULONG nTipId;
- USHORT nLen, nCurArrPos;
- BOOL bClear : 1, bChkInsBlank : 1, bIsTip : 1, bIsAutoText : 1;
+ sal_uLong nTipId;
+ sal_uInt16 nLen, nCurArrPos;
+ sal_Bool bClear : 1, bChkInsBlank : 1, bIsTip : 1, bIsAutoText : 1;
QuickHelpData() : pAttrs( 0 ), pCETID( 0 ) { ClearCntnt(); }
void Move( QuickHelpData& rCpy );
void ClearCntnt();
- void Start( SwWrtShell& rSh, USHORT nWrdLen );
+ void Start( SwWrtShell& rSh, sal_uInt16 nWrdLen );
void Stop( SwWrtShell& rSh );
- BOOL HasCntnt() const { return aArr.Count() && 0 != nLen; }
+ sal_Bool HasCntnt() const { return aArr.Count() && 0 != nLen; }
- void Inc( BOOL bEndLess )
+ void Inc( sal_Bool bEndLess )
{
if( ++nCurArrPos >= aArr.Count() )
nCurArrPos = (bEndLess && !bIsAutoText )? 0 : nCurArrPos-1;
}
- void Dec( BOOL bEndLess )
+ void Dec( sal_Bool bEndLess )
{
if( 0 == nCurArrPos-- )
nCurArrPos = (bEndLess && !bIsAutoText ) ? aArr.Count()-1 : 0;
@@ -279,7 +279,7 @@ struct QuickHelpData
#define HIT_PIX 2 /* Hit-Toleranz in Pixel */
#define MIN_MOVE 4
-inline BOOL IsMinMove(const Point &rStartPos, const Point &rLPt)
+inline sal_Bool IsMinMove(const Point &rStartPos, const Point &rLPt)
{
return Abs(rStartPos.X() - rLPt.X()) > MIN_MOVE ||
Abs(rStartPos.Y() - rLPt.Y()) > MIN_MOVE;
@@ -291,9 +291,9 @@ inline BOOL IsMinMove(const Point &rStartPos, const Point &rLPt)
nur bei DrawObjecte zum Selektieren fuehren, bei SwgFlys
ggfs zum ausloesen von Hyperlinks (DownLoad/NewWindow!)
--------------------------------------------------------------------*/
-inline BOOL IsDrawObjSelectable( const SwWrtShell& rSh, const Point& rPt )
+inline sal_Bool IsDrawObjSelectable( const SwWrtShell& rSh, const Point& rPt )
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
SdrObject* pObj;
switch( rSh.GetObjCntType( rPt, pObj ))
{
@@ -301,7 +301,7 @@ inline BOOL IsDrawObjSelectable( const SwWrtShell& rSh, const Point& rPt )
case OBJCNT_FLY:
case OBJCNT_GRF:
case OBJCNT_OLE:
- bRet = FALSE;
+ bRet = sal_False;
break;
default:; //prevent warning
}
@@ -313,7 +313,7 @@ inline BOOL IsDrawObjSelectable( const SwWrtShell& rSh, const Point& rPt )
--------------------------------------------------------------------*/
-void SwEditWin::UpdatePointer(const Point &rLPt, USHORT nModifier )
+void SwEditWin::UpdatePointer(const Point &rLPt, sal_uInt16 nModifier )
{
SwWrtShell &rSh = rView.GetWrtShell();
if( pApplyTempl )
@@ -398,45 +398,45 @@ void SwEditWin::UpdatePointer(const Point &rLPt, USHORT nModifier )
}
// Removed ExecHyperlink option.
- //BOOL bExecHyperlinks = rSh.GetViewOptions()->IsExecHyperlinks() ^
- // (nModifier == KEY_MOD2 ? TRUE : FALSE);
- BOOL bExecHyperlinks = rView.GetDocShell()->IsReadOnly();
+ //sal_Bool bExecHyperlinks = rSh.GetViewOptions()->IsExecHyperlinks() ^
+ // (nModifier == KEY_MOD2 ? sal_True : sal_False);
+ sal_Bool bExecHyperlinks = rView.GetDocShell()->IsReadOnly();
if ( !bExecHyperlinks )
{
SvtSecurityOptions aSecOpts;
- const BOOL bSecureOption = aSecOpts.IsOptionSet( SvtSecurityOptions::E_CTRLCLICK_HYPERLINK );
+ const sal_Bool bSecureOption = aSecOpts.IsOptionSet( SvtSecurityOptions::E_CTRLCLICK_HYPERLINK );
if ( ( bSecureOption && nModifier == KEY_MOD1 ) ||
( !bSecureOption && nModifier != KEY_MOD1 ) )
- bExecHyperlinks = TRUE;
+ bExecHyperlinks = sal_True;
}
- const BOOL bExecSmarttags = nModifier == KEY_MOD1;
+ const sal_Bool bExecSmarttags = nModifier == KEY_MOD1;
SdrView *pSdrView = rSh.GetDrawView();
- BOOL bPrefSdrPointer = FALSE;
- BOOL bHitHandle = FALSE;
- BOOL bCntAtPos = FALSE;
- BOOL bIsDocReadOnly = rView.GetDocShell()->IsReadOnly() &&
+ sal_Bool bPrefSdrPointer = sal_False;
+ sal_Bool bHitHandle = sal_False;
+ sal_Bool bCntAtPos = sal_False;
+ sal_Bool bIsDocReadOnly = rView.GetDocShell()->IsReadOnly() &&
rSh.IsCrsrReadonly();
aActHitType = SDRHIT_NONE;
PointerStyle eStyle = POINTER_TEXT;
if ( !pSdrView )
- bCntAtPos = TRUE;
- else if ( TRUE == (bHitHandle = pSdrView->PickHandle( rLPt ) != 0) )
+ bCntAtPos = sal_True;
+ else if ( sal_True == (bHitHandle = pSdrView->PickHandle( rLPt ) != 0) )
{
aActHitType = SDRHIT_OBJECT;
- bPrefSdrPointer = TRUE;
+ bPrefSdrPointer = sal_True;
}
else
{
- const BOOL bNotInSelObj = !rSh.IsInsideSelectedObj( rLPt );
+ const sal_Bool bNotInSelObj = !rSh.IsInsideSelectedObj( rLPt );
if ( rView.GetDrawFuncPtr() && !bInsDraw && bNotInSelObj )
{
aActHitType = SDRHIT_OBJECT;
if (IsObjectSelect())
eStyle = POINTER_ARROW;
else
- bPrefSdrPointer = TRUE;
+ bPrefSdrPointer = sal_True;
}
else
{
@@ -461,7 +461,7 @@ void SwEditWin::UpdatePointer(const Point &rLPt, USHORT nModifier )
if (pSdrView->IsTextEdit())
{
aActHitType = SDRHIT_NONE;
- bPrefSdrPointer = TRUE;
+ bPrefSdrPointer = sal_True;
}
else
{
@@ -471,7 +471,7 @@ void SwEditWin::UpdatePointer(const Point &rLPt, USHORT nModifier )
if (eHit == SDRHIT_URLFIELD && bExecHyperlinks)
{
aActHitType = SDRHIT_OBJECT;
- bPrefSdrPointer = TRUE;
+ bPrefSdrPointer = sal_True;
}
else
{
@@ -510,9 +510,9 @@ void SwEditWin::UpdatePointer(const Point &rLPt, USHORT nModifier )
else
{
if ( rView.GetDrawFuncPtr() )
- bPrefSdrPointer = TRUE;
+ bPrefSdrPointer = sal_True;
else
- bCntAtPos = TRUE;
+ bCntAtPos = sal_True;
}
}
}
@@ -576,7 +576,7 @@ IMPL_LINK( SwEditWin, TimerHandler, Timer *, EMPTYARG )
SwWrtShell &rSh = rView.GetWrtShell();
Point aModPt( aMovePos );
const SwRect aOldVis( rSh.VisArea() );
- BOOL bDone = FALSE;
+ sal_Bool bDone = sal_False;
if ( !rSh.VisArea().IsInside( aModPt ) )
{
@@ -584,12 +584,12 @@ IMPL_LINK( SwEditWin, TimerHandler, Timer *, EMPTYARG )
{
const int nMaxScroll = 40;
rView.Scroll( Rectangle(aModPt,Size(1,1)), nMaxScroll, nMaxScroll);
- bDone = TRUE;
+ bDone = sal_True;
}
else if ( bFrmDrag )
{
- (rSh.*rSh.fnDrag)(&aModPt,FALSE);
- bDone = TRUE;
+ (rSh.*rSh.fnDrag)(&aModPt,sal_False);
+ bDone = sal_True;
}
if ( !bDone )
aModPt = rSh.GetCntntPos( aModPt,aModPt.Y() > rSh.VisArea().Bottom() );
@@ -602,7 +602,7 @@ IMPL_LINK( SwEditWin, TimerHandler, Timer *, EMPTYARG )
rSh.SelectTableRowCol( *pRowColumnSelectionStart, &aPos, bIsRowDrag );
}
else
- (rSh.*rSh.fnSetCrsr)( &aModPt, FALSE );
+ (rSh.*rSh.fnSetCrsr)( &aModPt, sal_False );
//fix(24138): Es kann sein, dass der "Sprung" ueber eine Tabelle so
//nicht geschafft wird. Deshalb wir hier eben per Up/Down ueber die
@@ -613,9 +613,9 @@ IMPL_LINK( SwEditWin, TimerHandler, Timer *, EMPTYARG )
//JP 11.10.2001 Bug 72294 - take the center point of VisArea to
// decide in which direction the user want.
if( aModPt.Y() < ( rVisArea.Top() + rVisArea.Height() / 2 ) )
- rSh.Up( TRUE, 1 );
+ rSh.Up( sal_True, 1 );
else
- rSh.Down( TRUE, 1 );
+ rSh.Down( sal_True, 1 );
}
}
@@ -669,16 +669,16 @@ inline void SwEditWin::EnterArea()
------------------------------------------------------------------------*/
-void SwEditWin::InsFrm(USHORT nCols)
+void SwEditWin::InsFrm(sal_uInt16 nCols)
{
- StdDrawMode( OBJ_NONE, FALSE );
- bInsFrm = TRUE;
+ StdDrawMode( OBJ_NONE, sal_False );
+ bInsFrm = sal_True;
nInsFrmColCount = nCols;
}
-void SwEditWin::StdDrawMode( SdrObjKind eSdrObjectKind, BOOL bObjSelect )
+void SwEditWin::StdDrawMode( SdrObjKind eSdrObjectKind, sal_Bool bObjSelect )
{
SetSdrDrawMode( eSdrObjectKind );
@@ -695,8 +695,8 @@ void SwEditWin::StdDrawMode( SdrObjKind eSdrObjectKind, BOOL bObjSelect )
if (bObjSelect)
rView.GetDrawFuncPtr()->Activate( SID_OBJECT_SELECT );
else
- rView.GetDrawFuncPtr()->Activate( sal::static_int_cast< USHORT >(eSdrObjectKind) ); // don't know if this is useful at all; but it keeps functionality as it was...
- bInsFrm = FALSE;
+ rView.GetDrawFuncPtr()->Activate( sal::static_int_cast< sal_uInt16 >(eSdrObjectKind) ); // don't know if this is useful at all; but it keeps functionality as it was...
+ bInsFrm = sal_False;
nInsFrmColCount = 1;
}
@@ -710,7 +710,7 @@ void SwEditWin::StopInsFrm()
rView.SetDrawFuncPtr(NULL);
}
rView.LeaveDrawCreate(); // Konstruktionsmode verlassen
- bInsFrm = FALSE;
+ bInsFrm = sal_False;
nInsFrmColCount = 1;
}
@@ -718,16 +718,16 @@ void SwEditWin::StopInsFrm()
--------------------------------------------------------------------*/
-BOOL SwEditWin::IsInputSequenceCheckingRequired( const String &rText, const SwPaM& rCrsr ) const
+sal_Bool SwEditWin::IsInputSequenceCheckingRequired( const String &rText, const SwPaM& rCrsr ) const
{
const SvtCTLOptions& rCTLOptions = SW_MOD()->GetCTLOptions();
if ( !rCTLOptions.IsCTLFontEnabled() ||
!rCTLOptions.IsCTLSequenceChecking() )
- return FALSE;
+ return sal_False;
const xub_StrLen nFirstPos = rCrsr.Start()->nContent.GetIndex();
if ( 0 == nFirstPos ) /* first char needs not to be checked */
- return FALSE;
+ return sal_False;
SwBreakIt *pBreakIter = SwBreakIt::Get();
uno::Reference < i18n::XBreakIterator > xBI = pBreakIter->GetBreakIter();
@@ -841,7 +841,7 @@ void SwEditWin::FlushInBuffer()
// at this point now we will insert the buffer text 'normally' some lines below...
- rSh.Pop( FALSE ); // pop old cursor from stack
+ rSh.Pop( sal_False ); // pop old cursor from stack
if (!aInBuffer.Len())
return;
@@ -877,7 +877,7 @@ void SwEditWin::FlushInBuffer()
sal_Bool bLang = true;
if(eBufferLanguage != LANGUAGE_DONTKNOW)
{
- USHORT nWhich = 0;
+ sal_uInt16 nWhich = 0;
switch( GetI18NScriptTypeOfLanguage( eBufferLanguage ))
{
case i18n::ScriptType::ASIAN: nWhich = RES_CHRATR_CJK_LANGUAGE; break;
@@ -889,7 +889,7 @@ void SwEditWin::FlushInBuffer()
{
SfxItemSet aLangSet(rView.GetPool(), nWhich, nWhich);
rSh.GetCurAttr(aLangSet);
- if(SFX_ITEM_DEFAULT <= aLangSet.GetItemState(nWhich, TRUE))
+ if(SFX_ITEM_DEFAULT <= aLangSet.GetItemState(nWhich, sal_True))
{
LanguageType eLang = static_cast<const SvxLanguageItem&>(aLangSet.Get(nWhich)).GetLanguage();
if ( eLang == eBufferLanguage )
@@ -956,7 +956,7 @@ void SwEditWin::FlushInBuffer()
rSh.Insert( aInBuffer );
eBufferLanguage = LANGUAGE_DONTKNOW;
aInBuffer.Erase();
- bFlushCharBuffer = FALSE;
+ bFlushCharBuffer = sal_False;
}
}
@@ -969,7 +969,7 @@ void SwEditWin::FlushInBuffer()
#define MOVE_RIGHT_SMALL 6
#define MOVE_DOWN_SMALL 7
-void SwEditWin::ChangeFly( BYTE nDir, BOOL bWeb )
+void SwEditWin::ChangeFly( sal_uInt8 nDir, sal_Bool bWeb )
{
SwWrtShell &rSh = rView.GetWrtShell();
SwRect aTmp = rSh.GetFlyRect();
@@ -1001,10 +1001,10 @@ void SwEditWin::ChangeFly( BYTE nDir, BOOL bWeb )
aSnap = rSh.GetViewOptions()->GetSnapSize();
short nDiv = rSh.GetViewOptions()->GetDivisionX();
if ( nDiv > 0 )
- aSnap.Width() = Max( (ULONG)1, (ULONG)aSnap.Width() / nDiv );
+ aSnap.Width() = Max( (sal_uLong)1, (sal_uLong)aSnap.Width() / nDiv );
nDiv = rSh.GetViewOptions()->GetDivisionY();
if ( nDiv > 0 )
- aSnap.Height() = Max( (ULONG)1, (ULONG)aSnap.Height() / nDiv );
+ aSnap.Height() = Max( (sal_uLong)1, (sal_uLong)aSnap.Height() / nDiv );
}
SwRect aBoundRect;
@@ -1039,9 +1039,9 @@ void SwEditWin::ChangeFly( BYTE nDir, BOOL bWeb )
case MOVE_DOWN_SMALL: if( aTmp.Height() < aSnap.Height() + MINFLY ) break;
nDown = aSnap.Height(); // kein break
case MOVE_DOWN_BIG: aTmp.Top( aTmp.Top() + nDown ); break;
- default: ASSERT( TRUE, "ChangeFly: Unknown direction." );
+ default: ASSERT( sal_True, "ChangeFly: Unknown direction." );
}
- BOOL bSet = FALSE;
+ sal_Bool bSet = sal_False;
if ((FLY_AS_CHAR == eAnchorId) && ( nDir % 2 ))
{
long aDiff = aTmp.Top() - aRefPoint.Y();
@@ -1054,7 +1054,7 @@ void SwEditWin::ChangeFly( BYTE nDir, BOOL bWeb )
if( bWeb )
{
eNew = aVert.GetVertOrient();
- BOOL bDown = 0 != ( nDir & 0x02 );
+ sal_Bool bDown = 0 != ( nDir & 0x02 );
switch( eNew )
{
case text::VertOrientation::CHAR_TOP:
@@ -1085,7 +1085,7 @@ void SwEditWin::ChangeFly( BYTE nDir, BOOL bWeb )
}
aVert.SetVertOrient( eNew );
aSet.Put( aVert );
- bSet = TRUE;
+ bSet = sal_True;
}
if (bWeb && (FLY_AT_PARA == eAnchorId)
&& ( nDir==MOVE_LEFT_SMALL || nDir==MOVE_RIGHT_BIG ))
@@ -1109,23 +1109,23 @@ void SwEditWin::ChangeFly( BYTE nDir, BOOL bWeb )
{
aHori.SetHoriOrient( eNew );
aSet.Put( aHori );
- bSet = TRUE;
+ bSet = sal_True;
}
}
rSh.StartAllAction();
if( bSet )
rSh.SetFlyFrmAttr( aSet );
- BOOL bSetPos = (FLY_AS_CHAR != eAnchorId);
+ sal_Bool bSetPos = (FLY_AS_CHAR != eAnchorId);
if(bSetPos && bWeb)
{
if (FLY_AT_PAGE != eAnchorId)
{
- bSetPos = FALSE;
+ bSetPos = sal_False;
}
else
{
bSetPos = (::GetHtmlMode(rView.GetDocShell()) & HTMLMODE_SOME_ABS_POS) ?
- TRUE : FALSE;
+ sal_True : sal_False;
}
}
if( bSetPos )
@@ -1136,7 +1136,7 @@ void SwEditWin::ChangeFly( BYTE nDir, BOOL bWeb )
/* -----------------------------23.05.2002 11:35------------------------------
---------------------------------------------------------------------------*/
-void SwEditWin::ChangeDrawing( BYTE nDir )
+void SwEditWin::ChangeDrawing( sal_uInt8 nDir )
{
// --> OD 2005-01-31 #i40845# - start undo action in order to get only one
// undo action for this change.
@@ -1147,7 +1147,7 @@ void SwEditWin::ChangeDrawing( BYTE nDir )
long nX = 0;
long nY = 0;
sal_Bool bOnePixel = sal_False;
- USHORT nAnchorDir = SW_MOVE_UP;
+ sal_uInt16 nAnchorDir = SW_MOVE_UP;
switch(nDir)
{
case MOVE_LEFT_SMALL:
@@ -1181,14 +1181,14 @@ void SwEditWin::ChangeDrawing( BYTE nDir )
if(0 != nX || 0 != nY)
{
- BYTE nProtect = rSh.IsSelObjProtected( FLYPROTECT_POS|FLYPROTECT_SIZE );
+ sal_uInt8 nProtect = rSh.IsSelObjProtected( FLYPROTECT_POS|FLYPROTECT_SIZE );
Size aSnap( rSh.GetViewOptions()->GetSnapSize() );
short nDiv = rSh.GetViewOptions()->GetDivisionX();
if ( nDiv > 0 )
- aSnap.Width() = Max( (ULONG)1, (ULONG)aSnap.Width() / nDiv );
+ aSnap.Width() = Max( (sal_uLong)1, (sal_uLong)aSnap.Width() / nDiv );
nDiv = rSh.GetViewOptions()->GetDivisionY();
if ( nDiv > 0 )
- aSnap.Height() = Max( (ULONG)1, (ULONG)aSnap.Height() / nDiv );
+ aSnap.Height() = Max( (sal_uLong)1, (sal_uLong)aSnap.Height() / nDiv );
if(bOnePixel)
aSnap = PixelToLogic(Size(1,1));
@@ -1208,8 +1208,8 @@ void SwEditWin::ChangeDrawing( BYTE nDir )
{
// --> FME 2005-04-26 #i47138#
// Check if object is anchored as character and move direction
- BOOL bDummy;
- const bool bVertAnchor = rSh.IsFrmVertical( TRUE, bDummy );
+ sal_Bool bDummy;
+ const bool bVertAnchor = rSh.IsFrmVertical( sal_True, bDummy );
const bool bHoriMove = !bVertAnchor == !( nDir % 2 );
const bool bMoveAllowed =
!bHoriMove || (rSh.GetAnchorId() != FLY_AS_CHAR);
@@ -1246,14 +1246,14 @@ void SwEditWin::ChangeDrawing( BYTE nDir )
if(pSdrView->IsDragObj())
{
- BOOL bWasNoSnap = static_cast< BOOL >(rDragStat.IsNoSnap());
- BOOL bWasSnapEnabled = pSdrView->IsSnapEnabled();
+ sal_Bool bWasNoSnap = static_cast< sal_Bool >(rDragStat.IsNoSnap());
+ sal_Bool bWasSnapEnabled = pSdrView->IsSnapEnabled();
// switch snapping off
if(!bWasNoSnap)
- ((SdrDragStat&)rDragStat).SetNoSnap(TRUE);
+ ((SdrDragStat&)rDragStat).SetNoSnap(sal_True);
if(bWasSnapEnabled)
- pSdrView->SetSnapEnabled(FALSE);
+ pSdrView->SetSnapEnabled(sal_False);
pSdrView->MovAction(aEndPoint);
pSdrView->EndDragObj();
@@ -1304,7 +1304,7 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt)
aKeyInputFlushTimer.Stop();
SwWrtShell &rSh = rView.GetWrtShell();
- BOOL bIsDocReadOnly = rView.GetDocShell()->IsReadOnly() &&
+ sal_Bool bIsDocReadOnly = rView.GetDocShell()->IsReadOnly() &&
rSh.IsCrsrReadonly();
//if the language changes the buffer must be flushed
@@ -1325,7 +1325,7 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt)
// OS:auch die DrawView braucht noch ein readonly-Flag
if ( !bIsDocReadOnly && rSh.GetDrawView() && rSh.GetDrawView()->KeyInput( rKEvt, this ) )
{
- rSh.GetView().GetViewFrame()->GetBindings().InvalidateAll( FALSE );
+ rSh.GetView().GetViewFrame()->GetBindings().InvalidateAll( sal_False );
rSh.SetModified();
return; // Event von der SdrView ausgewertet
}
@@ -1336,10 +1336,10 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt)
rSh.Edit();
}
- BOOL bFlushBuffer = FALSE;
- BOOL bNormalChar = FALSE;
- BOOL bChkInsBlank = pQuickHlpData->bChkInsBlank;
- pQuickHlpData->bChkInsBlank = FALSE;
+ sal_Bool bFlushBuffer = sal_False;
+ sal_Bool bNormalChar = sal_False;
+ sal_Bool bChkInsBlank = pQuickHlpData->bChkInsBlank;
+ pQuickHlpData->bChkInsBlank = sal_False;
KeyEvent aKeyEvent( rKEvt );
// look for vertical mappings
@@ -1348,7 +1348,7 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt)
//JP 21.2.2002: must changed from switch to if, because the Linux
// compiler has problem with the code. Has to remove if the new general
// handler exist.
- USHORT nKey = rKEvt.GetKeyCode().GetCode();
+ sal_uInt16 nKey = rKEvt.GetKeyCode().GetCode();
if( KEY_UP == nKey || KEY_DOWN == nKey ||
KEY_LEFT == nKey || KEY_RIGHT == nKey )
@@ -1398,7 +1398,7 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt)
const SwFrmFmt* pFlyFmt = rSh.GetFlyFrmFmt();
if( pFlyFmt )
{
- USHORT nEvent;
+ sal_uInt16 nEvent;
if( 32 <= aCh &&
0 == (( KEY_MOD1 | KEY_MOD2 ) & rKeyCode.GetModifier() ))
@@ -1459,8 +1459,8 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt)
SwModuleOptions* pModOpt = SW_MOD()->GetModuleConfig();
TblChgWidthHeightType eTblChgMode = nsTblChgWidthHeightType::WH_COL_LEFT; // initialization just for warning-free code
- USHORT nTblChgSize = 0;
- BOOL bStopKeyInputTimer = TRUE;
+ sal_uInt16 nTblChgSize = 0;
+ sal_Bool bStopKeyInputTimer = sal_True;
String sFmlEntry;
enum SW_KeyState { KS_Start,
@@ -1511,7 +1511,7 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt)
SW_KeyState eKeyState = bIsDocReadOnly ? KS_CheckDocReadOnlyKeys
: KS_CheckKey,
eNextKeyState = KS_Ende;
- BYTE nDir = 0;
+ sal_uInt8 nDir = 0;
// -> #i23725#
if (nKS_NUMDOWN_Count > 0)
@@ -1558,12 +1558,12 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt)
else
rSh.SttSelect();
rSh.MoveSection( fnSectionCurr, fnSectionEnd );
- rSh.Pop( TRUE );
+ rSh.Pop( sal_True );
rSh.EndSelect();
sFmlEntry = '=';
}
else
- rSh.Pop( FALSE );
+ rSh.Pop( sal_False );
}
else
{
@@ -1662,7 +1662,7 @@ KEYINPUT_CHECKTABLE:
case KEY_LEFT:
case KEY_LEFT | KEY_MOD1:
{
- BOOL bMod1 = 0 != (rKeyCode.GetModifier() & KEY_MOD1);
+ sal_Bool bMod1 = 0 != (rKeyCode.GetModifier() & KEY_MOD1);
if(!bMod1)
{
eFlyState = KS_Fly_Change;
@@ -1685,7 +1685,7 @@ KEYINPUT_CHECKTABLE:
case KEY_UP:
case KEY_UP | KEY_MOD1:
{
- BOOL bMod1 = 0 != (rKeyCode.GetModifier() & KEY_MOD1);
+ sal_Bool bMod1 = 0 != (rKeyCode.GetModifier() & KEY_MOD1);
if(!bMod1)
{
eFlyState = KS_Fly_Change;
@@ -1701,7 +1701,7 @@ KEYINPUT_CHECKTABLE:
case KEY_DOWN:
case KEY_DOWN | KEY_MOD1:
{
- BOOL bMod1 = 0 != (rKeyCode.GetModifier() & KEY_MOD1);
+ sal_Bool bMod1 = 0 != (rKeyCode.GetModifier() & KEY_MOD1);
if(!bMod1)
{
eFlyState = KS_Fly_Change;
@@ -1718,7 +1718,7 @@ KEYINPUT_CHECKTABLE:
KEYINPUT_CHECKTABLE_INSDEL:
if( rSh.IsTableMode() || !rSh.GetTableFmt() ||
!bTblInsDelMode ||
- FALSE /* Tabelle geschuetzt */
+ sal_False /* Tabelle geschuetzt */
)
{
const int nSelectionType = rSh.GetSelectionType();
@@ -1743,7 +1743,7 @@ KEYINPUT_CHECKTABLE_INSDEL:
case KEY_DELETE:
if (rSh.IsInFrontOfLabel() &&
- rSh.NumOrNoNum(FALSE))
+ rSh.NumOrNoNum(sal_False))
eKeyState = KS_NumOrNoNum;
break;
@@ -1751,22 +1751,22 @@ KEYINPUT_CHECKTABLE_INSDEL:
if( !rSh.IsTableMode() && rSh.GetTableFmt() )
{
eKeyState = KS_Ende;
- bTblInsDelMode = TRUE;
- bTblIsInsMode = FALSE;
- bTblIsColMode = TRUE;
+ bTblInsDelMode = sal_True;
+ bTblIsInsMode = sal_False;
+ bTblIsColMode = sal_True;
aKeyInputTimer.Start();
- bStopKeyInputTimer = FALSE;
+ bStopKeyInputTimer = sal_False;
}
break;
case KEY_INSERT | KEY_MOD2:
if( !rSh.IsTableMode() && rSh.GetTableFmt() )
{
eKeyState = KS_Ende;
- bTblInsDelMode = TRUE;
- bTblIsInsMode = TRUE;
- bTblIsColMode = TRUE;
+ bTblInsDelMode = sal_True;
+ bTblIsInsMode = sal_True;
+ bTblIsColMode = sal_True;
aKeyInputTimer.Start();
- bStopKeyInputTimer = FALSE;
+ bStopKeyInputTimer = sal_False;
}
break;
@@ -1818,7 +1818,7 @@ KEYINPUT_CHECKTABLE_INSDEL:
if( !rSh.HasReadonlySel() )
{
// #i23725#
- BOOL bDone = FALSE;
+ sal_Bool bDone = sal_False;
// --> OD 2006-01-31 - try to add comment for code snip:
// Remove the paragraph indent, if the cursor is at the
// beginning of a paragraph, there is no selection
@@ -1851,13 +1851,13 @@ KEYINPUT_CHECKTABLE_INSDEL:
{
eKeyState = KS_NumUp;
nKS_NUMDOWN_Count = 2;
- bDone = TRUE;
+ bDone = sal_True;
}
else if (nKS_NUMINDENTINC_Count > 0)
{
eKeyState = KS_NumIndentDec;
nKS_NUMINDENTINC_Count = 2;
- bDone = TRUE;
+ bDone = sal_True;
}
}
// <- #i23725#
@@ -1901,7 +1901,7 @@ KEYINPUT_CHECKTABLE_INSDEL:
}
}
if ( bCallNumOrNoNum &&
- rSh.NumOrNoNum( !bOnlyBackspaceKey, TRUE ) )
+ rSh.NumOrNoNum( !bOnlyBackspaceKey, sal_True ) )
{
eKeyState = KS_NumOrNoNum;
}
@@ -1922,9 +1922,9 @@ KEYINPUT_CHECKTABLE_INSDEL:
{
#ifdef SW_CRSR_TIMER
- BOOL bOld = rSh.ChgCrsrTimerFlag( FALSE );
+ sal_Bool bOld = rSh.ChgCrsrTimerFlag( sal_False );
#endif
- if (rSh.IsFormProtected() || rSh.GetCurrentFieldmark() || rSh.GetChar(FALSE)==CH_TXT_ATR_FORMELEMENT)
+ if (rSh.IsFormProtected() || rSh.GetCurrentFieldmark() || rSh.GetChar(sal_False)==CH_TXT_ATR_FORMELEMENT)
{
eKeyState=KS_GotoNextFieldMark;
}
@@ -1978,9 +1978,9 @@ KEYINPUT_CHECKTABLE_INSDEL:
case KEY_TAB | KEY_SHIFT:
{
#ifdef SW_CRSR_TIMER
- BOOL bOld = rSh.ChgCrsrTimerFlag( FALSE );
+ sal_Bool bOld = rSh.ChgCrsrTimerFlag( sal_False );
#endif
- if (rSh.IsFormProtected() || rSh.GetCurrentFieldmark()|| rSh.GetChar(FALSE)==CH_TXT_ATR_FORMELEMENT) {
+ if (rSh.IsFormProtected() || rSh.GetCurrentFieldmark()|| rSh.GetChar(sal_False)==CH_TXT_ATR_FORMELEMENT) {
eKeyState=KS_GotoPrevFieldMark;
}
else if( rSh.GetCurNumRule() && rSh.IsSttOfPara() &&
@@ -2088,7 +2088,7 @@ KEYINPUT_CHECKTABLE_INSDEL:
{
case KEY_TAB:
case KEY_TAB | KEY_SHIFT:
- bNormalChar = FALSE;
+ bNormalChar = sal_False;
eKeyState = KS_Ende;
if ( rSh.GetSelectionType() &
(nsSelectionType::SEL_GRF |
@@ -2114,10 +2114,10 @@ KEYINPUT_CHECKTABLE_INSDEL:
{
SfxItemSet aSet(rSh.GetAttrPool(), RES_TXTATR_INETFMT, RES_TXTATR_INETFMT);
rSh.GetCurAttr(aSet);
- if(SFX_ITEM_SET == aSet.GetItemState(RES_TXTATR_INETFMT, FALSE))
+ if(SFX_ITEM_SET == aSet.GetItemState(RES_TXTATR_INETFMT, sal_False))
{
- const SfxPoolItem& rItem = aSet.Get(RES_TXTATR_INETFMT, TRUE);
- bNormalChar = FALSE;
+ const SfxPoolItem& rItem = aSet.Get(RES_TXTATR_INETFMT, sal_True);
+ bNormalChar = sal_False;
eKeyState = KS_Ende;
rSh.ClickToINetAttr((const SwFmtINetFmt&)rItem, URLLOAD_NOFILTER);
}
@@ -2134,12 +2134,12 @@ KEYINPUT_CHECKTABLE_INSDEL:
switch ( rKeyCode.GetModifier() | rKeyCode.GetCode() )
{
case KEY_RIGHT | KEY_MOD2:
- rSh.Right( CRSR_SKIP_CHARS, FALSE, 1, FALSE );
+ rSh.Right( CRSR_SKIP_CHARS, sal_False, 1, sal_False );
eKeyState = KS_Ende;
FlushInBuffer();
break;
case KEY_LEFT | KEY_MOD2:
- rSh.Left( CRSR_SKIP_CHARS, FALSE, 1, FALSE );
+ rSh.Left( CRSR_SKIP_CHARS, sal_False, 1, sal_False );
eKeyState = KS_Ende;
FlushInBuffer();
break;
@@ -2158,14 +2158,14 @@ KEYINPUT_CHECKTABLE_INSDEL:
if (bNormalChar && rSh.IsInFrontOfLabel())
{
- rSh.NumOrNoNum(FALSE);
+ rSh.NumOrNoNum(sal_False);
}
if( aInBuffer.Len() && ( !bNormalChar || bIsDocReadOnly ))
FlushInBuffer();
if( rView.KeyInput( aKeyEvent ) )
- bFlushBuffer = TRUE, bNormalChar = FALSE;
+ bFlushBuffer = sal_True, bNormalChar = sal_False;
else
{
// OS 22.09.95: Da der Sfx Acceleratoren nur aufruft, wenn sie beim letzten
@@ -2202,7 +2202,7 @@ KEYINPUT_CHECKTABLE_INSDEL:
}
else
{
- bNormalChar = FALSE;
+ bNormalChar = sal_False;
Window::KeyInput( aKeyEvent );
}
}
@@ -2251,7 +2251,7 @@ KEYINPUT_CHECKTABLE_INSDEL:
aCh = '\t';
// kein break!
case KS_InsChar:
- if (rSh.GetChar(FALSE)==CH_TXT_ATR_FORMELEMENT)
+ if (rSh.GetChar(sal_False)==CH_TXT_ATR_FORMELEMENT)
{
::sw::mark::ICheckboxFieldmark* pFieldmark =
dynamic_cast< ::sw::mark::ICheckboxFieldmark* >
@@ -2284,7 +2284,7 @@ KEYINPUT_CHECKTABLE_INSDEL:
}
else if(!rSh.HasReadonlySel())
{
- BOOL bIsNormalChar = GetAppCharClass().isLetterNumeric(
+ sal_Bool bIsNormalChar = GetAppCharClass().isLetterNumeric(
String( aCh ), 0 );
if( bChkInsBlank && bIsNormalChar &&
(aInBuffer.Len() || !rSh.IsSttPara() || !rSh.IsEndPara() ))
@@ -2296,8 +2296,8 @@ KEYINPUT_CHECKTABLE_INSDEL:
}
- BOOL bIsAutoCorrectChar = SvxAutoCorrect::IsAutoCorrectChar( aCh );
- BOOL bRunNext = pACorr && pACorr->HasRunNext();
+ sal_Bool bIsAutoCorrectChar = SvxAutoCorrect::IsAutoCorrectChar( aCh );
+ sal_Bool bRunNext = pACorr && pACorr->HasRunNext();
if( !aKeyEvent.GetRepeat() && pACorr && ( bIsAutoCorrectChar || bRunNext ) &&
pACfg->IsAutoFmtByInput() &&
(( pACorr->IsAutoCorrFlag( ChgWeightUnderl ) &&
@@ -2364,7 +2364,7 @@ KEYINPUT_CHECKTABLE_INSDEL:
default:
{
- USHORT nSlotId = 0;
+ sal_uInt16 nSlotId = 0;
FlushInBuffer();
//??? if( bFlushCharBuffer )
//??? FlushInBuffer( &rSh );
@@ -2387,11 +2387,11 @@ KEYINPUT_CHECKTABLE_INSDEL:
break;
case KS_NumDown:
- rSh.NumUpDown( TRUE );
+ rSh.NumUpDown( sal_True );
nKS_NUMDOWN_Count = 2; // #i23725#
break;
case KS_NumUp:
- rSh.NumUpDown( FALSE );
+ rSh.NumUpDown( sal_False );
break;
// -> #i23726#
@@ -2440,7 +2440,7 @@ KEYINPUT_CHECKTABLE_INSDEL:
nSlotId = FN_GOTO_PREV_CELL;
break;
case KS_AutoFmtByInput:
- rSh.SplitNode( TRUE );
+ rSh.SplitNode( sal_True );
break;
// case KS_NumOrNoNum:
@@ -2475,11 +2475,11 @@ KEYINPUT_CHECKTABLE_INSDEL:
if(pList->GetShortName( sFnd, sShrtNm, sGroup))
{
rSh.SttSelect();
- rSh.ExtendSelection( FALSE, aTmpQHD.nLen );
+ rSh.ExtendSelection( sal_False, aTmpQHD.nLen );
SwGlossaryHdl* pGlosHdl = GetView().GetGlosHdl();
- pGlosHdl->SetCurGroup(sGroup, TRUE);
+ pGlosHdl->SetCurGroup(sGroup, sal_True);
pGlosHdl->InsertGlossary( sShrtNm);
- pQuickHlpData->bChkInsBlank = TRUE;
+ pQuickHlpData->bChkInsBlank = sal_True;
}
}
else
@@ -2499,7 +2499,7 @@ KEYINPUT_CHECKTABLE_INSDEL:
case KS_EditFormula:
{
- const USHORT nId = SwInputChild::GetChildWindowId();
+ const sal_uInt16 nId = SwInputChild::GetChildWindowId();
SfxViewFrame* pVFrame = GetView().GetViewFrame();
pVFrame->ToggleChildWindow( nId );
@@ -2576,7 +2576,7 @@ KEYINPUT_CHECKTABLE_INSDEL:
if( bStopKeyInputTimer )
{
aKeyInputTimer.Stop();
- bTblInsDelMode = FALSE;
+ bTblInsDelMode = sal_False;
}
// falls die gepufferten Zeichen eingefuegt werden sollen
@@ -2584,7 +2584,7 @@ KEYINPUT_CHECKTABLE_INSDEL:
{
//OS 16.02.96 11.04: bFlushCharBuffer wurde hier nicht zurueckgesetzt
// warum nicht?
- BOOL bSave = bFlushCharBuffer;
+ sal_Bool bSave = bFlushCharBuffer;
FlushInBuffer();
bFlushCharBuffer = bSave;
@@ -2611,7 +2611,7 @@ void SwEditWin::RstMBDownFlags()
//Dialog noch ein MouseButton Up (wie unter WINDOWS).
//Daher hier die Stati zuruecksetzen und die Maus
//fuer den Dialog freigeben.
- bMBPressed = bNoInterrupt = FALSE;
+ bMBPressed = bNoInterrupt = sal_False;
EnterArea();
ReleaseMouse();
}
@@ -2630,7 +2630,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
// would work on deleted objects or the context menu has no parent anymore)
// See #126086# and #128122#
SfxInPlaceClient* pIPClient = rSh.GetSfxViewShell()->GetIPClient();
- BOOL bIsOleActive = ( pIPClient && pIPClient->IsObjectInPlaceActive() );
+ sal_Bool bIsOleActive = ( pIPClient && pIPClient->IsObjectInPlaceActive() );
if ( bIsOleActive && PopupMenu::IsInExecute() )
return;
@@ -2646,7 +2646,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
//ignore key modifiers for format paintbrush
{
- BOOL bExecFormatPaintbrush = pApplyTempl && pApplyTempl->pFormatClipboard
+ sal_Bool bExecFormatPaintbrush = pApplyTempl && pApplyTempl->pFormatClipboard
&& pApplyTempl->pFormatClipboard->HasContent();
if( bExecFormatPaintbrush )
rMEvt = MouseEvent( _rMEvt.GetPosPixel(), _rMEvt.GetClicks(),
@@ -2661,7 +2661,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
if ( IsChainMode() )
{
- SetChainMode( FALSE );
+ SetChainMode( sal_False );
SwRect aDummy;
SwFlyFrmFmt *pFmt = (SwFlyFrmFmt*)rSh.GetFlyFrmFmt();
if ( !rSh.Chainable( aDummy, *pFmt, aDocPos ) )
@@ -2674,12 +2674,12 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
//klappen aber in der Praxis ...
lcl_SelectShellForDrop( rView );
- BOOL bIsDocReadOnly = rView.GetDocShell()->IsReadOnly();
- BOOL bCallBase = TRUE;
+ sal_Bool bIsDocReadOnly = rView.GetDocShell()->IsReadOnly();
+ sal_Bool bCallBase = sal_True;
if( pQuickHlpData->bClear )
pQuickHlpData->Stop( rSh );
- pQuickHlpData->bChkInsBlank = FALSE;
+ pQuickHlpData->bChkInsBlank = sal_False;
if( rSh.FinishOLEObj() )
return; //InPlace beenden und der Klick zaehlt nicht mehr
@@ -2691,18 +2691,18 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
{
if (pSdrView->MouseButtonDown( rMEvt, this ) )
{
- rSh.GetView().GetViewFrame()->GetBindings().InvalidateAll(FALSE);
+ rSh.GetView().GetViewFrame()->GetBindings().InvalidateAll(sal_False);
return; // Event von der SdrView ausgewertet
}
}
- bIsInMove = FALSE;
+ bIsInMove = sal_False;
aStartPos = rMEvt.GetPosPixel();
aRszMvHdlPt.X() = 0, aRszMvHdlPt.Y() = 0;
- BYTE nMouseTabCol = 0;
- const BOOL bTmp = !rSh.IsDrawCreate() && !pApplyTempl && !rSh.IsInSelect() &&
+ sal_uInt8 nMouseTabCol = 0;
+ const sal_Bool bTmp = !rSh.IsDrawCreate() && !pApplyTempl && !rSh.IsInSelect() &&
rMEvt.GetClicks() == 1 && MOUSE_LEFT == rMEvt.GetButtons();
if ( bTmp &&
0 != (nMouseTabCol = rSh.WhichMouseTabCol( aDocPos ) ) &&
@@ -2719,7 +2719,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
bIsRowDrag = SW_TABROWSEL_HORI == nMouseTabCol||
SW_TABROWSEL_HORI_RTL == nMouseTabCol ||
SW_TABCOLSEL_VERT == nMouseTabCol;
- bMBPressed = TRUE;
+ bMBPressed = sal_True;
CaptureMouse();
}
return;
@@ -2730,9 +2730,9 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
{
//Zuppeln von Tabellenspalten aus dem Dokument heraus.
if(SW_TABCOL_VERT == nMouseTabCol || SW_TABCOL_HORI == nMouseTabCol)
- rView.SetTabColFromDoc( TRUE );
+ rView.SetTabColFromDoc( sal_True );
else
- rView.SetTabRowFromDoc( TRUE );
+ rView.SetTabRowFromDoc( sal_True );
rView.SetTabColFromDocPos( aDocPos );
rView.InvalidateRulerPos();
@@ -2741,11 +2741,11 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
if ( RulerColumnDrag( rMEvt,
(SW_TABCOL_VERT == nMouseTabCol || SW_TABROW_HORI == nMouseTabCol)) )
{
- rView.SetTabColFromDoc( FALSE );
- rView.SetTabRowFromDoc( FALSE );
+ rView.SetTabColFromDoc( sal_False );
+ rView.SetTabRowFromDoc( sal_False );
rView.InvalidateRulerPos();
rBind.Update();
- bCallBase = FALSE;
+ bCallBase = sal_False;
}
else
{
@@ -2771,7 +2771,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
rView.SetNumRuleNodeFromDoc( NULL );
rView.InvalidateRulerPos();
rBind.Update();
- bCallBase = FALSE;
+ bCallBase = sal_False;
}
else
{
@@ -2797,8 +2797,8 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
//beispielsweise die Selektion aufgehoben wird.
if ( MOUSE_LEFT == rMEvt.GetButtons() )
{
- BOOL bOnlyText = FALSE;
- bMBPressed = bNoInterrupt = TRUE;
+ sal_Bool bOnlyText = sal_False;
+ bMBPressed = bNoInterrupt = sal_True;
nKS_NUMDOWN_Count = 0; // #i23725#
CaptureMouse();
@@ -2827,7 +2827,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
}
if ( EnterDrawMode( rMEvt, aDocPos ) )
{
- bNoInterrupt = FALSE;
+ bNoInterrupt = sal_False;
return;
}
else if ( rView.GetDrawFuncPtr() && bInsFrm )
@@ -2842,7 +2842,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
if ( rSh.IsSelFrmMode())
{
SdrHdl* pHdl = rSh.GetDrawView()->PickHandle(aDocPos);
- BOOL bHitHandle = pHdl && pHdl->GetKind() != HDL_ANCHOR &&
+ sal_Bool bHitHandle = pHdl && pHdl->GetKind() != HDL_ANCHOR &&
pHdl->GetKind() != HDL_ANCHOR_TR;
if ((rSh.IsInsideSelectedObj(aDocPos) || bHitHandle) &&
@@ -2858,32 +2858,32 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
SwEditWin::nDDStartPosY = aDocPos.Y();
SwEditWin::nDDStartPosX = aDocPos.X();
}
- bFrmDrag = TRUE;
+ bFrmDrag = sal_True;
}
- bNoInterrupt = FALSE;
+ bNoInterrupt = sal_False;
return;
}
}
}
}
- BOOL bExecHyperlinks = rView.GetDocShell()->IsReadOnly();
+ sal_Bool bExecHyperlinks = rView.GetDocShell()->IsReadOnly();
if ( !bExecHyperlinks )
{
SvtSecurityOptions aSecOpts;
- const BOOL bSecureOption = aSecOpts.IsOptionSet( SvtSecurityOptions::E_CTRLCLICK_HYPERLINK );
+ const sal_Bool bSecureOption = aSecOpts.IsOptionSet( SvtSecurityOptions::E_CTRLCLICK_HYPERLINK );
if ( ( bSecureOption && rMEvt.GetModifier() == KEY_MOD1 ) ||
( !bSecureOption && rMEvt.GetModifier() != KEY_MOD1 ) )
- bExecHyperlinks = TRUE;
+ bExecHyperlinks = sal_True;
}
// --> FME 2004-07-30 #i32329# Enhanced selection
- BYTE nNumberOfClicks = static_cast< BYTE >(rMEvt.GetClicks() % 4);
+ sal_uInt8 nNumberOfClicks = static_cast< sal_uInt8 >(rMEvt.GetClicks() % 4);
if ( 0 == nNumberOfClicks && 0 < rMEvt.GetClicks() )
nNumberOfClicks = 4;
// <--
- BOOL bExecDrawTextLink = FALSE;
+ sal_Bool bExecDrawTextLink = sal_False;
switch ( rMEvt.GetModifier() + rMEvt.GetButtons() )
{
@@ -2905,7 +2905,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
pSdrView->PickAnything(rMEvt, SDRMOUSEBUTTONDOWN, aVEvt);
if (aVEvt.eEvent == SDREVENT_EXECUTEURL)
- bExecDrawTextLink = TRUE;
+ bExecDrawTextLink = sal_True;
}
//Rahmen nur zu selektieren versuchen, wenn
@@ -2923,12 +2923,12 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
rView.NoRotate();
rSh.HideCrsr();
- BOOL bUnLockView = !rSh.IsViewLocked();
- rSh.LockView( TRUE );
- BOOL bSelObj = rSh.SelectObj( aDocPos,
+ sal_Bool bUnLockView = !rSh.IsViewLocked();
+ rSh.LockView( sal_True );
+ sal_Bool bSelObj = rSh.SelectObj( aDocPos,
rMEvt.IsMod1() ? SW_ENTER_GROUP : 0);
if( bUnLockView )
- rSh.LockView( FALSE );
+ rSh.LockView( sal_False );
if( bSelObj )
{
@@ -2948,13 +2948,13 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
}
rSh.EnterSelFrmMode( &aDocPos );
- bFrmDrag = TRUE;
+ bFrmDrag = sal_True;
UpdatePointer( aDocPos, rMEvt.GetModifier() );
}
return;
}
else
- bOnlyText = static_cast< BOOL >(rSh.IsObjSelectable( aDocPos ));
+ bOnlyText = static_cast< sal_Bool >(rSh.IsObjSelectable( aDocPos ));
if (!rView.GetDrawFuncPtr())
rSh.ShowCrsr();
@@ -2979,9 +2979,9 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
}
else
{
- BOOL bUnLockView = !rSh.IsViewLocked();
- rSh.LockView( TRUE );
- BYTE nFlag = rMEvt.IsShift() ? SW_ADD_SELECT :0;
+ sal_Bool bUnLockView = !rSh.IsViewLocked();
+ rSh.LockView( sal_True );
+ sal_uInt8 nFlag = rMEvt.IsShift() ? SW_ADD_SELECT :0;
if( rMEvt.IsMod1() )
nFlag = nFlag | SW_ENTER_GROUP;
@@ -2992,19 +2992,19 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
rView.AttrChangedNotify(&rSh);
}
- BOOL bSelObj = rSh.SelectObj( aDocPos, nFlag );
+ sal_Bool bSelObj = rSh.SelectObj( aDocPos, nFlag );
if( bUnLockView )
- rSh.LockView( FALSE );
+ rSh.LockView( sal_False );
if( !bSelObj )
{
// Cursor hier umsetzen, damit er nicht zuerst
// im Rahmen gezeichnet wird; ShowCrsr() geschieht
// in LeaveSelFrmMode()
- bValidCrsrPos = !(CRSR_POSCHG & (rSh.*rSh.fnSetCrsr)(&aDocPos,FALSE));
+ bValidCrsrPos = !(CRSR_POSCHG & (rSh.*rSh.fnSetCrsr)(&aDocPos,sal_False));
rSh.LeaveSelFrmMode();
rView.AttrChangedNotify( &rSh );
- bCallBase = FALSE;
+ bCallBase = sal_False;
}
else
{
@@ -3012,7 +3012,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
rSh.EnterSelFrmMode( &aDocPos );
rSh.SelFlyGrabCrsr();
rSh.MakeSelVisible();
- bFrmDrag = TRUE;
+ bFrmDrag = sal_True;
if( rSh.IsFrmSelected() &&
rView.GetDrawFuncPtr() )
{
@@ -3031,7 +3031,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
}
case 2:
{
- bFrmDrag = FALSE;
+ bFrmDrag = sal_False;
if ( !bIsDocReadOnly && rSh.IsInsideSelectedObj(aDocPos) &&
0 == rSh.IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT ) )
@@ -3078,7 +3078,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
return;
SwField *pFld;
- BOOL bFtn = FALSE;
+ sal_Bool bFtn = sal_False;
if( !bIsDocReadOnly &&
( 0 != ( pFld = rSh.GetCurFld() ) ||
@@ -3089,7 +3089,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
GetView().GetViewFrame()->GetBindings().Execute( FN_EDIT_FOOTNOTE );
else
{
- USHORT nTypeId = pFld->GetTypeId();
+ sal_uInt16 nTypeId = pFld->GetTypeId();
SfxViewFrame* pVFrame = GetView().GetViewFrame();
switch( nTypeId )
{
@@ -3098,8 +3098,8 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
{
//falls es ein Readonly-Bereich ist, dann muss der Status
//enabled werden
- USHORT nSlot = TYP_POSTITFLD == nTypeId ? FN_POSTIT : FN_JAVAEDIT;
- SfxBoolItem aItem(nSlot, TRUE);
+ sal_uInt16 nSlot = TYP_POSTITFLD == nTypeId ? FN_POSTIT : FN_JAVAEDIT;
+ SfxBoolItem aItem(nSlot, sal_True);
pVFrame->GetBindings().SetState(aItem);
pVFrame->GetBindings().Execute(nSlot);
break;
@@ -3127,13 +3127,13 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
}
else
rSh.SelWrd( &aDocPos );
- bHoldSelection = TRUE;
+ bHoldSelection = sal_True;
return;
}
case 3:
case 4:
{
- bFrmDrag = FALSE;
+ bFrmDrag = sal_False;
//im Extended Mode hat Doppel- und
//Dreifachklick keine Auswirkungen.
if ( rSh.IsExtMode() )
@@ -3162,7 +3162,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
if ( bMod )
rSh.LeaveAddMode();
- bHoldSelection = TRUE;
+ bHoldSelection = sal_True;
return;
}
@@ -3173,7 +3173,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
case MOUSE_LEFT + KEY_SHIFT:
case MOUSE_LEFT + KEY_SHIFT + KEY_MOD1:
{
- BOOL bLockView = bWasShdwCrsr;
+ sal_Bool bLockView = bWasShdwCrsr;
switch ( rMEvt.GetModifier() )
{
@@ -3191,7 +3191,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
rSh.EnterSelFrmMode( &aDocPos );
SwEditWin::nDDStartPosY = aDocPos.Y();
SwEditWin::nDDStartPosX = aDocPos.X();
- bFrmDrag = TRUE;
+ bFrmDrag = sal_True;
return;
}
}
@@ -3199,8 +3199,8 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
else if( rSh.IsSelFrmMode() &&
rSh.GetDrawView()->PickHandle( aDocPos ))
{
- bFrmDrag = TRUE;
- bNoInterrupt = FALSE;
+ bFrmDrag = sal_True;
+ bNoInterrupt = sal_False;
return;
}
}
@@ -3220,7 +3220,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
rSh.EnterSelFrmMode( &aDocPos );
SwEditWin::nDDStartPosY = aDocPos.Y();
SwEditWin::nDDStartPosX = aDocPos.X();
- bFrmDrag = TRUE;
+ bFrmDrag = sal_True;
return;
}
}
@@ -3228,8 +3228,8 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
else if( rSh.IsSelFrmMode() &&
rSh.GetDrawView()->PickHandle( aDocPos ))
{
- bFrmDrag = TRUE;
- bNoInterrupt = FALSE;
+ bFrmDrag = sal_True;
+ bNoInterrupt = sal_False;
return;
}
else
@@ -3237,15 +3237,15 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
if ( !rSh.IsAddMode() && !rSh.IsExtMode() && !rSh.IsBlockMode() )
{
rSh.PushMode();
- bModePushed = TRUE;
+ bModePushed = sal_True;
- BOOL bUnLockView = !rSh.IsViewLocked();
- rSh.LockView( TRUE );
+ sal_Bool bUnLockView = !rSh.IsViewLocked();
+ rSh.LockView( sal_True );
rSh.EnterAddMode();
if( bUnLockView )
- rSh.LockView( FALSE );
+ rSh.LockView( sal_False );
}
- bCallBase = FALSE;
+ bCallBase = sal_False;
}
}
break;
@@ -3254,14 +3254,14 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
if ( !rSh.IsAddMode() && !rSh.IsExtMode() && !rSh.IsBlockMode() )
{
rSh.PushMode();
- bModePushed = TRUE;
- BOOL bUnLockView = !rSh.IsViewLocked();
- rSh.LockView( TRUE );
+ bModePushed = sal_True;
+ sal_Bool bUnLockView = !rSh.IsViewLocked();
+ rSh.LockView( sal_True );
rSh.EnterBlockMode();
if( bUnLockView )
- rSh.LockView( FALSE );
+ rSh.LockView( sal_False );
}
- bCallBase = FALSE;
+ bCallBase = sal_False;
}
break;
case KEY_SHIFT:
@@ -3279,7 +3279,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
{
rSh.LeaveSelFrmMode();
rView.AttrChangedNotify(&rSh);
- bFrmDrag = FALSE;
+ bFrmDrag = sal_False;
}
}
else
@@ -3288,7 +3288,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
rSh.EnterSelFrmMode( &aDocPos );
SwEditWin::nDDStartPosY = aDocPos.Y();
SwEditWin::nDDStartPosX = aDocPos.X();
- bFrmDrag = TRUE;
+ bFrmDrag = sal_True;
return;
}
}
@@ -3301,7 +3301,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
rSh.EnterSelFrmMode( &aDocPos );
SwEditWin::nDDStartPosY = aDocPos.Y();
SwEditWin::nDDStartPosX = aDocPos.X();
- bFrmDrag = TRUE;
+ bFrmDrag = sal_True;
return;
}
if ( rSh.IsSelFrmMode() )
@@ -3309,18 +3309,18 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
rSh.UnSelectFrm();
rSh.LeaveSelFrmMode();
rView.AttrChangedNotify(&rSh);
- bFrmDrag = FALSE;
+ bFrmDrag = sal_False;
}
if ( !rSh.IsExtMode() )
{
// keine Selection anfangen, wenn in ein URL-
// Feld oder eine -Grafik geklickt wird
- BOOL bSttSelect = rSh.HasSelection() ||
+ sal_Bool bSttSelect = rSh.HasSelection() ||
Pointer(POINTER_REFHAND) != GetPointer();
if( !bSttSelect )
{
- bSttSelect = TRUE;
+ bSttSelect = sal_True;
if( bExecHyperlinks )
{
SwContentAtPos aCntntAtPos(
@@ -3332,12 +3332,12 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
if( !rSh.IsViewLocked() &&
!rSh.IsReadOnlyAvailable() &&
aCntntAtPos.IsInProtectSect() )
- bLockView = TRUE;
+ bLockView = sal_True;
- bSttSelect = FALSE;
+ bSttSelect = sal_False;
}
else if( rSh.IsURLGrfAtPos( aDocPos ))
- bSttSelect = FALSE;
+ bSttSelect = sal_False;
}
}
@@ -3345,7 +3345,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
rSh.SttSelect();
}
}
- bCallBase = FALSE;
+ bCallBase = sal_False;
break;
}
default:
@@ -3353,10 +3353,10 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
{
SwContentAtPos aCntntAtPos( SwContentAtPos::SW_CLICKFIELD |
SwContentAtPos::SW_INETATTR );
- if( rSh.GetContentAtPos( aDocPos, aCntntAtPos, FALSE ) &&
+ if( rSh.GetContentAtPos( aDocPos, aCntntAtPos, sal_False ) &&
!rSh.IsReadOnlyAvailable() &&
aCntntAtPos.IsInProtectSect() )
- bLockView = TRUE;
+ bLockView = sal_True;
}
}
@@ -3366,19 +3366,19 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
rSh.ClearGCAttr();
}
- BOOL bOverSelect = rSh.ChgCurrPam( aDocPos ), bOverURLGrf = FALSE;
+ sal_Bool bOverSelect = rSh.ChgCurrPam( aDocPos ), bOverURLGrf = sal_False;
if( !bOverSelect )
bOverURLGrf = bOverSelect = 0 != rSh.IsURLGrfAtPos( aDocPos );
if ( !bOverSelect )
{
- const BOOL bTmpNoInterrupt = bNoInterrupt;
- bNoInterrupt = FALSE;
+ const sal_Bool bTmpNoInterrupt = bNoInterrupt;
+ bNoInterrupt = sal_False;
if( !rSh.IsViewLocked() && bLockView )
- rSh.LockView( TRUE );
+ rSh.LockView( sal_True );
else
- bLockView = FALSE;
+ bLockView = sal_False;
int nTmpSetCrsr = 0;
@@ -3387,7 +3387,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
MV_KONTEXT( &rSh );
nTmpSetCrsr = (rSh.*rSh.fnSetCrsr)(&aDocPos,bOnlyText);
bValidCrsrPos = !(CRSR_POSCHG & nTmpSetCrsr);
- bCallBase = FALSE;
+ bCallBase = sal_False;
}
//#i42732# - notify the edit window that from now on we do not use the input language
@@ -3395,7 +3395,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
SetUseInputLanguage( sal_False );
if( bLockView )
- rSh.LockView( FALSE );
+ rSh.LockView( sal_False );
bNoInterrupt = bTmpNoInterrupt;
}
@@ -3414,14 +3414,14 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
if( !rSh.IsFrmSelected() )
rSh.GotoNextFly();
rSh.EnterSelFrmMode();
- bCallBase = FALSE;
+ bCallBase = sal_False;
}
}
// nicht mehr hier zuruecksetzen, damit -- falls durch MouseMove
// bei gedrueckter Ctrl-Taste eine Mehrfachselektion erfolgen soll,
// im Drag nicht die vorherige Selektion aufgehoben wird.
// if(bModePushed)
-// rSh.PopMode(FALSE);
+// rSh.PopMode(sal_False);
break;
}
}
@@ -3441,7 +3441,7 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt)
//ignore key modifiers for format paintbrush
{
- BOOL bExecFormatPaintbrush = pApplyTempl && pApplyTempl->pFormatClipboard
+ sal_Bool bExecFormatPaintbrush = pApplyTempl && pApplyTempl->pFormatClipboard
&& pApplyTempl->pFormatClipboard->HasContent();
if( bExecFormatPaintbrush )
rMEvt = MouseEvent( _rMEvt.GetPosPixel(), _rMEvt.GetClicks(),
@@ -3457,7 +3457,7 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt)
if( pShadCrsr && 0 != (rMEvt.GetModifier() + rMEvt.GetButtons() ) )
delete pShadCrsr, pShadCrsr = 0;
- BOOL bIsDocReadOnly = rView.GetDocShell()->IsReadOnly();
+ sal_Bool bIsDocReadOnly = rView.GetDocShell()->IsReadOnly();
SET_CURR_SHELL( &rSh );
@@ -3496,9 +3496,9 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt)
aVis.Bottom( aVis.Bottom() - aFuzzySz.Height() );
aVis.Left( aVis.Left() + aFuzzySz.Width() );
aVis.Right( aVis.Right() - aFuzzySz.Width() );
- const BOOL bInsWin = aVis.IsInside( aDocPt );
+ const sal_Bool bInsWin = aVis.IsInside( aDocPt );
#else
- const BOOL bInsWin = rSh.VisArea().IsInside( aDocPt );
+ const sal_Bool bInsWin = rSh.VisArea().IsInside( aDocPt );
#endif
if( pShadCrsr && !bInsWin )
@@ -3559,13 +3559,13 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt)
}
}
- BYTE nMouseTabCol;
+ sal_uInt8 nMouseTabCol;
if( !bIsDocReadOnly && bInsWin && !pApplyTempl && !rSh.IsInSelect() )
{
if ( SW_TABCOL_NONE != (nMouseTabCol = rSh.WhichMouseTabCol( aDocPt ) ) &&
!rSh.IsObjSelectable( aDocPt ) )
{
- USHORT nPointer = USHRT_MAX;
+ sal_uInt16 nPointer = USHRT_MAX;
bool bChkTblSel = false;
switch ( nMouseTabCol )
@@ -3618,7 +3618,7 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt)
{
// --> OD 2005-02-21 #i42921# - consider vertical mode
SwTxtNode* pNodeAtPos = rSh.GetNumRuleNodeAtPos( aDocPt );
- const USHORT nPointer =
+ const sal_uInt16 nPointer =
rSh.IsVerticalModeAtNdAndPos( *pNodeAtPos, aDocPt )
? POINTER_VSIZEBAR
: POINTER_HSIZEBAR;
@@ -3629,7 +3629,7 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt)
}
}
- BOOL bDelShadCrsr = TRUE;
+ sal_Bool bDelShadCrsr = sal_True;
switch ( rMEvt.GetModifier() + rMEvt.GetButtons() )
{
@@ -3682,10 +3682,10 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt)
EnterArea();
if ( rView.GetDrawFuncPtr() )
{
- pSdrView->SetOrtho(FALSE);
+ pSdrView->SetOrtho(sal_False);
rView.GetDrawFuncPtr()->MouseMove( rMEvt );
}
- bIsInMove = TRUE;
+ bIsInMove = sal_True;
}
return;
}
@@ -3716,7 +3716,7 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt)
eSdrMoveHdl = pHdl ? pHdl->GetKind() : HDL_MOVE;
}
- USHORT nEvent = HDL_MOVE == eSdrMoveHdl
+ sal_uInt16 nEvent = HDL_MOVE == eSdrMoveHdl
? SW_EVENT_FRM_MOVE
: SW_EVENT_FRM_RESIZE;
@@ -3729,7 +3729,7 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt)
aRszMvHdlPt != aDocPt )
{
aRszMvHdlPt = aDocPt;
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
String sRet;
SbxArrayRef xArgs = new SbxArray;
SbxVariableRef xVar = new SbxVariable;
@@ -3739,7 +3739,7 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt)
if( SW_EVENT_FRM_RESIZE == nEvent )
{
xVar = new SbxVariable;
- xVar->PutUShort( static_cast< UINT16 >(eSdrMoveHdl) );
+ xVar->PutUShort( static_cast< sal_uInt16 >(eSdrMoveHdl) );
xArgs->Put( &xVar, ++nPos );
}
@@ -3767,17 +3767,17 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt)
if ( rMEvt.IsShift() )
{
- pSdrView->SetOrtho(TRUE);
- pSdrView->SetAngleSnapEnabled(TRUE);
+ pSdrView->SetOrtho(sal_True);
+ pSdrView->SetAngleSnapEnabled(sal_True);
}
else
{
- pSdrView->SetOrtho(FALSE);
- pSdrView->SetAngleSnapEnabled(FALSE);
+ pSdrView->SetOrtho(sal_False);
+ pSdrView->SetAngleSnapEnabled(sal_False);
}
(rSh.*rSh.fnDrag)( &aDocPt, rMEvt.IsShift() );
- bIsInMove = TRUE;
+ bIsInMove = sal_True;
}
else if( bIsDocReadOnly )
break;
@@ -3799,9 +3799,9 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt)
if ( pSdrView )
{
if ( rMEvt.IsShift() )
- pSdrView->SetOrtho(TRUE);
+ pSdrView->SetOrtho(sal_True);
else
- pSdrView->SetOrtho(FALSE);
+ pSdrView->SetOrtho(sal_False);
}
if ( !bInsWin )
{
@@ -3819,14 +3819,14 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt)
rMEvt.GetModifier() + rMEvt.GetButtons() ) &&
rSh.Is_FnDragEQBeginDrag() && !rSh.IsAddMode() ))
{
- (rSh.*rSh.fnDrag)( &aDocPt,FALSE );
+ (rSh.*rSh.fnDrag)( &aDocPt,sal_False );
- bValidCrsrPos = !(CRSR_POSCHG & (rSh.*rSh.fnSetCrsr)(&aDocPt,FALSE));
+ bValidCrsrPos = !(CRSR_POSCHG & (rSh.*rSh.fnSetCrsr)(&aDocPt,sal_False));
EnterArea();
}
}
}
- bDDINetAttr = FALSE;
+ bDDINetAttr = sal_False;
break;
case 0:
{
@@ -3839,7 +3839,7 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt)
// TODO: do the same thing for redlines SW_REDLINE
SwRect aFldRect;
SwContentAtPos aCntntAtPos( SwContentAtPos::SW_FIELD);
- if( rSh.GetContentAtPos( aDocPt, aCntntAtPos, FALSE, &aFldRect ) )
+ if( rSh.GetContentAtPos( aDocPt, aCntntAtPos, sal_False, &aFldRect ) )
{
const SwField* pFld = aCntntAtPos.aFnd.pFld;
if (pFld->Which()== RES_POSTITFLD)
@@ -3858,7 +3858,7 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt)
case KEY_MOD1:
if ( !bInsDraw )
{
- BOOL bTstShdwCrsr = TRUE;
+ sal_Bool bTstShdwCrsr = sal_True;
UpdatePointer( aDocPt, rMEvt.GetModifier() );
@@ -3873,7 +3873,7 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt)
if( pINet ||
0 != ( pTmp = pFmt = rSh.GetFmtFromAnyObj( aDocPt )))
{
- bTstShdwCrsr = FALSE;
+ bTstShdwCrsr = sal_False;
if( pTmp == pINet )
aSaveCallEvent.Set( pINet );
else
@@ -3891,7 +3891,7 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt)
{
if( aLastCallEvent.HasEvent() )
rSh.CallEvent( SFX_EVENT_MOUSEOUT_OBJECT,
- aLastCallEvent, TRUE );
+ aLastCallEvent, sal_True );
// 0 besagt, das das Object gar keine Tabelle hat
if( !rSh.CallEvent( SFX_EVENT_MOUSEOVER_OBJECT,
aSaveCallEvent ))
@@ -3902,7 +3902,7 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt)
{
// Cursor stand auf einem Object
rSh.CallEvent( SFX_EVENT_MOUSEOUT_OBJECT,
- aLastCallEvent, TRUE );
+ aLastCallEvent, sal_True );
}
if( bTstShdwCrsr && bInsWin && !bIsDocReadOnly &&
@@ -3922,8 +3922,8 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt)
SwViewOption::GetDirectCursorColor() );
if( text::HoriOrientation::RIGHT != eOrient && text::HoriOrientation::CENTER != eOrient )
eOrient = text::HoriOrientation::LEFT;
- pShadCrsr->SetPos( aRect.Pos(), aRect.Height(), static_cast< USHORT >(eOrient) );
- bDelShadCrsr = FALSE;
+ pShadCrsr->SetPos( aRect.Pos(), aRect.Height(), static_cast< sal_uInt16 >(eOrient) );
+ bDelShadCrsr = sal_False;
}
}
}
@@ -3931,8 +3931,8 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt)
case MOUSE_LEFT + KEY_MOD2:
if( rSh.IsBlockMode() && !rMEvt.IsSynthetic() )
{
- (rSh.*rSh.fnDrag)( &aDocPt,FALSE );
- bValidCrsrPos = !(CRSR_POSCHG & (rSh.*rSh.fnSetCrsr)(&aDocPt,FALSE));
+ (rSh.*rSh.fnDrag)( &aDocPt,sal_False );
+ bValidCrsrPos = !(CRSR_POSCHG & (rSh.*rSh.fnSetCrsr)(&aDocPt,sal_False));
EnterArea();
}
break;
@@ -3940,7 +3940,7 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt)
if( bDelShadCrsr && pShadCrsr )
delete pShadCrsr, pShadCrsr = 0;
- bWasShdwCrsr = FALSE;
+ bWasShdwCrsr = sal_False;
}
/*--------------------------------------------------------------------
@@ -3950,10 +3950,10 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt)
void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
{
- BOOL bCallBase = TRUE;
+ sal_Bool bCallBase = sal_True;
- BOOL bCallShadowCrsr = bWasShdwCrsr;
- bWasShdwCrsr = FALSE;
+ sal_Bool bCallShadowCrsr = bWasShdwCrsr;
+ bWasShdwCrsr = sal_False;
if( pShadCrsr )
delete pShadCrsr, pShadCrsr = 0;
@@ -3964,7 +3964,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
eSdrMoveHdl = HDL_USER; // fuer die MoveEvents - wieder zuruecksetzen
// sicherheitshalber zuruecksetzen Bug 27900
- rView.SetTabColFromDoc( FALSE );
+ rView.SetTabColFromDoc( sal_False );
rView.SetNumRuleNodeFromDoc(NULL);
SwWrtShell &rSh = rView.GetWrtShell();
@@ -3972,11 +3972,11 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
SdrView *pSdrView = rSh.GetDrawView();
if ( pSdrView )
{
- pSdrView->SetOrtho(FALSE);
+ pSdrView->SetOrtho(sal_False);
if ( pSdrView->MouseButtonUp( rMEvt,this ) )
{
- rSh.GetView().GetViewFrame()->GetBindings().InvalidateAll(FALSE);
+ rSh.GetView().GetViewFrame()->GetBindings().InvalidateAll(sal_False);
return; // Event von der SdrView ausgewertet
}
}
@@ -3995,13 +3995,13 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
if ( bDDTimerStarted )
{
StopDDTimer( &rSh, aDocPt );
- bMBPressed = FALSE;
+ bMBPressed = sal_False;
if ( rSh.IsSelFrmMode() )
{
- (rSh.*rSh.fnEndDrag)( &aDocPt, FALSE );
- bFrmDrag = FALSE;
+ (rSh.*rSh.fnEndDrag)( &aDocPt, sal_False );
+ bFrmDrag = sal_False;
}
- bNoInterrupt = FALSE;
+ bNoInterrupt = sal_False;
ReleaseMouse();
return;
}
@@ -4012,7 +4012,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
//OLMpSdrView->RefreshAllIAOManagers();
DELETEZ( pAnchorMarker );
if( aPnt.X() || aPnt.Y() )
- rSh.FindAnchorPos( aPnt, TRUE );
+ rSh.FindAnchorPos( aPnt, sal_True );
}
if ( bInsDraw && rView.GetDrawFuncPtr() )
{
@@ -4035,7 +4035,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
{
rSh.EnterSelFrmMode();
if (!rView.GetDrawFuncPtr())
- StdDrawMode( OBJ_NONE, TRUE );
+ StdDrawMode( OBJ_NONE, sal_True );
}
else if ( rSh.IsFrmSelected() )
{
@@ -4045,7 +4045,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
else
{
const Point aDocPos( PixelToLogic( aStartPos ) );
- bValidCrsrPos = !(CRSR_POSCHG & (rSh.*rSh.fnSetCrsr)(&aDocPos,FALSE));
+ bValidCrsrPos = !(CRSR_POSCHG & (rSh.*rSh.fnSetCrsr)(&aDocPos,sal_False));
rSh.Edit();
}
@@ -4054,17 +4054,17 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
else if (rMEvt.GetButtons() == MOUSE_RIGHT && rSh.IsDrawCreate())
rView.GetDrawFuncPtr()->BreakCreate(); // Zeichnen abbrechen
- bNoInterrupt = FALSE;
+ bNoInterrupt = sal_False;
ReleaseMouse();
return;
}
- BOOL bPopMode = FALSE;
+ sal_Bool bPopMode = sal_False;
switch ( rMEvt.GetModifier() + rMEvt.GetButtons() )
{
case MOUSE_LEFT:
if ( bInsDraw && rSh.IsDrawCreate() )
{
- if ( rView.GetDrawFuncPtr() && rView.GetDrawFuncPtr()->MouseButtonUp(rMEvt) == TRUE )
+ if ( rView.GetDrawFuncPtr() && rView.GetDrawFuncPtr()->MouseButtonUp(rMEvt) == sal_True )
{
rView.GetDrawFuncPtr()->Deactivate();
rView.AttrChangedNotify( &rSh );
@@ -4073,7 +4073,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
if ( rView.GetDrawFuncPtr() && bInsFrm )
StopInsFrm();
}
- bCallBase = FALSE;
+ bCallBase = sal_False;
break;
}
case MOUSE_LEFT + KEY_MOD1:
@@ -4103,12 +4103,12 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
if ( aSttPt != aEndPt )
{
rSh.StartUndo( UNDO_UI_DRAG_AND_COPY );
- rSh.Copy(&rSh, aSttPt, aEndPt, FALSE);
+ rSh.Copy(&rSh, aSttPt, aEndPt, sal_False);
rSh.EndUndo( UNDO_UI_DRAG_AND_COPY );
}
}
else
- (rSh.*rSh.fnEndDrag)( &aDocPt,FALSE );
+ (rSh.*rSh.fnEndDrag)( &aDocPt,sal_False );
}
else
{
@@ -4116,7 +4116,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
const SwFrmFmt* pFlyFmt;
const SvxMacro* pMacro;
- USHORT nEvent = HDL_MOVE == eOldSdrMoveHdl
+ sal_uInt16 nEvent = HDL_MOVE == eOldSdrMoveHdl
? SW_EVENT_FRM_MOVE
: SW_EVENT_FRM_RESIZE;
@@ -4126,7 +4126,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
{
const Point aSttPt( PixelToLogic( aStartPos ) );
aRszMvHdlPt = aDocPt;
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
SbxArrayRef xArgs = new SbxArray;
SbxVariableRef xVar = new SbxVariable;
xVar->PutString( pFlyFmt->GetName() );
@@ -4135,7 +4135,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
if( SW_EVENT_FRM_RESIZE == nEvent )
{
xVar = new SbxVariable;
- xVar->PutUShort( static_cast< UINT16 >(eOldSdrMoveHdl) );
+ xVar->PutUShort( static_cast< sal_uInt16 >(eOldSdrMoveHdl) );
xArgs->Put( &xVar, ++nPos );
}
@@ -4157,21 +4157,21 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
CaptureMouse();
}
}
- (rSh.*rSh.fnEndDrag)( &aDocPt,FALSE );
+ (rSh.*rSh.fnEndDrag)( &aDocPt,sal_False );
}
- bFrmDrag = FALSE;
- bCallBase = FALSE;
+ bFrmDrag = sal_False;
+ bCallBase = sal_False;
break;
}
- bPopMode = TRUE;
+ bPopMode = sal_True;
// no break
case MOUSE_LEFT + KEY_SHIFT:
if (rSh.IsSelFrmMode())
{
- (rSh.*rSh.fnEndDrag)( &aDocPt, FALSE );
- bFrmDrag = FALSE;
- bCallBase = FALSE;
+ (rSh.*rSh.fnEndDrag)( &aDocPt, sal_False );
+ bFrmDrag = sal_False;
+ bCallBase = sal_False;
break;
}
@@ -4179,63 +4179,63 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
{
//JP 27.04.99: Bug 65389 - das EndDrag sollte auf jedenfall
// gerufen werden.
- bHoldSelection = FALSE;
- (rSh.*rSh.fnEndDrag)( &aDocPt, FALSE );
+ bHoldSelection = sal_False;
+ (rSh.*rSh.fnEndDrag)( &aDocPt, sal_False );
}
else
{
if ( !rSh.IsInSelect() && rSh.ChgCurrPam( aDocPt ) )
{
- const BOOL bTmpNoInterrupt = bNoInterrupt;
- bNoInterrupt = FALSE;
+ const sal_Bool bTmpNoInterrupt = bNoInterrupt;
+ bNoInterrupt = sal_False;
{ // nur temp. Move-Kontext aufspannen, da sonst die
// Abfrage auf die Inhaltsform nicht funktioniert!!!
MV_KONTEXT( &rSh );
const Point aDocPos( PixelToLogic( aStartPos ) );
- bValidCrsrPos = !(CRSR_POSCHG & (rSh.*rSh.fnSetCrsr)(&aDocPos,FALSE));
+ bValidCrsrPos = !(CRSR_POSCHG & (rSh.*rSh.fnSetCrsr)(&aDocPos,sal_False));
}
bNoInterrupt = bTmpNoInterrupt;
}
else
{
- BOOL bInSel = rSh.IsInSelect();
- (rSh.*rSh.fnEndDrag)( &aDocPt, FALSE );
+ sal_Bool bInSel = rSh.IsInSelect();
+ (rSh.*rSh.fnEndDrag)( &aDocPt, sal_False );
// Internetfield? --> Link-Callen (DocLaden!!)
//JP 18.10.96: Bug 32437 -
// if( !rSh.HasSelection() )
if( !bInSel )
{
- USHORT nFilter = URLLOAD_NOFILTER;
+ sal_uInt16 nFilter = URLLOAD_NOFILTER;
if( KEY_MOD1 == rMEvt.GetModifier() )
nFilter |= URLLOAD_NEWVIEW;
- BOOL bExecHyperlinks = rView.GetDocShell()->IsReadOnly();
+ sal_Bool bExecHyperlinks = rView.GetDocShell()->IsReadOnly();
if ( !bExecHyperlinks )
{
SvtSecurityOptions aSecOpts;
- const BOOL bSecureOption = aSecOpts.IsOptionSet( SvtSecurityOptions::E_CTRLCLICK_HYPERLINK );
+ const sal_Bool bSecureOption = aSecOpts.IsOptionSet( SvtSecurityOptions::E_CTRLCLICK_HYPERLINK );
if ( ( bSecureOption && rMEvt.GetModifier() == KEY_MOD1 ) ||
( !bSecureOption && rMEvt.GetModifier() != KEY_MOD1 ) )
- bExecHyperlinks = TRUE;
+ bExecHyperlinks = sal_True;
}
- const BOOL bExecSmarttags = rMEvt.GetModifier() == KEY_MOD1;
+ const sal_Bool bExecSmarttags = rMEvt.GetModifier() == KEY_MOD1;
if(pApplyTempl)
- bExecHyperlinks = FALSE;
+ bExecHyperlinks = sal_False;
SwContentAtPos aCntntAtPos( SwContentAtPos::SW_CLICKFIELD |
SwContentAtPos::SW_INETATTR |
SwContentAtPos::SW_SMARTTAG | SwContentAtPos::SW_FORMCTRL);
- if( rSh.GetContentAtPos( aDocPt, aCntntAtPos, TRUE ) )
+ if( rSh.GetContentAtPos( aDocPt, aCntntAtPos, sal_True ) )
{
- BOOL bViewLocked = rSh.IsViewLocked();
+ sal_Bool bViewLocked = rSh.IsViewLocked();
if( !bViewLocked && !rSh.IsReadOnlyAvailable() &&
aCntntAtPos.IsInProtectSect() )
- rSh.LockView( TRUE );
+ rSh.LockView( sal_True );
ReleaseMouse();
@@ -4279,12 +4279,12 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
}
rSh.LockView( bViewLocked );
- bCallShadowCrsr = FALSE;
+ bCallShadowCrsr = sal_False;
}
else
{
aCntntAtPos = SwContentAtPos( SwContentAtPos::SW_FTN );
- if( !rSh.GetContentAtPos( aDocPt, aCntntAtPos, TRUE ) && bExecHyperlinks )
+ if( !rSh.GetContentAtPos( aDocPt, aCntntAtPos, sal_True ) && bExecHyperlinks )
{
SdrViewEvent aVEvt;
@@ -4301,14 +4301,14 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
String sTarget(pField->GetTargetFrame());
::LoadURL( sURL, &rSh, nFilter, &sTarget);
}
- bCallShadowCrsr = FALSE;
+ bCallShadowCrsr = sal_False;
}
else
{
// Grafik getroffen
ReleaseMouse();
if( rSh.ClickToINetGrf( aDocPt, nFilter ))
- bCallShadowCrsr = FALSE;
+ bCallShadowCrsr = sal_False;
}
}
}
@@ -4320,14 +4320,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;
}
@@ -4335,8 +4341,8 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
if ( bPopMode && bModePushed )
{
rSh.PopMode();
- bModePushed = FALSE;
- bCallBase = FALSE;
+ bModePushed = sal_False;
+ bCallBase = sal_False;
}
break;
@@ -4374,7 +4380,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
}
else if( pApplyTempl->nColor )
{
- USHORT nId = 0;
+ sal_uInt16 nId = 0;
switch( pApplyTempl->nColor )
{
case SID_ATTR_CHAR_COLOR_EXT:
@@ -4401,8 +4407,8 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
rSh.EnterStdMode();
rSh.SetVisCrsr(aDocPt);
- pApplyTempl->bUndo = TRUE;
- bCallBase = FALSE;
+ pApplyTempl->bUndo = sal_True;
+ bCallBase = sal_False;
aTemplateTimer.Stop();
}
else if(rMEvt.GetClicks() == 1)
@@ -4422,8 +4428,8 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
& eSelection ) && !rSh.HasReadonlySel() )
{
rSh.SetTxtFmtColl( pApplyTempl->aColl.pTxtColl );
- pApplyTempl->bUndo = TRUE;
- bCallBase = FALSE;
+ pApplyTempl->bUndo = sal_True;
+ bCallBase = sal_False;
if ( pApplyTempl->aColl.pTxtColl )
aStyleName = pApplyTempl->aColl.pTxtColl->GetName();
}
@@ -4436,8 +4442,8 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
rSh.UnSetVisCrsr();
rSh.EnterStdMode();
rSh.SetVisCrsr(aDocPt);
- pApplyTempl->bUndo = TRUE;
- bCallBase = FALSE;
+ pApplyTempl->bUndo = sal_True;
+ bCallBase = sal_False;
if ( pApplyTempl->aColl.pCharFmt )
aStyleName = pApplyTempl->aColl.pCharFmt->GetName();
}
@@ -4447,9 +4453,9 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
const SwFrmFmt* pFmt = rSh.GetFmtFromObj( aDocPt );
if(PTR_CAST(SwFlyFrmFmt, pFmt))
{
- rSh.SetFrmFmt( pApplyTempl->aColl.pFrmFmt, FALSE, &aDocPt );
- pApplyTempl->bUndo = TRUE;
- bCallBase = FALSE;
+ rSh.SetFrmFmt( pApplyTempl->aColl.pFrmFmt, sal_False, &aDocPt );
+ pApplyTempl->bUndo = sal_True;
+ bCallBase = sal_False;
if( pApplyTempl->aColl.pFrmFmt )
aStyleName = pApplyTempl->aColl.pFrmFmt->GetName();
}
@@ -4460,7 +4466,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
rSh.ChgCurPageDesc( *pApplyTempl->aColl.pPageDesc );
if ( pApplyTempl->aColl.pPageDesc )
aStyleName = pApplyTempl->aColl.pPageDesc->GetName();
- bCallBase = FALSE;
+ bCallBase = sal_False;
break;
case SFX_STYLE_FAMILY_PSEUDO:
if( !rSh.HasReadonlySel() )
@@ -4470,8 +4476,8 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
false,
pApplyTempl->aColl.pNumRule->GetDefaultListId() );
// <--
- bCallBase = FALSE;
- pApplyTempl->bUndo = TRUE;
+ bCallBase = sal_False;
+ pApplyTempl->bUndo = sal_True;
if( pApplyTempl->aColl.pNumRule )
aStyleName = pApplyTempl->aColl.pNumRule->GetName();
}
@@ -4487,7 +4493,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
{
SfxRequest aReq( rView.GetViewFrame(), SID_STYLE_APPLY );
aReq.AppendItem( SfxStringItem( SID_STYLE_APPLY, aStyleName ) );
- aReq.AppendItem( SfxUInt16Item( SID_STYLE_FAMILY, (USHORT) pApplyTempl->eType ) );
+ aReq.AppendItem( SfxUInt16Item( SID_STYLE_FAMILY, (sal_uInt16) pApplyTempl->eType ) );
aReq.Done();
}
}
@@ -4497,12 +4503,12 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
ReleaseMouse();
// Hier kommen nur verarbeitete MouseEvents an; nur bei diesen duerfen
// die Modi zurueckgesetzt werden.
- bMBPressed = FALSE;
+ bMBPressed = sal_False;
//sicherheitshalber aufrufen, da jetzt das Selektieren bestimmt zu Ende ist.
//Andernfalls koennte der Timeout des Timers Kummer machen.
EnterArea();
- bNoInterrupt = FALSE;
+ bNoInterrupt = sal_False;
if (bCallBase)
Window::MouseButtonUp(rMEvt);
@@ -4516,7 +4522,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
void SwEditWin::SetApplyTemplate(const SwApplyTemplate &rTempl)
{
- static BOOL bIdle = FALSE;
+ static sal_Bool bIdle = sal_False;
DELETEZ(pApplyTempl);
SwWrtShell &rSh = rView.GetWrtShell();
@@ -4524,25 +4530,25 @@ void SwEditWin::SetApplyTemplate(const SwApplyTemplate &rTempl)
{
pApplyTempl = new SwApplyTemplate( rTempl );
SetPointer( POINTER_FILL );//@todo #i20119# maybe better a new brush pointer here in future
- rSh.NoEdit( FALSE );
+ rSh.NoEdit( sal_False );
bIdle = rSh.GetViewOptions()->IsIdle();
- ((SwViewOption *)rSh.GetViewOptions())->SetIdle( FALSE );
+ ((SwViewOption *)rSh.GetViewOptions())->SetIdle( sal_False );
}
else if(rTempl.nColor)
{
pApplyTempl = new SwApplyTemplate( rTempl );
SetPointer( POINTER_FILL );
- rSh.NoEdit( FALSE );
+ rSh.NoEdit( sal_False );
bIdle = rSh.GetViewOptions()->IsIdle();
- ((SwViewOption *)rSh.GetViewOptions())->SetIdle( FALSE );
+ ((SwViewOption *)rSh.GetViewOptions())->SetIdle( sal_False );
}
else if( rTempl.eType )
{
pApplyTempl = new SwApplyTemplate( rTempl );
SetPointer( POINTER_FILL );
- rSh.NoEdit( FALSE );
+ rSh.NoEdit( sal_False );
bIdle = rSh.GetViewOptions()->IsIdle();
- ((SwViewOption *)rSh.GetViewOptions())->SetIdle( FALSE );
+ ((SwViewOption *)rSh.GetViewOptions())->SetIdle( sal_False );
}
else
{
@@ -4554,7 +4560,7 @@ void SwEditWin::SetApplyTemplate(const SwApplyTemplate &rTempl)
rSh.Edit();
}
- static USHORT __READONLY_DATA aInva[] =
+ static sal_uInt16 __READONLY_DATA aInva[] =
{
SID_STYLE_WATERCAN,
SID_ATTR_CHAR_COLOR_EXT,
@@ -4592,8 +4598,8 @@ SwEditWin::SwEditWin(Window *pParent, SwView &rMyView):
nInsFrmColCount( 1 ),
eDrawMode(OBJ_NONE),
- bLockInput(FALSE),
- bObjectSelect( FALSE ),
+ bLockInput(sal_False),
+ bObjectSelect( sal_False ),
nKS_NUMDOWN_Count(0), // #i23725#
nKS_NUMINDENTINC_Count(0) // #i23725#
{
@@ -4602,7 +4608,7 @@ SwEditWin::SwEditWin(Window *pParent, SwView &rMyView):
SetDialogControlFlags( WINDOW_DLGCTRL_RETURN | WINDOW_DLGCTRL_WANTFOCUS );
bLinkRemoved = bMBPressed = bInsDraw = bInsFrm =
- bIsInDrag = bOldIdle = bOldIdleSet = bChainMode = bWasShdwCrsr = FALSE;
+ bIsInDrag = bOldIdle = bOldIdleSet = bChainMode = bWasShdwCrsr = sal_False;
//#i42732# initially use the input language
bUseInputLanguage = sal_True;
@@ -4611,7 +4617,7 @@ SwEditWin::SwEditWin(Window *pParent, SwView &rMyView):
SetPointer( POINTER_TEXT );
aTimer.SetTimeoutHdl(LINK(this, SwEditWin, TimerHandler));
- bTblInsDelMode = FALSE;
+ bTblInsDelMode = sal_False;
aKeyInputTimer.SetTimeout( 3000 );
aKeyInputTimer.SetTimeoutHdl(LINK(this, SwEditWin, KeyInputTimerHandler));
@@ -4642,7 +4648,7 @@ SwEditWin::~SwEditWin()
delete pRowColumnSelectionStart;
if( pQuickHlpData->bClear && rView.GetWrtShellPtr() )
pQuickHlpData->Stop( rView.GetWrtShell() );
- bExecuteDrag = FALSE;
+ bExecuteDrag = sal_False;
delete pApplyTempl;
rView.SetDrawFuncPtr(NULL);
@@ -4662,7 +4668,7 @@ SwEditWin::~SwEditWin()
void SwEditWin::EnterDrawTextMode( const Point& aDocPos )
{
- if ( rView.EnterDrawTextMode(aDocPos) == TRUE )
+ if ( rView.EnterDrawTextMode(aDocPos) == sal_True )
{
if (rView.GetDrawFuncPtr())
{
@@ -4681,7 +4687,7 @@ void SwEditWin::EnterDrawTextMode( const Point& aDocPos )
-BOOL SwEditWin::EnterDrawMode(const MouseEvent& rMEvt, const Point& aDocPos)
+sal_Bool SwEditWin::EnterDrawMode(const MouseEvent& rMEvt, const Point& aDocPos)
{
SwWrtShell &rSh = rView.GetWrtShell();
SdrView *pSdrView = rSh.GetDrawView();
@@ -4690,17 +4696,17 @@ BOOL SwEditWin::EnterDrawMode(const MouseEvent& rMEvt, const Point& aDocPos)
if ( rView.GetDrawFuncPtr() )
{
if (rSh.IsDrawCreate())
- return TRUE;
+ return sal_True;
- BOOL bRet = rView.GetDrawFuncPtr()->MouseButtonDown( rMEvt );
+ sal_Bool bRet = rView.GetDrawFuncPtr()->MouseButtonDown( rMEvt );
rView.AttrChangedNotify( &rSh );
return bRet;
}
if ( pSdrView && pSdrView->IsTextEdit() )
{
- BOOL bUnLockView = !rSh.IsViewLocked();
- rSh.LockView( TRUE );
+ sal_Bool bUnLockView = !rSh.IsViewLocked();
+ rSh.LockView( sal_True );
rSh.EndTextEdit(); // Danebengeklickt, Ende mit Edit
rSh.SelectObj( aDocPos );
@@ -4710,14 +4716,14 @@ BOOL SwEditWin::EnterDrawMode(const MouseEvent& rMEvt, const Point& aDocPos)
{
SwEditWin::nDDStartPosY = aDocPos.Y();
SwEditWin::nDDStartPosX = aDocPos.X();
- bFrmDrag = TRUE;
+ bFrmDrag = sal_True;
}
if( bUnLockView )
- rSh.LockView( FALSE );
+ rSh.LockView( sal_False );
rView.AttrChangedNotify( &rSh );
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
/******************************************************************************
@@ -4726,9 +4732,9 @@ BOOL SwEditWin::EnterDrawMode(const MouseEvent& rMEvt, const Point& aDocPos)
-BOOL SwEditWin::IsDrawSelMode()
+sal_Bool SwEditWin::IsDrawSelMode()
{
-// return (IsFrmAction() == FALSE && GetSdrDrawMode() == OBJ_NONE);
+// return (IsFrmAction() == sal_False && GetSdrDrawMode() == OBJ_NONE);
return IsObjectSelect();
}
@@ -4789,20 +4795,20 @@ void SwEditWin::Command( const CommandEvent& rCEvt )
// windows and code on the stack.
// For more information, see #126086# and #128122#
SfxInPlaceClient* pIPClient = rSh.GetSfxViewShell()->GetIPClient();
- BOOL bIsOleActive = ( pIPClient && pIPClient->IsObjectInPlaceActive() );
+ sal_Bool bIsOleActive = ( pIPClient && pIPClient->IsObjectInPlaceActive() );
if ( bIsOleActive && ( rCEvt.GetCommand() == COMMAND_CONTEXTMENU ))
{
rSh.FinishOLEObj();
return;
}
- BOOL bCallBase = TRUE;
+ sal_Bool bCallBase = sal_True;
switch ( rCEvt.GetCommand() )
{
case COMMAND_CONTEXTMENU:
{
- const USHORT nId = SwInputChild::GetChildWindowId();
+ const sal_uInt16 nId = SwInputChild::GetChildWindowId();
SwInputChild* pChildWin = (SwInputChild*)GetView().GetViewFrame()->
GetChildWindow( nId );
@@ -4815,11 +4821,11 @@ void SwEditWin::Command( const CommandEvent& rCEvt )
SET_CURR_SHELL( &rSh );
if (!pApplyTempl)
{
- if (bNoInterrupt == TRUE)
+ if (bNoInterrupt == sal_True)
{
ReleaseMouse();
- bNoInterrupt = FALSE;
- bMBPressed = FALSE;
+ bNoInterrupt = sal_False;
+ bMBPressed = sal_False;
}
Point aDocPos( PixelToLogic( rCEvt.GetMousePosPixel() ) );
if ( !rCEvt.IsMouseEvent() )
@@ -4847,7 +4853,7 @@ void SwEditWin::Command( const CommandEvent& rCEvt )
{
if ( pMenu )
{
- USHORT nExecId = ((PopupMenu*)pMenu)->Execute(this, aPixPos);
+ sal_uInt16 nExecId = ((PopupMenu*)pMenu)->Execute(this, aPixPos);
if( !::ExecuteMenuCommand( *static_cast<PopupMenu*>(pMenu), *rView.GetViewFrame(), nExecId ))
pROPopup->Execute(this, nExecId);
}
@@ -4861,7 +4867,7 @@ void SwEditWin::Command( const CommandEvent& rCEvt )
}
else if (pApplyTempl->bUndo)
rSh.Do(SwWrtShell::UNDO);
- bCallBase = FALSE;
+ bCallBase = sal_False;
}
}
break;
@@ -4879,7 +4885,7 @@ void SwEditWin::Command( const CommandEvent& rCEvt )
//ggf. an Outliner weiterleiten
if ( rSh.HasDrawView() && rSh.GetDrawView()->IsTextEdit() )
{
- bCallBase = FALSE;
+ bCallBase = sal_False;
rSh.GetDrawView()->GetTextEditOutlinerView()->Command( rCEvt );
break;
}
@@ -4889,7 +4895,7 @@ void SwEditWin::Command( const CommandEvent& rCEvt )
break;
- USHORT nSlotId = 0;
+ sal_uInt16 nSlotId = 0;
SfxPoolItem *pItem = 0;
switch ( pCData->GetCommand() )
@@ -4948,7 +4954,7 @@ void SwEditWin::Command( const CommandEvent& rCEvt )
}
if ( nSlotId )
{
- bCallBase = FALSE;
+ bCallBase = sal_False;
if ( pItem )
{
const SfxPoolItem* aArgs[2];
@@ -4966,13 +4972,13 @@ void SwEditWin::Command( const CommandEvent& rCEvt )
case COMMAND_STARTEXTTEXTINPUT:
{
- BOOL bIsDocReadOnly = rView.GetDocShell()->IsReadOnly() &&
+ sal_Bool bIsDocReadOnly = rView.GetDocShell()->IsReadOnly() &&
rSh.IsCrsrReadonly();
if(!bIsDocReadOnly)
{
if( rSh.HasDrawView() && rSh.GetDrawView()->IsTextEdit() )
{
- bCallBase = FALSE;
+ bCallBase = sal_False;
rSh.GetDrawView()->GetTextEditOutlinerView()->Command( rCEvt );
}
else
@@ -4980,7 +4986,7 @@ void SwEditWin::Command( const CommandEvent& rCEvt )
if( rSh.HasSelection() )
rSh.DelRight();
- bCallBase = FALSE;
+ bCallBase = sal_False;
LanguageType eInputLanguage = GetInputLanguage();
rSh.CreateExtTextInput(eInputLanguage);
}
@@ -4989,18 +4995,18 @@ void SwEditWin::Command( const CommandEvent& rCEvt )
}
case COMMAND_ENDEXTTEXTINPUT:
{
- BOOL bIsDocReadOnly = rView.GetDocShell()->IsReadOnly() &&
+ sal_Bool bIsDocReadOnly = rView.GetDocShell()->IsReadOnly() &&
rSh.IsCrsrReadonly();
if(!bIsDocReadOnly)
{
if( rSh.HasDrawView() && rSh.GetDrawView()->IsTextEdit() )
{
- bCallBase = FALSE;
+ bCallBase = sal_False;
rSh.GetDrawView()->GetTextEditOutlinerView()->Command( rCEvt );
}
else
{
- bCallBase = FALSE;
+ bCallBase = sal_False;
String sRecord = rSh.DeleteExtTextInput();
uno::Reference< frame::XDispatchRecorder > xRecorder =
rView.GetViewFrame()->GetBindings().GetRecorder();
@@ -5040,7 +5046,7 @@ void SwEditWin::Command( const CommandEvent& rCEvt )
break;
case COMMAND_EXTTEXTINPUT:
{
- BOOL bIsDocReadOnly = rView.GetDocShell()->IsReadOnly() &&
+ sal_Bool bIsDocReadOnly = rView.GetDocShell()->IsReadOnly() &&
rSh.IsCrsrReadonly();
if(!bIsDocReadOnly)
{
@@ -5053,7 +5059,7 @@ void SwEditWin::Command( const CommandEvent& rCEvt )
String sWord;
if( rSh.HasDrawView() && rSh.GetDrawView()->IsTextEdit() )
{
- bCallBase = FALSE;
+ bCallBase = sal_False;
rSh.GetDrawView()->GetTextEditOutlinerView()->Command( rCEvt );
}
else
@@ -5062,7 +5068,7 @@ void SwEditWin::Command( const CommandEvent& rCEvt )
if( pData )
{
sWord = pData->GetText();
- bCallBase = FALSE;
+ bCallBase = sal_False;
rSh.SetExtTextInputData( *pData );
}
}
@@ -5095,8 +5101,8 @@ void SwEditWin::Command( const CommandEvent& rCEvt )
if( !aDataHelper.GetXTransferable().is() )
break;
- ULONG nDropFormat;
- USHORT nEventAction, nDropAction, nDropDestination;
+ sal_uLong nDropFormat;
+ sal_uInt16 nEventAction, nDropAction, nDropDestination;
nDropDestination = GetDropDestination( rCEvt.GetMousePosPixel() );
if( !nDropDestination )
break;
@@ -5110,9 +5116,9 @@ void SwEditWin::Command( const CommandEvent& rCEvt )
{
const Point aDocPt( PixelToLogic( rCEvt.GetMousePosPixel() ) );
SwTransferable::PasteData( aDataHelper, rSh, nDropAction,
- nDropFormat, nDropDestination, FALSE,
- FALSE, &aDocPt, EXCHG_IN_ACTION_COPY,
- TRUE );
+ nDropFormat, nDropDestination, sal_False,
+ sal_False, &aDocPt, EXCHG_IN_ACTION_COPY,
+ sal_True );
}
}
break;
@@ -5121,7 +5127,7 @@ void SwEditWin::Command( const CommandEvent& rCEvt )
const CommandModKeyData* pCommandData = (const CommandModKeyData*)rCEvt.GetData();
if(pCommandData->IsMod1() && !pCommandData->IsMod2())
{
- USHORT nSlot = 0;
+ sal_uInt16 nSlot = 0;
if(pCommandData->IsLeftShift() && !pCommandData->IsRightShift())
nSlot = SID_ATTR_PARA_LEFT_TO_RIGHT;
else if(!pCommandData->IsLeftShift() && pCommandData->IsRightShift())
@@ -5144,10 +5150,10 @@ void SwEditWin::Command( const CommandEvent& rCEvt )
const CommandSelectionChangeData *pData = rCEvt.GetSelectionChangeData();
rSh.SttCrsrMove();
rSh.GoStartSentence();
- rSh.GetCrsr()->GetPoint()->nContent += sal::static_int_cast<sal_uInt16, ULONG>(pData->GetStart());
+ rSh.GetCrsr()->GetPoint()->nContent += sal::static_int_cast<sal_uInt16, sal_uLong>(pData->GetStart());
rSh.SetMark();
- rSh.GetCrsr()->GetMark()->nContent += sal::static_int_cast<sal_uInt16, ULONG>(pData->GetEnd() - pData->GetStart());
- rSh.EndCrsrMove( TRUE );
+ rSh.GetCrsr()->GetMark()->nContent += sal::static_int_cast<sal_uInt16, sal_uLong>(pData->GetEnd() - pData->GetStart());
+ rSh.EndCrsrMove( sal_True );
}
break;
case COMMAND_PREPARERECONVERSION:
@@ -5171,9 +5177,9 @@ void SwEditWin::Command( const CommandEvent& rCEvt )
if( pCrsr )
{
- ULONG nPosNodeIdx = pCrsr->GetPoint()->nNode.GetIndex();
+ sal_uLong nPosNodeIdx = pCrsr->GetPoint()->nNode.GetIndex();
xub_StrLen nPosIdx = pCrsr->GetPoint()->nContent.GetIndex();
- ULONG nMarkNodeIdx = pCrsr->GetMark()->nNode.GetIndex();
+ sal_uLong nMarkNodeIdx = pCrsr->GetMark()->nNode.GetIndex();
xub_StrLen nMarkIdx = pCrsr->GetMark()->nContent.GetIndex();
if( !rSh.GetCrsr()->HasMark() )
@@ -5187,7 +5193,7 @@ void SwEditWin::Command( const CommandEvent& rCEvt )
rSh.GetCrsr()->GetPoint()->nContent = nPosIdx;
rSh.GetCrsr()->GetMark()->nNode = nPosNodeIdx;
rSh.GetCrsr()->GetMark()->nContent =
- rSh.GetCrsr()->GetCntntNode( TRUE )->Len();
+ rSh.GetCrsr()->GetCntntNode( sal_True )->Len();
}
else if( nPosNodeIdx == nMarkNodeIdx )
{
@@ -5202,10 +5208,10 @@ void SwEditWin::Command( const CommandEvent& rCEvt )
rSh.GetCrsr()->GetMark()->nContent = nMarkIdx;
rSh.GetCrsr()->GetPoint()->nNode = nMarkNodeIdx;
rSh.GetCrsr()->GetPoint()->nContent =
- rSh.GetCrsr()->GetCntntNode( FALSE )->Len();
+ rSh.GetCrsr()->GetCntntNode( sal_False )->Len();
}
- rSh.EndCrsrMove( TRUE );
+ rSh.EndCrsrMove( sal_True );
}
}
break;
@@ -5222,9 +5228,9 @@ void SwEditWin::Command( const CommandEvent& rCEvt )
#i18686#: select the object/cursor at the mouse
position of the context menu request
--------------------------------------------------*/
-BOOL SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos )
+sal_Bool SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
const Point aDocPos( PixelToLogic( rMousePos ) );
// --> OD 2005-02-17 #i42258#
const bool bIsInsideSelectedObj( rSh.IsInsideSelectedObj( aDocPos ) );
@@ -5257,7 +5263,7 @@ BOOL SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos )
if(!aSelection.IsZero())
{
SdrOutliner* pOutliner = pSdrView->GetTextEditOutliner();
- BOOL bVertical = pOutliner->IsVertical();
+ sal_Bool bVertical = pOutliner->IsVertical();
const EditEngine& rEditEng = pOutliner->GetEditEngine();
Point aEEPos(aDocPos);
const Rectangle& rOutputArea = pOLV->GetOutputArea();
@@ -5279,7 +5285,7 @@ BOOL SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos )
aSelection.Adjust();
if(!aCompare.IsLess(aSelection) && !aCompare.IsGreater(aSelection))
{
- return FALSE;
+ return sal_False;
}
}
@@ -5288,15 +5294,15 @@ BOOL SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos )
if (pSdrView->MouseButtonDown( aMEvt, this ) )
{
pSdrView->MouseButtonUp( aMEvt, this );
- rSh.GetView().GetViewFrame()->GetBindings().InvalidateAll(FALSE);
- return TRUE;
+ rSh.GetView().GetViewFrame()->GetBindings().InvalidateAll(sal_False);
+ return sal_True;
}
}
rSh.ResetCursorStack();
if ( EnterDrawMode( aMEvt, aDocPos ) )
{
- return TRUE;
+ return sal_True;
}
if ( rView.GetDrawFuncPtr() && bInsFrm )
{
@@ -5318,15 +5324,15 @@ BOOL SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos )
rView.NoRotate();
rSh.HideCrsr();
- BOOL bUnLockView = !rSh.IsViewLocked();
- rSh.LockView( TRUE );
- BOOL bSelObj = rSh.SelectObj( aDocPos, 0);
+ sal_Bool bUnLockView = !rSh.IsViewLocked();
+ rSh.LockView( sal_True );
+ sal_Bool bSelObj = rSh.SelectObj( aDocPos, 0);
if( bUnLockView )
- rSh.LockView( FALSE );
+ rSh.LockView( sal_False );
if( bSelObj )
{
- bRet = TRUE;
+ bRet = sal_True;
// falls im Macro der Rahmen deselektiert
// wurde, muss nur noch der Cursor
// wieder angezeigt werden.
@@ -5343,7 +5349,7 @@ BOOL SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos )
}
rSh.EnterSelFrmMode( &aDocPos );
- bFrmDrag = TRUE;
+ bFrmDrag = sal_True;
UpdatePointer( aDocPos, 0 );
return bRet;
}
@@ -5358,32 +5364,32 @@ BOOL SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos )
!bIsInsideSelectedObj))
{
rView.NoRotate();
- BOOL bUnLockView = !rSh.IsViewLocked();
- rSh.LockView( TRUE );
- BYTE nFlag = 0;
+ sal_Bool bUnLockView = !rSh.IsViewLocked();
+ rSh.LockView( sal_True );
+ sal_uInt8 nFlag = 0;
if ( rSh.IsSelFrmMode() )
{
rSh.UnSelectFrm();
rSh.LeaveSelFrmMode();
rView.AttrChangedNotify(&rSh);
- bRet = TRUE;
+ bRet = sal_True;
}
- BOOL bSelObj = rSh.SelectObj( aDocPos, nFlag );
+ sal_Bool bSelObj = rSh.SelectObj( aDocPos, nFlag );
if( bUnLockView )
- rSh.LockView( FALSE );
+ rSh.LockView( sal_False );
if( !bSelObj )
{
// Cursor hier umsetzen, damit er nicht zuerst
// im Rahmen gezeichnet wird; ShowCrsr() geschieht
// in LeaveSelFrmMode()
- bValidCrsrPos = !(CRSR_POSCHG & (rSh.*rSh.fnSetCrsr)(&aDocPos,FALSE));
+ bValidCrsrPos = !(CRSR_POSCHG & (rSh.*rSh.fnSetCrsr)(&aDocPos,sal_False));
rSh.LeaveSelFrmMode();
rView.LeaveDrawCreate();
rView.AttrChangedNotify( &rSh );
- bRet = TRUE;
+ bRet = sal_True;
}
else
{
@@ -5391,7 +5397,7 @@ BOOL SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos )
rSh.EnterSelFrmMode( &aDocPos );
rSh.SelFlyGrabCrsr();
rSh.MakeSelVisible();
- bFrmDrag = TRUE;
+ bFrmDrag = sal_True;
if( rSh.IsFrmSelected() &&
rView.GetDrawFuncPtr() )
{
@@ -5401,13 +5407,13 @@ BOOL SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos )
rView.AttrChangedNotify( &rSh );
}
UpdatePointer( aDocPos, 0 );
- bRet = TRUE;
+ bRet = sal_True;
}
}
else if ( rSh.IsSelFrmMode() && bIsInsideSelectedObj )
{
// ## object at the mouse cursor is already selected - do nothing
- return FALSE;
+ return sal_False;
}
if ( rSh.IsGCAttr() )
@@ -5416,7 +5422,7 @@ BOOL SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos )
rSh.ClearGCAttr();
}
- BOOL bOverSelect = rSh.ChgCurrPam( aDocPos ), bOverURLGrf = FALSE;
+ sal_Bool bOverSelect = rSh.ChgCurrPam( aDocPos ), bOverURLGrf = sal_False;
if( !bOverSelect )
bOverURLGrf = bOverSelect = 0 != rSh.IsURLGrfAtPos( aDocPos );
@@ -5425,8 +5431,8 @@ BOOL SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos )
{ // nur temp. Move-Kontext aufspannen, da sonst die
// Abfrage auf die Inhaltsform nicht funktioniert!!!
MV_KONTEXT( &rSh );
- (rSh.*rSh.fnSetCrsr)(&aDocPos, FALSE);
- bRet = TRUE;
+ (rSh.*rSh.fnSetCrsr)(&aDocPos, sal_False);
+ bRet = sal_True;
}
}
if( !bOverURLGrf )
@@ -5439,7 +5445,7 @@ BOOL SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos )
if( !rSh.IsFrmSelected() )
rSh.GotoNextFly();
rSh.EnterSelFrmMode();
- bRet = TRUE;
+ bRet = sal_True;
}
}
return bRet;
@@ -5450,7 +5456,7 @@ SfxShell* lcl_GetShellFromDispatcher( SwView& rView, TypeId nType )
//Shell ermitteln
SfxShell* pShell;
SfxDispatcher* pDispatcher = rView.GetViewFrame()->GetDispatcher();
- for(USHORT i = 0; TRUE; ++i )
+ for(sal_uInt16 i = 0; sal_True; ++i )
{
pShell = pDispatcher->GetShell( i );
if( !pShell || pShell->IsA( nType ) )
@@ -5474,7 +5480,7 @@ IMPL_LINK( SwEditWin, KeyInputFlushHandler, Timer *, EMPTYARG )
IMPL_LINK( SwEditWin, KeyInputTimerHandler, Timer *, EMPTYARG )
{
- bTblInsDelMode = FALSE;
+ bTblInsDelMode = sal_False;
return 0;
}
@@ -5509,7 +5515,7 @@ IMPL_LINK(SwEditWin, TemplateTimerHdl, Timer*, EMPTYARG)
}
-void SwEditWin::SetChainMode( BOOL bOn )
+void SwEditWin::SetChainMode( sal_Bool bOn )
{
if ( !bChainMode )
StopInsFrm();
@@ -5524,7 +5530,7 @@ void SwEditWin::SetChainMode( BOOL bOn )
if ( !bChainMode )
rView.GetViewFrame()->HideStatusText();
- static USHORT __READONLY_DATA aInva[] =
+ static sal_uInt16 __READONLY_DATA aInva[] =
{
FN_FRAME_CHAIN, FN_FRAME_UNCHAIN, 0
};
@@ -5551,7 +5557,7 @@ void QuickHelpData::Move( QuickHelpData& rCpy )
{
// Pointer verschieben
aArr.Insert( &rCpy.aArr );
- rCpy.aArr.Remove( (USHORT)0, rCpy.aArr.Count() );
+ rCpy.aArr.Remove( (sal_uInt16)0, rCpy.aArr.Count() );
// nTipId = rCpy.nTipId;
bClear = rCpy.bClear;
nLen = rCpy.nLen;
@@ -5573,17 +5579,17 @@ void QuickHelpData::Move( QuickHelpData& rCpy )
void QuickHelpData::ClearCntnt()
{
nLen = nCurArrPos = 0;
- bClear = bChkInsBlank = FALSE;
+ bClear = bChkInsBlank = sal_False;
nTipId = 0;
aArr.DeleteAndDestroy( 0 , aArr.Count() );
- bIsTip = TRUE;
- bIsAutoText = TRUE;
+ bIsTip = sal_True;
+ bIsAutoText = sal_True;
delete pCETID, pCETID = 0;
delete[] pAttrs, pAttrs = 0;
}
-void QuickHelpData::Start( SwWrtShell& rSh, USHORT nWrdLen )
+void QuickHelpData::Start( SwWrtShell& rSh, sal_uInt16 nWrdLen )
{
if( pCETID ) delete pCETID, pCETID = 0;
if( pAttrs ) delete[] pAttrs, pAttrs = 0;
@@ -5593,7 +5599,7 @@ void QuickHelpData::Start( SwWrtShell& rSh, USHORT nWrdLen )
nLen = nWrdLen;
nCurArrPos = 0;
}
- bClear = TRUE;
+ bClear = sal_True;
Window& rWin = rSh.GetView().GetEditWin();
if( bIsTip )
@@ -5609,13 +5615,13 @@ void QuickHelpData::Start( SwWrtShell& rSh, USHORT nWrdLen )
{
String sStr( *aArr[ nCurArrPos ] );
sStr.Erase( 0, nLen );
- USHORT nL = sStr.Len();
- pAttrs = new USHORT[ nL ];
- for( USHORT n = nL; n; )
+ sal_uInt16 nL = sStr.Len();
+ pAttrs = new sal_uInt16[ nL ];
+ for( sal_uInt16 n = nL; n; )
*(pAttrs + --n ) = EXTTEXTINPUT_ATTR_DOTTEDUNDERLINE |
EXTTEXTINPUT_ATTR_HIGHLIGHT;
pCETID = new CommandExtTextInputData( sStr, pAttrs, nL,
- 0, 0, 0, FALSE );
+ 0, 0, 0, sal_False );
rSh.CreateExtTextInput(rWin.GetInputLanguage());
rSh.SetExtTextInputData( *pCETID );
}
@@ -5624,7 +5630,7 @@ void QuickHelpData::Start( SwWrtShell& rSh, USHORT nWrdLen )
void QuickHelpData::Stop( SwWrtShell& rSh )
{
if( !bIsTip )
- rSh.DeleteExtTextInput( 0, FALSE );
+ rSh.DeleteExtTextInput( 0, sal_False );
else if( nTipId )
Help::HideTip( nTipId );
ClearCntnt();
@@ -5665,7 +5671,7 @@ void QuickHelpData::FillStrArr( SwWrtShell& rSh, const String& rWord )
// and than add all words from the AutoCompleteWord-List
const SwAutoCompleteWord& rACLst = rSh.GetAutoCompleteWords();
- USHORT nStt, nEnd;
+ sal_uInt16 nStt, nEnd;
if( rACLst.GetRange( rWord, nStt, nEnd ) )
{
while( nStt < nEnd )
@@ -5701,12 +5707,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 f84c74f0a2..68a0e23ad6 100644
--- a/sw/source/ui/docvw/edtwin2.cxx
+++ b/sw/source/ui/docvw/edtwin2.cxx
@@ -83,9 +83,9 @@
/*--------------------------------------------------------------------
Beschreibung: KeyEvents
--------------------------------------------------------------------*/
-static void lcl_GetRedlineHelp( const SwRedline& rRedl, String& rTxt, BOOL bBalloon )
+static void lcl_GetRedlineHelp( const SwRedline& rRedl, String& rTxt, sal_Bool bBalloon )
{
- USHORT nResId = 0;
+ sal_uInt16 nResId = 0;
switch( rRedl.GetType() )
{
case nsRedlineType_t::REDLINE_INSERT: nResId = STR_REDLINE_INSERT; break;
@@ -111,14 +111,14 @@ static void lcl_GetRedlineHelp( const SwRedline& rRedl, String& rTxt, BOOL bBall
void SwEditWin::RequestHelp(const HelpEvent &rEvt)
{
SwWrtShell &rSh = rView.GetWrtShell();
- BOOL bQuickBalloon = 0 != (rEvt.GetMode() & ( HELPMODE_QUICK | HELPMODE_BALLOON ));
+ sal_Bool bQuickBalloon = 0 != (rEvt.GetMode() & ( HELPMODE_QUICK | HELPMODE_BALLOON ));
if(bQuickBalloon && rSh.GetViewOptions()->IsPreventTips())
return;
- BOOL bWeiter = TRUE;
+ sal_Bool bWeiter = sal_True;
SET_CURR_SHELL(&rSh);
String sTxt;
Point aPos( PixelToLogic( ScreenToOutputPixel( rEvt.GetMousePosPixel() ) ));
- BOOL bBalloon = static_cast< BOOL >(rEvt.GetMode() & HELPMODE_BALLOON);
+ sal_Bool bBalloon = static_cast< sal_Bool >(rEvt.GetMode() & HELPMODE_BALLOON);
SdrView *pSdrView = rSh.GetDrawView();
@@ -135,7 +135,7 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt)
if( bWeiter && bQuickBalloon)
{
SwRect aFldRect;
- USHORT nStyle = 0; // style of quick help
+ sal_uInt16 nStyle = 0; // style of quick help
SwContentAtPos aCntntAtPos( SwContentAtPos::SW_FIELD |
SwContentAtPos::SW_INETATTR |
SwContentAtPos::SW_FTN |
@@ -149,7 +149,7 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt)
#endif
SwContentAtPos::SW_TABLEBOXFML );
- if( rSh.GetContentAtPos( aPos, aCntntAtPos, FALSE, &aFldRect ) )
+ if( rSh.GetContentAtPos( aPos, aCntntAtPos, sal_False, &aFldRect ) )
{
switch( aCntntAtPos.eCntntAtPos )
{
@@ -224,7 +224,7 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt)
}
// <--
// --> OD 2007-07-26 #i80029#
- BOOL bExecHyperlinks = rView.GetDocShell()->IsReadOnly();
+ sal_Bool bExecHyperlinks = rView.GetDocShell()->IsReadOnly();
if ( !bExecHyperlinks )
{
SvtSecurityOptions aSecOpts;
@@ -302,7 +302,7 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt)
case RES_TABLEFLD:
case RES_GETEXPFLD:
{
- USHORT nOldSubType = pFld->GetSubType();
+ sal_uInt16 nOldSubType = pFld->GetSubType();
((SwField*)pFld)->SetSubType(nsSwExtendedSubType::SUB_CMD);
sTxt = pFld->ExpandField(true);
((SwField*)pFld)->SetSubType(nOldSubType);
@@ -332,7 +332,7 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt)
break;
}
case RES_INPUTFLD: // BubbleHelp, da der Hinweis ggf ziemlich lang sein kann
- bBalloon = TRUE;
+ bBalloon = sal_True;
/* no break */
case RES_JUMPEDITFLD:
sTxt = pFld->GetPar2();
@@ -388,7 +388,7 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt)
if( !sTxt.Len() )
{
aCntntAtPos.eCntntAtPos = SwContentAtPos::SW_REDLINE;
- if( rSh.GetContentAtPos( aPos, aCntntAtPos, FALSE, &aFldRect ) )
+ if( rSh.GetContentAtPos( aPos, aCntntAtPos, sal_False, &aFldRect ) )
lcl_GetRedlineHelp( *aCntntAtPos.aFnd.pRedl,
sTxt, bBalloon );
}
@@ -412,12 +412,12 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt)
}
}
- bWeiter = FALSE;
+ bWeiter = sal_False;
}
if( bWeiter )
{
- BYTE nTabCols = rSh.WhichMouseTabCol(aPos);
- USHORT nTabRes = 0;
+ sal_uInt8 nTabCols = rSh.WhichMouseTabCol(aPos);
+ sal_uInt16 nTabRes = 0;
switch(nTabCols)
{
case SW_TABCOL_HORI:
@@ -452,7 +452,7 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt)
Rectangle aRect(rEvt.GetMousePosPixel(), aTxtSize);
Help::ShowQuickHelp(this, aRect, sTxt);
}
- bWeiter = FALSE;
+ bWeiter = sal_False;
}
}
@@ -479,7 +479,7 @@ aktuelle Zeichenvorlage anzeigen?
pObj = aVEvt.pObj;
sTxt = pField->GetURL();
- bWeiter = FALSE;
+ bWeiter = sal_False;
}
}
if (bWeiter && eHit == SDRHIT_TEXTEDIT)
@@ -504,7 +504,7 @@ aktuelle Zeichenvorlage anzeigen?
if (pField )
{
sTxt = ((const SvxURLField*) pField)->GetURL();
- bWeiter = FALSE;
+ bWeiter = sal_False;
}
}
}
@@ -553,7 +553,7 @@ void SwEditWin::Paint(const Rectangle& rRect)
SwWrtShell* pWrtShell = GetView().GetWrtShellPtr();
if(!pWrtShell)
return;
- BOOL bPaintShadowCrsr = FALSE;
+ sal_Bool bPaintShadowCrsr = sal_False;
if( pShadCrsr )
{
Rectangle aRect( pShadCrsr->GetRect());
@@ -566,7 +566,7 @@ void SwEditWin::Paint(const Rectangle& rRect)
// liegt irgendwie drueber, dann ist alles ausserhalb geclippt
// und wir muessen den "inneren Teil" am Ende vom Paint
// wieder sichtbar machen. Sonst kommt es zu Paintfehlern!
- bPaintShadowCrsr = TRUE;
+ bPaintShadowCrsr = sal_True;
}
}
/*
diff --git a/sw/source/ui/docvw/edtwin3.cxx b/sw/source/ui/docvw/edtwin3.cxx
index 7a4812dc30..4e12917a2c 100644
--- a/sw/source/ui/docvw/edtwin3.cxx
+++ b/sw/source/ui/docvw/edtwin3.cxx
@@ -56,7 +56,7 @@
void ScrollMDI( ViewShell* pVwSh, const SwRect &rRect,
- USHORT nRangeX, USHORT nRangeY)
+ sal_uInt16 nRangeX, sal_uInt16 nRangeY)
{
SfxViewShell *pSfxVwSh = pVwSh->GetSfxViewShell();
if (pSfxVwSh && pSfxVwSh->ISA(SwView))
@@ -69,12 +69,12 @@ void ScrollMDI( ViewShell* pVwSh, const SwRect &rRect,
-BOOL IsScrollMDI( ViewShell* pVwSh, const SwRect &rRect )
+sal_Bool IsScrollMDI( ViewShell* pVwSh, const SwRect &rRect )
{
SfxViewShell *pSfxVwSh = pVwSh->GetSfxViewShell();
if (pSfxVwSh && pSfxVwSh->ISA(SwView))
return (((SwView *)pSfxVwSh)->IsScroll(rRect.SVRect()));
- return FALSE;
+ return sal_False;
}
/*--------------------------------------------------------------------
@@ -101,7 +101,7 @@ void SizeNotify(ViewShell* pVwSh, const Size &rSize)
-void PageNumNotify( ViewShell* pVwSh, USHORT nPhyNum, USHORT nVirtNum,
+void PageNumNotify( ViewShell* pVwSh, sal_uInt16 nPhyNum, sal_uInt16 nVirtNum,
const String& rPgStr)
{
SfxViewShell *pSfxVwSh = pVwSh->GetSfxViewShell();
@@ -128,7 +128,7 @@ void FrameNotify( ViewShell* pVwSh, FlyMode eMode )
/*--------------------------------------------------------------------
Beschreibung: Notify fuer Seitenzahl-Update
--------------------------------------------------------------------*/
-BOOL SwEditWin::RulerColumnDrag( const MouseEvent& rMEvt, BOOL bVerticalMode)
+sal_Bool SwEditWin::RulerColumnDrag( const MouseEvent& rMEvt, sal_Bool bVerticalMode)
{
SvxRuler& rRuler = bVerticalMode ? rView.GetVLineal() : rView.GetHLineal();
return (!rRuler.StartDocDrag( rMEvt, RULER_TYPE_BORDER ) &&
@@ -139,7 +139,7 @@ BOOL SwEditWin::RulerColumnDrag( const MouseEvent& rMEvt, BOOL bVerticalMode)
// #i23726#
// --> OD 2005-02-18 #i42921# - add 3rd parameter <bVerticalMode> in order
// to consider vertical layout
-BOOL SwEditWin::RulerMarginDrag( const MouseEvent& rMEvt,
+sal_Bool SwEditWin::RulerMarginDrag( const MouseEvent& rMEvt,
const bool bVerticalMode )
{
SvxRuler& rRuler = bVerticalMode ? rView.GetVLineal() : rView.GetHLineal();
@@ -165,12 +165,12 @@ void RepaintPagePreview( ViewShell* pVwSh, const SwRect& rRect )
((SwPagePreView *)pSfxVwSh)->RepaintCoreRect( rRect );
}
-BOOL JumpToSwMark( ViewShell* pVwSh, const String& rMark )
+sal_Bool JumpToSwMark( ViewShell* pVwSh, const String& rMark )
{
SfxViewShell *pSfxVwSh = pVwSh->GetSfxViewShell();
if( pSfxVwSh && pSfxVwSh->ISA( SwView ) )
return ((SwView *)pSfxVwSh)->JumpToSwMark( rMark );
- return FALSE;
+ return sal_False;
}
void SwEditWin::DataChanged( const DataChangedEvent& rDCEvt )
@@ -182,8 +182,8 @@ void SwEditWin::DataChanged( const DataChangedEvent& rDCEvt )
// the SwWrtShell
if(!pSh)
return;
- BOOL bViewWasLocked = pSh->IsViewLocked(), bUnlockPaint = FALSE;
- pSh->LockView( TRUE );
+ sal_Bool bViewWasLocked = pSh->IsViewLocked(), bUnlockPaint = sal_False;
+ pSh->LockView( sal_True );
switch( rDCEvt.GetType() )
{
case DATACHANGED_SETTINGS:
@@ -194,7 +194,7 @@ void SwEditWin::DataChanged( const DataChangedEvent& rDCEvt )
if( rDCEvt.GetFlags() & SETTINGS_STYLE )
{
pSh->LockPaint();
- bUnlockPaint = TRUE;
+ bUnlockPaint = sal_True;
ViewShell::DeleteReplacementBitmaps();
GetView().InvalidateBorder(); //Scrollbarbreiten
}
@@ -205,7 +205,7 @@ void SwEditWin::DataChanged( const DataChangedEvent& rDCEvt )
case DATACHANGED_FONTS:
case DATACHANGED_FONTSUBSTITUTION:
pSh->LockPaint();
- bUnlockPaint = TRUE;
+ bUnlockPaint = sal_True;
GetView().GetDocShell()->UpdateFontList(); //z.B. Druckerwechsel
break;
}
diff --git a/sw/source/ui/docvw/romenu.cxx b/sw/source/ui/docvw/romenu.cxx
index 7ebe4f14ec..a9c6c29c6b 100644
--- a/sw/source/ui/docvw/romenu.cxx
+++ b/sw/source/ui/docvw/romenu.cxx
@@ -90,13 +90,13 @@ SwReadOnlyPopup::~SwReadOnlyPopup()
-void SwReadOnlyPopup::Check( USHORT nMID, USHORT nSID, SfxDispatcher &rDis )
+void SwReadOnlyPopup::Check( sal_uInt16 nMID, sal_uInt16 nSID, SfxDispatcher &rDis )
{
SfxPoolItem *_pItem = 0;
SfxItemState eState = rDis.GetBindings()->QueryState( nSID, _pItem );
if (eState >= SFX_ITEM_AVAILABLE)
{
- EnableItem( nMID, TRUE );
+ EnableItem( nMID, sal_True );
if (_pItem)
{
CheckItem ( nMID, !_pItem->ISA(SfxVoidItem) &&
@@ -104,11 +104,11 @@ void SwReadOnlyPopup::Check( USHORT nMID, USHORT nSID, SfxDispatcher &rDis )
((SfxBoolItem*)_pItem)->GetValue());
//remove full screen entry when not in full screen mode
if(SID_WIN_FULLSCREEN == nSID && !IsItemChecked(SID_WIN_FULLSCREEN) )
- EnableItem(nMID, FALSE);
+ EnableItem(nMID, sal_False);
}
}
else
- EnableItem( nMID, FALSE );
+ EnableItem( nMID, sal_False );
delete _pItem;
}
@@ -127,7 +127,7 @@ SwReadOnlyPopup::SwReadOnlyPopup( const Point &rDPos, SwView &rV ) :
if ( !sURL.Len() )
{
SwContentAtPos aCntntAtPos( SwContentAtPos::SW_INETATTR );
- if( rSh.GetContentAtPos( rDocPos, aCntntAtPos, FALSE))
+ if( rSh.GetContentAtPos( rDocPos, aCntntAtPos, sal_False))
{
SwFmtINetFmt &rIItem = *(SwFmtINetFmt*)aCntntAtPos.aFnd.pAttr;
sURL = rIItem.GetValue();
@@ -136,12 +136,12 @@ SwReadOnlyPopup::SwReadOnlyPopup( const Point &rDPos, SwView &rV ) :
}
}
- BOOL bLink = FALSE;
+ sal_Bool bLink = sal_False;
const Graphic *pGrf;
if ( 0 == (pGrf = rSh.GetGrfAtPos( rDocPos, sGrfName, bLink )) )
{
- EnableItem( MN_READONLY_SAVEGRAPHIC, FALSE );
- EnableItem( MN_READONLY_COPYGRAPHIC, FALSE );
+ EnableItem( MN_READONLY_SAVEGRAPHIC, sal_False );
+ EnableItem( MN_READONLY_COPYGRAPHIC, sal_False );
}
else
{
@@ -149,7 +149,7 @@ SwReadOnlyPopup::SwReadOnlyPopup( const Point &rDPos, SwView &rV ) :
const SwFrmFmt* pGrfFmt = rSh.GetFmtFromObj( rDocPos );
const SfxPoolItem* pURLItem;
if( pGrfFmt && SFX_ITEM_SET == pGrfFmt->GetItemState(
- RES_URL, TRUE, &pURLItem ))
+ RES_URL, sal_True, &pURLItem ))
{
const SwFmtURL& rURL = *(SwFmtURL*)pURLItem;
if( rURL.GetMap() )
@@ -162,8 +162,8 @@ SwReadOnlyPopup::SwReadOnlyPopup( const Point &rDPos, SwView &rV ) :
}
}
- BOOL bEnableGraphicToGallery;
- if ( TRUE == (bEnableGraphicToGallery = bLink) )
+ sal_Bool bEnableGraphicToGallery;
+ if ( sal_True == (bEnableGraphicToGallery = bLink) )
{
GalleryExplorer::FillThemeList( aThemeList );
if ( aThemeList.Count() )
@@ -171,12 +171,12 @@ SwReadOnlyPopup::SwReadOnlyPopup( const Point &rDPos, SwView &rV ) :
PopupMenu *pMenu = GetPopupMenu(MN_READONLY_GRAPHICTOGALLERY);
pMenu->CheckItem( MN_READONLY_TOGALLERYLINK, bGrfToGalleryAsLnk );
pMenu->CheckItem( MN_READONLY_TOGALLERYCOPY, !bGrfToGalleryAsLnk );
- for ( USHORT i=0; i < aThemeList.Count(); ++i )
+ for ( sal_uInt16 i=0; i < aThemeList.Count(); ++i )
pMenu->InsertItem( MN_READONLY_GRAPHICTOGALLERY+i + 3,
*(String*)aThemeList.GetObject( i ) );
}
else
- bEnableGraphicToGallery = FALSE;
+ bEnableGraphicToGallery = sal_False;
}
EnableItem( MN_READONLY_GRAPHICTOGALLERY, bEnableGraphicToGallery );
@@ -184,12 +184,12 @@ SwReadOnlyPopup::SwReadOnlyPopup( const Point &rDPos, SwView &rV ) :
SfxDispatcher &rDis = *pVFrame->GetDispatcher();
const SwPageDesc &rDesc = rSh.GetPageDesc( rSh.GetCurPageDesc() );
pItem = &rDesc.GetMaster().GetBackground();
- BOOL bEnableBackGallery = FALSE,
- bEnableBack = FALSE;
+ sal_Bool bEnableBackGallery = sal_False,
+ bEnableBack = sal_False;
if ( GPOS_NONE != pItem->GetGraphicPos() )
{
- bEnableBack = TRUE;
+ bEnableBack = sal_True;
if ( pItem->GetGraphicLink() )
{
if ( !aThemeList.Count() )
@@ -199,8 +199,8 @@ SwReadOnlyPopup::SwReadOnlyPopup( const Point &rDPos, SwView &rV ) :
PopupMenu *pMenu = GetPopupMenu(MN_READONLY_BACKGROUNDTOGALLERY);
pMenu->CheckItem( MN_READONLY_TOGALLERYLINK, bGrfToGalleryAsLnk );
pMenu->CheckItem( MN_READONLY_TOGALLERYCOPY, !bGrfToGalleryAsLnk );
- bEnableBackGallery = TRUE;
- for ( USHORT i=0; i < aThemeList.Count(); ++i )
+ bEnableBackGallery = sal_True;
+ for ( sal_uInt16 i=0; i < aThemeList.Count(); ++i )
pMenu->InsertItem( MN_READONLY_BACKGROUNDTOGALLERY+i + 3,
*(String*)aThemeList.GetObject( i ) );
}
@@ -212,9 +212,9 @@ SwReadOnlyPopup::SwReadOnlyPopup( const Point &rDPos, SwView &rV ) :
if ( !rSh.GetViewOptions()->IsGraphic() )
CheckItem( MN_READONLY_GRAPHICOFF );
else
- EnableItem( MN_READONLY_LOADGRAPHIC, FALSE );
+ EnableItem( MN_READONLY_LOADGRAPHIC, sal_False );
- BOOL bReloadFrame = 0 != rSh.GetView().GetViewFrame()->GetFrame().GetParentFrame();
+ sal_Bool bReloadFrame = 0 != rSh.GetView().GetViewFrame()->GetFrame().GetParentFrame();
EnableItem( MN_READONLY_RELOAD_FRAME,
bReloadFrame );
EnableItem( MN_READONLY_RELOAD, !bReloadFrame);
@@ -235,7 +235,7 @@ SwReadOnlyPopup::SwReadOnlyPopup( const Point &rDPos, SwView &rV ) :
SfxItemState eState = pVFrame->GetBindings().QueryState( SID_COPY, pState );
Check( MN_READONLY_COPY, SID_COPY, rDis );
if(eState < SFX_ITEM_AVAILABLE)
- EnableItem( MN_READONLY_COPY, FALSE );
+ EnableItem( MN_READONLY_COPY, sal_False );
eState = pVFrame->GetBindings().QueryState( SID_EDITDOC, pState );
if (
@@ -243,23 +243,23 @@ SwReadOnlyPopup::SwReadOnlyPopup( const Point &rDPos, SwView &rV ) :
(rSh.IsGlobalDoc() && rView.GetDocShell()->IsReadOnlyUI())
)
{
- EnableItem( MN_READONLY_EDITDOC, FALSE );
+ EnableItem( MN_READONLY_EDITDOC, sal_False );
}
if ( !sURL.Len() )
{
- EnableItem( MN_READONLY_OPENURL, FALSE );
- EnableItem( MN_READONLY_OPENURLNEW, FALSE );
- EnableItem( MN_READONLY_COPYLINK, FALSE );
+ EnableItem( MN_READONLY_OPENURL, sal_False );
+ EnableItem( MN_READONLY_OPENURLNEW, sal_False );
+ EnableItem( MN_READONLY_COPYLINK, sal_False );
}
Check( SID_WIN_FULLSCREEN, SID_WIN_FULLSCREEN, rDis );
- RemoveDisabledEntries( TRUE, TRUE );
+ RemoveDisabledEntries( sal_True, sal_True );
}
void SwReadOnlyPopup::Execute( Window* pWin, const Point &rPixPos )
{
- USHORT nId = PopupMenu::Execute(
+ sal_uInt16 nId = PopupMenu::Execute(
pWin,
rPixPos );
Execute(pWin, nId);
@@ -268,14 +268,14 @@ void SwReadOnlyPopup::Execute( Window* pWin, const Point &rPixPos )
/*-- 17.03.2004 13:06:18---------------------------------------------------
execute the resulting ID only - necessary to support XContextMenuInterception
-----------------------------------------------------------------------*/
-void SwReadOnlyPopup::Execute( Window* pWin, USHORT nId )
+void SwReadOnlyPopup::Execute( Window* pWin, sal_uInt16 nId )
{
SwWrtShell &rSh = rView.GetWrtShell();
SfxDispatcher &rDis = *rView.GetViewFrame()->GetDispatcher();
if ( nId >= MN_READONLY_GRAPHICTOGALLERY )
{
String sTmp;
- USHORT nSaveId;
+ sal_uInt16 nSaveId;
if ( nId >= MN_READONLY_BACKGROUNDTOGALLERY )
{
nId -= MN_READONLY_BACKGROUNDTOGALLERY+3;
@@ -301,8 +301,8 @@ void SwReadOnlyPopup::Execute( Window* pWin, USHORT nId )
TransferDataContainer* pClipCntnr = 0;
- USHORT nExecId = USHRT_MAX;
- USHORT nFilter = USHRT_MAX;
+ sal_uInt16 nExecId = USHRT_MAX;
+ sal_uInt16 nFilter = USHRT_MAX;
switch( nId )
{
case SID_WIN_FULLSCREEN : nExecId = SID_WIN_FULLSCREEN; break;
@@ -343,9 +343,9 @@ void SwReadOnlyPopup::Execute( Window* pWin, USHORT nId )
case MN_READONLY_LOADGRAPHIC:
{
- BOOL bModified = rSh.IsModified();
+ sal_Bool bModified = rSh.IsModified();
SwViewOption aOpt( *rSh.GetViewOptions() );
- aOpt.SetGraphic( TRUE );
+ aOpt.SetGraphic( sal_True );
rSh.ApplyViewOptions( aOpt );
if(!bModified)
rSh.ResetModified();
@@ -356,10 +356,10 @@ void SwReadOnlyPopup::Execute( Window* pWin, USHORT nId )
case MN_READONLY_PLUGINOFF: nExecId = SID_PLUGINS_ACTIVE; break;
#endif
case MN_READONLY_TOGALLERYLINK:
- SW_MOD()->GetModuleConfig()->SetGrfToGalleryAsLnk( TRUE );
+ SW_MOD()->GetModuleConfig()->SetGrfToGalleryAsLnk( sal_True );
break;
case MN_READONLY_TOGALLERYCOPY:
- SW_MOD()->GetModuleConfig()->SetGrfToGalleryAsLnk( FALSE );
+ SW_MOD()->GetModuleConfig()->SetGrfToGalleryAsLnk( sal_False );
break;
default: //forward the id to the SfxBindings
@@ -396,7 +396,7 @@ static void lcl_GetPreferedExtension( String &rExt, const Graphic &rGrf )
}
-String SwReadOnlyPopup::SaveGraphic( USHORT nId )
+String SwReadOnlyPopup::SaveGraphic( sal_uInt16 nId )
{
//Namen der Grafik herausfischen.
@@ -441,18 +441,18 @@ String ExportGraphic( const Graphic &rGraphic, const String &rGrfName )
aDlgHelper.SetFileName( aURL.GetName() );
GraphicFilter& rGF = *GraphicFilter::GetGraphicFilter();
- const USHORT nCount = rGF.GetExportFormatCount();
+ const sal_uInt16 nCount = rGF.GetExportFormatCount();
String aExt( aURL.GetExtension() );
if( !aExt.Len() )
lcl_GetPreferedExtension( aExt, rGraphic );
aExt.ToLowerAscii();
- USHORT nDfltFilter = USHRT_MAX;
+ sal_uInt16 nDfltFilter = USHRT_MAX;
Reference<XFilterManager> xFltMgr(xFP, UNO_QUERY);
- for ( USHORT i = 0; i < nCount; i++ )
+ for ( sal_uInt16 i = 0; i < nCount; i++ )
{
xFltMgr->appendFilter( rGF.GetExportFormatName( i ), rGF.GetExportWildcard( i ) );
if ( COMPARE_EQUAL == aExt.CompareIgnoreCaseToAscii(rGF.GetExportFormatShortName( i ).ToLowerAscii() ))
@@ -462,7 +462,7 @@ String ExportGraphic( const Graphic &rGraphic, const String &rGrfName )
{
//"falsche" Extension?
lcl_GetPreferedExtension( aExt, rGraphic );
- for ( USHORT i = 0; i < nCount; ++i )
+ for ( sal_uInt16 i = 0; i < nCount; ++i )
if ( aExt == rGF.GetExportFormatShortName( i ).ToLowerAscii() )
{
nDfltFilter = i;
@@ -486,11 +486,11 @@ String ExportGraphic( const Graphic &rGraphic, const String &rGrfName )
{
//Versuchen die Originalgrafik zu speichern.
SfxMedium aIn( rGrfName, STREAM_READ | STREAM_NOCREATE,
- TRUE );
+ sal_True );
if( aIn.GetInStream() && !aIn.GetInStream()->GetError() )
{
SfxMedium aOut( sPath, STREAM_WRITE | STREAM_SHARE_DENYNONE,
- FALSE);
+ sal_False);
if( aOut.GetOutStream() && !aOut.GetOutStream()->GetError())
{
*aOut.GetOutStream() << *aIn.GetInStream();
@@ -505,7 +505,7 @@ String ExportGraphic( const Graphic &rGraphic, const String &rGrfName )
}
}
- USHORT nFilter;
+ sal_uInt16 nFilter;
if ( xFltMgr->getCurrentFilter().getLength() && rGF.GetExportFormatCount() )
nFilter = rGF.GetExportFormatNumber( xFltMgr->getCurrentFilter() );
else
diff --git a/sw/source/ui/docvw/romenu.hxx b/sw/source/ui/docvw/romenu.hxx
index 55f238fdca..f90d9cee7b 100644
--- a/sw/source/ui/docvw/romenu.hxx
+++ b/sw/source/ui/docvw/romenu.hxx
@@ -53,12 +53,12 @@ class SwReadOnlyPopup : public PopupMenu
sDescription,
sGrfName;
List aThemeList;
- BOOL bGrfToGalleryAsLnk;
+ sal_Bool bGrfToGalleryAsLnk;
ImageMap* pImageMap;
INetImage* pTargetURL;
- void Check( USHORT nMID, USHORT nSID, SfxDispatcher &rDis );
- String SaveGraphic( USHORT nId );
+ void Check( sal_uInt16 nMID, sal_uInt16 nSID, SfxDispatcher &rDis );
+ String SaveGraphic( sal_uInt16 nId );
using PopupMenu::Execute;
@@ -67,7 +67,7 @@ public:
~SwReadOnlyPopup();
void Execute( Window* pWin, const Point &rPPos );
- void Execute( Window* pWin, USHORT nId );
+ void Execute( Window* pWin, sal_uInt16 nId );
};
diff --git a/sw/source/ui/docvw/srcedtw.cxx b/sw/source/ui/docvw/srcedtw.cxx
index be71b1aa38..029e640080 100644
--- a/sw/source/ui/docvw/srcedtw.cxx
+++ b/sw/source/ui/docvw/srcedtw.cxx
@@ -68,8 +68,8 @@
struct SwTextPortion
{
- USHORT nLine;
- USHORT nStart, nEnd;
+ sal_uInt16 nLine;
+ sal_uInt16 nStart, nEnd;
svtools::ColorConfigEntry eType;
};
@@ -93,12 +93,12 @@ static void lcl_Highlight(const String& rSource, SwTextPortions& aPortionList)
const sal_Unicode cCR = 0x0d;
- const USHORT nStrLen = rSource.Len();
- USHORT nInsert = 0; // Number of inserted Portions
- USHORT nActPos = 0; // Position, at the '<' was found
- USHORT nOffset = 0; // Offset of nActPos for '<'
- USHORT nPortStart = USHRT_MAX; // For the TextPortion
- USHORT nPortEnd = 0; //
+ const sal_uInt16 nStrLen = rSource.Len();
+ sal_uInt16 nInsert = 0; // Number of inserted Portions
+ sal_uInt16 nActPos = 0; // Position, at the '<' was found
+ sal_uInt16 nOffset = 0; // Offset of nActPos for '<'
+ sal_uInt16 nPortStart = USHRT_MAX; // For the TextPortion
+ sal_uInt16 nPortEnd = 0; //
SwTextPortion aText;
while(nActPos < nStrLen)
{
@@ -143,7 +143,7 @@ static void lcl_Highlight(const String& rSource, SwTextPortions& aPortionList)
if(svtools::HTMLUNKNOWN == eFoundType)
{
//jetzt koennte hier ein keyword folgen
- USHORT nSrchPos = nActPos;
+ sal_uInt16 nSrchPos = nActPos;
while(++nSrchPos < nStrLen - 1)
{
sal_Unicode cNext = rSource.GetChar(nSrchPos);
@@ -184,18 +184,18 @@ static void lcl_Highlight(const String& rSource, SwTextPortions& aPortionList)
// jetzt muss noch '>' gesucht werden
if(svtools::HTMLUNKNOWN != eFoundType)
{
- BOOL bFound = FALSE;
- for(USHORT i = nPortEnd; i < nStrLen; i++)
+ sal_Bool bFound = sal_False;
+ for(sal_uInt16 i = nPortEnd; i < nStrLen; i++)
if(cCloseBracket == rSource.GetChar(i))
{
- bFound = TRUE;
+ bFound = sal_True;
nPortEnd = i;
break;
}
if(!bFound && (eFoundType == svtools::HTMLCOMMENT))
{
// Kommentar ohne Ende in dieser Zeile
- bFound = TRUE;
+ bFound = sal_True;
nPortEnd = nStrLen - 1;
}
@@ -246,8 +246,8 @@ SwSrcEditWindow::SwSrcEditWindow( Window* pParent, SwSrcView* pParentView ) :
nCurTextWidth(0),
nStartLine(USHRT_MAX),
eSourceEncoding(gsl_getSystemTextEncoding()),
- bDoSyntaxHighlight(TRUE),
- bHighlighting(FALSE)
+ bDoSyntaxHighlight(sal_True),
+ bHighlighting(sal_False)
{
SetHelpId(HID_SOURCE_EDITWIN);
CreateTextEngine();
@@ -448,9 +448,9 @@ void TextViewOutWin::Command( const CommandEvent& rCEvt )
void TextViewOutWin::KeyInput( const KeyEvent& rKEvt )
{
- BOOL bDone = FALSE;
+ sal_Bool bDone = sal_False;
SwSrcEditWindow* pSrcEditWin = (SwSrcEditWindow*)GetParent();
- BOOL bChange = !pSrcEditWin->IsReadonly() || !TextEngine::DoesKeyChangeText( rKEvt );
+ sal_Bool bChange = !pSrcEditWin->IsReadonly() || !TextEngine::DoesKeyChangeText( rKEvt );
if(bChange)
bDone = pTextView->KeyInput( rKEvt );
@@ -521,14 +521,14 @@ void SwSrcEditWindow::CreateTextEngine()
pTextEngine = new ExtTextEngine;
pTextView = new ExtTextView( pTextEngine, pOutWin );
- pTextView->SetAutoIndentMode(TRUE);
+ pTextView->SetAutoIndentMode(sal_True);
pOutWin->SetTextView(pTextView);
- pTextEngine->SetUpdateMode( FALSE );
+ pTextEngine->SetUpdateMode( sal_False );
pTextEngine->InsertView( pTextView );
Font aFont;
- aFont.SetTransparent( FALSE );
+ aFont.SetTransparent( sal_False );
aFont.SetFillColor( rCol );
SetPointFont( aFont );
aFont = GetFont();
@@ -539,10 +539,10 @@ void SwSrcEditWindow::CreateTextEngine()
aSyntaxIdleTimer.SetTimeout( SYNTAX_HIGHLIGHT_TIMEOUT );
aSyntaxIdleTimer.SetTimeoutHdl( LINK( this, SwSrcEditWindow, SyntaxTimerHdl ) );
- pTextEngine->EnableUndo( TRUE );
- pTextEngine->SetUpdateMode( TRUE );
+ pTextEngine->EnableUndo( sal_True );
+ pTextEngine->SetUpdateMode( sal_True );
- pTextView->ShowCursor( TRUE, TRUE );
+ pTextView->ShowCursor( sal_True, sal_True );
InitScrollBars();
StartListening( *pTextEngine );
@@ -600,14 +600,14 @@ IMPL_LINK(SwSrcEditWindow, ScrollHdl, ScrollBar*, pScroll)
{
long nDiff = pTextView->GetStartDocPos().Y() - pScroll->GetThumbPos();
GetTextView()->Scroll( 0, nDiff );
- pTextView->ShowCursor( FALSE, TRUE );
+ pTextView->ShowCursor( sal_False, sal_True );
pScroll->SetThumbPos( pTextView->GetStartDocPos().Y() );
}
else
{
long nDiff = pTextView->GetStartDocPos().X() - pScroll->GetThumbPos();
GetTextView()->Scroll( nDiff, 0 );
- pTextView->ShowCursor( FALSE, TRUE );
+ pTextView->ShowCursor( sal_False, sal_True );
pScroll->SetThumbPos( pTextView->GetStartDocPos().X() );
}
GetSrcView()->GetViewFrame()->GetBindings().Invalidate( SID_TABLE_CELL );
@@ -622,20 +622,20 @@ IMPL_LINK( SwSrcEditWindow, SyntaxTimerHdl, Timer *, pTimer )
{
Time aSyntaxCheckStart;
DBG_ASSERT( pTextView, "Noch keine View, aber Syntax-Highlight ?!" );
- // pTextEngine->SetUpdateMode( FALSE );
+ // pTextEngine->SetUpdateMode( sal_False );
- bHighlighting = TRUE;
- USHORT nLine;
- USHORT nCount = 0;
+ bHighlighting = sal_True;
+ sal_uInt16 nLine;
+ sal_uInt16 nCount = 0;
// zuerst wird der Bereich um dem Cursor bearbeitet
TextSelection aSel = pTextView->GetSelection();
- USHORT nCur = (USHORT)aSel.GetStart().GetPara();
+ sal_uInt16 nCur = (sal_uInt16)aSel.GetStart().GetPara();
if(nCur > 40)
nCur -= 40;
else
nCur = 0;
if(aSyntaxLineTable.Count())
- for(USHORT i = 0; i < 80 && nCount < 40; i++, nCur++)
+ for(sal_uInt16 i = 0; i < 80 && nCount < 40; i++, nCur++)
{
void * p = aSyntaxLineTable.Get(nCur);
if(p)
@@ -657,9 +657,9 @@ IMPL_LINK( SwSrcEditWindow, SyntaxTimerHdl, Timer *, pTimer )
void* p = aSyntaxLineTable.First();
while ( p && nCount < MAX_SYNTAX_HIGHLIGHT)
{
- nLine = (USHORT)aSyntaxLineTable.GetCurKey();
+ nLine = (sal_uInt16)aSyntaxLineTable.GetCurKey();
DoSyntaxHighlight( nLine );
- USHORT nCurKey = (USHORT)aSyntaxLineTable.GetCurKey();
+ sal_uInt16 nCurKey = (sal_uInt16)aSyntaxLineTable.GetCurKey();
p = aSyntaxLineTable.Next();
aSyntaxLineTable.Remove(nCurKey);
nCount ++;
@@ -675,9 +675,9 @@ IMPL_LINK( SwSrcEditWindow, SyntaxTimerHdl, Timer *, pTimer )
TextView* pTmp = pTextEngine->GetActiveView();
pTextEngine->SetActiveView(0);
- // pTextEngine->SetUpdateMode( TRUE );
+ // pTextEngine->SetUpdateMode( sal_True );
pTextEngine->SetActiveView(pTmp);
- pTextView->ShowCursor(FALSE, FALSE);
+ pTextView->ShowCursor(sal_False, sal_False);
*/
if(aSyntaxLineTable.Count() && !pTimer->IsActive())
@@ -688,7 +688,7 @@ IMPL_LINK( SwSrcEditWindow, SyntaxTimerHdl, Timer *, pTimer )
nCurTextWidth = pTextEngine->CalcTextWidth() + 25; // kleine Toleranz
if ( nCurTextWidth != nPrevTextWidth )
SetScrollBarRanges();
- bHighlighting = FALSE;
+ bHighlighting = sal_False;
return 0;
}
@@ -696,27 +696,27 @@ IMPL_LINK( SwSrcEditWindow, SyntaxTimerHdl, Timer *, pTimer )
--------------------------------------------------*/
-void SwSrcEditWindow::DoSyntaxHighlight( USHORT nPara )
+void SwSrcEditWindow::DoSyntaxHighlight( sal_uInt16 nPara )
{
// Durch das DelayedSyntaxHighlight kann es passieren,
// dass die Zeile nicht mehr existiert!
if ( nPara < pTextEngine->GetParagraphCount() )
{
- BOOL bTempModified = IsModified();
- pTextEngine->RemoveAttribs( nPara, (BOOL)TRUE );
+ sal_Bool bTempModified = IsModified();
+ pTextEngine->RemoveAttribs( nPara, (sal_Bool)sal_True );
String aSource( pTextEngine->GetText( nPara ) );
- pTextEngine->SetUpdateMode( FALSE );
+ pTextEngine->SetUpdateMode( sal_False );
ImpDoHighlight( aSource, nPara );
// os: #43050# hier wird ein TextView-Problem umpopelt:
// waehrend des Highlightings funktionierte das Scrolling nicht
TextView* pTmp = pTextEngine->GetActiveView();
- pTmp->SetAutoScroll(FALSE);
+ pTmp->SetAutoScroll(sal_False);
pTextEngine->SetActiveView(0);
- pTextEngine->SetUpdateMode( TRUE );
+ pTextEngine->SetUpdateMode( sal_True );
pTextEngine->SetActiveView(pTmp);
// Bug 72887 show the cursor
- pTmp->SetAutoScroll(TRUE);
- pTmp->ShowCursor( FALSE/*pTmp->IsAutoScroll()*/ );
+ pTmp->SetAutoScroll(sal_True);
+ pTmp->ShowCursor( sal_False/*pTmp->IsAutoScroll()*/ );
if(!bTempModified)
ClearModifyFlag();
@@ -727,11 +727,11 @@ void SwSrcEditWindow::DoSyntaxHighlight( USHORT nPara )
--------------------------------------------------*/
-void SwSrcEditWindow::DoDelayedSyntaxHighlight( USHORT nPara )
+void SwSrcEditWindow::DoDelayedSyntaxHighlight( sal_uInt16 nPara )
{
if ( !bHighlighting && bDoSyntaxHighlight )
{
- aSyntaxLineTable.Insert( nPara, (void*)(USHORT)1 );
+ aSyntaxLineTable.Insert( nPara, (void*)(sal_uInt16)1 );
aSyntaxIdleTimer.Start();
}
}
@@ -740,7 +740,7 @@ void SwSrcEditWindow::DoDelayedSyntaxHighlight( USHORT nPara )
--------------------------------------------------*/
-void SwSrcEditWindow::ImpDoHighlight( const String& rSource, USHORT nLineOff )
+void SwSrcEditWindow::ImpDoHighlight( const String& rSource, sal_uInt16 nLineOff )
{
SwTextPortions aPortionList;
lcl_Highlight(rSource, aPortionList);
@@ -762,16 +762,16 @@ void SwSrcEditWindow::ImpDoHighlight( const String& rSource, USHORT nLineOff )
// Wenn haufig gleiche Farbe, dazwischen Blank ohne Farbe,
// ggf. zusammenfassen, oder zumindest das Blank,
// damit weniger Attribute
- BOOL bOptimizeHighlight = TRUE; // war in der BasicIDE static
+ sal_Bool bOptimizeHighlight = sal_True; // war in der BasicIDE static
if ( bOptimizeHighlight )
{
// Es muessen nur die Blanks und Tabs mit attributiert werden.
// Wenn zwei gleiche Attribute hintereinander eingestellt werden,
// optimiert das die TextEngine.
- USHORT nLastEnd = 0;
+ sal_uInt16 nLastEnd = 0;
#ifdef DBG_UTIL
- USHORT nLine = aPortionList[0].nLine;
+ sal_uInt16 nLine = aPortionList[0].nLine;
#endif
for ( size_t i = 0; i < nCount; i++ )
{
@@ -803,8 +803,8 @@ void SwSrcEditWindow::ImpDoHighlight( const String& rSource, USHORT nLineOff )
r.eType != svtools::HTMLUNKNOWN)
r.eType = svtools::HTMLUNKNOWN;
Color aColor((ColorData)SW_MOD()->GetColorConfig().GetColorValue((svtools::ColorConfigEntry)r.eType).nColor);
- USHORT nLine = nLineOff+r.nLine; //
- pTextEngine->SetAttrib( TextAttribFontColor( aColor ), nLine, r.nStart, r.nEnd+1, TRUE );
+ sal_uInt16 nLine = nLineOff+r.nLine; //
+ pTextEngine->SetAttrib( TextAttribFontColor( aColor ), nLine, r.nStart, r.nEnd+1, sal_True );
}
}
@@ -832,7 +832,7 @@ void SwSrcEditWindow::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
else if( ( rTextHint.GetId() == TEXT_HINT_PARAINSERTED ) ||
( rTextHint.GetId() == TEXT_HINT_PARACONTENTCHANGED ) )
{
- DoDelayedSyntaxHighlight( (USHORT)rTextHint.GetValue() );
+ DoDelayedSyntaxHighlight( (sal_uInt16)rTextHint.GetValue() );
}
}
}
@@ -847,7 +847,7 @@ void SwSrcEditWindow::ConfigurationChanged( utl::ConfigurationBroadcaster* pBrdC
--------------------------------------------------*/
-void SwSrcEditWindow::Invalidate(USHORT )
+void SwSrcEditWindow::Invalidate(sal_uInt16 )
{
pOutWin->Invalidate();
Window::Invalidate();
@@ -892,7 +892,7 @@ void SwSrcEditWindow::GetFocus()
/* -----------------------------29.08.2002 13:21------------------------------
---------------------------------------------------------------------------*/
-BOOL lcl_GetLanguagesForEncoding(rtl_TextEncoding eEnc, LanguageType aLanguages[])
+sal_Bool lcl_GetLanguagesForEncoding(rtl_TextEncoding eEnc, LanguageType aLanguages[])
{
switch(eEnc)
{
diff --git a/sw/source/ui/envelp/envfmt.cxx b/sw/source/ui/envelp/envfmt.cxx
index 74484eb204..525085f51e 100644
--- a/sw/source/ui/envelp/envfmt.cxx
+++ b/sw/source/ui/envelp/envfmt.cxx
@@ -131,7 +131,7 @@ SwEnvFmtPage::SwEnvFmtPage(Window* pParent, const SfxItemSet& rSet) :
SetExchangeSupport();
// Metriken
- FieldUnit aMetric = ::GetDfltMetric(FALSE);
+ FieldUnit aMetric = ::GetDfltMetric(sal_False);
SetMetric(aAddrLeftField, aMetric);
SetMetric(aAddrTopField, aMetric);
SetMetric(aSendLeftField, aMetric);
@@ -176,29 +176,29 @@ SwEnvFmtPage::SwEnvFmtPage(Window* pParent, const SfxItemSet& rSet) :
aSizeFormatBox .SetSelectHdl(LINK(this, SwEnvFmtPage, FormatHdl));
// aSizeFormatBox
- for (USHORT i = PAPER_A3; i <= PAPER_KAI32BIG; i++)
+ for (sal_uInt16 i = PAPER_A3; i <= PAPER_KAI32BIG; i++)
{
if (i != PAPER_USER)
{
String aPaperName = SvxPaperInfo::GetName((Paper) i),
aEntryName;
- USHORT nPos = 0;
- BOOL bFound = FALSE;
+ sal_uInt16 nPos = 0;
+ sal_Bool bFound = sal_False;
while (nPos < aSizeFormatBox.GetEntryCount() && !bFound)
{
aEntryName = aSizeFormatBox.GetEntry(i);
if (aEntryName < aPaperName)
nPos++;
else
- bFound = TRUE;
+ bFound = sal_True;
}
aSizeFormatBox.InsertEntry(aPaperName, nPos);
- aIDs.Insert((USHORT) i, nPos);
+ aIDs.Insert((sal_uInt16) i, nPos);
}
}
aSizeFormatBox.InsertEntry(SvxPaperInfo::GetName(PAPER_USER));
- aIDs.Insert((USHORT) PAPER_USER, aIDs.Count());
+ aIDs.Insert((sal_uInt16) PAPER_USER, aIDs.Count());
}
@@ -226,13 +226,13 @@ IMPL_LINK_INLINE_START( SwEnvFmtPage, ModifyHdl, Edit *, pEdit )
if (pEdit == &aSizeWidthField || pEdit == &aSizeHeightField)
{
Paper ePaper = SvxPaperInfo::GetSvxPaper(
- Size(lHeight, lWidth), MAP_TWIP, TRUE);
- for (USHORT i = 0; i < aIDs.Count(); i++)
- if (aIDs[i] == (USHORT)ePaper)
+ Size(lHeight, lWidth), MAP_TWIP, sal_True);
+ for (sal_uInt16 i = 0; i < aIDs.Count(); i++)
+ if (aIDs[i] == (sal_uInt16)ePaper)
aSizeFormatBox.SelectEntryPos(i);
// Benutzergroesse merken
- if (aIDs[aSizeFormatBox.GetSelectEntryPos()] == (USHORT)PAPER_USER)
+ if (aIDs[aSizeFormatBox.GetSelectEntryPos()] == (sal_uInt16)PAPER_USER)
{
lUserW = lWidth ;
lUserH = lHeight;
@@ -259,9 +259,9 @@ IMPL_LINK( SwEnvFmtPage, EditHdl, MenuButton *, pButton )
ASSERT(pSh, "Shell fehlt");
// Collection-Ptr ermitteln
- BOOL bSender = pButton != &aAddrEditButton;
+ sal_Bool bSender = pButton != &aAddrEditButton;
- SwTxtFmtColl* pColl = pSh->GetTxtCollFromPool( static_cast< USHORT >(
+ SwTxtFmtColl* pColl = pSh->GetTxtCollFromPool( static_cast< sal_uInt16 >(
bSender ? RES_POOLCOLL_SENDADRESS : RES_POOLCOLL_JAKETADRESS));
ASSERT(pColl, "Text-Collection fehlt");
@@ -279,7 +279,7 @@ IMPL_LINK( SwEnvFmtPage, EditHdl, MenuButton *, pButton )
const SfxPoolItem *pTmpBrush;
if( SFX_ITEM_SET == aTmpSet.GetItemState( RES_CHRATR_BACKGROUND,
- TRUE, &pTmpBrush ) )
+ sal_True, &pTmpBrush ) )
{
SvxBrushItem aTmpBrush( *((SvxBrushItem*)pTmpBrush) );
aTmpBrush.SetWhich( RES_BACKGROUND );
@@ -297,7 +297,7 @@ IMPL_LINK( SwEnvFmtPage, EditHdl, MenuButton *, pButton )
{
SfxItemSet aOutputSet( *pDlg->GetOutputItemSet() );
if( SFX_ITEM_SET == aOutputSet.GetItemState( RES_BACKGROUND,
- FALSE, &pTmpBrush ) )
+ sal_False, &pTmpBrush ) )
{
SvxBrushItem aTmpBrush( *((SvxBrushItem*)pTmpBrush) );
aTmpBrush.SetWhich( RES_CHRATR_BACKGROUND );
@@ -322,7 +322,7 @@ IMPL_LINK( SwEnvFmtPage, EditHdl, MenuButton *, pButton )
const SvxTabStopItem& rDefTabs = (const SvxTabStopItem&)
pSh->GetView().GetCurShell()->GetPool().GetDefaultItem(RES_PARATR_TABSTOP);
- USHORT nDefDist = ::GetTabDist( rDefTabs );
+ sal_uInt16 nDefDist = ::GetTabDist( rDefTabs );
SfxUInt16Item aDefDistItem( SID_ATTR_TABSTOP_DEFAULTS, nDefDist );
aTmpSet.Put( aDefDistItem );
@@ -346,9 +346,9 @@ IMPL_LINK( SwEnvFmtPage, EditHdl, MenuButton *, pButton )
// Defaults evtl umsetzen
const SfxPoolItem* pItem = 0;
SfxItemSet* pOutputSet = (SfxItemSet*)pDlg->GetOutputItemSet();
- USHORT nNewDist;
+ sal_uInt16 nNewDist;
if( SFX_ITEM_SET == pOutputSet->GetItemState( SID_ATTR_TABSTOP_DEFAULTS,
- FALSE, &pItem ) &&
+ sal_False, &pItem ) &&
nDefDist != (nNewDist = ((SfxUInt16Item*)pItem)->GetValue()) )
{
SvxTabStopItem aDefTabs( 0, 0, SVX_TAB_ADJUST_DEFAULT, RES_PARATR_TABSTOP );
@@ -373,16 +373,16 @@ IMPL_LINK( SwEnvFmtPage, EditHdl, MenuButton *, pButton )
Beschreibung: Ein temporaeres Itemset, das bei Abbruch verworfen wird
------------------------------------------------------------------------*/
-SfxItemSet *SwEnvFmtPage::GetCollItemSet(SwTxtFmtColl* pColl, BOOL bSender)
+SfxItemSet *SwEnvFmtPage::GetCollItemSet(SwTxtFmtColl* pColl, sal_Bool bSender)
{
SfxItemSet *&pAddrSet = bSender ? GetParent()->pSenderSet : GetParent()->pAddresseeSet;
if (!pAddrSet)
{
// Range ermitteln (Ranges beider Itemsets mergen)
- const USHORT *pRanges = pColl->GetAttrSet().GetRanges();
+ const sal_uInt16 *pRanges = pColl->GetAttrSet().GetRanges();
- static USHORT __READONLY_DATA aRanges[] =
+ static sal_uInt16 __READONLY_DATA aRanges[] =
{
RES_PARATR_BEGIN, RES_PARATR_ADJUST,
RES_PARATR_TABSTOP, RES_PARATR_END-1,
@@ -396,12 +396,12 @@ SfxItemSet *SwEnvFmtPage::GetCollItemSet(SwTxtFmtColl* pColl, BOOL bSender)
};
// BruteForce-Merge, weil MergeRange in SvTools buggy ist:
- USHORT i = 0;
+ sal_uInt16 i = 0;
SvLongsSort aMergedRanges( 0, 10 );
while (pRanges[i])
{
- for (USHORT nPos = pRanges[i]; nPos <= pRanges[i+1]; nPos++)
+ for (sal_uInt16 nPos = pRanges[i]; nPos <= pRanges[i+1]; nPos++)
aMergedRanges.Insert(nPos);
i += 2;
}
@@ -410,7 +410,7 @@ SfxItemSet *SwEnvFmtPage::GetCollItemSet(SwTxtFmtColl* pColl, BOOL bSender)
while (aRanges[i])
{
- for (USHORT nPos = aRanges[i]; nPos <= aRanges[i+1]; nPos++)
+ for (sal_uInt16 nPos = aRanges[i]; nPos <= aRanges[i+1]; nPos++)
aMergedRanges.Insert(nPos);
i += 2;
}
@@ -438,9 +438,9 @@ SfxItemSet *SwEnvFmtPage::GetCollItemSet(SwTxtFmtColl* pColl, BOOL bSender)
}
// Neue Ranges erzeugen
- USHORT *pNewRanges = new USHORT[aCompactedRanges.Count() + 1];
+ sal_uInt16 *pNewRanges = new sal_uInt16[aCompactedRanges.Count() + 1];
for (i = 0; i < aCompactedRanges.Count(); i++)
- pNewRanges[i] = (USHORT)aCompactedRanges[i];
+ pNewRanges[i] = (sal_uInt16)aCompactedRanges[i];
pNewRanges[i] = 0;
@@ -466,8 +466,8 @@ IMPL_LINK( SwEnvFmtPage, FormatHdl, ListBox *, EMPTYARG )
long lAddrFromLeft;
long lAddrFromTop;
- USHORT nPaper = aIDs[aSizeFormatBox.GetSelectEntryPos()];
- if (nPaper != (USHORT)PAPER_USER)
+ sal_uInt16 nPaper = aIDs[aSizeFormatBox.GetSelectEntryPos()];
+ if (nPaper != (sal_uInt16)PAPER_USER)
{
Size aSz = SvxPaperInfo::GetPaperSize((Paper)nPaper);
lWidth = Max(aSz.Width(), aSz.Height());
@@ -577,8 +577,8 @@ void SwEnvFmtPage::FillItem(SwEnvItem& rItem)
rItem.lSendFromLeft = static_cast< sal_Int32 >(GetFldVal(aSendLeftField));
rItem.lSendFromTop = static_cast< sal_Int32 >(GetFldVal(aSendTopField ));
- USHORT nPaper = aIDs[aSizeFormatBox.GetSelectEntryPos()];
- if (nPaper == (USHORT)PAPER_USER)
+ sal_uInt16 nPaper = aIDs[aSizeFormatBox.GetSelectEntryPos()];
+ if (nPaper == (sal_uInt16)PAPER_USER)
{
long lWVal = static_cast< long >(GetFldVal(aSizeWidthField ));
long lHVal = static_cast< long >(GetFldVal(aSizeHeightField));
@@ -597,11 +597,11 @@ void SwEnvFmtPage::FillItem(SwEnvItem& rItem)
// --------------------------------------------------------------------------
-BOOL __EXPORT SwEnvFmtPage::FillItemSet(SfxItemSet& rSet)
+sal_Bool __EXPORT SwEnvFmtPage::FillItemSet(SfxItemSet& rSet)
{
FillItem(GetParent()->aEnvItem);
rSet.Put(GetParent()->aEnvItem);
- return TRUE;
+ return sal_True;
}
// --------------------------------------------------------------------------
@@ -613,9 +613,9 @@ void __EXPORT SwEnvFmtPage::Reset(const SfxItemSet& rSet)
Paper ePaper = SvxPaperInfo::GetSvxPaper(
Size( Min(rItem.lWidth, rItem.lHeight),
- Max(rItem.lWidth, rItem.lHeight)), MAP_TWIP, TRUE);
- for (USHORT i = 0; i < (USHORT) aIDs.Count(); i++)
- if (aIDs[i] == (USHORT)ePaper)
+ Max(rItem.lWidth, rItem.lHeight)), MAP_TWIP, sal_True);
+ for (sal_uInt16 i = 0; i < (sal_uInt16) aIDs.Count(); i++)
+ if (aIDs[i] == (sal_uInt16)ePaper)
aSizeFormatBox.SelectEntryPos(i);
// Die MetricFields
diff --git a/sw/source/ui/envelp/envfmt.hxx b/sw/source/ui/envelp/envfmt.hxx
index 9c45d6b3c0..9691c9bfae 100644
--- a/sw/source/ui/envelp/envfmt.hxx
+++ b/sw/source/ui/envelp/envfmt.hxx
@@ -88,7 +88,7 @@ class SwEnvFmtPage : public SfxTabPage
void SetMinMax();
- SfxItemSet *GetCollItemSet(SwTxtFmtColl* pColl, BOOL bSender);
+ SfxItemSet *GetCollItemSet(SwTxtFmtColl* pColl, sal_Bool bSender);
using Window::GetParent;
SwEnvDlg *GetParent() {return (SwEnvDlg*) SfxTabPage::GetParent()->GetParent();}
@@ -103,7 +103,7 @@ public:
virtual void ActivatePage(const SfxItemSet& rSet);
virtual int DeactivatePage(SfxItemSet* pSet = 0);
void FillItem(SwEnvItem& rItem);
- virtual BOOL FillItemSet(SfxItemSet& rSet);
+ virtual sal_Bool FillItemSet(SfxItemSet& rSet);
virtual void Reset(const SfxItemSet& rSet);
};
diff --git a/sw/source/ui/envelp/envimg.cxx b/sw/source/ui/envelp/envimg.cxx
index 85acf6e37c..7cc04560dc 100644
--- a/sw/source/ui/envelp/envimg.cxx
+++ b/sw/source/ui/envelp/envimg.cxx
@@ -72,7 +72,7 @@ SW_DLLPUBLIC String MakeSender()
String sRet;
String sSenderToken(SW_RES(STR_SENDER_TOKENS));
xub_StrLen nSttPos = 0, nTokenCount = sSenderToken.GetTokenCount(';');
- BOOL bLastLength = TRUE;
+ sal_Bool bLastLength = sal_True;
for( xub_StrLen i = 0; i < nTokenCount; i++ )
{
String sToken = sSenderToken.GetToken( 0, ';', nSttPos );
@@ -86,7 +86,7 @@ SW_DLLPUBLIC String MakeSender()
{
if(bLastLength)
sRet +=NEXTLINE;
- bLastLength = TRUE;
+ bLastLength = sal_True;
}
else if(sToken.EqualsAscii("FIRSTNAME"))
sRet += (String)rUserOpt.GetFirstName();
@@ -112,7 +112,7 @@ SwEnvItem::SwEnvItem() :
SfxPoolItem(FN_ENVELOP)
{
aAddrText = aEmptyStr;
- bSend = TRUE;
+ bSend = sal_True;
aSendText = MakeSender();
lSendFromLeft = 566; // 1 cm
lSendFromTop = 566; // 1 cm
@@ -120,7 +120,7 @@ SwEnvItem::SwEnvItem() :
lWidth = aEnvSz.Width();
lHeight = aEnvSz.Height();
eAlign = ENV_HOR_LEFT;
- bPrintFromAbove = TRUE;
+ bPrintFromAbove = sal_True;
lShiftRight = 0;
lShiftDown = 0;
@@ -322,7 +322,7 @@ Sequence<rtl::OUString> SwEnvCfgItem::GetPropertyNames()
return aNames;
}
-BOOL SwEnvItem::QueryValue( Any& rVal, BYTE nMemberId ) const
+sal_Bool SwEnvItem::QueryValue( Any& rVal, sal_uInt8 nMemberId ) const
{
sal_Bool bRet = sal_True;
switch(nMemberId & ~CONVERT_TWIPS)
@@ -349,9 +349,9 @@ BOOL SwEnvItem::QueryValue( Any& rVal, BYTE nMemberId ) const
/* -----------------------------26.04.01 12:26--------------------------------
---------------------------------------------------------------------------*/
-BOOL SwEnvItem::PutValue(const Any& rVal, BYTE nMemberId)
+sal_Bool SwEnvItem::PutValue(const Any& rVal, sal_uInt8 nMemberId)
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
switch(nMemberId & ~CONVERT_TWIPS)
{
case MID_ENV_ADDR_TEXT : bRet = (rVal >>= aAddrText); break;
diff --git a/sw/source/ui/envelp/envlop1.cxx b/sw/source/ui/envelp/envlop1.cxx
index 2c68ee52a6..4bd38b8f25 100644
--- a/sw/source/ui/envelp/envlop1.cxx
+++ b/sw/source/ui/envelp/envlop1.cxx
@@ -100,8 +100,8 @@ void SwEnvPreview::Paint(const Rectangle &)
const SwEnvItem& rItem =
((SwEnvDlg*) GetParent()->GetParent()->GetParent())->aEnvItem;
- USHORT nPageW = (USHORT) Max(rItem.lWidth, rItem.lHeight),
- nPageH = (USHORT) Min(rItem.lWidth, rItem.lHeight);
+ sal_uInt16 nPageW = (sal_uInt16) Max(rItem.lWidth, rItem.lHeight),
+ nPageH = (sal_uInt16) Min(rItem.lWidth, rItem.lHeight);
float fx = (float)GetOutputSizePixel().Width () / (float)nPageW,
fy = (float)GetOutputSizePixel().Height() / (float)nPageH,
@@ -117,8 +117,8 @@ void SwEnvPreview::Paint(const Rectangle &)
SetLineColor( aFront );
// Umschlag
- long nW = (USHORT) (f * nPageW),
- nH = (USHORT) (f * nPageH),
+ long nW = (sal_uInt16) (f * nPageW),
+ nH = (sal_uInt16) (f * nPageH),
nX = (GetOutputSizePixel().Width () - nW) / 2,
nY = (GetOutputSizePixel().Height() - nH) / 2;
SetFillColor( aBack );
@@ -127,28 +127,28 @@ void SwEnvPreview::Paint(const Rectangle &)
// Absender
if (rItem.bSend)
{
- long nSendX = nX + (USHORT) (f * rItem.lSendFromLeft),
- nSendY = nY + (USHORT) (f * rItem.lSendFromTop ),
- nSendW = (USHORT) (f * (rItem.lAddrFromLeft - rItem.lSendFromLeft)),
- nSendH = (USHORT) (f * (rItem.lAddrFromTop - rItem.lSendFromTop - 566));
+ long nSendX = nX + (sal_uInt16) (f * rItem.lSendFromLeft),
+ nSendY = nY + (sal_uInt16) (f * rItem.lSendFromTop ),
+ nSendW = (sal_uInt16) (f * (rItem.lAddrFromLeft - rItem.lSendFromLeft)),
+ nSendH = (sal_uInt16) (f * (rItem.lAddrFromTop - rItem.lSendFromTop - 566));
SetFillColor( aMedium );
DrawRect(Rectangle(Point(nSendX, nSendY), Size(nSendW, nSendH)));
}
// Empfaenger
- long nAddrX = nX + (USHORT) (f * rItem.lAddrFromLeft),
- nAddrY = nY + (USHORT) (f * rItem.lAddrFromTop ),
- nAddrW = (USHORT) (f * (nPageW - rItem.lAddrFromLeft - 566)),
- nAddrH = (USHORT) (f * (nPageH - rItem.lAddrFromTop - 566));
+ long nAddrX = nX + (sal_uInt16) (f * rItem.lAddrFromLeft),
+ nAddrY = nY + (sal_uInt16) (f * rItem.lAddrFromTop ),
+ nAddrW = (sal_uInt16) (f * (nPageW - rItem.lAddrFromLeft - 566)),
+ nAddrH = (sal_uInt16) (f * (nPageH - rItem.lAddrFromTop - 566));
SetFillColor( aMedium );
DrawRect(Rectangle(Point(nAddrX, nAddrY), Size(nAddrW, nAddrH)));
// Briefmarke
- long nStmpW = (USHORT) (f * 1417 /* 2,5 cm */),
- nStmpH = (USHORT) (f * 1701 /* 3,0 cm */),
- nStmpX = nX + nW - (USHORT) (f * 566) - nStmpW,
- nStmpY = nY + (USHORT) (f * 566);
+ long nStmpW = (sal_uInt16) (f * 1417 /* 2,5 cm */),
+ nStmpH = (sal_uInt16) (f * 1701 /* 3,0 cm */),
+ nStmpX = nX + nW - (sal_uInt16) (f * 566) - nStmpW,
+ nStmpY = nY + (sal_uInt16) (f * 566);
SetFillColor( aBack );
DrawRect(Rectangle(Point(nStmpX, nStmpY), Size(nStmpW, nStmpH)));
@@ -159,9 +159,9 @@ void SwEnvPreview::Paint(const Rectangle &)
SwEnvDlg::SwEnvDlg(Window* pParent, const SfxItemSet& rSet,
- SwWrtShell* pWrtSh, Printer* pPrt, BOOL bInsert) :
+ SwWrtShell* pWrtSh, Printer* pPrt, sal_Bool bInsert) :
- SfxTabDialog(pParent, SW_RES(DLG_ENV), &rSet, FALSE, &aEmptyStr),
+ SfxTabDialog(pParent, SW_RES(DLG_ENV), &rSet, sal_False, &aEmptyStr),
sInsert(SW_RES(ST_INSERT)),
sChange(SW_RES(ST_CHANGE)),
aEnvItem((const SwEnvItem&) rSet.Get(FN_ENVELOP)),
@@ -200,7 +200,7 @@ SwEnvDlg::~SwEnvDlg()
-void SwEnvDlg::PageCreated(USHORT nId, SfxTabPage &rPage)
+void SwEnvDlg::PageCreated(sal_uInt16 nId, SfxTabPage &rPage)
{
if (nId == TP_ENV_PRT)
{
@@ -285,7 +285,7 @@ SwEnvPage::~SwEnvPage()
IMPL_LINK( SwEnvPage, DatabaseHdl, ListBox *, pListBox )
{
- SwWait aWait( *pSh->GetView().GetDocShell(), TRUE );
+ SwWait aWait( *pSh->GetView().GetDocShell(), sal_True );
if (pListBox == &aDatabaseLB)
{
@@ -330,7 +330,7 @@ IMPL_LINK( SwEnvPage, FieldHdl, Button *, EMPTYARG )
IMPL_LINK( SwEnvPage, SenderHdl, Button *, EMPTYARG )
{
- const BOOL bEnable = aSenderBox.IsChecked();
+ const sal_Bool bEnable = aSenderBox.IsChecked();
GetParent()->aEnvItem.bSend = bEnable;
aSenderEdit.Enable(bEnable);
if ( bEnable )
@@ -418,11 +418,11 @@ void SwEnvPage::FillItem(SwEnvItem& rItem)
-BOOL SwEnvPage::FillItemSet(SfxItemSet& rSet)
+sal_Bool SwEnvPage::FillItemSet(SfxItemSet& rSet)
{
FillItem(GetParent()->aEnvItem);
rSet.Put(GetParent()->aEnvItem);
- return TRUE;
+ return sal_True;
}
// ----------------------------------------------------------------------------
diff --git a/sw/source/ui/envelp/envprt.cxx b/sw/source/ui/envelp/envprt.cxx
index b7c155a72a..03bbb199c3 100644
--- a/sw/source/ui/envelp/envprt.cxx
+++ b/sw/source/ui/envelp/envprt.cxx
@@ -69,7 +69,7 @@ SwEnvPrtPage::SwEnvPrtPage(Window* pParent, const SfxItemSet& rSet) :
SetExchangeSupport();
// Metriken
- FieldUnit eUnit = ::GetDfltMetric(FALSE);
+ FieldUnit eUnit = ::GetDfltMetric(sal_False);
SetMetric(aRightField, eUnit);
SetMetric(aDownField , eUnit);
@@ -158,15 +158,15 @@ IMPL_LINK( SwEnvPrtPage, AlignHdl, ToolBox *, EMPTYARG )
{
if (aAlignBox.GetCurItemId())
{
- for (USHORT i = ITM_HOR_LEFT; i <= ITM_VER_RGHT; i++)
- aAlignBox.CheckItem(i, FALSE);
- aAlignBox.CheckItem(aAlignBox.GetCurItemId(), TRUE);
+ for (sal_uInt16 i = ITM_HOR_LEFT; i <= ITM_VER_RGHT; i++)
+ aAlignBox.CheckItem(i, sal_False);
+ aAlignBox.CheckItem(aAlignBox.GetCurItemId(), sal_True);
}
else
{
// GetCurItemId() == 0 ist moeglich!
const SwEnvItem& rItem = (const SwEnvItem&) GetItemSet().Get(FN_ENVELOP);
- aAlignBox.CheckItem((USHORT) rItem.eAlign + ITM_HOR_LEFT, TRUE);
+ aAlignBox.CheckItem((sal_uInt16) rItem.eAlign + ITM_HOR_LEFT, sal_True);
}
return 0;
}
@@ -207,8 +207,8 @@ int SwEnvPrtPage::DeactivatePage(SfxItemSet* _pSet)
void SwEnvPrtPage::FillItem(SwEnvItem& rItem)
{
- USHORT nID = 0;
- for (USHORT i = ITM_HOR_LEFT; i <= ITM_VER_RGHT && !nID; i++)
+ sal_uInt16 nID = 0;
+ for (sal_uInt16 i = ITM_HOR_LEFT; i <= ITM_VER_RGHT && !nID; i++)
if (aAlignBox.IsItemChecked(i))
nID = i;
@@ -222,11 +222,11 @@ void SwEnvPrtPage::FillItem(SwEnvItem& rItem)
-BOOL SwEnvPrtPage::FillItemSet(SfxItemSet& rSet)
+sal_Bool SwEnvPrtPage::FillItemSet(SfxItemSet& rSet)
{
FillItem(GetParent()->aEnvItem);
rSet.Put(GetParent()->aEnvItem);
- return TRUE;
+ return sal_True;
}
// ----------------------------------------------------------------------------
@@ -240,7 +240,7 @@ void SwEnvPrtPage::Reset(const SfxItemSet& rSet)
// Item auslesen
const SwEnvItem& rItem = (const SwEnvItem&) rSet.Get(FN_ENVELOP);
- aAlignBox.CheckItem((USHORT) rItem.eAlign + ITM_HOR_LEFT);
+ aAlignBox.CheckItem((sal_uInt16) rItem.eAlign + ITM_HOR_LEFT);
if (rItem.bPrintFromAbove)
aTopButton .Check();
diff --git a/sw/source/ui/envelp/envprt.hxx b/sw/source/ui/envelp/envprt.hxx
index 0ac2d90ca4..e0c021708f 100644
--- a/sw/source/ui/envelp/envprt.hxx
+++ b/sw/source/ui/envelp/envprt.hxx
@@ -83,7 +83,7 @@ public:
virtual void ActivatePage(const SfxItemSet& rSet);
virtual int DeactivatePage(SfxItemSet* pSet = 0);
void FillItem(SwEnvItem& rItem);
- virtual BOOL FillItemSet(SfxItemSet& rSet);
+ virtual sal_Bool FillItemSet(SfxItemSet& rSet);
virtual void Reset(const SfxItemSet& rSet);
inline void SetPrt(Printer* pPrinter) { pPrt = pPrinter; }
diff --git a/sw/source/ui/envelp/label1.cxx b/sw/source/ui/envelp/label1.cxx
index a9f6af7ba6..110dc05c66 100644
--- a/sw/source/ui/envelp/label1.cxx
+++ b/sw/source/ui/envelp/label1.cxx
@@ -472,17 +472,17 @@ IMPL_LINK( SwLabPage, MakeHdl, ListBox *, EMPTYARG )
for ( sal_uInt16 i = 0; i < nCount; ++i )
{
const String aType ( GetParent()->Recs()[i]->aType );
- BOOL bInsert = FALSE;
+ sal_Bool bInsert = sal_False;
if ( GetParent()->Recs()[i]->aType == sCustom )
{
- bInsert = TRUE;
+ bInsert = sal_True;
aTypeBox.InsertEntry(aType );
}
else if ( GetParent()->Recs()[i]->bCont == bCont )
{
if ( aHiddenSortTypeBox.GetEntryPos(aType) == LISTBOX_ENTRY_NOTFOUND )
{
- bInsert = TRUE;
+ bInsert = sal_True;
aHiddenSortTypeBox.InsertEntry( aType );
}
}
@@ -524,7 +524,7 @@ IMPL_LINK_INLINE_END( SwLabPage, TypeHdl, ListBox *, EMPTYARG )
void SwLabPage::DisplayFormat()
{
MetricField aField(this, WinBits(0));
- FieldUnit aMetric = ::GetDfltMetric(FALSE);
+ FieldUnit aMetric = ::GetDfltMetric(sal_False);
SetMetric(aField, aMetric);
aField.SetDecimalDigits(2);
aField.SetMin (0);
diff --git a/sw/source/ui/envelp/labelcfg.cxx b/sw/source/ui/envelp/labelcfg.cxx
index 4cd165e6ca..db5db74e5f 100644
--- a/sw/source/ui/envelp/labelcfg.cxx
+++ b/sw/source/ui/envelp/labelcfg.cxx
@@ -99,8 +99,8 @@ SwLabRec* lcl_CreateSwLabRec(Sequence<Any>& rValues, const OUString& rManufactur
//continuous flag ('C'/'S')
pValues[nProp] >>= sTmp;
String sMeasure(sTmp);
- USHORT nTokenCount = sMeasure.GetTokenCount(';');
- for(USHORT i = 0; i < nTokenCount; i++)
+ sal_uInt16 nTokenCount = sMeasure.GetTokenCount(';');
+ for(sal_uInt16 i = 0; i < nTokenCount; i++)
{
String sToken(sMeasure.GetToken(i, ';' ));
int nVal = sToken.ToInt32();
diff --git a/sw/source/ui/envelp/labelexp.cxx b/sw/source/ui/envelp/labelexp.cxx
index 604677395e..c2d6596f20 100644
--- a/sw/source/ui/envelp/labelexp.cxx
+++ b/sw/source/ui/envelp/labelexp.cxx
@@ -185,7 +185,7 @@ IMPL_LINK( SwVisitingCardPage, AutoTextSelectHdl, void*, pBox )
aBlockNames.getConstArray() );
}
if(pExampleFrame->IsInitialized())
- pExampleFrame->ClearDocument( TRUE );
+ pExampleFrame->ClearDocument( sal_True );
}
return 0;
}
diff --git a/sw/source/ui/envelp/labfmt.cxx b/sw/source/ui/envelp/labfmt.cxx
index feae56b71e..4d1adfa200 100644
--- a/sw/source/ui/envelp/labfmt.cxx
+++ b/sw/source/ui/envelp/labfmt.cxx
@@ -54,7 +54,7 @@ using namespace ::com::sun::star::beans;
// #define ------------------------------------------------------------------
-#define ROUND(x) ((USHORT) ((x) + .5))
+#define ROUND(x) ((sal_uInt16) ((x) + .5))
// --------------------------------------------------------------------------
SwLabPreview::SwLabPreview( const SwLabFmtPage* pParent, const ResId& rResID ) :
@@ -79,7 +79,7 @@ SwLabPreview::SwLabPreview( const SwLabFmtPage* pParent, const ResId& rResID ) :
SetBackground(Wallpaper(rWinColor));
Font aFont = GetFont();
- aFont.SetTransparent(TRUE);
+ aFont.SetTransparent(sal_True);
aFont.SetWeight (WEIGHT_NORMAL);
SetFont(aFont);
@@ -127,7 +127,7 @@ void SwLabPreview::Paint(const Rectangle &)
SetLineColor(rWinColor);
SetFillColor(aGrayColor);
Font aPaintFont(GetFont());
- aPaintFont.SetTransparent(FALSE);
+ aPaintFont.SetTransparent(sal_False);
SetFont(aPaintFont);
// Groesse des darzustellenden Bereichs
@@ -175,8 +175,8 @@ void SwLabPreview::Paint(const Rectangle &)
// Etiketten
SetClipRegion (Rectangle(Point(lX0, lY0), Size(lOutlineW, lOutlineH)));
SetFillColor(rWinColor);
- for (USHORT nRow = 0; nRow < Min((USHORT) 2, (USHORT) aItem.nRows); nRow++)
- for (USHORT nCol = 0; nCol < Min((USHORT) 2, (USHORT) aItem.nCols); nCol++)
+ for (sal_uInt16 nRow = 0; nRow < Min((sal_uInt16) 2, (sal_uInt16) aItem.nRows); nRow++)
+ for (sal_uInt16 nCol = 0; nCol < Min((sal_uInt16) 2, (sal_uInt16) aItem.nCols); nCol++)
DrawRect(Rectangle(
Point(ROUND(lX0 + f * (aItem.lLeft + nCol * aItem.lHDist)),
ROUND(lY0 + f * (aItem.lUpper + nRow * aItem.lVDist))),
@@ -188,15 +188,15 @@ void SwLabPreview::Paint(const Rectangle &)
if (aItem.lLeft)
{
long lX = (lX0 + lX1) / 2;
- DrawArrow(Point(lX0, lY0 - 5), Point(lX1, lY0 - 5), FALSE);
- DrawArrow(Point(lX, lY0 - 10), Point(lX, lY0 - 5), TRUE);
+ DrawArrow(Point(lX0, lY0 - 5), Point(lX1, lY0 - 5), sal_False);
+ DrawArrow(Point(lX, lY0 - 10), Point(lX, lY0 - 5), sal_True);
DrawText(Point(lX1 - lLeftWidth, lY0 - 10 - lXHeight), aLeftStr);
}
// Beschriftung: Rand oben
if (aItem.lUpper)
{
- DrawArrow(Point(lX0 - 5, lY0), Point(lX0 - 5, lY1), FALSE);
+ DrawArrow(Point(lX0 - 5, lY0), Point(lX0 - 5, lY1), sal_False);
DrawText(Point(lX0 - 10 - lUpperWidth, ROUND(lY0 + f * aItem.lUpper / 2 - lXHeight / 2)), aUpperStr);
}
@@ -216,29 +216,29 @@ void SwLabPreview::Paint(const Rectangle &)
if (aItem.nCols > 1)
{
long lX = (lX1 + lX3) / 2;
- DrawArrow(Point(lX1, lY0 - 5), Point(lX3, lY0 - 5), FALSE);
- DrawArrow(Point(lX, lY0 - 10), Point(lX, lY0 - 5), TRUE);
+ DrawArrow(Point(lX1, lY0 - 5), Point(lX3, lY0 - 5), sal_False);
+ DrawArrow(Point(lX, lY0 - 10), Point(lX, lY0 - 5), sal_True);
DrawText(Point(lX - lHDistWidth / 2, lY0 - 10 - lXHeight), aHDistStr);
}
// Beschriftung: Vertikaler Abstand
if (aItem.nRows > 1)
{
- DrawArrow(Point(lX0 - 5, lY1), Point(lX0 - 5, lY3), FALSE);
+ DrawArrow(Point(lX0 - 5, lY1), Point(lX0 - 5, lY3), sal_False);
DrawText(Point(lX0 - 10 - lVDistWidth, ROUND(lY1 + f * aItem.lVDist / 2 - lXHeight / 2)), aVDistStr);
}
// Beschriftung: Spalten
{
long lY = lY0 + lOutlineH + 4;
- DrawArrow(Point(lX0, lY), Point(lX0 + lOutlineW - 1, lY), TRUE);
+ DrawArrow(Point(lX0, lY), Point(lX0 + lOutlineW - 1, lY), sal_True);
DrawText(Point((lX0 + lX0 + lOutlineW - 1) / 2 - lColsWidth / 2, lY + 5), aColsStr);
}
// Beschriftung: Zeilen
{
long lX = lX0 + lOutlineW + 4;
- DrawArrow(Point(lX, lY0), Point(lX, lY0 + lOutlineH - 1), TRUE);
+ DrawArrow(Point(lX, lY0), Point(lX, lY0 + lOutlineH - 1), sal_True);
DrawText(Point(lX + 5, (lY0 + lY0 + lOutlineH - 1 - lXHeight / 2) / 2), aRowsStr);
}
}
@@ -247,7 +247,7 @@ void SwLabPreview::Paint(const Rectangle &)
-void SwLabPreview::DrawArrow(const Point &rP1, const Point &rP2, BOOL bArrow)
+void SwLabPreview::DrawArrow(const Point &rP1, const Point &rP2, sal_Bool bArrow)
{
DrawLine(rP1, rP2);
@@ -334,14 +334,14 @@ SwLabFmtPage::SwLabFmtPage(Window* pParent, const SfxItemSet& rSet) :
aRowsText (this, SW_RES(TXT_ROWS )),
aRowsField (this, SW_RES(FLD_ROWS )),
aSavePB (this, SW_RES(PB_SAVE )),
- bModified(FALSE),
+ bModified(sal_False),
aItem ((const SwLabItem&) rSet.Get(FN_LABEL))
{
FreeResource();
SetExchangeSupport();
// Metriken
- FieldUnit aMetric = ::GetDfltMetric(FALSE);
+ FieldUnit aMetric = ::GetDfltMetric(sal_False);
SetMetric(aHDistField , aMetric);
SetMetric(aVDistField , aMetric);
SetMetric(aWidthField , aMetric);
@@ -390,7 +390,7 @@ SwLabFmtPage::~SwLabFmtPage()
IMPL_LINK_INLINE_START( SwLabFmtPage, ModifyHdl, Edit *, EMPTYARG )
{
- bModified = TRUE;
+ bModified = sal_True;
aPreviewTimer.Start();
return 0;
}
@@ -515,7 +515,7 @@ int SwLabFmtPage::DeactivatePage(SfxItemSet* _pSet)
if (_pSet)
FillItemSet(*_pSet);
- return TRUE;
+ return sal_True;
}
// --------------------------------------------------------------------------
@@ -535,8 +535,8 @@ void SwLabFmtPage::FillItem(SwLabItem& rItem)
rItem.lHeight = rRec.lHeight = static_cast< long >(GETFLDVAL(aHeightField));
rItem.lLeft = rRec.lLeft = static_cast< long >(GETFLDVAL(aLeftField ));
rItem.lUpper = rRec.lUpper = static_cast< long >(GETFLDVAL(aUpperField ));
- rItem.nCols = rRec.nCols = (USHORT) aColsField.GetValue();
- rItem.nRows = rRec.nRows = (USHORT) aRowsField.GetValue();
+ rItem.nCols = rRec.nCols = (sal_uInt16) aColsField.GetValue();
+ rItem.nRows = rRec.nRows = (sal_uInt16) aRowsField.GetValue();
}
}
@@ -544,12 +544,12 @@ void SwLabFmtPage::FillItem(SwLabItem& rItem)
-BOOL SwLabFmtPage::FillItemSet(SfxItemSet& rSet)
+sal_Bool SwLabFmtPage::FillItemSet(SfxItemSet& rSet)
{
FillItem(aItem);
rSet.Put(aItem);
- return TRUE;
+ return sal_True;
}
// --------------------------------------------------------------------------
@@ -594,18 +594,18 @@ IMPL_LINK( SwLabFmtPage, SaveHdl, PushButton *, EMPTYARG )
aRec.lHeight = static_cast< long >(GETFLDVAL(aHeightField));
aRec.lLeft = static_cast< long >(GETFLDVAL(aLeftField ));
aRec.lUpper = static_cast< long >(GETFLDVAL(aUpperField ));
- aRec.nCols = (USHORT) aColsField.GetValue();
- aRec.nRows = (USHORT) aRowsField.GetValue();
+ aRec.nCols = (sal_uInt16) aColsField.GetValue();
+ aRec.nRows = (sal_uInt16) aRowsField.GetValue();
aRec.bCont = aItem.bCont;
SwSaveLabelDlg* pSaveDlg = new SwSaveLabelDlg(this, aRec);
pSaveDlg->SetLabel(aItem.aLstMake, aItem.aLstType);
pSaveDlg->Execute();
if(pSaveDlg->GetLabel(aItem))
{
- bModified = FALSE;
+ bModified = sal_False;
const Sequence<OUString>& rMan = GetParent()->GetLabelsConfig().GetManufacturers();
SvStringsDtor& rMakes = GetParent()->Makes();
- if(rMakes.Count() < (USHORT)rMan.getLength())
+ if(rMakes.Count() < (sal_uInt16)rMan.getLength())
{
rMakes.DeleteAndDestroy(0, rMakes.Count());
const OUString* pMan = rMan.getConstArray();
diff --git a/sw/source/ui/envelp/labfmt.hxx b/sw/source/ui/envelp/labfmt.hxx
index 8b3be95f5e..6922951b29 100644
--- a/sw/source/ui/envelp/labfmt.hxx
+++ b/sw/source/ui/envelp/labfmt.hxx
@@ -66,7 +66,7 @@ class SwLabPreview : public Window
void Paint(const Rectangle&);
- void DrawArrow(const Point& rP1, const Point& rP2, BOOL bArrow);
+ void DrawArrow(const Point& rP1, const Point& rP2, sal_Bool bArrow);
using Window::GetParent;
SwLabFmtPage* GetParent() {return (SwLabFmtPage*) Window::GetParent();}
@@ -107,7 +107,7 @@ class SwLabFmtPage : public SfxTabPage
PushButton aSavePB;
Timer aPreviewTimer;
- BOOL bModified;
+ sal_Bool bModified;
SwLabItem aItem;
@@ -132,7 +132,7 @@ public:
virtual void ActivatePage(const SfxItemSet& rSet);
virtual int DeactivatePage(SfxItemSet* pSet = 0);
void FillItem(SwLabItem& rItem);
- virtual BOOL FillItemSet(SfxItemSet& rSet);
+ virtual sal_Bool FillItemSet(SfxItemSet& rSet);
virtual void Reset(const SfxItemSet& rSet);
SwLabDlg* GetParent() {return (SwLabDlg*) SfxTabPage::GetParent()->GetParent();}
diff --git a/sw/source/ui/envelp/labimg.cxx b/sw/source/ui/envelp/labimg.cxx
index 2b436c9e7b..a65f3cfd60 100644
--- a/sw/source/ui/envelp/labimg.cxx
+++ b/sw/source/ui/envelp/labimg.cxx
@@ -59,8 +59,8 @@ SwLabItem::SwLabItem() :
nCol (1),
nRow (1)
{
- bAddr = bCont = bSynchron = FALSE;
- bPage = TRUE;
+ bAddr = bCont = bSynchron = sal_False;
+ bPage = sal_True;
lHDist =
lVDist =
lWidth =
@@ -400,7 +400,7 @@ SwLabCfgItem::SwLabCfgItem(sal_Bool bLabel) :
aItem.aCompFax = aItem.aPrivFax = rUserOpt.GetFax();
aItem.aCompMail = aItem.aPrivMail = rUserOpt.GetEmail();
aItem.aCompState = aItem.aPrivState = rUserOpt.GetState();
- aItem.bSynchron = TRUE;
+ aItem.bSynchron = sal_True;
SetModified();
}
}
diff --git a/sw/source/ui/envelp/labprt.cxx b/sw/source/ui/envelp/labprt.cxx
index 59b4d9684c..41315f95e5 100644
--- a/sw/source/ui/envelp/labprt.cxx
+++ b/sw/source/ui/envelp/labprt.cxx
@@ -125,7 +125,7 @@ IMPL_LINK( SwLabPrtPage, CountHdl, Button *, pButton )
aPrinterInfo.SetText(pPrinter->GetName());
return 0;
}
- const BOOL bEnable = pButton == &aSingleButton;
+ const sal_Bool bEnable = pButton == &aSingleButton;
aColText .Enable(bEnable);
aColField.Enable(bEnable);
aRowText .Enable(bEnable);
@@ -168,7 +168,7 @@ int SwLabPrtPage::DeactivatePage(SfxItemSet* _pSet)
if ( _pSet )
FillItemSet(*_pSet);
- return TRUE;
+ return sal_True;
}
// --------------------------------------------------------------------------
@@ -178,8 +178,8 @@ int SwLabPrtPage::DeactivatePage(SfxItemSet* _pSet)
void SwLabPrtPage::FillItem(SwLabItem& rItem)
{
rItem.bPage = aPageButton.IsChecked();
- rItem.nCol = (USHORT) aColField.GetValue();
- rItem.nRow = (USHORT) aRowField.GetValue();
+ rItem.nCol = (sal_uInt16) aColField.GetValue();
+ rItem.nRow = (sal_uInt16) aRowField.GetValue();
rItem.bSynchron = aSynchronCB.IsChecked() && aSynchronCB.IsEnabled();
}
@@ -187,14 +187,14 @@ void SwLabPrtPage::FillItem(SwLabItem& rItem)
-BOOL SwLabPrtPage::FillItemSet(SfxItemSet& rSet)
+sal_Bool SwLabPrtPage::FillItemSet(SfxItemSet& rSet)
{
SwLabItem aItem;
GetParent()->GetLabItem(aItem);
FillItem(aItem);
rSet.Put(aItem);
- return TRUE;
+ return sal_True;
}
// --------------------------------------------------------------------------
diff --git a/sw/source/ui/envelp/labprt.hxx b/sw/source/ui/envelp/labprt.hxx
index e64f7d739d..ab11de0ed4 100644
--- a/sw/source/ui/envelp/labprt.hxx
+++ b/sw/source/ui/envelp/labprt.hxx
@@ -76,7 +76,7 @@ public:
virtual void ActivatePage(const SfxItemSet& rSet);
virtual int DeactivatePage(SfxItemSet* pSet = 0);
void FillItem(SwLabItem& rItem);
- virtual BOOL FillItemSet(SfxItemSet& rSet);
+ virtual sal_Bool FillItemSet(SfxItemSet& rSet);
virtual void Reset(const SfxItemSet& rSet);
inline Printer* GetPrt() { return (pPrinter); }
};
diff --git a/sw/source/ui/envelp/mailmrge.cxx b/sw/source/ui/envelp/mailmrge.cxx
index 76595d5543..f25789b734 100644
--- a/sw/source/ui/envelp/mailmrge.cxx
+++ b/sw/source/ui/envelp/mailmrge.cxx
@@ -226,16 +226,16 @@ SwMailMergeDlg::SwMailMergeDlg(Window* pParent, SwWrtShell& rShell,
FreeResource();
aSingleJobsCB.Show(sal_False); // not supported in since cws printerpullpages anymore
//task #97066# mailing of form letters is currently not supported
- aMailingRB.Show(FALSE);
- aSubjectFT.Show(FALSE);
- aSubjectED.Show(FALSE);
- aFormatFT.Show(FALSE);
- aFormatSwCB.Show(FALSE);
- aFormatHtmlCB.Show(FALSE);
- aFormatRtfCB.Show(FALSE);
- aAttachFT.Show(FALSE);
- aAttachED.Show(FALSE);
- aAttachPB.Show(FALSE);
+ aMailingRB.Show(sal_False);
+ aSubjectFT.Show(sal_False);
+ aSubjectED.Show(sal_False);
+ aFormatFT.Show(sal_False);
+ aFormatSwCB.Show(sal_False);
+ aFormatHtmlCB.Show(sal_False);
+ aFormatRtfCB.Show(sal_False);
+ aAttachFT.Show(sal_False);
+ aAttachED.Show(sal_False);
+ aAttachPB.Show(sal_False);
Point aMailPos = aMailingRB.GetPosPixel();
Point aFilePos = aFileRB.GetPosPixel();
@@ -247,7 +247,7 @@ SwMailMergeDlg::SwMailMergeDlg(Window* pParent, SwWrtShell& rShell,
m_aSelection = *pSelection;
//move all controls
long nDiff = aRecordFL.GetPosPixel().Y() - pBeamerWin->GetPosPixel().Y();
- pBeamerWin->Show(FALSE);
+ pBeamerWin->Show(sal_False);
::Size aSize = GetSizePixel();
aSize.Height() -= nDiff;
SetSizePixel(aSize);
@@ -352,7 +352,7 @@ SwMailMergeDlg::SwMailMergeDlg(Window* pParent, SwWrtShell& rShell,
aFormatHtmlCB.Check((nMailingMode & TXTFORMAT_HTML) != 0);
aFormatRtfCB.Check((nMailingMode & TXTFORMAT_RTF) != 0);
- aAllRB.Check(TRUE);
+ aAllRB.Check(sal_True);
// Handler installieren
Link aLk = LINK(this, SwMailMergeDlg, ButtonHdl);
@@ -373,7 +373,7 @@ SwMailMergeDlg::SwMailMergeDlg(Window* pParent, SwWrtShell& rShell,
aLk = LINK(this, SwMailMergeDlg, FilenameHdl);
aGenerateFromDataBaseCB.SetClickHdl( aLk );
- BOOL bColumn = pModOpt->IsNameFromColumn();
+ sal_Bool bColumn = pModOpt->IsNameFromColumn();
if(bColumn)
aGenerateFromDataBaseCB.Check();
@@ -395,7 +395,7 @@ SwMailMergeDlg::SwMailMergeDlg(Window* pParent, SwWrtShell& rShell,
pNewDBMgr->GetColumnNames(&aAddressFldLB, _xConnection, rTableName);
else
pNewDBMgr->GetColumnNames(&aAddressFldLB, rDBName, rTableName);
- for(USHORT nEntry = 0; nEntry < aAddressFldLB.GetEntryCount(); nEntry++)
+ for(sal_uInt16 nEntry = 0; nEntry < aAddressFldLB.GetEntryCount(); nEntry++)
aColumnLB.InsertEntry(aAddressFldLB.GetEntry(nEntry));
aAddressFldLB.SelectEntry(C2S("EMAIL"));
@@ -424,14 +424,14 @@ SwMailMergeDlg::SwMailMergeDlg(Window* pParent, SwWrtShell& rShell,
if (aColumnLB.GetSelectEntryCount() == 0)
aColumnLB.SelectEntryPos(0);
- const BOOL bEnable = m_aSelection.getLength() != 0;
+ const sal_Bool bEnable = m_aSelection.getLength() != 0;
aMarkedRB.Enable(bEnable);
if (bEnable)
aMarkedRB.Check();
else
{
aAllRB.Check();
- aMarkedRB.Enable(FALSE);
+ aMarkedRB.Enable(sal_False);
}
SetMinOutputSizePixel(m_aDialogSize);
try
@@ -448,7 +448,7 @@ SwMailMergeDlg::SwMailMergeDlg(Window* pParent, SwWrtShell& rShell,
const ::rtl::OUString sName = OUString::createFromAscii("Name");
const ::rtl::OUString sFlags = OUString::createFromAscii("Flags");
const ::rtl::OUString sUIName = OUString::createFromAscii("UIName");
- USHORT nODT = USHRT_MAX;
+ sal_uInt16 nODT = USHRT_MAX;
while(xList->hasMoreElements())
{
comphelper::SequenceAsHashMap aFilter(xList->nextElement());
@@ -469,7 +469,7 @@ SwMailMergeDlg::SwMailMergeDlg(Window* pParent, SwWrtShell& rShell,
}
if( sUIName2.getLength() )
{
- USHORT nFilter = aFilterLB.InsertEntry( sUIName2 );
+ sal_uInt16 nFilter = aFilterLB.InsertEntry( sUIName2 );
if( 0 == sFilter.compareToAscii("writer8") )
nODT = nFilter;
aFilterLB.SetEntryData( nFilter, new ::rtl::OUString( sFilter ) );
@@ -496,7 +496,7 @@ SwMailMergeDlg::~SwMailMergeDlg()
else
delete pBeamerWin;
- for( USHORT nFilter = 0; nFilter < aFilterLB.GetEntryCount(); ++nFilter )
+ for( sal_uInt16 nFilter = 0; nFilter < aFilterLB.GetEntryCount(); ++nFilter )
{
::rtl::OUString* pData = reinterpret_cast< ::rtl::OUString* >( aFilterLB.GetEntryData(nFilter) );
delete pData;
@@ -684,7 +684,7 @@ IMPL_LINK( SwMailMergeDlg, SaveTypeHdl, RadioButton*, pBtn )
IMPL_LINK( SwMailMergeDlg, FilenameHdl, CheckBox*, pBox )
{
- BOOL bEnable = pBox->IsChecked();
+ sal_Bool bEnable = pBox->IsChecked();
aColumnFT.Enable( bEnable );
aColumnLB.Enable(bEnable);
aPathFT.Enable( bEnable );
@@ -728,7 +728,7 @@ bool SwMailMergeDlg::ExecQryShell()
}
else
{
- nMergeType = static_cast< USHORT >( aSaveSingleDocRB.IsChecked() ?
+ nMergeType = static_cast< sal_uInt16 >( aSaveSingleDocRB.IsChecked() ?
DBMGR_MERGE_SINGLE_FILE : DBMGR_MERGE_MAILFILES );
SfxMedium* pMedium = rSh.GetView().GetDocShell()->GetMedium();
INetURLObject aAbs;
@@ -804,17 +804,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/syncbtn.cxx b/sw/source/ui/envelp/syncbtn.cxx
index dba0170d20..97cffa7b73 100644
--- a/sw/source/ui/envelp/syncbtn.cxx
+++ b/sw/source/ui/envelp/syncbtn.cxx
@@ -51,7 +51,7 @@ SFX_IMPL_FLOATINGWINDOW( SwSyncChildWin, FN_SYNC_LABELS )
------------------------------------------------------------------------*/
SwSyncChildWin::SwSyncChildWin( Window* _pParent,
- USHORT nId,
+ sal_uInt16 nId,
SfxBindings* pBindings,
SfxChildWinInfo* pInfo ) :
SfxChildWindow( _pParent, nId )
diff --git a/sw/source/ui/fldui/DropDownFieldDialog.cxx b/sw/source/ui/fldui/DropDownFieldDialog.cxx
index 823ce5570c..fda9c75fc8 100644
--- a/sw/source/ui/fldui/DropDownFieldDialog.cxx
+++ b/sw/source/ui/fldui/DropDownFieldDialog.cxx
@@ -49,7 +49,7 @@ using namespace ::com::sun::star;
--------------------------------------------------------------------*/
sw::DropDownFieldDialog::DropDownFieldDialog( Window *pParent, SwWrtShell &rS,
- SwField* pField, BOOL bNextButton ) :
+ SwField* pField, sal_Bool bNextButton ) :
SvxStandardDialog(pParent, SW_RES(DLG_FLD_DROPDOWN)),
aItemsFL( this, SW_RES( FL_ITEMS )),
@@ -93,7 +93,7 @@ sw::DropDownFieldDialog::DropDownFieldDialog( Window *pParent, SwWrtShell &rS,
aListItemsLB.SelectEntry(pDropField->GetSelectedItem());
}
- BOOL bEnable = !rSh.IsCrsrReadonly();
+ sal_Bool bEnable = !rSh.IsCrsrReadonly();
aOKPB.Enable( bEnable );
aListItemsLB.GrabFocus();
diff --git a/sw/source/ui/fldui/changedb.cxx b/sw/source/ui/fldui/changedb.cxx
index 17759f7a3b..baf5d88e04 100644
--- a/sw/source/ui/fldui/changedb.cxx
+++ b/sw/source/ui/fldui/changedb.cxx
@@ -166,12 +166,12 @@ void SwChangeDBDlg::FillDBPopup()
SvStringsDtor aDBNameList(5, 1);
pSh->GetAllUsedDB( aDBNameList, &aAllDBNames );
- USHORT nCount = aDBNameList.Count();
+ sal_uInt16 nCount = aDBNameList.Count();
aUsedDBTLB.Clear();
SvLBoxEntry *pFirst = 0;
SvLBoxEntry *pLast = 0;
- for (USHORT k = 0; k < nCount; k++)
+ for (sal_uInt16 k = 0; k < nCount; k++)
{
sDBName = *aDBNameList.GetObject(k);
sDBName = sDBName.GetToken(0);
@@ -201,8 +201,8 @@ SvLBoxEntry* SwChangeDBDlg::Insert(const String& rDBName)
SvLBoxEntry* pParent;
SvLBoxEntry* pChild;
- USHORT nParent = 0;
- USHORT nChild = 0;
+ sal_uInt16 nParent = 0;
+ sal_uInt16 nChild = 0;
Image aTableImg = aImageList.GetImage(IMG_DBTABLE);
Image aDBImg = aImageList.GetImage(IMG_DB);
@@ -259,7 +259,7 @@ void __EXPORT SwChangeDBDlg::Apply()
--------------------------------------------------------------------*/
void SwChangeDBDlg::UpdateFlds()
{
- SvStringsDtor aDBNames( (BYTE)aUsedDBTLB.GetSelectionCount(), 1 );
+ SvStringsDtor aDBNames( (sal_uInt8)aUsedDBTLB.GetSelectionCount(), 1 );
SvLBoxEntry* pEntry = aUsedDBTLB.FirstSelected();
while( pEntry )
@@ -271,7 +271,7 @@ void SwChangeDBDlg::UpdateFlds()
*pTmp += DB_DELIM;
*pTmp += aUsedDBTLB.GetEntryText( pEntry );
*pTmp += DB_DELIM;
- int nCommandType = (int)(ULONG)pEntry->GetUserData();
+ int nCommandType = (int)(sal_uLong)pEntry->GetUserData();
*pTmp += String::CreateFromInt32(nCommandType);
aDBNames.Insert(pTmp, aDBNames.Count() );
}
@@ -317,14 +317,14 @@ IMPL_LINK( SwChangeDBDlg, ButtonHdl, Button *, EMPTYARG )
IMPL_LINK( SwChangeDBDlg, TreeSelectHdl, SvTreeListBox *, EMPTYARG )
{
- BOOL bEnable = FALSE;
+ sal_Bool bEnable = sal_False;
SvLBoxEntry* pEntry = aAvailDBTLB.GetCurEntry();
if (pEntry)
{
if (aAvailDBTLB.GetParent(pEntry))
- bEnable = TRUE;
+ bEnable = sal_True;
aOKBT.Enable( bEnable );
}
return 0;
@@ -341,7 +341,7 @@ void SwChangeDBDlg::ShowDBName(const SwDBData& rDBData)
sTmp += '.';
sTmp += (String)rDBData.sCommand;
- for (USHORT i = 0; i < sTmp.Len(); i++)
+ for (sal_uInt16 i = 0; i < sTmp.Len(); i++)
{
sName += sTmp.GetChar(i);
if (sTmp.GetChar(i) == '~')
diff --git a/sw/source/ui/fldui/flddb.cxx b/sw/source/ui/fldui/flddb.cxx
index 274bbdf12f..f9e99f5516 100644
--- a/sw/source/ui/fldui/flddb.cxx
+++ b/sw/source/ui/fldui/flddb.cxx
@@ -71,7 +71,7 @@ SwFldDBPage::SwFldDBPage(Window* pParent, const SfxItemSet& rCoreSet ) :
aTypeFT (this, SW_RES(FT_DBTYPE)),
aTypeLB (this, SW_RES(LB_DBTYPE)),
aSelectionFT(this, SW_RES(FT_DBSELECTION)),
- aDatabaseTLB(this, SW_RES(TLB_DBLIST), 0, aEmptyStr, FALSE),
+ aDatabaseTLB(this, SW_RES(TLB_DBLIST), 0, aEmptyStr, sal_False),
aAddDBFT(this, SW_RES(FT_ADDDB)),
aAddDBPB(this, SW_RES(PB_ADDDB)),
aConditionFT(this, SW_RES(FT_DBCONDITION)),
@@ -113,13 +113,13 @@ void __EXPORT SwFldDBPage::Reset(const SfxItemSet&)
{
Init(); // Allgemeine initialisierung
- aTypeLB.SetUpdateMode(FALSE);
- USHORT nOldPos = aTypeLB.GetSelectEntryPos();
+ aTypeLB.SetUpdateMode(sal_False);
+ sal_uInt16 nOldPos = aTypeLB.GetSelectEntryPos();
sOldDBName = aDatabaseTLB.GetDBName(sOldTableName, sOldColumnName);
aTypeLB.Clear();
- USHORT nPos, nTypeId, i;
+ sal_uInt16 nPos, nTypeId, i;
if (!IsFldEdit())
{
@@ -146,11 +146,11 @@ void __EXPORT SwFldDBPage::Reset(const SfxItemSet&)
aFormatLB.Clear();
- USHORT nSize = GetFldMgr().GetFormatCount(TYP_DBSETNUMBERFLD, FALSE, IsFldDlgHtmlMode());
+ sal_uInt16 nSize = GetFldMgr().GetFormatCount(TYP_DBSETNUMBERFLD, sal_False, IsFldDlgHtmlMode());
for( i = 0; i < nSize; ++i )
{
- USHORT nEntryPos = aFormatLB.InsertEntry(GetFldMgr().GetFormatStr(TYP_DBSETNUMBERFLD, i));
- USHORT nFmtId = GetFldMgr().GetFormatId( TYP_DBSETNUMBERFLD, i );
+ sal_uInt16 nEntryPos = aFormatLB.InsertEntry(GetFldMgr().GetFormatStr(TYP_DBSETNUMBERFLD, i));
+ sal_uInt16 nFmtId = GetFldMgr().GetFormatId( TYP_DBSETNUMBERFLD, i );
aFormatLB.SetEntryData( nEntryPos, reinterpret_cast<void*>(nFmtId) );
if( SVX_NUM_ARABIC == nFmtId )
aFormatLB.SelectEntryPos( nEntryPos );
@@ -184,11 +184,11 @@ void __EXPORT SwFldDBPage::Reset(const SfxItemSet&)
if(sUserData.GetToken(0, ';').EqualsIgnoreCaseAscii(USER_DATA_VERSION_1))
{
String sVal = sUserData.GetToken(1, ';');
- USHORT nVal = (USHORT)sVal.ToInt32();
+ sal_uInt16 nVal = (sal_uInt16)sVal.ToInt32();
if(nVal != USHRT_MAX)
{
for(i = 0; i < aTypeLB.GetEntryCount(); i++)
- if(nVal == (USHORT)(ULONG)aTypeLB.GetEntryData(i))
+ if(nVal == (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(i))
{
aTypeLB.SelectEntryPos(i);
break;
@@ -198,7 +198,7 @@ void __EXPORT SwFldDBPage::Reset(const SfxItemSet&)
}
TypeHdl(0);
- aTypeLB.SetUpdateMode(TRUE);
+ aTypeLB.SetUpdateMode(sal_True);
aTypeLB.SetSelectHdl(LINK(this, SwFldDBPage, TypeHdl));
aTypeLB.SetDoubleClickHdl(LINK(this, SwFldDBPage, InsertHdl));
@@ -216,7 +216,7 @@ void __EXPORT SwFldDBPage::Reset(const SfxItemSet&)
Beschreibung:
--------------------------------------------------------------------*/
-BOOL __EXPORT SwFldDBPage::FillItemSet(SfxItemSet& )
+sal_Bool __EXPORT SwFldDBPage::FillItemSet(SfxItemSet& )
{
String sTableName, sColumnName;
SwDBData aData;
@@ -233,11 +233,11 @@ BOOL __EXPORT SwFldDBPage::FillItemSet(SfxItemSet& )
if(aData.sDataSource.getLength()) // Ohne Datenbank kein neuer Feldbefehl
{
- USHORT nTypeId = (USHORT)(ULONG)aTypeLB.GetEntryData(GetTypeSel());
+ sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel());
String aVal(aValueED.GetText());
String aName(aConditionED.GetText());
- ULONG nFormat = 0;
- USHORT nSubType = 0;
+ sal_uLong nFormat = 0;
+ sal_uInt16 nSubType = 0;
String sDBName = aData.sDataSource;
sDBName += DB_DELIM;
@@ -262,7 +262,7 @@ BOOL __EXPORT SwFldDBPage::FillItemSet(SfxItemSet& )
break;
case TYP_DBSETNUMBERFLD:
- nFormat = (USHORT)(ULONG)aFormatLB.GetEntryData(
+ nFormat = (sal_uInt16)(sal_uLong)aFormatLB.GetEntryData(
aFormatLB.GetSelectEntryPos() );
break;
}
@@ -270,7 +270,7 @@ BOOL __EXPORT SwFldDBPage::FillItemSet(SfxItemSet& )
String sTempDBName, sTempTableName, sTempColumnName;
sTempDBName = aDatabaseTLB.GetDBName(sTempTableName, sTempColumnName);
- BOOL bDBListBoxChanged = sOldDBName != sTempDBName ||
+ sal_Bool bDBListBoxChanged = sOldDBName != sTempDBName ||
sOldTableName != sTempTableName || sOldColumnName != sTempColumnName;
if (!IsFldEdit() ||
aConditionED.GetSavedValue() != aConditionED.GetText() ||
@@ -282,7 +282,7 @@ BOOL __EXPORT SwFldDBPage::FillItemSet(SfxItemSet& )
}
}
- return FALSE;
+ return sal_False;
}
/*--------------------------------------------------------------------
@@ -299,7 +299,7 @@ SfxTabPage* __EXPORT SwFldDBPage::Create( Window* pParent,
Beschreibung:
--------------------------------------------------------------------*/
-USHORT SwFldDBPage::GetGroup()
+sal_uInt16 SwFldDBPage::GetGroup()
{
return GRP_DB;
}
@@ -311,7 +311,7 @@ USHORT SwFldDBPage::GetGroup()
IMPL_LINK( SwFldDBPage, TypeHdl, ListBox *, pBox )
{
// Alte ListBoxPos sichern
- const USHORT nOld = GetTypeSel();
+ const sal_uInt16 nOld = GetTypeSel();
// Aktuelle ListBoxPos
SetTypeSel(aTypeLB.GetSelectEntryPos());
@@ -327,8 +327,8 @@ IMPL_LINK( SwFldDBPage, TypeHdl, ListBox *, pBox )
SwWrtShell *pSh = GetWrtShell();
if(!pSh)
pSh = ::GetActiveWrtShell();
- BOOL bCond = FALSE, bSetNo = FALSE, bFormat = FALSE, bDBFormat = FALSE;
- USHORT nTypeId = (USHORT)(ULONG)aTypeLB.GetEntryData(GetTypeSel());
+ sal_Bool bCond = sal_False, bSetNo = sal_False, bFormat = sal_False, bDBFormat = sal_False;
+ sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel());
aDatabaseTLB.ShowColumns(nTypeId == TYP_DBFLD);
@@ -351,8 +351,8 @@ IMPL_LINK( SwFldDBPage, TypeHdl, ListBox *, pBox )
switch (nTypeId)
{
case TYP_DBFLD:
- bFormat = TRUE;
- bDBFormat = TRUE;
+ bFormat = sal_True;
+ bDBFormat = sal_True;
aNumFormatLB.Show();
aFormatLB.Hide();
@@ -372,10 +372,10 @@ IMPL_LINK( SwFldDBPage, TypeHdl, ListBox *, pBox )
break;
case TYP_DBNUMSETFLD:
- bSetNo = TRUE;
+ bSetNo = sal_True;
// kein break!
case TYP_DBNEXTSETFLD:
- bCond = TRUE;
+ bCond = sal_True;
if (IsFldEdit())
{
aConditionED.SetText(GetCurField()->GetPar1());
@@ -387,14 +387,14 @@ IMPL_LINK( SwFldDBPage, TypeHdl, ListBox *, pBox )
break;
case TYP_DBSETNUMBERFLD:
- bFormat = TRUE;
+ bFormat = sal_True;
aNewFormatRB.Check();
aNumFormatLB.Hide();
aFormatLB.Show();
if( IsFldEdit() )
{
- for( USHORT nI = aFormatLB.GetEntryCount(); nI; )
- if( GetCurField()->GetFormat() == (USHORT)(ULONG)
+ for( sal_uInt16 nI = aFormatLB.GetEntryCount(); nI; )
+ if( GetCurField()->GetFormat() == (sal_uInt16)(sal_uLong)
aFormatLB.GetEntryData( --nI ))
{
aFormatLB.SelectEntryPos( nI );
@@ -422,7 +422,7 @@ IMPL_LINK( SwFldDBPage, TypeHdl, ListBox *, pBox )
aValueED.SetText(aEmptyStr);
if (bCond)
aConditionED.SetText( String::CreateFromAscii(
- RTL_CONSTASCII_STRINGPARAM( "TRUE" )));
+ RTL_CONSTASCII_STRINGPARAM( "sal_True" )));
else
aConditionED.SetText(aEmptyStr);
}
@@ -451,8 +451,8 @@ IMPL_LINK( SwFldDBPage, NumSelectHdl, NumFormatListBox *, pLB )
void SwFldDBPage::CheckInsert()
{
- BOOL bInsert = TRUE;
- USHORT nTypeId = (USHORT)(ULONG)aTypeLB.GetEntryData(GetTypeSel());
+ sal_Bool bInsert = sal_True;
+ sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel());
SvLBoxEntry* pEntry = aDatabaseTLB.GetCurEntry();
@@ -466,11 +466,11 @@ void SwFldDBPage::CheckInsert()
bInsert &= pEntry != 0;
}
else
- bInsert = FALSE;
+ bInsert = sal_False;
if (nTypeId == TYP_DBNUMSETFLD)
{
- BOOL bHasValue = aValueED.GetText().Len() != 0;
+ sal_Bool bHasValue = aValueED.GetText().Len() != 0;
bInsert &= bHasValue;
}
@@ -488,7 +488,7 @@ IMPL_LINK( SwFldDBPage, TreeSelectHdl, SvTreeListBox *, pBox )
SvLBoxEntry* pEntry = pColEntry = pBox->GetCurEntry();
if (pEntry)
{
- USHORT nTypeId = (USHORT)(ULONG)aTypeLB.GetEntryData(GetTypeSel());
+ sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel());
pEntry = aDatabaseTLB.GetParent(pEntry);
@@ -499,13 +499,13 @@ IMPL_LINK( SwFldDBPage, TreeSelectHdl, SvTreeListBox *, pBox )
if (nTypeId == TYP_DBFLD)
{
- BOOL bNumFormat = FALSE;
+ sal_Bool bNumFormat = sal_False;
if (pEntry != 0)
{
String sTableName;
String sColumnName;
- BOOL bIsTable;
+ sal_Bool bIsTable;
String sDBName = aDatabaseTLB.GetDBName(sTableName, sColumnName, &bIsTable);
bNumFormat = GetFldMgr().IsDBNumeric(sDBName,
sTableName,
@@ -554,12 +554,12 @@ void SwFldDBPage::FillUserData()
String sData( String::CreateFromAscii(
RTL_CONSTASCII_STRINGPARAM( USER_DATA_VERSION )));
sData += ';';
- USHORT nTypeSel = aTypeLB.GetSelectEntryPos();
+ sal_uInt16 nTypeSel = aTypeLB.GetSelectEntryPos();
if( LISTBOX_ENTRY_NOTFOUND == nTypeSel )
nTypeSel = USHRT_MAX;
else
- nTypeSel = (USHORT)(ULONG)aTypeLB.GetEntryData( nTypeSel );
+ nTypeSel = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData( nTypeSel );
sData += String::CreateFromInt32( nTypeSel );
SetUserData(sData);
}
@@ -568,7 +568,7 @@ void SwFldDBPage::FillUserData()
* --------------------------------------------------*/
void SwFldDBPage::ActivateMailMergeAddress()
{
- ULONG nData = TYP_DBFLD;
+ sal_uLong nData = TYP_DBFLD;
aTypeLB.SelectEntryPos(aTypeLB.GetEntryPos( (const void*) nData ));
aTypeLB.GetSelectHdl().Call(&aTypeLB);
const SwDBData& rData = SW_MOD()->GetDBConfig()->GetAddressSource();
diff --git a/sw/source/ui/fldui/flddb.hxx b/sw/source/ui/fldui/flddb.hxx
index 88ffe343ab..a2a91692fd 100644
--- a/sw/source/ui/fldui/flddb.hxx
+++ b/sw/source/ui/fldui/flddb.hxx
@@ -68,8 +68,8 @@ class SwFldDBPage : public SwFldPage
String sOldDBName;
String sOldTableName;
String sOldColumnName;
- ULONG nOldFormat;
- USHORT nOldSubType;
+ sal_uLong nOldFormat;
+ sal_uInt16 nOldSubType;
Link aOldNumSelectHdl;
DECL_LINK( TypeHdl, ListBox* );
@@ -83,7 +83,7 @@ class SwFldDBPage : public SwFldPage
using SwFldPage::SetWrtShell;
protected:
- virtual USHORT GetGroup();
+ virtual sal_uInt16 GetGroup();
public:
SwFldDBPage(Window* pParent, const SfxItemSet& rSet);
@@ -92,7 +92,7 @@ public:
static SfxTabPage* Create(Window* pParent, const SfxItemSet& rAttrSet);
- virtual BOOL FillItemSet( SfxItemSet& rSet );
+ virtual sal_Bool FillItemSet( SfxItemSet& rSet );
virtual void Reset( const SfxItemSet& rSet );
virtual void FillUserData();
diff --git a/sw/source/ui/fldui/flddinf.cxx b/sw/source/ui/fldui/flddinf.cxx
index 9243037bb2..b4924cffaa 100644
--- a/sw/source/ui/fldui/flddinf.cxx
+++ b/sw/source/ui/fldui/flddinf.cxx
@@ -96,9 +96,9 @@ SwFldDokInfPage::SwFldDokInfPage(Window* pWindow, const SfxItemSet& rCoreSet ) :
aTypeTLB.SetNodeDefaultImages();
//enable 'active' language selection
- aFormatLB.SetShowLanguageControl(TRUE);
+ aFormatLB.SetShowLanguageControl(sal_True);
- SFX_ITEMSET_ARG( &rCoreSet, pItem, SfxUnoAnyItem, SID_DOCINFO, FALSE );
+ SFX_ITEMSET_ARG( &rCoreSet, pItem, SfxUnoAnyItem, SID_DOCINFO, sal_False );
if ( pItem )
pItem->GetValue() >>= xCustomPropertySet;
}
@@ -120,17 +120,17 @@ void __EXPORT SwFldDokInfPage::Reset(const SfxItemSet& )
Init(); // Allgemeine initialisierung
// TypeListBox initialisieren
- aTypeTLB.SetUpdateMode(FALSE);
+ aTypeTLB.SetUpdateMode(sal_False);
aTypeTLB.Clear();
pSelEntry = 0;
// SubTypes in der TypeLB anzeigen
- USHORT nTypeId = TYP_DOCINFOFLD;
+ sal_uInt16 nTypeId = TYP_DOCINFOFLD;
SvLBoxEntry* pEntry = 0;
SvLBoxEntry* pInfo = 0;
- USHORT nSubType = USHRT_MAX;
+ sal_uInt16 nSubType = USHRT_MAX;
if (IsFldEdit())
{
const SwField* pCurField = GetCurField();
@@ -149,17 +149,17 @@ void __EXPORT SwFldDokInfPage::Reset(const SfxItemSet& )
}
}
- USHORT nSelEntryData = USHRT_MAX;
+ sal_uInt16 nSelEntryData = USHRT_MAX;
String sUserData = GetUserData();
if(sUserData.GetToken(0, ';').EqualsIgnoreCaseAscii(USER_DATA_VERSION_1))
{
String sVal = sUserData.GetToken(1, ';');
- nSelEntryData = static_cast< USHORT >(sVal.ToInt32());
+ nSelEntryData = static_cast< sal_uInt16 >(sVal.ToInt32());
}
SvStringsDtor aLst;
GetFldMgr().GetSubTypes(nTypeId, aLst);
- for (USHORT i = 0; i < aLst.Count(); ++i)
+ for (sal_uInt16 i = 0; i < aLst.Count(); ++i)
{
if (!IsFldEdit() || nSubType == i)
{
@@ -210,19 +210,19 @@ void __EXPORT SwFldDokInfPage::Reset(const SfxItemSet& )
if (pSelEntry != 0)
{
aTypeTLB.Select(pSelEntry);
- nSubType = (USHORT)(ULONG)pSelEntry->GetUserData();
+ nSubType = (sal_uInt16)(sal_uLong)pSelEntry->GetUserData();
}
else if ( aTypeTLB.GetEntry(0) )
{
pSelEntry = aTypeTLB.GetEntry(0);
- nSubType = (USHORT)(ULONG)pSelEntry->GetUserData();
+ nSubType = (sal_uInt16)(sal_uLong)pSelEntry->GetUserData();
}
FillSelectionLB(nSubType);
if ( pSelEntry )
TypeHdl();
- aTypeTLB.SetUpdateMode(TRUE);
+ aTypeTLB.SetUpdateMode(sal_True);
aTypeTLB.SetSelectHdl(LINK(this, SwFldDokInfPage, TypeHdl));
aTypeTLB.SetDoubleClickHdl(LINK(this, SwFldDokInfPage, InsertHdl));
aSelectionLB.SetSelectHdl(LINK(this, SwFldDokInfPage, SubTypeHdl));
@@ -257,7 +257,7 @@ IMPL_LINK( SwFldDokInfPage, TypeHdl, ListBox *, EMPTYARG )
else
if (pOldEntry != pSelEntry)
- FillSelectionLB((USHORT)(ULONG)pSelEntry->GetUserData());
+ FillSelectionLB((sal_uInt16)(sal_uLong)pSelEntry->GetUserData());
SubTypeHdl();
@@ -269,10 +269,10 @@ IMPL_LINK( SwFldDokInfPage, TypeHdl, ListBox *, EMPTYARG )
--------------------------------------------------------------------*/
IMPL_LINK( SwFldDokInfPage, SubTypeHdl, ListBox *, EMPTYARG )
{
- USHORT nSubType = (USHORT)(ULONG)pSelEntry->GetUserData();
- USHORT nPos = aSelectionLB.GetSelectEntryPos();
- USHORT nExtSubType;
- USHORT nNewType = 0;
+ sal_uInt16 nSubType = (sal_uInt16)(sal_uLong)pSelEntry->GetUserData();
+ sal_uInt16 nPos = aSelectionLB.GetSelectEntryPos();
+ sal_uInt16 nExtSubType;
+ sal_uInt16 nNewType = 0;
if (nSubType != DI_EDIT)
{
@@ -281,8 +281,8 @@ IMPL_LINK( SwFldDokInfPage, SubTypeHdl, ListBox *, EMPTYARG )
if (!aSelectionLB.GetEntryCount())
{
aFormatLB.Clear();
- aFormatLB.Enable(FALSE);
- aFormatFT.Enable(FALSE);
+ aFormatLB.Enable(sal_False);
+ aFormatFT.Enable(sal_False);
if( nSubType == DI_CUSTOM )
{
//find out which type the custom field has - for a start set to DATE format
@@ -314,14 +314,14 @@ IMPL_LINK( SwFldDokInfPage, SubTypeHdl, ListBox *, EMPTYARG )
nPos = 0;
}
- nExtSubType = (USHORT)(ULONG)aSelectionLB.GetEntryData(nPos);
+ nExtSubType = (sal_uInt16)(sal_uLong)aSelectionLB.GetEntryData(nPos);
}
else
nExtSubType = DI_SUB_TIME;
- USHORT nOldType = 0;
- BOOL bEnable = FALSE;
- BOOL bOneArea = FALSE;
+ sal_uInt16 nOldType = 0;
+ sal_Bool bEnable = sal_False;
+ sal_Bool bOneArea = sal_False;
if (aFormatLB.IsEnabled())
nOldType = aFormatLB.GetFormatType();
@@ -333,12 +333,12 @@ IMPL_LINK( SwFldDokInfPage, SubTypeHdl, ListBox *, EMPTYARG )
case DI_SUB_DATE:
nNewType = NUMBERFORMAT_DATE;
- bOneArea = TRUE;
+ bOneArea = sal_True;
break;
case DI_SUB_TIME:
nNewType = NUMBERFORMAT_TIME;
- bOneArea = TRUE;
+ bOneArea = sal_True;
break;
}
if (!nNewType)
@@ -352,19 +352,19 @@ IMPL_LINK( SwFldDokInfPage, SubTypeHdl, ListBox *, EMPTYARG )
aFormatLB.SetFormatType(nNewType);
aFormatLB.SetOneArea(bOneArea);
}
- bEnable = TRUE;
+ bEnable = sal_True;
}
- ULONG nFormat = IsFldEdit() ? ((SwDocInfoField*)GetCurField())->GetFormat() : 0;
+ sal_uLong nFormat = IsFldEdit() ? ((SwDocInfoField*)GetCurField())->GetFormat() : 0;
- USHORT nOldSubType = IsFldEdit() ? (((SwDocInfoField*)GetCurField())->GetSubType() & 0xff00) : 0;
+ sal_uInt16 nOldSubType = IsFldEdit() ? (((SwDocInfoField*)GetCurField())->GetSubType() & 0xff00) : 0;
if (IsFldEdit())
{
nPos = aSelectionLB.GetSelectEntryPos();
if (nPos != LISTBOX_ENTRY_NOTFOUND )
{
- nSubType = (USHORT)(ULONG)aSelectionLB.GetEntryData(nPos);
+ nSubType = (sal_uInt16)(sal_uLong)aSelectionLB.GetEntryData(nPos);
nOldSubType &= ~DI_SUB_FIXED;
if (nOldSubType == nSubType)
@@ -406,10 +406,10 @@ IMPL_LINK( SwFldDokInfPage, SubTypeHdl, ListBox *, EMPTYARG )
Beschreibung:
--------------------------------------------------------------------*/
-USHORT SwFldDokInfPage::FillSelectionLB(USHORT nSubType)
+sal_uInt16 SwFldDokInfPage::FillSelectionLB(sal_uInt16 nSubType)
{
// Format-Listbox fuellen
- USHORT nTypeId = TYP_DOCINFOFLD;
+ sal_uInt16 nTypeId = TYP_DOCINFOFLD;
EnableInsert(nSubType != USHRT_MAX);
@@ -418,9 +418,9 @@ USHORT SwFldDokInfPage::FillSelectionLB(USHORT nSubType)
aSelectionLB.Clear();
- USHORT nSize = 0;
- USHORT nSelPos = USHRT_MAX;
- USHORT nExtSubType = IsFldEdit() ? (((SwDocInfoField*)GetCurField())->GetSubType() & 0xff00) : 0;
+ sal_uInt16 nSize = 0;
+ sal_uInt16 nSelPos = USHRT_MAX;
+ sal_uInt16 nExtSubType = IsFldEdit() ? (((SwDocInfoField*)GetCurField())->GetSubType() & 0xff00) : 0;
if (IsFldEdit())
{
@@ -434,24 +434,24 @@ USHORT SwFldDokInfPage::FillSelectionLB(USHORT nSubType)
}
else
{
- nSize = GetFldMgr().GetFormatCount(nTypeId, FALSE, IsFldDlgHtmlMode());
- for (USHORT i = 0; i < nSize; i++)
+ nSize = GetFldMgr().GetFormatCount(nTypeId, sal_False, IsFldDlgHtmlMode());
+ for (sal_uInt16 i = 0; i < nSize; i++)
{
- USHORT nPos = aSelectionLB.InsertEntry(GetFldMgr().GetFormatStr(nTypeId, i));
+ sal_uInt16 nPos = aSelectionLB.InsertEntry(GetFldMgr().GetFormatStr(nTypeId, i));
aSelectionLB.SetEntryData(nPos, reinterpret_cast<void*>(GetFldMgr().GetFormatId(nTypeId, i)));
if (IsFldEdit() && i == nExtSubType)
nSelPos = nPos;
}
}
- BOOL bEnable = nSize != 0;
+ sal_Bool bEnable = nSize != 0;
if (nSize)
{
if (!aSelectionLB.GetSelectEntryCount())
aSelectionLB.SelectEntryPos(nSelPos == USHRT_MAX ? 0 : nSelPos);
- bEnable = TRUE;
+ bEnable = sal_True;
}
aSelectionFT.Enable(bEnable);
@@ -464,24 +464,24 @@ USHORT SwFldDokInfPage::FillSelectionLB(USHORT nSubType)
Beschreibung:
--------------------------------------------------------------------*/
-BOOL __EXPORT SwFldDokInfPage::FillItemSet(SfxItemSet& )
+sal_Bool __EXPORT SwFldDokInfPage::FillItemSet(SfxItemSet& )
{
- if (!pSelEntry || (USHORT)(ULONG)pSelEntry->GetUserData() == USHRT_MAX)
- return FALSE;
+ if (!pSelEntry || (sal_uInt16)(sal_uLong)pSelEntry->GetUserData() == USHRT_MAX)
+ return sal_False;
- USHORT nTypeId = TYP_DOCINFOFLD;
- USHORT nSubType = (USHORT)(ULONG)pSelEntry->GetUserData();
+ sal_uInt16 nTypeId = TYP_DOCINFOFLD;
+ sal_uInt16 nSubType = (sal_uInt16)(sal_uLong)pSelEntry->GetUserData();
- ULONG nFormat = 0;
+ sal_uLong nFormat = 0;
- USHORT nPos = aSelectionLB.GetSelectEntryPos();
+ sal_uInt16 nPos = aSelectionLB.GetSelectEntryPos();
::rtl::OUString aName;
if (DI_CUSTOM == nSubType)
aName = aTypeTLB.GetEntryText(pSelEntry);
if (nPos != LISTBOX_ENTRY_NOTFOUND)
- nSubType |= (USHORT)(ULONG)aSelectionLB.GetEntryData(nPos);
+ nSubType |= (sal_uInt16)(sal_uLong)aSelectionLB.GetEntryData(nPos);
if (aFixedCB.IsChecked())
nSubType |= DI_SUB_FIXED;
@@ -498,7 +498,7 @@ BOOL __EXPORT SwFldDokInfPage::FillItemSet(SfxItemSet& )
' ', aFormatLB.IsAutomaticLanguage());
}
- return FALSE;
+ return sal_False;
}
/*--------------------------------------------------------------------
@@ -515,7 +515,7 @@ SfxTabPage* __EXPORT SwFldDokInfPage::Create( Window* pParent,
Beschreibung:
--------------------------------------------------------------------*/
-USHORT SwFldDokInfPage::GetGroup()
+sal_uInt16 SwFldDokInfPage::GetGroup()
{
return GRP_REG;
}
@@ -528,7 +528,7 @@ void SwFldDokInfPage::FillUserData()
RTL_CONSTASCII_STRINGPARAM( USER_DATA_VERSION )));
sData += ';';
SvLBoxEntry* pEntry = aTypeTLB.FirstSelected();
- USHORT nTypeSel = pEntry ? sal::static_int_cast< USHORT >(reinterpret_cast< sal_uIntPtr >(pEntry->GetUserData())) : USHRT_MAX;
+ sal_uInt16 nTypeSel = pEntry ? sal::static_int_cast< sal_uInt16 >(reinterpret_cast< sal_uIntPtr >(pEntry->GetUserData())) : USHRT_MAX;
sData += String::CreateFromInt32( nTypeSel );
SetUserData(sData);
}
diff --git a/sw/source/ui/fldui/flddinf.hxx b/sw/source/ui/fldui/flddinf.hxx
index 3c86b53c1b..f0dd59fe66 100644
--- a/sw/source/ui/fldui/flddinf.hxx
+++ b/sw/source/ui/fldui/flddinf.hxx
@@ -59,17 +59,17 @@ class SwFldDokInfPage : public SwFldPage
String aInfoStr;
- USHORT nOldSel;
- ULONG nOldFormat;
+ sal_uInt16 nOldSel;
+ sal_uLong nOldFormat;
::rtl::OUString m_sOldCustomFieldName;
DECL_LINK( TypeHdl, ListBox* pLB = 0 );
DECL_LINK( SubTypeHdl, ListBox* pLB = 0 );
- USHORT FillSelectionLB(USHORT nSubTypeId);
+ sal_uInt16 FillSelectionLB(sal_uInt16 nSubTypeId);
protected:
- virtual USHORT GetGroup();
+ virtual sal_uInt16 GetGroup();
public:
SwFldDokInfPage(Window* pWindow, const SfxItemSet& rSet);
@@ -78,7 +78,7 @@ public:
static SfxTabPage* Create(Window* pParent, const SfxItemSet& rAttrSet);
- virtual BOOL FillItemSet( SfxItemSet& rSet );
+ virtual sal_Bool FillItemSet( SfxItemSet& rSet );
virtual void Reset( const SfxItemSet& rSet );
virtual void FillUserData();
diff --git a/sw/source/ui/fldui/flddok.cxx b/sw/source/ui/fldui/flddok.cxx
index 9437b1d514..1973bab36b 100644
--- a/sw/source/ui/fldui/flddok.cxx
+++ b/sw/source/ui/fldui/flddok.cxx
@@ -96,7 +96,7 @@ SwFldDokPage::SwFldDokPage(Window* pWindow, const SfxItemSet& rCoreSet ) :
aDateOffsetED.SetMin(LONG_MIN);
aDateOffsetED.SetMax(LONG_MAX);
//enable 'active' language selection
- aNumFormatLB.SetShowLanguageControl(TRUE);
+ aNumFormatLB.SetShowLanguageControl(sal_True);
}
/*--------------------------------------------------------------------
@@ -119,11 +119,11 @@ void __EXPORT SwFldDokPage::Reset(const SfxItemSet& )
// TypeListBox initialisieren
const SwFldGroupRgn& rRg = GetFldMgr().GetGroupRange(IsFldDlgHtmlMode(), GetGroup());
- aTypeLB.SetUpdateMode(FALSE);
+ aTypeLB.SetUpdateMode(sal_False);
aTypeLB.Clear();
- USHORT nPos, nTypeId;
- BOOL bPage = FALSE;
+ sal_uInt16 nPos, nTypeId;
+ sal_Bool bPage = sal_False;
if (!IsFldEdit())
{
@@ -141,7 +141,7 @@ void __EXPORT SwFldDokPage::Reset(const SfxItemSet& )
{
nPos = aTypeLB.InsertEntry(SW_RESSTR(FMT_REF_PAGE));
aTypeLB.SetEntryData(nPos, (void*)USHRT_MAX);
- bPage = TRUE;
+ bPage = sal_True;
}
break;
@@ -177,7 +177,7 @@ void __EXPORT SwFldDokPage::Reset(const SfxItemSet& )
// alte Pos selektieren
RestorePos(&aTypeLB);
- aTypeLB.SetUpdateMode(TRUE);
+ aTypeLB.SetUpdateMode(sal_True);
aTypeLB.SetDoubleClickHdl(LINK(this, SwFldDokPage, InsertHdl));
aTypeLB.SetSelectHdl(LINK(this, SwFldDokPage, TypeHdl));
aFormatLB.SetSelectHdl(LINK(this, SwFldDokPage, FormatHdl));
@@ -188,11 +188,11 @@ void __EXPORT SwFldDokPage::Reset(const SfxItemSet& )
if( sUserData.GetToken(0, ';').EqualsIgnoreCaseAscii(USER_DATA_VERSION_1 ))
{
String sVal = sUserData.GetToken(1, ';');
- USHORT nVal = static_cast< USHORT >(sVal.ToInt32());
+ sal_uInt16 nVal = static_cast< sal_uInt16 >(sVal.ToInt32());
if(nVal != USHRT_MAX)
{
- for(USHORT i = 0; i < aTypeLB.GetEntryCount(); i++)
- if(nVal == (USHORT)(ULONG)aTypeLB.GetEntryData(i))
+ for(sal_uInt16 i = 0; i < aTypeLB.GetEntryCount(); i++)
+ if(nVal == (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(i))
{
aTypeLB.SelectEntryPos(i);
break;
@@ -220,7 +220,7 @@ void __EXPORT SwFldDokPage::Reset(const SfxItemSet& )
IMPL_LINK( SwFldDokPage, TypeHdl, ListBox *, EMPTYARG )
{
// Alte ListBoxPos sichern
- const USHORT nOld = GetTypeSel();
+ const sal_uInt16 nOld = GetTypeSel();
// Aktuelle ListBoxPos
SetTypeSel(aTypeLB.GetSelectEntryPos());
@@ -231,11 +231,11 @@ IMPL_LINK( SwFldDokPage, TypeHdl, ListBox *, EMPTYARG )
aTypeLB.SelectEntryPos(0);
}
- USHORT nCount;
+ sal_uInt16 nCount;
if (nOld != GetTypeSel())
{
- USHORT nTypeId = (USHORT)(ULONG)aTypeLB.GetEntryData(GetTypeSel());
+ sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel());
// Auswahl-Listbox fuellen
aSelectionLB.Clear();
@@ -248,11 +248,11 @@ IMPL_LINK( SwFldDokPage, TypeHdl, ListBox *, EMPTYARG )
if (nTypeId != TYP_AUTHORFLD)
nCount = aLst.Count();
else
- nCount = GetFldMgr().GetFormatCount(nTypeId, FALSE, IsFldDlgHtmlMode());
+ nCount = GetFldMgr().GetFormatCount(nTypeId, sal_False, IsFldDlgHtmlMode());
- USHORT nPos;
+ sal_uInt16 nPos;
- for (USHORT i = 0; i < nCount; ++i)
+ for (sal_uInt16 i = 0; i < nCount; ++i)
{
if (!IsFldEdit())
{
@@ -265,7 +265,7 @@ IMPL_LINK( SwFldDokPage, TypeHdl, ListBox *, EMPTYARG )
}
else
{
- BOOL bInsert = FALSE;
+ sal_Bool bInsert = sal_False;
switch (nTypeId)
{
@@ -298,7 +298,7 @@ IMPL_LINK( SwFldDokPage, TypeHdl, ListBox *, EMPTYARG )
default:
if (*aLst[i] == GetCurField()->GetPar1())
- bInsert = TRUE;
+ bInsert = sal_True;
break;
}
if (bInsert)
@@ -316,12 +316,12 @@ IMPL_LINK( SwFldDokPage, TypeHdl, ListBox *, EMPTYARG )
AddSubType(TYP_PAGENUMBERFLD);
AddSubType(TYP_PREVPAGEFLD);
AddSubType(TYP_NEXTPAGEFLD);
- nTypeId = (USHORT)(ULONG)aSelectionLB.GetEntryData(0);
+ nTypeId = (sal_uInt16)(sal_uLong)aSelectionLB.GetEntryData(0);
nCount = 3;
aSelectionLB.SetSelectHdl(LINK(this, SwFldDokPage, SubTypeHdl));
}
- BOOL bEnable = nCount != 0;
+ sal_Bool bEnable = nCount != 0;
if (bEnable && !aSelectionLB.GetSelectEntryCount())
aSelectionLB.SelectEntryPos(0);
@@ -330,18 +330,18 @@ IMPL_LINK( SwFldDokPage, TypeHdl, ListBox *, EMPTYARG )
aSelectionFT.Enable( bEnable );
// Format-Listbox fuellen
- USHORT nSize = FillFormatLB(nTypeId);
+ sal_uInt16 nSize = FillFormatLB(nTypeId);
- BOOL bValue = FALSE, bLevel = FALSE, bNumFmt = FALSE, bOffset = FALSE;
- BOOL bFormat = nSize != 0;
- BOOL bOneArea = FALSE;
- BOOL bFixed = FALSE;
- USHORT nFmtType = 0;
+ sal_Bool bValue = sal_False, bLevel = sal_False, bNumFmt = sal_False, bOffset = sal_False;
+ sal_Bool bFormat = nSize != 0;
+ sal_Bool bOneArea = sal_False;
+ sal_Bool bFixed = sal_False;
+ sal_uInt16 nFmtType = 0;
switch (nTypeId)
{
case TYP_DATEFLD:
- bFormat = bNumFmt = bOneArea = bOffset = TRUE;
+ bFormat = bNumFmt = bOneArea = bOffset = sal_True;
nFmtType = NUMBERFORMAT_DATE;
aValueFT.SetText(sDateOffset);
@@ -353,7 +353,7 @@ IMPL_LINK( SwFldDokPage, TypeHdl, ListBox *, EMPTYARG )
break;
case TYP_TIMEFLD:
- bFormat = bNumFmt = bOneArea = bOffset = TRUE;
+ bFormat = bNumFmt = bOneArea = bOffset = sal_True;
nFmtType = NUMBERFORMAT_TIME;
aValueFT.SetText(sTimeOffset);
@@ -368,13 +368,13 @@ IMPL_LINK( SwFldDokPage, TypeHdl, ListBox *, EMPTYARG )
case TYP_NEXTPAGEFLD:
if (IsFldEdit())
{
- USHORT nTmp = (USHORT)(ULONG)aFormatLB.GetEntryData(
+ sal_uInt16 nTmp = (sal_uInt16)(sal_uLong)aFormatLB.GetEntryData(
aFormatLB.GetSelectEntryPos() );
String sOldTxt(aValueFT.GetText());
if(SVX_NUM_CHAR_SPECIAL != nTmp)
{
- INT32 nOff = GetCurField()->GetPar2().ToInt32();
+ sal_Int32 nOff = GetCurField()->GetPar2().ToInt32();
if( TYP_NEXTPAGEFLD == nTypeId && 1 != nOff )
aValueED.SetText(
String::CreateFromInt32(nOff - 1) );
@@ -387,27 +387,27 @@ IMPL_LINK( SwFldDokPage, TypeHdl, ListBox *, EMPTYARG )
else
aValueED.SetText(((SwPageNumberField*)GetCurField())->GetUserString());
}
- bValue = TRUE;
+ bValue = sal_True;
break;
case TYP_CHAPTERFLD:
aValueFT.SetText(SW_RESSTR(STR_LEVEL));
if (IsFldEdit())
aLevelED.SetText(String::CreateFromInt32(((SwChapterField*)GetCurField())->GetLevel() + 1));
- bLevel = TRUE;
+ bLevel = sal_True;
break;
case TYP_PAGENUMBERFLD:
aValueFT.SetText( SW_RESSTR( STR_OFFSET ));
if (IsFldEdit())
aValueED.SetText(GetCurField()->GetPar2());
- bValue = TRUE;
+ bValue = sal_True;
break;
case TYP_EXTUSERFLD:
case TYP_AUTHORFLD:
case TYP_FILENAMEFLD:
- bFixed = TRUE;
+ bFixed = sal_True;
break;
default:
@@ -460,7 +460,7 @@ IMPL_LINK( SwFldDokPage, TypeHdl, ListBox *, EMPTYARG )
aFixedCB.Enable(bFixed);
if (IsFldEdit())
- aFixedCB.Check( static_cast< BOOL >(((GetCurField()->GetFormat() & AF_FIXED) != 0) & bFixed));
+ aFixedCB.Check( static_cast< sal_Bool >(((GetCurField()->GetFormat() & AF_FIXED) != 0) & bFixed));
if (aNumFormatLB.GetSelectEntryPos() == LISTBOX_ENTRY_NOTFOUND)
aNumFormatLB.SelectEntryPos(0);
@@ -475,9 +475,9 @@ IMPL_LINK( SwFldDokPage, TypeHdl, ListBox *, EMPTYARG )
Beschreibung:
--------------------------------------------------------------------*/
-void SwFldDokPage::AddSubType(USHORT nTypeId)
+void SwFldDokPage::AddSubType(sal_uInt16 nTypeId)
{
- USHORT nPos = aSelectionLB.InsertEntry(SwFieldType::GetTypeStr(nTypeId));
+ sal_uInt16 nPos = aSelectionLB.InsertEntry(SwFieldType::GetTypeStr(nTypeId));
aSelectionLB.SetEntryData(nPos, reinterpret_cast<void*>(nTypeId));
}
@@ -487,14 +487,14 @@ void SwFldDokPage::AddSubType(USHORT nTypeId)
IMPL_LINK( SwFldDokPage, SubTypeHdl, ListBox *, EMPTYARG )
{
- USHORT nPos = aSelectionLB.GetSelectEntryPos();
+ sal_uInt16 nPos = aSelectionLB.GetSelectEntryPos();
if(nPos == LISTBOX_ENTRY_NOTFOUND)
nPos = 0;
- USHORT nTypeId = (USHORT)(ULONG)aSelectionLB.GetEntryData(nPos);
+ sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aSelectionLB.GetEntryData(nPos);
FillFormatLB(nTypeId);
- USHORT nTextRes = 0;
+ sal_uInt16 nTextRes = 0;
switch (nTypeId)
{
case TYP_CHAPTERFLD:
@@ -503,7 +503,7 @@ IMPL_LINK( SwFldDokPage, SubTypeHdl, ListBox *, EMPTYARG )
case TYP_PREVPAGEFLD:
case TYP_NEXTPAGEFLD:
- nTextRes = SVX_NUM_CHAR_SPECIAL == (USHORT)(ULONG)aFormatLB.GetEntryData(
+ nTextRes = SVX_NUM_CHAR_SPECIAL == (sal_uInt16)(sal_uLong)aFormatLB.GetEntryData(
aFormatLB.GetSelectEntryPos() )
? STR_VALUE : STR_OFFSET;
break;
@@ -523,7 +523,7 @@ IMPL_LINK( SwFldDokPage, SubTypeHdl, ListBox *, EMPTYARG )
Beschreibung:
--------------------------------------------------------------------*/
-USHORT SwFldDokPage::FillFormatLB(USHORT nTypeId)
+sal_uInt16 SwFldDokPage::FillFormatLB(sal_uInt16 nTypeId)
{
// Format-Listbox fuellen
aFormatLB.Clear();
@@ -531,12 +531,12 @@ USHORT SwFldDokPage::FillFormatLB(USHORT nTypeId)
if (nTypeId == TYP_AUTHORFLD)
return aFormatLB.GetEntryCount();
- USHORT nSize = GetFldMgr().GetFormatCount(nTypeId, FALSE, IsFldDlgHtmlMode());
+ sal_uInt16 nSize = GetFldMgr().GetFormatCount(nTypeId, sal_False, IsFldDlgHtmlMode());
- for( USHORT i = 0; i < nSize; ++i )
+ for( sal_uInt16 i = 0; i < nSize; ++i )
{
- USHORT nPos = aFormatLB.InsertEntry(GetFldMgr().GetFormatStr(nTypeId, i));
- USHORT nFmtId = GetFldMgr().GetFormatId( nTypeId, i );
+ sal_uInt16 nPos = aFormatLB.InsertEntry(GetFldMgr().GetFormatStr(nTypeId, i));
+ sal_uInt16 nFmtId = GetFldMgr().GetFormatId( nTypeId, i );
aFormatLB.SetEntryData( nPos, reinterpret_cast<void*>( nFmtId ));
if (IsFldEdit() && nFmtId == (GetCurField()->GetFormat() & ~AF_FIXED))
aFormatLB.SelectEntryPos( nPos );
@@ -564,21 +564,21 @@ USHORT SwFldDokPage::FillFormatLB(USHORT nTypeId)
IMPL_LINK( SwFldDokPage, FormatHdl, ListBox *, EMPTYARG )
{
- USHORT nTypeId = (USHORT)(ULONG)aTypeLB.GetEntryData(GetTypeSel());
+ sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel());
if (nTypeId == USHRT_MAX)
{
- USHORT nPos = aSelectionLB.GetSelectEntryPos();
+ sal_uInt16 nPos = aSelectionLB.GetSelectEntryPos();
if(nPos == LISTBOX_ENTRY_NOTFOUND)
nPos = 0;
- nTypeId = (USHORT)(ULONG)aSelectionLB.GetEntryData(nPos);
+ nTypeId = (sal_uInt16)(sal_uLong)aSelectionLB.GetEntryData(nPos);
}
if (nTypeId == TYP_NEXTPAGEFLD || nTypeId == TYP_PREVPAGEFLD)
{
// Prev/Next - PageNumFelder Sonderbehandlung:
- USHORT nTmp = (USHORT)(ULONG)aFormatLB.GetEntryData(
+ sal_uInt16 nTmp = (sal_uInt16)(sal_uLong)aFormatLB.GetEntryData(
aFormatLB.GetSelectEntryPos() );
String sOldTxt( aValueFT.GetText() );
String sNewTxt( SW_RES( SVX_NUM_CHAR_SPECIAL == nTmp ? STR_VALUE
@@ -598,36 +598,36 @@ IMPL_LINK( SwFldDokPage, FormatHdl, ListBox *, EMPTYARG )
Beschreibung:
--------------------------------------------------------------------*/
-BOOL __EXPORT SwFldDokPage::FillItemSet(SfxItemSet& )
+sal_Bool __EXPORT SwFldDokPage::FillItemSet(SfxItemSet& )
{
- BOOL bPage = FALSE;
- USHORT nTypeId = (USHORT)(ULONG)aTypeLB.GetEntryData(GetTypeSel());
+ sal_Bool bPage = sal_False;
+ sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel());
if (nTypeId == USHRT_MAX)
{
- USHORT nPos = aSelectionLB.GetSelectEntryPos();
+ sal_uInt16 nPos = aSelectionLB.GetSelectEntryPos();
if(nPos == LISTBOX_ENTRY_NOTFOUND)
nPos = 0;
- nTypeId = (USHORT)(ULONG)aSelectionLB.GetEntryData(nPos);
- bPage = TRUE;
+ nTypeId = (sal_uInt16)(sal_uLong)aSelectionLB.GetEntryData(nPos);
+ bPage = sal_True;
}
String aVal(aValueED.GetText());
- ULONG nFormat = 0;
- USHORT nSubType = 0;
+ sal_uLong nFormat = 0;
+ sal_uInt16 nSubType = 0;
if (aFormatLB.IsEnabled())
{
- USHORT nPos = aFormatLB.GetSelectEntryPos();
+ sal_uInt16 nPos = aFormatLB.GetSelectEntryPos();
if(nPos != LISTBOX_ENTRY_NOTFOUND)
- nFormat = (USHORT)(ULONG)aFormatLB.GetEntryData(nPos);
+ nFormat = (sal_uInt16)(sal_uLong)aFormatLB.GetEntryData(nPos);
}
if (aSelectionLB.IsEnabled())
{
- USHORT nPos = aSelectionLB.GetSelectEntryPos();
+ sal_uInt16 nPos = aSelectionLB.GetSelectEntryPos();
if(nPos != LISTBOX_ENTRY_NOTFOUND)
- nSubType = (USHORT)(ULONG)aSelectionLB.GetEntryData(nPos);
+ nSubType = (sal_uInt16)(sal_uLong)aSelectionLB.GetEntryData(nPos);
}
switch (nTypeId)
@@ -664,7 +664,7 @@ BOOL __EXPORT SwFldDokPage::FillItemSet(SfxItemSet& )
if( SVX_NUM_CHAR_SPECIAL != nFormat &&
(TYP_PREVPAGEFLD == nTypeId || TYP_NEXTPAGEFLD == nTypeId))
{
- INT32 nVal = aValueED.GetText().ToInt32();
+ sal_Int32 nVal = aValueED.GetText().ToInt32();
aVal = String::CreateFromInt32(nVal);
}
break;
@@ -689,7 +689,7 @@ BOOL __EXPORT SwFldDokPage::FillItemSet(SfxItemSet& )
InsertFld( nTypeId, nSubType, aEmptyStr, aVal, nFormat, ' ', aNumFormatLB.IsAutomaticLanguage() );
}
- return FALSE;
+ return sal_False;
}
/*--------------------------------------------------------------------
@@ -706,7 +706,7 @@ SfxTabPage* __EXPORT SwFldDokPage::Create( Window* pParent,
Beschreibung:
--------------------------------------------------------------------*/
-USHORT SwFldDokPage::GetGroup()
+sal_uInt16 SwFldDokPage::GetGroup()
{
return GRP_DOC;
}
@@ -719,11 +719,11 @@ void SwFldDokPage::FillUserData()
String sData( String::CreateFromAscii(
RTL_CONSTASCII_STRINGPARAM( USER_DATA_VERSION )));
sData += ';';
- USHORT nTypeSel = aTypeLB.GetSelectEntryPos();
+ sal_uInt16 nTypeSel = aTypeLB.GetSelectEntryPos();
if( LISTBOX_ENTRY_NOTFOUND == nTypeSel )
nTypeSel = USHRT_MAX;
else
- nTypeSel = sal::static_int_cast< USHORT >(reinterpret_cast< sal_uIntPtr >(aTypeLB.GetEntryData( nTypeSel )));
+ nTypeSel = sal::static_int_cast< sal_uInt16 >(reinterpret_cast< sal_uIntPtr >(aTypeLB.GetEntryData( nTypeSel )));
sData += String::CreateFromInt32( nTypeSel );
SetUserData(sData);
}
diff --git a/sw/source/ui/fldui/flddok.hxx b/sw/source/ui/fldui/flddok.hxx
index 655a1e730f..89611dd937 100644
--- a/sw/source/ui/fldui/flddok.hxx
+++ b/sw/source/ui/fldui/flddok.hxx
@@ -64,18 +64,18 @@ class SwFldDokPage : public SwFldPage
Bitmap aRootOpened;
Bitmap aRootClosed;
- USHORT nOldSel;
- ULONG nOldFormat;
+ sal_uInt16 nOldSel;
+ sal_uLong nOldFormat;
DECL_LINK( TypeHdl, ListBox* pLB = 0 );
DECL_LINK( FormatHdl, ListBox* pLB = 0 );
DECL_LINK( SubTypeHdl, ListBox* pLB = 0 );
- void AddSubType(USHORT nTypeId);
- USHORT FillFormatLB(USHORT nTypeId);
+ void AddSubType(sal_uInt16 nTypeId);
+ sal_uInt16 FillFormatLB(sal_uInt16 nTypeId);
protected:
- virtual USHORT GetGroup();
+ virtual sal_uInt16 GetGroup();
public:
SwFldDokPage(Window* pWindow, const SfxItemSet& rSet);
@@ -84,7 +84,7 @@ public:
static SfxTabPage* Create(Window* pParent, const SfxItemSet& rAttrSet);
- virtual BOOL FillItemSet( SfxItemSet& rSet );
+ virtual sal_Bool FillItemSet( SfxItemSet& rSet );
virtual void Reset( const SfxItemSet& rSet );
virtual void FillUserData();
diff --git a/sw/source/ui/fldui/fldedt.cxx b/sw/source/ui/fldui/fldedt.cxx
index 832dabf344..782261c7e1 100644
--- a/sw/source/ui/fldui/fldedt.cxx
+++ b/sw/source/ui/fldui/fldedt.cxx
@@ -110,11 +110,11 @@ SwFldEditDlg::SwFldEditDlg(SwView& rVw) :
/* #108536# Only create selection if there is none
already. Normalize PaM instead of swapping. */
if ( ! pSh->HasSelection() )
- pSh->Right(CRSR_SKIP_CHARS, TRUE, 1, FALSE );
+ pSh->Right(CRSR_SKIP_CHARS, sal_True, 1, sal_False );
pSh->NormalizePam();
- USHORT nGroup = aMgr.GetGroup(FALSE, pCurFld->GetTypeId(), pCurFld->GetSubType());
+ sal_uInt16 nGroup = aMgr.GetGroup(sal_False, pCurFld->GetTypeId(), pCurFld->GetSubType());
CreatePage(nGroup);
@@ -124,7 +124,7 @@ SwFldEditDlg::SwFldEditDlg(SwView& rVw) :
// Fontgroessen im Wald stehen, und da PB im SingleTabDlg feste Pixelgroessen
// fuer seine Buttons und die Dialogbreite verwendet.
aPrevBT.SetPosPixel(Point(GetOKButton()->GetPosPixel().X(), aPrevBT.GetPosPixel().Y()));
- USHORT nWidth = static_cast< USHORT >(GetOKButton()->GetOutputSize().Width() / 2 - 3);
+ sal_uInt16 nWidth = static_cast< sal_uInt16 >(GetOKButton()->GetOutputSize().Width() / 2 - 3);
Size aNewSize(LogicToPixel(Size(nWidth, GetOKButton()->GetOutputSize().Height())));
aPrevBT.SetSizePixel(aNewSize);
@@ -167,7 +167,7 @@ void SwFldEditDlg::Init()
pSh->StartAction();
pSh->CreateCrsr();
- BOOL bMove = rMgr.GoNext();
+ sal_Bool bMove = rMgr.GoNext();
if( bMove )
rMgr.GoPrev();
aNextBT.Enable(bMove);
@@ -191,7 +191,7 @@ void SwFldEditDlg::Init()
Beschreibung:
--------------------------------------------------------------------*/
-SfxTabPage* SwFldEditDlg::CreatePage(USHORT nGroup)
+SfxTabPage* SwFldEditDlg::CreatePage(sal_uInt16 nGroup)
{
// TabPage erzeugen
SfxTabPage* pTabPage = 0;
@@ -275,10 +275,10 @@ SwFldEditDlg::~SwFldEditDlg()
Beschreibung:
--------------------------------------------------------------------*/
-void SwFldEditDlg::EnableInsert(BOOL bEnable)
+void SwFldEditDlg::EnableInsert(sal_Bool bEnable)
{
if( bEnable && pSh->IsReadOnlyAvailable() && pSh->HasReadonlySel() )
- bEnable = FALSE;
+ bEnable = sal_False;
GetOKButton()->Enable( bEnable );
}
@@ -327,7 +327,7 @@ short SwFldEditDlg::Execute()
IMPL_LINK( SwFldEditDlg, NextPrevHdl, Button *, pButton )
{
- BOOL bNext = pButton == &aNextBT;
+ sal_Bool bNext = pButton == &aNextBT;
pSh->EnterStdMode();
@@ -350,11 +350,11 @@ IMPL_LINK( SwFldEditDlg, NextPrevHdl, Button *, pButton )
/* #108536# Only create selection if there is none
already. Normalize PaM instead of swapping. */
if ( ! pSh->HasSelection() )
- pSh->Right(CRSR_SKIP_CHARS, TRUE, 1, FALSE );
+ pSh->Right(CRSR_SKIP_CHARS, sal_True, 1, sal_False );
pSh->NormalizePam();
- USHORT nGroup = rMgr.GetGroup(FALSE, pCurFld->GetTypeId(), pCurFld->GetSubType());
+ sal_uInt16 nGroup = rMgr.GetGroup(sal_False, pCurFld->GetTypeId(), pCurFld->GetSubType());
if (nGroup != pTabPage->GetGroup())
pTabPage = (SwFldPage*)CreatePage(nGroup);
@@ -380,7 +380,7 @@ IMPL_LINK( SwFldEditDlg, AddressHdl, PushButton *, EMPTYARG )
SID_FIELD_GRABFOCUS, SID_FIELD_GRABFOCUS,
0L );
- USHORT nEditPos = UNKNOWN_EDIT;
+ sal_uInt16 nEditPos = UNKNOWN_EDIT;
switch(pCurFld->GetSubType())
{
diff --git a/sw/source/ui/fldui/fldfunc.cxx b/sw/source/ui/fldui/fldfunc.cxx
index 21b8e84cc7..718c0e8cbc 100644
--- a/sw/source/ui/fldui/fldfunc.cxx
+++ b/sw/source/ui/fldui/fldfunc.cxx
@@ -108,8 +108,8 @@ SwFldFuncPage::SwFldFuncPage(Window* pParent, const SfxItemSet& rCoreSet ) :
sOldValueFT = aValueFT.GetText();
sOldNameFT = aNameFT.GetText();
- aCond1ED.ShowBrackets(FALSE);
- aCond2ED.ShowBrackets(FALSE);
+ aCond1ED.ShowBrackets(sal_False);
+ aCond2ED.ShowBrackets(sal_False);
// SwWrtShell* pSh = (SwWrtShell*)ViewShell::GetCurrShell();
}
@@ -131,10 +131,10 @@ void SwFldFuncPage::Reset(const SfxItemSet& )
SavePos(&aTypeLB);
Init(); // Allgemeine initialisierung
- aTypeLB.SetUpdateMode(FALSE);
+ aTypeLB.SetUpdateMode(sal_False);
aTypeLB.Clear();
- USHORT nPos, nTypeId;
+ sal_uInt16 nPos, nTypeId;
if (!IsFldEdit())
{
@@ -187,11 +187,11 @@ void SwFldFuncPage::Reset(const SfxItemSet& )
if(sUserData.GetToken(0, ';').EqualsIgnoreCaseAscii(USER_DATA_VERSION_1))
{
String sVal = sUserData.GetToken(1, ';');
- USHORT nVal = static_cast< USHORT >(sVal.ToInt32());
+ sal_uInt16 nVal = static_cast< sal_uInt16 >(sVal.ToInt32());
if(nVal != USHRT_MAX)
{
- for(USHORT i = 0; i < aTypeLB.GetEntryCount(); i++)
- if(nVal == (USHORT)(ULONG)aTypeLB.GetEntryData(i))
+ for(sal_uInt16 i = 0; i < aTypeLB.GetEntryCount(); i++)
+ if(nVal == (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(i))
{
aTypeLB.SelectEntryPos(i);
break;
@@ -201,7 +201,7 @@ void SwFldFuncPage::Reset(const SfxItemSet& )
}
TypeHdl(0);
- aTypeLB.SetUpdateMode(TRUE);
+ aTypeLB.SetUpdateMode(sal_True);
if (IsFldEdit())
{
@@ -220,7 +220,7 @@ void SwFldFuncPage::Reset(const SfxItemSet& )
IMPL_LINK( SwFldFuncPage, TypeHdl, ListBox *, EMPTYARG )
{
// Alte ListBoxPos sichern
- const USHORT nOld = GetTypeSel();
+ const sal_uInt16 nOld = GetTypeSel();
// Aktuelle ListBoxPos
SetTypeSel(aTypeLB.GetSelectEntryPos());
@@ -233,7 +233,7 @@ IMPL_LINK( SwFldFuncPage, TypeHdl, ListBox *, EMPTYARG )
if (nOld != GetTypeSel())
{
- USHORT nTypeId = (USHORT)(ULONG)aTypeLB.GetEntryData(GetTypeSel());
+ sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel());
// Auswahl-Listbox fuellen
UpdateSubType();
@@ -241,30 +241,30 @@ IMPL_LINK( SwFldFuncPage, TypeHdl, ListBox *, EMPTYARG )
// Format-Listbox fuellen
aFormatLB.Clear();
- USHORT nSize = GetFldMgr().GetFormatCount(nTypeId, FALSE, IsFldDlgHtmlMode());
+ sal_uInt16 nSize = GetFldMgr().GetFormatCount(nTypeId, sal_False, IsFldDlgHtmlMode());
- for (USHORT i = 0; i < nSize; i++)
+ for (sal_uInt16 i = 0; i < nSize; i++)
{
- USHORT nPos = aFormatLB.InsertEntry(GetFldMgr().GetFormatStr(nTypeId, i));
+ sal_uInt16 nPos = aFormatLB.InsertEntry(GetFldMgr().GetFormatStr(nTypeId, i));
aFormatLB.SetEntryData( nPos, reinterpret_cast<void*>(GetFldMgr().GetFormatId( nTypeId, i )) );
}
if (nSize)
{
if (IsFldEdit() && nTypeId == TYP_JUMPEDITFLD)
- aFormatLB.SelectEntry(SW_RESSTR(FMT_MARK_BEGIN + (USHORT)GetCurField()->GetFormat()));
+ aFormatLB.SelectEntry(SW_RESSTR(FMT_MARK_BEGIN + (sal_uInt16)GetCurField()->GetFormat()));
if (!aFormatLB.GetSelectEntryCount())
aFormatLB.SelectEntryPos(0);
}
- BOOL bValue = FALSE, bName = FALSE, bMacro = FALSE, bInsert = TRUE;
- BOOL bShowSelection = FALSE;
- BOOL bFormat = nSize != 0;
+ sal_Bool bValue = sal_False, bName = sal_False, bMacro = sal_False, bInsert = sal_True;
+ sal_Bool bShowSelection = sal_False;
+ sal_Bool bFormat = nSize != 0;
// fuer Conditional Text zwei Controls
- BOOL bDropDown = TYP_DROPDOWN == nTypeId;
- BOOL bCondTxtFld = TYP_CONDTXTFLD == nTypeId;
+ sal_Bool bDropDown = TYP_DROPDOWN == nTypeId;
+ sal_Bool bCondTxtFld = TYP_CONDTXTFLD == nTypeId;
aCond1FT.Show(!bDropDown && bCondTxtFld);
aCond1ED.Show(!bDropDown && bCondTxtFld);
@@ -287,7 +287,7 @@ IMPL_LINK( SwFldFuncPage, TypeHdl, ListBox *, EMPTYARG )
aListNameFT.Show(bDropDown);
aListNameED.Show(bDropDown);
- aNameED.SetDropEnable(FALSE);
+ aNameED.SetDropEnable(sal_False);
if (IsFldEdit())
{
@@ -326,11 +326,11 @@ IMPL_LINK( SwFldFuncPage, TypeHdl, ListBox *, EMPTYARG )
switch (nTypeId)
{
case TYP_MACROFLD:
- bMacro = TRUE;
+ bMacro = sal_True;
if (GetFldMgr().GetMacroPath().Len())
- bValue = TRUE;
+ bValue = sal_True;
else
- bInsert = FALSE;
+ bInsert = sal_False;
aNameFT.SetText(SW_RESSTR(STR_MACNAME));
aValueFT.SetText(SW_RESSTR(STR_PROMPT));
@@ -339,55 +339,55 @@ IMPL_LINK( SwFldFuncPage, TypeHdl, ListBox *, EMPTYARG )
case TYP_HIDDENPARAFLD:
aNameFT.SetText(SW_RESSTR(STR_COND));
- aNameED.SetDropEnable(TRUE);
- bName = TRUE;
+ aNameED.SetDropEnable(sal_True);
+ bName = sal_True;
break;
case TYP_HIDDENTXTFLD:
{
aNameFT.SetText(SW_RESSTR(STR_COND));
- aNameED.SetDropEnable(TRUE);
+ aNameED.SetDropEnable(sal_True);
aValueFT.SetText(SW_RESSTR(STR_INSTEXT));
SwWrtShell* pSh = GetActiveWrtShell();
if (!IsFldEdit() && pSh )
aValueED.SetText(pSh->GetSelTxt());
- bName = bValue = TRUE;
+ bName = bValue = sal_True;
}
break;
case TYP_CONDTXTFLD:
aNameFT.SetText(SW_RESSTR(STR_COND));
- aNameED.SetDropEnable(TRUE);
+ aNameED.SetDropEnable(sal_True);
if (IsFldEdit())
{
aCond1ED.SetText(GetCurField()->GetPar2().GetToken(0, '|'));
aCond2ED.SetText(GetCurField()->GetPar2().GetToken(1, '|'));
}
- bName = bValue = TRUE;
+ bName = bValue = sal_True;
break;
case TYP_JUMPEDITFLD:
aNameFT.SetText(SW_RESSTR(STR_JUMPEDITFLD));
aValueFT.SetText(SW_RESSTR(STR_PROMPT));
- bName = bValue = TRUE;
+ bName = bValue = sal_True;
break;
case TYP_INPUTFLD:
aValueFT.SetText(SW_RESSTR(STR_PROMPT));
- bValue = TRUE;
- // bShowSelection = TRUE;
+ bValue = sal_True;
+ // bShowSelection = sal_True;
break;
case TYP_COMBINED_CHARS:
{
aNameFT.SetText(SW_RESSTR(STR_COMBCHRS_FT));
- aNameED.SetDropEnable(TRUE);
- bName = TRUE;
+ aNameED.SetDropEnable(sal_True);
+ bName = sal_True;
- const USHORT nLen = aNameED.GetText().Len();
+ const sal_uInt16 nLen = aNameED.GetText().Len();
if( !nLen || nLen > MAX_COMBINED_CHARACTERS )
- bInsert = FALSE;
+ bInsert = sal_False;
}
break;
case TYP_DROPDOWN :
@@ -431,7 +431,7 @@ IMPL_LINK( SwFldFuncPage, TypeHdl, ListBox *, EMPTYARG )
IMPL_LINK( SwFldFuncPage, SelectHdl, ListBox *, EMPTYARG )
{
- USHORT nTypeId = (USHORT)(ULONG)aTypeLB.GetEntryData(GetTypeSel());
+ sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel());
if( TYP_MACROFLD == nTypeId )
aNameED.SetText( aSelectionLB.GetSelectEntry() );
@@ -455,7 +455,7 @@ IMPL_LINK( SwFldFuncPage, InsertMacroHdl, ListBox *, EMPTYARG )
--------------------------------------------------*/
IMPL_LINK( SwFldFuncPage, ListModifyHdl, Control*, pControl)
{
- aListItemsLB.SetUpdateMode(FALSE);
+ aListItemsLB.SetUpdateMode(sal_False);
if(pControl == &aListAddPB ||
(pControl == &aListItemED && aListAddPB.IsEnabled()))
{
@@ -465,7 +465,7 @@ IMPL_LINK( SwFldFuncPage, ListModifyHdl, Control*, pControl)
}
else if(aListItemsLB.GetSelectEntryCount())
{
- USHORT nSelPos = aListItemsLB.GetSelectEntryPos();
+ sal_uInt16 nSelPos = aListItemsLB.GetSelectEntryPos();
if(pControl == &aListRemovePB)
{
aListItemsLB.RemoveEntry(nSelPos);
@@ -495,7 +495,7 @@ IMPL_LINK( SwFldFuncPage, ListModifyHdl, Control*, pControl)
}
}
bDropDownLBChanged = true;
- aListItemsLB.SetUpdateMode(TRUE);
+ aListItemsLB.SetUpdateMode(sal_True);
ListEnableHdl(0);
return 0;
}
@@ -507,7 +507,7 @@ IMPL_LINK( SwFldFuncPage, ListEnableHdl, void*, EMPTYARG)
//enable "Add" button when text is in the Edit that's not already member of the box
aListAddPB.Enable(aListItemED.GetText().Len() &&
LISTBOX_ENTRY_NOTFOUND == aListItemsLB.GetEntryPos(aListItemED.GetText()));
- BOOL bEnableButtons = aListItemsLB.GetSelectEntryCount() > 0;
+ sal_Bool bEnableButtons = aListItemsLB.GetSelectEntryCount() > 0;
aListRemovePB.Enable(bEnableButtons);
aListUpPB.Enable(bEnableButtons && (aListItemsLB.GetSelectEntryPos() > 0));
aListDownPB.Enable(bEnableButtons &&
@@ -523,23 +523,23 @@ IMPL_LINK( SwFldFuncPage, ListEnableHdl, void*, EMPTYARG)
void SwFldFuncPage::UpdateSubType()
{
- USHORT nTypeId = (USHORT)(ULONG)aTypeLB.GetEntryData(GetTypeSel());
+ sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel());
// Auswahl-Listbox fuellen
- aSelectionLB.SetUpdateMode(FALSE);
+ aSelectionLB.SetUpdateMode(sal_False);
aSelectionLB.Clear();
SvStringsDtor aLst;
GetFldMgr().GetSubTypes(nTypeId, aLst);
- USHORT nCount = aLst.Count();
+ sal_uInt16 nCount = aLst.Count();
- for (USHORT i = 0; i < nCount; ++i)
+ for (sal_uInt16 i = 0; i < nCount; ++i)
{
- USHORT nPos = aSelectionLB.InsertEntry(*aLst[i]);
+ sal_uInt16 nPos = aSelectionLB.InsertEntry(*aLst[i]);
aSelectionLB.SetEntryData(nPos, reinterpret_cast<void*>(i));
}
- BOOL bEnable = nCount != 0;
+ sal_Bool bEnable = nCount != 0;
aSelectionLB.Enable( bEnable );
aSelectionFT.Enable( bEnable );
@@ -551,7 +551,7 @@ void SwFldFuncPage::UpdateSubType()
if (nTypeId == TYP_MACROFLD)
{
- BOOL bHasMacro = GetFldMgr().GetMacroPath().Len() != 0;
+ sal_Bool bHasMacro = GetFldMgr().GetMacroPath().Len() != 0;
if (bHasMacro)
{
@@ -562,7 +562,7 @@ void SwFldFuncPage::UpdateSubType()
EnableInsert(bHasMacro);
}
- aSelectionLB.SetUpdateMode(TRUE);
+ aSelectionLB.SetUpdateMode(sal_True);
}
/*--------------------------------------------------------------------
@@ -589,18 +589,18 @@ IMPL_LINK( SwFldFuncPage, MacroHdl, Button *, pBtn )
Beschreibung:
--------------------------------------------------------------------*/
-BOOL SwFldFuncPage::FillItemSet(SfxItemSet& )
+sal_Bool SwFldFuncPage::FillItemSet(SfxItemSet& )
{
- USHORT nTypeId = (USHORT)(ULONG)aTypeLB.GetEntryData(GetTypeSel());
+ sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel());
- USHORT nSubType = 0;
+ sal_uInt16 nSubType = 0;
- ULONG nFormat = aFormatLB.GetSelectEntryPos();
+ sal_uLong nFormat = aFormatLB.GetSelectEntryPos();
if(nFormat == LISTBOX_ENTRY_NOTFOUND)
nFormat = 0;
else
- nFormat = (ULONG)aFormatLB.GetEntryData((USHORT)nFormat);
+ nFormat = (sal_uLong)aFormatLB.GetEntryData((sal_uInt16)nFormat);
String aVal(aValueED.GetText());
String aName(aNameED.GetText());
@@ -628,7 +628,7 @@ BOOL SwFldFuncPage::FillItemSet(SfxItemSet& )
case TYP_DROPDOWN :
{
aName = aListNameED.GetText();
- for(USHORT i = 0; i < aListItemsLB.GetEntryCount(); i++)
+ for(sal_uInt16 i = 0; i < aListItemsLB.GetEntryCount(); i++)
{
if(i)
aVal += DB_DELIM;
@@ -654,7 +654,7 @@ BOOL SwFldFuncPage::FillItemSet(SfxItemSet& )
ModifyHdl(); // Insert ggf enablen/disablen
- return FALSE;
+ return sal_False;
}
/*--------------------------------------------------------------------
@@ -667,9 +667,9 @@ String SwFldFuncPage::TurnMacroString(const String &rMacro)
{
// Inhalt von aName umdrehen
String sTmp, sBuf;
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
- for (USHORT i = 0; i < 4 && nPos != STRING_NOTFOUND; i++)
+ for (sal_uInt16 i = 0; i < 4 && nPos != STRING_NOTFOUND; i++)
{
if (i == 3)
sTmp = rMacro.Copy(nPos);
@@ -700,7 +700,7 @@ SfxTabPage* SwFldFuncPage::Create( Window* pParent,
Beschreibung:
--------------------------------------------------------------------*/
-USHORT SwFldFuncPage::GetGroup()
+sal_uInt16 SwFldFuncPage::GetGroup()
{
return GRP_FKT;
}
@@ -713,11 +713,11 @@ void SwFldFuncPage::FillUserData()
String sData( String::CreateFromAscii(
RTL_CONSTASCII_STRINGPARAM( USER_DATA_VERSION )));
sData += ';';
- USHORT nTypeSel = aTypeLB.GetSelectEntryPos();
+ sal_uInt16 nTypeSel = aTypeLB.GetSelectEntryPos();
if( LISTBOX_ENTRY_NOTFOUND == nTypeSel )
nTypeSel = USHRT_MAX;
else
- nTypeSel = sal::static_int_cast< USHORT >(reinterpret_cast< sal_uIntPtr >(aTypeLB.GetEntryData( nTypeSel )));
+ nTypeSel = sal::static_int_cast< sal_uInt16 >(reinterpret_cast< sal_uIntPtr >(aTypeLB.GetEntryData( nTypeSel )));
sData += String::CreateFromInt32( nTypeSel );
SetUserData(sData);
}
@@ -725,14 +725,14 @@ void SwFldFuncPage::FillUserData()
IMPL_LINK( SwFldFuncPage, ModifyHdl, Edit *, EMPTYARG )
{
String aName(aNameED.GetText());
- const USHORT nLen = aName.Len();
+ const sal_uInt16 nLen = aName.Len();
- BOOL bEnable = TRUE;
- USHORT nTypeId = (USHORT)(ULONG)aTypeLB.GetEntryData(GetTypeSel());
+ sal_Bool bEnable = sal_True;
+ sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel());
if( TYP_COMBINED_CHARS == nTypeId &&
(!nLen || nLen > MAX_COMBINED_CHARACTERS ))
- bEnable = FALSE;
+ bEnable = sal_False;
EnableInsert( bEnable );
diff --git a/sw/source/ui/fldui/fldfunc.hxx b/sw/source/ui/fldui/fldfunc.hxx
index baa011fea8..dd70a0d3a8 100644
--- a/sw/source/ui/fldui/fldfunc.hxx
+++ b/sw/source/ui/fldui/fldfunc.hxx
@@ -76,7 +76,7 @@ class SwFldFuncPage : public SwFldPage
String sOldValueFT;
String sOldNameFT;
- ULONG nOldFormat;
+ sal_uLong nOldFormat;
bool bDropDownLBChanged;
DECL_LINK( TypeHdl, ListBox* pLB = 0 );
@@ -93,7 +93,7 @@ class SwFldFuncPage : public SwFldPage
String TurnMacroString(const String &rMacro);
protected:
- virtual USHORT GetGroup();
+ virtual sal_uInt16 GetGroup();
public:
SwFldFuncPage(Window* pParent, const SfxItemSet& rSet);
@@ -102,7 +102,7 @@ public:
static SfxTabPage* Create(Window* pParent, const SfxItemSet& rAttrSet);
- virtual BOOL FillItemSet( SfxItemSet& rSet );
+ virtual sal_Bool FillItemSet( SfxItemSet& rSet );
virtual void Reset( const SfxItemSet& rSet );
virtual void FillUserData();
diff --git a/sw/source/ui/fldui/fldmgr.cxx b/sw/source/ui/fldui/fldmgr.cxx
index 1ff5f90ee7..72bfc42ac5 100644
--- a/sw/source/ui/fldui/fldmgr.cxx
+++ b/sw/source/ui/fldui/fldmgr.cxx
@@ -143,7 +143,7 @@ enum
/*--------------------------------------------------------------------
Beschreibung: Formate in der richtigen Reihenfolge
--------------------------------------------------------------------*/
-static const USHORT __FAR_DATA aSetFmt[] =
+static const sal_uInt16 __FAR_DATA aSetFmt[] =
{
// die Reihenfolge muss zu Beginn mit den ResourceIds fuer FMT_SETVAR_???
// uebereinstimmen
@@ -151,14 +151,14 @@ static const USHORT __FAR_DATA aSetFmt[] =
0
};
-static const USHORT __FAR_DATA aGetFmt[] =
+static const sal_uInt16 __FAR_DATA aGetFmt[] =
{
// die Reihenfolge muss zu Beginn mit den ResourceIds fuer FMT_GETVAR_???
// uebereinstimmen
0
};
-static const USHORT __FAR_DATA aUsrFmt[] =
+static const sal_uInt16 __FAR_DATA aUsrFmt[] =
{
// die Reihenfolge muss zu Beginn mit den ResourceIds fuer FMT_SETVAR_???
// uebereinstimmen
@@ -166,29 +166,29 @@ static const USHORT __FAR_DATA aUsrFmt[] =
nsSwExtendedSubType::SUB_CMD
};
-static const USHORT __FAR_DATA aDBFmt[] =
+static const sal_uInt16 __FAR_DATA aDBFmt[] =
{
// die Reihenfolge muss zu Beginn mit den ResourceIds fuer FMT_DBFLD_???
// uebereinstimmen
nsSwExtendedSubType::SUB_OWN_FMT
};
-static const USHORT VF_COUNT = sizeof(aGetFmt) / sizeof(USHORT);
-static const USHORT VF_USR_COUNT = sizeof(aUsrFmt) / sizeof(USHORT);
-static const USHORT VF_DB_COUNT = sizeof(aDBFmt) / sizeof(USHORT);
+static const sal_uInt16 VF_COUNT = sizeof(aGetFmt) / sizeof(sal_uInt16);
+static const sal_uInt16 VF_USR_COUNT = sizeof(aUsrFmt) / sizeof(sal_uInt16);
+static const sal_uInt16 VF_DB_COUNT = sizeof(aDBFmt) / sizeof(sal_uInt16);
/*--------------------------------------------------------------------
Beschreibung: Feldtypen und Subtypes
--------------------------------------------------------------------*/
struct SwFldPack
{
- USHORT nTypeId;
+ sal_uInt16 nTypeId;
- USHORT nSubTypeStart;
- USHORT nSubTypeEnd;
+ sal_uInt16 nSubTypeStart;
+ sal_uInt16 nSubTypeEnd;
- ULONG nFmtBegin;
- ULONG nFmtEnd;
+ sal_uLong nFmtBegin;
+ sal_uLong nFmtEnd;
};
/*--------------------------------------------------------------------
@@ -260,7 +260,7 @@ static SwWrtShell* lcl_GetShell()
return 0;
}
-inline USHORT GetPackCount() { return sizeof(aSwFlds) / sizeof(SwFldPack); }
+inline sal_uInt16 GetPackCount() { return sizeof(aSwFlds) / sizeof(SwFldPack); }
/*--------------------------------------------------------------------
Beschreibung: FieldManager regelt das Einfuegen und Updaten
@@ -271,7 +271,7 @@ SwFldMgr::SwFldMgr(SwWrtShell* pSh ) :
pModule(0),
pMacroItem(0),
pWrtShell(pSh),
- bEvalExp(TRUE)
+ bEvalExp(sal_True)
{
// aktuelles Feld ermitteln falls vorhanden
GetCurFld();
@@ -286,14 +286,14 @@ SwFldMgr::~SwFldMgr()
Beschreibung: RefMark ueber Namen organisieren
--------------------------------------------------------------------*/
-BOOL SwFldMgr::CanInsertRefMark( const String& rStr )
+sal_Bool SwFldMgr::CanInsertRefMark( const String& rStr )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
SwWrtShell *pSh = pWrtShell ? pWrtShell : lcl_GetShell();
DBG_ASSERT(pSh, "no SwWrtShell found");
if(pSh)
{
- USHORT nCnt = pSh->GetCrsrCnt();
+ sal_uInt16 nCnt = pSh->GetCrsrCnt();
// der letzte Crsr muss keine aufgespannte Selektion
if( 1 < nCnt && !pSh->SwCrsrShell::HasSelection() )
@@ -308,7 +308,7 @@ BOOL SwFldMgr::CanInsertRefMark( const String& rStr )
Beschreibung: Zugriff ueber ResIds
--------------------------------------------------------------------*/
-void SwFldMgr::RemoveFldType(USHORT nResId, const String& rName )
+void SwFldMgr::RemoveFldType(sal_uInt16 nResId, const String& rName )
{
SwWrtShell * pSh = pWrtShell ? pWrtShell : lcl_GetShell();
DBG_ASSERT(pSh, "no SwWrtShell found");
@@ -316,7 +316,7 @@ void SwFldMgr::RemoveFldType(USHORT nResId, const String& rName )
pSh->RemoveFldType(nResId, rName);
}
-USHORT SwFldMgr::GetFldTypeCount(USHORT nResId) const
+sal_uInt16 SwFldMgr::GetFldTypeCount(sal_uInt16 nResId) const
{
SwWrtShell * pSh = pWrtShell ? pWrtShell : lcl_GetShell();
DBG_ASSERT(pSh, "no SwWrtShell found");
@@ -324,7 +324,7 @@ USHORT SwFldMgr::GetFldTypeCount(USHORT nResId) const
}
-SwFieldType* SwFldMgr::GetFldType(USHORT nResId, USHORT nId) const
+SwFieldType* SwFldMgr::GetFldType(sal_uInt16 nResId, sal_uInt16 nId) const
{
SwWrtShell * pSh = pWrtShell ? pWrtShell : lcl_GetShell();
DBG_ASSERT(pSh, "no SwWrtShell found");
@@ -332,7 +332,7 @@ SwFieldType* SwFldMgr::GetFldType(USHORT nResId, USHORT nId) const
}
-SwFieldType* SwFldMgr::GetFldType(USHORT nResId, const String& rName) const
+SwFieldType* SwFldMgr::GetFldType(sal_uInt16 nResId, const String& rName) const
{
SwWrtShell * pSh = pWrtShell ? pWrtShell : lcl_GetShell();
DBG_ASSERT(pSh, "no SwWrtShell found");
@@ -364,7 +364,7 @@ SwField* SwFldMgr::GetCurFld()
// Aktuelle Werte aufbereiten Parameter 1 und Parameter 2
// als auch das Format ermitteln
//
- const USHORT nTypeId = pCurFld->GetTypeId();
+ const sal_uInt16 nTypeId = pCurFld->GetTypeId();
nCurFmt = pCurFld->GetFormat();
aCurPar1 = pCurFld->GetPar1();
@@ -388,7 +388,7 @@ SwField* SwFldMgr::GetCurFld()
--------------------------------------------------------------------*/
-const SwFldGroupRgn& SwFldMgr::GetGroupRange(BOOL bHtmlMode, USHORT nGrpId) const
+const SwFldGroupRgn& SwFldMgr::GetGroupRange(sal_Bool bHtmlMode, sal_uInt16 nGrpId) const
{
static SwFldGroupRgn __READONLY_DATA aRanges[] =
{
@@ -410,16 +410,16 @@ static SwFldGroupRgn __READONLY_DATA aWebRanges[] =
};
if (bHtmlMode)
- return aWebRanges[(USHORT)nGrpId];
+ return aWebRanges[(sal_uInt16)nGrpId];
else
- return aRanges[(USHORT)nGrpId];
+ return aRanges[(sal_uInt16)nGrpId];
}
/*--------------------------------------------------------------------
Beschreibung: GroupId bestimmen
--------------------------------------------------------------------*/
-USHORT SwFldMgr::GetGroup(BOOL bHtmlMode, USHORT nTypeId, USHORT nSubType) const
+sal_uInt16 SwFldMgr::GetGroup(sal_Bool bHtmlMode, sal_uInt16 nTypeId, sal_uInt16 nSubType) const
{
if (nTypeId == TYP_SETINPFLD)
nTypeId = TYP_SETFLD;
@@ -433,10 +433,10 @@ USHORT SwFldMgr::GetGroup(BOOL bHtmlMode, USHORT nTypeId, USHORT nSubType) const
if (nTypeId == TYP_FIXTIMEFLD)
nTypeId = TYP_TIMEFLD;
- for (USHORT i = GRP_DOC; i <= GRP_VAR; i++)
+ for (sal_uInt16 i = GRP_DOC; i <= GRP_VAR; i++)
{
const SwFldGroupRgn& rRange = GetGroupRange(bHtmlMode, i);
- for (USHORT nPos = rRange.nStart; nPos < rRange.nEnd; nPos++)
+ for (sal_uInt16 nPos = rRange.nStart; nPos < rRange.nEnd; nPos++)
{
if (aSwFlds[nPos].nTypeId == nTypeId)
return i;
@@ -451,18 +451,18 @@ USHORT SwFldMgr::GetGroup(BOOL bHtmlMode, USHORT nTypeId, USHORT nSubType) const
--------------------------------------------------------------------*/
-USHORT SwFldMgr::GetTypeId(USHORT nPos)
+sal_uInt16 SwFldMgr::GetTypeId(sal_uInt16 nPos)
{
ASSERT(nPos < ::GetPackCount(), "unzulaessige Pos");
return aSwFlds[ nPos ].nTypeId;
}
-const String& SwFldMgr::GetTypeStr(USHORT nPos)
+const String& SwFldMgr::GetTypeStr(sal_uInt16 nPos)
{
ASSERT(nPos < ::GetPackCount(), "unzulaessige TypeId");
- USHORT nFldWh = aSwFlds[ nPos ].nTypeId;
+ sal_uInt16 nFldWh = aSwFlds[ nPos ].nTypeId;
// Sonderbehandlung fuer Datum/Zeit Felder (ohne var/fix)
if( TYP_DATEFLD == nFldWh )
@@ -484,7 +484,7 @@ const String& SwFldMgr::GetTypeStr(USHORT nPos)
--------------------------------------------------------------------*/
-USHORT SwFldMgr::GetPos(USHORT nTypeId)
+sal_uInt16 SwFldMgr::GetPos(sal_uInt16 nTypeId)
{
switch( nTypeId )
{
@@ -494,7 +494,7 @@ USHORT SwFldMgr::GetPos(USHORT nTypeId)
case TYP_USRINPFLD: nTypeId = TYP_USERFLD; break;
}
- for(USHORT i = 0; i < GetPackCount(); i++)
+ for(sal_uInt16 i = 0; i < GetPackCount(); i++)
if(aSwFlds[i].nTypeId == nTypeId)
return i;
@@ -505,14 +505,14 @@ USHORT SwFldMgr::GetPos(USHORT nTypeId)
Beschreibung: Subtypen eines Feldes lokalisieren
--------------------------------------------------------------------*/
-BOOL SwFldMgr::GetSubTypes(USHORT nTypeId, SvStringsDtor& rToFill)
+sal_Bool SwFldMgr::GetSubTypes(sal_uInt16 nTypeId, SvStringsDtor& rToFill)
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
SwWrtShell *pSh = pWrtShell ? pWrtShell : lcl_GetShell();
DBG_ASSERT(pSh, "no SwWrtShell found");
if(pSh)
{
- const USHORT nPos = GetPos(nTypeId);
+ const sal_uInt16 nPos = GetPos(nTypeId);
switch(nTypeId)
{
@@ -540,11 +540,11 @@ BOOL SwFldMgr::GetSubTypes(USHORT nTypeId, SvStringsDtor& rToFill)
case TYP_USERFLD:
{
- const USHORT nCount = pSh->GetFldTypeCount();
- for(USHORT i = 0; i < nCount; ++i)
+ const sal_uInt16 nCount = pSh->GetFldTypeCount();
+ for(sal_uInt16 i = 0; i < nCount; ++i)
{
SwFieldType* pFldType = pSh->GetFldType( i );
- const USHORT nWhich = pFldType->Which();
+ const sal_uInt16 nWhich = pFldType->Which();
if((nTypeId == TYP_DDEFLD && pFldType->Which() == RES_DDEFLD) ||
@@ -581,13 +581,13 @@ BOOL SwFldMgr::GetSubTypes(USHORT nTypeId, SvStringsDtor& rToFill)
// statische SubTypes
if(nPos != USHRT_MAX)
{
- USHORT nCount;
+ sal_uInt16 nCount;
if (nTypeId == TYP_DOCINFOFLD)
nCount = DI_SUBTYPE_END - DI_SUBTYPE_BEGIN;
else
nCount = aSwFlds[nPos].nSubTypeEnd - aSwFlds[nPos].nSubTypeStart;
- for(USHORT i = 0; i < nCount; ++i)
+ for(sal_uInt16 i = 0; i < nCount; ++i)
{
String* pNew;
if (nTypeId == TYP_DOCINFOFLD)
@@ -605,7 +605,7 @@ BOOL SwFldMgr::GetSubTypes(USHORT nTypeId, SvStringsDtor& rToFill)
}
}
}
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
}
@@ -616,18 +616,18 @@ BOOL SwFldMgr::GetSubTypes(USHORT nTypeId, SvStringsDtor& rToFill)
--------------------------------------------------------------------*/
-USHORT SwFldMgr::GetFormatCount(USHORT nTypeId, BOOL bIsText, BOOL bHtmlMode) const
+sal_uInt16 SwFldMgr::GetFormatCount(sal_uInt16 nTypeId, sal_Bool bIsText, sal_Bool bHtmlMode) const
{
ASSERT(nTypeId < TYP_END, "unzulaessige TypeId");
{
- const USHORT nPos = GetPos(nTypeId);
+ const sal_uInt16 nPos = GetPos(nTypeId);
if(nPos == USHRT_MAX || (bHtmlMode && nTypeId == TYP_SETFLD))
return 0;
- ULONG nStart = aSwFlds[nPos].nFmtBegin;
- ULONG nEnd = aSwFlds[nPos].nFmtEnd;
+ sal_uLong nStart = aSwFlds[nPos].nFmtBegin;
+ sal_uLong nEnd = aSwFlds[nPos].nFmtEnd;
if (bIsText && nEnd - nStart >= 2)
return 2;
@@ -643,7 +643,7 @@ USHORT SwFldMgr::GetFormatCount(USHORT nTypeId, BOOL bIsText, BOOL bHtmlMode) co
case FMT_DBFLD_BEGIN: return VF_DB_COUNT;
case FMT_NUM_BEGIN:
{
- USHORT nCount = (USHORT)(nEnd - nStart);
+ sal_uInt16 nCount = (sal_uInt16)(nEnd - nStart);
GetNumberingInfo();
if(xNumberingInfo.is())
{
@@ -664,7 +664,7 @@ USHORT SwFldMgr::GetFormatCount(USHORT nTypeId, BOOL bIsText, BOOL bHtmlMode) co
}
}
- return (USHORT)(nEnd - nStart);
+ return (sal_uInt16)(nEnd - nStart);
}
}
@@ -673,17 +673,17 @@ USHORT SwFldMgr::GetFormatCount(USHORT nTypeId, BOOL bIsText, BOOL bHtmlMode) co
--------------------------------------------------------------------*/
-String SwFldMgr::GetFormatStr(USHORT nTypeId, ULONG nFormatId) const
+String SwFldMgr::GetFormatStr(sal_uInt16 nTypeId, sal_uLong nFormatId) const
{
String aRet;
ASSERT(nTypeId < TYP_END, "unzulaessige TypeId");
- const USHORT nPos = GetPos(nTypeId);
+ const sal_uInt16 nPos = GetPos(nTypeId);
if(nPos == USHRT_MAX)
return aRet;
- ULONG nStart;
+ sal_uLong nStart;
nStart = aSwFlds[nPos].nFmtBegin;
@@ -691,7 +691,7 @@ String SwFldMgr::GetFormatStr(USHORT nTypeId, ULONG nFormatId) const
nFormatId &= ~FF_FIXED; // Fixed-Flag ausmaskieren
if((nStart + nFormatId) < aSwFlds[nPos].nFmtEnd)
- aRet = SW_RESSTR((USHORT)(nStart + nFormatId));
+ aRet = SW_RESSTR((sal_uInt16)(nStart + nFormatId));
else if( FMT_NUM_BEGIN == nStart)
{
if(xNumberingInfo.is())
@@ -723,9 +723,9 @@ String SwFldMgr::GetFormatStr(USHORT nTypeId, ULONG nFormatId) const
Beschreibung: FormatId aus Pseudo-ID ermitteln
--------------------------------------------------------------------*/
-USHORT SwFldMgr::GetFormatId(USHORT nTypeId, ULONG nFormatId) const
+sal_uInt16 SwFldMgr::GetFormatId(sal_uInt16 nTypeId, sal_uLong nFormatId) const
{
- USHORT nId = (USHORT)nFormatId;
+ sal_uInt16 nId = (sal_uInt16)nFormatId;
switch( nTypeId )
{
@@ -746,9 +746,9 @@ USHORT SwFldMgr::GetFormatId(USHORT nTypeId, ULONG nFormatId) const
case TYP_SEQFLD:
case TYP_GETREFPAGEFLD:
{
- USHORT nPos = GetPos( nTypeId );
- ULONG nBegin = aSwFlds[ nPos ].nFmtBegin;
- ULONG nEnd = aSwFlds[nPos].nFmtEnd;
+ sal_uInt16 nPos = GetPos( nTypeId );
+ sal_uLong nBegin = aSwFlds[ nPos ].nFmtBegin;
+ sal_uLong nEnd = aSwFlds[nPos].nFmtEnd;
if((nBegin + nFormatId) < nEnd)
{
switch( nBegin + nFormatId )
@@ -804,15 +804,15 @@ USHORT SwFldMgr::GetFormatId(USHORT nTypeId, ULONG nFormatId) const
--------------------------------------------------------------------*/
-BOOL SwFldMgr::GoNextPrev( BOOL bNext, SwFieldType* pTyp )
+sal_Bool SwFldMgr::GoNextPrev( sal_Bool bNext, SwFieldType* pTyp )
{
SwWrtShell* pSh = pWrtShell ? pWrtShell : ::lcl_GetShell();
if(!pSh)
- return FALSE;
+ return sal_False;
if( !pTyp && pCurFld )
{
- const USHORT nTypeId = pCurFld->GetTypeId();
+ const sal_uInt16 nTypeId = pCurFld->GetTypeId();
if( TYP_SETINPFLD == nTypeId || TYP_USRINPFLD == nTypeId )
pTyp = pSh->GetFldType( 0, RES_INPUTFLD );
else
@@ -825,7 +825,7 @@ BOOL SwFldMgr::GoNextPrev( BOOL bNext, SwFieldType* pTyp )
return pSh->MoveFldType( 0, bNext, USHRT_MAX, RES_DBFLD );
}
- return pTyp && pSh ? pSh->MoveFldType( pTyp, bNext ) : FALSE;
+ return pTyp && pSh ? pSh->MoveFldType( pTyp, bNext ) : sal_False;
}
/*--------------------------------------------------------------------
@@ -846,7 +846,7 @@ void SwFldMgr::InsertFldType(SwFieldType& rType)
--------------------------------------------------------------------*/
-USHORT SwFldMgr::GetCurTypeId() const
+sal_uInt16 SwFldMgr::GetCurTypeId() const
{
return pCurFld ? pCurFld->GetTypeId() : USHRT_MAX;
}
@@ -856,21 +856,21 @@ USHORT SwFldMgr::GetCurTypeId() const
--------------------------------------------------------------------*/
-BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData )
+sal_Bool SwFldMgr::InsertFld( const SwInsertFld_Data& rData )
{
SwField* pFld = 0;
- BOOL bExp = FALSE;
- BOOL bTbl = FALSE;
- BOOL bPageVar = FALSE;
- ULONG nFormatId = rData.nFormatId;
- USHORT nSubType = rData.nSubType;
+ sal_Bool bExp = sal_False;
+ sal_Bool bTbl = sal_False;
+ sal_Bool bPageVar = sal_False;
+ sal_uLong nFormatId = rData.nFormatId;
+ sal_uInt16 nSubType = rData.nSubType;
sal_Unicode cSeparator = rData.cSeparator;
SwWrtShell* pCurShell = rData.pSh;
if(!pCurShell)
pCurShell = pWrtShell ? pWrtShell : ::lcl_GetShell();
DBG_ASSERT(pCurShell, "no SwWrtShell found");
if(!pCurShell)
- return FALSE;
+ return sal_False;
switch(rData.nTypeId)
{ // ACHTUNG dieses Feld wird ueber einen gesonderten Dialog eingefuegt
@@ -884,7 +884,7 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData )
{
SwScriptFieldType* pType =
(SwScriptFieldType*)pCurShell->GetFldType(0, RES_SCRIPTFLD);
- pFld = new SwScriptField(pType, rData.sPar1, rData.sPar2, (BOOL)nFormatId);
+ pFld = new SwScriptField(pType, rData.sPar1, rData.sPar2, (sal_Bool)nFormatId);
break;
}
case TYP_COMBINED_CHARS:
@@ -910,7 +910,7 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData )
case TYP_DATEFLD:
case TYP_TIMEFLD:
{
- USHORT nSub = static_cast< USHORT >(rData.nTypeId == TYP_DATEFLD ? DATEFLD : TIMEFLD);
+ sal_uInt16 nSub = static_cast< sal_uInt16 >(rData.nTypeId == TYP_DATEFLD ? DATEFLD : TIMEFLD);
nSub |= nSubType == DATE_VAR ? 0 : FIXEDFLD;
SwDateTimeFieldType* pTyp =
@@ -935,14 +935,14 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData )
}
case TYP_CHAPTERFLD:
{
- USHORT nByte = (USHORT)rData.sPar2.ToInt32();
+ sal_uInt16 nByte = (sal_uInt16)rData.sPar2.ToInt32();
SwChapterFieldType* pTyp =
(SwChapterFieldType*)pCurShell->GetFldType(0, RES_CHAPTERFLD);
pFld = new SwChapterField(pTyp, nFormatId);
- nByte = Max(USHORT(1), nByte);
- nByte = Min(nByte, USHORT(MAXLEVEL));
+ nByte = Max(sal_uInt16(1), nByte);
+ nByte = Min(nByte, sal_uInt16(MAXLEVEL));
nByte -= 1;
- ((SwChapterField*)pFld)->SetLevel((BYTE)nByte);
+ ((SwChapterField*)pFld)->SetLevel((sal_uInt8)nByte);
break;
}
case TYP_NEXTPAGEFLD:
@@ -996,8 +996,8 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData )
{
SwHiddenTxtFieldType* pTyp =
(SwHiddenTxtFieldType*)pCurShell->GetFldType(0, RES_HIDDENTXTFLD);
- pFld = new SwHiddenTxtField(pTyp, TRUE, rData.sPar1, rData.sPar2, FALSE, rData.nTypeId);
- bExp = TRUE;
+ pFld = new SwHiddenTxtField(pTyp, sal_True, rData.sPar1, rData.sPar2, sal_False, rData.nTypeId);
+ bExp = sal_True;
break;
}
case TYP_HIDDENPARAFLD:
@@ -1005,7 +1005,7 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData )
SwHiddenParaFieldType* pTyp =
(SwHiddenParaFieldType*)pCurShell->GetFldType(0, RES_HIDDENPARAFLD);
pFld = new SwHiddenParaField(pTyp, rData.sPar1);
- bExp = TRUE;
+ bExp = sal_True;
break;
}
case TYP_SETREFFLD:
@@ -1013,17 +1013,17 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData )
if( rData.sPar1.Len() > 0 && CanInsertRefMark( rData.sPar1 ) )
{
pCurShell->SetAttr( SwFmtRefMark( rData.sPar1 ) );
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
case TYP_GETREFFLD:
{
SwGetRefFieldType* pTyp =
(SwGetRefFieldType*)pCurShell->GetFldType(0, RES_GETREFFLD);
- USHORT nSeqNo = (USHORT)rData.sPar2.ToInt32();
+ sal_uInt16 nSeqNo = (sal_uInt16)rData.sPar2.ToInt32();
pFld = new SwGetRefField(pTyp, rData.sPar1, nSubType, nSeqNo, nFormatId);
- bExp = TRUE;
+ bExp = sal_True;
break;
}
case TYP_DDEFLD:
@@ -1031,11 +1031,11 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData )
//JP 28.08.95: DDE-Topics/-Items koennen Blanks in ihren
// Namen haben! Wird hier noch nicht beachtet.
String sCmd( rData.sPar2 );
- USHORT nTmpPos = sCmd.SearchAndReplace( ' ', sfx2::cTokenSeperator );
+ sal_uInt16 nTmpPos = sCmd.SearchAndReplace( ' ', sfx2::cTokenSeperator );
sCmd.SearchAndReplace( ' ', sfx2::cTokenSeperator, nTmpPos );
SwDDEFieldType* pTyp = (SwDDEFieldType*)pCurShell->InsertFldType(
- SwDDEFieldType( rData.sPar1, sCmd, (USHORT)nFormatId ));
+ SwDDEFieldType( rData.sPar1, sCmd, (sal_uInt16)nFormatId ));
pFld = new SwDDEField( pTyp );
break;
}
@@ -1123,7 +1123,7 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData )
}
pFld->ChangeFormat( nFormatId );
- bExp = TRUE;
+ bExp = sal_True;
break;
}
case TYP_DBSETNUMBERFLD:
@@ -1131,7 +1131,7 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData )
case TYP_DBNEXTSETFLD:
case TYP_DBNAMEFLD:
{
- USHORT nPos, nTablePos, nCmdTypePos, nExpPos;
+ sal_uInt16 nPos, nTablePos, nCmdTypePos, nExpPos;
String sPar1;
SwDBData aDBData;
@@ -1172,7 +1172,7 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData )
SwDBNextSetFieldType* pTyp = (SwDBNextSetFieldType*)pCurShell->GetFldType(
0, RES_DBNEXTSETFLD);
pFld = new SwDBNextSetField(pTyp, sPar1, rData.sPar2, aDBData);
- bExp = TRUE;
+ bExp = sal_True;
break;
}
case TYP_DBNUMSETFLD:
@@ -1180,7 +1180,7 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData )
SwDBNumSetFieldType* pTyp = (SwDBNumSetFieldType*)pCurShell->GetFldType(
0, RES_DBNUMSETFLD);
pFld = new SwDBNumSetField( pTyp, sPar1, rData.sPar2, aDBData);
- bExp = TRUE;
+ bExp = sal_True;
break;
}
case TYP_DBSETNUMBERFLD:
@@ -1188,7 +1188,7 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData )
SwDBSetNumberFieldType* pTyp = (SwDBSetNumberFieldType*)
pCurShell->GetFldType(0, RES_DBSETNUMBERFLD);
pFld = new SwDBSetNumberField( pTyp, aDBData, nFormatId);
- bExp = TRUE;
+ bExp = sal_True;
break;
}
}
@@ -1210,7 +1210,7 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData )
pFld = new SwUserField(pTyp, 0, nFormatId);
if (pFld->GetSubType() != nSubType)
pFld->SetSubType(nSubType);
- bTbl = TRUE;
+ bTbl = sal_True;
break;
}
case TYP_INPUTFLD:
@@ -1227,16 +1227,16 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData )
new SwSetExpField(pTyp, aEmptyStr, nFormatId);
// Typ vom SwSetExpFieldType nicht veraendern:
- USHORT nOldSubType = pExpFld->GetSubType();
+ sal_uInt16 nOldSubType = pExpFld->GetSubType();
pExpFld->SetSubType(nOldSubType | (nSubType & 0xff00));
pExpFld->SetPromptText(rData.sPar2);
- pExpFld->SetInputFlag(TRUE) ;
- bExp = TRUE;
+ pExpFld->SetInputFlag(sal_True) ;
+ bExp = sal_True;
pFld = pExpFld;
}
else
- return FALSE;
+ return sal_False;
}
else
{
@@ -1250,13 +1250,13 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData )
// Dialog starten
//
- pCurShell->StartInputFldDlg(pFld, FALSE, rData.pParent);
+ pCurShell->StartInputFldDlg(pFld, sal_False, rData.pParent);
break;
}
case TYP_SETFLD:
{
if (!rData.sPar2.Len()) // Leere Variablen sind nicht erlaubt
- return FALSE;
+ return sal_False;
SwSetExpFieldType* pTyp = (SwSetExpFieldType*)pCurShell->InsertFldType(
SwSetExpFieldType(pCurShell->GetDoc(), rData.sPar1) );
@@ -1264,7 +1264,7 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData )
SwSetExpField* pExpFld = new SwSetExpField( pTyp, rData.sPar2, nFormatId);
pExpFld->SetSubType(nSubType);
pExpFld->SetPar2(rData.sPar2);
- bExp = TRUE;
+ bExp = sal_True;
pFld = pExpFld;
break;
}
@@ -1273,7 +1273,7 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData )
SwSetExpFieldType* pTyp = (SwSetExpFieldType*)pCurShell->InsertFldType(
SwSetExpFieldType(pCurShell->GetDoc(), rData.sPar1, nsSwGetSetExpType::GSE_SEQ));
- BYTE nLevel = static_cast< BYTE >(nSubType & 0xff);
+ sal_uInt8 nLevel = static_cast< sal_uInt8 >(nSubType & 0xff);
pTyp->SetOutlineLvl(nLevel);
if (nLevel != 0x7f && cSeparator == 0)
@@ -1281,7 +1281,7 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData )
pTyp->SetDelimiter(cSeparator);
SwSetExpField* pExpFld = new SwSetExpField(pTyp, rData.sPar2, nFormatId);
- bExp = TRUE;
+ bExp = sal_True;
pFld = pExpFld;
nSubType = nsSwGetSetExpType::GSE_SEQ;
break;
@@ -1298,15 +1298,15 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData )
0, RES_GETEXPFLD);
pFld = new SwGetExpField(pTyp, rData.sPar1, pSetTyp->GetType(), nFormatId);
pFld->SetSubType(nSubType | pSetTyp->GetType());
- bExp = TRUE;
+ bExp = sal_True;
}
else
- return FALSE;
+ return sal_False;
break;
}
case TYP_FORMELFLD:
{
- if(pCurShell->GetFrmType(0,FALSE) & FRMTYPE_TABLE)
+ if(pCurShell->GetFrmType(0,sal_False) & FRMTYPE_TABLE)
{
pCurShell->StartAllAction();
@@ -1333,13 +1333,13 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData )
pCurShell->UpdateTable();
pCurShell->EndAllAction();
- return TRUE;
+ return sal_True;
/* // In der Tabelle Tabellenformeln einfuegen
SwTblFieldType* pTyp = (SwTblFieldType*)pCurShell->GetFldType(
0, RES_TABLEFLD);
pFld = new SwTblField(pTyp, rData.sPar2, nsSwGetSetExpType::GSE_EXPR, nFormatId);
- bTbl = TRUE;*/
+ bTbl = sal_True;*/
}
else
{
@@ -1347,7 +1347,7 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData )
pCurShell->GetFldType(0, RES_GETEXPFLD);
pFld = new SwGetExpField(pTyp, rData.sPar2, nsSwGetSetExpType::GSE_FORMULA, nFormatId);
pFld->SetSubType(nSubType);
- bExp = TRUE;
+ bExp = sal_True;
}
break;
}
@@ -1355,13 +1355,13 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData )
pFld = new SwRefPageSetField( (SwRefPageSetFieldType*)
pCurShell->GetFldType( 0, RES_REFPAGESETFLD ),
(short)rData.sPar2.ToInt32(), 0 != nSubType );
- bPageVar = TRUE;
+ bPageVar = sal_True;
break;
case TYP_GETREFPAGEFLD:
pFld = new SwRefPageGetField( (SwRefPageGetFieldType*)
pCurShell->GetFldType( 0, RES_REFPAGEGETFLD ), nFormatId );
- bPageVar = TRUE;
+ bPageVar = sal_True;
break;
case TYP_DROPDOWN :
{
@@ -1377,7 +1377,7 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData )
break;
default:
{ ASSERT(!this, "Falscher Feldtyp");
- return FALSE;
+ return sal_False;
}
}
ASSERT(pFld, "Feld nicht vorhanden");
@@ -1385,7 +1385,7 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData )
//the auto language flag has to be set prior to the language!
pFld->SetAutomaticLanguage(rData.bIsAutomaticLanguage);
- USHORT nLang = GetCurrLanguage();
+ sal_uInt16 nLang = GetCurrLanguage();
pFld->SetLanguage(nLang);
// Einfuegen
@@ -1394,13 +1394,13 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData )
pCurShell->Insert(*pFld);
if(bExp && bEvalExp)
- pCurShell->UpdateExpFlds(TRUE);
+ pCurShell->UpdateExpFlds(sal_True);
if(bTbl)
{
- pCurShell->Left(CRSR_SKIP_CHARS, FALSE, 1, FALSE );
+ pCurShell->Left(CRSR_SKIP_CHARS, sal_False, 1, sal_False );
pCurShell->UpdateFlds(*pFld);
- pCurShell->Right(CRSR_SKIP_CHARS, FALSE, 1, FALSE );
+ pCurShell->Right(CRSR_SKIP_CHARS, sal_False, 1, sal_False );
}
else if( bPageVar )
((SwRefPageGetFieldType*)pCurShell->GetFldType( 0, RES_REFPAGEGETFLD ))->UpdateFlds();
@@ -1411,7 +1411,7 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData )
delete pFld;
pCurShell->EndAllAction();
- return TRUE;
+ return sal_True;
}
/*--------------------------------------------------------------------
@@ -1419,7 +1419,7 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData )
--------------------------------------------------------------------*/
-void SwFldMgr::UpdateCurFld(ULONG nFormat,
+void SwFldMgr::UpdateCurFld(sal_uLong nFormat,
const String& rPar1,
const String& rPar2,
SwField * _pTmpFld) // #111840#
@@ -1440,7 +1440,7 @@ void SwFldMgr::UpdateCurFld(ULONG nFormat,
}
SwFieldType* pType = pTmpFld->GetTyp();
- const USHORT nTypeId = pTmpFld->GetTypeId();
+ const sal_uInt16 nTypeId = pTmpFld->GetTypeId();
SwWrtShell* pSh = pWrtShell ? pWrtShell : ::lcl_GetShell();
DBG_ASSERT(pSh, "no SwWrtShell found");
@@ -1448,8 +1448,8 @@ void SwFldMgr::UpdateCurFld(ULONG nFormat,
return;
pSh->StartAllAction();
- BOOL bSetPar2 = TRUE;
- BOOL bSetPar1 = TRUE;
+ sal_Bool bSetPar2 = sal_True;
+ sal_Bool bSetPar1 = sal_True;
String sPar1( rPar1 );
String sPar2( rPar2 );
@@ -1460,24 +1460,24 @@ void SwFldMgr::UpdateCurFld(ULONG nFormat,
{
//JP 28.08.95: DDE-Topics/-Items koennen Blanks in ihren
// Namen haben! Wird hier noch nicht beachtet.
- USHORT nTmpPos = sPar2.SearchAndReplace( ' ', sfx2::cTokenSeperator );
+ sal_uInt16 nTmpPos = sPar2.SearchAndReplace( ' ', sfx2::cTokenSeperator );
sPar2.SearchAndReplace( ' ', sfx2::cTokenSeperator, nTmpPos );
break;
}
case TYP_CHAPTERFLD:
{
- USHORT nByte = (USHORT)rPar2.ToInt32();
- nByte = Max(USHORT(1), nByte);
- nByte = Min(nByte, USHORT(MAXLEVEL));
+ sal_uInt16 nByte = (sal_uInt16)rPar2.ToInt32();
+ nByte = Max(sal_uInt16(1), nByte);
+ nByte = Min(nByte, sal_uInt16(MAXLEVEL));
nByte -= 1;
- ((SwChapterField*)pTmpFld)->SetLevel((BYTE)nByte);
- bSetPar2 = FALSE;
+ ((SwChapterField*)pTmpFld)->SetLevel((sal_uInt8)nByte);
+ bSetPar2 = sal_False;
break;
}
case TYP_SCRIPTFLD:
- ((SwScriptField*)pTmpFld)->SetCodeURL((BOOL)nFormat);
+ ((SwScriptField*)pTmpFld)->SetCodeURL((sal_Bool)nFormat);
break;
case TYP_NEXTPAGEFLD:
@@ -1521,11 +1521,11 @@ void SwFldMgr::UpdateCurFld(ULONG nFormat,
case TYP_GETREFFLD:
{
- bSetPar2 = FALSE;
- ((SwGetRefField*)pTmpFld)->SetSubType( (USHORT)rPar2.ToInt32() );
- USHORT nPos = rPar2.Search( '|' );
+ bSetPar2 = sal_False;
+ ((SwGetRefField*)pTmpFld)->SetSubType( (sal_uInt16)rPar2.ToInt32() );
+ sal_uInt16 nPos = rPar2.Search( '|' );
if( STRING_NOTFOUND != nPos )
- ((SwGetRefField*)pTmpFld)->SetSeqNo( (USHORT)rPar2.Copy( nPos + 1 ).ToInt32());
+ ((SwGetRefField*)pTmpFld)->SetSeqNo( (sal_uInt16)rPar2.Copy( nPos + 1 ).ToInt32());
}
break;
case TYP_DROPDOWN:
@@ -1537,7 +1537,7 @@ void SwFldMgr::UpdateCurFld(ULONG nFormat,
pArray[nToken] = sPar2.GetToken(nToken, DB_DELIM);
((SwDropDownField*)pTmpFld)->SetItems(aEntries);
((SwDropDownField*)pTmpFld)->SetName(sPar1);
- bSetPar1 = bSetPar2 = FALSE;
+ bSetPar1 = bSetPar2 = sal_False;
}
break;
case TYP_AUTHORITY :
@@ -1546,7 +1546,7 @@ void SwFldMgr::UpdateCurFld(ULONG nFormat,
SwAuthorityField* pAuthorityField = static_cast<SwAuthorityField*>(pTmpFld);
SwAuthorityFieldType* pAuthorityType = static_cast<SwAuthorityFieldType*>(pType);
SwAuthEntry aTempEntry;
- for( USHORT i = 0; i < AUTH_FIELD_END; ++i )
+ for( sal_uInt16 i = 0; i < AUTH_FIELD_END; ++i )
aTempEntry.SetAuthorField( (ToxAuthorityField)i,
rPar1.GetToken( i, TOX_STYLE_DELIMITER ));
if( pAuthorityType->ChangeEntryContent( &aTempEntry ) )
@@ -1557,8 +1557,8 @@ void SwFldMgr::UpdateCurFld(ULONG nFormat,
if( aTempEntry.GetAuthorField( AUTH_FIELD_IDENTIFIER ) ==
pAuthorityField->GetFieldText( AUTH_FIELD_IDENTIFIER ) )
- bSetPar1 = FALSE; //otherwise it's a new or changed entry, the field needs to be updated
- bSetPar2 = FALSE;
+ bSetPar1 = sal_False; //otherwise it's a new or changed entry, the field needs to be updated
+ bSetPar2 = sal_False;
}
break;
}
@@ -1603,11 +1603,11 @@ void SwFldMgr::EvalExpFlds(SwWrtShell* pSh)
if(pSh)
{
pSh->StartAllAction();
- pSh->UpdateExpFlds(TRUE);
+ pSh->UpdateExpFlds(sal_True);
pSh->EndAllAction();
}
}
-USHORT SwFldMgr::GetCurrLanguage() const
+sal_uInt16 SwFldMgr::GetCurrLanguage() const
{
SwWrtShell* pSh = pWrtShell ? pWrtShell : ::lcl_GetShell();
if( pSh )
@@ -1617,9 +1617,9 @@ USHORT SwFldMgr::GetCurrLanguage() const
void SwFieldType::_GetFldName()
{
- static const USHORT coFldCnt = STR_TYPE_END - STR_TYPE_BEGIN;
+ static const sal_uInt16 coFldCnt = STR_TYPE_END - STR_TYPE_BEGIN;
- static USHORT __READONLY_DATA coFldNms[ coFldCnt ] = {
+ static sal_uInt16 __READONLY_DATA coFldNms[ coFldCnt ] = {
FLD_DATE_STD,
FLD_TIME_STD,
STR_FILENAMEFLD,
@@ -1666,8 +1666,8 @@ void SwFieldType::_GetFldName()
};
// Infos fuer Felder einfuegen
- SwFieldType::pFldNames = new SvStringsDtor( (BYTE)coFldCnt, 2 );
- for( USHORT nIdx = 0; nIdx < coFldCnt; ++nIdx )
+ SwFieldType::pFldNames = new SvStringsDtor( (sal_uInt8)coFldCnt, 2 );
+ for( sal_uInt16 nIdx = 0; nIdx < coFldCnt; ++nIdx )
{
String* pTmp = new SW_RESSTR( coFldNms[ nIdx ] );
pTmp->Assign( MnemonicGenerator::EraseAllMnemonicChars( *pTmp ) );
@@ -1679,9 +1679,9 @@ void SwFieldType::_GetFldName()
Beschreibung:
--------------------------------------------------------------------*/
-BOOL SwFldMgr::ChooseMacro(const String&)
+sal_Bool SwFldMgr::ChooseMacro(const String&)
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
// choose script dialog
::rtl::OUString aScriptURL = SfxApplication::ChooseScript();
@@ -1690,7 +1690,7 @@ BOOL SwFldMgr::ChooseMacro(const String&)
if ( aScriptURL.getLength() != 0 )
{
SetMacroPath( aScriptURL );
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
@@ -1728,7 +1728,7 @@ void SwFldMgr::SetMacroPath(const String& rPath)
Beschreibung:
--------------------------------------------------------------------*/
-ULONG SwFldMgr::GetDefaultFormat(USHORT nTypeId, BOOL bIsText, SvNumberFormatter* pFormatter, double* pVal)
+sal_uLong SwFldMgr::GetDefaultFormat(sal_uInt16 nTypeId, sal_Bool bIsText, SvNumberFormatter* pFormatter, double* pVal)
{
double fValue;
short nDefFormat;
@@ -1745,8 +1745,8 @@ ULONG SwFldMgr::GetDefaultFormat(USHORT nTypeId, BOOL bIsText, SvNumberFormatter
Time aTime;
- ULONG nNumFmtTime = (ULONG)aTime.GetSec() + (ULONG)aTime.GetMin() * 60L +
- (ULONG)aTime.GetHour() * 3600L;
+ sal_uLong nNumFmtTime = (sal_uLong)aTime.GetSec() + (sal_uLong)aTime.GetMin() * 60L +
+ (sal_uLong)aTime.GetHour() * 3600L;
fValue += (double)nNumFmtTime / 86400.0;
diff --git a/sw/source/ui/fldui/fldpage.cxx b/sw/source/ui/fldui/fldpage.cxx
index 6c9ded39aa..b359de9d4b 100644
--- a/sw/source/ui/fldui/fldpage.cxx
+++ b/sw/source/ui/fldui/fldpage.cxx
@@ -65,14 +65,14 @@ SwFldPage::SwFldPage( Window *pParent, const ResId &rId,
:SfxTabPage (pParent, rId, rAttrSet),
m_pCurFld (0),
m_pWrtShell (0),
- m_nPageId ( static_cast< USHORT >(rId.GetId()) ),
+ m_nPageId ( static_cast< sal_uInt16 >(rId.GetId()) ),
m_nTypeSel (LISTBOX_ENTRY_NOTFOUND),
m_nSelectionSel (LISTBOX_ENTRY_NOTFOUND),
- m_bFldEdit (FALSE),
- m_bInsert (TRUE),
- m_bFldDlgHtmlMode (FALSE),
- m_bRefresh (FALSE),
- m_bFirstHTMLInit (TRUE)
+ m_bFldEdit (sal_False),
+ m_bInsert (sal_True),
+ m_bFldDlgHtmlMode (sal_False),
+ m_bRefresh (sal_False),
+ m_bFirstHTMLInit (sal_True)
{
// FreeResource();
}
@@ -92,7 +92,7 @@ SwFldPage::~SwFldPage()
void SwFldPage::Init()
{
SwDocShell* pDocSh = (SwDocShell*)SfxObjectShell::Current();
- BOOL bNewMode = 0 != (::GetHtmlMode(pDocSh) & HTMLMODE_ON);
+ sal_Bool bNewMode = 0 != (::GetHtmlMode(pDocSh) & HTMLMODE_ON);
m_bFldEdit = 0 == GetTabDialog();
@@ -107,7 +107,7 @@ void SwFldPage::Init()
// Bereichslistbox initialisieren
if( m_bFldDlgHtmlMode && m_bFirstHTMLInit )
{
- m_bFirstHTMLInit = FALSE;
+ m_bFirstHTMLInit = sal_False;
SwWrtShell *pSh = m_pWrtShell;
if(! pSh)
pSh = ::GetActiveWrtShell();
@@ -136,27 +136,27 @@ void SwFldPage::ActivatePage()
Beschreibung: Kompletter Reset; neues Feld editieren
--------------------------------------------------------------------*/
-void SwFldPage::EditNewField( BOOL bOnlyActivate )
+void SwFldPage::EditNewField( sal_Bool bOnlyActivate )
{
if( !bOnlyActivate )
{
m_nTypeSel = LISTBOX_ENTRY_NOTFOUND;
}
m_nSelectionSel = LISTBOX_ENTRY_NOTFOUND;
- m_bRefresh = TRUE;
+ m_bRefresh = sal_True;
Reset(*(SfxItemSet*)0);
- m_bRefresh = FALSE;
+ m_bRefresh = sal_False;
}
/*--------------------------------------------------------------------
Beschreibung: Feld einfuegen
--------------------------------------------------------------------*/
-BOOL SwFldPage::InsertFld(USHORT nTypeId, USHORT nSubType, const String& rPar1,
- const String& rPar2, ULONG nFormatId,
- sal_Unicode cSeparator, BOOL bIsAutomaticLanguage)
+sal_Bool SwFldPage::InsertFld(sal_uInt16 nTypeId, sal_uInt16 nSubType, const String& rPar1,
+ const String& rPar2, sal_uLong nFormatId,
+ sal_Unicode cSeparator, sal_Bool bIsAutomaticLanguage)
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
SwView* pView = GetActiveView();
SwWrtShell *pSh = m_pWrtShell ? m_pWrtShell : pView->GetWrtShellPtr();
@@ -171,7 +171,7 @@ BOOL SwFldPage::InsertFld(USHORT nTypeId, USHORT nSubType, const String& rPar1,
pView->GetViewFrame()->GetBindings().GetRecorder();
if ( xRecorder.is() )
{
- BOOL bRecordDB = TYP_DBFLD == nTypeId ||
+ sal_Bool bRecordDB = TYP_DBFLD == nTypeId ||
TYP_DBSETNUMBERFLD == nTypeId ||
TYP_DBNUMSETFLD == nTypeId ||
TYP_DBNEXTSETFLD == nTypeId ||
@@ -210,12 +210,12 @@ BOOL SwFldPage::InsertFld(USHORT nTypeId, USHORT nSubType, const String& rPar1,
String sPar1(rPar1);
String sPar2(rPar2);
- BOOL bDBChanged = FALSE;
+ sal_Bool bDBChanged = sal_False;
switch( nTypeId )
{
case TYP_DATEFLD:
case TYP_TIMEFLD:
- nSubType = static_cast< USHORT >(((nTypeId == TYP_DATEFLD) ? DATEFLD : TIMEFLD) |
+ nSubType = static_cast< sal_uInt16 >(((nTypeId == TYP_DATEFLD) ? DATEFLD : TIMEFLD) |
((nSubType == DATE_VAR) ? 0 : FIXEDFLD));
break;
@@ -233,7 +233,7 @@ BOOL SwFldPage::InsertFld(USHORT nTypeId, USHORT nSubType, const String& rPar1,
sPar1 = rPar1.Copy(nPos);
((SwDBNameInfField*)pTmpFld)->SetDBData(aData);
- bDBChanged = TRUE;
+ bDBChanged = sal_True;
}
break;
@@ -261,14 +261,14 @@ BOOL SwFldPage::InsertFld(USHORT nTypeId, USHORT nSubType, const String& rPar1,
break;
}
}
- bDBChanged = TRUE;
+ bDBChanged = sal_True;
}
break;
case TYP_SEQFLD:
{
SwSetExpFieldType* pTyp = (SwSetExpFieldType*)pTmpFld->GetTyp();
- pTyp->SetOutlineLvl( static_cast< BYTE >(nSubType & 0xff));
+ pTyp->SetOutlineLvl( static_cast< sal_uInt8 >(nSubType & 0xff));
pTyp->SetDelimiter(cSeparator);
nSubType = nsSwGetSetExpType::GSE_SEQ;
@@ -345,7 +345,7 @@ void SwFldPage::SavePos( const ListBox* pLst1, const ListBox* pLst2,
void SwFldPage::RestorePos(ListBox* pLst1, ListBox* pLst2, ListBox* pLst3)
{
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
ListBox* aLBArr [ coLBCount ] = { pLst1, pLst2, pLst3 };
ListBox** ppLB = aLBArr;
for( int i = 0; i < coLBCount; ++i, ++ppLB )
@@ -383,7 +383,7 @@ IMPL_LINK( SwFldPage, InsertHdl, Button *, pBtn )
Beschreibung: "Einfuegen"-Button Enablen/Disablen
--------------------------------------------------------------------*/
-void SwFldPage::EnableInsert(BOOL bEnable)
+void SwFldPage::EnableInsert(sal_Bool bEnable)
{
SwFldDlg *pDlg = (SwFldDlg*)GetTabDialog();
diff --git a/sw/source/ui/fldui/fldpage.hxx b/sw/source/ui/fldui/fldpage.hxx
index c7f07e3d14..ae476a5acd 100644
--- a/sw/source/ui/fldui/fldpage.hxx
+++ b/sw/source/ui/fldui/fldpage.hxx
@@ -44,23 +44,23 @@ class SwFldPage : public SfxTabPage
SwFldMgr m_aMgr;
SwField *m_pCurFld;
SwWrtShell* m_pWrtShell;
- USHORT m_nPageId;
- USHORT m_nTypeSel;
- USHORT m_nSelectionSel;
- BOOL m_bFldEdit;
- BOOL m_bInsert;
- BOOL m_bFldDlgHtmlMode;
- BOOL m_bRefresh;
- BOOL m_bFirstHTMLInit;
+ sal_uInt16 m_nPageId;
+ sal_uInt16 m_nTypeSel;
+ sal_uInt16 m_nSelectionSel;
+ sal_Bool m_bFldEdit;
+ sal_Bool m_bInsert;
+ sal_Bool m_bFldDlgHtmlMode;
+ sal_Bool m_bRefresh;
+ sal_Bool m_bFirstHTMLInit;
protected:
- USHORT GetTypeSel() const { return m_nTypeSel;}
- void SetTypeSel(USHORT nSet) { m_nTypeSel = nSet;}
- USHORT GetSelectionSel() const { return m_nSelectionSel;}
- void SetSelectionSel(USHORT nSet){ m_nSelectionSel = nSet;}
- BOOL IsFldDlgHtmlMode() const { return m_bFldDlgHtmlMode;}
- BOOL IsRefresh() const { return m_bRefresh;}
+ sal_uInt16 GetTypeSel() const { return m_nTypeSel;}
+ void SetTypeSel(sal_uInt16 nSet) { m_nTypeSel = nSet;}
+ sal_uInt16 GetSelectionSel() const { return m_nSelectionSel;}
+ void SetSelectionSel(sal_uInt16 nSet){ m_nSelectionSel = nSet;}
+ sal_Bool IsFldDlgHtmlMode() const { return m_bFldDlgHtmlMode;}
+ sal_Bool IsRefresh() const { return m_bRefresh;}
SwField* GetCurField() { return m_pCurFld;}
SwWrtShell* GetWrtShell() { return m_pWrtShell;}
@@ -73,17 +73,17 @@ protected:
const ListBox* pLst3 = 0);
void RestorePos( ListBox* pLst1, ListBox* pLst2 = 0,
ListBox* pLst3 = 0 );
- void EnableInsert(BOOL bEnable = TRUE);
- inline BOOL IsFldEdit() const { return m_bFldEdit; }
+ void EnableInsert(sal_Bool bEnable = sal_True);
+ inline sal_Bool IsFldEdit() const { return m_bFldEdit; }
// Feld einfuegen
- BOOL InsertFld( USHORT nTypeId,
- USHORT nSubType,
+ sal_Bool InsertFld( sal_uInt16 nTypeId,
+ sal_uInt16 nSubType,
const String& rPar1,
const String& rPar2,
- ULONG nFormatId,
+ sal_uLong nFormatId,
sal_Unicode cDelim = ' ',
- BOOL bIsAutomaticLanguage = TRUE);
+ sal_Bool bIsAutomaticLanguage = sal_True);
using SfxTabPage::ActivatePage;
@@ -98,8 +98,8 @@ public:
inline SwFldMgr& GetFldMgr() { return m_aMgr; }
void SetWrtShell( SwWrtShell* m_pWrtShell );
- void EditNewField( BOOL bOnlyActivate = FALSE );
- virtual USHORT GetGroup() = 0;
+ void EditNewField( sal_Bool bOnlyActivate = sal_False );
+ virtual sal_uInt16 GetGroup() = 0;
};
diff --git a/sw/source/ui/fldui/fldref.cxx b/sw/source/ui/fldui/fldref.cxx
index 5b7b70b5f9..fea6f54438 100644
--- a/sw/source/ui/fldui/fldref.cxx
+++ b/sw/source/ui/fldui/fldref.cxx
@@ -72,7 +72,7 @@ SV_IMPL_PTRARR( _SwSeqFldList, _SeqFldLstElem* )
#define REFFLDFLAG_NUMITEM 0x7200
// <--
-USHORT nFldDlgFmtSel = 0;
+sal_uInt16 nFldDlgFmtSel = 0;
#define USER_DATA_VERSION_1 "1"
#define USER_DATA_VERSION USER_DATA_VERSION_1
@@ -148,7 +148,7 @@ void SwFldRefPage::SaveSelectedTxtNode()
SvLBoxEntry* pEntry = aSelectionToolTipLB.GetCurEntry();
if ( pEntry )
{
- const USHORT nTypeId = (USHORT)(ULONG)aTypeLB.GetEntryData(GetTypeSel());
+ const sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel());
SwWrtShell *pSh = GetWrtShell();
if ( !pSh )
{
@@ -156,7 +156,7 @@ void SwFldRefPage::SaveSelectedTxtNode()
}
if ( nTypeId == REFFLDFLAG_HEADING )
{
- mnSavedSelectedPos = static_cast<sal_uInt16>(reinterpret_cast<ULONG>(pEntry->GetUserData()));
+ mnSavedSelectedPos = static_cast<sal_uInt16>(reinterpret_cast<sal_uLong>(pEntry->GetUserData()));
if ( mnSavedSelectedPos < maOutlineNodes.size() )
{
mpSavedSelectedTxtNode = maOutlineNodes[mnSavedSelectedPos];
@@ -164,7 +164,7 @@ void SwFldRefPage::SaveSelectedTxtNode()
}
else if ( nTypeId == REFFLDFLAG_NUMITEM )
{
- mnSavedSelectedPos = static_cast<sal_uInt16>(reinterpret_cast<ULONG>(pEntry->GetUserData()));
+ mnSavedSelectedPos = static_cast<sal_uInt16>(reinterpret_cast<sal_uLong>(pEntry->GetUserData()));
if ( mnSavedSelectedPos < maNumItems.size() )
{
mpSavedSelectedTxtNode = maNumItems[mnSavedSelectedPos]->GetTxtNode();
@@ -204,18 +204,18 @@ void SwFldRefPage::Reset(const SfxItemSet& )
Init(); // Allgemeine initialisierung
// TypeListBox initialisieren
- aTypeLB.SetUpdateMode(FALSE);
+ aTypeLB.SetUpdateMode(sal_False);
aTypeLB.Clear();
// Typ-Listbox fuellen
- USHORT nPos;
+ sal_uInt16 nPos;
// Referenz setzen / einfuegen
const SwFldGroupRgn& rRg = GetFldMgr().GetGroupRange(IsFldDlgHtmlMode(), GetGroup());
for (short i = rRg.nStart; i < rRg.nEnd; ++i)
{
- const USHORT nTypeId = GetFldMgr().GetTypeId(i);
+ const sal_uInt16 nTypeId = GetFldMgr().GetTypeId(i);
if (!IsFldEdit() || nTypeId != TYP_SETREFFLD)
{
@@ -237,9 +237,9 @@ void SwFldRefPage::Reset(const SfxItemSet& )
if(!pSh)
pSh = ::GetActiveWrtShell();
- USHORT nFldTypeCnt = pSh->GetFldTypeCount(RES_SETEXPFLD);
+ sal_uInt16 nFldTypeCnt = pSh->GetFldTypeCount(RES_SETEXPFLD);
- for (USHORT n = 0; n < nFldTypeCnt; ++n)
+ for (sal_uInt16 n = 0; n < nFldTypeCnt; ++n)
{
SwSetExpFieldType* pType = (SwSetExpFieldType*)pSh->GetFldType(n, RES_SETEXPFLD);
@@ -272,7 +272,7 @@ void SwFldRefPage::Reset(const SfxItemSet& )
if (!IsFldEdit())
RestorePos(&aTypeLB);
- aTypeLB.SetUpdateMode(TRUE);
+ aTypeLB.SetUpdateMode(sal_True);
nFldDlgFmtSel = 0;
@@ -283,11 +283,11 @@ void SwFldRefPage::Reset(const SfxItemSet& )
EqualsIgnoreCaseAscii(USER_DATA_VERSION_1))
{
String sVal = sUserData.GetToken(1, ';');
- USHORT nVal = static_cast< USHORT >(sVal.ToInt32());
+ sal_uInt16 nVal = static_cast< sal_uInt16 >(sVal.ToInt32());
if(nVal != USHRT_MAX)
{
- for(USHORT i = 0; i < aTypeLB.GetEntryCount(); i++)
- if(nVal == (USHORT)(ULONG)aTypeLB.GetEntryData(i))
+ for(sal_uInt16 i = 0; i < aTypeLB.GetEntryCount(); i++)
+ if(nVal == (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(i))
{
aTypeLB.SelectEntryPos(i);
break;
@@ -314,7 +314,7 @@ void SwFldRefPage::Reset(const SfxItemSet& )
IMPL_LINK( SwFldRefPage, TypeHdl, ListBox *, EMPTYARG )
{
// Alte ListBoxPos sichern
- const USHORT nOld = GetTypeSel();
+ const sal_uInt16 nOld = GetTypeSel();
// Aktuelle ListBoxPos
SetTypeSel(aTypeLB.GetSelectEntryPos());
@@ -325,7 +325,7 @@ IMPL_LINK( SwFldRefPage, TypeHdl, ListBox *, EMPTYARG )
{
// Positionen selektieren
String sName;
- USHORT nFlag = 0;
+ sal_uInt16 nFlag = 0;
switch( GetCurField()->GetSubType() )
{
@@ -379,7 +379,7 @@ IMPL_LINK( SwFldRefPage, TypeHdl, ListBox *, EMPTYARG )
if (aTypeLB.GetEntryPos(sName) == LISTBOX_ENTRY_NOTFOUND) // Referenz zu gel?schter Marke
{
- USHORT nPos = aTypeLB.InsertEntry(sName);
+ sal_uInt16 nPos = aTypeLB.InsertEntry(sName);
aTypeLB.SetEntryData(nPos, reinterpret_cast<void*>(nFlag));
}
@@ -395,12 +395,12 @@ IMPL_LINK( SwFldRefPage, TypeHdl, ListBox *, EMPTYARG )
if (nOld != GetTypeSel())
{
- USHORT nTypeId = (USHORT)(ULONG)aTypeLB.GetEntryData(GetTypeSel());
+ sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel());
// Auswahl-Listbox fuellen
UpdateSubType();
- BOOL bName = FALSE; nFldDlgFmtSel = 0;
+ sal_Bool bName = sal_False; nFldDlgFmtSel = 0;
if ( ( !IsFldEdit() || aSelectionLB.GetEntryCount() ) &&
nOld != LISTBOX_ENTRY_NOTFOUND )
@@ -412,23 +412,23 @@ IMPL_LINK( SwFldRefPage, TypeHdl, ListBox *, EMPTYARG )
switch (nTypeId)
{
case TYP_GETREFFLD:
- if (REFFLDFLAG & (USHORT)(ULONG)aTypeLB.GetEntryData(nOld))
+ if (REFFLDFLAG & (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(nOld))
// dann bleibt die alte bestehen
nFldDlgFmtSel = aFormatLB.GetSelectEntryPos();
- bName = TRUE;
+ bName = sal_True;
break;
case TYP_SETREFFLD:
- bName = TRUE;
+ bName = sal_True;
break;
case REFFLDFLAG_BOOKMARK:
- bName = TRUE;
+ bName = sal_True;
// kein break!!!
default:
if( REFFLDFLAG & nTypeId )
{
- USHORT nOldId = (USHORT)(ULONG)aTypeLB.GetEntryData(nOld);
+ sal_uInt16 nOldId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(nOld);
if( nOldId & REFFLDFLAG || nOldId == TYP_GETREFFLD )
// dann bleibt die alte bestehen
nFldDlgFmtSel = aFormatLB.GetSelectEntryPos();
@@ -440,8 +440,8 @@ IMPL_LINK( SwFldRefPage, TypeHdl, ListBox *, EMPTYARG )
aNameFT.Enable(bName);
// Format-Listbox fuellen
- USHORT nSize = FillFormatLB(nTypeId);
- BOOL bFormat = nSize != 0;
+ sal_uInt16 nSize = FillFormatLB(nTypeId);
+ sal_Bool bFormat = nSize != 0;
aFormatLB.Enable(bFormat);
aFormatFT.Enable(bFormat);
@@ -458,7 +458,7 @@ IMPL_LINK( SwFldRefPage, TypeHdl, ListBox *, EMPTYARG )
IMPL_LINK( SwFldRefPage, SubTypeHdl, ListBox *, EMPTYARG )
{
- USHORT nTypeId = (USHORT)(ULONG)aTypeLB.GetEntryData(GetTypeSel());
+ sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel());
switch(nTypeId)
{
@@ -514,13 +514,13 @@ void SwFldRefPage::UpdateSubType()
if(!pSh)
pSh = ::GetActiveWrtShell();
SwGetRefField* pRefFld = (SwGetRefField*)GetCurField();
- const USHORT nTypeId = (USHORT)(ULONG)aTypeLB.GetEntryData(GetTypeSel());
+ const sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel());
String sOldSel;
// --> OD 2007-11-22 #i83479#
if ( aSelectionLB.IsVisible() )
{
- const USHORT nSelectionSel = aSelectionLB.GetSelectEntryPos();
+ const sal_uInt16 nSelectionSel = aSelectionLB.GetSelectEntryPos();
if (nSelectionSel != LISTBOX_ENTRY_NOTFOUND)
{
sOldSel = aSelectionLB.GetEntry(nSelectionSel);
@@ -530,10 +530,10 @@ void SwFldRefPage::UpdateSubType()
if (IsFldEdit() && !sOldSel.Len())
sOldSel = String::CreateFromInt32( pRefFld->GetSeqNo() + 1 );
- aSelectionLB.SetUpdateMode(FALSE);
+ aSelectionLB.SetUpdateMode(sal_False);
aSelectionLB.Clear();
// --> OD 2007-11-21 #i83479#
- aSelectionToolTipLB.SetUpdateMode(FALSE);
+ aSelectionToolTipLB.SetUpdateMode(sal_False);
aSelectionToolTipLB.Clear();
bool bShowSelectionToolTipLB( false );
// <--
@@ -560,9 +560,9 @@ void SwFldRefPage::UpdateSubType()
{
aSelectionLB.SetStyle(aSelectionLB.GetStyle() & ~WB_SORT);
SwSeqFldList aArr;
- USHORT nCnt = pSh->GetSeqFtnList( aArr );
+ sal_uInt16 nCnt = pSh->GetSeqFtnList( aArr );
- for( USHORT n = 0; n < nCnt; ++n )
+ for( sal_uInt16 n = 0; n < nCnt; ++n )
{
aSelectionLB.InsertEntry( aArr[ n ]->sDlgEntry );
if (IsFldEdit() && pRefFld->GetSeqNo() == aArr[ n ]->nSeqNo)
@@ -573,9 +573,9 @@ void SwFldRefPage::UpdateSubType()
{
aSelectionLB.SetStyle(aSelectionLB.GetStyle() & ~WB_SORT);
SwSeqFldList aArr;
- USHORT nCnt = pSh->GetSeqFtnList( aArr, true );
+ sal_uInt16 nCnt = pSh->GetSeqFtnList( aArr, true );
- for( USHORT n = 0; n < nCnt; ++n )
+ for( sal_uInt16 n = 0; n < nCnt; ++n )
{
aSelectionLB.InsertEntry( aArr[ n ]->sDlgEntry );
if (IsFldEdit() && pRefFld->GetSeqNo() == aArr[ n ]->nSeqNo)
@@ -658,8 +658,8 @@ void SwFldRefPage::UpdateSubType()
if(IsFldEdit())
sOldSel.Erase();
- USHORT nCnt = pType->GetSeqFldList( aArr );
- for( USHORT n = 0; n < nCnt; ++n )
+ sal_uInt16 nCnt = pType->GetSeqFldList( aArr );
+ for( sal_uInt16 n = 0; n < nCnt; ++n )
{
aSelectionLB.InsertEntry( aArr[ n ]->sDlgEntry );
if (IsFldEdit() && !sOldSel.Len() &&
@@ -676,7 +676,7 @@ void SwFldRefPage::UpdateSubType()
{
SvStringsDtor aLst;
GetFldMgr().GetSubTypes(nTypeId, aLst);
- for (USHORT i = 0; i < aLst.Count(); ++i)
+ for (sal_uInt16 i = 0; i < aLst.Count(); ++i)
aSelectionLB.InsertEntry(*aLst[i]);
if (IsFldEdit())
@@ -688,9 +688,9 @@ void SwFldRefPage::UpdateSubType()
aSelectionLB.Show( !bShowSelectionToolTipLB );
if ( bShowSelectionToolTipLB )
{
- aSelectionToolTipLB.SetUpdateMode(TRUE);
+ aSelectionToolTipLB.SetUpdateMode(sal_True);
- BOOL bEnable = aSelectionToolTipLB.GetEntryCount() != 0;
+ sal_Bool bEnable = aSelectionToolTipLB.GetEntryCount() != 0;
aSelectionToolTipLB.Enable( bEnable );
aSelectionFT.Enable( bEnable );
@@ -706,10 +706,10 @@ void SwFldRefPage::UpdateSubType()
}
else
{
- aSelectionLB.SetUpdateMode(TRUE);
+ aSelectionLB.SetUpdateMode(sal_True);
// Enable oder Disable
- BOOL bEnable = aSelectionLB.GetEntryCount() != 0;
+ sal_Bool bEnable = aSelectionLB.GetEntryCount() != 0;
aSelectionLB.Enable( bEnable );
aSelectionFT.Enable( bEnable );
@@ -730,11 +730,11 @@ void SwFldRefPage::UpdateSubType()
Beschreibung:
--------------------------------------------------------------------*/
-USHORT SwFldRefPage::FillFormatLB(USHORT nTypeId)
+sal_uInt16 SwFldRefPage::FillFormatLB(sal_uInt16 nTypeId)
{
String sOldSel;
- USHORT nFormatSel = aFormatLB.GetSelectEntryPos();
+ sal_uInt16 nFormatSel = aFormatLB.GetSelectEntryPos();
if (nFormatSel != LISTBOX_ENTRY_NOTFOUND)
sOldSel = aFormatLB.GetEntry(nFormatSel);
@@ -742,7 +742,7 @@ USHORT SwFldRefPage::FillFormatLB(USHORT nTypeId)
aFormatLB.Clear();
// Referenz hat weniger als die Beschriftung
- USHORT nSize( 0 );
+ sal_uInt16 nSize( 0 );
bool bAddCrossRefFormats( false );
switch (nTypeId)
{
@@ -763,15 +763,15 @@ USHORT SwFldRefPage::FillFormatLB(USHORT nTypeId)
default:
// --> OD 2007-11-16 #i83479#
// nSize = GetFldMgr().GetFormatCount( (REFFLDFLAG & nTypeId)
-// ? (USHORT)TYP_GETREFFLD : nTypeId,
-// FALSE, IsFldDlgHtmlMode() );
+// ? (sal_uInt16)TYP_GETREFFLD : nTypeId,
+// sal_False, IsFldDlgHtmlMode() );
if ( REFFLDFLAG & nTypeId )
{
nSize = FMT_REF_ONLYSEQNO - FMT_REF_BEGIN + 1;
}
else
{
- nSize = GetFldMgr().GetFormatCount( nTypeId, FALSE, IsFldDlgHtmlMode() );
+ nSize = GetFldMgr().GetFormatCount( nTypeId, sal_False, IsFldDlgHtmlMode() );
}
break;
}
@@ -779,16 +779,16 @@ USHORT SwFldRefPage::FillFormatLB(USHORT nTypeId)
if (REFFLDFLAG & nTypeId)
nTypeId = TYP_GETREFFLD;
- for (USHORT i = 0; i < nSize; i++)
+ for (sal_uInt16 i = 0; i < nSize; i++)
{
- USHORT nPos = aFormatLB.InsertEntry(GetFldMgr().GetFormatStr( nTypeId, i ));
+ sal_uInt16 nPos = aFormatLB.InsertEntry(GetFldMgr().GetFormatStr( nTypeId, i ));
aFormatLB.SetEntryData( nPos, reinterpret_cast<void*>(GetFldMgr().GetFormatId( nTypeId, i )));
}
// --> OD 2007-11-16 #i83479#
if ( bAddCrossRefFormats )
{
- USHORT nFormat = FMT_REF_NUMBER - FMT_REF_BEGIN;
- USHORT nPos = aFormatLB.InsertEntry(GetFldMgr().GetFormatStr( nTypeId, nFormat ));
+ sal_uInt16 nFormat = FMT_REF_NUMBER - FMT_REF_BEGIN;
+ sal_uInt16 nPos = aFormatLB.InsertEntry(GetFldMgr().GetFormatStr( nTypeId, nFormat ));
aFormatLB.SetEntryData( nPos, reinterpret_cast<void*>(GetFldMgr().GetFormatId( nTypeId, nFormat )));
nFormat = FMT_REF_NUMBER_NO_CONTEXT - FMT_REF_BEGIN;
nPos = aFormatLB.InsertEntry(GetFldMgr().GetFormatStr( nTypeId, nFormat ));
@@ -806,7 +806,7 @@ USHORT SwFldRefPage::FillFormatLB(USHORT nTypeId)
if (!IsFldEdit())
aFormatLB.SelectEntry(sOldSel);
else
- aFormatLB.SelectEntry(SW_RESSTR(FMT_REF_BEGIN + (USHORT)GetCurField()->GetFormat()));
+ aFormatLB.SelectEntry(SW_RESSTR(FMT_REF_BEGIN + (sal_uInt16)GetCurField()->GetFormat()));
if (!aFormatLB.GetSelectEntryCount())
{
@@ -826,15 +826,15 @@ USHORT SwFldRefPage::FillFormatLB(USHORT nTypeId)
IMPL_LINK( SwFldRefPage, ModifyHdl, Edit *, EMPTYARG )
{
String aName(aNameED.GetText());
- const USHORT nLen = aName.Len();
+ const sal_uInt16 nLen = aName.Len();
- BOOL bEnable = TRUE;
- USHORT nTypeId = (USHORT)(ULONG)aTypeLB.GetEntryData(GetTypeSel());
+ sal_Bool bEnable = sal_True;
+ sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel());
if ((nTypeId == TYP_SETREFFLD && !GetFldMgr().CanInsertRefMark(aName)) ||
(nLen == 0 && (nTypeId == TYP_GETREFFLD || nTypeId == TYP_SETREFFLD ||
nTypeId == REFFLDFLAG_BOOKMARK)))
- bEnable = FALSE;
+ bEnable = sal_False;
EnableInsert(bEnable);
@@ -847,20 +847,20 @@ IMPL_LINK( SwFldRefPage, ModifyHdl, Edit *, EMPTYARG )
Beschreibung:
--------------------------------------------------------------------*/
-BOOL SwFldRefPage::FillItemSet(SfxItemSet& )
+sal_Bool SwFldRefPage::FillItemSet(SfxItemSet& )
{
- BOOL bModified = FALSE;
- USHORT nTypeId = (USHORT)(ULONG)aTypeLB.GetEntryData(GetTypeSel());
+ sal_Bool bModified = sal_False;
+ sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel());
- USHORT nSubType = 0;
- ULONG nFormat;
+ sal_uInt16 nSubType = 0;
+ sal_uLong nFormat;
nFormat = aFormatLB.GetSelectEntryPos();
if(nFormat == LISTBOX_ENTRY_NOTFOUND)
nFormat = 0;
else
- nFormat = (ULONG)aFormatLB.GetEntryData((USHORT)nFormat);
+ nFormat = (sal_uLong)aFormatLB.GetEntryData((sal_uInt16)nFormat);
String aVal(aValueED.GetText());
String aName(aNameED.GetText());
@@ -906,7 +906,7 @@ BOOL SwFldRefPage::FillItemSet(SfxItemSet& )
SwSeqFldList aArr;
_SeqFldLstElem aElem( aSelectionLB.GetSelectEntry(), 0 );
- USHORT nPos;
+ sal_uInt16 nPos;
nTypeId = TYP_GETREFFLD;
nSubType = REF_FOOTNOTE;
@@ -917,7 +917,7 @@ BOOL SwFldRefPage::FillItemSet(SfxItemSet& )
aVal = String::CreateFromInt32( aArr[nPos]->nSeqNo );
if (IsFldEdit() && aArr[nPos]->nSeqNo == pRefFld->GetSeqNo())
- bModified = TRUE; // Kann bei Feldern passieren, deren Referenz geloescht wurde
+ bModified = sal_True; // Kann bei Feldern passieren, deren Referenz geloescht wurde
}
else if (IsFldEdit())
aVal = String::CreateFromInt32( pRefFld->GetSeqNo() );
@@ -927,7 +927,7 @@ BOOL SwFldRefPage::FillItemSet(SfxItemSet& )
SwSeqFldList aArr;
_SeqFldLstElem aElem( aSelectionLB.GetSelectEntry(), 0 );
- USHORT nPos;
+ sal_uInt16 nPos;
nTypeId = TYP_GETREFFLD;
nSubType = REF_ENDNOTE;
@@ -938,7 +938,7 @@ BOOL SwFldRefPage::FillItemSet(SfxItemSet& )
aVal = String::CreateFromInt32( aArr[nPos]->nSeqNo );
if (IsFldEdit() && aArr[nPos]->nSeqNo == pRefFld->GetSeqNo())
- bModified = TRUE; // Kann bei Feldern passieren, deren Referenz geloescht wurde
+ bModified = sal_True; // Kann bei Feldern passieren, deren Referenz geloescht wurde
}
else if (IsFldEdit())
aVal = String::CreateFromInt32( pRefFld->GetSeqNo() );
@@ -951,7 +951,7 @@ BOOL SwFldRefPage::FillItemSet(SfxItemSet& )
"<SwFldRefPage::FillItemSet(..)> - no entry selected in selection tool tip listbox!" );
if ( pEntry )
{
- const sal_uInt16 nOutlIdx( static_cast<sal_uInt16>(reinterpret_cast<ULONG>(pEntry->GetUserData())) );
+ const sal_uInt16 nOutlIdx( static_cast<sal_uInt16>(reinterpret_cast<sal_uLong>(pEntry->GetUserData())) );
pSh->getIDocumentOutlineNodesAccess()->getOutlineNodes( maOutlineNodes );
if ( nOutlIdx < maOutlineNodes.size() )
{
@@ -971,7 +971,7 @@ BOOL SwFldRefPage::FillItemSet(SfxItemSet& )
"<SwFldRefPage::FillItemSet(..)> - no entry selected in selection tool tip listbox!" );
if ( pEntry )
{
- const sal_uInt16 nNumItemIdx( static_cast<sal_uInt16>(reinterpret_cast<ULONG>(pEntry->GetUserData())) );
+ const sal_uInt16 nNumItemIdx( static_cast<sal_uInt16>(reinterpret_cast<sal_uLong>(pEntry->GetUserData())) );
pSh->getIDocumentListItemsAccess()->getNumItems( maNumItems );
if ( nNumItemIdx < maNumItems.size() )
{
@@ -995,7 +995,7 @@ BOOL SwFldRefPage::FillItemSet(SfxItemSet& )
SwSeqFldList aArr;
_SeqFldLstElem aElem( aSelectionLB.GetSelectEntry(), 0 );
- USHORT nPos;
+ sal_uInt16 nPos;
nTypeId = TYP_GETREFFLD;
nSubType = REF_SEQUENCEFLD;
@@ -1006,7 +1006,7 @@ BOOL SwFldRefPage::FillItemSet(SfxItemSet& )
aVal = String::CreateFromInt32( aArr[nPos]->nSeqNo );
if (IsFldEdit() && aArr[nPos]->nSeqNo == pRefFld->GetSeqNo())
- bModified = TRUE; // Kann bei Feldern passieren, deren Referenz geloescht wurde
+ bModified = sal_True; // Kann bei Feldern passieren, deren Referenz geloescht wurde
}
else if (IsFldEdit())
aVal = String::CreateFromInt32( pRefFld->GetSeqNo() );
@@ -1032,7 +1032,7 @@ BOOL SwFldRefPage::FillItemSet(SfxItemSet& )
ModifyHdl(); // Insert ggf enablen/disablen
- return FALSE;
+ return sal_False;
}
/*--------------------------------------------------------------------
@@ -1049,7 +1049,7 @@ SfxTabPage* SwFldRefPage::Create( Window* pParent,
Beschreibung:
--------------------------------------------------------------------*/
-USHORT SwFldRefPage::GetGroup()
+sal_uInt16 SwFldRefPage::GetGroup()
{
return GRP_REF;
}
@@ -1062,11 +1062,11 @@ void SwFldRefPage::FillUserData()
String sData( String::CreateFromAscii(
RTL_CONSTASCII_STRINGPARAM( USER_DATA_VERSION )));
sData += ';';
- USHORT nTypeSel = aTypeLB.GetSelectEntryPos();
+ sal_uInt16 nTypeSel = aTypeLB.GetSelectEntryPos();
if( LISTBOX_ENTRY_NOTFOUND == nTypeSel )
nTypeSel = USHRT_MAX;
else
- nTypeSel = sal::static_int_cast< USHORT >(reinterpret_cast< sal_uIntPtr >(aTypeLB.GetEntryData( nTypeSel )));
+ nTypeSel = sal::static_int_cast< sal_uInt16 >(reinterpret_cast< sal_uIntPtr >(aTypeLB.GetEntryData( nTypeSel )));
sData += String::CreateFromInt32( nTypeSel );
SetUserData(sData);
}
diff --git a/sw/source/ui/fldui/fldref.hxx b/sw/source/ui/fldui/fldref.hxx
index b7024d6531..ddf10e6924 100644
--- a/sw/source/ui/fldui/fldref.hxx
+++ b/sw/source/ui/fldui/fldref.hxx
@@ -85,7 +85,7 @@ class SwFldRefPage : public SwFldPage
DECL_LINK( ModifyHdl, Edit *pEd = 0 );
void UpdateSubType();
- USHORT FillFormatLB(USHORT nTypeId);
+ sal_uInt16 FillFormatLB(sal_uInt16 nTypeId);
// --> OD 2007-12-05 #i83479#
void SaveSelectedTxtNode();
@@ -94,7 +94,7 @@ class SwFldRefPage : public SwFldPage
// <--
protected:
- virtual USHORT GetGroup();
+ virtual sal_uInt16 GetGroup();
public:
SwFldRefPage(Window* pParent, const SfxItemSet& rSet);
@@ -103,7 +103,7 @@ public:
static SfxTabPage* Create(Window* pParent, const SfxItemSet& rAttrSet);
- virtual BOOL FillItemSet( SfxItemSet& rSet );
+ virtual sal_Bool FillItemSet( SfxItemSet& rSet );
virtual void Reset( const SfxItemSet& rSet );
virtual void FillUserData();
diff --git a/sw/source/ui/fldui/fldtdlg.cxx b/sw/source/ui/fldui/fldtdlg.cxx
index 7aa6cb0ad7..bc52230dc1 100644
--- a/sw/source/ui/fldui/fldtdlg.cxx
+++ b/sw/source/ui/fldui/fldtdlg.cxx
@@ -76,7 +76,7 @@ SwFldDlg::SwFldDlg(SfxBindings* pB, SwChildWinWrapper* pCW, Window *pParent)
: SfxTabDialog( pParent, SW_RES( DLG_FLD_INSERT )),
m_pChildWin(pCW),
m_pBindings(pB),
- m_bDataBaseMode(FALSE)
+ m_bDataBaseMode(sal_False)
{
SetStyle(GetStyle()|WB_STDMODELESS);
m_bHtmlMode = (::GetHtmlMode((SwDocShell*)SfxObjectShell::Current()) & HTMLMODE_ON) != 0;
@@ -142,12 +142,12 @@ SwFldDlg::~SwFldDlg()
Beschreibung:
--------------------------------------------------------------------*/
-BOOL SwFldDlg::Close()
+sal_Bool SwFldDlg::Close()
{
m_pBindings->GetDispatcher()->
Execute(m_bDataBaseMode ? FN_INSERT_FIELD_DATA_ONLY : FN_INSERT_FIELD,
SFX_CALLMODE_ASYNCHRON|SFX_CALLMODE_RECORD);
- return TRUE;
+ return sal_True;
}
/*--------------------------------------------------------------------
@@ -204,7 +204,7 @@ void SwFldDlg::Initialize(SfxChildWinInfo *pInfo)
Beschreibung:
--------------------------------------------------------------------*/
-SfxItemSet* SwFldDlg::CreateInputItemSet( USHORT nID )
+SfxItemSet* SwFldDlg::CreateInputItemSet( sal_uInt16 nID )
{
if ( nID == TP_FLD_DOKINF )
{
@@ -249,7 +249,7 @@ IMPL_LINK( SwFldDlg, OKHdl, Button *, EMPTYARG )
void SwFldDlg::ReInitDlg()
{
SwDocShell* pDocSh = (SwDocShell*)SfxObjectShell::Current();
- BOOL bNewMode = (::GetHtmlMode(pDocSh) & HTMLMODE_ON) != 0;
+ sal_Bool bNewMode = (::GetHtmlMode(pDocSh) & HTMLMODE_ON) != 0;
if (bNewMode != m_bHtmlMode)
{
@@ -283,7 +283,7 @@ void SwFldDlg::ReInitDlg()
Beschreibung: Nach Dok-Wechsel TabPage neu initialisieren
--------------------------------------------------------------------*/
-void SwFldDlg::ReInitTabPage( USHORT nPageId, BOOL bOnlyActivate )
+void SwFldDlg::ReInitTabPage( sal_uInt16 nPageId, sal_Bool bOnlyActivate )
{
SwFldPage* pPage = (SwFldPage* )GetTabPage(nPageId);
@@ -300,17 +300,17 @@ void SwFldDlg::Activate()
SwView* pView = ::GetActiveView();
if( pView )
{
- BOOL bHtmlMode = (::GetHtmlMode((SwDocShell*)SfxObjectShell::Current()) & HTMLMODE_ON) != 0;
+ sal_Bool bHtmlMode = (::GetHtmlMode((SwDocShell*)SfxObjectShell::Current()) & HTMLMODE_ON) != 0;
const SwWrtShell& rSh = pView->GetWrtShell();
GetOKButton().Enable( !rSh.IsReadOnlyAvailable() ||
!rSh.HasReadonlySel() );
- ReInitTabPage( TP_FLD_VAR, TRUE );
+ ReInitTabPage( TP_FLD_VAR, sal_True );
if( !bHtmlMode )
{
- ReInitTabPage( TP_FLD_REF, TRUE );
- ReInitTabPage( TP_FLD_FUNC, TRUE );
+ ReInitTabPage( TP_FLD_REF, sal_True );
+ ReInitTabPage( TP_FLD_FUNC, sal_True );
}
}
}
@@ -319,7 +319,7 @@ void SwFldDlg::Activate()
Beschreibung:
--------------------------------------------------------------------*/
-void SwFldDlg::EnableInsert(BOOL bEnable)
+void SwFldDlg::EnableInsert(sal_Bool bEnable)
{
if( bEnable )
{
@@ -328,7 +328,7 @@ void SwFldDlg::EnableInsert(BOOL bEnable)
if( !pView ||
(pView->GetWrtShell().IsReadOnlyAvailable() &&
pView->GetWrtShell().HasReadonlySel()) )
- bEnable = FALSE;
+ bEnable = sal_False;
}
GetOKButton().Enable(bEnable);
}
@@ -346,7 +346,7 @@ void SwFldDlg::InsertHdl()
* --------------------------------------------------*/
void SwFldDlg::ActivateDatabasePage()
{
- m_bDataBaseMode = TRUE;
+ m_bDataBaseMode = sal_True;
ShowPage( TP_FLD_DB );
SfxTabPage* pDBPage = GetTabPage( TP_FLD_DB );
if( pDBPage )
@@ -363,7 +363,7 @@ void SwFldDlg::ActivateDatabasePage()
/*-- 07.10.2003 14:01:44---------------------------------------------------
-----------------------------------------------------------------------*/
-void SwFldDlg::PageCreated(USHORT nId, SfxTabPage& rPage)
+void SwFldDlg::PageCreated(sal_uInt16 nId, SfxTabPage& rPage)
{
if( TP_FLD_DB == nId)
{
diff --git a/sw/source/ui/fldui/fldvar.cxx b/sw/source/ui/fldui/fldvar.cxx
index c3a2f6dd47..d7e2c0d433 100644
--- a/sw/source/ui/fldui/fldvar.cxx
+++ b/sw/source/ui/fldui/fldvar.cxx
@@ -86,7 +86,7 @@ SwFldVarPage::SwFldVarPage(Window* pParent, const SfxItemSet& rCoreSet ) :
aSeparatorFT (this, SW_RES(FT_VARSEPARATOR)),
aSeparatorED (this, SW_RES(ED_VARSEPARATOR)),
aNewDelTBX (this, SW_RES(TBX_VARNEWDEL)),
- bInit (TRUE)
+ bInit (sal_True)
{
FreeResource();
@@ -101,12 +101,12 @@ SwFldVarPage::SwFldVarPage(Window* pParent, const SfxItemSet& rCoreSet ) :
sOldValueFT = aValueFT.GetText();
sOldNameFT = aNameFT.GetText();
- for (USHORT i = 1; i <= MAXLEVEL; i++)
+ for (sal_uInt16 i = 1; i <= MAXLEVEL; i++)
aChapterLevelLB.InsertEntry(String::CreateFromInt32(i));
aChapterLevelLB.SelectEntryPos(0);
//enable 'active' language selection
- aNumFormatLB.SetShowLanguageControl(TRUE);
+ aNumFormatLB.SetShowLanguageControl(sal_True);
}
/*--------------------------------------------------------------------
@@ -127,10 +127,10 @@ void SwFldVarPage::Reset(const SfxItemSet& )
Init(); // Allgemeine initialisierung
- aTypeLB.SetUpdateMode(FALSE);
+ aTypeLB.SetUpdateMode(sal_False);
aTypeLB.Clear();
- USHORT nPos, nTypeId;
+ sal_uInt16 nPos, nTypeId;
if (!IsFldEdit())
{
@@ -185,11 +185,11 @@ void SwFldVarPage::Reset(const SfxItemSet& )
if(!IsRefresh() && sUserData.GetToken(0, ';').EqualsIgnoreCaseAscii(USER_DATA_VERSION_1))
{
String sVal = sUserData.GetToken(1, ';');
- USHORT nVal = (USHORT)sVal.ToInt32();
+ sal_uInt16 nVal = (sal_uInt16)sVal.ToInt32();
if( USHRT_MAX != nVal )
{
- for(USHORT i = 0; i < aTypeLB.GetEntryCount(); i++)
- if(nVal == (USHORT)(ULONG)aTypeLB.GetEntryData(i))
+ for(sal_uInt16 i = 0; i < aTypeLB.GetEntryCount(); i++)
+ if(nVal == (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(i))
{
aTypeLB.SelectEntryPos(i);
break;
@@ -199,7 +199,7 @@ void SwFldVarPage::Reset(const SfxItemSet& )
}
TypeHdl(0);
- aTypeLB.SetUpdateMode(TRUE);
+ aTypeLB.SetUpdateMode(sal_True);
if (IsFldEdit())
{
@@ -221,7 +221,7 @@ void SwFldVarPage::Reset(const SfxItemSet& )
IMPL_LINK( SwFldVarPage, TypeHdl, ListBox *, EMPTYARG )
{
// Alte ListBoxPos sichern
- const USHORT nOld = GetTypeSel();
+ const sal_uInt16 nOld = GetTypeSel();
// Aktuelle ListBoxPos
SetTypeSel(aTypeLB.GetSelectEntryPos());
@@ -234,18 +234,18 @@ IMPL_LINK( SwFldVarPage, TypeHdl, ListBox *, EMPTYARG )
if (nOld != GetTypeSel() || nOld == LISTBOX_ENTRY_NOTFOUND)
{
- bInit = TRUE;
+ bInit = sal_True;
if (nOld != LISTBOX_ENTRY_NOTFOUND)
{
aNameED.SetText(aEmptyStr);
aValueED.SetText(aEmptyStr);
}
- aValueED.SetDropEnable(FALSE);
+ aValueED.SetDropEnable(sal_False);
UpdateSubType(); // Auswahl-Listboxen initialisieren
}
- bInit = FALSE;
+ bInit = sal_False;
return 0;
}
@@ -256,11 +256,11 @@ IMPL_LINK( SwFldVarPage, TypeHdl, ListBox *, EMPTYARG )
IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox )
{
- USHORT nTypeId = (USHORT)(ULONG)aTypeLB.GetEntryData(GetTypeSel());
- USHORT nSelPos = aSelectionLB.GetSelectEntryPos();
+ sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel());
+ sal_uInt16 nSelPos = aSelectionLB.GetSelectEntryPos();
if (nSelPos != LISTBOX_ENTRY_NOTFOUND)
- nSelPos = (USHORT)(ULONG)aSelectionLB.GetEntryData(nSelPos);
+ nSelPos = (sal_uInt16)(sal_uLong)aSelectionLB.GetEntryData(nSelPos);
if (IsFldEdit() && (!pBox || bInit))
{
@@ -275,15 +275,15 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox )
if (aValueFT.GetText() != sOldValueFT)
aValueFT.SetText(sOldValueFT);
- aNumFormatLB.SetUpdateMode(FALSE);
- aFormatLB.SetUpdateMode(FALSE);
+ aNumFormatLB.SetUpdateMode(sal_False);
+ aFormatLB.SetUpdateMode(sal_False);
FillFormatLB(nTypeId);
- USHORT nSize = aFormatLB.GetEntryCount();
+ sal_uInt16 nSize = aFormatLB.GetEntryCount();
- BOOL bValue = FALSE, bName = FALSE, bNumFmt = FALSE,
- bInvisible = FALSE, bSeparator = FALSE, bChapterLevel = FALSE;
- BOOL bFormat = nSize != 0;
+ sal_Bool bValue = sal_False, bName = sal_False, bNumFmt = sal_False,
+ bInvisible = sal_False, bSeparator = sal_False, bChapterLevel = sal_False;
+ sal_Bool bFormat = nSize != 0;
switch (nTypeId)
{
@@ -322,23 +322,23 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox )
aValueED.SetText(aEmptyStr);
}
}
- bValue = bName = bNumFmt = bInvisible = TRUE;
+ bValue = bName = bNumFmt = bInvisible = sal_True;
- aValueED.SetDropEnable(TRUE);
+ aValueED.SetDropEnable(sal_True);
break;
}
case TYP_SETFLD:
- bValue = TRUE;
+ bValue = sal_True;
- bNumFmt = bInvisible = TRUE;
+ bNumFmt = bInvisible = sal_True;
if (!IsFldDlgHtmlMode())
- bName = TRUE;
+ bName = sal_True;
else
{
aNumFormatLB.Clear();
- USHORT nPos = aNumFormatLB.InsertEntry(SW_RESSTR(FMT_SETVAR_TEXT), 0);
+ sal_uInt16 nPos = aNumFormatLB.InsertEntry(SW_RESSTR(FMT_SETVAR_TEXT), 0);
aNumFormatLB.SetEntryData(nPos, (void *)ULONG_MAX);
aNumFormatLB.SelectEntryPos(0);
}
@@ -375,15 +375,15 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox )
// (statt test2 = test + 1)
aValueED.SetText(((SwSetExpField*)GetCurField())->GetFormula());
}
- aValueED.SetDropEnable(TRUE);
+ aValueED.SetDropEnable(sal_True);
break;
case TYP_FORMELFLD:
{
- bValue = TRUE;
- bNumFmt = TRUE;
+ bValue = sal_True;
+ bNumFmt = sal_True;
aValueFT.SetText(SW_RESSTR(STR_FORMULA));
- aValueED.SetDropEnable(TRUE);
+ aValueED.SetDropEnable(sal_True);
}
break;
@@ -413,14 +413,14 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox )
if(pSetTyp)
{
if (pSetTyp->GetType() & nsSwGetSetExpType::GSE_STRING) // Textuell?
- bFormat = TRUE;
+ bFormat = sal_True;
else // Numerisch
- bNumFmt = TRUE;
+ bNumFmt = sal_True;
}
}
}
else
- bFormat = FALSE;
+ bFormat = sal_False;
EnableInsert(bFormat|bNumFmt);
}
@@ -431,7 +431,7 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox )
if (nSelPos != LISTBOX_ENTRY_NOTFOUND)
{
- bValue = bNumFmt = TRUE;
+ bValue = bNumFmt = sal_True;
String sName;
@@ -439,8 +439,8 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox )
aNameED.SetText( sName );
// User- oder SetField ?
- USHORT nInpType = 0;
- nInpType = static_cast< USHORT >(GetFldMgr().GetFldType(RES_USERFLD, sName) ? 0 : TYP_SETINPFLD);
+ sal_uInt16 nInpType = 0;
+ nInpType = static_cast< sal_uInt16 >(GetFldMgr().GetFldType(RES_USERFLD, sName) ? 0 : TYP_SETINPFLD);
if (nInpType) // SETEXPFLD
{
@@ -454,7 +454,7 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox )
{
aNumFormatLB.Clear();
- USHORT nPos = aNumFormatLB.InsertEntry(SW_RESSTR(FMT_USERVAR_TEXT), 0);
+ sal_uInt16 nPos = aNumFormatLB.InsertEntry(SW_RESSTR(FMT_USERVAR_TEXT), 0);
aNumFormatLB.SetEntryData(nPos, (void *)ULONG_MAX);
aNumFormatLB.SelectEntryPos(0);
}
@@ -463,7 +463,7 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox )
aValueED.SetText(((SwSetExpField*)GetCurField())->GetPromptText());
}
else // USERFLD
- bFormat = bNumFmt = FALSE;
+ bFormat = bNumFmt = sal_False;
}
break;
@@ -484,7 +484,7 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox )
//JP 28.08.95: DDE-Topics/-Items koennen Blanks in ihren
// Namen haben! Wird hier noch nicht beachtet
String sCmd( pType->GetCmd() );
- USHORT nTmpPos = sCmd.SearchAndReplace( sfx2::cTokenSeperator, ' ' );
+ sal_uInt16 nTmpPos = sCmd.SearchAndReplace( sfx2::cTokenSeperator, ' ' );
sCmd.SearchAndReplace( sfx2::cTokenSeperator, ' ', nTmpPos );
aValueED.SetText( sCmd );
@@ -492,13 +492,13 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox )
}
}
}
- bName = bValue = TRUE;
+ bName = bValue = sal_True;
break;
case TYP_SEQFLD:
{
- // aNumRB.Check(TRUE);
- bName = bValue = bSeparator = bChapterLevel = TRUE;
+ // aNumRB.Check(sal_True);
+ bName = bValue = bSeparator = bChapterLevel = sal_True;
SwFieldType* pFldTyp;
if( IsFldEdit() )
@@ -522,7 +522,7 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox )
if( pFldTyp )
{
- BYTE nLevel = ((SwSetExpFieldType*)pFldTyp)->GetOutlineLvl();
+ sal_uInt8 nLevel = ((SwSetExpFieldType*)pFldTyp)->GetOutlineLvl();
if( 0x7f == nLevel )
aChapterLevelLB.SelectEntryPos( 0 );
else
@@ -536,7 +536,7 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox )
case TYP_SETREFPAGEFLD:
{
- bValue = FALSE;
+ bValue = sal_False;
aValueFT.SetText( SW_RESSTR( STR_OFFSET ));
if (IsFldEdit() || pBox) // Nur bei Interaktion mit Maus
@@ -544,7 +544,7 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox )
if (nSelPos != 0 && nSelPos != LISTBOX_ENTRY_NOTFOUND)
{
- bValue = TRUE; // SubType OFF - kennt keinen Offset
+ bValue = sal_True; // SubType OFF - kennt keinen Offset
if (IsFldEdit())
aValueED.SetText(String::CreateFromInt32(((SwRefPageSetField*)GetCurField())->GetOffset()));
}
@@ -561,7 +561,7 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox )
aFormatLB.Show(!bNumFmt);
if (IsFldEdit())
- bName = FALSE;
+ bName = sal_False;
aFormatLB.Enable(bFormat);
aFormatFT.Enable(bFormat|bNumFmt);
@@ -589,12 +589,12 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox )
ModifyHdl(); // Anwenden/Einfuegen/Loeschen Status update
- aNumFormatLB.SetUpdateMode(TRUE);
- aFormatLB.SetUpdateMode(TRUE);
+ aNumFormatLB.SetUpdateMode(sal_True);
+ aFormatLB.SetUpdateMode(sal_True);
if(aSelectionLB.IsCallAddSelection())
{
- nTypeId = (USHORT)(ULONG)aTypeLB.GetEntryData(GetTypeSel());
+ nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel());
switch (nTypeId)
{
@@ -603,7 +603,7 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox )
nSelPos = aSelectionLB.GetSelectEntryPos();
if (nSelPos != LISTBOX_ENTRY_NOTFOUND)
- nSelPos = (USHORT)(ULONG)aSelectionLB.GetEntryData(nSelPos);
+ nSelPos = (sal_uInt16)(sal_uLong)aSelectionLB.GetEntryData(nSelPos);
if (nSelPos != LISTBOX_ENTRY_NOTFOUND && pBox && !bInit)
{
@@ -625,22 +625,22 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox )
void SwFldVarPage::UpdateSubType()
{
String sOldSel;
- USHORT nTypeId = (USHORT)(ULONG)aTypeLB.GetEntryData(GetTypeSel());
+ sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel());
SetSelectionSel(aSelectionLB.GetSelectEntryPos());
if(GetSelectionSel() != LISTBOX_ENTRY_NOTFOUND)
sOldSel = aSelectionLB.GetEntry(GetSelectionSel());
// Auswahl-Listbox fuellen
- aSelectionLB.SetUpdateMode(FALSE);
+ aSelectionLB.SetUpdateMode(sal_False);
aSelectionLB.Clear();
SvStringsDtor aList;
GetFldMgr().GetSubTypes(nTypeId, aList);
- USHORT nCount = aList.Count();
- USHORT nPos;
+ sal_uInt16 nCount = aList.Count();
+ sal_uInt16 nPos;
- for (USHORT i = 0; i < nCount; ++i)
+ for (sal_uInt16 i = 0; i < nCount; ++i)
{
if (nTypeId != TYP_INPUTFLD || i)
{
@@ -651,29 +651,29 @@ void SwFldVarPage::UpdateSubType()
}
else
{
- BOOL bInsert = FALSE;
+ sal_Bool bInsert = sal_False;
switch (nTypeId)
{
case TYP_INPUTFLD:
if (*aList[i] == GetCurField()->GetPar1())
- bInsert = TRUE;
+ bInsert = sal_True;
break;
case TYP_FORMELFLD:
- bInsert = TRUE;
+ bInsert = sal_True;
break;
case TYP_GETFLD:
if (*aList[i] == ((SwFormulaField*)GetCurField())->GetFormula())
- bInsert = TRUE;
+ bInsert = sal_True;
break;
case TYP_SETFLD:
case TYP_USERFLD:
if (*aList[i] == GetCurField()->GetTyp()->GetName())
{
- bInsert = TRUE;
+ bInsert = sal_True;
if (GetCurField()->GetSubType() & nsSwExtendedSubType::SUB_INVISIBLE)
aInvisibleCB.Check();
}
@@ -691,7 +691,7 @@ void SwFldVarPage::UpdateSubType()
default:
if (*aList[i] == GetCurField()->GetPar1())
- bInsert = TRUE;
+ bInsert = sal_True;
break;
}
if (bInsert)
@@ -705,7 +705,7 @@ void SwFldVarPage::UpdateSubType()
}
}
- BOOL bEnable = aSelectionLB.GetEntryCount() != 0;
+ sal_Bool bEnable = aSelectionLB.GetEntryCount() != 0;
ListBox *pLB = 0;
if (bEnable)
@@ -722,23 +722,23 @@ void SwFldVarPage::UpdateSubType()
aSelectionFT.Enable( bEnable );
SubTypeHdl(pLB);
- aSelectionLB.SetUpdateMode(TRUE);
+ aSelectionLB.SetUpdateMode(sal_True);
}
/*--------------------------------------------------------------------
Beschreibung:
--------------------------------------------------------------------*/
-USHORT SwFldVarPage::FillFormatLB(USHORT nTypeId)
+sal_uInt16 SwFldVarPage::FillFormatLB(sal_uInt16 nTypeId)
{
String sOldSel, sOldNumSel;
- ULONG nOldNumFormat = 0;
+ sal_uLong nOldNumFormat = 0;
- USHORT nFormatSel = aFormatLB.GetSelectEntryPos();
+ sal_uInt16 nFormatSel = aFormatLB.GetSelectEntryPos();
if (nFormatSel != LISTBOX_ENTRY_NOTFOUND)
sOldSel = aFormatLB.GetEntry(nFormatSel);
- USHORT nNumFormatSel = aNumFormatLB.GetSelectEntryPos();
+ sal_uInt16 nNumFormatSel = aNumFormatLB.GetSelectEntryPos();
if (nNumFormatSel != LISTBOX_ENTRY_NOTFOUND)
{
sOldNumSel = aNumFormatLB.GetEntry(nNumFormatSel);
@@ -748,7 +748,7 @@ USHORT SwFldVarPage::FillFormatLB(USHORT nTypeId)
// Format-Listbox fuellen
aFormatLB.Clear();
aNumFormatLB.Clear();
- BOOL bSpecialFmt = FALSE;
+ sal_Bool bSpecialFmt = sal_False;
if( TYP_GETREFPAGEFLD != nTypeId )
{
@@ -780,7 +780,7 @@ USHORT SwFldVarPage::FillFormatLB(USHORT nTypeId)
{
if (!IsFldEdit() || bSpecialFmt)
{
- USHORT nPos = aNumFormatLB.InsertEntry(SW_RESSTR(FMT_MARK_TEXT), 0);
+ sal_uInt16 nPos = aNumFormatLB.InsertEntry(SW_RESSTR(FMT_MARK_TEXT), 0);
aNumFormatLB.SetEntryData(nPos, (void *)ULONG_MAX);
nPos = aNumFormatLB.InsertEntry(SW_RESSTR(FMT_USERVAR_CMD), 1);
aNumFormatLB.SetEntryData(nPos, (void *)ULONG_MAX);
@@ -792,7 +792,7 @@ USHORT SwFldVarPage::FillFormatLB(USHORT nTypeId)
{
if (!IsFldEdit() || bSpecialFmt)
{
- USHORT nPos = aNumFormatLB.InsertEntry(SW_RESSTR(FMT_SETVAR_TEXT), 0);
+ sal_uInt16 nPos = aNumFormatLB.InsertEntry(SW_RESSTR(FMT_SETVAR_TEXT), 0);
aNumFormatLB.SetEntryData(nPos, (void *)ULONG_MAX);
}
}
@@ -800,14 +800,14 @@ USHORT SwFldVarPage::FillFormatLB(USHORT nTypeId)
case TYP_FORMELFLD:
{
- USHORT nPos = aNumFormatLB.InsertEntry(SW_RESSTR(FMT_GETVAR_NAME), 0);
+ sal_uInt16 nPos = aNumFormatLB.InsertEntry(SW_RESSTR(FMT_GETVAR_NAME), 0);
aNumFormatLB.SetEntryData(nPos, (void *)ULONG_MAX);
}
break;
case TYP_GETFLD:
{
- USHORT nPos = aNumFormatLB.InsertEntry(SW_RESSTR(FMT_GETVAR_NAME), 0);
+ sal_uInt16 nPos = aNumFormatLB.InsertEntry(SW_RESSTR(FMT_GETVAR_NAME), 0);
aNumFormatLB.SetEntryData(nPos, (void *)ULONG_MAX);
}
break;
@@ -828,12 +828,12 @@ USHORT SwFldVarPage::FillFormatLB(USHORT nTypeId)
aNumFormatLB.SelectEntry(sOldSel);
}
- USHORT nSize = GetFldMgr().GetFormatCount(nTypeId, FALSE, IsFldDlgHtmlMode());
+ sal_uInt16 nSize = GetFldMgr().GetFormatCount(nTypeId, sal_False, IsFldDlgHtmlMode());
- for (USHORT i = 0; i < nSize; i++)
+ for (sal_uInt16 i = 0; i < nSize; i++)
{
- USHORT nPos = aFormatLB.InsertEntry(GetFldMgr().GetFormatStr(nTypeId, i));
- USHORT nFldId = GetFldMgr().GetFormatId( nTypeId, i );
+ sal_uInt16 nPos = aFormatLB.InsertEntry(GetFldMgr().GetFormatStr(nTypeId, i));
+ sal_uInt16 nFldId = GetFldMgr().GetFormatId( nTypeId, i );
aFormatLB.SetEntryData( nPos, reinterpret_cast<void*>(nFldId) );
if (IsFldEdit() && nFldId == GetCurField()->GetFormat())
aFormatLB.SelectEntryPos( nPos );
@@ -865,9 +865,9 @@ USHORT SwFldVarPage::FillFormatLB(USHORT nTypeId)
IMPL_LINK( SwFldVarPage, ModifyHdl, Edit *, EMPTYARG )
{
String sValue(aValueED.GetText());
- BOOL bHasValue = sValue.Len() != 0;
- USHORT nTypeId = (USHORT)(ULONG)aTypeLB.GetEntryData(GetTypeSel());
- BOOL bInsert = FALSE, bApply = FALSE, bDelete = FALSE;
+ sal_Bool bHasValue = sValue.Len() != 0;
+ sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel());
+ sal_Bool bInsert = sal_False, bApply = sal_False, bDelete = sal_False;
String sName( aNameED.GetText() );
xub_StrLen nLen = sName.Len();
@@ -897,7 +897,7 @@ IMPL_LINK( SwFldVarPage, ModifyHdl, Edit *, EMPTYARG )
if( nLen )
{
// Gibts schon einen entsprechenden Type
- bInsert = bApply = TRUE;
+ bInsert = bApply = sal_True;
SwFieldType* pType = GetFldMgr().GetFldType(RES_DDEFLD, sName);
@@ -926,13 +926,13 @@ IMPL_LINK( SwFldVarPage, ModifyHdl, Edit *, EMPTYARG )
{
// Benutzerfelder duerfen auch ohne Inhalt eingefuegt werden!
// Bug #56845
- bInsert = bApply = TRUE;
+ bInsert = bApply = sal_True;
}
}
break;
default:
- bInsert = TRUE;
+ bInsert = sal_True;
if (nTypeId == TYP_SETFLD || nTypeId == TYP_SEQFLD)
{
@@ -948,7 +948,7 @@ IMPL_LINK( SwFldVarPage, ModifyHdl, Edit *, EMPTYARG )
if(pSh)
{
const SwFldTypes* p = pSh->GetDoc()->GetFldTypes();
- USHORT i;
+ sal_uInt16 i;
for (i = 0; i < INIT_FLDTYPES; i++)
{
@@ -958,26 +958,26 @@ IMPL_LINK( SwFldVarPage, ModifyHdl, Edit *, EMPTYARG )
}
if (i >= INIT_FLDTYPES && !pSh->IsUsed(*pFldType))
- bDelete = TRUE;
+ bDelete = sal_True;
if (nTypeId == TYP_SEQFLD && !(pFldType->GetType() & nsSwGetSetExpType::GSE_SEQ))
- bInsert = FALSE;
+ bInsert = sal_False;
if (nTypeId == TYP_SETFLD && (pFldType->GetType() & nsSwGetSetExpType::GSE_SEQ))
- bInsert = FALSE;
+ bInsert = sal_False;
}
}
if (GetFldMgr().GetFldType(RES_USERFLD, sName))
- bInsert = FALSE;
+ bInsert = sal_False;
}
if( !nLen && ( nTypeId == TYP_SETFLD ||
(!IsFldEdit() && nTypeId == TYP_GETFLD ) ) )
- bInsert = FALSE;
+ bInsert = sal_False;
if( (nTypeId == TYP_SETFLD || nTypeId == TYP_FORMELFLD) &&
!bHasValue )
- bInsert = FALSE;
+ bInsert = sal_False;
break;
}
@@ -994,7 +994,7 @@ IMPL_LINK( SwFldVarPage, ModifyHdl, Edit *, EMPTYARG )
IMPL_LINK( SwFldVarPage, TBClickHdl, ToolBox *, pBox )
{
- USHORT nTypeId = (USHORT)(ULONG)aTypeLB.GetEntryData(GetTypeSel());
+ sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel());
switch (pBox->GetCurItemId())
{
@@ -1004,7 +1004,7 @@ IMPL_LINK( SwFldVarPage, TBClickHdl, ToolBox *, pBox )
GetFldMgr().RemoveFldType(RES_USERFLD, aSelectionLB.GetSelectEntry());
else
{
- USHORT nWhich;
+ sal_uInt16 nWhich;
switch(nTypeId)
{
@@ -1035,8 +1035,8 @@ IMPL_LINK( SwFldVarPage, TBClickHdl, ToolBox *, pBox )
{
String sName(aNameED.GetText()), sValue(aValueED.GetText());
SwFieldType* pType = 0;
- USHORT nId = 0;
- USHORT nNumFormatPos = aNumFormatLB.GetSelectEntryPos();
+ sal_uInt16 nId = 0;
+ sal_uInt16 nNumFormatPos = aNumFormatLB.GetSelectEntryPos();
switch (nTypeId)
{
@@ -1046,9 +1046,9 @@ IMPL_LINK( SwFldVarPage, TBClickHdl, ToolBox *, pBox )
}
pType = GetFldMgr().GetFldType(nId, sName);
- ULONG nFormat = aFormatLB.GetSelectEntryPos();
+ sal_uLong nFormat = aFormatLB.GetSelectEntryPos();
if (nFormat != LISTBOX_ENTRY_NOTFOUND)
- nFormat = (ULONG)aFormatLB.GetEntryData((USHORT)nFormat);
+ nFormat = (sal_uLong)aFormatLB.GetEntryData((sal_uInt16)nFormat);
if (pType) // Aendern
{
@@ -1063,7 +1063,7 @@ IMPL_LINK( SwFldVarPage, TBClickHdl, ToolBox *, pBox )
{
if (nNumFormatPos != LISTBOX_ENTRY_NOTFOUND)
{
- ULONG nFmt = nNumFormatPos == 0 ? 0 : aNumFormatLB.GetFormat();
+ sal_uLong nFmt = nNumFormatPos == 0 ? 0 : aNumFormatLB.GetFormat();
if (nFmt)
{ // Sprache auf Office-Sprache umstellen, da String im Office
// Format vom Kalkulator erwartet wird und so in den Dlg
@@ -1081,10 +1081,10 @@ IMPL_LINK( SwFldVarPage, TBClickHdl, ToolBox *, pBox )
{
//JP 28.08.95: DDE-Topics/-Items koennen Blanks in ihren
// Namen haben! Wird hier noch nicht beachtet.
- USHORT nTmpPos = sValue.SearchAndReplace( ' ', sfx2::cTokenSeperator );
+ sal_uInt16 nTmpPos = sValue.SearchAndReplace( ' ', sfx2::cTokenSeperator );
sValue.SearchAndReplace( ' ', sfx2::cTokenSeperator, nTmpPos );
((SwDDEFieldType*)pType)->SetCmd(sValue);
- ((SwDDEFieldType*)pType)->SetType((USHORT)nFormat);
+ ((SwDDEFieldType*)pType)->SetType((sal_uInt16)nFormat);
}
}
pType->UpdateFlds();
@@ -1119,10 +1119,10 @@ IMPL_LINK( SwFldVarPage, TBClickHdl, ToolBox *, pBox )
{
//JP 28.08.95: DDE-Topics/-Items koennen Blanks in ihren
// Namen haben! Wird hier noch nicht beachtet.
- USHORT nTmpPos = sValue.SearchAndReplace( ' ', sfx2::cTokenSeperator );
+ sal_uInt16 nTmpPos = sValue.SearchAndReplace( ' ', sfx2::cTokenSeperator );
sValue.SearchAndReplace( ' ', sfx2::cTokenSeperator, nTmpPos );
- SwDDEFieldType aType(sName, sValue, (USHORT)nFormat);
+ SwDDEFieldType aType(sName, sValue, (sal_uInt16)nFormat);
aSelectionLB.InsertEntry(sName);
aSelectionLB.SelectEntry(sName);
GetFldMgr().InsertFldType(aType); // DDE-Feld Neu
@@ -1137,7 +1137,7 @@ IMPL_LINK( SwFldVarPage, TBClickHdl, ToolBox *, pBox )
break;
}
- return TRUE;
+ return sal_True;
}
/*--------------------------------------------------------------------
@@ -1146,7 +1146,7 @@ IMPL_LINK( SwFldVarPage, TBClickHdl, ToolBox *, pBox )
IMPL_LINK( SwFldVarPage, ChapterHdl, ListBox *, EMPTYARG )
{
- BOOL bEnable = aChapterLevelLB.GetSelectEntryPos() != 0;
+ sal_Bool bEnable = aChapterLevelLB.GetSelectEntryPos() != 0;
aSeparatorED.Enable(bEnable);
aSeparatorFT.Enable(bEnable);
@@ -1161,7 +1161,7 @@ IMPL_LINK( SwFldVarPage, ChapterHdl, ListBox *, EMPTYARG )
IMPL_LINK( SwFldVarPage, SeparatorHdl, Edit *, EMPTYARG )
{
- BOOL bEnable = aSeparatorED.GetText().Len() != 0 ||
+ sal_Bool bEnable = aSeparatorED.GetText().Len() != 0 ||
aChapterLevelLB.GetSelectEntryPos() == 0;
EnableInsert(bEnable);
@@ -1172,20 +1172,20 @@ IMPL_LINK( SwFldVarPage, SeparatorHdl, Edit *, EMPTYARG )
Beschreibung:
--------------------------------------------------------------------*/
-BOOL SwFldVarPage::FillItemSet(SfxItemSet& )
+sal_Bool SwFldVarPage::FillItemSet(SfxItemSet& )
{
- USHORT nTypeId = (USHORT)(ULONG)aTypeLB.GetEntryData(GetTypeSel());
+ sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel());
String aVal(aValueED.GetText());
String aName(aNameED.GetText());
- USHORT nSubType = aSelectionLB.GetSelectEntryPos();
+ sal_uInt16 nSubType = aSelectionLB.GetSelectEntryPos();
if(nSubType == LISTBOX_ENTRY_NOTFOUND)
nSubType = 0;
else
- nSubType = (USHORT)(ULONG)aSelectionLB.GetEntryData(nSubType);
+ nSubType = (sal_uInt16)(sal_uLong)aSelectionLB.GetEntryData(nSubType);
- ULONG nFormat;
+ sal_uLong nFormat;
if (!aNumFormatLB.IsVisible())
{
@@ -1194,7 +1194,7 @@ BOOL SwFldVarPage::FillItemSet(SfxItemSet& )
if(nFormat == LISTBOX_ENTRY_NOTFOUND)
nFormat = 0;
else
- nFormat = (ULONG)aFormatLB.GetEntryData((USHORT)nFormat);
+ nFormat = (sal_uLong)aFormatLB.GetEntryData((sal_uInt16)nFormat);
}
else
{
@@ -1245,7 +1245,7 @@ BOOL SwFldVarPage::FillItemSet(SfxItemSet& )
case TYP_INPUTFLD:
{
SwFieldType* pType = GetFldMgr().GetFldType(RES_USERFLD, aName);
- nSubType = static_cast< USHORT >((nSubType & 0xff00) | ((pType) ? INP_USR : INP_VAR));
+ nSubType = static_cast< sal_uInt16 >((nSubType & 0xff00) | ((pType) ? INP_USR : INP_VAR));
break;
}
@@ -1274,7 +1274,7 @@ BOOL SwFldVarPage::FillItemSet(SfxItemSet& )
nSubType--;
String sSeparator(aSeparatorED.GetText().GetChar(0));
cSeparator = sSeparator.Len() ? sSeparator.GetChar(0) : ' ';
- //nSubType |= (USHORT)(((BYTE)) << 8);
+ //nSubType |= (sal_uInt16)(((sal_uInt8)) << 8);
}
break;
}
@@ -1300,7 +1300,7 @@ BOOL SwFldVarPage::FillItemSet(SfxItemSet& )
UpdateSubType();
- return FALSE;
+ return sal_False;
}
@@ -1318,7 +1318,7 @@ SfxTabPage* SwFldVarPage::Create( Window* pParent,
Beschreibung:
--------------------------------------------------------------------*/
-USHORT SwFldVarPage::GetGroup()
+sal_uInt16 SwFldVarPage::GetGroup()
{
return GRP_VAR;
}
@@ -1330,7 +1330,7 @@ USHORT SwFldVarPage::GetGroup()
SelectionListBox::SelectionListBox( SwFldVarPage* pDialog, const ResId& rResId ) :
ListBox (pDialog, rResId),
pDlg (pDialog),
- bCallAddSelection(FALSE)
+ bCallAddSelection(sal_False)
{
}
@@ -1341,23 +1341,23 @@ SelectionListBox::SelectionListBox( SwFldVarPage* pDialog, const ResId& rResId )
long SelectionListBox::PreNotify( NotifyEvent& rNEvt )
{
long nHandled = ListBox::PreNotify( rNEvt );
- //BOOL bAddSel = FALSE;
+ //sal_Bool bAddSel = sal_False;
if ( rNEvt.GetType() == EVENT_KEYUP )
{
const KeyEvent* pKEvt = rNEvt.GetKeyEvent();
const KeyCode aKeyCode = pKEvt->GetKeyCode();
- const USHORT nModifier = aKeyCode.GetModifier();
+ const sal_uInt16 nModifier = aKeyCode.GetModifier();
if( aKeyCode.GetCode() == KEY_SPACE && !nModifier)
-// bAddSel = TRUE;
- bCallAddSelection = TRUE;
+// bAddSel = sal_True;
+ bCallAddSelection = sal_True;
}
if ( rNEvt.GetType() == EVENT_MOUSEBUTTONDOWN )
{
const MouseEvent* pMEvt = rNEvt.GetMouseEvent();
if (pMEvt && (pMEvt->IsMod1() || pMEvt->IsMod2())) // Alt oder Ctrl
- //bAddSel = TRUE;
- bCallAddSelection = TRUE;
+ //bAddSel = sal_True;
+ bCallAddSelection = sal_True;
}
// if (bAddSel)
@@ -1372,11 +1372,11 @@ void SwFldVarPage::FillUserData()
{
String sData(String::CreateFromAscii(USER_DATA_VERSION));
sData += ';';
- USHORT nTypeSel = aTypeLB.GetSelectEntryPos();
+ sal_uInt16 nTypeSel = aTypeLB.GetSelectEntryPos();
if( LISTBOX_ENTRY_NOTFOUND == nTypeSel )
nTypeSel = USHRT_MAX;
else
- nTypeSel = (USHORT)(ULONG)aTypeLB.GetEntryData( nTypeSel );
+ nTypeSel = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData( nTypeSel );
sData += String::CreateFromInt32( nTypeSel );
SetUserData(sData);
}
diff --git a/sw/source/ui/fldui/fldvar.hxx b/sw/source/ui/fldui/fldvar.hxx
index 01d07e898e..feac765b24 100644
--- a/sw/source/ui/fldui/fldvar.hxx
+++ b/sw/source/ui/fldui/fldvar.hxx
@@ -50,7 +50,7 @@ class SwFldVarPage;
class SelectionListBox : public ListBox
{
SwFldVarPage* pDlg;
- BOOL bCallAddSelection;
+ sal_Bool bCallAddSelection;
virtual long PreNotify( NotifyEvent& rNEvt );
@@ -58,8 +58,8 @@ public:
SelectionListBox( SwFldVarPage* pDialog, const ResId& rResId );
// Selektieren per Ctrl oder Alt erkennen und mit SelectHdl auswerten
- BOOL IsCallAddSelection() const {return bCallAddSelection;}
- void ResetCallAddSelection() {bCallAddSelection = FALSE;}
+ sal_Bool IsCallAddSelection() const {return bCallAddSelection;}
+ void ResetCallAddSelection() {bCallAddSelection = sal_False;}
};
/*--------------------------------------------------------------------
@@ -92,8 +92,8 @@ class SwFldVarPage : public SwFldPage
String sOldValueFT;
String sOldNameFT;
- ULONG nOldFormat;
- BOOL bInit;
+ sal_uLong nOldFormat;
+ sal_Bool bInit;
DECL_LINK( TypeHdl, ListBox* pLB = 0 );
DECL_LINK( SubTypeHdl, ListBox* pLB = 0 );
@@ -103,10 +103,10 @@ class SwFldVarPage : public SwFldPage
DECL_LINK( SeparatorHdl, Edit *pED = 0 );
void UpdateSubType();
- USHORT FillFormatLB(USHORT nTypeId);
+ sal_uInt16 FillFormatLB(sal_uInt16 nTypeId);
protected:
- virtual USHORT GetGroup();
+ virtual sal_uInt16 GetGroup();
public:
SwFldVarPage(Window* pParent, const SfxItemSet& rSet);
@@ -115,7 +115,7 @@ public:
static SfxTabPage* Create(Window* pParent, const SfxItemSet& rAttrSet);
- virtual BOOL FillItemSet( SfxItemSet& rSet );
+ virtual sal_Bool FillItemSet( SfxItemSet& rSet );
virtual void Reset( const SfxItemSet& rSet );
virtual void FillUserData();
diff --git a/sw/source/ui/fldui/fldwrap.cxx b/sw/source/ui/fldui/fldwrap.cxx
index 30d56623d8..334a86b6f9 100644
--- a/sw/source/ui/fldui/fldwrap.cxx
+++ b/sw/source/ui/fldui/fldwrap.cxx
@@ -67,7 +67,7 @@ SFX_IMPL_CHILDWINDOW(SwFldDlgWrapper, FN_INSERT_FIELD)
Beschreibung:
--------------------------------------------------------------------*/
-SwChildWinWrapper::SwChildWinWrapper(Window *pParentWindow, USHORT nId) :
+SwChildWinWrapper::SwChildWinWrapper(Window *pParentWindow, sal_uInt16 nId) :
SfxChildWindow(pParentWindow, nId),
m_pDocSh(0)
{
@@ -91,14 +91,14 @@ IMPL_LINK( SwChildWinWrapper, UpdateHdl, void*, EMPTYARG )
Beschreibung: Nach Dok-Wechsel Dialog neu initialisieren
--------------------------------------------------------------------*/
-BOOL SwChildWinWrapper::ReInitDlg(SwDocShell *)
+sal_Bool SwChildWinWrapper::ReInitDlg(SwDocShell *)
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if (m_pDocSh != GetOldDocShell())
{
m_aUpdateTimer.Stop();
- bRet = TRUE; // Sofortiges Update
+ bRet = sal_True; // Sofortiges Update
}
else
m_aUpdateTimer.Start();
@@ -122,7 +122,7 @@ SfxChildWinInfo SwFldDlgWrapper::GetInfo() const
Beschreibung:
--------------------------------------------------------------------*/
-SwFldDlgWrapper::SwFldDlgWrapper( Window* _pParent, USHORT nId,
+SwFldDlgWrapper::SwFldDlgWrapper( Window* _pParent, sal_uInt16 nId,
SfxBindings* pB,
SfxChildWinInfo* )
: SwChildWinWrapper( _pParent, nId )
@@ -142,11 +142,11 @@ SwFldDlgWrapper::SwFldDlgWrapper( Window* _pParent, USHORT nId,
Beschreibung: Nach Dok-Wechsel Dialog neu initialisieren
--------------------------------------------------------------------*/
-BOOL SwFldDlgWrapper::ReInitDlg(SwDocShell *pDocSh)
+sal_Bool SwFldDlgWrapper::ReInitDlg(SwDocShell *pDocSh)
{
- BOOL bRet;
+ sal_Bool bRet;
- if ((bRet = SwChildWinWrapper::ReInitDlg(pDocSh)) == TRUE) // Sofort aktualisieren, Dok-Wechsel
+ if ((bRet = SwChildWinWrapper::ReInitDlg(pDocSh)) == sal_True) // Sofort aktualisieren, Dok-Wechsel
{
pDlgInterface->ReInitDlg();
}
@@ -158,7 +158,7 @@ BOOL SwFldDlgWrapper::ReInitDlg(SwDocShell *pDocSh)
Beschreibung:
--------------------------------------------------------------------*/
-void SwFldDlgWrapper::ShowPage(USHORT nPage)
+void SwFldDlgWrapper::ShowPage(sal_uInt16 nPage)
{
pDlgInterface->ShowPage(nPage ? nPage : TP_FLD_REF);
}
@@ -173,13 +173,13 @@ SfxChildWinInfo SwFldDataOnlyDlgWrapper::GetInfo() const
SfxChildWinInfo aInfo = SfxChildWindow::GetInfo();
// prevent instatiation of dialog other than by calling
// the mail merge dialog
- aInfo.bVisible = FALSE;
+ aInfo.bVisible = sal_False;
return aInfo;
}
/* -----------------04.02.2003 14:17-----------------
*
* --------------------------------------------------*/
-SwFldDataOnlyDlgWrapper::SwFldDataOnlyDlgWrapper( Window* _pParent, USHORT nId,
+SwFldDataOnlyDlgWrapper::SwFldDataOnlyDlgWrapper( Window* _pParent, sal_uInt16 nId,
SfxBindings* pB,
SfxChildWinInfo* pInfo )
: SwChildWinWrapper( _pParent, nId )
@@ -200,10 +200,10 @@ SwFldDataOnlyDlgWrapper::SwFldDataOnlyDlgWrapper( Window* _pParent, USHORT nId,
/* -----------------04.02.2003 14:17-----------------
* re-init after doc activation
* --------------------------------------------------*/
-BOOL SwFldDataOnlyDlgWrapper::ReInitDlg(SwDocShell *pDocSh)
+sal_Bool SwFldDataOnlyDlgWrapper::ReInitDlg(SwDocShell *pDocSh)
{
- BOOL bRet;
- if ((bRet = SwChildWinWrapper::ReInitDlg(pDocSh)) == TRUE) // Sofort aktualisieren, Dok-Wechsel
+ sal_Bool bRet;
+ if ((bRet = SwChildWinWrapper::ReInitDlg(pDocSh)) == sal_True) // Sofort aktualisieren, Dok-Wechsel
{
pDlgInterface->ReInitDlg();
}
diff --git a/sw/source/ui/fldui/inpdlg.cxx b/sw/source/ui/fldui/inpdlg.cxx
index a197147021..3b190060cc 100644
--- a/sw/source/ui/fldui/inpdlg.cxx
+++ b/sw/source/ui/fldui/inpdlg.cxx
@@ -51,7 +51,7 @@
--------------------------------------------------------------------*/
SwFldInputDlg::SwFldInputDlg( Window *pParent, SwWrtShell &rS,
- SwField* pField, BOOL bNextButton ) :
+ SwField* pField, sal_Bool bNextButton ) :
SvxStandardDialog(pParent, SW_RES(DLG_FLD_INPUT)),
@@ -94,7 +94,7 @@ SwFldInputDlg::SwFldInputDlg( Window *pParent, SwWrtShell &rS,
//
pInpFld = (SwInputField*)pField;
aLabelED.SetText( pInpFld->GetPar2() );
- USHORT nSubType = pInpFld->GetSubType();
+ sal_uInt16 nSubType = pInpFld->GetSubType();
switch(nSubType & 0xff)
{
@@ -128,7 +128,7 @@ SwFldInputDlg::SwFldInputDlg( Window *pParent, SwWrtShell &rS,
// JP 31.3.00: Inputfields in readonly regions must be allowed to
// input any content. - 74639
- BOOL bEnable = !rSh.IsCrsrReadonly();
+ sal_Bool bEnable = !rSh.IsCrsrReadonly();
/*!rSh.IsReadOnlyAvailable() || !rSh.HasReadonlySel()*/;
aOKBT.Enable( bEnable );
aEditED.SetReadOnly( !bEnable );
@@ -159,7 +159,7 @@ void SwFldInputDlg::Apply()
aTmp.EraseAllChars( '\r' );
rSh.StartAllAction();
- BOOL bModified = FALSE;
+ sal_Bool bModified = sal_False;
if(pInpFld)
{
if(pUsrType)
@@ -168,21 +168,21 @@ void SwFldInputDlg::Apply()
{
pUsrType->SetContent(aTmp);
pUsrType->UpdateFlds();
- bModified = TRUE;
+ bModified = sal_True;
}
}
else if( aTmp != pInpFld->GetPar1() )
{
pInpFld->SetPar1(aTmp);
rSh.SwEditShell::UpdateFlds(*pInpFld);
- bModified = TRUE;
+ bModified = sal_True;
}
}
else if( aTmp != pSetFld->GetPar2() )
{
pSetFld->SetPar2(aTmp);
rSh.SwEditShell::UpdateFlds(*pSetFld);
- bModified = TRUE;
+ bModified = sal_True;
}
if( bModified )
diff --git a/sw/source/ui/fldui/javaedit.cxx b/sw/source/ui/fldui/javaedit.cxx
index 3d24c5d095..271d5375de 100644
--- a/sw/source/ui/fldui/javaedit.cxx
+++ b/sw/source/ui/fldui/javaedit.cxx
@@ -91,8 +91,8 @@ SwJavaEditDialog::SwJavaEditDialog(Window* pParent, SwWrtShell* pWrtSh) :
aNextBtn ( this, SW_RES( BTN_NEXT ) ),
aHelpBtn ( this, SW_RES( BTN_POST_HELP ) ),
- bNew(TRUE),
- bIsUrl(FALSE),
+ bNew(sal_True),
+ bIsUrl(sal_False),
pSh(pWrtSh),
pFileDlg(NULL),
@@ -210,8 +210,8 @@ void SwJavaEditDialog::Apply()
void SwJavaEditDialog::CheckTravel()
{
- BOOL bTravel = FALSE;
- BOOL bNext(FALSE), bPrev(FALSE);
+ sal_Bool bTravel = sal_False;
+ sal_Bool bNext(sal_False), bPrev(sal_False);
if(!bNew)
{
@@ -299,7 +299,7 @@ void SwJavaEditDialog::SetFld()
aType = String::CreateFromAscii("JavaScript");
}
-BOOL SwJavaEditDialog::IsUpdate()
+sal_Bool SwJavaEditDialog::IsUpdate()
{
return pFld && ( bIsUrl != pFld->GetFormat() || pFld->GetPar2() != aType || pFld->GetPar1() != aText );
}
@@ -310,7 +310,7 @@ BOOL SwJavaEditDialog::IsUpdate()
IMPL_LINK( SwJavaEditDialog, RadioButtonHdl, RadioButton *, EMPTYARG )
{
- BOOL bEnable = aUrlRB.IsChecked();
+ sal_Bool bEnable = aUrlRB.IsChecked();
aUrlPB.Enable(bEnable);
aUrlED.Enable(bEnable);
aEditED.Enable(!bEnable);
@@ -323,7 +323,7 @@ IMPL_LINK( SwJavaEditDialog, RadioButtonHdl, RadioButton *, EMPTYARG )
aEditED.SetReadOnly( !bEnable);
aTypeED.SetReadOnly( !bEnable);
if( aUrlPB.IsEnabled() && !bEnable )
- aUrlPB.Enable( FALSE );
+ aUrlPB.Enable( sal_False );
}
return 0;
}
diff --git a/sw/source/ui/fldui/xfldui.cxx b/sw/source/ui/fldui/xfldui.cxx
index b5765c3fb3..518c32b6e9 100644
--- a/sw/source/ui/fldui/xfldui.cxx
+++ b/sw/source/ui/fldui/xfldui.cxx
@@ -67,13 +67,13 @@ using namespace ::com::sun::star::beans;
/*--------------------------------------------------------------------
Beschreibung: Ist das Datenbankfeld numerisch?
- Anm: Im Fehlerfall wird TRUE returnt.
+ Anm: Im Fehlerfall wird sal_True returnt.
--------------------------------------------------------------------*/
-BOOL SwFldMgr::IsDBNumeric( const String& rDBName, const String& rTblQryName,
- BOOL bIsTable, const String& rFldName)
+sal_Bool SwFldMgr::IsDBNumeric( const String& rDBName, const String& rTblQryName,
+ sal_Bool bIsTable, const String& rFldName)
{
- BOOL bNumeric = TRUE;
+ sal_Bool bNumeric = sal_True;
SwNewDBMgr* pDBMgr = pWrtShell ? pWrtShell->GetNewDBMgr() :
::GetActiveView()->GetWrtShell().GetNewDBMgr();
@@ -174,7 +174,7 @@ BOOL SwFldMgr::IsDBNumeric( const String& rDBName, const String& rTblQryName,
case DataType::VARCHAR:
case DataType::LONGVARCHAR:
default:
- bNumeric = FALSE;
+ bNumeric = sal_False;
}
}
}
diff --git a/sw/source/ui/fmtui/tmpdlg.cxx b/sw/source/ui/fmtui/tmpdlg.cxx
index 5193dd736f..501bc85170 100644
--- a/sw/source/ui/fmtui/tmpdlg.cxx
+++ b/sw/source/ui/fmtui/tmpdlg.cxx
@@ -109,14 +109,14 @@ extern SW_DLLPUBLIC SwWrtShell* GetActiveWrtShell();
SwTemplateDlg::SwTemplateDlg(Window* pParent,
SfxStyleSheetBase& rBase,
- USHORT nRegion,
- BOOL bColumn,
+ sal_uInt16 nRegion,
+ sal_Bool bColumn,
SwWrtShell* pActShell,
- BOOL bNew ) :
+ sal_Bool bNew ) :
SfxStyleDialog( pParent,
SW_RES(DLG_TEMPLATE_BASE + nRegion),
rBase,
- FALSE,
+ sal_False,
0 ),
nType( nRegion ),
pWrtShell(pActShell),
@@ -295,7 +295,7 @@ SwTemplateDlg::SwTemplateDlg(Window* pParent,
AddTabPage(TP_PAGE_STD, String(SW_RES(STR_PAGE_STD)),
pFact->GetTabPageCreatorFunc( RID_SVXPAGE_PAGE ),
pFact->GetTabPageRangesFunc( RID_SVXPAGE_PAGE ),
- FALSE,
+ sal_False,
1 ); // nach der Verwalten-Page
if(!pActShell || 0 == ::GetHtmlMode(pWrtShell->GetView().GetDocShell()))
{
@@ -333,7 +333,7 @@ SwTemplateDlg::SwTemplateDlg(Window* pParent,
/* const SfxPoolItem* pItem;
if(SFX_ITEM_SET == rBase.GetItemSet().GetItemState(
- FN_PARAM_ACT_NUMBER, FALSE, &pItem ))
+ FN_PARAM_ACT_NUMBER, sal_False, &pItem ))
{
// pActNum = (ActNumberFormat*)((const SwPtrItem*)pItem)->GetValue();
}
@@ -366,10 +366,10 @@ short SwTemplateDlg::Ok()
{
const SfxPoolItem *pOutItem, *pExItem;
if( SFX_ITEM_SET == pExampleSet->GetItemState(
- SID_ATTR_NUMBERING_RULE, FALSE, &pExItem ) &&
+ SID_ATTR_NUMBERING_RULE, sal_False, &pExItem ) &&
( !GetOutputItemSet() ||
SFX_ITEM_SET != GetOutputItemSet()->GetItemState(
- SID_ATTR_NUMBERING_RULE, FALSE, &pOutItem ) ||
+ SID_ATTR_NUMBERING_RULE, sal_False, &pOutItem ) ||
*pExItem != *pOutItem ))
{
if( GetOutputItemSet() )
@@ -401,7 +401,7 @@ const SfxItemSet* SwTemplateDlg::GetRefreshedSet()
Beschreibung:
--------------------------------------------------------------------*/
-void SwTemplateDlg::PageCreated( USHORT nId, SfxTabPage &rPage )
+void SwTemplateDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
{
//Namen der Vorlagen und Metric setzen
String sNumCharFmt, sBulletCharFmt;
@@ -419,7 +419,7 @@ void SwTemplateDlg::PageCreated( USHORT nId, SfxTabPage &rPage )
GetDocShell()->GetItem( SID_ATTR_CHAR_FONTLIST ) ) );
aSet.Put (SvxFontListItem( aFontListItem.GetFontList(), SID_ATTR_CHAR_FONTLIST));
- UINT32 nFlags = 0;
+ sal_uInt32 nFlags = 0;
if(rPage.GetItemSet().GetParent() && 0 == (nHtmlMode & HTMLMODE_ON ))
nFlags = SVX_RELATIVE_MODE;
if( SFX_STYLE_FAMILY_CHAR == nType )
@@ -431,7 +431,7 @@ void SwTemplateDlg::PageCreated( USHORT nId, SfxTabPage &rPage )
case TP_CHAR_EXT:
{
- UINT32 nFlags = SVX_ENABLE_FLASH;
+ sal_uInt32 nFlags = SVX_ENABLE_FLASH;
if( SFX_STYLE_FAMILY_CHAR == nType )
nFlags = nFlags|SVX_PREVIEW_CHARACTER;
aSet.Put (SfxUInt32Item(SID_FLAG_TYPE, nFlags));
@@ -486,35 +486,35 @@ void SwTemplateDlg::PageCreated( USHORT nId, SfxTabPage &rPage )
aNames.Insert(new String(pBase->GetName()));
pBase = pPool->Next();
}
- for(USHORT i = 0; i < aNames.Count(); i++)
+ for(sal_uInt16 i = 0; i < aNames.Count(); i++)
rBox.InsertEntry(*aNames.GetObject(i));
}
break;
case TP_PARA_ALIGN:
{
- aSet.Put(SfxBoolItem(SID_SVXPARAALIGNTABPAGE_ENABLEJUSTIFYEXT,TRUE));
+ aSet.Put(SfxBoolItem(SID_SVXPARAALIGNTABPAGE_ENABLEJUSTIFYEXT,sal_True));
rPage.PageCreated(aSet);
}
break;
case TP_FRM_STD:
- ((SwFrmPage&)rPage).SetNewFrame( TRUE );
- ((SwFrmPage&)rPage).SetFormatUsed( TRUE );
+ ((SwFrmPage&)rPage).SetNewFrame( sal_True );
+ ((SwFrmPage&)rPage).SetFormatUsed( sal_True );
break;
case TP_FRM_ADD:
- ((SwFrmAddPage&)rPage).SetFormatUsed(TRUE);
- ((SwFrmAddPage&)rPage).SetNewFrame(TRUE);
+ ((SwFrmAddPage&)rPage).SetFormatUsed(sal_True);
+ ((SwFrmAddPage&)rPage).SetNewFrame(sal_True);
break;
case TP_FRM_WRAP:
- ((SwWrapTabPage&)rPage).SetFormatUsed( TRUE, FALSE );
+ ((SwWrapTabPage&)rPage).SetFormatUsed( sal_True, sal_False );
break;
case TP_COLUMN:
if( nType == SFX_STYLE_FAMILY_FRAME )
- ((SwColumnPage&)rPage).SetFrmMode(TRUE);
- ((SwColumnPage&)rPage).SetFormatUsed( TRUE );
+ ((SwColumnPage&)rPage).SetFrmMode(sal_True);
+ ((SwColumnPage&)rPage).SetFormatUsed( sal_True );
break;
case TP_BACKGROUND:
@@ -541,7 +541,7 @@ void SwTemplateDlg::PageCreated( USHORT nId, SfxTabPage &rPage )
List aList;
String* pNew = new String;
SwStyleNameMapper::FillUIName( RES_POOLCOLL_TEXT, *pNew );
- aList.Insert( pNew, (ULONG)0 );
+ aList.Insert( pNew, (sal_uLong)0 );
if( pWrtShell )
{
SfxStyleSheetBasePool* pStyleSheetPool = pWrtShell->
@@ -557,7 +557,7 @@ void SwTemplateDlg::PageCreated( USHORT nId, SfxTabPage &rPage )
}
aSet.Put (SfxStringListItem(SID_COLLECT_LIST, &aList));
rPage.PageCreated(aSet);
- for( USHORT i = (USHORT)aList.Count(); i; --i )
+ for( sal_uInt16 i = (sal_uInt16)aList.Count(); i; --i )
delete (String*)aList.Remove(i);
}
break;
@@ -591,16 +591,16 @@ void SwTemplateDlg::PageCreated( USHORT nId, SfxTabPage &rPage )
SwDocShell* pDocShell = ::GetActiveWrtShell()->GetView().GetDocShell();
::FillCharStyleListBox(rCharFmtLB, pDocShell);
List aList;
- for(USHORT j = 0; j < rCharFmtLB.GetEntryCount(); j++)
+ for(sal_uInt16 j = 0; j < rCharFmtLB.GetEntryCount(); j++)
{
aList.Insert( new XubString(rCharFmtLB.GetEntry(j)), LIST_APPEND );
}
aSet.Put( SfxStringListItem( SID_CHAR_FMT_LIST_BOX,&aList ) ) ;
FieldUnit eMetric = ::GetDfltMetric(0 != PTR_CAST(SwWebDocShell, pDocShell));
- aSet.Put ( SfxAllEnumItem(SID_METRIC_ITEM, static_cast< USHORT >(eMetric)));
+ aSet.Put ( SfxAllEnumItem(SID_METRIC_ITEM, static_cast< sal_uInt16 >(eMetric)));
rPage.PageCreated(aSet);
- for( USHORT i = (USHORT)aList.Count(); i; --i )
+ for( sal_uInt16 i = (sal_uInt16)aList.Count(); i; --i )
delete (XubString*)aList.Remove(i);
aList.Clear();
}
@@ -610,7 +610,7 @@ void SwTemplateDlg::PageCreated( USHORT nId, SfxTabPage &rPage )
SwDocShell* pDocShell = ::GetActiveWrtShell()->GetView().GetDocShell();
FieldUnit eMetric = ::GetDfltMetric(0 != PTR_CAST(SwWebDocShell, pDocShell));
- aSet.Put ( SfxAllEnumItem(SID_METRIC_ITEM, static_cast< USHORT >(eMetric)));
+ aSet.Put ( SfxAllEnumItem(SID_METRIC_ITEM, static_cast< sal_uInt16 >(eMetric)));
rPage.PageCreated(aSet);
}
break;
diff --git a/sw/source/ui/frmdlg/colex.cxx b/sw/source/ui/frmdlg/colex.cxx
index 9054ca38fd..375a864153 100644
--- a/sw/source/ui/frmdlg/colex.cxx
+++ b/sw/source/ui/frmdlg/colex.cxx
@@ -57,9 +57,9 @@ void SwPageExample::UpdateExample( const SfxItemSet& rSet )
{
const SvxPageItem* pPage = 0;
SfxItemPool* pPool = rSet.GetPool();
- USHORT nWhich = pPool->GetWhich( SID_ATTR_PAGE );
+ sal_uInt16 nWhich = pPool->GetWhich( SID_ATTR_PAGE );
- if ( rSet.GetItemState( nWhich, FALSE ) == SFX_ITEM_SET )
+ if ( rSet.GetItemState( nWhich, sal_False ) == SFX_ITEM_SET )
{
// Ausrichtung
pPage = (const SvxPageItem*)&rSet.Get( nWhich );
@@ -70,14 +70,14 @@ void SwPageExample::UpdateExample( const SfxItemSet& rSet )
nWhich = pPool->GetWhich( SID_ATTR_PAGE_SIZE );
- if ( rSet.GetItemState( nWhich, FALSE ) == SFX_ITEM_SET )
+ if ( rSet.GetItemState( nWhich, sal_False ) == SFX_ITEM_SET )
{
// Orientation und Size aus dem PageItem
const SvxSizeItem& rSize = (const SvxSizeItem&)rSet.Get( nWhich );
SetSize( rSize.GetSize() );
}
nWhich = RES_LR_SPACE;
- if ( rSet.GetItemState( nWhich, FALSE ) == SFX_ITEM_SET )
+ if ( rSet.GetItemState( nWhich, sal_False ) == SFX_ITEM_SET )
{
// linken und rechten Rand einstellen
const SvxLRSpaceItem& rLRSpace = (const SvxLRSpaceItem&)rSet.Get( nWhich );
@@ -93,7 +93,7 @@ void SwPageExample::UpdateExample( const SfxItemSet& rSet )
nWhich = RES_UL_SPACE;
- if ( rSet.GetItemState( nWhich, FALSE ) == SFX_ITEM_SET )
+ if ( rSet.GetItemState( nWhich, sal_False ) == SFX_ITEM_SET )
{
// oberen und unteren Rand einstellen
const SvxULSpaceItem& rULSpace = (const SvxULSpaceItem&)rSet.Get( nWhich );
@@ -111,7 +111,7 @@ void SwPageExample::UpdateExample( const SfxItemSet& rSet )
// Kopfzeilen-Attribute auswerten
const SfxPoolItem* pItem;
if( SFX_ITEM_SET == rSet.GetItemState( pPool->GetWhich( SID_ATTR_PAGE_HEADERSET),
- FALSE, &pItem ) )
+ sal_False, &pItem ) )
{
const SfxItemSet& rHeaderSet = ((SvxSetItem*)pItem)->GetItemSet();
const SfxBoolItem& rHeaderOn =
@@ -131,7 +131,7 @@ void SwPageExample::UpdateExample( const SfxItemSet& rSet )
SetHdDist( rUL.GetLower() );
SetHdLeft( rLR.GetLeft() );
SetHdRight( rLR.GetRight() );
- SetHeader( TRUE );
+ SetHeader( sal_True );
if ( rHeaderSet.GetItemState( RES_BACKGROUND ) == SFX_ITEM_SET )
{
const SvxBrushItem& rItem =
@@ -146,11 +146,11 @@ void SwPageExample::UpdateExample( const SfxItemSet& rSet )
}
}
else
- SetHeader( FALSE );
+ SetHeader( sal_False );
}
if( SFX_ITEM_SET == rSet.GetItemState( pPool->GetWhich( SID_ATTR_PAGE_FOOTERSET),
- FALSE, &pItem ) )
+ sal_False, &pItem ) )
{
const SfxItemSet& rFooterSet = ((SvxSetItem*)pItem)->GetItemSet();
const SfxBoolItem& rFooterOn =
@@ -170,7 +170,7 @@ void SwPageExample::UpdateExample( const SfxItemSet& rSet )
SetFtDist( rUL.GetUpper() );
SetFtLeft( rLR.GetLeft() );
SetFtRight( rLR.GetRight() );
- SetFooter( TRUE );
+ SetFooter( sal_True );
if( rFooterSet.GetItemState( RES_BACKGROUND ) == SFX_ITEM_SET )
{
const SvxBrushItem& rItem =
@@ -185,10 +185,10 @@ void SwPageExample::UpdateExample( const SfxItemSet& rSet )
}
}
else
- SetFooter( FALSE );
+ SetFooter( sal_False );
}
if( SFX_ITEM_SET == rSet.GetItemState( RES_BACKGROUND,
- FALSE, &pItem ) )
+ sal_False, &pItem ) )
{
SetColor( ( (const SvxBrushItem*)pItem )->GetColor() );
const Graphic* pGrf = ( (const SvxBrushItem*)pItem )->GetGraphic();
@@ -210,11 +210,11 @@ void SwPageExample::UpdateExample( const SfxItemSet& rSet )
void SwColExample::DrawPage( const Point& rOrg,
- const BOOL bSecond,
- const BOOL bEnabled )
+ const sal_Bool bSecond,
+ const sal_Bool bEnabled )
{
SwPageExample::DrawPage( rOrg, bSecond, bEnabled );
- USHORT nColumnCount;
+ sal_uInt16 nColumnCount;
if( pColMgr && 0 != (nColumnCount = pColMgr->GetCount()))
{
long nL = GetLeft();
@@ -247,18 +247,18 @@ void SwColExample::DrawPage( const Point& rOrg,
SetFillColor( GetColor() );
// #97495# make sure that the automatic column widht's are always equal
- BOOL bAutoWidth = pColMgr->IsAutoWidth();
+ sal_Bool bAutoWidth = pColMgr->IsAutoWidth();
sal_Int32 nAutoColWidth = 0;
if(bAutoWidth)
{
sal_Int32 nColumnWidthSum = 0;
- USHORT i;
+ sal_uInt16 i;
for(i = 0; i < nColumnCount; ++i)
nColumnWidthSum += pColMgr->GetColWidth( i );
nAutoColWidth = nColumnWidthSum / nColumnCount;
}
- USHORT i;
+ sal_uInt16 i;
for( i = 0; i < nColumnCount; i++)
{
if(!bAutoWidth)
@@ -326,7 +326,7 @@ SwColumnOnlyExample::SwColumnOnlyExample( Window* pParent, const ResId& rResId)
SetBorderStyle( WINDOW_BORDER_MONO );
m_aFrmSize = SvxPaperInfo::GetPaperSize(PAPER_A4);// DIN A4
- ::FitToActualSize(m_aCols, (USHORT)m_aFrmSize.Width());
+ ::FitToActualSize(m_aCols, (sal_uInt16)m_aFrmSize.Width());
long nHeight = m_aFrmSize.Height();
Fraction aScale( m_aWinSize.Height(), nHeight );
@@ -377,12 +377,12 @@ void SwColumnOnlyExample::Paint( const Rectangle& /*rRect*/ )
long nLength = aLogSize.Height() - 2 * aTL.Y();
Point aUp( aTL );
Point aDown( aTL.X(), nLength );
- BOOL bLines = FALSE;
+ sal_Bool bLines = sal_False;
if(m_aCols.GetLineAdj() != COLADJ_NONE)
{
- bLines = TRUE;
+ bLines = sal_True;
- USHORT nPercent = m_aCols.GetLineHeight();
+ sal_uInt16 nPercent = m_aCols.GetLineHeight();
if( nPercent != 100 )
{
nLength -= nLength * nPercent / 100;
@@ -400,14 +400,14 @@ void SwColumnOnlyExample::Paint( const Rectangle& /*rRect*/ )
}
const SwColumns& rCols = m_aCols.GetColumns();
- USHORT nColCount = rCols.Count();
+ sal_uInt16 nColCount = rCols.Count();
if( nColCount )
{
DrawRect(aRect);
SetFillColor( rFieldColor );
Rectangle aFrmRect(aTL, m_aFrmSize);
long nSum = aTL.X();
- for(USHORT i = 0; i < nColCount; i++)
+ for(sal_uInt16 i = 0; i < nColCount; i++)
{
SwColumn* pCol = rCols[i];
aFrmRect.Left() = nSum + pCol->GetLeft();//nSum + pCol->GetLeft() + aTL.X();
@@ -418,7 +418,7 @@ void SwColumnOnlyExample::Paint( const Rectangle& /*rRect*/ )
if(bLines )
{
nSum = aTL.X();
- for(USHORT i = 0; i < nColCount - 1; i++)
+ for(sal_uInt16 i = 0; i < nColCount - 1; i++)
{
nSum += rCols[i]->GetWishWidth();
aUp.X() = nSum;
@@ -437,32 +437,32 @@ void SwColumnOnlyExample::Paint( const Rectangle& /*rRect*/ )
void SwColumnOnlyExample::SetColumns(const SwFmtCol& rCol)
{
m_aCols = rCol;
- USHORT nWishSum = m_aCols.GetWishWidth();
+ sal_uInt16 nWishSum = m_aCols.GetWishWidth();
long nFrmWidth = m_aFrmSize.Width();
SwColumns& rCols = m_aCols.GetColumns();
- USHORT nColCount = rCols.Count();
+ sal_uInt16 nColCount = rCols.Count();
- for(USHORT i = 0; i < nColCount; i++)
+ for(sal_uInt16 i = 0; i < nColCount; i++)
{
SwColumn* pCol = rCols[i];
long nWish = pCol->GetWishWidth();
nWish *= nFrmWidth;
nWish /= nWishSum;
- pCol->SetWishWidth((USHORT)nWish);
+ pCol->SetWishWidth((sal_uInt16)nWish);
long nLeft = pCol->GetLeft();
nLeft *= nFrmWidth;
nLeft /= nWishSum;
- pCol->SetLeft((USHORT)nLeft);
+ pCol->SetLeft((sal_uInt16)nLeft);
long nRight = pCol->GetRight();
nRight *= nFrmWidth;
nRight /= nWishSum;
- pCol->SetRight((USHORT)nRight);
+ pCol->SetRight((sal_uInt16)nRight);
}
// #97495# make sure that the automatic column width's are always equal
if(nColCount && m_aCols.IsOrtho())
{
sal_Int32 nColumnWidthSum = 0;
- USHORT i;
+ sal_uInt16 i;
for(i = 0; i < nColCount; ++i)
{
SwColumn* pCol = rCols[i];
@@ -473,7 +473,7 @@ void SwColumnOnlyExample::SetColumns(const SwFmtCol& rCol)
for(i = 0; i < nColCount; ++i)
{
SwColumn* pCol = rCols[i];
- pCol->SetWishWidth( static_cast< USHORT >(nColumnWidthSum + pCol->GetRight() + pCol->GetLeft()));
+ pCol->SetWishWidth( static_cast< sal_uInt16 >(nColumnWidthSum + pCol->GetRight() + pCol->GetLeft()));
}
}
}
@@ -490,8 +490,8 @@ SwPageGridExample::~SwPageGridExample()
#define MAX_ROWS 10
#define MAX_LINES 15
void SwPageGridExample::DrawPage( const Point& rOrg,
- const BOOL bSecond,
- const BOOL bEnabled )
+ const sal_Bool bSecond,
+ const sal_Bool bEnabled )
{
SwPageExample::DrawPage(rOrg, bSecond, bEnabled);
if(pGridItem && pGridItem->GetGridType())
@@ -596,9 +596,9 @@ void SwPageGridExample::UpdateExample( const SfxItemSet& rSet )
{
DELETEZ(pGridItem);
//get the grid information
- if(SFX_ITEM_AVAILABLE <= rSet.GetItemState(RES_TEXTGRID, TRUE))
+ if(SFX_ITEM_AVAILABLE <= rSet.GetItemState(RES_TEXTGRID, sal_True))
pGridItem = (SwTextGridItem*)((const SwTextGridItem&)rSet.Get(RES_TEXTGRID)).Clone();
- if( SFX_ITEM_AVAILABLE <= rSet.GetItemState( RES_FRAMEDIR, TRUE ))
+ if( SFX_ITEM_AVAILABLE <= rSet.GetItemState( RES_FRAMEDIR, sal_True ))
{
const SvxFrameDirectionItem& rDirItem =
(const SvxFrameDirectionItem&)rSet.Get(RES_FRAMEDIR);
diff --git a/sw/source/ui/frmdlg/colmgr.cxx b/sw/source/ui/frmdlg/colmgr.cxx
index 5346a1fa41..cd561861b4 100644
--- a/sw/source/ui/frmdlg/colmgr.cxx
+++ b/sw/source/ui/frmdlg/colmgr.cxx
@@ -45,12 +45,12 @@
-void FitToActualSize(SwFmtCol& rCol, USHORT nWidth)
+void FitToActualSize(SwFmtCol& rCol, sal_uInt16 nWidth)
{
- const USHORT nCount = rCol.GetColumns().Count();
- for(USHORT i = 0; i < nCount; ++i)
+ const sal_uInt16 nCount = rCol.GetColumns().Count();
+ for(sal_uInt16 i = 0; i < nCount; ++i)
{
- const USHORT nTmp = rCol.CalcColWidth(i, nWidth);
+ const sal_uInt16 nTmp = rCol.CalcColWidth(i, nWidth);
rCol.GetColumns()[i]->SetWishWidth(nTmp);
}
rCol.SetWishWidth(nWidth);
@@ -64,7 +64,7 @@ void FitToActualSize(SwFmtCol& rCol, USHORT nWidth)
-void SwColMgr::SetCount(USHORT nCount, USHORT nGutterWidth)
+void SwColMgr::SetCount(sal_uInt16 nCount, sal_uInt16 nGutterWidth)
{
aFmtCol.Init(nCount, nGutterWidth, nWidth);
aFmtCol.SetWishWidth(nWidth);
@@ -73,9 +73,9 @@ void SwColMgr::SetCount(USHORT nCount, USHORT nGutterWidth)
-USHORT SwColMgr::GetGutterWidth( USHORT nPos ) const
+sal_uInt16 SwColMgr::GetGutterWidth( sal_uInt16 nPos ) const
{
- USHORT nRet;
+ sal_uInt16 nRet;
if(nPos == USHRT_MAX )
nRet = GetCount() > 1 ? aFmtCol.GetGutterWidth() : DEF_GUTTER_WIDTH;
else
@@ -92,7 +92,7 @@ USHORT SwColMgr::GetGutterWidth( USHORT nPos ) const
--------------------------------------------------*/
-void SwColMgr::SetGutterWidth(USHORT nGutterWidth, USHORT nPos )
+void SwColMgr::SetGutterWidth(sal_uInt16 nGutterWidth, sal_uInt16 nPos )
{
if(nPos == USHRT_MAX)
aFmtCol.SetGutterWidth(nGutterWidth, nWidth);
@@ -100,7 +100,7 @@ void SwColMgr::SetGutterWidth(USHORT nGutterWidth, USHORT nPos )
{
DBG_ASSERT(nPos < GetCount() - 1, "Spalte ueberindiziert" );
SwColumns& rCols = aFmtCol.GetColumns();
- USHORT nGutterWidth2 = nGutterWidth / 2;
+ sal_uInt16 nGutterWidth2 = nGutterWidth / 2;
rCols.GetObject(nPos)->SetRight(nGutterWidth2);
rCols.GetObject(nPos + 1)->SetLeft(nGutterWidth2);
}
@@ -122,7 +122,7 @@ short SwColMgr::GetLineHeightPercent() const
void SwColMgr::SetLineHeightPercent(short nPercent)
{
ASSERT(nPercent <= 100, LineHeight darf nur bis 100 % gross sein);
- aFmtCol.SetLineHeight((BYTE)nPercent);
+ aFmtCol.SetLineHeight((sal_uInt8)nPercent);
}
/*------------------------------------------------------------------------
Beschreibung: Spaltenbreite
@@ -130,7 +130,7 @@ void SwColMgr::SetLineHeightPercent(short nPercent)
-USHORT SwColMgr::GetColWidth(USHORT nIdx) const
+sal_uInt16 SwColMgr::GetColWidth(sal_uInt16 nIdx) const
{
ASSERT(nIdx < GetCount(), Spaltenarray ueberindiziert.);
return aFmtCol.CalcPrtColWidth(nIdx, nWidth);
@@ -138,7 +138,7 @@ USHORT SwColMgr::GetColWidth(USHORT nIdx) const
-void SwColMgr::SetColWidth(USHORT nIdx, USHORT nWd)
+void SwColMgr::SetColWidth(sal_uInt16 nIdx, sal_uInt16 nWd)
{
ASSERT(nIdx < GetCount(), Spaltenarray ueberindiziert.);
aFmtCol.GetColumns()[nIdx]->SetWishWidth(nWd);
@@ -151,7 +151,7 @@ void SwColMgr::SetColWidth(USHORT nIdx, USHORT nWd)
-void SwColMgr::SetActualWidth(USHORT nW)
+void SwColMgr::SetActualWidth(sal_uInt16 nW)
{
nWidth = nW;
::FitToActualSize(aFmtCol, nW);
@@ -163,18 +163,18 @@ void SwColMgr::SetActualWidth(USHORT nW)
-SwColMgr::SwColMgr(const SfxItemSet& rSet, USHORT nActWidth) :
+SwColMgr::SwColMgr(const SfxItemSet& rSet, sal_uInt16 nActWidth) :
aFmtCol((const SwFmtCol&)rSet.Get(RES_COL)),
nWidth(nActWidth)
{
if(nWidth == USHRT_MAX)
{
- nWidth = (USHORT)((const SwFmtFrmSize&)rSet.Get(RES_FRM_SIZE)).GetWidth();
+ nWidth = (sal_uInt16)((const SwFmtFrmSize&)rSet.Get(RES_FRM_SIZE)).GetWidth();
if (nWidth < MINLAY)
nWidth = USHRT_MAX;
const SvxLRSpaceItem &rLR = (const SvxLRSpaceItem&)rSet.Get(RES_LR_SPACE);
- nWidth = nWidth - (USHORT)rLR.GetLeft();
- nWidth = nWidth - (USHORT)rLR.GetRight();
+ nWidth = nWidth - (sal_uInt16)rLR.GetLeft();
+ nWidth = nWidth - (sal_uInt16)rLR.GetRight();
}
::FitToActualSize(aFmtCol, nWidth);
}
diff --git a/sw/source/ui/frmdlg/column.cxx b/sw/source/ui/frmdlg/column.cxx
index 79f727aa08..06c4349c7a 100644
--- a/sw/source/ui/frmdlg/column.cxx
+++ b/sw/source/ui/frmdlg/column.cxx
@@ -77,7 +77,7 @@ SV_IMPL_PTRARR( SwColumns, SwColumnPtr )
Beschreibung: Statische Daten
--------------------------------------------------------------------*/
-static const USHORT __FAR_DATA nLines[] = {
+static const sal_uInt16 __FAR_DATA nLines[] = {
DEF_LINE_WIDTH_0,
DEF_LINE_WIDTH_1,
DEF_LINE_WIDTH_2,
@@ -85,13 +85,13 @@ static const USHORT __FAR_DATA nLines[] = {
DEF_LINE_WIDTH_4
};
-static const USHORT nLineCount = sizeof(nLines) / sizeof(nLines[0]);
-static const USHORT nVisCols = 3;
+static const sal_uInt16 nLineCount = sizeof(nLines) / sizeof(nLines[0]);
+static const sal_uInt16 nVisCols = 3;
-inline BOOL IsMarkInSameSection( SwWrtShell& rWrtSh, const SwSection* pSect )
+inline sal_Bool IsMarkInSameSection( SwWrtShell& rWrtSh, const SwSection* pSect )
{
rWrtSh.SwapPam();
- BOOL bRet = pSect == rWrtSh.GetCurrSection();
+ sal_Bool bRet = pSect == rWrtSh.GetCurrSection();
rWrtSh.SwapPam();
return bRet;
}
@@ -114,10 +114,10 @@ SwColumnDlg::SwColumnDlg(Window* pParent, SwWrtShell& rSh) :
pFrameSet(0),
nOldSelection(0),
nSelectionWidth(0),
- bPageChanged(FALSE),
- bSectionChanged(FALSE),
- bSelSectionChanged(FALSE),
- bFrameChanged(FALSE)
+ bPageChanged(sal_False),
+ bSectionChanged(sal_False),
+ bSelSectionChanged(sal_False),
+ bFrameChanged(sal_False)
{
FreeResource();
@@ -127,13 +127,13 @@ SwColumnDlg::SwColumnDlg(Window* pParent, SwWrtShell& rSh) :
nSelectionWidth = aRect.Width();
SfxItemSet* pColPgSet = 0;
- static USHORT __READONLY_DATA aSectIds[] = { RES_COL, RES_COL,
+ static sal_uInt16 __READONLY_DATA aSectIds[] = { RES_COL, RES_COL,
RES_FRM_SIZE, RES_FRM_SIZE,
RES_COLUMNBALANCE, RES_FRAMEDIR,
0 };
const SwSection* pCurrSection = rWrtShell.GetCurrSection();
- USHORT nFullSectCnt = rWrtShell.GetFullSelectedSectionCount();
+ sal_uInt16 nFullSectCnt = rWrtShell.GetFullSelectedSectionCount();
if( pCurrSection && ( !rWrtShell.HasSelection() || 0 != nFullSectCnt ))
{
nSelectionWidth = rSh.GetSectionWidth(*pCurrSection->GetFmt());
@@ -175,7 +175,7 @@ SwColumnDlg::SwColumnDlg(Window* pParent, SwWrtShell& rSh) :
aApplyToLB.RemoveEntry(aApplyToLB.GetEntryPos( (void*) LISTBOX_FRAME ));
- USHORT nPagePos = aApplyToLB.GetEntryPos( (void*) LISTBOX_PAGE );
+ sal_uInt16 nPagePos = aApplyToLB.GetEntryPos( (void*) LISTBOX_PAGE );
const SwPageDesc* pPageDesc = rWrtShell.GetSelectedPageDescs();
if( pPageDesc )
{
@@ -256,19 +256,19 @@ IMPL_LINK(SwColumnDlg, ObjectHdl, ListBox*, pBox)
break;
case LISTBOX_SECTION :
pSet = pSectionSet;
- bSectionChanged = TRUE;
+ bSectionChanged = sal_True;
break;
case LISTBOX_SECTIONS :
pSet = pSectionSet;
- bSelSectionChanged = TRUE;
+ bSelSectionChanged = sal_True;
break;
case LISTBOX_PAGE :
pSet = pPageSet;
- bPageChanged = TRUE;
+ bPageChanged = sal_True;
break;
case LISTBOX_FRAME:
pSet = pFrameSet;
- bFrameChanged = TRUE;
+ bFrameChanged = sal_True;
break;
}
if(pBox)
@@ -299,10 +299,10 @@ IMPL_LINK(SwColumnDlg, ObjectHdl, ListBox*, pBox)
break;
}
- BOOL bIsSection = pSet == pSectionSet || pSet == pSelectionSet;
+ sal_Bool bIsSection = pSet == pSectionSet || pSet == pSelectionSet;
pTabPage->ShowBalance(bIsSection);
pTabPage->SetInSection(bIsSection);
- pTabPage->SetFrmMode(TRUE);
+ pTabPage->SetFrmMode(sal_True);
pTabPage->SetPageWidth(nWidth);
if( pSet )
pTabPage->Reset(*pSet);
@@ -322,19 +322,19 @@ IMPL_LINK(SwColumnDlg, OkHdl, OKButton*, EMPTYARG)
break;
case LISTBOX_SECTION :
pSet = pSectionSet;
- bSectionChanged = TRUE;
+ bSectionChanged = sal_True;
break;
case LISTBOX_SECTIONS :
pSet = pSectionSet;
- bSelSectionChanged = TRUE;
+ bSelSectionChanged = sal_True;
break;
case LISTBOX_PAGE :
pSet = pPageSet;
- bPageChanged = TRUE;
+ bPageChanged = sal_True;
break;
case LISTBOX_FRAME:
pSet = pFrameSet;
- bFrameChanged = TRUE;
+ bFrameChanged = sal_True;
break;
}
pTabPage->FillItemSet(*pSet);
@@ -353,7 +353,7 @@ IMPL_LINK(SwColumnDlg, OkHdl, OKButton*, EMPTYARG)
{
const SwSection* pCurrSection = rWrtShell.GetCurrSection();
const SwSectionFmt* pFmt = pCurrSection->GetFmt();
- USHORT nNewPos = rWrtShell.GetSectionFmtPos( *pFmt );
+ sal_uInt16 nNewPos = rWrtShell.GetSectionFmtPos( *pFmt );
SwSectionData aData(*pCurrSection);
rWrtShell.UpdateSection( nNewPos, aData, pSectionSet );
}
@@ -366,7 +366,7 @@ IMPL_LINK(SwColumnDlg, OkHdl, OKButton*, EMPTYARG)
if(pPageSet && SFX_ITEM_SET == pPageSet->GetItemState(RES_COL) && bPageChanged)
{
// aktuellen PageDescriptor ermitteln und damit den Set fuellen
- const USHORT nCurIdx = rWrtShell.GetCurPageDesc();
+ const sal_uInt16 nCurIdx = rWrtShell.GetCurPageDesc();
SwPageDesc aPageDesc(rWrtShell.GetPageDesc(nCurIdx));
SwFrmFmt &rFmt = aPageDesc.GetMaster();
rFmt.SetFmtAttr(pPageSet->Get(RES_COL));
@@ -399,15 +399,15 @@ IMPL_LINK(SwColumnDlg, OkHdl, OKButton*, EMPTYARG)
#if OSL_DEBUG_LEVEL < 2
inline
#endif
-USHORT GetMaxWidth( SwColMgr* pColMgr, USHORT nCols )
+sal_uInt16 GetMaxWidth( SwColMgr* pColMgr, sal_uInt16 nCols )
{
- USHORT nMax = pColMgr->GetActualSize();
+ sal_uInt16 nMax = pColMgr->GetActualSize();
if( --nCols )
nMax -= pColMgr->GetGutterWidth() * nCols;
return nMax;
}
-static USHORT __FAR_DATA aPageRg[] = {
+static sal_uInt16 __FAR_DATA aPageRg[] = {
RES_COL, RES_COL,
0
};
@@ -417,10 +417,10 @@ DBG_NAME(columnhdl)
-USHORT lcl_LineWidthToPos(ULONG nWidth)
+sal_uInt16 lcl_LineWidthToPos(sal_uLong nWidth)
{
- const USHORT nUShortWidth = (USHORT)nWidth;
- for(USHORT i = 0; i < nLineCount; ++i)
+ const sal_uInt16 nUShortWidth = (sal_uInt16)nWidth;
+ for(sal_uInt16 i = 0; i < nLineCount; ++i)
if(nUShortWidth == nLines[i])
return i;
return 0;
@@ -432,10 +432,10 @@ void SwColumnPage::ResetColWidth()
{
if( nCols )
{
- USHORT nWidth = GetMaxWidth( pColMgr, nCols );
+ sal_uInt16 nWidth = GetMaxWidth( pColMgr, nCols );
nWidth = nWidth / nCols;
- for(USHORT i = 0; i < nCols; ++i)
+ for(sal_uInt16 i = 0; i < nCols; ++i)
nColWidth[i] = (long) nWidth;
}
@@ -495,12 +495,12 @@ SwColumnPage::SwColumnPage(Window *pParent, const SfxItemSet &rSet)
nFirstVis(0),
nMinWidth(MINLAY),
pModifiedField(0),
- bFormat(FALSE),
- bFrm(FALSE),
- bHtmlMode(FALSE),
- bLockUpdate(FALSE)
+ bFormat(sal_False),
+ bFrm(sal_False),
+ bHtmlMode(sal_False),
+ bLockUpdate(sal_False)
{
- USHORT i;
+ sal_uInt16 i;
FreeResource();
SetExchangeSupport();
@@ -590,11 +590,11 @@ void SwColumnPage::SetPageWidth(long nPageWidth)
void SwColumnPage::Reset(const SfxItemSet &rSet)
{
- USHORT nHtmlMode = ::GetHtmlMode((const SwDocShell*)SfxObjectShell::Current());
+ sal_uInt16 nHtmlMode = ::GetHtmlMode((const SwDocShell*)SfxObjectShell::Current());
if(nHtmlMode & HTMLMODE_ON)
{
- bHtmlMode = TRUE;
- aAutoWidthBox.Enable(FALSE);
+ bHtmlMode = sal_True;
+ aAutoWidthBox.Enable(sal_False);
}
FieldUnit aMetric = ::GetDfltMetric(bHtmlMode);
SetMetric(aEd1, aMetric);
@@ -606,8 +606,8 @@ void SwColumnPage::Reset(const SfxItemSet &rSet)
delete pColMgr;
pColMgr = new SwColMgr(rSet);
nCols = pColMgr->GetCount() ;
- aCLNrEdt.SetMax(Max((USHORT)aCLNrEdt.GetMax(), (USHORT)nCols));
- aCLNrEdt.SetLast(Max(nCols,(USHORT)aCLNrEdt.GetMax()));
+ aCLNrEdt.SetMax(Max((sal_uInt16)aCLNrEdt.GetMax(), (sal_uInt16)nCols));
+ aCLNrEdt.SetLast(Max(nCols,(sal_uInt16)aCLNrEdt.GetMax()));
if(bFrm)
{
@@ -617,16 +617,16 @@ void SwColumnPage::Reset(const SfxItemSet &rSet)
{
const SwFmtFrmSize& rSize = (const SwFmtFrmSize&)rSet.Get(RES_FRM_SIZE);
const SvxBoxItem& rBox = (const SvxBoxItem&) rSet.Get(RES_BOX);
- pColMgr->SetActualWidth((USHORT)rSize.GetSize().Width() - rBox.GetDistance());
+ pColMgr->SetActualWidth((sal_uInt16)rSize.GetSize().Width() - rBox.GetDistance());
}
}
if(aBalanceColsCB.IsVisible())
{
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == rSet.GetItemState( RES_COLUMNBALANCE, FALSE, &pItem ))
+ if( SFX_ITEM_SET == rSet.GetItemState( RES_COLUMNBALANCE, sal_False, &pItem ))
aBalanceColsCB.Check(!((const SwFmtNoBalancedColumns*)pItem)->GetValue());
else
- aBalanceColsCB.Check( TRUE );
+ aBalanceColsCB.Check( sal_True );
}
//text direction
@@ -634,7 +634,7 @@ void SwColumnPage::Reset(const SfxItemSet &rSet)
{
const SvxFrameDirectionItem& rItem = (const SvxFrameDirectionItem&)rSet.Get(RES_FRAMEDIR);
sal_uInt32 nVal = rItem.GetValue();
- USHORT nPos = aTextDirectionLB.GetEntryPos( (void*) nVal );
+ sal_uInt16 nPos = aTextDirectionLB.GetEntryPos( (void*) nVal );
aTextDirectionLB.SelectEntryPos( nPos );
aTextDirectionLB.SaveValue();
}
@@ -660,7 +660,7 @@ SfxTabPage* SwColumnPage::Create(Window *pParent, const SfxItemSet &rSet)
-BOOL SwColumnPage::FillItemSet(SfxItemSet &rSet)
+sal_Bool SwColumnPage::FillItemSet(SfxItemSet &rSet)
{
if(aCLNrEdt.HasChildPathFocus())
aCLNrEdt.GetDownHdl().Call(&aCLNrEdt);
@@ -678,7 +678,7 @@ BOOL SwColumnPage::FillItemSet(SfxItemSet &rSet)
{
rSet.Put(SwFmtNoBalancedColumns(!aBalanceColsCB.IsChecked() ));
}
- USHORT nPos;
+ sal_uInt16 nPos;
if( aTextDirectionLB.IsVisible() &&
( nPos = aTextDirectionLB.GetSelectEntryPos() ) !=
aTextDirectionLB.GetSavedValue() )
@@ -686,7 +686,7 @@ BOOL SwColumnPage::FillItemSet(SfxItemSet &rSet)
sal_uInt32 nDirection = (sal_uInt32)(sal_IntPtr)aTextDirectionLB.GetEntryData( nPos );
rSet.Put( SvxFrameDirectionItem( (SvxFrameDirection)nDirection, RES_FRAMEDIR));
}
- return TRUE;
+ return sal_True;
}
/*--------------------------------------------------------------------
@@ -703,15 +703,15 @@ IMPL_LINK( SwColumnPage, UpdateColMgr, void *, /*pField*/ )
// Ermitteln, ob die schmalste Spalte zu schmal ist
// fuer den eingestellten Spaltenabstand
long nMin = nColWidth[0];
- USHORT i;
+ sal_uInt16 i;
for( i = 1; i < nCols; ++i)
nMin = Min(nMin, nColWidth[i]);
- BOOL bAutoWidth = aAutoWidthBox.IsChecked();
+ sal_Bool bAutoWidth = aAutoWidthBox.IsChecked();
if(!bAutoWidth)
{
- pColMgr->SetAutoWidth(FALSE);
+ pColMgr->SetAutoWidth(sal_False);
// falls der Benutzer nicht die Gesamtbreite vergeben hat,
// den fehlenden Betrag auf die letzte Spalte addieren.
long nSum = 0;
@@ -727,19 +727,19 @@ IMPL_LINK( SwColumnPage, UpdateColMgr, void *, /*pField*/ )
if( nSum < nMaxW )
nColWidth[nCols - 1] += nMaxW - nSum;
- pColMgr->SetColWidth( 0, static_cast< USHORT >(nColWidth[0] + (USHORT)nColDist[0]/2) );
+ pColMgr->SetColWidth( 0, static_cast< sal_uInt16 >(nColWidth[0] + (sal_uInt16)nColDist[0]/2) );
for( i = 1; i < nCols-1; ++i )
{
long nActDist = (nColDist[i] + nColDist[i - 1]) / 2;
- pColMgr->SetColWidth( i, (USHORT)nColWidth[i] + (USHORT)nActDist );
+ pColMgr->SetColWidth( i, (sal_uInt16)nColWidth[i] + (sal_uInt16)nActDist );
}
- pColMgr->SetColWidth( nCols-1, static_cast< USHORT >(nColWidth[nCols-1] + nColDist[nCols -2]/2) );
+ pColMgr->SetColWidth( nCols-1, static_cast< sal_uInt16 >(nColWidth[nCols-1] + nColDist[nCols -2]/2) );
}
// keins ist ausgeschaltet
- const USHORT nPos = aLineTypeDLB.GetSelectEntryPos();
- BOOL bEnable = 0 != nPos;
+ const sal_uInt16 nPos = aLineTypeDLB.GetSelectEntryPos();
+ sal_Bool bEnable = 0 != nPos;
aLineHeightEdit.Enable( bEnable );
aLineHeightLbl.Enable( bEnable );
if( !bEnable )
@@ -792,12 +792,12 @@ void SwColumnPage::Init()
{
aCLNrEdt.SetValue(nCols);
- BOOL bAutoWidth = pColMgr->IsAutoWidth() || bHtmlMode;
+ sal_Bool bAutoWidth = pColMgr->IsAutoWidth() || bHtmlMode;
aAutoWidthBox.Check( bAutoWidth );
sal_Int32 nColumnWidthSum = 0;
// Setzen der Breiten
- USHORT i;
+ sal_uInt16 i;
for(i = 0; i < nCols; ++i)
{
nColWidth[i] = pColMgr->GetColWidth(i);
@@ -828,7 +828,7 @@ void SwColumnPage::Init()
aLineTypeDLB.SelectEntryPos( lcl_LineWidthToPos(( pColMgr->GetLineWidth() )) + 1);
aLineHeightEdit.SetValue( pColMgr->GetLineHeightPercent() );
}
- aLinePosDLB.SelectEntryPos( static_cast< USHORT >(eAdj - 1) );
+ aLinePosDLB.SelectEntryPos( static_cast< sal_uInt16 >(eAdj - 1) );
}
else
{
@@ -861,13 +861,13 @@ void SwColumnPage::Init()
void SwColumnPage::UpdateCols()
{
- BOOL bEnableBtns= FALSE;
- BOOL bEnable12 = FALSE;
- BOOL bEnable3 = FALSE;
- const BOOL bEdit = !aAutoWidthBox.IsChecked();
+ sal_Bool bEnableBtns= sal_False;
+ sal_Bool bEnable12 = sal_False;
+ sal_Bool bEnable3 = sal_False;
+ const sal_Bool bEdit = !aAutoWidthBox.IsChecked();
if ( nCols > nVisCols )
{
- bEnableBtns = TRUE && !bHtmlMode;
+ bEnableBtns = sal_True && !bHtmlMode;
bEnable12 = bEnable3 = bEdit;
}
else if( bEdit )
@@ -875,8 +875,8 @@ void SwColumnPage::UpdateCols()
// hier gibt es absichtlich kaum noch breaks
switch(nCols)
{
- case 3: bEnable3 = TRUE;
- case 2: bEnable12= TRUE; break;
+ case 3: bEnable3 = sal_True;
+ case 2: bEnable12= sal_True; break;
default: /* do nothing */;
}
}
@@ -891,11 +891,11 @@ void SwColumnPage::UpdateCols()
aBtnUp.Enable( bEnableBtns );
aBtnDown.Enable( bEnableBtns );
- const BOOL bEnable = nCols > 1;
+ const sal_Bool bEnable = nCols > 1;
if( !bEnable )
{
- aLinePosDLB.Enable( FALSE );
- aLinePosLbl.Enable( FALSE );
+ aLinePosDLB.Enable( sal_False );
+ aLinePosLbl.Enable( sal_False );
}
aLineHeightEdit.Enable( bEnable );
aLineHeightLbl.Enable( bEnable );
@@ -904,7 +904,7 @@ void SwColumnPage::UpdateCols()
aAutoWidthBox.Enable( bEnable && !bHtmlMode );
}
-void SwColumnPage::SetLabels( USHORT nVis )
+void SwColumnPage::SetLabels( sal_uInt16 nVis )
{
String sLbl( '~' );
@@ -931,7 +931,7 @@ void SwColumnPage::SetLabels( USHORT nVis )
IMPL_LINK( SwColumnPage, ColModify, NumericField *, pNF )
{
- nCols = (USHORT)aCLNrEdt.GetValue();
+ nCols = (sal_uInt16)aCLNrEdt.GetValue();
//#107890# the handler is also called from LoseFocus()
//then no change has been made and thus no action should be taken
// #i17816# changing the displayed types within the ValueSet
@@ -942,8 +942,8 @@ IMPL_LINK( SwColumnPage, ColModify, NumericField *, pNF )
if(pNF)
aDefaultVS.SetNoSelection();
long nDist = static_cast< long >(aDistEd1.DenormalizePercent(aDistEd1.GetValue(FUNIT_TWIP)));
- pColMgr->SetCount(nCols, (USHORT)nDist);
- for(USHORT i = 0; i < nCols; i++)
+ pColMgr->SetCount(nCols, (sal_uInt16)nDist);
+ for(sal_uInt16 i = 0; i < nCols; i++)
nColDist[i] = nDist;
nFirstVis = 0;
SetLabels( nFirstVis );
@@ -974,7 +974,7 @@ IMPL_LINK( SwColumnPage, GapModify, PercentField *, pFld )
return 0;
if(aAutoWidthBox.IsChecked())
{
- USHORT nMaxGap = pColMgr->GetActualSize() - nCols * MINLAY;
+ sal_uInt16 nMaxGap = pColMgr->GetActualSize() - nCols * MINLAY;
DBG_ASSERT(nCols, "Abstand kann nicht ohne Spalten eingestellt werden");
nMaxGap /= nCols - 1;
if(nActValue > nMaxGap)
@@ -982,8 +982,8 @@ IMPL_LINK( SwColumnPage, GapModify, PercentField *, pFld )
nActValue = nMaxGap;
aDistEd1.SetPrcntValue(aDistEd1.NormalizePercent(nMaxGap), FUNIT_TWIP);
}
- pColMgr->SetGutterWidth((USHORT)nActValue);
- for(USHORT i = 0; i < nCols; i++)
+ pColMgr->SetGutterWidth((sal_uInt16)nActValue);
+ for(sal_uInt16 i = 0; i < nCols; i++)
nColDist[i] = nActValue;
ResetColWidth();
@@ -992,7 +992,7 @@ IMPL_LINK( SwColumnPage, GapModify, PercentField *, pFld )
else
{
- USHORT nOffset = 0;
+ sal_uInt16 nOffset = 0;
if(pFld == &aDistEd2)
{
nOffset = 1;
@@ -1028,9 +1028,9 @@ IMPL_LINK( SwColumnPage, GapModify, PercentField *, pFld )
nColWidth[nFirstVis + nOffset + 1] = nRight;
nColDist[nFirstVis + nOffset] += nDiff;
- pColMgr->SetColWidth( nFirstVis + nOffset, USHORT(nLeft) );
- pColMgr->SetColWidth( nFirstVis + nOffset + 1, USHORT(nRight) );
- pColMgr->SetGutterWidth( USHORT(nColDist[nFirstVis + nOffset]), nFirstVis + nOffset );
+ pColMgr->SetColWidth( nFirstVis + nOffset, sal_uInt16(nLeft) );
+ pColMgr->SetColWidth( nFirstVis + nOffset + 1, sal_uInt16(nRight) );
+ pColMgr->SetGutterWidth( sal_uInt16(nColDist[nFirstVis + nOffset]), nFirstVis + nOffset );
}
}
@@ -1061,15 +1061,15 @@ IMPL_LINK( SwColumnPage, EdModify, PercentField *, pField )
IMPL_LINK( SwColumnPage, AutoWidthHdl, CheckBox *, pBox )
{
long nDist = static_cast< long >(aDistEd1.DenormalizePercent(aDistEd1.GetValue(FUNIT_TWIP)));
- pColMgr->SetCount(nCols, (USHORT)nDist);
- for(USHORT i = 0; i < nCols; i++)
+ pColMgr->SetCount(nCols, (sal_uInt16)nDist);
+ for(sal_uInt16 i = 0; i < nCols; i++)
nColDist[i] = nDist;
if(pBox->IsChecked())
{
- pColMgr->SetGutterWidth(USHORT(nDist));
+ pColMgr->SetGutterWidth(sal_uInt16(nDist));
ResetColWidth();
}
- pColMgr->SetAutoWidth(pBox->IsChecked(), USHORT(nDist));
+ pColMgr->SetAutoWidth(pBox->IsChecked(), sal_uInt16(nDist));
UpdateCols();
Update();
return 0;
@@ -1115,7 +1115,7 @@ IMPL_LINK( SwColumnPage, Timeout, Timer *, EMPTYARG )
if(pModifiedField)
{
// Finden der veraenderten Spalte
- USHORT nChanged = nFirstVis;
+ sal_uInt16 nChanged = nFirstVis;
if(pModifiedField == &aEd2)
++nChanged;
else if(pModifiedField == &aEd3)
@@ -1123,7 +1123,7 @@ IMPL_LINK( SwColumnPage, Timeout, Timer *, EMPTYARG )
/*else if(pModifiedField == &aEd4)
nChanged += 3;*/
- long nNewWidth = (USHORT)
+ long nNewWidth = (sal_uInt16)
pModifiedField->DenormalizePercent(pModifiedField->GetValue(FUNIT_TWIP));
long nDiff = nNewWidth - nColWidth[nChanged];
@@ -1207,7 +1207,7 @@ void SwColumnPage::ActivatePage(const SfxItemSet& rSet)
const SvxLRSpaceItem& rLRSpace = (const SvxLRSpaceItem&)rSet.Get(
RES_LR_SPACE );
const SvxBoxItem& rBox = (const SvxBoxItem&) rSet.Get(RES_BOX);
- USHORT nActWidth = static_cast< USHORT >(rSize.GetSize().Width()
+ sal_uInt16 nActWidth = static_cast< sal_uInt16 >(rSize.GetSize().Width()
- rLRSpace.GetLeft() - rLRSpace.GetRight() - rBox.GetDistance());
if( pColMgr->GetActualSize() != nActWidth)
@@ -1232,7 +1232,7 @@ void SwColumnPage::ActivatePage(const SfxItemSet& rSet)
const SvxBoxItem& rBox = (const SvxBoxItem&) rSet.Get(RES_BOX);
long nDistance = rBox.GetDistance();
- const USHORT nTotalWish = bFormat ? FRAME_FORMAT_WIDTH : USHORT(rSize.GetWidth() - 2 * nDistance);
+ const sal_uInt16 nTotalWish = bFormat ? FRAME_FORMAT_WIDTH : sal_uInt16(rSize.GetWidth() - 2 * nDistance);
// Maximalwerte der Spaltenbreiten setzen
SetPageWidth(nTotalWish);
@@ -1242,7 +1242,7 @@ void SwColumnPage::ActivatePage(const SfxItemSet& rSet)
pColMgr->SetActualWidth(nTotalWish);
Init();
}
- BOOL bPercent;
+ sal_Bool bPercent;
// im Rahmenformat nur relative Angaben
if ( bFormat || (rSize.GetWidthPercent() && rSize.GetWidthPercent() != 0xff) )
{
@@ -1254,10 +1254,10 @@ void SwColumnPage::ActivatePage(const SfxItemSet& rSet)
aDistEd2.SetRefValue(nTotalWish);
// Auf %-Darstellung umschalten
- bPercent = TRUE;
+ bPercent = sal_True;
}
else
- bPercent = FALSE;
+ bPercent = sal_False;
aEd1.ShowPercent(bPercent);
aEd2.ShowPercent(bPercent);
@@ -1281,12 +1281,12 @@ int SwColumnPage::DeactivatePage(SfxItemSet *_pSet)
if(_pSet)
FillItemSet(*_pSet);
- return TRUE;
+ return sal_True;
}
-USHORT* SwColumnPage::GetRanges()
+sal_uInt16* SwColumnPage::GetRanges()
{
return aPageRg;
}
@@ -1299,7 +1299,7 @@ USHORT* SwColumnPage::GetRanges()
IMPL_LINK( SwColumnPage, SetDefaultsHdl, ValueSet *, pVS )
{
- USHORT nItem = pVS->GetSelectItemId();
+ sal_uInt16 nItem = pVS->GetSelectItemId();
if( nItem < 4 )
{
aCLNrEdt.SetValue( nItem );
@@ -1309,13 +1309,13 @@ IMPL_LINK( SwColumnPage, SetDefaultsHdl, ValueSet *, pVS )
}
else
{
- bLockUpdate = TRUE;
+ bLockUpdate = sal_True;
aCLNrEdt.SetValue( 2 );
- aAutoWidthBox.Check(FALSE);
+ aAutoWidthBox.Check(sal_False);
aDistEd1.SetPrcntValue(0);
ColModify(0);
// jetzt noch das Breitenverhaeltnisse auf 2 : 1 bzw. 1 : 2 stellen
- USHORT nSmall = pColMgr->GetActualSize() / 3;
+ sal_uInt16 nSmall = pColMgr->GetActualSize() / 3;
if(nItem == 4)
{
aEd2.SetPrcntValue(aEd2.NormalizePercent(long(nSmall)), FUNIT_TWIP);
@@ -1326,7 +1326,7 @@ IMPL_LINK( SwColumnPage, SetDefaultsHdl, ValueSet *, pVS )
aEd1.SetPrcntValue(aEd1.NormalizePercent(long(nSmall)), FUNIT_TWIP);
pModifiedField = &aEd1;
}
- bLockUpdate = FALSE;
+ bLockUpdate = sal_False;
Timeout(0);
}
@@ -1338,14 +1338,14 @@ IMPL_LINK( SwColumnPage, SetDefaultsHdl, ValueSet *, pVS )
--------------------------------------------------*/
-void SwColumnPage::SetFrmMode(BOOL bMod)
+void SwColumnPage::SetFrmMode(sal_Bool bMod)
{
bFrm = bMod;
}
/* -----------------------------2002/06/19 13:08------------------------------
---------------------------------------------------------------------------*/
-void SwColumnPage::SetInSection(BOOL bSet)
+void SwColumnPage::SetInSection(sal_Bool bSet)
{
if(!SW_MOD()->GetCTLOptions().IsCTLFontEnabled())
return;
@@ -1382,7 +1382,7 @@ void ColumnValueSet::UserDraw( const UserDrawEvent& rUDEvt )
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
Rectangle aRect = rUDEvt.GetRect();
- USHORT nItemId = rUDEvt.GetItemId();
+ sal_uInt16 nItemId = rUDEvt.GetItemId();
long nRectWidth = aRect.GetWidth();
long nRectHeight = aRect.GetHeight();
@@ -1394,7 +1394,7 @@ void ColumnValueSet::UserDraw( const UserDrawEvent& rUDEvt )
long nStep = Abs(Abs(nRectHeight * 95 /100) / 11);
long nTop = (nRectHeight - 11 * nStep ) / 2;
- USHORT nCols = 0;
+ sal_uInt16 nCols = 0;
long nStarts[3];
long nEnds[3];
nStarts[0] = nRectWidth * 10 / 100;
@@ -1427,11 +1427,11 @@ void ColumnValueSet::UserDraw( const UserDrawEvent& rUDEvt )
nEnds[1] = nRectWidth * 9 / 10;
break;
}
- for(USHORT j = 0; j < nCols; j++ )
+ for(sal_uInt16 j = 0; j < nCols; j++ )
{
Point aStart(aBLPos.X() + nStarts[j], 0);
Point aEnd(aBLPos.X() + nEnds[j], 0);
- for( USHORT i = 0; i < 12; i ++)
+ for( sal_uInt16 i = 0; i < 12; i ++)
{
aStart.Y() = aEnd.Y() = aBLPos.Y() + nTop + i * nStep;
pDev->DrawLine(aStart, aEnd);
diff --git a/sw/source/ui/frmdlg/cption.cxx b/sw/source/ui/frmdlg/cption.cxx
index d226f4760c..e08a7ae0c6 100644
--- a/sw/source/ui/frmdlg/cption.cxx
+++ b/sw/source/ui/frmdlg/cption.cxx
@@ -143,7 +143,7 @@ SwCaptionDialog::SwCaptionDialog( Window *pParent, SwView &rV ) :
aPrevWin (this, SW_RES(WIN_SAMPLE )),
rView( rV ),
pMgr( new SwFldMgr(rView.GetWrtShellPtr()) ),
- bCopyAttributes( FALSE ),
+ bCopyAttributes( sal_False ),
bOrderNumberingFirst( SW_MOD()->GetModuleConfig()->IsCaptionOrderNumberingFirst() )
{
//#i61007# order of captions
@@ -188,7 +188,7 @@ SwCaptionDialog::SwCaptionDialog( Window *pParent, SwView &rV ) :
{
nPoolId = RES_POOLCOLL_LABEL_ABB;
pString = ::GetOldGrfCat();
- bCopyAttributes = TRUE;
+ bCopyAttributes = sal_True;
sObjectName = rSh.GetFlyName();
//if not OLE
if(!xNameAccess.is())
@@ -528,7 +528,7 @@ SwSequenceOptionDialog::SwSequenceOptionDialog( Window *pParent, SwView &rV,
aLbLevel.SelectEntryPos( nLvl < MAXLEVEL ? nLvl + 1 : 0 );
aEdDelim.SetText( sDelim );
- ::FillCharStyleListBox( aLbCharStyle, rView.GetDocShell(), TRUE, TRUE );
+ ::FillCharStyleListBox( aLbCharStyle, rView.GetDocShell(), sal_True, sal_True );
aLbCharStyle.SelectEntryPos( 0 );
}
@@ -594,7 +594,7 @@ long SwCaptionDialog::CategoryBox::PreNotify( NotifyEvent& rNEvt )
{
const KeyEvent* pEvent = rNEvt.GetKeyEvent();
const KeyCode& rKeyCode = pEvent->GetKeyCode();
- USHORT nTmpCode = rKeyCode.GetFullCode() & ~KEY_ALLMODTYPE;
+ sal_uInt16 nTmpCode = rKeyCode.GetFullCode() & ~KEY_ALLMODTYPE;
if(nTmpCode != KEY_BACKSPACE && nTmpCode != KEY_RETURN
&& nTmpCode != KEY_TAB && nTmpCode != KEY_ESCAPE)
diff --git a/sw/source/ui/frmdlg/frmdlg.cxx b/sw/source/ui/frmdlg/frmdlg.cxx
index 52280136a8..f9f64d131c 100644
--- a/sw/source/ui/frmdlg/frmdlg.cxx
+++ b/sw/source/ui/frmdlg/frmdlg.cxx
@@ -67,10 +67,10 @@
SwFrmDlg::SwFrmDlg( SfxViewFrame* pViewFrame,
Window* pParent,
const SfxItemSet& rCoreSet,
- BOOL bNewFrm,
- USHORT nResType,
- BOOL bFormat,
- UINT16 nDefPage,
+ sal_Bool bNewFrm,
+ sal_uInt16 nResType,
+ sal_Bool bFormat,
+ sal_uInt16 nDefPage,
const String* pStr) :
SfxTabDialog(pViewFrame, pParent, SW_RES(nResType), &rCoreSet, pStr != 0),
@@ -81,8 +81,8 @@ SwFrmDlg::SwFrmDlg( SfxViewFrame* pViewFrame,
m_pWrtShell(((SwView*)pViewFrame->GetViewShell())->GetWrtShellPtr())
{
FreeResource();
- USHORT nHtmlMode = ::GetHtmlMode(m_pWrtShell->GetView().GetDocShell());
- m_bHTMLMode = static_cast< BOOL >(nHtmlMode & HTMLMODE_ON);
+ sal_uInt16 nHtmlMode = ::GetHtmlMode(m_pWrtShell->GetView().GetDocShell());
+ m_bHTMLMode = static_cast< sal_Bool >(nHtmlMode & HTMLMODE_ON);
// BspFont fuer beide Bsp-TabPages
//
@@ -153,7 +153,7 @@ SwFrmDlg::~SwFrmDlg()
-void SwFrmDlg::PageCreated( USHORT nId, SfxTabPage &rPage )
+void SwFrmDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
{
SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool()));
switch ( nId )
@@ -173,13 +173,13 @@ void SwFrmDlg::PageCreated( USHORT nId, SfxTabPage &rPage )
case TP_FRM_WRAP:
((SwWrapTabPage&)rPage).SetNewFrame(m_bNew);
- ((SwWrapTabPage&)rPage).SetFormatUsed(m_bFormat, FALSE);
+ ((SwWrapTabPage&)rPage).SetFormatUsed(m_bFormat, sal_False);
((SwWrapTabPage&)rPage).SetShell(m_pWrtShell);
break;
case TP_COLUMN:
{
- ((SwColumnPage&)rPage).SetFrmMode(TRUE);
+ ((SwColumnPage&)rPage).SetFrmMode(sal_True);
((SwColumnPage&)rPage).SetFormatUsed(m_bFormat);
const SwFmtFrmSize& rSize = (const SwFmtFrmSize&)
diff --git a/sw/source/ui/frmdlg/frmmgr.cxx b/sw/source/ui/frmdlg/frmmgr.cxx
index f5cd0763e2..8f4bcd3305 100644
--- a/sw/source/ui/frmdlg/frmmgr.cxx
+++ b/sw/source/ui/frmdlg/frmmgr.cxx
@@ -56,7 +56,7 @@
using namespace ::com::sun::star;
//using namespace text;
-static USHORT __FAR_DATA aFrmMgrRange[] = {
+static sal_uInt16 __FAR_DATA aFrmMgrRange[] = {
RES_FRMATR_BEGIN, RES_FRMATR_END-1,
SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER,
FN_SET_FRM_NAME, FN_SET_FRM_NAME,
@@ -66,17 +66,17 @@ static USHORT __FAR_DATA aFrmMgrRange[] = {
Beschreibung: Rahmen-Attribute ueber Shell ermitteln
--------------------------------------------------------------------*/
-SwFlyFrmAttrMgr::SwFlyFrmAttrMgr( BOOL bNew, SwWrtShell* pSh, BYTE nType ) :
+SwFlyFrmAttrMgr::SwFlyFrmAttrMgr( sal_Bool bNew, SwWrtShell* pSh, sal_uInt8 nType ) :
aSet( (SwAttrPool&)pSh->GetAttrPool(), aFrmMgrRange ),
pOwnSh( pSh ),
- bAbsPos( FALSE ),
+ bAbsPos( sal_False ),
bNewFrm( bNew ),
- bIsInVertical( FALSE )
+ bIsInVertical( sal_False )
{
if ( bNewFrm )
{
// Defaults einstellen:
- USHORT nId = 0;
+ sal_uInt16 nId = 0;
switch ( nType )
{
case FRMMGR_TYPE_TEXT: nId = RES_POOLFRM_FRAME; break;
@@ -91,23 +91,23 @@ SwFlyFrmAttrMgr::SwFlyFrmAttrMgr( BOOL bNew, SwWrtShell* pSh, BYTE nType ) :
else if ( nType == FRMMGR_TYPE_NONE )
{
pOwnSh->GetFlyFrmAttr( aSet );
- BOOL bRightToLeft;
- bIsInVertical = pOwnSh->IsFrmVertical(TRUE, bRightToLeft);
+ sal_Bool bRightToLeft;
+ bIsInVertical = pOwnSh->IsFrmVertical(sal_True, bRightToLeft);
}
::PrepareBoxInfo( aSet, *pOwnSh );
}
-SwFlyFrmAttrMgr::SwFlyFrmAttrMgr( BOOL bNew, SwWrtShell* pSh, const SfxItemSet &rSet ) :
+SwFlyFrmAttrMgr::SwFlyFrmAttrMgr( sal_Bool bNew, SwWrtShell* pSh, const SfxItemSet &rSet ) :
aSet( rSet ),
pOwnSh( pSh ),
- bAbsPos( FALSE ),
+ bAbsPos( sal_False ),
bNewFrm( bNew ),
- bIsInVertical(FALSE)
+ bIsInVertical(sal_False)
{
if(!bNew)
{
- BOOL bRightToLeft;
- bIsInVertical = pSh->IsFrmVertical(TRUE, bRightToLeft);
+ sal_Bool bRightToLeft;
+ bIsInVertical = pSh->IsFrmVertical(sal_True, bRightToLeft);
}
}
@@ -127,7 +127,7 @@ void SwFlyFrmAttrMgr::_UpdateFlyFrm()
{
const SfxPoolItem* pItem = 0;
- if (aSet.GetItemState(FN_SET_FRM_NAME, FALSE, &pItem) == SFX_ITEM_SET)
+ if (aSet.GetItemState(FN_SET_FRM_NAME, sal_False, &pItem) == SFX_ITEM_SET)
pOwnSh->SetFlyName(((SfxStringItem *)pItem)->GetValue());
pOwnSh->SetModified();
@@ -135,7 +135,7 @@ void SwFlyFrmAttrMgr::_UpdateFlyFrm()
if ( bAbsPos )
{
pOwnSh->SetFlyPos( aAbsPos );
- bAbsPos = FALSE;
+ bAbsPos = sal_False;
}
}
@@ -152,11 +152,11 @@ void SwFlyFrmAttrMgr::UpdateFlyFrm()
{
//JP 6.8.2001: set never an invalid anchor into the core.
const SfxPoolItem *pGItem, *pItem;
- if( SFX_ITEM_SET == aSet.GetItemState( RES_ANCHOR, FALSE, &pItem ))
+ if( SFX_ITEM_SET == aSet.GetItemState( RES_ANCHOR, sal_False, &pItem ))
{
SfxItemSet aGetSet( *aSet.GetPool(), RES_ANCHOR, RES_ANCHOR );
if( pOwnSh->GetFlyFrmAttr( aGetSet ) && 1 == aGetSet.Count() &&
- SFX_ITEM_SET == aGetSet.GetItemState( RES_ANCHOR, FALSE, &pGItem )
+ SFX_ITEM_SET == aGetSet.GetItemState( RES_ANCHOR, sal_False, &pGItem )
&& ((SwFmtAnchor*)pGItem)->GetAnchorId() ==
((SwFmtAnchor*)pItem)->GetAnchorId() )
aSet.ClearItem( RES_ANCHOR );
@@ -177,11 +177,11 @@ void SwFlyFrmAttrMgr::UpdateFlyFrm()
Beschreibung: Rahmen einfuegen
--------------------------------------------------------------------*/
-BOOL SwFlyFrmAttrMgr::InsertFlyFrm()
+sal_Bool SwFlyFrmAttrMgr::InsertFlyFrm()
{
pOwnSh->StartAllAction();
- BOOL bRet = 0 != pOwnSh->NewFlyFrm( aSet );
+ sal_Bool bRet = 0 != pOwnSh->NewFlyFrm( aSet );
// richtigen Mode an der Shell einschalten, Rahmen wurde aut. selektiert.
if ( bRet )
@@ -204,7 +204,7 @@ BOOL SwFlyFrmAttrMgr::InsertFlyFrm()
void SwFlyFrmAttrMgr::InsertFlyFrm(RndStdIds eAnchorType,
const Point &rPos,
const Size &rSize,
- BOOL bAbs )
+ sal_Bool bAbs )
{
ASSERT( eAnchorType == FLY_AT_PAGE ||
eAnchorType == FLY_AT_PARA ||
@@ -228,7 +228,7 @@ void SwFlyFrmAttrMgr::InsertFlyFrm(RndStdIds eAnchorType,
void SwFlyFrmAttrMgr::SetAnchor( RndStdIds eId )
{
- USHORT nPhyPageNum, nVirtPageNum;
+ sal_uInt16 nPhyPageNum, nVirtPageNum;
pOwnSh->GetPageNum( nPhyPageNum, nVirtPageNum );
aSet.Put( SwFmtAnchor( eId, nPhyPageNum ) );
@@ -258,7 +258,7 @@ void SwFlyFrmAttrMgr::SetCol( const SwFmtCol &rCol )
void SwFlyFrmAttrMgr::SetAbsPos( const Point& rPoint )
{
- bAbsPos = TRUE;
+ bAbsPos = sal_True;
aAbsPos = rPoint;
SwFmtVertOrient aVertOrient( GetVertOrient() );
@@ -274,7 +274,7 @@ void SwFlyFrmAttrMgr::SetAbsPos( const Point& rPoint )
--------------------------------------------------------------------*/
void SwFlyFrmAttrMgr::ValidateMetrics( SvxSwFrameValidation& rVal,
const SwPosition* pToCharCntntPos,
- BOOL bOnlyPercentRefValue )
+ sal_Bool bOnlyPercentRefValue )
{
if (!bOnlyPercentRefValue)
{
@@ -544,7 +544,7 @@ SwTwips SwFlyFrmAttrMgr::CalcRightSpace()
/*--------------------------------------------------------------------
Beschreibung: Attribut aus dem Set loeschen
--------------------------------------------------------------------*/
-void SwFlyFrmAttrMgr::DelAttr( USHORT nId )
+void SwFlyFrmAttrMgr::DelAttr( sal_uInt16 nId )
{
aSet.ClearItem( nId );
}
@@ -555,9 +555,9 @@ void SwFlyFrmAttrMgr::SetLRSpace( long nLeft, long nRight )
SvxLRSpaceItem aTmp( (SvxLRSpaceItem&)aSet.Get( RES_LR_SPACE ) );
if( LONG_MAX != nLeft )
- aTmp.SetLeft( USHORT(nLeft) );
+ aTmp.SetLeft( sal_uInt16(nLeft) );
if( LONG_MAX != nRight )
- aTmp.SetRight( USHORT(nRight) );
+ aTmp.SetRight( sal_uInt16(nRight) );
aSet.Put( aTmp );
}
@@ -567,9 +567,9 @@ void SwFlyFrmAttrMgr::SetULSpace( long nTop, long nBottom )
SvxULSpaceItem aTmp( (SvxULSpaceItem&)aSet.Get( RES_UL_SPACE ) );
if( LONG_MAX != nTop )
- aTmp.SetUpper( USHORT(nTop) );
+ aTmp.SetUpper( sal_uInt16(nTop) );
if( LONG_MAX != nBottom )
- aTmp.SetLower( USHORT(nBottom) );
+ aTmp.SetLower( sal_uInt16(nBottom) );
aSet.Put( aTmp );
}
diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx
index 79b8c68a09..2e47981557 100644
--- a/sw/source/ui/frmdlg/frmpage.cxx
+++ b/sw/source/ui/frmdlg/frmpage.cxx
@@ -92,16 +92,16 @@ struct FrmMap
{
SvxSwFramePosString::StringId eStrId;
SvxSwFramePosString::StringId eMirrorStrId;
- USHORT nAlign;
- ULONG nLBRelations;
+ sal_uInt16 nAlign;
+ sal_uLong nLBRelations;
};
struct RelationMap
{
SvxSwFramePosString::StringId eStrId;
SvxSwFramePosString::StringId eMirrorStrId;
- ULONG nLBRelation;
- USHORT nRelation;
+ sal_uLong nLBRelation;
+ sal_uInt16 nRelation;
};
struct StringIdPair_Impl
@@ -399,14 +399,14 @@ static FrmMap __FAR_DATA aVAsCharHtmlMap[] =
{SwFPos::CENTER_VERT, SwFPos::CENTER_VERT, text::VertOrientation::LINE_CENTER, LB_REL_ROW}
};
-static USHORT __FAR_DATA aPageRg[] = {
+static sal_uInt16 __FAR_DATA aPageRg[] = {
RES_FRM_SIZE, RES_FRM_SIZE,
RES_VERT_ORIENT, RES_ANCHOR,
RES_COL, RES_COL,
RES_FOLLOW_TEXT_FLOW, RES_FOLLOW_TEXT_FLOW,
0
};
-static USHORT __FAR_DATA aAddPgRg[] = {
+static sal_uInt16 __FAR_DATA aAddPgRg[] = {
RES_PROTECT, RES_PROTECT,
RES_PRINT, RES_PRINT,
FN_SET_FRM_NAME, FN_SET_FRM_NAME,
@@ -476,7 +476,7 @@ void lcl_InsertVectors(ListBox& rBox,
const ::std::vector< String >& rNext, const ::std::vector< String >& rRemain)
{
::std::vector< String >::const_iterator aIt;
- USHORT nEntry = 0;
+ sal_uInt16 nEntry = 0;
for(aIt = rPrev.begin(); aIt != rPrev.end(); aIt++)
nEntry = rBox.InsertEntry(*aIt);
for(aIt = rThis.begin(); aIt != rThis.end(); aIt++)
@@ -485,7 +485,7 @@ void lcl_InsertVectors(ListBox& rBox,
nEntry = rBox.InsertEntry(*aIt);
rBox.SetSeparatorPos(nEntry);
//now insert all strings sorted
- USHORT nStartPos = rBox.GetEntryCount();
+ sal_uInt16 nStartPos = rBox.GetEntryCount();
for(aIt = rPrev.begin(); aIt != rPrev.end(); aIt++)
::InsertStringSorted(*aIt, rBox, nStartPos );
@@ -500,7 +500,7 @@ void lcl_InsertVectors(ListBox& rBox,
/* -----------------------------20.08.2002 16:12------------------------------
---------------------------------------------------------------------------*/
-SvxSwFramePosString::StringId lcl_ChangeResIdToVerticalOrRTL(SvxSwFramePosString::StringId eStringId, BOOL bVertical, BOOL bRTL)
+SvxSwFramePosString::StringId lcl_ChangeResIdToVerticalOrRTL(SvxSwFramePosString::StringId eStringId, sal_Bool bVertical, sal_Bool bRTL)
{
//special handling of STR_FROMLEFT
if(SwFPos::FROMLEFT == eStringId)
@@ -535,7 +535,7 @@ SvxSwFramePosString::StringId lcl_ChangeResIdToVerticalOrRTL(SvxSwFramePosString
{SwFPos::REL_FRM_TOP, SwFPos::REL_FRM_LEFT },
{SwFPos::REL_FRM_BOTTOM, SwFPos::REL_FRM_RIGHT }
};
- USHORT nIndex;
+ sal_uInt16 nIndex;
for(nIndex = 0; nIndex < sizeof(aHoriIds) / sizeof(StringIdPair_Impl); ++nIndex)
{
if(aHoriIds[nIndex].eHori == eStringId)
@@ -559,9 +559,9 @@ SvxSwFramePosString::StringId lcl_ChangeResIdToVerticalOrRTL(SvxSwFramePosString
// OD 12.11.2003 #i22341# - helper method in order to determine all possible
// listbox relations in a relation map for a given relation
-ULONG lcl_GetLBRelationsForRelations( const USHORT _nRel )
+sal_uLong lcl_GetLBRelationsForRelations( const sal_uInt16 _nRel )
{
- ULONG nLBRelations = 0L;
+ sal_uLong nLBRelations = 0L;
sal_uInt16 nRelMapSize = sizeof(aRelationMap) / sizeof(RelationMap);
for ( sal_uInt16 nRelMapPos = 0; nRelMapPos < nRelMapSize; ++nRelMapPos )
@@ -577,11 +577,11 @@ ULONG lcl_GetLBRelationsForRelations( const USHORT _nRel )
// OD 14.11.2003 #i22341# - helper method on order to determine all possible
// listbox relations in a relation map for a given string ID
-ULONG lcl_GetLBRelationsForStrID( const FrmMap* _pMap,
+sal_uLong lcl_GetLBRelationsForStrID( const FrmMap* _pMap,
const SvxSwFramePosString::StringId _eStrId,
const bool _bUseMirrorStr )
{
- ULONG nLBRelations = 0L;
+ sal_uLong nLBRelations = 0L;
size_t nRelMapSize = lcl_GetFrmMapCount( _pMap );
for ( size_t nRelMapPos = 0; nRelMapPos < nRelMapSize; ++nRelMapPos )
@@ -602,7 +602,7 @@ ULONG lcl_GetLBRelationsForStrID( const FrmMap* _pMap,
namespace
{
- void HandleAutoCB( BOOL _bChecked, FixedText& _rFT_man, FixedText& _rFT_auto )
+ void HandleAutoCB( sal_Bool _bChecked, FixedText& _rFT_man, FixedText& _rFT_auto )
{
_rFT_man.Show( !_bChecked );
_rFT_auto.Show( _bChecked );
@@ -654,16 +654,16 @@ SwFrmPage::SwFrmPage ( Window *pParent, const SfxItemSet &rSet ) :
aExampleWN (this, SW_RES(WN_BSP)),
- bAtHorzPosModified( FALSE ),
- bAtVertPosModified( FALSE ),
+ bAtHorzPosModified( sal_False ),
+ bAtVertPosModified( sal_False ),
- bFormat(FALSE),
- bNew(TRUE),
- bNoModifyHdl(TRUE),
- bVerticalChanged(FALSE),
- bIsVerticalFrame(FALSE),
- bIsInRightToLeft(FALSE),
- bHtmlMode(FALSE),
+ bFormat(sal_False),
+ bNew(sal_True),
+ bNoModifyHdl(sal_True),
+ bVerticalChanged(sal_False),
+ bIsVerticalFrame(sal_False),
+ bIsInRightToLeft(sal_False),
+ bHtmlMode(sal_False),
nHtmlMode(0),
nDlgType(0),
nUpperBorder(0),
@@ -777,7 +777,7 @@ void SwFrmPage::Reset( const SfxItemSet &rSet )
((SwFrmDlg*)GetParent()->GetParent())->GetWrtShell();
nHtmlMode = ::GetHtmlMode(pSh->GetView().GetDocShell());
- bHtmlMode = nHtmlMode & HTMLMODE_ON ? TRUE : FALSE;
+ bHtmlMode = nHtmlMode & HTMLMODE_ON ? sal_True : sal_False;
FieldUnit aMetric = ::GetDfltMetric(bHtmlMode);
SetMetric( aWidthED, aMetric );
@@ -789,9 +789,9 @@ void SwFrmPage::Reset( const SfxItemSet &rSet )
const SwFmtAnchor& rAnchor = (const SwFmtAnchor&)rSet.Get(RES_ANCHOR);
- if (SFX_ITEM_SET == rSet.GetItemState(FN_OLE_IS_MATH, FALSE, &pItem))
+ if (SFX_ITEM_SET == rSet.GetItemState(FN_OLE_IS_MATH, sal_False, &pItem))
m_bIsMathOLE = ((const SfxBoolItem*)pItem)->GetValue();
- if (SFX_ITEM_SET == rSet.GetItemState(FN_MATH_BASELINE_ALIGNMENT, FALSE, &pItem))
+ if (SFX_ITEM_SET == rSet.GetItemState(FN_MATH_BASELINE_ALIGNMENT, sal_False, &pItem))
m_bIsMathBaselineAlignment = ((const SfxBoolItem*)pItem)->GetValue();
EnableVerticalPositioning( !(m_bIsMathOLE && m_bIsMathBaselineAlignment
&& FLY_AS_CHAR == rAnchor.GetAnchorId()) );
@@ -799,24 +799,24 @@ void SwFrmPage::Reset( const SfxItemSet &rSet )
if (bFormat)
{
// Bei Formaten keine Ankerbearbeitung
- aAnchorAtPageRB.Enable( FALSE );
- aAnchorAtParaRB.Enable( FALSE );
- aAnchorAtCharRB.Enable( FALSE );
- aAnchorAsCharRB.Enable( FALSE );
- aAnchorAtFrameRB.Enable( FALSE );
- aTypeFL.Enable( FALSE );
- aFixedRatioCB.Enable(FALSE);
+ aAnchorAtPageRB.Enable( sal_False );
+ aAnchorAtParaRB.Enable( sal_False );
+ aAnchorAtCharRB.Enable( sal_False );
+ aAnchorAsCharRB.Enable( sal_False );
+ aAnchorAtFrameRB.Enable( sal_False );
+ aTypeFL.Enable( sal_False );
+ aFixedRatioCB.Enable(sal_False);
}
else
{
if (rAnchor.GetAnchorId() != FLY_AT_FLY && !pSh->IsFlyInFly())
aAnchorAtFrameRB.Hide();
- if(!bVerticalChanged && pSh->IsFrmVertical(TRUE, bIsInRightToLeft))
+ if(!bVerticalChanged && pSh->IsFrmVertical(sal_True, bIsInRightToLeft))
{
String sHLabel = aHorizontalFT.GetText();
aHorizontalFT.SetText(aVerticalFT.GetText());
aVerticalFT.SetText(sHLabel);
- bIsVerticalFrame = TRUE;
+ bIsVerticalFrame = sal_True;
}
}
@@ -824,7 +824,7 @@ void SwFrmPage::Reset( const SfxItemSet &rSet )
{
ASSERT(pSh , "shell not found");
//OS: nur fuer die Variante Einfuegen/Grafik/Eigenschaften
- if(SFX_ITEM_SET == rSet.GetItemState(FN_PARAM_GRF_REALSIZE, FALSE, &pItem))
+ if(SFX_ITEM_SET == rSet.GetItemState(FN_PARAM_GRF_REALSIZE, sal_False, &pItem))
aGrfSize = ((const SvxSizeItem*)pItem)->GetSize();
else
pSh->GetGrfSize( aGrfSize );
@@ -838,7 +838,7 @@ void SwFrmPage::Reset( const SfxItemSet &rSet )
// aTypeFL.SetSizePixel(Size(aTypeFL.GetSizePixel().Width(), aSizeFL.GetSizePixel().Height()));
if ( nDlgType == DLG_FRM_GRF )
- aFixedRatioCB.Check( FALSE );
+ aFixedRatioCB.Check( sal_False );
else
{
if ( bNew )
@@ -902,9 +902,9 @@ void SwFrmPage::Reset( const SfxItemSet &rSet )
if(nDlgType == DLG_FRM_STD &&
0 == (nHtmlMode & HTMLMODE_FULL_ABS_POS))
{
- aHeightFT .Enable( FALSE );
- aHeightED .Enable( FALSE );
- aRelHeightCB.Enable( FALSE );
+ aHeightFT .Enable( sal_False );
+ aHeightED .Enable( sal_False );
+ aRelHeightCB.Enable( sal_False );
}
if( 0 == (nHtmlMode & HTMLMODE_SOME_ABS_POS))
{
@@ -912,15 +912,15 @@ void SwFrmPage::Reset( const SfxItemSet &rSet )
{
aAnchorAtParaRB.Check();
}
- aAnchorAtPageRB.Enable(FALSE);
+ aAnchorAtPageRB.Enable(sal_False);
}
- aAutoHeightCB.Enable(FALSE);
- aAutoWidthCB.Enable(FALSE);
- aMirrorPagesCB.Show(FALSE);
+ aAutoHeightCB.Enable(sal_False);
+ aAutoWidthCB.Enable(sal_False);
+ aMirrorPagesCB.Show(sal_False);
if(nDlgType == DLG_FRM_STD)
- aFixedRatioCB.Enable(FALSE);
+ aFixedRatioCB.Enable(sal_False);
// OD 19.09.2003 #i18732# - hide checkbox in HTML mode
- aFollowTextFlowCB.Show(FALSE);
+ aFollowTextFlowCB.Show(sal_False);
}
else
{
@@ -935,13 +935,13 @@ void SwFrmPage::Reset( const SfxItemSet &rSet )
aAnchorAtFrameRB.IsChecked() );
}
- Init( rSet, TRUE );
+ Init( rSet, sal_True );
aAtVertPosED.SaveValue();
aAtHorzPosED.SaveValue();
// OD 19.09.2003 #i18732#
aFollowTextFlowCB.SaveValue();
- bNoModifyHdl = FALSE;
+ bNoModifyHdl = sal_False;
//lock PercentFields
aWidthED.LockAutoCalculation(sal_True);
aHeightED.LockAutoCalculation(sal_True);
@@ -962,9 +962,9 @@ void SwFrmPage::Reset( const SfxItemSet &rSet )
Beschreibung: Attribute in den Set stopfen bei OK
--------------------------------------------------------------------*/
-BOOL SwFrmPage::FillItemSet(SfxItemSet &rSet)
+sal_Bool SwFrmPage::FillItemSet(SfxItemSet &rSet)
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
SwWrtShell* pSh = bFormat ? ::GetActiveWrtShell()
: ((SwFrmDlg*)GetParent()->GetParent())->GetWrtShell();
ASSERT( pSh , "shell not found");
@@ -988,7 +988,7 @@ BOOL SwFrmPage::FillItemSet(SfxItemSet &rSet)
SwFmtHoriOrient aHoriOrient( (const SwFmtHoriOrient&)
rOldSet.Get(RES_HORI_ORIENT) );
- USHORT nMapPos = GetMapPos(pHMap, aHorizontalDLB);
+ sal_uInt16 nMapPos = GetMapPos(pHMap, aHorizontalDLB);
short nAlign = GetAlignment(pHMap, nMapPos, aHorizontalDLB, aHoriRelationLB);
short nRel = GetRelation(pHMap, aHoriRelationLB);
@@ -999,7 +999,7 @@ BOOL SwFrmPage::FillItemSet(SfxItemSet &rSet)
aHoriOrient.SetRelationOrient( eRel );
aHoriOrient.SetPosToggle(aMirrorPagesCB.IsChecked());
- BOOL bMod = aAtHorzPosED.GetText() != aAtHorzPosED.GetSavedValue();
+ sal_Bool bMod = aAtHorzPosED.GetText() != aAtHorzPosED.GetSavedValue();
bMod |= aMirrorPagesCB.GetState() != aMirrorPagesCB.GetSavedValue();
if ( eHOri == text::HoriOrientation::NONE &&
@@ -1010,10 +1010,10 @@ BOOL SwFrmPage::FillItemSet(SfxItemSet &rSet)
}
pOldItem = GetOldItem(rSet, FN_HORI_ORIENT);
- BOOL bSame = FALSE;
+ sal_Bool bSame = sal_False;
if ((bNew == bFormat) && pOldItem)
{
- bSame = static_cast< BOOL >(aHoriOrient == (SwFmtHoriOrient&)*pOldItem);
+ bSame = static_cast< sal_Bool >(aHoriOrient == (SwFmtHoriOrient&)*pOldItem);
}
if ((bNew && !bFormat) || ((bAtHorzPosModified || bMod) && !bSame))
{
@@ -1027,7 +1027,7 @@ BOOL SwFrmPage::FillItemSet(SfxItemSet &rSet)
SwFmtVertOrient aVertOrient( (const SwFmtVertOrient&)
rOldSet.Get(RES_VERT_ORIENT) );
- USHORT nMapPos = GetMapPos(pVMap, aVerticalDLB);
+ sal_uInt16 nMapPos = GetMapPos(pVMap, aVerticalDLB);
short nAlign = GetAlignment(pVMap, nMapPos, aVerticalDLB, aVertRelationLB);
short nRel = GetRelation(pVMap, aVertRelationLB);
@@ -1037,7 +1037,7 @@ BOOL SwFrmPage::FillItemSet(SfxItemSet &rSet)
aVertOrient.SetVertOrient ( eVOri);
aVertOrient.SetRelationOrient( eRel );
- BOOL bMod = aAtVertPosED.GetText() != aAtVertPosED.GetSavedValue();
+ sal_Bool bMod = aAtVertPosED.GetText() != aAtVertPosED.GetSavedValue();
if ( eVOri == text::VertOrientation::NONE &&
( bNew || (bAtVertPosModified || bMod) || nOldV != eVOri) )
@@ -1052,10 +1052,10 @@ BOOL SwFrmPage::FillItemSet(SfxItemSet &rSet)
aVertOrient.SetPos( nY );
}
pOldItem = GetOldItem(rSet, FN_VERT_ORIENT);
- BOOL bSame = FALSE;
+ sal_Bool bSame = sal_False;
if((bNew == bFormat) && pOldItem)
{
- bSame = static_cast< BOOL >( bFormat ?
+ bSame = static_cast< sal_Bool >( bFormat ?
aVertOrient.GetVertOrient() == ((SwFmtVertOrient*)pOldItem)->GetVertOrient() &&
aVertOrient.GetRelationOrient() == ((SwFmtVertOrient*)pOldItem)->GetRelationOrient() &&
aVertOrient.GetPos() == ((SwFmtVertOrient*)pOldItem)->GetPos()
@@ -1077,16 +1077,16 @@ BOOL SwFrmPage::FillItemSet(SfxItemSet &rSet)
SwFmtFrmSize aSz( rOldSize );
/* // Folgende Zeilen nur zum debuggen:
- BOOL bModified = aWidthED.IsValueModified();
- USHORT nOldWidth = rOldSize.GetWidth ();
- USHORT nWidth = aWidthED .GetValue();
- USHORT nMinWidth = aWidthED .GetMin();*/
+ sal_Bool bModified = aWidthED.IsValueModified();
+ sal_uInt16 nOldWidth = rOldSize.GetWidth ();
+ sal_uInt16 nWidth = aWidthED .GetValue();
+ sal_uInt16 nMinWidth = aWidthED .GetMin();*/
- BOOL bValueModified = (aWidthED.IsValueModified() || aHeightED.IsValueModified());
- BOOL bCheckChanged = (aRelWidthCB.GetSavedValue() != aRelWidthCB.IsChecked()
+ sal_Bool bValueModified = (aWidthED.IsValueModified() || aHeightED.IsValueModified());
+ sal_Bool bCheckChanged = (aRelWidthCB.GetSavedValue() != aRelWidthCB.IsChecked()
|| aRelHeightCB.GetSavedValue() != aRelHeightCB.IsChecked());
- BOOL bLegalValue = !(!rOldSize.GetWidth () && !rOldSize.GetHeight() &&
+ sal_Bool bLegalValue = !(!rOldSize.GetWidth () && !rOldSize.GetHeight() &&
aWidthED .GetValue() == aWidthED .GetMin() &&
aHeightED.GetValue() == aHeightED.GetMin());
@@ -1099,12 +1099,12 @@ BOOL SwFrmPage::FillItemSet(SfxItemSet &rSet)
if (aRelWidthCB.IsChecked())
{
- aSz.SetWidthPercent((BYTE)Min( static_cast< sal_Int64 >(MAX_PERCENT_WIDTH), aWidthED.Convert(aWidthED.NormalizePercent(nNewWidth), FUNIT_TWIP, FUNIT_CUSTOM)));
+ aSz.SetWidthPercent((sal_uInt8)Min( static_cast< sal_Int64 >(MAX_PERCENT_WIDTH), aWidthED.Convert(aWidthED.NormalizePercent(nNewWidth), FUNIT_TWIP, FUNIT_CUSTOM)));
}
else
aSz.SetWidthPercent(0);
if (aRelHeightCB.IsChecked())
- aSz.SetHeightPercent((BYTE)Min(static_cast< sal_Int64 >(MAX_PERCENT_HEIGHT), aHeightED.Convert(aHeightED.NormalizePercent(nNewHeight), FUNIT_TWIP, FUNIT_CUSTOM)));
+ aSz.SetHeightPercent((sal_uInt8)Min(static_cast< sal_Int64 >(MAX_PERCENT_HEIGHT), aHeightED.Convert(aHeightED.NormalizePercent(nNewHeight), FUNIT_TWIP, FUNIT_CUSTOM)));
else
aSz.SetHeightPercent(0);
@@ -1159,14 +1159,14 @@ BOOL SwFrmPage::FillItemSet(SfxItemSet &rSet)
--------------------------------------------------------------------*/
void SwFrmPage::InitPos(RndStdIds eId,
- USHORT nH,
- USHORT nHRel,
- USHORT nV,
- USHORT nVRel,
+ sal_uInt16 nH,
+ sal_uInt16 nHRel,
+ sal_uInt16 nV,
+ sal_uInt16 nVRel,
long nX,
long nY)
{
- USHORT nPos = aVerticalDLB.GetSelectEntryPos();
+ sal_uInt16 nPos = aVerticalDLB.GetSelectEntryPos();
if ( nPos != LISTBOX_ENTRY_NOTFOUND && pVMap )
{
nOldV = pVMap[nPos].nAlign;
@@ -1186,7 +1186,7 @@ void SwFrmPage::InitPos(RndStdIds eId,
nOldHRel = ((RelationMap *)aHoriRelationLB.GetEntryData(nPos))->nRelation;
}
- BOOL bEnable = TRUE;
+ sal_Bool bEnable = sal_True;
if ( eId == FLY_AT_PAGE )
{
pVMap = bHtmlMode ? aVPageHtmlMap : aVPageMap;
@@ -1229,7 +1229,7 @@ void SwFrmPage::InitPos(RndStdIds eId,
{
pVMap = bHtmlMode ? aVAsCharHtmlMap : aVAsCharMap;
pHMap = 0;
- bEnable = FALSE;
+ bEnable = sal_False;
}
aHorizontalDLB.Enable( bEnable );
aHorizontalFT.Enable( bEnable );
@@ -1242,7 +1242,7 @@ void SwFrmPage::InitPos(RndStdIds eId,
nHRel = nOldHRel;
}
// OD 12.11.2003 #i22341# - pass <nHRel> as 3rd parameter to method <FillPosLB>
- USHORT nMapPos = FillPosLB(pHMap, nH, nHRel, aHorizontalDLB);
+ sal_uInt16 nMapPos = FillPosLB(pHMap, nH, nHRel, aHorizontalDLB);
FillRelLB(pHMap, nMapPos, nH, nHRel, aHoriRelationLB, aHoriRelationFT);
// Vertikal
@@ -1299,9 +1299,9 @@ void SwFrmPage::InitPos(RndStdIds eId,
Beschreibung:
--------------------------------------------------------------------*/
-USHORT SwFrmPage::FillPosLB(const FrmMap* _pMap,
- const USHORT _nAlign,
- const USHORT _nRel,
+sal_uInt16 SwFrmPage::FillPosLB(const FrmMap* _pMap,
+ const sal_uInt16 _nAlign,
+ const sal_uInt16 _nRel,
ListBox& _rLB )
{
String sSelEntry, sOldEntry;
@@ -1311,7 +1311,7 @@ USHORT SwFrmPage::FillPosLB(const FrmMap* _pMap,
// OD 12.11.2003 #i22341# - determine all possible listbox relations for
// given relation for map <aVCharMap>
- const ULONG nLBRelations = (_pMap != aVCharMap)
+ const sal_uLong nLBRelations = (_pMap != aVCharMap)
? 0L
: ::lcl_GetLBRelationsForRelations( _nRel );
@@ -1355,15 +1355,15 @@ USHORT SwFrmPage::FillPosLB(const FrmMap* _pMap,
/*--------------------------------------------------------------------
Beschreibung:
--------------------------------------------------------------------*/
-ULONG SwFrmPage::FillRelLB( const FrmMap* _pMap,
- const USHORT _nLBSelPos,
- const USHORT _nAlign,
- USHORT _nRel,
+sal_uLong SwFrmPage::FillRelLB( const FrmMap* _pMap,
+ const sal_uInt16 _nLBSelPos,
+ const sal_uInt16 _nAlign,
+ sal_uInt16 _nRel,
ListBox& _rLB,
FixedText& _rFT )
{
String sSelEntry;
- ULONG nLBRelations = 0;
+ sal_uLong nLBRelations = 0;
size_t nMapCount = ::lcl_GetFrmMapCount(_pMap);
_rLB.Clear();
@@ -1373,7 +1373,7 @@ ULONG SwFrmPage::FillRelLB( const FrmMap* _pMap,
if (_pMap == aVAsCharHtmlMap || _pMap == aVAsCharMap)
{
String sOldEntry(_rLB.GetSelectEntry());
- USHORT nRelCount = sizeof(aAsCharRelationMap) / sizeof(RelationMap);
+ sal_uInt16 nRelCount = sizeof(aAsCharRelationMap) / sizeof(RelationMap);
SvxSwFramePosString::StringId eStrId = _pMap[_nLBSelPos].eStrId;
for (size_t nMapPos = 0; nMapPos < nMapCount; nMapPos++)
@@ -1381,7 +1381,7 @@ ULONG SwFrmPage::FillRelLB( const FrmMap* _pMap,
if (_pMap[nMapPos].eStrId == eStrId)
{
nLBRelations = _pMap[nMapPos].nLBRelations;
- for (USHORT nRelPos = 0; nRelPos < nRelCount; nRelPos++)
+ for (sal_uInt16 nRelPos = 0; nRelPos < nRelCount; nRelPos++)
{
if (nLBRelations & aAsCharRelationMap[nRelPos].nLBRelation)
{
@@ -1389,7 +1389,7 @@ ULONG SwFrmPage::FillRelLB( const FrmMap* _pMap,
sStrId1 = lcl_ChangeResIdToVerticalOrRTL(sStrId1, bIsVerticalFrame, bIsInRightToLeft);
String sEntry = aFramePosString.GetString(sStrId1);
- USHORT nPos = _rLB.InsertEntry(sEntry);
+ sal_uInt16 nPos = _rLB.InsertEntry(sEntry);
_rLB.SetEntryData(nPos, &aAsCharRelationMap[nRelPos]);
if (_pMap[nMapPos].nAlign == _nAlign)
sSelEntry = sEntry;
@@ -1406,7 +1406,7 @@ ULONG SwFrmPage::FillRelLB( const FrmMap* _pMap,
if (!_rLB.GetSelectEntryCount())
{
- for (USHORT i = 0; i < _rLB.GetEntryCount(); i++)
+ for (sal_uInt16 i = 0; i < _rLB.GetEntryCount(); i++)
{
RelationMap *pEntry = (RelationMap *)_rLB.GetEntryData(i);
if (pEntry->nLBRelation == LB_REL_CHAR) // Default
@@ -1420,7 +1420,7 @@ ULONG SwFrmPage::FillRelLB( const FrmMap* _pMap,
}
else
{
- USHORT nRelCount = sizeof(aRelationMap) / sizeof(RelationMap);
+ sal_uInt16 nRelCount = sizeof(aRelationMap) / sizeof(RelationMap);
// OD 14.11.2003 #i22341# - special handling for map <aVCharMap>,
// because its ambigous in its <eStrId>/<eMirrorStrId>.
@@ -1437,11 +1437,11 @@ ULONG SwFrmPage::FillRelLB( const FrmMap* _pMap,
nLBRelations = _pMap[_nLBSelPos].nLBRelations;
}
- for (ULONG nBit = 1; nBit < 0x80000000; nBit <<= 1)
+ for (sal_uLong nBit = 1; nBit < 0x80000000; nBit <<= 1)
{
if (nLBRelations & nBit)
{
- for (USHORT nRelPos = 0; nRelPos < nRelCount; nRelPos++)
+ for (sal_uInt16 nRelPos = 0; nRelPos < nRelCount; nRelPos++)
{
if (aRelationMap[nRelPos].nLBRelation == nBit)
{
@@ -1449,7 +1449,7 @@ ULONG SwFrmPage::FillRelLB( const FrmMap* _pMap,
aRelationMap[nRelPos].eMirrorStrId : aRelationMap[nRelPos].eStrId;
eStrId1 = lcl_ChangeResIdToVerticalOrRTL(eStrId1, bIsVerticalFrame, bIsInRightToLeft);
String sEntry = aFramePosString.GetString(eStrId1);
- USHORT nPos = _rLB.InsertEntry(sEntry);
+ sal_uInt16 nPos = _rLB.InsertEntry(sEntry);
_rLB.SetEntryData(nPos, &aRelationMap[nRelPos]);
if (!sSelEntry.Len() && aRelationMap[nRelPos].nRelation == _nRel)
sSelEntry = sEntry;
@@ -1482,7 +1482,7 @@ ULONG SwFrmPage::FillRelLB( const FrmMap* _pMap,
break;
}
- for (USHORT i = 0; i < _rLB.GetEntryCount(); i++)
+ for (sal_uInt16 i = 0; i < _rLB.GetEntryCount(); i++)
{
RelationMap *pEntry = (RelationMap *)_rLB.GetEntryData(i);
if (pEntry->nRelation == _nRel)
@@ -1515,7 +1515,7 @@ ULONG SwFrmPage::FillRelLB( const FrmMap* _pMap,
short SwFrmPage::GetRelation(FrmMap * /*pMap*/, ListBox &rRelationLB)
{
short nRel = 0;
- USHORT nPos = rRelationLB.GetSelectEntryPos();
+ sal_uInt16 nPos = rRelationLB.GetSelectEntryPos();
if (nPos != LISTBOX_ENTRY_NOTFOUND)
{
@@ -1530,7 +1530,7 @@ short SwFrmPage::GetRelation(FrmMap * /*pMap*/, ListBox &rRelationLB)
Beschreibung:
--------------------------------------------------------------------*/
-short SwFrmPage::GetAlignment(FrmMap *pMap, USHORT nMapPos,
+short SwFrmPage::GetAlignment(FrmMap *pMap, sal_uInt16 nMapPos,
ListBox &/*rAlignLB*/, ListBox &rRelationLB)
{
short nAlign = 0;
@@ -1542,7 +1542,7 @@ short SwFrmPage::GetAlignment(FrmMap *pMap, USHORT nMapPos,
{
if (rRelationLB.GetSelectEntryPos() != LISTBOX_ENTRY_NOTFOUND)
{
- ULONG nRel = ((RelationMap *)rRelationLB.GetEntryData(rRelationLB.GetSelectEntryPos()))->nLBRelation;
+ sal_uLong nRel = ((RelationMap *)rRelationLB.GetEntryData(rRelationLB.GetSelectEntryPos()))->nLBRelation;
size_t nMapCount = ::lcl_GetFrmMapCount(pMap);
SvxSwFramePosString::StringId eStrId = pMap[nMapPos].eStrId;
@@ -1550,7 +1550,7 @@ short SwFrmPage::GetAlignment(FrmMap *pMap, USHORT nMapPos,
{
if (pMap[i].eStrId == eStrId)
{
- ULONG nLBRelations = pMap[i].nLBRelations;
+ sal_uLong nLBRelations = pMap[i].nLBRelations;
if (nLBRelations & nRel)
{
nAlign = pMap[i].nAlign;
@@ -1570,10 +1570,10 @@ short SwFrmPage::GetAlignment(FrmMap *pMap, USHORT nMapPos,
Beschreibung:
--------------------------------------------------------------------*/
-USHORT SwFrmPage::GetMapPos( const FrmMap *pMap, ListBox &rAlignLB )
+sal_uInt16 SwFrmPage::GetMapPos( const FrmMap *pMap, ListBox &rAlignLB )
{
- USHORT nMapPos = 0;
- USHORT nLBSelPos = rAlignLB.GetSelectEntryPos();
+ sal_uInt16 nMapPos = 0;
+ sal_uInt16 nLBSelPos = rAlignLB.GetSelectEntryPos();
if (nLBSelPos != LISTBOX_ENTRY_NOTFOUND)
{
@@ -1591,7 +1591,7 @@ USHORT SwFrmPage::GetMapPos( const FrmMap *pMap, ListBox &rAlignLB )
if (sEntry == sSelEntry)
{
- nMapPos = static_cast< USHORT >(i);
+ nMapPos = static_cast< sal_uInt16 >(i);
break;
}
}
@@ -1635,9 +1635,9 @@ RndStdIds SwFrmPage::GetAnchor()
void SwFrmPage::ActivatePage(const SfxItemSet& rSet)
{
- bNoModifyHdl = TRUE;
+ bNoModifyHdl = sal_True;
Init(rSet);
- bNoModifyHdl = FALSE;
+ bNoModifyHdl = sal_False;
//lock PercentFields
aWidthED.LockAutoCalculation(sal_True);
aHeightED.LockAutoCalculation(sal_True);
@@ -1663,7 +1663,7 @@ int SwFrmPage::DeactivatePage(SfxItemSet * _pSet)
_pSet->Put( aAnc );
}
- return TRUE;
+ return sal_True;
}
/*--------------------------------------------------------------------
@@ -1723,7 +1723,7 @@ IMPL_LINK( SwFrmPage, RangeModifyHdl, Edit *, EMPTYARG )
SwFlyFrmAttrMgr aMgr( bNew, pSh, (const SwAttrSet&)GetItemSet() );
SvxSwFrameValidation aVal;
- aVal.nAnchorType = static_cast< USHORT >(GetAnchor());
+ aVal.nAnchorType = static_cast< sal_uInt16 >(GetAnchor());
aVal.bAutoHeight = aAutoHeightCB.IsChecked();
aVal.bAutoWidth = aAutoWidthCB.IsChecked();
aVal.bMirror = aMirrorPagesCB.IsChecked();
@@ -1733,7 +1733,7 @@ IMPL_LINK( SwFrmPage, RangeModifyHdl, Edit *, EMPTYARG )
if ( pHMap )
{
// Ausrichtung Horizontal
- USHORT nMapPos = GetMapPos(pHMap, aHorizontalDLB);
+ sal_uInt16 nMapPos = GetMapPos(pHMap, aHorizontalDLB);
short nAlign = GetAlignment(pHMap, nMapPos, aHorizontalDLB, aHoriRelationLB);
short nRel = GetRelation(pHMap, aHoriRelationLB);
@@ -1746,7 +1746,7 @@ IMPL_LINK( SwFrmPage, RangeModifyHdl, Edit *, EMPTYARG )
if ( pVMap )
{
// Ausrichtung Vertikal
- USHORT nMapPos = GetMapPos(pVMap, aVerticalDLB);
+ sal_uInt16 nMapPos = GetMapPos(pVMap, aVerticalDLB);
short nAlign = GetAlignment(pVMap, nMapPos, aVerticalDLB, aVertRelationLB);
short nRel = GetRelation(pVMap, aVertRelationLB);
@@ -1764,7 +1764,7 @@ IMPL_LINK( SwFrmPage, RangeModifyHdl, Edit *, EMPTYARG )
aVal.nHPos = nAtHorzPosVal;
aVal.nVPos = nAtVertPosVal;
- aMgr.ValidateMetrics(aVal, mpToCharCntntPos, TRUE); // Einmal, um Referenzwerte fuer prozentuale Werte zu erhalten
+ aMgr.ValidateMetrics(aVal, mpToCharCntntPos, sal_True); // Einmal, um Referenzwerte fuer prozentuale Werte zu erhalten
// Referenzwerte fuer fuer Prozentwerte setzen (100%) ...
aWidthED.SetRefValue(aVal.aPercentSize.Width());
@@ -1785,7 +1785,7 @@ IMPL_LINK( SwFrmPage, RangeModifyHdl, Edit *, EMPTYARG )
const SwFmtCol& rCol = (const SwFmtCol&)GetTabDialog()->GetExampleSet()->Get(RES_COL);
if ( rCol.GetColumns().Count() > 1 )
{
- for ( USHORT i = 0; i < rCol.GetColumns().Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rCol.GetColumns().Count(); ++i )
{
aVal.nMinWidth += rCol.GetColumns()[i]->GetLeft() +
rCol.GetColumns()[i]->GetRight() +
@@ -1875,23 +1875,23 @@ IMPL_LINK( SwFrmPage, AnchorTypeHdl, RadioButton *, EMPTYARG )
IMPL_LINK( SwFrmPage, PosHdl, ListBox *, pLB )
{
- BOOL bHori = pLB == &aHorizontalDLB;
+ sal_Bool bHori = pLB == &aHorizontalDLB;
ListBox *pRelLB = bHori ? &aHoriRelationLB : &aVertRelationLB;
FixedText *pRelFT = bHori ? &aHoriRelationFT : &aVertRelationFT;
FrmMap *pMap = bHori ? pHMap : pVMap;
- USHORT nMapPos = GetMapPos(pMap, *pLB);
+ sal_uInt16 nMapPos = GetMapPos(pMap, *pLB);
short nAlign = GetAlignment(pMap, nMapPos, *pLB, *pRelLB);
if (bHori)
{
- BOOL bEnable = text::HoriOrientation::NONE == nAlign;
+ sal_Bool bEnable = text::HoriOrientation::NONE == nAlign;
aAtHorzPosED.Enable( bEnable );
aAtHorzPosFT.Enable( bEnable );
}
else
{
- BOOL bEnable = text::VertOrientation::NONE == nAlign && m_bAllowVertPositioning;
+ sal_Bool bEnable = text::VertOrientation::NONE == nAlign && m_bAllowVertPositioning;
aAtVertPosED.Enable( bEnable );
aAtVertPosFT.Enable( bEnable );
}
@@ -1899,7 +1899,7 @@ IMPL_LINK( SwFrmPage, PosHdl, ListBox *, pLB )
if (pLB) // Nur wenn Handler durch Aenderung des Controllers gerufen wurde
RangeModifyHdl( 0 );
- USHORT nRel = 0;
+ sal_uInt16 nRel = 0;
if (pLB->GetSelectEntryCount())
{
@@ -1914,15 +1914,15 @@ IMPL_LINK( SwFrmPage, PosHdl, ListBox *, pLB )
UpdateExample();
if (bHori)
- bAtHorzPosModified = TRUE;
+ bAtHorzPosModified = sal_True;
else
- bAtVertPosModified = TRUE;
+ bAtVertPosModified = sal_True;
// Sonderbehandlung fuer HTML-Mode mit horz-vert-Abhaengigkeiten
if(bHtmlMode && nHtmlMode&HTMLMODE_SOME_ABS_POS &&
(FLY_AT_CHAR == GetAnchor()))
{
- BOOL bSet = FALSE;
+ sal_Bool bSet = sal_False;
if(bHori)
{
// rechts ist nur unterhalb erlaubt - von links nur oben
@@ -1934,17 +1934,17 @@ IMPL_LINK( SwFrmPage, PosHdl, ListBox *, pLB )
aVerticalDLB.SelectEntryPos(1);
else
aVerticalDLB.SelectEntryPos(0);
- bSet = TRUE;
+ bSet = sal_True;
}
else if(text::HoriOrientation::LEFT == nAlign && 1 == aVerticalDLB.GetSelectEntryPos())
{
aVerticalDLB.SelectEntryPos(0);
- bSet = TRUE;
+ bSet = sal_True;
}
else if(text::HoriOrientation::NONE == nAlign && 1 == aVerticalDLB.GetSelectEntryPos())
{
aVerticalDLB.SelectEntryPos(0);
- bSet = TRUE;
+ bSet = sal_True;
}
if(bSet)
PosHdl(&aVerticalDLB);
@@ -1956,7 +1956,7 @@ IMPL_LINK( SwFrmPage, PosHdl, ListBox *, pLB )
if(1 == aHorizontalDLB.GetSelectEntryPos())
{
aHorizontalDLB.SelectEntryPos(0);
- bSet = TRUE;
+ bSet = sal_True;
}
aHoriRelationLB.SelectEntryPos(1);
}
@@ -1965,7 +1965,7 @@ IMPL_LINK( SwFrmPage, PosHdl, ListBox *, pLB )
if(2 == aHorizontalDLB.GetSelectEntryPos())
{
aHorizontalDLB.SelectEntryPos(0);
- bSet = TRUE;
+ bSet = sal_True;
}
aHoriRelationLB.SelectEntryPos(0) ;
}
@@ -1983,20 +1983,20 @@ IMPL_LINK( SwFrmPage, PosHdl, ListBox *, pLB )
IMPL_LINK( SwFrmPage, RelHdl, ListBox *, pLB )
{
- BOOL bHori = pLB == &aHoriRelationLB;
+ sal_Bool bHori = pLB == &aHoriRelationLB;
UpdateExample();
if (bHori)
- bAtHorzPosModified = TRUE;
+ bAtHorzPosModified = sal_True;
else
- bAtVertPosModified = TRUE;
+ bAtVertPosModified = sal_True;
if (bHtmlMode && (FLY_AT_CHAR == GetAnchor()))
{
if(bHori)
{
- USHORT nRel = GetRelation(pHMap, aHoriRelationLB);
+ sal_uInt16 nRel = GetRelation(pHMap, aHoriRelationLB);
if(text::RelOrientation::PRINT_AREA == nRel && 0 == aVerticalDLB.GetSelectEntryPos())
{
aVerticalDLB.SelectEntryPos(1);
@@ -2067,10 +2067,10 @@ IMPL_LINK( SwFrmPage, ModifyHdl, Edit *, pEdit )
void SwFrmPage::UpdateExample()
{
- USHORT nPos = aHorizontalDLB.GetSelectEntryPos();
+ sal_uInt16 nPos = aHorizontalDLB.GetSelectEntryPos();
if ( pHMap && nPos != LISTBOX_ENTRY_NOTFOUND )
{
- USHORT nMapPos = GetMapPos(pHMap, aHorizontalDLB);
+ sal_uInt16 nMapPos = GetMapPos(pHMap, aHorizontalDLB);
short nAlign = GetAlignment(pHMap, nMapPos, aHorizontalDLB, aHoriRelationLB);
short nRel = GetRelation(pHMap, aHoriRelationLB);
@@ -2081,7 +2081,7 @@ void SwFrmPage::UpdateExample()
nPos = aVerticalDLB.GetSelectEntryPos();
if ( pVMap && nPos != LISTBOX_ENTRY_NOTFOUND )
{
- USHORT nMapPos = GetMapPos(pVMap, aVerticalDLB);
+ sal_uInt16 nMapPos = GetMapPos(pVMap, aVerticalDLB);
short nAlign = GetAlignment(pVMap, nMapPos, aVerticalDLB, aVertRelationLB);
short nRel = GetRelation(pVMap, aVertRelationLB);
@@ -2094,18 +2094,18 @@ void SwFrmPage::UpdateExample()
long nYPos = static_cast< long >(aAtVertPosED.Denormalize(aAtVertPosED.GetValue(FUNIT_TWIP)));
aExampleWN.SetRelPos(Point(nXPos, nYPos));
- aExampleWN.SetAnchor( static_cast< USHORT >(GetAnchor()) );
+ aExampleWN.SetAnchor( static_cast< sal_uInt16 >(GetAnchor()) );
aExampleWN.Invalidate();
}
-void SwFrmPage::Init(const SfxItemSet& rSet, BOOL bReset)
+void SwFrmPage::Init(const SfxItemSet& rSet, sal_Bool bReset)
{
if(!bFormat)
{
SwWrtShell* pSh = ((SwFrmDlg*)GetParent()->GetParent())->GetWrtShell();
// Size
- const BOOL bSizeFixed = pSh->IsSelObjProtected( FLYPROTECT_FIXED );
+ const sal_Bool bSizeFixed = pSh->IsSelObjProtected( FLYPROTECT_FIXED );
aWidthED .Enable( !bSizeFixed );
aHeightED.Enable( !bSizeFixed );
@@ -2117,9 +2117,9 @@ void SwFrmPage::Init(const SfxItemSet& rSet, BOOL bReset)
const SvGlobalName& rFactNm( pSh->GetOLEObject()->getClassID() );
struct _GlobalNameId {
- UINT32 n1;
- USHORT n2, n3;
- BYTE b8, b9, b10, b11, b12, b13, b14, b15;
+ sal_uInt32 n1;
+ sal_uInt16 n2, n3;
+ sal_uInt8 b8, b9, b10, b11, b12, b13, b14, b15;
} aGlbNmIds[4] = { { SO3_SM_CLASSID_60 }, { SO3_SM_CLASSID_50 },
{ SO3_SM_CLASSID_40 }, { SO3_SM_CLASSID_30 } };
@@ -2182,7 +2182,7 @@ void SwFrmPage::Init(const SfxItemSet& rSet, BOOL bReset)
if (!IsInGraficMode())
{
SwFrmSize eSize = rSize.GetHeightSizeType();
- BOOL bCheck = eSize != ATT_FIX_SIZE;
+ sal_Bool bCheck = eSize != ATT_FIX_SIZE;
aAutoHeightCB.Check( bCheck );
HandleAutoCB( bCheck, aHeightFT, aHeightAutoFT );
if( eSize == ATT_VAR_SIZE )
@@ -2200,7 +2200,7 @@ void SwFrmPage::Init(const SfxItemSet& rSet, BOOL bReset)
SwWrtShell* pSh = ((SwFrmDlg*)GetParent()->GetParent())->GetWrtShell();
const SwFrmFmt* pFmt = pSh->GetFlyFrmFmt();
if( pFmt && pFmt->GetChain().GetNext() )
- aAutoHeightCB.Enable( FALSE );
+ aAutoHeightCB.Enable( sal_False );
}
}
else
@@ -2219,7 +2219,7 @@ void SwFrmPage::Init(const SfxItemSet& rSet, BOOL bReset)
// Spalten
SwFmtCol aCol( (const SwFmtCol&)rSet.Get(RES_COL) );
- ::FitToActualSize( aCol, (USHORT)rSize.GetWidth() );
+ ::FitToActualSize( aCol, (sal_uInt16)rSize.GetWidth() );
RndStdIds eAnchorId = (RndStdIds)GetAnchor();
@@ -2261,7 +2261,7 @@ void SwFrmPage::Init(const SfxItemSet& rSet, BOOL bReset)
// Transparent fuers Bsp
// Umlauf fuers Bsp
const SwFmtSurround& rSurround = (const SwFmtSurround&)rSet.Get(RES_SURROUND);
- aExampleWN.SetWrap ( static_cast< USHORT >(rSurround.GetSurround()) );
+ aExampleWN.SetWrap ( static_cast< sal_uInt16 >(rSurround.GetSurround()) );
if ( rSurround.GetSurround() == SURROUND_THROUGHT )
{
@@ -2273,18 +2273,18 @@ void SwFrmPage::Init(const SfxItemSet& rSet, BOOL bReset)
RangeModifyHdl(&aWidthED); // Referenzwerte setzen (fuer 100%)
if (rSize.GetWidthPercent() == 0xff || rSize.GetHeightPercent() == 0xff)
- aFixedRatioCB.Check(TRUE);
+ aFixedRatioCB.Check(sal_True);
if (rSize.GetWidthPercent() && rSize.GetWidthPercent() != 0xff &&
!aRelWidthCB.IsChecked())
{
- aRelWidthCB.Check(TRUE);
+ aRelWidthCB.Check(sal_True);
RelSizeClickHdl(&aRelWidthCB);
aWidthED.SetPrcntValue(rSize.GetWidthPercent(), FUNIT_CUSTOM);
}
if (rSize.GetHeightPercent() && rSize.GetHeightPercent() != 0xff &&
!aRelHeightCB.IsChecked())
{
- aRelHeightCB.Check(TRUE);
+ aRelHeightCB.Check(sal_True);
RelSizeClickHdl(&aRelHeightCB);
aHeightED.SetPrcntValue(rSize.GetHeightPercent(), FUNIT_CUSTOM);
}
@@ -2292,14 +2292,14 @@ void SwFrmPage::Init(const SfxItemSet& rSet, BOOL bReset)
aRelHeightCB.SaveValue();
}
-USHORT* SwFrmPage::GetRanges()
+sal_uInt16* SwFrmPage::GetRanges()
{
return aPageRg;
}
/* -----------------------------03.11.00 10:52--------------------------------
---------------------------------------------------------------------------*/
-void SwFrmPage::SetFormatUsed(BOOL bFmt)
+void SwFrmPage::SetFormatUsed(sal_Bool bFmt)
{
bFormat = bFmt;
if(bFormat)
@@ -2385,14 +2385,14 @@ SfxTabPage* SwGrfExtPage::Create( Window *pParent, const SfxItemSet &rSet )
void SwGrfExtPage::Reset(const SfxItemSet &rSet)
{
const SfxPoolItem* pItem;
- USHORT nHtmlMode = ::GetHtmlMode((const SwDocShell*)SfxObjectShell::Current());
- bHtmlMode = nHtmlMode & HTMLMODE_ON ? TRUE : FALSE;
+ sal_uInt16 nHtmlMode = ::GetHtmlMode((const SwDocShell*)SfxObjectShell::Current());
+ bHtmlMode = nHtmlMode & HTMLMODE_ON ? sal_True : sal_False;
- if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_GRF_CONNECT, TRUE, &pItem)
+ if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_GRF_CONNECT, sal_True, &pItem)
&& ((const SfxBoolItem *)pItem)->GetValue() )
{
aBrowseBT.Enable();
- aConnectED.SetReadOnly(FALSE);
+ aConnectED.SetReadOnly(sal_False);
}
ActivatePage(rSet);
@@ -2405,34 +2405,34 @@ void SwGrfExtPage::Reset(const SfxItemSet &rSet)
void SwGrfExtPage::ActivatePage(const SfxItemSet& rSet)
{
const SvxProtectItem& rProt = (const SvxProtectItem& )rSet.Get(RES_PROTECT);
- BOOL bProtCntnt = rProt.IsCntntProtected();
+ sal_Bool bProtCntnt = rProt.IsCntntProtected();
const SfxPoolItem* pItem = 0;
- BOOL bEnable = FALSE;
- BOOL bEnableMirrorRB = FALSE;
+ sal_Bool bEnable = sal_False;
+ sal_Bool bEnableMirrorRB = sal_False;
- SfxItemState eState = rSet.GetItemState(RES_GRFATR_MIRRORGRF, TRUE, &pItem);
+ SfxItemState eState = rSet.GetItemState(RES_GRFATR_MIRRORGRF, sal_True, &pItem);
if( SFX_ITEM_UNKNOWN != eState && !bProtCntnt && !bHtmlMode )
{
if( SFX_ITEM_SET != eState )
pItem = &rSet.Get( RES_GRFATR_MIRRORGRF );
- bEnable = TRUE;
+ bEnable = sal_True;
MirrorGraph eMirror = static_cast< MirrorGraph >(((const SwMirrorGrf* )pItem)->GetValue());
switch( eMirror )
{
case RES_MIRROR_GRAPH_DONT: break;
- case RES_MIRROR_GRAPH_VERT: aMirrorHorzBox.Check(TRUE); break;
- case RES_MIRROR_GRAPH_HOR: aMirrorVertBox.Check(TRUE); break;
- case RES_MIRROR_GRAPH_BOTH: aMirrorHorzBox.Check(TRUE);
- aMirrorVertBox.Check(TRUE);
+ case RES_MIRROR_GRAPH_VERT: aMirrorHorzBox.Check(sal_True); break;
+ case RES_MIRROR_GRAPH_HOR: aMirrorVertBox.Check(sal_True); break;
+ case RES_MIRROR_GRAPH_BOTH: aMirrorHorzBox.Check(sal_True);
+ aMirrorVertBox.Check(sal_True);
break;
default:
;
}
- USHORT nPos = ((const SwMirrorGrf* )pItem)->IsGrfToggle() ? 1 : 0;
+ sal_uInt16 nPos = ((const SwMirrorGrf* )pItem)->IsGrfToggle() ? 1 : 0;
nPos += (eMirror == RES_MIRROR_GRAPH_VERT || eMirror == RES_MIRROR_GRAPH_BOTH)
? 2 : 0;
@@ -2442,7 +2442,7 @@ void SwGrfExtPage::ActivatePage(const SfxItemSet& rSet)
{
case 1: // Auf linken bzw geraden Seiten spiegeln
aLeftPagesRB.Check();
- aMirrorHorzBox.Check(TRUE);
+ aMirrorHorzBox.Check(sal_True);
break;
case 2: // Auf allen Seiten spiegeln
aAllPagesRB.Check();
@@ -2456,7 +2456,7 @@ void SwGrfExtPage::ActivatePage(const SfxItemSet& rSet)
}
}
- if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_GRAF_GRAPHIC, FALSE, &pItem ) )
+ if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_GRAF_GRAPHIC, sal_False, &pItem ) )
{
const SvxBrushItem& rBrush = *(SvxBrushItem*)pItem;
if( rBrush.GetGraphicLink() )
@@ -2491,22 +2491,22 @@ void SwGrfExtPage::ActivatePage(const SfxItemSet& rSet)
Beschreibung:
--------------------------------------------------------------------*/
-BOOL SwGrfExtPage::FillItemSet( SfxItemSet &rSet )
+sal_Bool SwGrfExtPage::FillItemSet( SfxItemSet &rSet )
{
- BOOL bModified = FALSE;
+ sal_Bool bModified = sal_False;
if ( aMirrorHorzBox.GetSavedValue() != aMirrorHorzBox.IsChecked() ||
aMirrorVertBox.GetSavedValue() != aMirrorVertBox.IsChecked() ||
aAllPagesRB .GetSavedValue() != aAllPagesRB .IsChecked() ||
aLeftPagesRB.GetSavedValue() != aLeftPagesRB.IsChecked() ||
aRightPagesRB.GetSavedValue() != aRightPagesRB.IsChecked())
{
- bModified = TRUE;
+ bModified = sal_True;
- BOOL bHori = FALSE;
+ sal_Bool bHori = sal_False;
if (aMirrorHorzBox.IsChecked() &&
!aLeftPagesRB.IsChecked())
- bHori = TRUE;
+ bHori = sal_True;
MirrorGraph eMirror;
eMirror = aMirrorVertBox.IsChecked() && bHori ?
@@ -2514,7 +2514,7 @@ BOOL SwGrfExtPage::FillItemSet( SfxItemSet &rSet )
RES_MIRROR_GRAPH_VERT : aMirrorVertBox.IsChecked() ?
RES_MIRROR_GRAPH_HOR : RES_MIRROR_GRAPH_DONT;
- BOOL bMirror = !aAllPagesRB.IsChecked();
+ sal_Bool bMirror = !aAllPagesRB.IsChecked();
SwMirrorGrf aMirror( eMirror );
aMirror.SetGrfToggle(bMirror );
rSet.Put( aMirror );
@@ -2522,7 +2522,7 @@ BOOL SwGrfExtPage::FillItemSet( SfxItemSet &rSet )
if( aGrfName != aNewGrfName || aConnectED.IsModified() )
{
- bModified = TRUE;
+ bModified = sal_True;
aGrfName = aConnectED.GetText();
rSet.Put( SvxBrushItem( aGrfName, aFilterName, GPOS_LT,
SID_ATTR_GRAF_GRAPHIC ));
@@ -2537,7 +2537,7 @@ int SwGrfExtPage::DeactivatePage(SfxItemSet *_pSet)
{
if( _pSet )
FillItemSet( *_pSet );
- return TRUE;
+ return sal_True;
}
/*--------------------------------------------------------------------
@@ -2570,19 +2570,19 @@ IMPL_LINK( SwGrfExtPage, BrowseHdl, Button *, EMPTYARG )
//Spiegeln zuruecksetzen, da u. U. eine Bitmap
//gegen eine andere Art von Grafik ausgetauscht worden ist,
//die nicht gespiegelt werden kann.
- aMirrorVertBox.Check(FALSE);
- aMirrorHorzBox.Check(FALSE);
- aAllPagesRB .Enable(FALSE);
- aLeftPagesRB.Enable(FALSE);
- aRightPagesRB.Enable(FALSE);
- aBmpWin.MirrorHorz(FALSE);
- aBmpWin.MirrorVert(FALSE);
+ aMirrorVertBox.Check(sal_False);
+ aMirrorHorzBox.Check(sal_False);
+ aAllPagesRB .Enable(sal_False);
+ aLeftPagesRB.Enable(sal_False);
+ aRightPagesRB.Enable(sal_False);
+ aBmpWin.MirrorHorz(sal_False);
+ aBmpWin.MirrorVert(sal_False);
Graphic aGraphic;
GraphicFilter::LoadGraphic( pGrfDlg->GetPath(), aEmptyStr, aGraphic );
aBmpWin.SetGraphic(aGraphic);
- BOOL bEnable = GRAPHIC_BITMAP == aGraphic.GetType() ||
+ sal_Bool bEnable = GRAPHIC_BITMAP == aGraphic.GetType() ||
GRAPHIC_GDIMETAFILE == aGraphic.GetType();
aMirrorVertBox.Enable(bEnable);
aMirrorHorzBox.Enable(bEnable);
@@ -2598,7 +2598,7 @@ IMPL_LINK( SwGrfExtPage, BrowseHdl, Button *, EMPTYARG )
IMPL_LINK( SwGrfExtPage, MirrorHdl, CheckBox *, EMPTYARG )
{
- BOOL bEnable = aMirrorHorzBox.IsChecked();
+ sal_Bool bEnable = aMirrorHorzBox.IsChecked();
aBmpWin.MirrorHorz( aMirrorVertBox.IsChecked() );
aBmpWin.MirrorVert( bEnable );
@@ -2617,16 +2617,16 @@ IMPL_LINK( SwGrfExtPage, MirrorHdl, CheckBox *, EMPTYARG )
Beschreibung: BeispielWindow
--------------------------------------------------------------------*/
-BmpWindow::BmpWindow( Window* pPar, USHORT nId,
+BmpWindow::BmpWindow( Window* pPar, sal_uInt16 nId,
const Graphic& rGraphic, const BitmapEx& rBmp, const BitmapEx& rBmpHC ) :
Window(pPar, SW_RES(nId)),
aGraphic(rGraphic),
aBmp(rBmp),
aBmpHC(rBmpHC),
- bHorz(FALSE),
- bVert(FALSE),
- bGraphic(FALSE),
- bLeftAlign(FALSE)
+ bHorz(sal_False),
+ bVert(sal_False),
+ bGraphic(sal_False),
+ bLeftAlign(sal_False)
{
SetBackground();
}
@@ -2725,14 +2725,14 @@ SwFrmURLPage::~SwFrmURLPage()
void SwFrmURLPage::Reset( const SfxItemSet &rSet )
{
const SfxPoolItem* pItem;
- if ( SFX_ITEM_SET == rSet.GetItemState( SID_DOCFRAME, TRUE, &pItem))
+ if ( SFX_ITEM_SET == rSet.GetItemState( SID_DOCFRAME, sal_True, &pItem))
{
TargetList* pList = new TargetList;
((const SfxFrameItem*)pItem)->GetFrame()->GetTargetList(*pList);
- USHORT nCount = (USHORT)pList->Count();
+ sal_uInt16 nCount = (sal_uInt16)pList->Count();
if( nCount )
{
- USHORT i;
+ sal_uInt16 i;
for ( i = 0; i < nCount; i++ )
{
aFrameCB.InsertEntry(*pList->GetObject(i));
@@ -2745,7 +2745,7 @@ void SwFrmURLPage::Reset( const SfxItemSet &rSet )
delete pList;
}
- if ( SFX_ITEM_SET == rSet.GetItemState( RES_URL, TRUE, &pItem ) )
+ if ( SFX_ITEM_SET == rSet.GetItemState( RES_URL, sal_True, &pItem ) )
{
const SwFmtURL* pFmtURL = (const SwFmtURL*)pItem;
aURLED.SetText( INetURLObject::decode( pFmtURL->GetURL(),
@@ -2762,7 +2762,7 @@ void SwFrmURLPage::Reset( const SfxItemSet &rSet )
aFrameCB.SaveValue();
}
else
- aClientCB.Enable( FALSE );
+ aClientCB.Enable( sal_False );
aServerCB.SaveValue();
aClientCB.SaveValue();
@@ -2774,9 +2774,9 @@ void SwFrmURLPage::Reset( const SfxItemSet &rSet )
Beschreibung:
***************************************************************************/
-BOOL SwFrmURLPage::FillItemSet(SfxItemSet &rSet)
+sal_Bool SwFrmURLPage::FillItemSet(SfxItemSet &rSet)
{
- BOOL bModified = FALSE;
+ sal_Bool bModified = sal_False;
const SwFmtURL* pOldURL = (SwFmtURL*)GetOldItem(rSet, RES_URL);
SwFmtURL* pFmtURL;
if(pOldURL)
@@ -2793,20 +2793,20 @@ BOOL SwFrmURLPage::FillItemSet(SfxItemSet &rSet)
{
pFmtURL->SetURL( sText, aServerCB.IsChecked() );
pFmtURL->SetName( aNameED.GetText() );
- bModified = TRUE;
+ bModified = sal_True;
}
}
if(!aClientCB.IsChecked() && pFmtURL->GetMap() != 0)
{
pFmtURL->SetMap(0);
- bModified = TRUE;
+ bModified = sal_True;
}
if(pFmtURL->GetTargetFrameName() != aFrameCB.GetText())
{
pFmtURL->SetTargetFrameName(aFrameCB.GetText());
- bModified = TRUE;
+ bModified = sal_True;
}
rSet.Put(*pFmtURL);
delete pFmtURL;
@@ -2923,8 +2923,8 @@ SfxTabPage* SwFrmAddPage::Create(Window *pParent, const SfxItemSet &rSet)
void SwFrmAddPage::Reset(const SfxItemSet &rSet )
{
const SfxPoolItem* pItem;
- USHORT nHtmlMode = ::GetHtmlMode((const SwDocShell*)SfxObjectShell::Current());
- bHtmlMode = nHtmlMode & HTMLMODE_ON ? TRUE : FALSE;
+ sal_uInt16 nHtmlMode = ::GetHtmlMode((const SwDocShell*)SfxObjectShell::Current());
+ bHtmlMode = nHtmlMode & HTMLMODE_ON ? sal_True : sal_False;
if(bHtmlMode)
{
aProtectContentCB .Hide();
@@ -2941,7 +2941,7 @@ void SwFrmAddPage::Reset(const SfxItemSet &rSet )
aPrintFrameCB.SetPosPixel(aEditInReadonlyCB.GetPosPixel());
}
- if(SFX_ITEM_SET == rSet.GetItemState(FN_SET_FRM_ALT_NAME, FALSE, &pItem))
+ if(SFX_ITEM_SET == rSet.GetItemState(FN_SET_FRM_ALT_NAME, sal_False, &pItem))
{
aAltNameED.SetText(((const SfxStringItem*)pItem)->GetValue());
aAltNameED.SaveValue();
@@ -2952,7 +2952,7 @@ void SwFrmAddPage::Reset(const SfxItemSet &rSet )
// Grafik einfuegen - Eigenschaften
// bNew ist nicht gesetzt, deswegen ueber Selektion erkennen
String aTmpName1;
- if(SFX_ITEM_SET == rSet.GetItemState(FN_SET_FRM_NAME, FALSE, &pItem))
+ if(SFX_ITEM_SET == rSet.GetItemState(FN_SET_FRM_NAME, sal_False, &pItem))
{
aTmpName1 = ((const SfxStringItem*)pItem)->GetValue();
}
@@ -2978,11 +2978,11 @@ void SwFrmAddPage::Reset(const SfxItemSet &rSet )
}
else
{
- aNameED.Enable( FALSE );
- aAltNameED.Enable(FALSE);
- aNameFT.Enable( FALSE );
- aAltNameFT.Enable(FALSE);
- aNamesFL.Enable(FALSE);
+ aNameED.Enable( sal_False );
+ aAltNameED.Enable(sal_False);
+ aNameFT.Enable( sal_False );
+ aAltNameFT.Enable(sal_False);
+ aNamesFL.Enable(sal_False);
}
if(nDlgType == DLG_FRM_STD && aAltNameFT.IsVisible())
{
@@ -3042,7 +3042,7 @@ void SwFrmAddPage::Reset(const SfxItemSet &rSet )
::std::vector< String > aThisPageFrames;
::std::vector< String > aNextPageFrames;
::std::vector< String > aRemainFrames;
- pWrtSh->GetConnectableFrmFmts(*pFmt, sNextChain, FALSE,
+ pWrtSh->GetConnectableFrmFmts(*pFmt, sNextChain, sal_False,
aPrevPageFrames, aThisPageFrames, aNextPageFrames, aRemainFrames );
lcl_InsertVectors(aPrevLB, aPrevPageFrames, aThisPageFrames, aNextPageFrames, aRemainFrames);
if(sPrevChain.Len())
@@ -3059,7 +3059,7 @@ void SwFrmAddPage::Reset(const SfxItemSet &rSet )
aRemainFrames.erase(aRemainFrames.begin(), aRemainFrames.end());
- pWrtSh->GetConnectableFrmFmts(*pFmt, sPrevChain, TRUE,
+ pWrtSh->GetConnectableFrmFmts(*pFmt, sPrevChain, sal_True,
aPrevPageFrames, aThisPageFrames, aNextPageFrames, aRemainFrames );
lcl_InsertVectors(aNextLB, aPrevPageFrames, aThisPageFrames, aNextPageFrames, aRemainFrames);
if(sNextChain.Len())
@@ -3093,7 +3093,7 @@ void SwFrmAddPage::Reset(const SfxItemSet &rSet )
if( (!bHtmlMode || (0 != (nHtmlMode&HTMLMODE_SOME_STYLES)))
&& DLG_FRM_GRF != nDlgType && DLG_FRM_OLE != nDlgType &&
SFX_ITEM_UNKNOWN != ( eState = rSet.GetItemState(
- RES_FRAMEDIR, TRUE )) )
+ RES_FRAMEDIR, sal_True )) )
{
aTextFlowFT.Show();
aTextFlowLB.Show();
@@ -3101,7 +3101,7 @@ void SwFrmAddPage::Reset(const SfxItemSet &rSet )
//vertical text flow is not possible in HTML
if(bHtmlMode)
{
- ULONG nData = FRMDIR_VERT_TOP_RIGHT;
+ sal_uLong nData = FRMDIR_VERT_TOP_RIGHT;
aTextFlowLB.RemoveEntry(aTextFlowLB.GetEntryPos((void*)nData));
}
sal_uInt16 nPos, nVal = ((SvxFrameDirectionItem&)rSet.Get(RES_FRAMEDIR)).GetValue();
@@ -3122,9 +3122,9 @@ void SwFrmAddPage::Reset(const SfxItemSet &rSet )
--------------------------------------------------*/
-BOOL SwFrmAddPage::FillItemSet(SfxItemSet &rSet)
+sal_Bool SwFrmAddPage::FillItemSet(SfxItemSet &rSet)
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if (aNameED.GetText() != aNameED.GetSavedValue())
bRet |= 0 != rSet.Put(SfxStringItem(FN_SET_FRM_NAME, aNameED.GetText()));
if (aAltNameED.GetText() != aAltNameED.GetSavedValue())
@@ -3139,7 +3139,7 @@ BOOL SwFrmAddPage::FillItemSet(SfxItemSet &rSet)
aProt != *pOldItem )
bRet |= 0 != rSet.Put( aProt);
- BOOL bChecked;
+ sal_Bool bChecked;
if ( (bChecked = aEditInReadonlyCB.IsChecked()) != aEditInReadonlyCB.GetSavedValue() )
bRet |= 0 != rSet.Put( SwFmtEditInReadonly( RES_EDIT_IN_READONLY, bChecked));
@@ -3188,7 +3188,7 @@ BOOL SwFrmAddPage::FillItemSet(SfxItemSet &rSet)
--------------------------------------------------*/
-USHORT* SwFrmAddPage::GetRanges()
+sal_uInt16* SwFrmAddPage::GetRanges()
{
return aAddPgRg;
}
@@ -3199,27 +3199,27 @@ USHORT* SwFrmAddPage::GetRanges()
IMPL_LINK(SwFrmAddPage, EditModifyHdl, Edit*, EMPTYARG)
{
- BOOL bEnable = 0 != aNameED.GetText().Len();
+ sal_Bool bEnable = 0 != aNameED.GetText().Len();
aAltNameED.Enable(bEnable);
aAltNameFT.Enable(bEnable);
return 0;
}
//-----------------------------------------------------------------------------
-void SwFrmAddPage::SetFormatUsed(BOOL bFmt)
+void SwFrmAddPage::SetFormatUsed(sal_Bool bFmt)
{
bFormat = bFmt;
if(bFormat)
{
- aNameFT.Show(FALSE);
- aNameED.Show(FALSE);
- aAltNameFT.Show(FALSE);
- aAltNameED.Show(FALSE);
- aPrevFT.Show(FALSE);
- aPrevLB.Show(FALSE);
- aNextFT.Show(FALSE);
- aNextLB.Show(FALSE);
- aNamesFL.Show(FALSE);
+ aNameFT.Show(sal_False);
+ aNameED.Show(sal_False);
+ aAltNameFT.Show(sal_False);
+ aAltNameED.Show(sal_False);
+ aPrevFT.Show(sal_False);
+ aPrevLB.Show(sal_False);
+ aNextFT.Show(sal_False);
+ aNextLB.Show(sal_False);
+ aNamesFL.Show(sal_False);
sal_Int32 nDiff = aExtFL.GetPosPixel().Y() - aNamesFL.GetPosPixel().Y();
Window* aWindows[] =
@@ -3253,9 +3253,9 @@ IMPL_LINK(SwFrmAddPage, ChainModifyHdl, ListBox*, pBox)
SwFrmFmt* pFmt = pWrtSh->GetFlyFrmFmt();
if (pFmt)
{
- BOOL bNextBox = &aNextLB == pBox;
+ sal_Bool bNextBox = &aNextLB == pBox;
ListBox& rChangeLB = bNextBox ? aPrevLB : aNextLB;
- for(USHORT nEntry = rChangeLB.GetEntryCount(); nEntry > 1; nEntry--)
+ for(sal_uInt16 nEntry = rChangeLB.GetEntryCount(); nEntry > 1; nEntry--)
rChangeLB.RemoveEntry(nEntry - 1);
//determine chainable frames
::std::vector< String > aPrevPageFrames;
diff --git a/sw/source/ui/frmdlg/uiborder.cxx b/sw/source/ui/frmdlg/uiborder.cxx
index 560961951a..af4399679f 100644
--- a/sw/source/ui/frmdlg/uiborder.cxx
+++ b/sw/source/ui/frmdlg/uiborder.cxx
@@ -47,7 +47,7 @@
-SwBorderDlg::SwBorderDlg(Window* pParent, SfxItemSet& rSet, USHORT nType) :
+SwBorderDlg::SwBorderDlg(Window* pParent, SfxItemSet& rSet, sal_uInt16 nType) :
SfxSingleTabDialog(pParent, rSet, 0)
diff --git a/sw/source/ui/frmdlg/wrap.cxx b/sw/source/ui/frmdlg/wrap.cxx
index fcc37756eb..65bba74b04 100644
--- a/sw/source/ui/frmdlg/wrap.cxx
+++ b/sw/source/ui/frmdlg/wrap.cxx
@@ -65,7 +65,7 @@ using namespace ::com::sun::star;
Beschreibung:
--------------------------------------------------------------------*/
-static USHORT __FAR_DATA aWrapPageRg[] = {
+static sal_uInt16 __FAR_DATA aWrapPageRg[] = {
RES_LR_SPACE, RES_UL_SPACE,
RES_PROTECT, RES_SURROUND,
RES_PRINT, RES_PRINT,
@@ -79,14 +79,14 @@ static USHORT __FAR_DATA aWrapPageRg[] = {
-SwWrapDlg::SwWrapDlg(Window* pParent, SfxItemSet& rSet, SwWrtShell* pSh, BOOL bDrawMode) :
+SwWrapDlg::SwWrapDlg(Window* pParent, SfxItemSet& rSet, SwWrtShell* pSh, sal_Bool bDrawMode) :
SfxSingleTabDialog(pParent, rSet, 0),
pWrtShell(pSh)
{
// TabPage erzeugen
SwWrapTabPage* pNewPage = (SwWrapTabPage*) SwWrapTabPage::Create(this, rSet);
- pNewPage->SetFormatUsed(FALSE, bDrawMode);
+ pNewPage->SetFormatUsed(sal_False, bDrawMode);
pNewPage->SetShell(pWrtShell);
SetTabPage(pNewPage);
@@ -142,10 +142,10 @@ SwWrapTabPage::SwWrapTabPage(Window *pParent, const SfxItemSet &rSet) :
pWrtSh(0),
- bFormat(FALSE),
- bNew(TRUE),
- bHtmlMode(FALSE),
- bContourImage(FALSE)
+ bFormat(sal_False),
+ bNew(sal_True),
+ bHtmlMode(sal_False),
+ bContourImage(sal_False)
{
FreeResource();
@@ -219,14 +219,14 @@ void SwWrapTabPage::Reset(const SfxItemSet &rSet)
}
else
{
- BOOL bShowCB = bFormat;
+ sal_Bool bShowCB = bFormat;
if( !bFormat )
{
int nSelType = pWrtSh->GetSelectionType();
if( ( nSelType & nsSelectionType::SEL_GRF ) ||
( nSelType & nsSelectionType::SEL_OLE && GRAPHIC_NONE !=
pWrtSh->GetIMapGraphic().GetType() ))
- bShowCB = TRUE;
+ bShowCB = sal_True;
}
if( bShowCB )
{
@@ -236,7 +236,7 @@ void SwWrapTabPage::Reset(const SfxItemSet &rSet)
}
nHtmlMode = ::GetHtmlMode((const SwDocShell*)SfxObjectShell::Current());
- bHtmlMode = nHtmlMode & HTMLMODE_ON ? TRUE : FALSE;
+ bHtmlMode = nHtmlMode & HTMLMODE_ON ? sal_True : sal_False;
FieldUnit aMetric = ::GetDfltMetric(bHtmlMode);
SetMetric( aLeftMarginED , aMetric );
@@ -257,10 +257,10 @@ void SwWrapTabPage::Reset(const SfxItemSet &rSet)
}
else
{
- aWrapAnchorOnlyCB.Enable( FALSE );
+ aWrapAnchorOnlyCB.Enable( sal_False );
}
- BOOL bContour = rSurround.IsContour();
+ sal_Bool bContour = rSurround.IsContour();
aWrapOutlineCB.Check( bContour );
aWrapOutsideCB.Check( rSurround.IsOutside() );
aWrapThroughRB.Enable(!aWrapOutlineCB.IsChecked());
@@ -340,9 +340,9 @@ void SwWrapTabPage::Reset(const SfxItemSet &rSet)
-BOOL SwWrapTabPage::FillItemSet(SfxItemSet &rSet)
+sal_Bool SwWrapTabPage::FillItemSet(SfxItemSet &rSet)
{
- BOOL bModified = FALSE;
+ sal_Bool bModified = sal_False;
const SfxPoolItem* pOldItem;
const SwFmtSurround& rOldSur = (const SwFmtSurround&)GetItemSet().Get(RES_SURROUND);
@@ -354,7 +354,7 @@ BOOL SwWrapTabPage::FillItemSet(SfxItemSet &rSet)
{
const SvxOpaqueItem& rOpaque = (const SvxOpaqueItem&)GetItemSet().Get(RES_OPAQUE);
aOp = rOpaque;
- aOp.SetValue(TRUE);
+ aOp.SetValue(sal_True);
}
if (aNoWrapRB.IsChecked())
@@ -369,13 +369,13 @@ BOOL SwWrapTabPage::FillItemSet(SfxItemSet &rSet)
{
aSur.SetSurround(SURROUND_THROUGHT);
if (aWrapTransparentCB.IsChecked() && !bDrawMode)
- aOp.SetValue(FALSE);
+ aOp.SetValue(sal_False);
}
else if (aIdealWrapRB.IsChecked())
aSur.SetSurround(SURROUND_IDEAL);
aSur.SetAnchorOnly( aWrapAnchorOnlyCB.IsChecked() );
- BOOL bContour = aWrapOutlineCB.IsChecked() && aWrapOutlineCB.IsEnabled();
+ sal_Bool bContour = aWrapOutlineCB.IsChecked() && aWrapOutlineCB.IsEnabled();
aSur.SetContour( bContour );
if ( bContour )
@@ -385,7 +385,7 @@ BOOL SwWrapTabPage::FillItemSet(SfxItemSet &rSet)
aSur != *pOldItem )
{
rSet.Put(aSur);
- bModified = TRUE;
+ bModified = sal_True;
}
if (!bDrawMode)
@@ -394,16 +394,16 @@ BOOL SwWrapTabPage::FillItemSet(SfxItemSet &rSet)
aOp != *pOldItem )
{
rSet.Put(aOp);
- bModified = TRUE;
+ bModified = sal_True;
}
}
- BOOL bTopMod = aTopMarginED.IsValueModified();
- BOOL bBottomMod = aBottomMarginED.IsValueModified();
+ sal_Bool bTopMod = aTopMarginED.IsValueModified();
+ sal_Bool bBottomMod = aBottomMarginED.IsValueModified();
SvxULSpaceItem aUL( RES_UL_SPACE );
- aUL.SetUpper((USHORT)aTopMarginED.Denormalize(aTopMarginED.GetValue(FUNIT_TWIP)));
- aUL.SetLower((USHORT)aBottomMarginED.Denormalize(aBottomMarginED.GetValue(FUNIT_TWIP)));
+ aUL.SetUpper((sal_uInt16)aTopMarginED.Denormalize(aTopMarginED.GetValue(FUNIT_TWIP)));
+ aUL.SetLower((sal_uInt16)aBottomMarginED.Denormalize(aBottomMarginED.GetValue(FUNIT_TWIP)));
if ( bTopMod || bBottomMod )
{
@@ -411,16 +411,16 @@ BOOL SwWrapTabPage::FillItemSet(SfxItemSet &rSet)
aUL != *pOldItem )
{
rSet.Put( aUL, RES_UL_SPACE );
- bModified = TRUE;
+ bModified = sal_True;
}
}
- BOOL bLeftMod = aLeftMarginED.IsValueModified();
- BOOL bRightMod = aRightMarginED.IsValueModified();
+ sal_Bool bLeftMod = aLeftMarginED.IsValueModified();
+ sal_Bool bRightMod = aRightMarginED.IsValueModified();
SvxLRSpaceItem aLR( RES_LR_SPACE );
- aLR.SetLeft((USHORT)aLeftMarginED.Denormalize(aLeftMarginED.GetValue(FUNIT_TWIP)));
- aLR.SetRight((USHORT)aRightMarginED.Denormalize(aRightMarginED.GetValue(FUNIT_TWIP)));
+ aLR.SetLeft((sal_uInt16)aLeftMarginED.Denormalize(aLeftMarginED.GetValue(FUNIT_TWIP)));
+ aLR.SetRight((sal_uInt16)aRightMarginED.Denormalize(aRightMarginED.GetValue(FUNIT_TWIP)));
if ( bLeftMod || bRightMod )
{
@@ -428,13 +428,13 @@ BOOL SwWrapTabPage::FillItemSet(SfxItemSet &rSet)
aLR != *pOldItem )
{
rSet.Put(aLR, RES_LR_SPACE);
- bModified = TRUE;
+ bModified = sal_True;
}
}
if ( bDrawMode )
{
- BOOL bChecked = aWrapTransparentCB.IsChecked() & aWrapTransparentCB.IsEnabled();
+ sal_Bool bChecked = aWrapTransparentCB.IsChecked() & aWrapTransparentCB.IsEnabled();
if (aWrapTransparentCB.GetSavedValue() != bChecked)
bModified |= 0 != rSet.Put(SfxInt16Item(FN_DRAW_WRAP_DLG, bChecked ? 0 : 1));
}
@@ -453,7 +453,7 @@ void SwWrapTabPage::ActivatePage(const SfxItemSet& rSet)
// Anchor
const SwFmtAnchor &rAnch = (const SwFmtAnchor&)rSet.Get(RES_ANCHOR);
nAnchorId = rAnch.GetAnchorId();
- BOOL bEnable = (nAnchorId != FLY_AS_CHAR);
+ sal_Bool bEnable = (nAnchorId != FLY_AS_CHAR);
if (!bDrawMode)
{
@@ -468,10 +468,10 @@ void SwWrapTabPage::ActivatePage(const SfxItemSet& rSet)
// Rand
const SvxULSpaceItem& rUL = (const SvxULSpaceItem&)rSet.Get(RES_UL_SPACE);
const SvxLRSpaceItem& rLR = (const SvxLRSpaceItem&)rSet.Get(RES_LR_SPACE);
- nOldLeftMargin = static_cast< USHORT >(rLR.GetLeft());
- nOldRightMargin = static_cast< USHORT >(rLR.GetRight());
- nOldUpperMargin = static_cast< USHORT >(rUL.GetUpper());
- nOldLowerMargin = static_cast< USHORT >(rUL.GetLower());
+ nOldLeftMargin = static_cast< sal_uInt16 >(rLR.GetLeft());
+ nOldRightMargin = static_cast< sal_uInt16 >(rLR.GetRight());
+ nOldUpperMargin = static_cast< sal_uInt16 >(rUL.GetUpper());
+ nOldLowerMargin = static_cast< sal_uInt16 >(rUL.GetLower());
// Position
const SwFmtHoriOrient& rHori = (const SwFmtHoriOrient&)rSet.Get(RES_HORI_ORIENT);
@@ -562,7 +562,7 @@ void SwWrapTabPage::ActivatePage(const SfxItemSet& rSet)
aWrapTransparentCB.Enable( bEnable && !bHtmlMode && nSur == SURROUND_THROUGHT );
if(bHtmlMode)
{
- BOOL bSomeAbsPos = 0 != (nHtmlMode & HTMLMODE_SOME_ABS_POS);
+ sal_Bool bSomeAbsPos = 0 != (nHtmlMode & HTMLMODE_SOME_ABS_POS);
const SwFmtHoriOrient& rHori = (const SwFmtHoriOrient&)rSet.Get(RES_HORI_ORIENT);
sal_Int16 eHOrient = rHori.GetHoriOrient();
sal_Int16 eHRelOrient = rHori.GetRelationOrient();
@@ -572,12 +572,12 @@ void SwWrapTabPage::ActivatePage(const SfxItemSet& rSet)
(eHOrient == text::HoriOrientation::RIGHT || eHOrient == text::HoriOrientation::LEFT);
aWrapAnchorOnlyCB.Enable( bAllHtmlModes && nSur != SURROUND_NONE );
aWrapOutsideCB.Hide();
- aIdealWrapRB.Enable( FALSE );
+ aIdealWrapRB.Enable( sal_False );
- aWrapTransparentCB.Enable( FALSE );
+ aWrapTransparentCB.Enable( sal_False );
aNoWrapRB.Enable( FLY_AT_PARA == nAnchorId );
- aWrapParallelRB.Enable( FALSE );
+ aWrapParallelRB.Enable( sal_False );
aWrapLeftRB .Enable
( (FLY_AT_PARA == nAnchorId)
|| ( (FLY_AT_CHAR == nAnchorId)
@@ -599,7 +599,7 @@ void SwWrapTabPage::ActivatePage(const SfxItemSet& rSet)
if(aNoWrapRB.IsChecked() && !aNoWrapRB.IsEnabled())
{
if(aWrapThroughRB.IsEnabled())
- aWrapThroughRB.Check(TRUE);
+ aWrapThroughRB.Check(sal_True);
else if(aWrapLeftRB.IsEnabled())
aWrapLeftRB.Check();
else if(aWrapRightRB.IsEnabled())
@@ -649,7 +649,7 @@ int SwWrapTabPage::DeactivatePage(SfxItemSet* _pSet)
if(_pSet)
FillItemSet(*_pSet);
- return TRUE;
+ return sal_True;
}
/*--------------------------------------------------------------------
@@ -703,7 +703,7 @@ IMPL_LINK( SwWrapTabPage, RangeModifyHdl, MetricField *, pEdit )
IMPL_LINK( SwWrapTabPage, WrapTypeHdl, ImageRadioButton *, pBtn )
{
- BOOL bWrapThrough = (pBtn == &aWrapThroughRB);
+ sal_Bool bWrapThrough = (pBtn == &aWrapThroughRB);
aWrapTransparentCB.Enable( bWrapThrough && !bHtmlMode );
bWrapThrough |= ( nAnchorId == FLY_AS_CHAR );
aWrapOutlineCB.Enable( !bWrapThrough && pBtn != &aNoWrapRB);
@@ -724,7 +724,7 @@ IMPL_LINK( SwWrapTabPage, WrapTypeHdl, ImageRadioButton *, pBtn )
IMPL_LINK( SwWrapTabPage, ContourHdl, CheckBox *, EMPTYARG )
{
- BOOL bEnable = !(aWrapOutlineCB.IsChecked() && aWrapOutlineCB.IsEnabled());
+ sal_Bool bEnable = !(aWrapOutlineCB.IsChecked() && aWrapOutlineCB.IsEnabled());
aWrapOutsideCB.Enable(!bEnable);
@@ -741,7 +741,7 @@ IMPL_LINK( SwWrapTabPage, ContourHdl, CheckBox *, EMPTYARG )
/*--------------------------------------------------------------------
Beschreibung:
--------------------------------------------------------------------*/
-USHORT* SwWrapTabPage::GetRanges()
+sal_uInt16* SwWrapTabPage::GetRanges()
{
return aWrapPageRg;
}
@@ -765,7 +765,7 @@ void SwWrapTabPage::ApplyImageList()
aWrapILH : aWrapIL;
aWrapThroughRB.SetModeRadioImage(rImgLst.GetImage(IMG_THROUGH));
- BOOL bWrapOutline = !aWrapOutlineCB.IsChecked();
+ sal_Bool bWrapOutline = !aWrapOutlineCB.IsChecked();
if(bWrapOutline)
{
aNoWrapRB.SetModeRadioImage(rImgLst.GetImage(IMG_NONE));
diff --git a/sw/source/ui/inc/DropDownFieldDialog.hxx b/sw/source/ui/inc/DropDownFieldDialog.hxx
index 3308f5e4b1..a9b7091303 100644
--- a/sw/source/ui/inc/DropDownFieldDialog.hxx
+++ b/sw/source/ui/inc/DropDownFieldDialog.hxx
@@ -62,7 +62,7 @@ class DropDownFieldDialog : public SvxStandardDialog
virtual void Apply();
public:
DropDownFieldDialog( Window *pParent, SwWrtShell &rSh,
- SwField* pField, BOOL bNextButton = FALSE );
+ SwField* pField, sal_Bool bNextButton = sal_False );
~DropDownFieldDialog();
};
} //namespace sw
diff --git a/sw/source/ui/inc/SwSpellDialogChildWindow.hxx b/sw/source/ui/inc/SwSpellDialogChildWindow.hxx
index cc7462f6d8..bed586c26d 100644
--- a/sw/source/ui/inc/SwSpellDialogChildWindow.hxx
+++ b/sw/source/ui/inc/SwSpellDialogChildWindow.hxx
@@ -61,7 +61,7 @@ protected:
public:
SwSpellDialogChildWindow (
Window*pParent,
- USHORT nId,
+ sal_uInt16 nId,
SfxBindings* pBindings,
SfxChildWinInfo* pInfo);
~SwSpellDialogChildWindow();
diff --git a/sw/source/ui/inc/abstract.hxx b/sw/source/ui/inc/abstract.hxx
index 2df6f6c0c9..6904795be6 100644
--- a/sw/source/ui/inc/abstract.hxx
+++ b/sw/source/ui/inc/abstract.hxx
@@ -63,8 +63,8 @@ public:
SwInsertAbstractDlg( Window* pParent );
~SwInsertAbstractDlg();
- BYTE GetLevel() const;
- BYTE GetPara() const;
+ sal_uInt8 GetLevel() const;
+ sal_uInt8 GetPara() const;
};
#endif
diff --git a/sw/source/ui/inc/annotsh.hxx b/sw/source/ui/inc/annotsh.hxx
index 51bb596061..8937c64b60 100755
--- a/sw/source/ui/inc/annotsh.hxx
+++ b/sw/source/ui/inc/annotsh.hxx
@@ -67,11 +67,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 0bdec40ba8..0c75b2cedf 100644
--- a/sw/source/ui/inc/ascfldlg.hxx
+++ b/sw/source/ui/inc/ascfldlg.hxx
@@ -55,7 +55,7 @@ class SwAsciiFilterDlg : public SfxModalDialog
CancelButton aCancelPB;
HelpButton aHelpPB;
String sSystemCharSet;
- BOOL bSaveLineStatus;
+ sal_Bool bSaveLineStatus;
DECL_LINK( CharSetSelHdl, SvxTextEncodingBox* );
DECL_LINK( LineEndHdl, RadioButton* );
diff --git a/sw/source/ui/inc/basesh.hxx b/sw/source/ui/inc/basesh.hxx
index 9a0e0b48d6..422957924e 100644
--- a/sw/source/ui/inc/basesh.hxx
+++ b/sw/source/ui/inc/basesh.hxx
@@ -69,7 +69,7 @@ protected:
inline SwView& GetView() { return rView; }
inline void SetGetStateSet( SfxItemSet* p ) { pGetStateSet = p; }
- inline BOOL AddGrfUpdateSlot( USHORT nSlot ){ return aGrfUpdateSlots.Insert( nSlot ); }
+ inline sal_Bool AddGrfUpdateSlot( sal_uInt16 nSlot ){ return aGrfUpdateSlots.Insert( nSlot ); }
DECL_STATIC_LINK( SwBaseShell, InsertDBTextHdl, DBTextStruct_Impl* );
@@ -108,7 +108,7 @@ public:
void GetBckColState(SfxItemSet &rSet);
void ExecBckCol(SfxRequest& rReq);
- void SetWrapMode( USHORT nSlot );
+ void SetWrapMode( sal_uInt16 nSlot );
void StateDisableItems(SfxItemSet &);
diff --git a/sw/source/ui/inc/bmpwin.hxx b/sw/source/ui/inc/bmpwin.hxx
index 8f60ed3e13..4170c956ff 100644
--- a/sw/source/ui/inc/bmpwin.hxx
+++ b/sw/source/ui/inc/bmpwin.hxx
@@ -47,22 +47,22 @@ private:
BitmapEx aBmp;
BitmapEx aBmpHC;
- BOOL bHorz : 1;
- BOOL bVert : 1;
- BOOL bGraphic : 1;
- BOOL bLeftAlign : 1;
+ sal_Bool bHorz : 1;
+ sal_Bool bVert : 1;
+ sal_Bool bGraphic : 1;
+ sal_Bool bLeftAlign : 1;
void Paint(const Rectangle& rRect);
public:
- BmpWindow(Window* pPar, USHORT nId,
+ BmpWindow(Window* pPar, sal_uInt16 nId,
const Graphic& rGraphic, const BitmapEx& rBmp, const BitmapEx& rBmpHC);
BmpWindow(Window* pParent, const ResId rResId) :
Window(pParent, rResId),
- bHorz(FALSE), bVert(FALSE),bGraphic(FALSE), bLeftAlign(TRUE) {}
+ bHorz(sal_False), bVert(sal_False),bGraphic(sal_False), bLeftAlign(sal_True) {}
~BmpWindow();
- void MirrorVert(BOOL bMirror) { bVert = bMirror; Invalidate(); }
- void MirrorHorz(BOOL bMirror) { bHorz = bMirror; Invalidate(); }
+ void MirrorVert(sal_Bool bMirror) { bVert = bMirror; Invalidate(); }
+ void MirrorHorz(sal_Bool bMirror) { bHorz = bMirror; Invalidate(); }
void SetGraphic(const Graphic& rGrf);
};
diff --git a/sw/source/ui/inc/bookctrl.hxx b/sw/source/ui/inc/bookctrl.hxx
index 426aedf11d..9c4cbbe8f6 100644
--- a/sw/source/ui/inc/bookctrl.hxx
+++ b/sw/source/ui/inc/bookctrl.hxx
@@ -39,13 +39,13 @@ class SwBookmarkControl : public SfxStatusBarControl
virtual void Command( const CommandEvent& rCEvt );
public:
- virtual void StateChanged( USHORT nSID, SfxItemState eState,
+ virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState,
const SfxPoolItem* pState );
virtual void Paint( const UserDrawEvent& rEvt );
SFX_DECL_STATUSBAR_CONTROL();
- SwBookmarkControl( USHORT nSlotId, USHORT nId, StatusBar& rStb );
+ SwBookmarkControl( sal_uInt16 nSlotId, sal_uInt16 nId, StatusBar& rStb );
~SwBookmarkControl();
private:
diff --git a/sw/source/ui/inc/bookmark.hxx b/sw/source/ui/inc/bookmark.hxx
index b6678c4088..767ab14963 100644
--- a/sw/source/ui/inc/bookmark.hxx
+++ b/sw/source/ui/inc/bookmark.hxx
@@ -45,16 +45,16 @@ class SfxRequest;
class BookmarkCombo : public SwComboBox
{
- USHORT GetFirstSelEntryPos() const;
- USHORT GetNextSelEntryPos(USHORT nPos) const;
- USHORT GetSelEntryPos(USHORT nPos) const;
+ sal_uInt16 GetFirstSelEntryPos() const;
+ sal_uInt16 GetNextSelEntryPos(sal_uInt16 nPos) const;
+ sal_uInt16 GetSelEntryPos(sal_uInt16 nPos) const;
virtual long PreNotify(NotifyEvent& rNEvt);
public:
BookmarkCombo( Window* pWin, const ResId& rResId );
- USHORT GetSelectEntryCount() const;
- USHORT GetSelectEntryPos( USHORT nSelIndex = 0 ) const;
+ sal_uInt16 GetSelectEntryCount() const;
+ sal_uInt16 GetSelectEntryPos( sal_uInt16 nSelIndex = 0 ) const;
static const String aForbiddenChars;
};
diff --git a/sw/source/ui/inc/break.hxx b/sw/source/ui/inc/break.hxx
index eab0047edf..b56826d223 100644
--- a/sw/source/ui/inc/break.hxx
+++ b/sw/source/ui/inc/break.hxx
@@ -64,10 +64,10 @@ class SwBreakDlg: public SvxStandardDialog
HelpButton aHelpBtn;
String aTemplate;
- USHORT nKind;
- USHORT nPgNum;
+ sal_uInt16 nKind;
+ sal_uInt16 nPgNum;
- BOOL bHtmlMode;
+ sal_Bool bHtmlMode;
DECL_LINK( ClickHdl, void * );
DECL_LINK( PageNumHdl, CheckBox * );
@@ -84,8 +84,8 @@ public:
~SwBreakDlg();
String GetTemplateName() { return aTemplate; }
- USHORT GetKind() { return nKind; }
- USHORT GetPageNumber() { return nPgNum; }
+ sal_uInt16 GetKind() { return nKind; }
+ sal_uInt16 GetPageNumber() { return nPgNum; }
};
#endif
diff --git a/sw/source/ui/inc/caption.hxx b/sw/source/ui/inc/caption.hxx
index ffadad1520..b27dfd1208 100644
--- a/sw/source/ui/inc/caption.hxx
+++ b/sw/source/ui/inc/caption.hxx
@@ -42,29 +42,29 @@
class SW_DLLPUBLIC InsCaptionOpt
{
private:
- BOOL bUseCaption;
+ sal_Bool bUseCaption;
SwCapObjType eObjType;
SvGlobalName aOleId;
String sCategory;
- USHORT nNumType;
+ sal_uInt16 nNumType;
::rtl::OUString sNumberSeparator;
String sCaption;
- USHORT nPos;
- USHORT nLevel;
+ sal_uInt16 nPos;
+ sal_uInt16 nLevel;
// sal_Unicode cSeparator;
String sSeparator;
String sCharacterStyle;
- BOOL bIgnoreSeqOpts; // wird nicht gespeichert
- BOOL bCopyAttributes; // -""-
+ sal_Bool bIgnoreSeqOpts; // wird nicht gespeichert
+ sal_Bool bCopyAttributes; // -""-
public:
InsCaptionOpt(const SwCapObjType eType = FRAME_CAP, const SvGlobalName* pOleId = 0);
InsCaptionOpt(const InsCaptionOpt&);
~InsCaptionOpt();
- inline BOOL& UseCaption() { return bUseCaption; }
- inline BOOL UseCaption() const { return bUseCaption; }
+ inline sal_Bool& UseCaption() { return bUseCaption; }
+ inline sal_Bool UseCaption() const { return bUseCaption; }
inline SwCapObjType GetObjType() const { return eObjType; }
inline void SetObjType(const SwCapObjType eType) { eObjType = eType; }
@@ -75,8 +75,8 @@ public:
inline const String& GetCategory() const { return sCategory; }
inline void SetCategory(const String& rCat) { sCategory = rCat; }
- inline USHORT GetNumType() const { return nNumType; }
- inline void SetNumType(const USHORT nNT) { nNumType = nNT; }
+ inline sal_uInt16 GetNumType() const { return nNumType; }
+ inline void SetNumType(const sal_uInt16 nNT) { nNumType = nNT; }
const ::rtl::OUString& GetNumSeparator() const { return sNumberSeparator; }
void SetNumSeparator(const ::rtl::OUString& rSet) {sNumberSeparator = rSet;}
@@ -84,11 +84,11 @@ public:
inline const String& GetCaption() const { return sCaption; }
inline void SetCaption(const String& rCap) { sCaption = rCap; }
- inline USHORT GetPos() const { return nPos; }
- inline void SetPos(const USHORT nP) { nPos = nP; }
+ inline sal_uInt16 GetPos() const { return nPos; }
+ inline void SetPos(const sal_uInt16 nP) { nPos = nP; }
- inline USHORT GetLevel() const { return nLevel; }
- inline void SetLevel(const USHORT nLvl) { nLevel = nLvl; }
+ inline sal_uInt16 GetLevel() const { return nLevel; }
+ inline void SetLevel(const sal_uInt16 nLvl) { nLevel = nLvl; }
// inline sal_Unicode GetSeparator() const { return cSeparator; }
// inline void SetSeparator(const sal_Unicode cSep){ cSeparator = cSep; }
@@ -99,15 +99,15 @@ public:
void SetCharacterStyle(const String& rStyle)
{ sCharacterStyle = rStyle; }
- inline BOOL& IgnoreSeqOpts() { return bIgnoreSeqOpts; }
- inline BOOL IgnoreSeqOpts() const { return bIgnoreSeqOpts; }
+ inline sal_Bool& IgnoreSeqOpts() { return bIgnoreSeqOpts; }
+ inline sal_Bool IgnoreSeqOpts() const { return bIgnoreSeqOpts; }
- inline BOOL& CopyAttributes() { return bCopyAttributes; }
- inline BOOL CopyAttributes() const { return bCopyAttributes; }
+ inline sal_Bool& CopyAttributes() { return bCopyAttributes; }
+ inline sal_Bool CopyAttributes() const { return bCopyAttributes; }
- BOOL operator==( const InsCaptionOpt& rOpt ) const;
+ sal_Bool operator==( const InsCaptionOpt& rOpt ) const;
InsCaptionOpt& operator= ( const InsCaptionOpt& rOpt );
- inline BOOL operator< ( const InsCaptionOpt & rObj ) const
+ inline sal_Bool operator< ( const InsCaptionOpt & rObj ) const
{ return aOleId < rObj.aOleId; }
// friend SvStream& operator>>( SvStream& rIStream, InsCaptionOpt& rCapOpt );
// friend SvStream& operator<<( SvStream& rOStream, const InsCaptionOpt& rCapOpt );
diff --git a/sw/source/ui/inc/cfgdesc.hxx b/sw/source/ui/inc/cfgdesc.hxx
index 8ea0b20e0e..994b6d1245 100644
--- a/sw/source/ui/inc/cfgdesc.hxx
+++ b/sw/source/ui/inc/cfgdesc.hxx
@@ -34,25 +34,25 @@ class SwCfgDesc
protected:
String aFuncText;
String aLibName;
- USHORT nEvent;
+ sal_uInt16 nEvent;
- SwCfgDesc(const String &rFuncName, USHORT nId);
+ SwCfgDesc(const String &rFuncName, sal_uInt16 nId);
SwCfgDesc(const String &rLib,const String &rMacro);
~SwCfgDesc();
public:
- void SetEvent(USHORT nE); // inline
+ void SetEvent(sal_uInt16 nE); // inline
void SetFuncText(const String &rStr); // inline
void SetMacro(const String &rLib, const String &rMac);
- BOOL IsMacro() const;
- USHORT GetEvent() const; // inline
+ sal_Bool IsMacro() const;
+ sal_uInt16 GetEvent() const; // inline
String GetFuncText() const; // inline
String GetMacro() const; // inline
String GetLib() const; // inline
};
// INLINE METHODE --------------------------------------------------------
-inline void SwCfgDesc::SetEvent(USHORT nE) {
+inline void SwCfgDesc::SetEvent(sal_uInt16 nE) {
nEvent = nE;
}
@@ -60,7 +60,7 @@ inline void SwCfgDesc::SetFuncText(const String &rStr) {
aFuncText = rStr;
}
-inline USHORT SwCfgDesc::GetEvent() const { return nEvent; }
+inline sal_uInt16 SwCfgDesc::GetEvent() const { return nEvent; }
inline String SwCfgDesc::GetFuncText() const { return aFuncText; }
inline String SwCfgDesc::GetMacro() const { return aFuncText; }
inline String SwCfgDesc::GetLib() const { return aLibName; }
diff --git a/sw/source/ui/inc/cfgitems.hxx b/sw/source/ui/inc/cfgitems.hxx
index 04d43865cf..8e58540f62 100644
--- a/sw/source/ui/inc/cfgitems.hxx
+++ b/sw/source/ui/inc/cfgitems.hxx
@@ -60,26 +60,26 @@ class SW_DLLPUBLIC SwDocDisplayItem : public SfxPoolItem
friend class SwShdwCrsrOptionsTabPage;
friend class SwModule;
- BOOL bParagraphEnd :1;
- BOOL bTab :1;
- BOOL bSpace :1;
- BOOL bNonbreakingSpace :1;
- BOOL bSoftHyphen :1;
- BOOL bCharHiddenText :1;
- BOOL bFldHiddenText :1;
- BOOL bManualBreak :1;
- BOOL bShowHiddenPara :1;
+ sal_Bool bParagraphEnd :1;
+ sal_Bool bTab :1;
+ sal_Bool bSpace :1;
+ sal_Bool bNonbreakingSpace :1;
+ sal_Bool bSoftHyphen :1;
+ sal_Bool bCharHiddenText :1;
+ sal_Bool bFldHiddenText :1;
+ sal_Bool bManualBreak :1;
+ sal_Bool bShowHiddenPara :1;
Color aIndexBackgrndCol;
public:
TYPEINFO();
- SwDocDisplayItem( USHORT nWhich = FN_PARAM_DOCDISP );
+ SwDocDisplayItem( sal_uInt16 nWhich = FN_PARAM_DOCDISP );
SwDocDisplayItem(
const SwDocDisplayItem& rSwDocDisplayItem );
SwDocDisplayItem( const SwViewOption& rVOpt,
- USHORT nWhich );
+ sal_uInt16 nWhich );
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
@@ -93,31 +93,31 @@ Item fuer Einstellungsdialog, Elementeseite
class SW_DLLPUBLIC SwElemItem : public SfxPoolItem
{
//view
- BOOL bHorzScrollbar :1;
- BOOL bVertScrollbar :1;
- BOOL bAnyRuler : 1;
- BOOL bHorzRuler :1;
- BOOL bVertRuler :1;
- BOOL bVertRulerRight:1;
- BOOL bSmoothScroll :1;
+ sal_Bool bHorzScrollbar :1;
+ sal_Bool bVertScrollbar :1;
+ sal_Bool bAnyRuler : 1;
+ sal_Bool bHorzRuler :1;
+ sal_Bool bVertRuler :1;
+ sal_Bool bVertRulerRight:1;
+ sal_Bool bSmoothScroll :1;
//visual aids
- BOOL bCrosshair :1;
- BOOL bHandles :1;
- BOOL bBigHandles :1;
+ sal_Bool bCrosshair :1;
+ sal_Bool bHandles :1;
+ sal_Bool bBigHandles :1;
//display
- BOOL bTable :1;
- BOOL bGraphic :1;
- BOOL bDrawing :1;
- BOOL bFieldName :1;
- BOOL bNotes :1;
+ sal_Bool bTable :1;
+ sal_Bool bGraphic :1;
+ sal_Bool bDrawing :1;
+ sal_Bool bFieldName :1;
+ sal_Bool bNotes :1;
friend class SwContentOptPage;
public:
TYPEINFO();
- SwElemItem( USHORT nWhich = FN_PARAM_ELEM );
+ SwElemItem( sal_uInt16 nWhich = FN_PARAM_ELEM );
SwElemItem(const SwElemItem& rElemItem);
- SwElemItem(const SwViewOption& rVOpt, USHORT nWhich);
+ SwElemItem(const SwViewOption& rVOpt, sal_uInt16 nWhich);
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
@@ -139,8 +139,8 @@ class SW_DLLPUBLIC SwAddPrinterItem : public SfxPoolItem, public SwPrintData
public:
TYPEINFO();
- SwAddPrinterItem( USHORT nWhich = FN_PARAM_ADDPRINTER );
- SwAddPrinterItem( USHORT nWhich, const SwPrintData& rPrtData );
+ SwAddPrinterItem( sal_uInt16 nWhich = FN_PARAM_ADDPRINTER );
+ SwAddPrinterItem( sal_uInt16 nWhich, const SwPrintData& rPrtData );
SwAddPrinterItem( const SwAddPrinterItem& rAddPrinterItem);
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
@@ -151,27 +151,27 @@ public:
void SetFax( const String& rFax) { sFaxName = rFax; }
- BOOL IsPrintProspect() const { return bPrintProspect; }
- BOOL IsPrintProspectRTL() const { return bPrintProspectRTL; }
- void SetPrintProspect(BOOL bFlag ){ bPrintProspect = bFlag; }
- void SetPrintProspectRTL(BOOL bFlag ){ bPrintProspectRTL = bFlag; }
- BOOL IsPrintGraphic () const { return bPrintGraphic; }
- BOOL IsPrintTable () const { return bPrintTable; }
- BOOL IsPrintDraw () const { return bPrintDraw; }
- BOOL IsPrintControl () const { return bPrintControl; }
- BOOL IsPrintLeftPage () const { return bPrintLeftPages; }
- BOOL IsPrintRightPage() const { return bPrintRightPages; }
- BOOL IsPrintReverse () const { return bPrintReverse; }
- BOOL IsPaperFromSetup() const { return bPaperFromSetup; }
- BOOL IsPrintEmptyPages() const { return bPrintEmptyPages; }
- BOOL IsPrintPageBackground() const { return bPrintPageBackground; }
- BOOL IsPrintBlackFont() const { return bPrintBlackFont; }
+ sal_Bool IsPrintProspect() const { return bPrintProspect; }
+ sal_Bool IsPrintProspectRTL() const { return bPrintProspectRTL; }
+ void SetPrintProspect(sal_Bool bFlag ){ bPrintProspect = bFlag; }
+ void SetPrintProspectRTL(sal_Bool bFlag ){ bPrintProspectRTL = bFlag; }
+ sal_Bool IsPrintGraphic () const { return bPrintGraphic; }
+ sal_Bool IsPrintTable () const { return bPrintTable; }
+ sal_Bool IsPrintDraw () const { return bPrintDraw; }
+ sal_Bool IsPrintControl () const { return bPrintControl; }
+ sal_Bool IsPrintLeftPage () const { return bPrintLeftPages; }
+ sal_Bool IsPrintRightPage() const { return bPrintRightPages; }
+ sal_Bool IsPrintReverse () const { return bPrintReverse; }
+ sal_Bool IsPaperFromSetup() const { return bPaperFromSetup; }
+ sal_Bool IsPrintEmptyPages() const { return bPrintEmptyPages; }
+ sal_Bool IsPrintPageBackground() const { return bPrintPageBackground; }
+ sal_Bool IsPrintBlackFont() const { return bPrintBlackFont; }
//#i81434# - printing of hidden text
sal_Bool IsPrintHiddenText() const { return bPrintHiddenText; }
sal_Bool IsPrintTextPlaceholder() const { return bPrintTextPlaceholder; }
- BOOL IsPrintSingleJobs() const { return bPrintSingleJobs; }
- ULONG GetPrintPostIts () const { return nPrintPostIts; }
+ sal_Bool IsPrintSingleJobs() const { return bPrintSingleJobs; }
+ sal_uLong GetPrintPostIts () const { return nPrintPostIts; }
};
@@ -182,13 +182,13 @@ Item fuer Einstellungsdialog, ShadowCursorSeite
class SW_DLLPUBLIC SwShadowCursorItem : public SfxPoolItem
{
- BYTE eMode;
- BOOL bOn;
+ sal_uInt8 eMode;
+ sal_Bool bOn;
public:
TYPEINFO();
- SwShadowCursorItem( USHORT nWhich = FN_PARAM_SHADOWCURSOR );
+ SwShadowCursorItem( sal_uInt16 nWhich = FN_PARAM_SHADOWCURSOR );
SwShadowCursorItem( const SwShadowCursorItem& rElemItem );
- SwShadowCursorItem( const SwViewOption& rVOpt, USHORT nWhich );
+ SwShadowCursorItem( const SwViewOption& rVOpt, sal_uInt16 nWhich );
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
@@ -197,11 +197,11 @@ public:
void FillViewOptions( SwViewOption& rVOpt) const;
- BYTE GetMode() const { return eMode; }
- BOOL IsOn() const { return bOn; }
+ sal_uInt8 GetMode() const { return eMode; }
+ sal_Bool IsOn() const { return bOn; }
- void SetMode( BYTE eM ) { eMode = eM; }
- void SetOn( BOOL bFlag ) { bOn = bFlag; }
+ void SetMode( sal_uInt8 eM ) { eMode = eM; }
+ void SetOn( sal_Bool bFlag ) { bOn = bFlag; }
};
#ifdef DBG_UTIL
@@ -215,19 +215,19 @@ class SW_DLLPUBLIC SwTestItem : public SfxPoolItem
friend class SwTestTabPage;
friend class SwDocEditDialog;
- BOOL bTest1:1;
- BOOL bTest2:1;
- BOOL bTest3:1;
- BOOL bTest4:1;
- BOOL bTest5:1;
- BOOL bTest6:1;
- BOOL bTest7:1;
- BOOL bTest8:1;
- BOOL bTest9:1;
- BOOL bTest10:1;
+ sal_Bool bTest1:1;
+ sal_Bool bTest2:1;
+ sal_Bool bTest3:1;
+ sal_Bool bTest4:1;
+ sal_Bool bTest5:1;
+ sal_Bool bTest6:1;
+ sal_Bool bTest7:1;
+ sal_Bool bTest8:1;
+ sal_Bool bTest9:1;
+ sal_Bool bTest10:1;
public:
- SwTestItem( USHORT _nWhich):
+ SwTestItem( sal_uInt16 _nWhich):
SfxPoolItem(_nWhich){};
SwTestItem( const SwTestItem& pTestItem);
diff --git a/sw/source/ui/inc/chldwrap.hxx b/sw/source/ui/inc/chldwrap.hxx
index dd3023aab7..b6c274c917 100644
--- a/sw/source/ui/inc/chldwrap.hxx
+++ b/sw/source/ui/inc/chldwrap.hxx
@@ -41,10 +41,10 @@ class SwChildWinWrapper : public SfxChildWindow
// Implementation in fldtdlg.cxx
protected:
- SwChildWinWrapper(Window *pParentWindow, USHORT nId);
+ SwChildWinWrapper(Window *pParentWindow, sal_uInt16 nId);
public:
- virtual BOOL ReInitDlg(SwDocShell *pDocSh);
+ virtual sal_Bool ReInitDlg(SwDocShell *pDocSh);
inline SwDocShell* GetOldDocShell() { return m_pDocSh; }
inline void SetOldDocShell(SwDocShell *pDcSh) { m_pDocSh = pDcSh; }
diff --git a/sw/source/ui/inc/chrdlg.hxx b/sw/source/ui/inc/chrdlg.hxx
index 7381eb331b..242c91f6d4 100644
--- a/sw/source/ui/inc/chrdlg.hxx
+++ b/sw/source/ui/inc/chrdlg.hxx
@@ -62,15 +62,15 @@ class SvxMacroItem;
class SwCharDlg: public SfxTabDialog
{
SwView& rView;
- BOOL bIsDrwTxtMode;
+ sal_Bool bIsDrwTxtMode;
public:
SwCharDlg(Window* pParent, SwView& pVw, const SfxItemSet& rCoreSet,
- const String* pFmtStr = 0, BOOL bIsDrwTxtDlg = FALSE);
+ const String* pFmtStr = 0, sal_Bool bIsDrwTxtDlg = sal_False);
~SwCharDlg();
- virtual void PageCreated( USHORT nId, SfxTabPage &rPage );
+ virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage );
};
/*-----------------14.08.96 11.03-------------------
@@ -98,7 +98,7 @@ class SwCharURLPage : public SfxTabPage
ListBox aNotVisitedLB;
SvxMacroItem* pINetItem;
- BOOL bModified;
+ sal_Bool bModified;
DECL_LINK( InsertFileHdl, PushButton * );
DECL_LINK( EventHdl, PushButton * );
@@ -111,7 +111,7 @@ public:
static SfxTabPage* Create( Window* pParent,
const SfxItemSet& rAttrSet);
- virtual BOOL FillItemSet( SfxItemSet& rSet );
+ virtual sal_Bool FillItemSet( SfxItemSet& rSet );
virtual void Reset( const SfxItemSet& rSet );
};
diff --git a/sw/source/ui/inc/cnttab.hxx b/sw/source/ui/inc/cnttab.hxx
index 9697900eaf..f6c9e4c19a 100644
--- a/sw/source/ui/inc/cnttab.hxx
+++ b/sw/source/ui/inc/cnttab.hxx
@@ -62,17 +62,17 @@
struct CurTOXType
{
TOXTypes eType;
- USHORT nIndex; //for TOX_USER only
+ sal_uInt16 nIndex; //for TOX_USER only
- BOOL operator==(const CurTOXType aCmp)
+ sal_Bool operator==(const CurTOXType aCmp)
{
return eType == aCmp.eType && nIndex == aCmp.nIndex;
}
- USHORT GetFlatIndex() const;
+ sal_uInt16 GetFlatIndex() const;
CurTOXType () : eType (TOX_INDEX), nIndex (0) {};
- CurTOXType (TOXTypes t, USHORT i) : eType (t), nIndex (i) {};
+ CurTOXType (TOXTypes t, sal_uInt16 i) : eType (t), nIndex (i) {};
};
class SwOLENames : public Resource
diff --git a/sw/source/ui/inc/colex.hxx b/sw/source/ui/inc/colex.hxx
index 9d2e666309..e57b62f489 100644
--- a/sw/source/ui/inc/colex.hxx
+++ b/sw/source/ui/inc/colex.hxx
@@ -58,8 +58,8 @@ class SW_DLLPUBLIC SwPageGridExample : public SwPageExample
sal_Bool m_bVertical;
protected:
virtual void DrawPage( const Point& rPoint,
- const BOOL bSecond,
- const BOOL bEnabled );
+ const sal_Bool bSecond,
+ const sal_Bool bEnabled );
public:
SwPageGridExample(Window* pPar, const ResId& rResId ) :
SwPageExample(pPar, rResId ),
@@ -80,8 +80,8 @@ class SW_DLLPUBLIC SwColExample : public SwPageExample
protected:
virtual void DrawPage( const Point& rPoint,
- const BOOL bSecond,
- const BOOL bEnabled );
+ const sal_Bool bSecond,
+ const sal_Bool bEnabled );
public:
SwColExample(Window* pPar, const ResId& rResId ) :
diff --git a/sw/source/ui/inc/colmgr.hxx b/sw/source/ui/inc/colmgr.hxx
index 78117429aa..72a3b3a45b 100644
--- a/sw/source/ui/inc/colmgr.hxx
+++ b/sw/source/ui/inc/colmgr.hxx
@@ -30,33 +30,33 @@
#include "swdllapi.h"
#include <fmtclds.hxx>
-SW_DLLPUBLIC void FitToActualSize(SwFmtCol& rCol, USHORT nWidth);
+SW_DLLPUBLIC void FitToActualSize(SwFmtCol& rCol, sal_uInt16 nWidth);
class SW_DLLPUBLIC SwColMgr
{
public:
// lActWidth wird aus den Edits des Seitendialogs
// direkt uebergeben
- SwColMgr(const SfxItemSet &rSet, USHORT nActWidth = USHRT_MAX);
+ SwColMgr(const SfxItemSet &rSet, sal_uInt16 nActWidth = USHRT_MAX);
~SwColMgr();
- inline USHORT GetCount() const;
- void SetCount(USHORT nCount, USHORT nGutterWidth);
- USHORT GetGutterWidth(USHORT nPos = USHRT_MAX) const;
- void SetGutterWidth(USHORT nWidth, USHORT nPos = USHRT_MAX);
+ inline sal_uInt16 GetCount() const;
+ void SetCount(sal_uInt16 nCount, sal_uInt16 nGutterWidth);
+ sal_uInt16 GetGutterWidth(sal_uInt16 nPos = USHRT_MAX) const;
+ void SetGutterWidth(sal_uInt16 nWidth, sal_uInt16 nPos = USHRT_MAX);
- USHORT GetColWidth(USHORT nIdx) const;
- void SetColWidth(USHORT nIdx, USHORT nWidth);
+ sal_uInt16 GetColWidth(sal_uInt16 nIdx) const;
+ void SetColWidth(sal_uInt16 nIdx, sal_uInt16 nWidth);
- inline BOOL IsAutoWidth() const;
- void SetAutoWidth(BOOL bOn = TRUE, USHORT lGutterWidth = 0);
+ inline sal_Bool IsAutoWidth() const;
+ void SetAutoWidth(sal_Bool bOn = sal_True, sal_uInt16 lGutterWidth = 0);
- inline BOOL HasLine() const;
+ inline sal_Bool HasLine() const;
inline void SetNoLine();
- inline void SetLineWidthAndColor(ULONG nWidth, const Color& rCol);
- inline ULONG GetLineWidth() const;
+ inline void SetLineWidthAndColor(sal_uLong nWidth, const Color& rCol);
+ inline sal_uLong GetLineWidth() const;
inline const Color& GetLineColor() const;
inline SwColLineAdj GetAdjust() const;
@@ -70,28 +70,28 @@ public:
const SwFmtCol& GetColumns() const { return aFmtCol; }
- void SetActualWidth(USHORT nW);
- USHORT GetActualSize() const { return nWidth; }
+ void SetActualWidth(sal_uInt16 nW);
+ sal_uInt16 GetActualSize() const { return nWidth; }
private:
SwFmtCol aFmtCol;
- USHORT nWidth;
+ sal_uInt16 nWidth;
};
// INLINE METHODE --------------------------------------------------------
-inline USHORT SwColMgr::GetCount() const
+inline sal_uInt16 SwColMgr::GetCount() const
{
return aFmtCol.GetNumCols();
}
-inline void SwColMgr::SetLineWidthAndColor(ULONG nLWidth, const Color& rCol)
+inline void SwColMgr::SetLineWidthAndColor(sal_uLong nLWidth, const Color& rCol)
{
aFmtCol.SetLineWidth(nLWidth);
aFmtCol.SetLineColor(rCol);
}
-inline ULONG SwColMgr::GetLineWidth() const
+inline sal_uLong SwColMgr::GetLineWidth() const
{
return aFmtCol.GetLineWidth();
}
@@ -107,11 +107,11 @@ inline void SwColMgr::SetAdjust(SwColLineAdj eAdj)
{
aFmtCol.SetLineAdj(eAdj);
}
-inline BOOL SwColMgr::IsAutoWidth() const
+inline sal_Bool SwColMgr::IsAutoWidth() const
{
return aFmtCol.IsOrtho();
}
-inline void SwColMgr::SetAutoWidth(BOOL bOn, USHORT nGutterWidth)
+inline void SwColMgr::SetAutoWidth(sal_Bool bOn, sal_uInt16 nGutterWidth)
{
aFmtCol.SetOrtho(bOn, nGutterWidth, nWidth);
}
@@ -119,7 +119,7 @@ inline void SwColMgr::NoCols()
{
aFmtCol.GetColumns().DeleteAndDestroy(0, aFmtCol.GetColumns().Count());
}
-inline BOOL SwColMgr::HasLine() const
+inline sal_Bool SwColMgr::HasLine() const
{
return GetAdjust() != COLADJ_NONE;
}
diff --git a/sw/source/ui/inc/column.hxx b/sw/source/ui/inc/column.hxx
index 3bf10d86a7..3f3e5e834c 100644
--- a/sw/source/ui/inc/column.hxx
+++ b/sw/source/ui/inc/column.hxx
@@ -87,10 +87,10 @@ class SwColumnDlg : public SfxModalDialog
long nSelectionWidth;
long nPageWidth;
- BOOL bPageChanged : 1;
- BOOL bSectionChanged : 1;
- BOOL bSelSectionChanged : 1;
- BOOL bFrameChanged : 1;
+ sal_Bool bPageChanged : 1;
+ sal_Bool bSectionChanged : 1;
+ sal_Bool bSelSectionChanged : 1;
+ sal_Bool bFrameChanged : 1;
DECL_LINK(ObjectHdl, ListBox*);
@@ -165,16 +165,16 @@ class SwColumnPage : public SfxTabPage
SwColMgr* pColMgr;
- USHORT nFirstVis;
- USHORT nCols;
+ sal_uInt16 nFirstVis;
+ sal_uInt16 nCols;
long nColWidth[nMaxCols];
long nColDist[nMaxCols];
- USHORT nMinWidth;
+ sal_uInt16 nMinWidth;
PercentField *pModifiedField;
- BOOL bFormat;
- BOOL bFrm;
- BOOL bHtmlMode;
- BOOL bLockUpdate;
+ sal_Bool bFormat;
+ sal_Bool bFrm;
+ sal_Bool bHtmlMode;
+ sal_Bool bLockUpdate;
// Handler
DECL_LINK( ColModify, NumericField * );
@@ -193,7 +193,7 @@ class SwColumnPage : public SfxTabPage
void UpdateCols();
void Init();
void ResetColWidth();
- void SetLabels( USHORT nVis );
+ void SetLabels( sal_uInt16 nVis );
using SfxTabPage::ActivatePage;
using SfxTabPage::DeactivatePage;
@@ -207,18 +207,18 @@ public:
virtual ~SwColumnPage();
static SfxTabPage *Create(Window *pParent, const SfxItemSet &rSet);
- static USHORT* GetRanges();
+ static sal_uInt16* GetRanges();
- virtual BOOL FillItemSet(SfxItemSet &rSet);
+ virtual sal_Bool FillItemSet(SfxItemSet &rSet);
virtual void Reset(const SfxItemSet &rSet);
- void SetFrmMode(BOOL bMod);
+ void SetFrmMode(sal_Bool bMod);
void SetPageWidth(long nPageWidth);
- void SetFormatUsed(BOOL bFmt) { bFormat = bFmt; }
+ void SetFormatUsed(sal_Bool bFmt) { bFormat = bFmt; }
- void ShowBalance(BOOL bShow) {aBalanceColsCB.Show(bShow);}
- void SetInSection(BOOL bSet);
+ void ShowBalance(sal_Bool bShow) {aBalanceColsCB.Show(bShow);}
+ void SetInSection(sal_Bool bSet);
void ActivateColumnControl() {aCLNrEdt.GrabFocus();}
};
diff --git a/sw/source/ui/inc/conarc.hxx b/sw/source/ui/inc/conarc.hxx
index 98d9413062..ec9d403afd 100644
--- a/sw/source/ui/inc/conarc.hxx
+++ b/sw/source/ui/inc/conarc.hxx
@@ -38,16 +38,16 @@
class ConstArc : public SwDrawBase
{
Point aStartPnt;
- UINT16 nAnzButUp;
+ sal_uInt16 nAnzButUp;
public:
ConstArc(SwWrtShell* pSh, SwEditWin* pWin, SwView* pView);
// Mouse- & Key-Events
- virtual BOOL MouseButtonUp(const MouseEvent& rMEvt);
- virtual BOOL MouseButtonDown(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonUp(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonDown(const MouseEvent& rMEvt);
- virtual void Activate(const USHORT nSlotId); // Funktion aktivieren
+ virtual void Activate(const sal_uInt16 nSlotId); // Funktion aktivieren
virtual void Deactivate();
};
diff --git a/sw/source/ui/inc/concustomshape.hxx b/sw/source/ui/inc/concustomshape.hxx
index ba87a0a414..2a753fd957 100644
--- a/sw/source/ui/inc/concustomshape.hxx
+++ b/sw/source/ui/inc/concustomshape.hxx
@@ -52,10 +52,10 @@ class ConstCustomShape : public SwDrawBase
ConstCustomShape( SwWrtShell* pSh, SwEditWin* pWin, SwView* pView, SfxRequest& rReq );
// Mouse- & Key-Events
- virtual BOOL MouseButtonUp(const MouseEvent& rMEvt);
- virtual BOOL MouseButtonDown(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonUp(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonDown(const MouseEvent& rMEvt);
- virtual void Activate(const USHORT nSlotId); // Function aktivieren
+ virtual void Activate(const sal_uInt16 nSlotId); // Function aktivieren
rtl::OUString GetShapeType() const;
static rtl::OUString GetShapeTypeFromRequest( SfxRequest& rReq );
diff --git a/sw/source/ui/inc/condedit.hxx b/sw/source/ui/inc/condedit.hxx
index ad8c9b1e8d..b7d31c312d 100644
--- a/sw/source/ui/inc/condedit.hxx
+++ b/sw/source/ui/inc/condedit.hxx
@@ -39,7 +39,7 @@
class SW_DLLPUBLIC ConditionEdit : public Edit, public DropTargetHelper
{
- BOOL bBrackets, bEnableDrop;
+ sal_Bool bBrackets, bEnableDrop;
SW_DLLPRIVATE virtual sal_Int8 AcceptDrop( const AcceptDropEvent& rEvt );
SW_DLLPRIVATE virtual sal_Int8 ExecuteDrop( const ExecuteDropEvent& rEvt );
@@ -47,10 +47,10 @@ class SW_DLLPUBLIC ConditionEdit : public Edit, public DropTargetHelper
public:
ConditionEdit( Window* pParent, const ResId& rResId );
- inline void ShowBrackets(BOOL bShow) { bBrackets = bShow; }
+ inline void ShowBrackets(sal_Bool bShow) { bBrackets = bShow; }
- inline void SetDropEnable( BOOL bFlag ) { bEnableDrop = bFlag; }
- inline BOOL IsDropEnable() const { return bEnableDrop; }
+ inline void SetDropEnable( sal_Bool bFlag ) { bEnableDrop = bFlag; }
+ inline sal_Bool IsDropEnable() const { return bEnableDrop; }
};
#endif
diff --git a/sw/source/ui/inc/conform.hxx b/sw/source/ui/inc/conform.hxx
index e9a0dc8f54..a2160ec90c 100644
--- a/sw/source/ui/inc/conform.hxx
+++ b/sw/source/ui/inc/conform.hxx
@@ -35,9 +35,9 @@ public:
ConstFormControl(SwWrtShell* pSh, SwEditWin* pWin, SwView* pView);
// Mouse- & Key-Events
- virtual BOOL MouseButtonDown(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonDown(const MouseEvent& rMEvt);
- virtual void Activate(const USHORT nSlotId); // Function aktivieren
+ virtual void Activate(const sal_uInt16 nSlotId); // Function aktivieren
virtual void CreateDefaultObject();
};
diff --git a/sw/source/ui/inc/conpoly.hxx b/sw/source/ui/inc/conpoly.hxx
index 9f14b9a138..e1b58069b4 100644
--- a/sw/source/ui/inc/conpoly.hxx
+++ b/sw/source/ui/inc/conpoly.hxx
@@ -43,11 +43,11 @@ public:
ConstPolygon(SwWrtShell* pSh, SwEditWin* pWin, SwView* pView);
// Mouse- & Key-Events
- virtual BOOL MouseMove(const MouseEvent& rMEvt);
- virtual BOOL MouseButtonUp(const MouseEvent& rMEvt);
- virtual BOOL MouseButtonDown(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseMove(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonUp(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonDown(const MouseEvent& rMEvt);
- virtual void Activate(const USHORT nSlotId); // Function aktivieren
+ virtual void Activate(const sal_uInt16 nSlotId); // Function aktivieren
};
diff --git a/sw/source/ui/inc/conrect.hxx b/sw/source/ui/inc/conrect.hxx
index dd143f3425..2d4600b6cf 100644
--- a/sw/source/ui/inc/conrect.hxx
+++ b/sw/source/ui/inc/conrect.hxx
@@ -38,8 +38,8 @@
class ConstRectangle : public SwDrawBase
{
- BOOL bMarquee;
- BOOL bCapVertical;
+ sal_Bool bMarquee;
+ sal_Bool bCapVertical;
// #93382#
sal_Bool mbVertical;
@@ -48,10 +48,10 @@ class ConstRectangle : public SwDrawBase
ConstRectangle(SwWrtShell* pSh, SwEditWin* pWin, SwView* pView);
// Mouse- & Key-Events
- virtual BOOL MouseButtonUp(const MouseEvent& rMEvt);
- virtual BOOL MouseButtonDown(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonUp(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonDown(const MouseEvent& rMEvt);
- virtual void Activate(const USHORT nSlotId); // Function aktivieren
+ virtual void Activate(const sal_uInt16 nSlotId); // Function aktivieren
};
diff --git a/sw/source/ui/inc/content.hxx b/sw/source/ui/inc/content.hxx
index 12d4f3557f..570dc8fbfd 100644
--- a/sw/source/ui/inc/content.hxx
+++ b/sw/source/ui/inc/content.hxx
@@ -47,7 +47,7 @@ class SwRedline;
class SwPopup : public PopupMenu
{
- USHORT nCurId;
+ sal_uInt16 nCurId;
virtual void Select(){nCurId = GetCurItemId();}
public:
@@ -55,7 +55,7 @@ public:
PopupMenu(),
nCurId(USHRT_MAX){}
- USHORT GetCurId() const { return nCurId; }
+ sal_uInt16 GetCurId() const { return nCurId; }
};
@@ -63,38 +63,38 @@ public:
class SwOutlineContent : public SwContent
{
- USHORT nOutlinePos;
- BYTE nOutlineLevel;
- BOOL bIsMoveable;
+ sal_uInt16 nOutlinePos;
+ sal_uInt8 nOutlineLevel;
+ sal_Bool bIsMoveable;
public:
SwOutlineContent( const SwContentType* pCnt,
const String& rName,
- USHORT nArrPos,
- BYTE nLevel,
- BOOL bMove,
+ sal_uInt16 nArrPos,
+ sal_uInt8 nLevel,
+ sal_Bool bMove,
long nYPos) :
SwContent(pCnt, rName, nYPos),
nOutlinePos(nArrPos), nOutlineLevel(nLevel), bIsMoveable(bMove) {}
- USHORT GetPos(){return nOutlinePos;}
- BYTE GetOutlineLevel(){return nOutlineLevel;}
- BOOL IsMoveable(){return bIsMoveable;};
+ sal_uInt16 GetPos(){return nOutlinePos;}
+ sal_uInt8 GetOutlineLevel(){return nOutlineLevel;}
+ sal_Bool IsMoveable(){return bIsMoveable;};
};
//----------------------------------------------------------------------------
class SwRegionContent : public SwContent
{
- BYTE nRegionLevel;
+ sal_uInt8 nRegionLevel;
public:
SwRegionContent( const SwContentType* pCnt,
const String& rName,
- BYTE nLevel,
+ sal_uInt8 nLevel,
long nYPos) :
SwContent(pCnt, rName, nYPos),
nRegionLevel(nLevel){}
- BYTE GetRegionLevel() const {return nRegionLevel;}
+ sal_uInt8 GetRegionLevel() const {return nRegionLevel;}
};
//----------------------------------------------------------------------------
@@ -112,7 +112,7 @@ public:
: SwContent( pCnt, rName, nYPos ), sURL( rURL ), pINetAttr( pAttr )
{}
- virtual BOOL IsProtect() const;
+ virtual sal_Bool IsProtect() const;
const String& GetURL() { return sURL; }
const SwTxtINetFmt* GetINetAttr() { return pINetAttr; }
};
@@ -139,7 +139,7 @@ public:
const SwFmtFld* GetPostIt() { return pFld; }
SwRedline* GetRedline() { return pRedline; }
- virtual BOOL IsProtect() const;
+ virtual sal_Bool IsProtect() const;
bool IsPostIt() {return mbPostIt; }
};
@@ -185,31 +185,31 @@ class SwContentType : public SwTypeNumber
String sContentTypeName; // Name der Inhaltsform
String sSingleContentTypeName; // Name der Inhaltsform, Singular
String sTypeToken; // Anhaengsel fuer URL
- USHORT nMemberCount; // Inhaltsanzahl
- USHORT nContentType; // Id der Inhaltsform
- BYTE nOutlineLevel;
- BOOL bMemberFilled : 1; // wurden die Inhalte bereits eingefuegt?
- BOOL bIsInternalDrag:1; // koennen die Inhalte verschoben werden?
- BOOL bDataValid : 1; //
- BOOL bEdit: 1; // kann diese Type bearbeitet werden ?
- BOOL bDelete: 1; // kann diese Type geloescht werden ?
+ sal_uInt16 nMemberCount; // Inhaltsanzahl
+ sal_uInt16 nContentType; // Id der Inhaltsform
+ sal_uInt8 nOutlineLevel;
+ sal_Bool bMemberFilled : 1; // wurden die Inhalte bereits eingefuegt?
+ sal_Bool bIsInternalDrag:1; // koennen die Inhalte verschoben werden?
+ sal_Bool bDataValid : 1; //
+ sal_Bool bEdit: 1; // kann diese Type bearbeitet werden ?
+ sal_Bool bDelete: 1; // kann diese Type geloescht werden ?
protected:
void RemoveNewline(String&);
public:
- SwContentType(SwWrtShell* pParent, USHORT nType, BYTE nLevel );
+ SwContentType(SwWrtShell* pParent, sal_uInt16 nType, sal_uInt8 nLevel );
~SwContentType();
- void Init(BOOL* pbInvalidateWindow = 0);
- void FillMemberList(BOOL* pbLevelChanged = NULL);
- USHORT GetMemberCount() const
+ void Init(sal_Bool* pbInvalidateWindow = 0);
+ void FillMemberList(sal_Bool* pbLevelChanged = NULL);
+ sal_uInt16 GetMemberCount() const
{return nMemberCount;};
- USHORT GetType() const {return nContentType;}
- const SwContent* GetMember(USHORT nIndex);
+ sal_uInt16 GetType() const {return nContentType;}
+ const SwContent* GetMember(sal_uInt16 nIndex);
const String& GetName() {return sContentTypeName;}
const String& GetSingleName() const {return sSingleContentTypeName;}
const String& GetTypeToken() const{return sTypeToken;}
- void SetOutlineLevel(BYTE nNew)
+ void SetOutlineLevel(sal_uInt8 nNew)
{
nOutlineLevel = nNew;
Invalidate();
@@ -217,8 +217,8 @@ public:
void Invalidate(); // nur nMemberCount wird neu gelesen
- BOOL IsEditable() const {return bEdit;}
- BOOL IsDeletable() const {return bDelete;}
+ sal_Bool IsEditable() const {return bEdit;}
+ sal_Bool IsDeletable() const {return bDelete;}
};
#endif
diff --git a/sw/source/ui/inc/conttree.hxx b/sw/source/ui/inc/conttree.hxx
index 2e0d8e458c..74fa11e069 100644
--- a/sw/source/ui/inc/conttree.hxx
+++ b/sw/source/ui/inc/conttree.hxx
@@ -75,24 +75,24 @@ class SwContentTree : public SvTreeListBox
SwNavigationConfig* pConfig;
sal_Int32 nActiveBlock;
- USHORT nHiddenBlock;
- USHORT nRootType;
- USHORT nLastSelType;
- BYTE nOutlineLevel;
-
- BOOL bIsActive :1;
- BOOL bIsConstant :1;
- BOOL bIsHidden :1;
- BOOL bDocChgdInDragging :1;
- BOOL bIsInternalDrag :1;
- BOOL bIsRoot :1;
- BOOL bIsIdleClear :1;
- BOOL bIsLastReadOnly :1;
- BOOL bIsOutlineMoveable :1;
- BOOL bViewHasChanged :1;
- BOOL bIsImageListInitialized : 1;
-
- static BOOL bIsInDrag;
+ sal_uInt16 nHiddenBlock;
+ sal_uInt16 nRootType;
+ sal_uInt16 nLastSelType;
+ sal_uInt8 nOutlineLevel;
+
+ sal_Bool bIsActive :1;
+ sal_Bool bIsConstant :1;
+ sal_Bool bIsHidden :1;
+ sal_Bool bDocChgdInDragging :1;
+ sal_Bool bIsInternalDrag :1;
+ sal_Bool bIsRoot :1;
+ sal_Bool bIsIdleClear :1;
+ sal_Bool bIsLastReadOnly :1;
+ sal_Bool bIsOutlineMoveable :1;
+ sal_Bool bViewHasChanged :1;
+ sal_Bool bIsImageListInitialized : 1;
+
+ static sal_Bool bIsInDrag;
void FindActiveTypeAndRemoveUserData();
@@ -119,41 +119,41 @@ protected:
sal_Bool FillTransferData( TransferDataContainer& rTransfer,
sal_Int8& rDragMode );
- BOOL HasContentChanged();
+ sal_Bool HasContentChanged();
virtual DragDropMode NotifyStartDrag( TransferDataContainer& rData,
SvLBoxEntry* );
- virtual BOOL NotifyAcceptDrop( SvLBoxEntry* );
+ virtual sal_Bool NotifyAcceptDrop( SvLBoxEntry* );
- virtual BOOL NotifyMoving( SvLBoxEntry* pTarget,
+ virtual sal_Bool NotifyMoving( SvLBoxEntry* pTarget,
SvLBoxEntry* pEntry,
SvLBoxEntry*& rpNewParent,
- ULONG& rNewChildPos
+ sal_uLong& rNewChildPos
);
- virtual BOOL NotifyCopying( SvLBoxEntry* pTarget,
+ virtual sal_Bool NotifyCopying( SvLBoxEntry* pTarget,
SvLBoxEntry* pEntry,
SvLBoxEntry*& rpNewParent,
- ULONG& rNewChildPos
+ sal_uLong& rNewChildPos
);
virtual void MouseButtonDown( const MouseEvent& rMEvt );
- void EditEntry( SvLBoxEntry* pEntry, BYTE nMode );
+ void EditEntry( SvLBoxEntry* pEntry, sal_uInt8 nMode );
void GotoContent(SwContent* pCnt);
- static void SetInDrag(BOOL bSet) {bIsInDrag = bSet;}
+ static void SetInDrag(sal_Bool bSet) {bIsInDrag = bSet;}
virtual PopupMenu* CreateContextMenu( void );
- virtual void ExcecuteContextMenuAction( USHORT nSelectedPopupEntry );
+ virtual void ExcecuteContextMenuAction( sal_uInt16 nSelectedPopupEntry );
public:
SwContentTree(Window* pParent, const ResId& rResId);
~SwContentTree();
- BOOL ToggleToRoot();
- BOOL IsRoot() const {return bIsRoot;}
- USHORT GetRootType() const {return nRootType;}
- void SetRootType(USHORT nType);
- void Display( BOOL bActiveView );
+ sal_Bool ToggleToRoot();
+ sal_Bool IsRoot() const {return bIsRoot;}
+ sal_uInt16 GetRootType() const {return nRootType;}
+ void SetRootType(sal_uInt16 nType);
+ void Display( sal_Bool bActiveView );
void Clear();
void SetHiddenShell(SwWrtShell* pSh);
void ShowHiddenShell();
@@ -166,26 +166,26 @@ public:
pActiveShell :
pHiddenShell;}
- static BOOL IsInDrag() {return bIsInDrag;}
- BOOL IsInternalDrag() const {return bIsInternalDrag != 0;}
+ static sal_Bool IsInDrag() {return bIsInDrag;}
+ sal_Bool IsInternalDrag() const {return bIsInternalDrag != 0;}
sal_Int32 GetActiveBlock() const {return nActiveBlock;}
- BYTE GetOutlineLevel()const {return nOutlineLevel;}
- void SetOutlineLevel(BYTE nSet);
+ sal_uInt8 GetOutlineLevel()const {return nOutlineLevel;}
+ void SetOutlineLevel(sal_uInt8 nSet);
- BOOL Expand( SvLBoxEntry* pParent );
+ sal_Bool Expand( SvLBoxEntry* pParent );
- BOOL Collapse( SvLBoxEntry* pParent );
+ sal_Bool Collapse( SvLBoxEntry* pParent );
- void ExecCommand(USHORT nCmd, BOOL bModifier);
+ void ExecCommand(sal_uInt16 nCmd, sal_Bool bModifier);
void ShowTree();
void HideTree();
- BOOL IsConstantView() {return bIsConstant;}
- BOOL IsActiveView() {return bIsActive;}
- BOOL IsHiddenView() {return bIsHidden;}
+ sal_Bool IsConstantView() {return bIsConstant;}
+ sal_Bool IsActiveView() {return bIsActive;}
+ sal_Bool IsHiddenView() {return bIsHidden;}
const SwWrtShell* GetActiveWrtShell() {return pActiveShell;}
SwWrtShell* GetHiddenWrtShell() {return pHiddenShell;}
@@ -199,7 +199,7 @@ public:
virtual void GetFocus();
virtual void KeyInput(const KeyEvent& rKEvt);
- virtual BOOL Select( SvLBoxEntry* pEntry, BOOL bSelect=TRUE );
+ virtual sal_Bool Select( SvLBoxEntry* pEntry, sal_Bool bSelect=sal_True );
};
@@ -211,12 +211,12 @@ class SwLBoxString : public SvLBoxString
{
public:
- SwLBoxString( SvLBoxEntry* pEntry, USHORT nFlags,
+ SwLBoxString( SvLBoxEntry* pEntry, sal_uInt16 nFlags,
const String& rStr ) : SvLBoxString(pEntry,nFlags,rStr)
{
}
- virtual void Paint( const Point& rPos, SvLBox& rDev, USHORT nFlags,
+ virtual void Paint( const Point& rPos, SvLBox& rDev, sal_uInt16 nFlags,
SvLBoxEntry* pEntry);
};
@@ -240,9 +240,9 @@ private:
SwGlblDocContent* pDocContent;
sfx2::DocumentInserter* pDocInserter;
- BOOL bIsInternalDrag :1;
- BOOL bLastEntryEmphasis :1; // Drag'n Drop
- BOOL bIsImageListInitialized : 1;
+ sal_Bool bIsInternalDrag :1;
+ sal_Bool bLastEntryEmphasis :1; // Drag'n Drop
+ sal_Bool bIsImageListInitialized : 1;
static const SfxObjectShell* pShowShell;
@@ -266,22 +266,22 @@ protected:
virtual void RequestHelp( const HelpEvent& rHEvt );
virtual long GetTabPos( SvLBoxEntry*, SvLBoxTab* );
- virtual BOOL NotifyMoving( SvLBoxEntry* pTarget,
+ virtual sal_Bool NotifyMoving( SvLBoxEntry* pTarget,
SvLBoxEntry* pEntry,
SvLBoxEntry*& rpNewParent,
- ULONG& rNewChildPos
+ sal_uLong& rNewChildPos
);
- virtual BOOL NotifyCopying( SvLBoxEntry* pTarget,
+ virtual sal_Bool NotifyCopying( SvLBoxEntry* pTarget,
SvLBoxEntry* pEntry,
SvLBoxEntry*& rpNewParent,
- ULONG& rNewChildPos
+ sal_uLong& rNewChildPos
);
virtual void StartDrag( sal_Int8 nAction, const Point& rPosPixel );
virtual void DragFinished( sal_Int8 );
virtual DragDropMode NotifyStartDrag( TransferDataContainer& rData,
SvLBoxEntry* );
- virtual BOOL NotifyAcceptDrop( SvLBoxEntry* );
+ virtual sal_Bool NotifyAcceptDrop( SvLBoxEntry* );
virtual void MouseButtonDown( const MouseEvent& rMEvt );
virtual void KeyInput(const KeyEvent& rKEvt);
@@ -296,26 +296,26 @@ protected:
DECL_LINK( Timeout, Timer* );
DECL_LINK( DoubleClickHdl, SwGlobalTree * );
- BOOL IsInternalDrag() const {return bIsInternalDrag != 0;}
+ sal_Bool IsInternalDrag() const {return bIsInternalDrag != 0;}
SwNavigationPI* GetParentWindow()
{ return (SwNavigationPI*)Window::GetParent(); }
void OpenDoc(const SwGlblDocContent*);
void GotoContent(const SwGlblDocContent*);
- USHORT GetEnableFlags() const;
+ sal_uInt16 GetEnableFlags() const;
static const SfxObjectShell* GetShowShell() {return pShowShell;}
static void SetShowShell(const SfxObjectShell*pSet) {pShowShell = pSet;}
DECL_STATIC_LINK(SwGlobalTree, ShowFrameHdl, SwGlobalTree*);
virtual PopupMenu* CreateContextMenu( void );
- virtual void ExcecuteContextMenuAction( USHORT nSelectedPopupEntry );
+ virtual void ExcecuteContextMenuAction( sal_uInt16 nSelectedPopupEntry );
public:
SwGlobalTree(Window* pParent, const ResId& rResId);
virtual ~SwGlobalTree();
- void TbxMenuHdl(USHORT nTbxId, ToolBox* pBox);
+ void TbxMenuHdl(sal_uInt16 nTbxId, ToolBox* pBox);
void InsertRegion( const SwGlblDocContent* pCont,
const String* pFileName = 0 );
void EditContent(const SwGlblDocContent* pCont );
@@ -323,11 +323,11 @@ public:
void ShowTree();
void HideTree();
- void ExecCommand(USHORT nCmd);
+ void ExecCommand(sal_uInt16 nCmd);
- void Display(BOOL bOnlyUpdateUserData = FALSE);
+ void Display(sal_Bool bOnlyUpdateUserData = sal_False);
- BOOL Update(BOOL bHard);
+ sal_Bool Update(sal_Bool bHard);
};
#endif
diff --git a/sw/source/ui/inc/dbinsdlg.hxx b/sw/source/ui/inc/dbinsdlg.hxx
index 737825f3b5..0df623f927 100644
--- a/sw/source/ui/inc/dbinsdlg.hxx
+++ b/sw/source/ui/inc/dbinsdlg.hxx
@@ -73,18 +73,18 @@ struct SwInsDBColumn
sal_Int32 nDBNumFmt;
sal_uInt32 nUsrNumFmt;
LanguageType eUsrNumFmtLng;
- USHORT nCol;
- BOOL bHasFmt : 1;
- BOOL bIsDBFmt : 1;
+ sal_uInt16 nCol;
+ sal_Bool bHasFmt : 1;
+ sal_Bool bIsDBFmt : 1;
- SwInsDBColumn( const String& rStr, USHORT nColumn )
+ SwInsDBColumn( const String& rStr, sal_uInt16 nColumn )
: sColumn( rStr ),
nDBNumFmt( 0 ),
nUsrNumFmt( 0 ),
eUsrNumFmtLng( LANGUAGE_SYSTEM ),
nCol( nColumn ),
- bHasFmt(FALSE),
- bIsDBFmt(TRUE)
+ bHasFmt(sal_False),
+ bIsDBFmt(sal_True)
{}
int operator==( const SwInsDBColumn& rCmp ) const
@@ -150,7 +150,7 @@ class SwInsertDBColAutoPilot : public SfxModalDialog, public utl::ConfigItem
SfxItemSet* pTblSet;
SwTableRep* pRep;
- USHORT nGBFmtLen;
+ sal_uInt16 nGBFmtLen;
DECL_LINK( PageHdl, Button* );
DECL_LINK( AutoFmtHdl, PushButton* );
@@ -161,7 +161,7 @@ class SwInsertDBColAutoPilot : public SfxModalDialog, public utl::ConfigItem
DECL_LINK( DblClickHdl, ListBox* );
DECL_LINK( HeaderHdl, Button* );
- BOOL SplitTextToColArr( const String& rTxt, _DB_Columns& rColArr, BOOL bInsField );
+ sal_Bool SplitTextToColArr( const String& rTxt, _DB_Columns& rColArr, sal_Bool bInsField );
using SfxModalDialog::Notify;
virtual void Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& aPropertyNames );
virtual void Commit();
diff --git a/sw/source/ui/inc/dbtree.hxx b/sw/source/ui/inc/dbtree.hxx
index 70403bd343..6060fefc0b 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 678ee196d7..16eb6288e8 100644
--- a/sw/source/ui/inc/docfnote.hxx
+++ b/sw/source/ui/inc/docfnote.hxx
@@ -36,7 +36,7 @@ class SwFootNoteOptionDlg :public SfxTabDialog
SwWrtShell &rSh;
Link aOldOkHdl;
- virtual void PageCreated( USHORT nId, SfxTabPage &rPage );
+ virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage );
#ifdef _SOLAR__PRIVATE
DECL_LINK( OkHdl, Button * );
diff --git a/sw/source/ui/inc/docstdlg.hxx b/sw/source/ui/inc/docstdlg.hxx
index db7d707e23..da19053796 100644
--- a/sw/source/ui/inc/docstdlg.hxx
+++ b/sw/source/ui/inc/docstdlg.hxx
@@ -49,7 +49,7 @@ public:
static SfxTabPage *Create(Window *pParent, const SfxItemSet &rSet);
protected:
- virtual BOOL FillItemSet( SfxItemSet &rSet);
+ virtual sal_Bool FillItemSet( SfxItemSet &rSet);
virtual void Reset (const SfxItemSet &rSet);
DECL_LINK( UpdateHdl, PushButton*);
diff --git a/sw/source/ui/inc/drawbase.hxx b/sw/source/ui/inc/drawbase.hxx
index 1d1543b42c..fbf9a5090f 100644
--- a/sw/source/ui/inc/drawbase.hxx
+++ b/sw/source/ui/inc/drawbase.hxx
@@ -51,9 +51,9 @@ protected:
SwEditWin* m_pWin;
Point m_aStartPos; // Position von BeginCreate
Point m_aMDPos; // Position von MouseButtonDown
- USHORT m_nSlotId;
- BOOL m_bCreateObj :1;
- BOOL m_bInsForm :1;
+ sal_uInt16 m_nSlotId;
+ sal_Bool m_bCreateObj :1;
+ sal_Bool m_bInsForm :1;
Point GetDefaultCenterPos();
public:
@@ -62,20 +62,20 @@ public:
void SetDrawPointer();
void EnterSelectMode(const MouseEvent& rMEvt);
- inline BOOL IsInsertForm() const { return m_bInsForm; }
- inline BOOL IsCreateObj() const { return m_bCreateObj; }
+ inline sal_Bool IsInsertForm() const { return m_bInsForm; }
+ inline sal_Bool IsCreateObj() const { return m_bCreateObj; }
- // Mouse- & Key-Events; Returnwert=TRUE: Event wurde bearbeitet
- virtual BOOL KeyInput(const KeyEvent& rKEvt);
- virtual BOOL MouseMove(const MouseEvent& rMEvt);
- virtual BOOL MouseButtonUp(const MouseEvent& rMEvt);
- virtual BOOL MouseButtonDown(const MouseEvent& rMEvt);
+ // Mouse- & Key-Events; Returnwert=sal_True: Event wurde bearbeitet
+ virtual sal_Bool KeyInput(const KeyEvent& rKEvt);
+ virtual sal_Bool MouseMove(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonUp(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonDown(const MouseEvent& rMEvt);
void BreakCreate();
- void SetSlotId(USHORT nSlot) {m_nSlotId = nSlot;}
- USHORT GetSlotId() { return m_nSlotId;}
+ void SetSlotId(sal_uInt16 nSlot) {m_nSlotId = nSlot;}
+ sal_uInt16 GetSlotId() { return m_nSlotId;}
- virtual void Activate(const USHORT nSlotId); // Function aktivieren
+ virtual void Activate(const sal_uInt16 nSlotId); // Function aktivieren
virtual void Deactivate(); // Function deaktivieren
virtual void CreateDefaultObject();
diff --git a/sw/source/ui/inc/drpcps.hxx b/sw/source/ui/inc/drpcps.hxx
index 42132634e7..663c3a8edc 100644
--- a/sw/source/ui/inc/drpcps.hxx
+++ b/sw/source/ui/inc/drpcps.hxx
@@ -90,9 +90,9 @@ friend class SwDropCapsPict;
SwDropCapsPict *pPict;
- BOOL bModified;
- BOOL bFormat;
- BOOL bHtmlMode;
+ sal_Bool bModified;
+ sal_Bool bFormat;
+ sal_Bool bHtmlMode;
SwWrtShell &rSh;
@@ -113,12 +113,12 @@ friend class SwDropCapsPict;
public:
static SfxTabPage *Create(Window *pParent, const SfxItemSet &rSet);
- static USHORT* GetRanges();
+ static sal_uInt16* GetRanges();
- virtual BOOL FillItemSet( SfxItemSet &rSet);
+ virtual sal_Bool FillItemSet( SfxItemSet &rSet);
virtual void Reset (const SfxItemSet &rSet);
- void SetFormat(BOOL bSet){bFormat = bSet;}
+ void SetFormat(sal_Bool bSet){bFormat = bSet;}
};
#endif
diff --git a/sw/source/ui/inc/drwbassh.hxx b/sw/source/ui/inc/drwbassh.hxx
index 5b74d23af6..455594fc3c 100644
--- a/sw/source/ui/inc/drwbassh.hxx
+++ b/sw/source/ui/inc/drwbassh.hxx
@@ -38,9 +38,9 @@ class SwDrawBaseShell: public SwBaseShell
{
SwDrawBase* pDrawActual;
- UINT16 eDrawMode;
- BOOL bRotate : 1;
- BOOL bSelMove: 1;
+ sal_uInt16 eDrawMode;
+ sal_Bool bRotate : 1;
+ sal_Bool bSelMove: 1;
DECL_LINK( CheckGroupShapeNameHdl, AbstractSvxNameDialog* );
DECL_LINK(ValidatePosition, SvxSwFrameValidation* );
@@ -54,7 +54,7 @@ public:
void Execute(SfxRequest &);
void GetState(SfxItemSet &);
void DisableState(SfxItemSet &rSet) { Disable(rSet);}
- BOOL Disable(SfxItemSet& rSet, USHORT nWhich = 0);
+ sal_Bool Disable(SfxItemSet& rSet, sal_uInt16 nWhich = 0);
void StateStatusline(SfxItemSet &rSet);
diff --git a/sw/source/ui/inc/drwtxtsh.hxx b/sw/source/ui/inc/drwtxtsh.hxx
index 93b1fbc579..a08222bd58 100644
--- a/sw/source/ui/inc/drwtxtsh.hxx
+++ b/sw/source/ui/inc/drwtxtsh.hxx
@@ -41,12 +41,12 @@ class SwDrawTextShell: public SfxShell
SdrView *pSdrView;
- BOOL bRotate : 1;
- BOOL bSelMove: 1;
+ sal_Bool bRotate : 1;
+ sal_Bool bSelMove: 1;
void SetAttrToMarked(const SfxItemSet& rAttr);
void InsertSymbol(SfxRequest& rReq);
- BOOL IsTextEdit();
+ sal_Bool IsTextEdit();
public:
SFX_DECL_INTERFACE(SW_DRWTXTSHELL)
TYPEINFO();
@@ -57,7 +57,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 81579d2539..76775fac05 100644
--- a/sw/source/ui/inc/dselect.hxx
+++ b/sw/source/ui/inc/dselect.hxx
@@ -41,9 +41,9 @@ class DrawSelection : public SwDrawBase
DrawSelection(SwWrtShell* pSh, SwEditWin* pWin, SwView* pView);
// Mouse- & Key-Events
- virtual BOOL KeyInput(const KeyEvent& rKEvt);
+ virtual sal_Bool KeyInput(const KeyEvent& rKEvt);
- virtual void Activate(const USHORT nSlotId); // Function aktivieren
+ virtual void Activate(const sal_uInt16 nSlotId); // Function aktivieren
};
diff --git a/sw/source/ui/inc/edtwin.hxx b/sw/source/ui/inc/edtwin.hxx
index 1e557a2949..97de8e3d2a 100644
--- a/sw/source/ui/inc/edtwin.hxx
+++ b/sw/source/ui/inc/edtwin.hxx
@@ -60,23 +60,23 @@ class SwEditWin: public Window,
public DropTargetHelper, public DragSourceHelper
{
friend void ScrollMDI(ViewShell* pVwSh, const SwRect&,
- USHORT nRangeX, USHORT nRangeY);
-friend BOOL IsScrollMDI(ViewShell* pVwSh, const SwRect&);
+ sal_uInt16 nRangeX, sal_uInt16 nRangeY);
+friend sal_Bool IsScrollMDI(ViewShell* pVwSh, const SwRect&);
friend void SizeNotify(ViewShell* pVwSh, const Size &);
friend void PageNumNotify( ViewShell* pVwSh,
- USHORT nPhyNum,
- USHORT nVirtNum,
+ sal_uInt16 nPhyNum,
+ sal_uInt16 nVirtNum,
const String& rPg );
static QuickHelpData* pQuickHlpData;
- static BOOL bReplaceQuote;
+ static sal_Bool bReplaceQuote;
static long nDDStartPosX, nDDStartPosY;
static Color aTextColor; //Textfarbe, fuer die Giesskanne
- static BOOL bTransparentBackColor; // Hintergrund transparent
+ static sal_Bool bTransparentBackColor; // Hintergrund transparent
static Color aTextBackColor; //Texthintergrundfarbe, fuer die Giesskanne
/*
@@ -113,14 +113,14 @@ friend void PageNumNotify( ViewShell* pVwSh,
int aActHitType; // aktueller Mauspointer
- ULONG m_nDropFormat; //Format aus dem letzten QueryDrop
- USHORT m_nDropAction; //Action aus dem letzten QueryDrop
- USHORT m_nDropDestination; //Ziel aus dem letzten QueryDrop
+ sal_uLong m_nDropFormat; //Format aus dem letzten QueryDrop
+ sal_uInt16 m_nDropAction; //Action aus dem letzten QueryDrop
+ sal_uInt16 m_nDropDestination; //Ziel aus dem letzten QueryDrop
- UINT16 eBezierMode;
- UINT16 nInsFrmColCount; //Spaltenzahl fuer interaktiven Rahmen
+ sal_uInt16 eBezierMode;
+ sal_uInt16 nInsFrmColCount; //Spaltenzahl fuer interaktiven Rahmen
SdrObjKind eDrawMode;
- BOOL bLinkRemoved : 1,
+ sal_Bool bLinkRemoved : 1,
bMBPressed : 1,
bInsDraw : 1,
bInsFrm : 1,
@@ -142,8 +142,8 @@ friend void PageNumNotify( ViewShell* pVwSh,
bObjectSelect : 1;
- USHORT nKS_NUMDOWN_Count; // #i23725#
- USHORT nKS_NUMINDENTINC_Count;
+ sal_uInt16 nKS_NUMDOWN_Count; // #i23725#
+ sal_uInt16 nKS_NUMINDENTINC_Count;
void LeaveArea(const Point &);
void JustifyAreaTimer();
@@ -151,19 +151,19 @@ friend void PageNumNotify( ViewShell* pVwSh,
void RstMBDownFlags();
- void ChangeFly( BYTE nDir, BOOL bWeb = FALSE );
- void ChangeDrawing( BYTE nDir );
+ void ChangeFly( sal_uInt8 nDir, sal_Bool bWeb = sal_False );
+ void ChangeDrawing( sal_uInt8 nDir );
- BOOL EnterDrawMode(const MouseEvent& rMEvt, const Point& aDocPos);
- BOOL RulerColumnDrag( const MouseEvent& rMEvt, BOOL bVerticalMode);
+ sal_Bool EnterDrawMode(const MouseEvent& rMEvt, const Point& aDocPos);
+ sal_Bool RulerColumnDrag( const MouseEvent& rMEvt, sal_Bool bVerticalMode);
//Hilfsfunktionen fuer D&D
void DropCleanup();
void CleanupDropUserMarker();
- USHORT GetDropDestination( const Point& rPixPnt,
+ sal_uInt16 GetDropDestination( const Point& rPixPnt,
SdrObject ** ppObj = 0 );
//select the object/cursor at the mouse position of the context menu request
- BOOL SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos );
+ sal_Bool SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos );
/*
* Handler fuer das Weiterscrollen, wenn der Mauspointer innerhalb eines
@@ -217,45 +217,45 @@ protected:
SvxAutoCorrect* pACorr, sal_Bool bFromIME = sal_False );
public:
- void UpdatePointer(const Point &, USHORT nButtons = 0);
+ void UpdatePointer(const Point &, sal_uInt16 nButtons = 0);
- BOOL IsDrawSelMode();
- BOOL IsDrawAction() { return (bInsDraw); }
- void SetDrawAction(BOOL bFlag) { bInsDraw = bFlag; }
+ sal_Bool IsDrawSelMode();
+ sal_Bool IsDrawAction() { return (bInsDraw); }
+ void SetDrawAction(sal_Bool bFlag) { bInsDraw = bFlag; }
- void SetObjectSelect( BOOL bVal ) { bObjectSelect = bVal; }
- BOOL IsObjectSelect() const { return bObjectSelect; }
+ void SetObjectSelect( sal_Bool bVal ) { bObjectSelect = bVal; }
+ sal_Bool IsObjectSelect() const { return bObjectSelect; }
- inline SdrObjKind GetSdrDrawMode(/*BOOL bBuf = FALSE*/) const { return eDrawMode; }
- inline void SetSdrDrawMode( SdrObjKind eSdrObjectKind ) { eDrawMode = eSdrObjectKind; SetObjectSelect( FALSE ); }
- void StdDrawMode( SdrObjKind eSdrObjectKind, BOOL bObjSelect );
+ inline SdrObjKind GetSdrDrawMode(/*sal_Bool bBuf = sal_False*/) const { return eDrawMode; }
+ inline void SetSdrDrawMode( SdrObjKind eSdrObjectKind ) { eDrawMode = eSdrObjectKind; SetObjectSelect( sal_False ); }
+ void StdDrawMode( SdrObjKind eSdrObjectKind, sal_Bool bObjSelect );
- BOOL IsFrmAction() { return (bInsFrm); }
- inline UINT16 GetBezierMode() { return eBezierMode; }
- void SetBezierMode(UINT16 eBezMode) { eBezierMode = eBezMode; }
+ sal_Bool IsFrmAction() { return (bInsFrm); }
+ inline sal_uInt16 GetBezierMode() { return eBezierMode; }
+ void SetBezierMode(sal_uInt16 eBezMode) { eBezierMode = eBezMode; }
void EnterDrawTextMode(const Point& aDocPos); // DrawTextEditMode einschalten
- void InsFrm(USHORT nCols);
+ void InsFrm(sal_uInt16 nCols);
void StopInsFrm();
- UINT16 GetFrmColCount() const {return nInsFrmColCount;} //Spaltenzahl fuer interaktiven Rahmen
+ sal_uInt16 GetFrmColCount() const {return nInsFrmColCount;} //Spaltenzahl fuer interaktiven Rahmen
- void SetChainMode( BOOL bOn );
- BOOL IsChainMode() const { return bChainMode; }
+ void SetChainMode( sal_Bool bOn );
+ sal_Bool IsChainMode() const { return bChainMode; }
void FlushInBuffer();
- BOOL IsInputSequenceCheckingRequired( const String &rText, const SwPaM& rCrsr ) const;
+ sal_Bool IsInputSequenceCheckingRequired( const String &rText, const SwPaM& rCrsr ) const;
- static void SetReplaceQuote(BOOL bOn = TRUE) { bReplaceQuote = bOn; }
- static BOOL IsReplaceQuote() { return bReplaceQuote; }
+ static void SetReplaceQuote(sal_Bool bOn = sal_True) { bReplaceQuote = bOn; }
+ static sal_Bool IsReplaceQuote() { return bReplaceQuote; }
void SetApplyTemplate(const SwApplyTemplate &);
SwApplyTemplate* GetApplyTemplate() const { return pApplyTempl; }
void StartExecuteDrag();
void DragFinished();
- USHORT GetDropAction() const { return m_nDropAction; }
- ULONG GetDropFormat() const { return m_nDropFormat; }
+ sal_uInt16 GetDropAction() const { return m_nDropAction; }
+ sal_uLong GetDropFormat() const { return m_nDropFormat; }
Color GetTextColor() { return aTextColor; }
@@ -265,11 +265,11 @@ public:
{ return aTextBackColor; }
void SetTextBackColor(const Color& rCol )
{ aTextBackColor = rCol; }
- void SetTextBackColorTransparent(BOOL bSet)
+ void SetTextBackColorTransparent(sal_Bool bSet)
{ bTransparentBackColor = bSet; }
- BOOL IsTextBackColorTransparent()
+ sal_Bool IsTextBackColorTransparent()
{ return bTransparentBackColor; }
- void LockKeyInput(BOOL bSet){bLockInput = bSet;}
+ void LockKeyInput(sal_Bool bSet){bLockInput = bSet;}
const SwView &GetView() const { return rView; }
SwView &GetView() { return rView; }
@@ -289,7 +289,7 @@ public:
void StopQuickHelp();
// --> OD 2005-02-18 #i42921# - add parameter <bVerticalMode>
- BOOL RulerMarginDrag( const MouseEvent& rMEvt,
+ sal_Bool RulerMarginDrag( const MouseEvent& rMEvt,
const bool bVerticalMode );
// <--
diff --git a/sw/source/ui/inc/envimg.hxx b/sw/source/ui/inc/envimg.hxx
index ed767d2552..6497f00615 100644
--- a/sw/source/ui/inc/envimg.hxx
+++ b/sw/source/ui/inc/envimg.hxx
@@ -77,8 +77,8 @@ public:
virtual int operator ==(const SfxPoolItem& rItem) const;
virtual SfxPoolItem* Clone(SfxItemPool* = 0) const;
- virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
- virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
};
// class SwEnvCfgItem -------------------------------------------------------
diff --git a/sw/source/ui/inc/envlop.hxx b/sw/source/ui/inc/envlop.hxx
index 6fddc3819d..2d4ccf0a16 100644
--- a/sw/source/ui/inc/envlop.hxx
+++ b/sw/source/ui/inc/envlop.hxx
@@ -90,11 +90,11 @@ friend class SwEnvPreview;
SfxItemSet *pAddresseeSet;
SfxItemSet *pSenderSet;
- virtual void PageCreated( USHORT nId, SfxTabPage &rPage );
+ virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage );
virtual short Ok();
public:
- SwEnvDlg(Window* pParent, const SfxItemSet& rSet, SwWrtShell* pWrtSh, Printer* pPrt, BOOL bInsert);
+ SwEnvDlg(Window* pParent, const SfxItemSet& rSet, SwWrtShell* pWrtSh, Printer* pPrt, sal_Bool bInsert);
~SwEnvDlg();
};
@@ -140,7 +140,7 @@ public:
virtual void ActivatePage(const SfxItemSet& rSet);
virtual int DeactivatePage(SfxItemSet* pSet = 0);
void FillItem(SwEnvItem& rItem);
- virtual BOOL FillItemSet(SfxItemSet& rSet);
+ virtual sal_Bool FillItemSet(SfxItemSet& rSet);
virtual void Reset(const SfxItemSet& rSet);
};
diff --git a/sw/source/ui/inc/fldedt.hxx b/sw/source/ui/inc/fldedt.hxx
index 25290b2cc2..c71be21464 100644
--- a/sw/source/ui/inc/fldedt.hxx
+++ b/sw/source/ui/inc/fldedt.hxx
@@ -47,7 +47,7 @@ class SwFldEditDlg : public SfxSingleTabDialog
DECL_LINK( NextPrevHdl, Button *pBt = 0 );
void Init();
- SfxTabPage* CreatePage(USHORT nGroup);
+ SfxTabPage* CreatePage(sal_uInt16 nGroup);
public:
@@ -58,7 +58,7 @@ public:
virtual short Execute();
- void EnableInsert(BOOL bEnable);
+ void EnableInsert(sal_Bool bEnable);
void InsertHdl();
};
diff --git a/sw/source/ui/inc/fldmgr.hxx b/sw/source/ui/inc/fldmgr.hxx
index 5f92d302e0..76cc1cf2ed 100644
--- a/sw/source/ui/inc/fldmgr.hxx
+++ b/sw/source/ui/inc/fldmgr.hxx
@@ -68,8 +68,8 @@ enum SwFldGroups
struct SwFldGroupRgn
{
- USHORT nStart;
- USHORT nEnd;
+ sal_uInt16 nStart;
+ sal_uInt16 nEnd;
};
/*--------------------------------------------------------------------
@@ -78,21 +78,21 @@ struct SwFldGroupRgn
--------------------------------------------------------------------*/
struct SwInsertFld_Data
{
- USHORT nTypeId;
- USHORT nSubType;
+ sal_uInt16 nTypeId;
+ sal_uInt16 nSubType;
const String sPar1;
const String sPar2;
- ULONG nFormatId;
+ sal_uLong nFormatId;
SwWrtShell* pSh;
sal_Unicode cSeparator;
- BOOL bIsAutomaticLanguage;
+ sal_Bool bIsAutomaticLanguage;
::com::sun::star::uno::Any aDBDataSource;
::com::sun::star::uno::Any aDBConnection;
::com::sun::star::uno::Any aDBColumn;
Window* pParent; // parent dialog used for SwWrtShell::StartInputFldDlg()
- SwInsertFld_Data(USHORT nType, USHORT nSub, const String& rPar1, const String& rPar2,
- ULONG nFmtId, SwWrtShell* pShell = NULL, sal_Unicode cSep = ' ', BOOL bIsAutoLanguage = TRUE) :
+ SwInsertFld_Data(sal_uInt16 nType, sal_uInt16 nSub, const String& rPar1, const String& rPar2,
+ sal_uLong nFmtId, SwWrtShell* pShell = NULL, sal_Unicode cSep = ' ', sal_Bool bIsAutoLanguage = sal_True) :
nTypeId(nType),
nSubType(nSub),
sPar1(rPar1),
@@ -106,7 +106,7 @@ struct SwInsertFld_Data
SwInsertFld_Data() :
pSh(0),
cSeparator(' '),
- bIsAutomaticLanguage(TRUE){}
+ bIsAutomaticLanguage(sal_True){}
};
@@ -124,10 +124,10 @@ private:
String sMacroPath;
String sMacroName;
- ULONG nCurFmt;
- BOOL bEvalExp;
+ sal_uLong nCurFmt;
+ sal_Bool bEvalExp;
- SW_DLLPRIVATE USHORT GetCurrLanguage() const;
+ SW_DLLPRIVATE sal_uInt16 GetCurrLanguage() const;
com::sun::star::uno::Reference<com::sun::star::container::XNameAccess> xDBContext;
com::sun::star::uno::Reference<com::sun::star::text::XNumberingTypeInfo> xNumberingInfo;
@@ -141,83 +141,83 @@ public:
{ pWrtShell = pShell; }
// Feld einfuegen ueber TypeId (TYP_ ...)
- BOOL InsertFld( const SwInsertFld_Data& rData );
+ sal_Bool InsertFld( const SwInsertFld_Data& rData );
// Direkt das aktuelle Feld aendern
- void UpdateCurFld(ULONG nFormat,
+ void UpdateCurFld(sal_uLong nFormat,
const String& rPar1,
const String& rPar2,
SwField * _pField = 0); // #111840#
inline const String& GetCurFldPar1() const;
inline const String& GetCurFldPar2() const;
- inline ULONG GetCurFldFmt() const;
+ inline sal_uLong GetCurFldFmt() const;
// Ein Feld ermitteln
SwField* GetCurFld();
void InsertFldType(SwFieldType& rType);
- BOOL ChooseMacro(const String &rSelMacro = aEmptyStr);
+ sal_Bool ChooseMacro(const String &rSelMacro = aEmptyStr);
void SetMacroPath(const String& rPath);
inline const String& GetMacroPath() const { return (sMacroPath); }
inline const String& GetMacroName() const { return (sMacroName); }
inline void SetMacroModule(SbModule* pMod) { pModule = pMod; }
// Vorheriger Naechster gleichen Typ
- BOOL GoNextPrev( BOOL bNext = TRUE, SwFieldType* pTyp = 0 );
- BOOL GoNext( SwFieldType* pTyp = 0 ) { return GoNextPrev( TRUE, pTyp ); }
- BOOL GoPrev( SwFieldType* pTyp = 0 ) { return GoNextPrev( FALSE, pTyp ); }
+ sal_Bool GoNextPrev( sal_Bool bNext = sal_True, SwFieldType* pTyp = 0 );
+ sal_Bool GoNext( SwFieldType* pTyp = 0 ) { return GoNextPrev( sal_True, pTyp ); }
+ sal_Bool GoPrev( SwFieldType* pTyp = 0 ) { return GoNextPrev( sal_False, pTyp ); }
// Erfragen von Werten aus Datenbankfeldern (BASIC )
// String GetDataBaseFieldValue(const String &rDBName, const String &rFieldName, SwWrtShell* pSh);
- BOOL IsDBNumeric(const String& rDBName, const String& rTblQryName,
- BOOL bIsTable, const String& rFldName);
+ sal_Bool IsDBNumeric(const String& rDBName, const String& rTblQryName,
+ sal_Bool bIsTable, const String& rFldName);
// RefMark mit Namen organisieren
- BOOL CanInsertRefMark( const String& rStr );
+ sal_Bool CanInsertRefMark( const String& rStr );
// Zugriff ueber ResId auf Feldtypen
- USHORT GetFldTypeCount(USHORT nResId = USHRT_MAX) const;
- SwFieldType* GetFldType(USHORT nResId, USHORT nId = 0) const;
- SwFieldType* GetFldType(USHORT nResId, const String& rName) const;
+ sal_uInt16 GetFldTypeCount(sal_uInt16 nResId = USHRT_MAX) const;
+ SwFieldType* GetFldType(sal_uInt16 nResId, sal_uInt16 nId = 0) const;
+ SwFieldType* GetFldType(sal_uInt16 nResId, const String& rName) const;
- void RemoveFldType(USHORT nResId, const String& rName);
+ void RemoveFldType(sal_uInt16 nResId, const String& rName);
// Zugriff ueber TypeId aus dem Dialog
// Ids fuer einen Bereich von Feldern
- const SwFldGroupRgn& GetGroupRange(BOOL bHtmlMode, USHORT nGrpId) const;
- USHORT GetGroup(BOOL bHtmlMode, USHORT nTypeId, USHORT nSubType = 0) const;
+ const SwFldGroupRgn& GetGroupRange(sal_Bool bHtmlMode, sal_uInt16 nGrpId) const;
+ sal_uInt16 GetGroup(sal_Bool bHtmlMode, sal_uInt16 nTypeId, sal_uInt16 nSubType = 0) const;
// TypeId des aktuellen Feldes
- USHORT GetCurTypeId() const;
+ sal_uInt16 GetCurTypeId() const;
// TypeId fuer einen konkrete Pos in der Liste
- static USHORT GetTypeId(USHORT nPos);
+ static sal_uInt16 GetTypeId(sal_uInt16 nPos);
// Name des Typen in der Liste der Felder
- static const String& GetTypeStr(USHORT nPos);
+ static const String& GetTypeStr(sal_uInt16 nPos);
// Pos in der Liste der Felder
- static USHORT GetPos(USHORT nTypeId);
+ static sal_uInt16 GetPos(sal_uInt16 nTypeId);
// Untertypen zu einem Typ
- BOOL GetSubTypes(USHORT nId, SvStringsDtor& rToFill);
+ sal_Bool GetSubTypes(sal_uInt16 nId, SvStringsDtor& rToFill);
// Formate zu einem Typ
- USHORT GetFormatCount(USHORT nTypeId, BOOL bIsText, BOOL bHtmlMode = FALSE) const;
- String GetFormatStr(USHORT nTypeId, ULONG nFormatId) const;
- USHORT GetFormatId(USHORT nTypeId, ULONG nFormatId) const;
- ULONG GetDefaultFormat(USHORT nTypeId, BOOL bIsText, SvNumberFormatter* pFormatter, double* pVal = 0L);
+ sal_uInt16 GetFormatCount(sal_uInt16 nTypeId, sal_Bool bIsText, sal_Bool bHtmlMode = sal_False) const;
+ String GetFormatStr(sal_uInt16 nTypeId, sal_uLong nFormatId) const;
+ sal_uInt16 GetFormatId(sal_uInt16 nTypeId, sal_uLong nFormatId) const;
+ sal_uLong GetDefaultFormat(sal_uInt16 nTypeId, sal_Bool bIsText, SvNumberFormatter* pFormatter, double* pVal = 0L);
// Evaluierung der ExpressionFelder ausschalten fuer das Einfuegen
// vieler Expressionfelder (siehe Etiketten)
//
- inline void SetEvalExpFlds(BOOL bEval);
+ inline void SetEvalExpFlds(sal_Bool bEval);
void EvalExpFlds(SwWrtShell* pSh = NULL);
};
-inline void SwFldMgr::SetEvalExpFlds(BOOL bEval)
+inline void SwFldMgr::SetEvalExpFlds(sal_Bool bEval)
{ bEvalExp = bEval; }
inline const String& SwFldMgr::GetCurFldPar1() const
@@ -226,7 +226,7 @@ inline const String& SwFldMgr::GetCurFldPar1() const
inline const String& SwFldMgr::GetCurFldPar2() const
{ return aCurPar2; }
-inline ULONG SwFldMgr::GetCurFldFmt() const
+inline sal_uLong SwFldMgr::GetCurFldFmt() const
{ return nCurFmt; }
diff --git a/sw/source/ui/inc/fldtdlg.hxx b/sw/source/ui/inc/fldtdlg.hxx
index 456c951611..5fac8a67a6 100644
--- a/sw/source/ui/inc/fldtdlg.hxx
+++ b/sw/source/ui/inc/fldtdlg.hxx
@@ -41,16 +41,16 @@ class SwFldDlg: public SfxTabDialog
{
SwChildWinWrapper* m_pChildWin;
SfxBindings* m_pBindings;
- BOOL m_bHtmlMode;
- BOOL m_bDataBaseMode;
+ sal_Bool m_bHtmlMode;
+ sal_Bool m_bDataBaseMode;
- virtual BOOL Close();
- virtual SfxItemSet* CreateInputItemSet( USHORT nId );
+ virtual sal_Bool Close();
+ virtual SfxItemSet* CreateInputItemSet( sal_uInt16 nId );
virtual void Activate();
- virtual void PageCreated(USHORT nId, SfxTabPage& rPage);
+ virtual void PageCreated(sal_uInt16 nId, SfxTabPage& rPage);
- void ReInitTabPage( USHORT nPageId,
- BOOL bOnlyActivate = FALSE );
+ void ReInitTabPage( sal_uInt16 nPageId,
+ sal_Bool bOnlyActivate = sal_False );
public:
SwFldDlg(SfxBindings* pB, SwChildWinWrapper* pCW, Window *pParent);
@@ -60,7 +60,7 @@ public:
void Initialize(SfxChildWinInfo *pInfo);
void ReInitDlg();
- void EnableInsert(BOOL bEnable);
+ void EnableInsert(sal_Bool bEnable);
void InsertHdl();
void ActivateDatabasePage();
};
diff --git a/sw/source/ui/inc/fldwrap.hxx b/sw/source/ui/inc/fldwrap.hxx
index aa57f7ab18..e7c62bd4b8 100644
--- a/sw/source/ui/inc/fldwrap.hxx
+++ b/sw/source/ui/inc/fldwrap.hxx
@@ -34,13 +34,13 @@ class SwFldDlgWrapper : public SwChildWinWrapper
{
public:
AbstractSwFldDlg * pDlgInterface;
- SwFldDlgWrapper( Window* pParent, USHORT nId,
+ SwFldDlgWrapper( Window* pParent, sal_uInt16 nId,
SfxBindings* pBindings, SfxChildWinInfo* pInfo );
SFX_DECL_CHILDWINDOW(SwFldDlgWrapper);
- virtual BOOL ReInitDlg(SwDocShell *pDocSh);
- void ShowPage(USHORT nPage = 0);
+ virtual sal_Bool ReInitDlg(SwDocShell *pDocSh);
+ void ShowPage(sal_uInt16 nPage = 0);
};
/* -----------------04.02.2003 14:14-----------------
* field dialog only showing database page to support
@@ -50,12 +50,12 @@ class SwFldDataOnlyDlgWrapper : public SwChildWinWrapper
{
public:
AbstractSwFldDlg * pDlgInterface;
- SwFldDataOnlyDlgWrapper( Window* pParent, USHORT nId,
+ SwFldDataOnlyDlgWrapper( Window* pParent, sal_uInt16 nId,
SfxBindings* pBindings, SfxChildWinInfo* pInfo );
SFX_DECL_CHILDWINDOW(SwFldDataOnlyDlgWrapper);
- virtual BOOL ReInitDlg(SwDocShell *pDocSh);
+ virtual sal_Bool ReInitDlg(SwDocShell *pDocSh);
};
diff --git a/sw/source/ui/inc/fontcfg.hxx b/sw/source/ui/inc/fontcfg.hxx
index 69721d3439..8f6d198e07 100644
--- a/sw/source/ui/inc/fontcfg.hxx
+++ b/sw/source/ui/inc/fontcfg.hxx
@@ -68,7 +68,7 @@ class SW_DLLPUBLIC SwStdFontConfig : public utl::ConfigItem
SW_DLLPRIVATE com::sun::star::uno::Sequence<rtl::OUString> GetPropertyNames();
- void ChangeString(USHORT nFontType, const String& rSet)
+ void ChangeString(sal_uInt16 nFontType, const String& rSet)
{
if(sDefaultFonts[nFontType] != rSet)
{
@@ -77,7 +77,7 @@ class SW_DLLPUBLIC SwStdFontConfig : public utl::ConfigItem
}
}
- void ChangeInt( USHORT nFontType, sal_Int32 nHeight );
+ void ChangeInt( sal_uInt16 nFontType, sal_Int32 nHeight );
public:
SwStdFontConfig();
@@ -92,8 +92,8 @@ public:
const String& GetFontCaption(sal_uInt8 nFontGroup) const {return sDefaultFonts[FONT_CAPTION + FONT_PER_GROUP * nFontGroup];}
const String& GetFontIndex (sal_uInt8 nFontGroup) const {return sDefaultFonts[FONT_INDEX + FONT_PER_GROUP * nFontGroup];}
- const String& GetFontFor(USHORT nFontType) const {return sDefaultFonts[nFontType];}
- BOOL IsFontDefault(USHORT nFontType) const;
+ const String& GetFontFor(sal_uInt16 nFontType) const {return sDefaultFonts[nFontType];}
+ sal_Bool IsFontDefault(sal_uInt16 nFontType) const;
void SetFontStandard(const String& rSet, sal_uInt8 nFontGroup)
{ChangeString(FONT_STANDARD + FONT_PER_GROUP * nFontGroup, rSet);}
@@ -112,8 +112,8 @@ public:
sal_Int32 GetFontHeight( sal_uInt8 nFont, sal_uInt8 nScriptType, LanguageType eLang );
- static String GetDefaultFor(USHORT nFontType, LanguageType eLang);
- static sal_Int32 GetDefaultHeightFor(USHORT nFontType, LanguageType eLang);
+ static String GetDefaultFor(sal_uInt16 nFontType, LanguageType eLang);
+ static sal_Int32 GetDefaultHeightFor(sal_uInt16 nFontType, LanguageType eLang);
};
#endif
diff --git a/sw/source/ui/inc/formedt.hxx b/sw/source/ui/inc/formedt.hxx
index 5efa1621b2..14f13e3266 100644
--- a/sw/source/ui/inc/formedt.hxx
+++ b/sw/source/ui/inc/formedt.hxx
@@ -89,14 +89,14 @@ class SwIdxFormDlg : public SvxStandardDialog
SwWrtShell &rSh;
SwForm *pForm;
- USHORT nAktLevel;
- BOOL bLastLinkIsEnd;
+ sal_uInt16 nAktLevel;
+ sal_Bool bLastLinkIsEnd;
public:
SwIdxFormDlg( Window* pParent, SwWrtShell &rShell, const SwForm& rForm );
~SwIdxFormDlg();
- static BOOL IsNoNum(SwWrtShell& rSh, const String& rName);
+ static sal_Bool IsNoNum(SwWrtShell& rSh, const String& rName);
const SwForm& GetTOXForm();
};
diff --git a/sw/source/ui/inc/frmdlg.hxx b/sw/source/ui/inc/frmdlg.hxx
index 43be092b58..e002c1f6c4 100644
--- a/sw/source/ui/inc/frmdlg.hxx
+++ b/sw/source/ui/inc/frmdlg.hxx
@@ -38,24 +38,24 @@ class SwWrtShell;
class SwFrmDlg : public SfxTabDialog
{
- BOOL m_bFormat;
- BOOL m_bNew;
- BOOL m_bHTMLMode;
+ sal_Bool m_bFormat;
+ sal_Bool m_bNew;
+ sal_Bool m_bHTMLMode;
bool m_bEnableVertPos;
const SfxItemSet& m_rSet;
- USHORT m_nDlgType;
+ sal_uInt16 m_nDlgType;
SwWrtShell* m_pWrtShell;
- virtual void PageCreated( USHORT nId, SfxTabPage &rPage );
+ virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage );
public:
SwFrmDlg( SfxViewFrame *pFrame, Window *pParent,
const SfxItemSet& rCoreSet,
- BOOL bNewFrm = TRUE,
- USHORT nResType = DLG_FRM_STD,
- BOOL bFmt = FALSE,
- UINT16 nDefPage = 0,
+ sal_Bool bNewFrm = sal_True,
+ sal_uInt16 nResType = DLG_FRM_STD,
+ sal_Bool bFmt = sal_False,
+ sal_uInt16 nDefPage = 0,
const String* pFmtStr = 0);
~SwFrmDlg();
diff --git a/sw/source/ui/inc/frmmgr.hxx b/sw/source/ui/inc/frmmgr.hxx
index 09d878c10e..631f57297b 100644
--- a/sw/source/ui/inc/frmmgr.hxx
+++ b/sw/source/ui/inc/frmmgr.hxx
@@ -62,9 +62,9 @@ class SW_DLLPUBLIC SwFlyFrmAttrMgr
Point aAbsPos;
SwWrtShell *pOwnSh;
- BOOL bAbsPos,
+ sal_Bool bAbsPos,
bNewFrm;
- BOOL bIsInVertical;
+ sal_Bool bIsInVertical;
// interne Verrechnung fuer Umrandung
SW_DLLPRIVATE SwTwips CalcTopSpace();
@@ -75,10 +75,10 @@ class SW_DLLPUBLIC SwFlyFrmAttrMgr
SW_DLLPRIVATE void _UpdateFlyFrm(); //Nacharbeit nach Einfuegen oder Update
public:
- SwFlyFrmAttrMgr( BOOL bNew, SwWrtShell* pSh, BYTE nType );
+ SwFlyFrmAttrMgr( sal_Bool bNew, SwWrtShell* pSh, sal_uInt8 nType );
//CopyCtor fuer die Dialoge, zum Pruefen der Metrics
- SwFlyFrmAttrMgr( BOOL bNew, SwWrtShell *pSh, const SfxItemSet &rSet );
+ SwFlyFrmAttrMgr( sal_Bool bNew, SwWrtShell *pSh, const SfxItemSet &rSet );
inline SwWrtShell* GetShell() { return pOwnSh; }
@@ -99,7 +99,7 @@ public:
void SetSize(const Size& rLSize);
inline const Size& GetSize() const;
- inline USHORT GetHeightPercent() const;
+ inline sal_uInt16 GetHeightPercent() const;
void SetHeightSizeType(SwFrmSize eType);
@@ -116,18 +116,18 @@ public:
void UpdateFlyFrm();
// neuen Rahmen erzeugen
- BOOL InsertFlyFrm();
+ sal_Bool InsertFlyFrm();
void InsertFlyFrm(RndStdIds eAnchorType,
const Point &rPos,
const Size &rSize,
- BOOL bAbsPos = FALSE);
+ sal_Bool bAbsPos = sal_False);
// Metriken pruefen und aendern
void ValidateMetrics(SvxSwFrameValidation& rVal,
const SwPosition* pToCharCntntPos,
- BOOL bOnlyPercentRefValue = FALSE);
+ sal_Bool bOnlyPercentRefValue = sal_False);
- void DelAttr(USHORT nId);
+ void DelAttr(sal_uInt16 nId);
// Set rausreichen
inline const SfxItemSet &GetAttrSet() const { return aSet; }
@@ -185,7 +185,7 @@ inline RndStdIds SwFlyFrmAttrMgr::GetAnchor() const
return ((SwFmtAnchor&)aSet.Get(RES_ANCHOR)).GetAnchorId();
}
-inline USHORT SwFlyFrmAttrMgr::GetHeightPercent() const
+inline sal_uInt16 SwFlyFrmAttrMgr::GetHeightPercent() const
{
return GetFrmSize().GetHeightPercent();
}
diff --git a/sw/source/ui/inc/frmpage.hxx b/sw/source/ui/inc/frmpage.hxx
index 1f097d1c29..db31fed85a 100644
--- a/sw/source/ui/inc/frmpage.hxx
+++ b/sw/source/ui/inc/frmpage.hxx
@@ -101,18 +101,18 @@ class SwFrmPage: public SfxTabPage
//'string provider'
SvxSwFramePosString aFramePosString;
- BOOL bAtHorzPosModified;
- BOOL bAtVertPosModified;
-
- BOOL bFormat;
- BOOL bNew;
- BOOL bNoModifyHdl;
- BOOL bVerticalChanged; //check done whether frame is in vertical environment
- BOOL bIsVerticalFrame; //current frame is in vertical environment - strings are exchanged
- BOOL bIsInRightToLeft; // current frame is in right-to-left environment - strings are exchanged
- BOOL bHtmlMode;
- USHORT nHtmlMode;
- USHORT nDlgType;
+ sal_Bool bAtHorzPosModified;
+ sal_Bool bAtVertPosModified;
+
+ sal_Bool bFormat;
+ sal_Bool bNew;
+ sal_Bool bNoModifyHdl;
+ sal_Bool bVerticalChanged; //check done whether frame is in vertical environment
+ sal_Bool bIsVerticalFrame; //current frame is in vertical environment - strings are exchanged
+ sal_Bool bIsInRightToLeft; // current frame is in right-to-left environment - strings are exchanged
+ sal_Bool bHtmlMode;
+ sal_uInt16 nHtmlMode;
+ sal_uInt16 nDlgType;
Size aGrfSize;
Size aWrap;
SwTwips nUpperBorder;
@@ -144,8 +144,8 @@ class SwFrmPage: public SfxTabPage
DECL_LINK( AnchorTypeHdl, RadioButton * );
DECL_LINK( PosHdl, ListBox * );
DECL_LINK( RelHdl, ListBox * );
- void InitPos(RndStdIds eId, USHORT nH, USHORT nHRel,
- USHORT nV, USHORT nVRel,
+ void InitPos(RndStdIds eId, sal_uInt16 nH, sal_uInt16 nHRel,
+ sal_uInt16 nV, sal_uInt16 nVRel,
long nX, long nY);
DECL_LINK( RealSizeHdl, Button * );
@@ -159,23 +159,23 @@ class SwFrmPage: public SfxTabPage
void UpdateExample();
DECL_LINK( ModifyHdl, Edit * );
- void Init(const SfxItemSet& rSet, BOOL bReset = FALSE);
+ void Init(const SfxItemSet& rSet, sal_Bool bReset = sal_False);
// OD 12.11.2003 #i22341# - adjustment to handle maps, that are ambigous
// in the alignment.
- USHORT FillPosLB( const FrmMap* _pMap,
- const USHORT _nAlign,
- const USHORT _nRel,
+ sal_uInt16 FillPosLB( const FrmMap* _pMap,
+ const sal_uInt16 _nAlign,
+ const sal_uInt16 _nRel,
ListBox& _rLB );
// OD 14.11.2003 #i22341# - adjustment to handle maps, that are ambigous
// in their string entries.
- ULONG FillRelLB( const FrmMap* _pMap,
- const USHORT _nLBSelPos,
- const USHORT _nAlign,
- USHORT _nRel,
+ sal_uLong FillRelLB( const FrmMap* _pMap,
+ const sal_uInt16 _nLBSelPos,
+ const sal_uInt16 _nAlign,
+ sal_uInt16 _nRel,
ListBox& _rLB,
FixedText& _rFT );
- USHORT GetMapPos( const FrmMap *pMap, ListBox &rAlignLB );
- short GetAlignment(FrmMap *pMap, USHORT nMapPos, ListBox &rAlignLB, ListBox &rRelationLB);
+ sal_uInt16 GetMapPos( const FrmMap *pMap, ListBox &rAlignLB );
+ short GetAlignment(FrmMap *pMap, sal_uInt16 nMapPos, ListBox &rAlignLB, ListBox &rRelationLB);
short GetRelation(FrmMap *pMap, ListBox &rRelationLB);
RndStdIds GetAnchor();
@@ -190,15 +190,15 @@ class SwFrmPage: public SfxTabPage
public:
static SfxTabPage *Create(Window *pParent, const SfxItemSet &rSet);
- static USHORT* GetRanges();
+ static sal_uInt16* GetRanges();
- virtual BOOL FillItemSet(SfxItemSet &rSet);
+ virtual sal_Bool FillItemSet(SfxItemSet &rSet);
virtual void Reset(const SfxItemSet &rSet);
- void SetNewFrame(BOOL bNewFrame) { bNew = bNewFrame; }
- void SetFormatUsed(BOOL bFmt);
- void SetFrmType(USHORT nType) { nDlgType = nType; }
- inline BOOL IsInGraficMode( void ) { return nDlgType == DLG_FRM_GRF || nDlgType == DLG_FRM_OLE; }
+ void SetNewFrame(sal_Bool bNewFrame) { bNew = bNewFrame; }
+ void SetFormatUsed(sal_Bool bFmt);
+ void SetFrmType(sal_uInt16 nType) { nDlgType = nType; }
+ inline sal_Bool IsInGraficMode( void ) { return nDlgType == DLG_FRM_GRF || nDlgType == DLG_FRM_OLE; }
void EnableVerticalPositioning( bool bEnable );
};
@@ -223,7 +223,7 @@ class SwGrfExtPage: public SfxTabPage
::sfx2::FileDialogHelper* pGrfDlg;
- BOOL bHtmlMode;
+ sal_Bool bHtmlMode;
// Handler fuer Spiegeln
DECL_LINK( MirrorHdl, CheckBox * );
@@ -240,7 +240,7 @@ public:
static SfxTabPage *Create(Window *pParent, const SfxItemSet &rSet);
- virtual BOOL FillItemSet(SfxItemSet &rSet);
+ virtual sal_Bool FillItemSet(SfxItemSet &rSet);
virtual void Reset(const SfxItemSet &rSet);
virtual int DeactivatePage(SfxItemSet *pSet);
};
@@ -276,7 +276,7 @@ public:
static SfxTabPage *Create(Window *pParent, const SfxItemSet &rSet);
- virtual BOOL FillItemSet(SfxItemSet &rSet);
+ virtual sal_Bool FillItemSet(SfxItemSet &rSet);
virtual void Reset(const SfxItemSet &rSet);
};
@@ -310,10 +310,10 @@ class SwFrmAddPage : public SfxTabPage
SwWrtShell* pWrtSh;
- USHORT nDlgType;
- BOOL bHtmlMode;
- BOOL bFormat;
- BOOL bNew;
+ sal_uInt16 nDlgType;
+ sal_Bool bHtmlMode;
+ sal_Bool bFormat;
+ sal_Bool bNew;
DECL_LINK(EditModifyHdl, Edit*);
DECL_LINK(ChainModifyHdl, ListBox*);
@@ -324,14 +324,14 @@ class SwFrmAddPage : public SfxTabPage
public:
static SfxTabPage* Create(Window *pParent, const SfxItemSet &rSet);
- static USHORT* GetRanges();
+ static sal_uInt16* GetRanges();
- virtual BOOL FillItemSet(SfxItemSet &rSet);
+ virtual sal_Bool FillItemSet(SfxItemSet &rSet);
virtual void Reset(const SfxItemSet &rSet);
- void SetFormatUsed(BOOL bFmt);
- void SetFrmType(USHORT nType) { nDlgType = nType; }
- void SetNewFrame(BOOL bNewFrame) { bNew = bNewFrame; }
+ void SetFormatUsed(sal_Bool bFmt);
+ void SetFrmType(sal_uInt16 nType) { nDlgType = nType; }
+ void SetNewFrame(sal_Bool bNewFrame) { bNew = bNewFrame; }
void SetShell(SwWrtShell* pSh) { pWrtSh = pSh; }
};
diff --git a/sw/source/ui/inc/glosbib.hxx b/sw/source/ui/inc/glosbib.hxx
index ee8b73aaeb..82228bdaa5 100644
--- a/sw/source/ui/inc/glosbib.hxx
+++ b/sw/source/ui/inc/glosbib.hxx
@@ -97,7 +97,7 @@ class SwGlossaryGroupDlg : public SvxStandardDialog
String sCreatedGroup;
- BOOL IsDeleteAllowed(const String &rGroup);
+ sal_Bool IsDeleteAllowed(const String &rGroup);
protected:
virtual void Apply();
diff --git a/sw/source/ui/inc/glosdoc.hxx b/sw/source/ui/inc/glosdoc.hxx
index 343c3a6ca1..2e0e6faa1b 100644
--- a/sw/source/ui/inc/glosdoc.hxx
+++ b/sw/source/ui/inc/glosdoc.hxx
@@ -67,9 +67,9 @@ class SW_DLLPUBLIC SwGlossaries
String m_sErrPath;
SvStrings *m_pPathArr;
SvStrings *m_pGlosArr;
- BOOL m_bError;
+ sal_Bool m_bError;
- SW_DLLPRIVATE SwTextBlocks* GetGlosDoc(const String &rName, BOOL bCreate = TRUE) const;
+ SW_DLLPRIVATE SwTextBlocks* GetGlosDoc(const String &rName, sal_Bool bCreate = sal_True) const;
SW_DLLPRIVATE SvStrings *GetNameList();
// implementation in unoatxt.cxx
@@ -118,14 +118,14 @@ public:
bool _bCreate = false
);
- USHORT GetGroupCnt();
- String GetGroupName(USHORT );
+ sal_uInt16 GetGroupCnt();
+ String GetGroupName(sal_uInt16 );
String GetGroupTitle( const String& rGroupName );
- BOOL FindGroupName(String & rGroup);
+ sal_Bool FindGroupName(String & rGroup);
SwTextBlocks* GetGroupDoc(const String &rName,
- BOOL bCreate = FALSE) const;
+ sal_Bool bCreate = sal_False) const;
SwTextBlocks* GetDefGroupDoc() const {return GetGroupDoc(GetDefName());}
void PutGroupDoc(SwTextBlocks *pBlock);
static String GetDefName();
@@ -133,14 +133,14 @@ public:
String GetCompleteGroupName( const ::rtl::OUString& GroupName );
- BOOL NewGroupDoc(String &rGroupName, const String& rTitle);
- BOOL RenameGroupDoc(const String& sOldGroup, String& sNewGroup, const String& rNewTitle);
- BOOL DelGroupDoc(const String &);
- SwDocShellRef EditGroupDoc(const String &rGrpName, const String& rShortName, BOOL bShow = TRUE );
+ sal_Bool NewGroupDoc(String &rGroupName, const String& rTitle);
+ sal_Bool RenameGroupDoc(const String& sOldGroup, String& sNewGroup, const String& rNewTitle);
+ sal_Bool DelGroupDoc(const String &);
+ SwDocShellRef EditGroupDoc(const String &rGrpName, const String& rShortName, sal_Bool bShow = sal_True );
void SaveGroupDoc(const String &rGrpName, const String& rLongName );
- void UpdateGlosPath(BOOL bFull);
+ void UpdateGlosPath(sal_Bool bFull);
void ShowError();
- inline ULONG IsGlosPathErr() { return m_bError; }
+ inline sal_uLong IsGlosPathErr() { return m_bError; }
const SvStrings* GetPathArray() const {return m_pPathArr;}
};
diff --git a/sw/source/ui/inc/gloshdl.hxx b/sw/source/ui/inc/gloshdl.hxx
index 0e8b181f23..bb4e332721 100644
--- a/sw/source/ui/inc/gloshdl.hxx
+++ b/sw/source/ui/inc/gloshdl.hxx
@@ -50,42 +50,42 @@ class SW_DLLPUBLIC SwGlossaryHdl
const SvxMacro *pStart,
const SvxMacro *pEnd);
- SW_DLLPRIVATE BOOL Expand( const String& rShortName,
+ SW_DLLPRIVATE sal_Bool Expand( const String& rShortName,
SwGlossaries* pGlossaries,
SwTextBlocks *pGlossary );
public:
- BOOL ConvertToNew(SwTextBlocks& rOld);
+ sal_Bool ConvertToNew(SwTextBlocks& rOld);
void GlossaryDlg();
- USHORT GetGroupCnt() const;
- String GetGroupName( USHORT, String* pTitle = 0 );
- BOOL NewGroup(String & rGroupName, const String& rTitle);
- BOOL DelGroup(const String &);
- BOOL RenameGroup(const String & rOld, String& rNew, const String& rNewTitle);
- void SetCurGroup(const String &aGrp, BOOL bApi = FALSE, BOOL bAlwaysCreateNew = FALSE);
+ sal_uInt16 GetGroupCnt() const;
+ String GetGroupName( sal_uInt16, String* pTitle = 0 );
+ sal_Bool NewGroup(String & rGroupName, const String& rTitle);
+ sal_Bool DelGroup(const String &);
+ sal_Bool RenameGroup(const String & rOld, String& rNew, const String& rNewTitle);
+ void SetCurGroup(const String &aGrp, sal_Bool bApi = sal_False, sal_Bool bAlwaysCreateNew = sal_False);
const String &GetCurGroup() const { return aCurGrp; }
- USHORT GetGlossaryCnt();
- String GetGlossaryName(USHORT);
+ sal_uInt16 GetGlossaryCnt();
+ String GetGlossaryName(sal_uInt16);
String GetGlossaryShortName(const String &rName);
- String GetGlossaryShortName(USHORT);
+ String GetGlossaryShortName(sal_uInt16);
- BOOL Rename( const String& rOldShortName, const String& rNewShortName,
+ sal_Bool Rename( const String& rOldShortName, const String& rNewShortName,
const String& rNewName);
- BOOL CopyOrMove( const String& rSourceGroupName, String& rSourceShortName,
- const String& rDestGroupName, const String& rLongName, BOOL bMove );
- BOOL HasShortName(const String &rShortName) const;
+ sal_Bool CopyOrMove( const String& rSourceGroupName, String& rSourceShortName,
+ const String& rDestGroupName, const String& rLongName, sal_Bool bMove );
+ sal_Bool HasShortName(const String &rShortName) const;
//wird NewGlossary vom Basic gerufen, dann soll dir zuvor eingestellte
//Gruppe ggf. neu erstellt werden
- BOOL NewGlossary(const String &rName, const String &rShortName,
- BOOL bApiCall = FALSE, BOOL bNoAttr = FALSE );
- BOOL DelGlossary(const String&);
- BOOL CopyToClipboard(SwWrtShell& rSh, const String& rShortName);
+ sal_Bool NewGlossary(const String &rName, const String &rShortName,
+ sal_Bool bApiCall = sal_False, sal_Bool bNoAttr = sal_False );
+ sal_Bool DelGlossary(const String&);
+ sal_Bool CopyToClipboard(SwWrtShell& rSh, const String& rShortName);
- BOOL ExpandGlossary();
- BOOL InsertGlossary(const String &rName);
+ sal_Bool ExpandGlossary();
+ sal_Bool InsertGlossary(const String &rName);
void SetMacros(const String& rName,
const SvxMacro* pStart,
@@ -96,12 +96,12 @@ public:
SvxMacro& rEnd,
SwTextBlocks* pGlossary = 0 );
- BOOL IsReadOnly( const String* = 0 ) const;
- BOOL IsOld() const;
+ sal_Bool IsReadOnly( const String* = 0 ) const;
+ sal_Bool IsOld() const;
- BOOL FindGroupName(String & rGroup); // Gruppe ohne Pfadindex finden
+ sal_Bool FindGroupName(String & rGroup); // Gruppe ohne Pfadindex finden
- BOOL ImportGlossaries( const String& rName );
+ sal_Bool ImportGlossaries( const String& rName );
SwGlossaryHdl(SfxViewFrame* pViewFrame, SwWrtShell *);
~SwGlossaryHdl();
diff --git a/sw/source/ui/inc/gloslst.hxx b/sw/source/ui/inc/gloslst.hxx
index b2a0013018..20eef122da 100644
--- a/sw/source/ui/inc/gloslst.hxx
+++ b/sw/source/ui/inc/gloslst.hxx
@@ -39,7 +39,7 @@ class SvStringsISortDtor;
struct AutoTextGroup
{
- USHORT nCount;
+ sal_uInt16 nCount;
String sName;
String sTitle;
String sLongNames; // durch 0x0A getrennte Langnamen
@@ -55,7 +55,7 @@ class SwGlossaryList : public AutoTimer
{
AutoTextGroups aGroupArr;
String sPath;
- BOOL bFilled;
+ sal_Bool bFilled;
AutoTextGroup* FindGroup(const String& rGroupName);
void FillGroup(AutoTextGroup* pGroup, SwGlossaries* pGloss);
@@ -64,14 +64,14 @@ public:
SwGlossaryList();
~SwGlossaryList();
- BOOL HasLongName(const String& rBegin, SvStringsISortDtor* pLongNames );
- BOOL GetShortName(const String& rLongName,
+ sal_Bool HasLongName(const String& rBegin, SvStringsISortDtor* pLongNames );
+ sal_Bool GetShortName(const String& rLongName,
String& rShortName, String& rGroupName );
- USHORT GetGroupCount();
- String GetGroupName(USHORT nPos, BOOL bNoPath = TRUE, String* pTitle = 0);
- USHORT GetBlockCount(USHORT nGroup);
- String GetBlockName(USHORT nGroup, USHORT nBlock, String& rShortName);
+ sal_uInt16 GetGroupCount();
+ String GetGroupName(sal_uInt16 nPos, sal_Bool bNoPath = sal_True, String* pTitle = 0);
+ sal_uInt16 GetBlockCount(sal_uInt16 nGroup);
+ String GetBlockName(sal_uInt16 nGroup, sal_uInt16 nBlock, String& rShortName);
void Update();
diff --git a/sw/source/ui/inc/glossary.hxx b/sw/source/ui/inc/glossary.hxx
index 369b4d16fe..7dcda31bd0 100644
--- a/sw/source/ui/inc/glossary.hxx
+++ b/sw/source/ui/inc/glossary.hxx
@@ -87,12 +87,12 @@ class SwGlTreeListBox : public SvTreeListBox
virtual sal_Bool NotifyMoving( SvLBoxEntry* pTarget,
SvLBoxEntry* pEntry,
SvLBoxEntry*& rpNewParent,
- ULONG& rNewChildPos
+ sal_uLong& rNewChildPos
);
virtual sal_Bool NotifyCopying( SvLBoxEntry* pTarget,
SvLBoxEntry* pEntry,
SvLBoxEntry*& rpNewParent,
- ULONG& rNewChildPos);
+ sal_uLong& rNewChildPos);
public:
SwGlTreeListBox(Window* pParent, const ResId& rResId);
@@ -136,7 +136,7 @@ class SwGlossaryDlg : public SvxStandardDialog
String sResumeGroup;
String sResumeShortName;
- BOOL bResume;
+ sal_Bool bResume;
const sal_Bool bSelection : 1;
@@ -167,11 +167,11 @@ class SwGlossaryDlg : public SvxStandardDialog
void ShowAutoText(const String& rGroup, const String& rShortName);
void ResumeShowAutoText();
- BOOL GetResumeData(String& rGroup, String& rShortName)
+ sal_Bool GetResumeData(String& rGroup, String& rShortName)
{rGroup = sResumeGroup; rShortName = sResumeShortName; return bResume;}
void SetResumeData(const String& rGroup, const String& rShortName)
- {sResumeGroup = rGroup; sResumeShortName = rShortName; bResume = TRUE;}
- void ResetResumeData() {bResume = FALSE;}
+ {sResumeGroup = rGroup; sResumeShortName = rShortName; bResume = sal_True;}
+ void ResetResumeData() {bResume = sal_False;}
public:
SwGlossaryDlg(SfxViewFrame* pViewFrame, SwGlossaryHdl* pGlosHdl, SwWrtShell *pWrtShell);
~SwGlossaryDlg();
diff --git a/sw/source/ui/inc/glshell.hxx b/sw/source/ui/inc/glshell.hxx
index f9730f54e8..1f908bb1d6 100644
--- a/sw/source/ui/inc/glshell.hxx
+++ b/sw/source/ui/inc/glshell.hxx
@@ -38,7 +38,7 @@ class SwGlosDocShell : public SwDocShell
using SotObject::GetInterface;
protected:
- virtual BOOL Save();
+ virtual sal_Bool Save();
public:
@@ -69,7 +69,7 @@ class SwWebGlosDocShell : public SwWebDocShell
using SotObject::GetInterface;
protected:
- virtual BOOL Save();
+ virtual sal_Bool Save();
public:
diff --git a/sw/source/ui/inc/initui.hxx b/sw/source/ui/inc/initui.hxx
index 7f180c9176..215ca60392 100644
--- a/sw/source/ui/inc/initui.hxx
+++ b/sw/source/ui/inc/initui.hxx
@@ -67,7 +67,7 @@ SW_DLLPUBLIC SwGlossaries* GetGlossaries();
class SwGlossaryList;
-BOOL HasGlossaryList();
+sal_Bool HasGlossaryList();
SwGlossaryList* GetGlossaryList();
extern void _InitUI();
diff --git a/sw/source/ui/inc/inpdlg.hxx b/sw/source/ui/inc/inpdlg.hxx
index 5c19fcc0ee..7288fb5474 100644
--- a/sw/source/ui/inc/inpdlg.hxx
+++ b/sw/source/ui/inc/inpdlg.hxx
@@ -70,7 +70,7 @@ class SwFldInputDlg: public SvxStandardDialog
DECL_LINK(NextHdl, PushButton*);
public:
SwFldInputDlg( Window *pParent, SwWrtShell &rSh,
- SwField* pField, BOOL bNextButton = FALSE );
+ SwField* pField, sal_Bool bNextButton = sal_False );
~SwFldInputDlg();
};
diff --git a/sw/source/ui/inc/inputwin.hxx b/sw/source/ui/inc/inputwin.hxx
index 5b88d13bc9..f51f133e4e 100644
--- a/sw/source/ui/inc/inputwin.hxx
+++ b/sw/source/ui/inc/inputwin.hxx
@@ -27,17 +27,11 @@
#ifndef SW_INPUTWIN_HXX
#define SW_INPUTWIN_HXX
-
-#ifndef _MENU_HXX //autogen
+#include <vcl/edit.hxx>
#include <vcl/menu.hxx>
-#endif
-#include <sfx2/childwin.hxx>
-#ifndef _TOOLBOX_HXX //autogen
#include <vcl/toolbox.hxx>
-#endif
-#ifndef _EDIT_HXX //autogen
-#include <vcl/edit.hxx>
-#endif
+
+#include <sfx2/childwin.hxx>
class SwFldMgr;
class SwWrtShell;
@@ -72,16 +66,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* );
@@ -106,26 +101,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 7ff65ce3f0..87e429f9ff 100644
--- a/sw/source/ui/inc/insfnote.hxx
+++ b/sw/source/ui/inc/insfnote.hxx
@@ -48,8 +48,8 @@ class SwInsFootNoteDlg: public SvxStandardDialog
String aFontName;
CharSet eCharSet;
char cExtChar;
- BOOL bExtCharAvailable;
- BOOL bEdit;
+ sal_Bool bExtCharAvailable;
+ sal_Bool bEdit;
RadioButton aNumberAutoBtn;
RadioButton aNumberCharBtn;
Edit aNumberCharEdit;
@@ -78,13 +78,13 @@ class SwInsFootNoteDlg: public SvxStandardDialog
void Init();
public:
- SwInsFootNoteDlg(Window * pParent, SwWrtShell &rSh, BOOL bEd = FALSE);
+ SwInsFootNoteDlg(Window * pParent, SwWrtShell &rSh, sal_Bool bEd = sal_False);
~SwInsFootNoteDlg();
CharSet GetCharSet() { return eCharSet; }
- BOOL IsExtCharAvailable() { return bExtCharAvailable; }
+ sal_Bool IsExtCharAvailable() { return bExtCharAvailable; }
String GetFontName() { return aFontName; }
- BOOL IsEndNote() { return aEndNoteBtn.IsChecked(); }
+ sal_Bool IsEndNote() { return aEndNoteBtn.IsChecked(); }
String GetStr()
{
if ( aNumberCharBtn.IsChecked() )
diff --git a/sw/source/ui/inc/insrule.hxx b/sw/source/ui/inc/insrule.hxx
index dc35db20dc..3b08a425a3 100644
--- a/sw/source/ui/inc/insrule.hxx
+++ b/sw/source/ui/inc/insrule.hxx
@@ -43,7 +43,7 @@ class SwInsertGrfRulerDlg : public SfxModalDialog
List aGrfNames;
String sSimple;
String sRulers;
- USHORT nSelPos;
+ sal_uInt16 nSelPos;
SwRulerValueSet* pExampleVS;
@@ -56,8 +56,8 @@ public:
~SwInsertGrfRulerDlg();
String GetGraphicName();
- BOOL IsSimpleLine() {return nSelPos == 1;}
- BOOL HasImages() const {return 0 != aGrfNames.Count();}
+ sal_Bool IsSimpleLine() {return nSelPos == 1;}
+ sal_Bool HasImages() const {return 0 != aGrfNames.Count();}
};
#endif
diff --git a/sw/source/ui/inc/instable.hxx b/sw/source/ui/inc/instable.hxx
index 4782108971..236b93d9e6 100644
--- a/sw/source/ui/inc/instable.hxx
+++ b/sw/source/ui/inc/instable.hxx
@@ -92,7 +92,7 @@ public:
SwInsTableDlg( SwView& rView );
~SwInsTableDlg();
- void GetValues( String& rName, USHORT& rRow, USHORT& rCol,
+ void GetValues( String& rName, sal_uInt16& rRow, sal_uInt16& rCol,
SwInsertTableOptions& rInsTblOpts, String& rTableAutoFmtName,
SwTableAutoFmt *& prTAFmt );
};
diff --git a/sw/source/ui/inc/javaedit.hxx b/sw/source/ui/inc/javaedit.hxx
index 606e3f26bc..22af3f255b 100644
--- a/sw/source/ui/inc/javaedit.hxx
+++ b/sw/source/ui/inc/javaedit.hxx
@@ -76,8 +76,8 @@ private:
String aText;
String aType;
- BOOL bNew;
- BOOL bIsUrl;
+ sal_Bool bNew;
+ sal_Bool bIsUrl;
SwScriptField* pFld;
SwFldMgr* pMgr;
@@ -108,9 +108,9 @@ public:
String GetType() { return aType; }
- BOOL IsUrl() { return bIsUrl; }
- BOOL IsNew() { return bNew; }
- BOOL IsUpdate();
+ sal_Bool IsUrl() { return bIsUrl; }
+ sal_Bool IsNew() { return bNew; }
+ sal_Bool IsUpdate();
};
diff --git a/sw/source/ui/inc/label.hxx b/sw/source/ui/inc/label.hxx
index 819c56c00e..9d369151d5 100644
--- a/sw/source/ui/inc/label.hxx
+++ b/sw/source/ui/inc/label.hxx
@@ -56,17 +56,17 @@ class SwLabDlg : public SfxTabDialog
String sBusinessCardDlg;
String sFormat;
String sMedium;
- BOOL m_bLabel;
+ sal_Bool m_bLabel;
void _ReplaceGroup( const String &rMake );
- virtual void PageCreated( USHORT nId, SfxTabPage &rPage );
+ virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage );
public:
SwLabDlg( Window* pParent, const SfxItemSet& rSet,
- SwNewDBMgr* pNewDBMgr, BOOL bLabel);
+ SwNewDBMgr* pNewDBMgr, sal_Bool bLabel);
~SwLabDlg();
- SwLabRec* GetRecord(const String &rRecName, BOOL bCont);
+ SwLabRec* GetRecord(const String &rRecName, sal_Bool bCont);
void GetLabItem(SwLabItem &rItem);
SwLabRecs &Recs() { return *pRecs; }
diff --git a/sw/source/ui/inc/langhelper.hxx b/sw/source/ui/inc/langhelper.hxx
index 562cb52287..e92ade8947 100755
--- a/sw/source/ui/inc/langhelper.hxx
+++ b/sw/source/ui/inc/langhelper.hxx
@@ -37,7 +37,7 @@ struct ESelection;
namespace SwLangHelper
{
- extern USHORT GetLanguageStatus( OutlinerView* pOLV, SfxItemSet& rSet );
+ extern sal_uInt16 GetLanguageStatus( OutlinerView* pOLV, SfxItemSet& rSet );
extern bool SetLanguageStatus( OutlinerView* pOLV, SfxRequest &rReq, SwView &rView, SwWrtShell &rSh );
extern void SetLanguage( SwWrtShell &rWrtSh, const String &rLangText, bool bIsForSelection, SfxItemSet &rCoreSet );
@@ -58,10 +58,10 @@ namespace SwLangHelper
extern String GetTextForLanguageGuessing( EditEngine* rEditEngine, ESelection aDocSelection );
extern String GetTextForLanguageGuessing( SwWrtShell &rSh );
- extern LanguageType GetLanguage( SfxItemSet aSet, USHORT nLangWhichId );
- extern LanguageType GetLanguage( SwWrtShell &rSh, USHORT nLangWhichId );
+ extern LanguageType GetLanguage( SfxItemSet aSet, sal_uInt16 nLangWhichId );
+ extern LanguageType GetLanguage( SwWrtShell &rSh, sal_uInt16 nLangWhichId );
- extern LanguageType GetCurrentLanguage( SfxItemSet aSet, USHORT nScriptType );
+ extern LanguageType GetCurrentLanguage( SfxItemSet aSet, sal_uInt16 nScriptType );
extern LanguageType GetCurrentLanguage( SwWrtShell &rSh );
}
diff --git a/sw/source/ui/inc/linenum.hxx b/sw/source/ui/inc/linenum.hxx
index 75b358d07a..7b90413f5d 100644
--- a/sw/source/ui/inc/linenum.hxx
+++ b/sw/source/ui/inc/linenum.hxx
@@ -101,7 +101,7 @@ public:
static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet );
- virtual BOOL FillItemSet( SfxItemSet& rSet );
+ virtual sal_Bool FillItemSet( SfxItemSet& rSet );
virtual void Reset( const SfxItemSet& rSet );
};
diff --git a/sw/source/ui/inc/macassgn.hxx b/sw/source/ui/inc/macassgn.hxx
index b824d2ebc2..5ba025eb42 100644
--- a/sw/source/ui/inc/macassgn.hxx
+++ b/sw/source/ui/inc/macassgn.hxx
@@ -46,7 +46,7 @@ class SwMacroAssignDlg
{
public:
static SfxEventNamesItem AddEvents( DlgEventType eType );
- static BOOL INetFmtDlg( Window* pParent, SwWrtShell& rSh,
+ static sal_Bool INetFmtDlg( Window* pParent, SwWrtShell& rSh,
SvxMacroItem*& rpINetItem );
};
diff --git a/sw/source/ui/inc/mailconfigpage.hxx b/sw/source/ui/inc/mailconfigpage.hxx
index ef0d409eb0..a2b0c14202 100644
--- a/sw/source/ui/inc/mailconfigpage.hxx
+++ b/sw/source/ui/inc/mailconfigpage.hxx
@@ -90,7 +90,7 @@ public:
static SfxTabPage* Create( Window* pParent,
const SfxItemSet& rAttrSet);
- virtual BOOL FillItemSet( SfxItemSet& rSet );
+ virtual sal_Bool FillItemSet( SfxItemSet& rSet );
virtual void Reset( const SfxItemSet& rSet );
};
diff --git a/sw/source/ui/inc/mailmergechildwindow.hxx b/sw/source/ui/inc/mailmergechildwindow.hxx
index d741320bf6..2da588778f 100644
--- a/sw/source/ui/inc/mailmergechildwindow.hxx
+++ b/sw/source/ui/inc/mailmergechildwindow.hxx
@@ -55,7 +55,7 @@ class SwMailMergeChildWindow : public SfxChildWindow
{
public:
SwMailMergeChildWindow( Window* ,
- USHORT nId,
+ sal_uInt16 nId,
SfxBindings*,
SfxChildWinInfo* );
diff --git a/sw/source/ui/inc/mailmrge.hxx b/sw/source/ui/inc/mailmrge.hxx
index 6c434498d1..cb5f51d788 100644
--- a/sw/source/ui/inc/mailmrge.hxx
+++ b/sw/source/ui/inc/mailmrge.hxx
@@ -126,7 +126,7 @@ class SwMailMergeDlg : public SvxStandardDialog
const String& rDBName;
const String& rTableName;
- USHORT nMergeType;
+ sal_uInt16 nMergeType;
::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > m_aSelection;
::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > xFrame;
@@ -155,7 +155,7 @@ public:
::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >* pSelection = 0);
~SwMailMergeDlg();
- inline USHORT GetMergeType() { return nMergeType; }
+ inline sal_uInt16 GetMergeType() { return nMergeType; }
const ::rtl::OUString& GetSaveFilter() const {return m_sSaveFilter;}
inline const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > GetSelection() const { return m_aSelection; }
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet> GetResultSet() const;
@@ -177,7 +177,7 @@ public:
SwMailMergeCreateFromDlg(Window* pParent);
~SwMailMergeCreateFromDlg();
- BOOL IsThisDocument() const {return aThisDocRB.IsChecked();}
+ sal_Bool IsThisDocument() const {return aThisDocRB.IsChecked();}
};
/* -----------------04.02.2003 13:41-----------------
*
@@ -197,7 +197,7 @@ public:
SwMailMergeFieldConnectionsDlg(Window* pParent);
~SwMailMergeFieldConnectionsDlg();
- BOOL IsUseExistingConnections() const {return aUseExistingRB.IsChecked();}
+ sal_Bool IsUseExistingConnections() const {return aUseExistingRB.IsChecked();}
};
#endif
diff --git a/sw/source/ui/inc/mergetbl.hxx b/sw/source/ui/inc/mergetbl.hxx
index 0f57a98f3e..4d62673665 100644
--- a/sw/source/ui/inc/mergetbl.hxx
+++ b/sw/source/ui/inc/mergetbl.hxx
@@ -46,12 +46,12 @@ class SwMergeTblDlg : public SvxStandardDialog
RadioButton aMergePrevRB;
RadioButton aMergeNextRB;
- BOOL& rMergePrev;
+ sal_Bool& rMergePrev;
protected:
virtual void Apply();
public:
- SwMergeTblDlg( Window *pParent, BOOL& rWithPrev );
+ SwMergeTblDlg( Window *pParent, sal_Bool& rWithPrev );
};
#endif
diff --git a/sw/source/ui/inc/mmconfigitem.hxx b/sw/source/ui/inc/mmconfigitem.hxx
index 5d70bb433c..4d6a0cc2bf 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 e42c072d6f..cdbd0d702f 100644
--- a/sw/source/ui/inc/multmrk.hxx
+++ b/sw/source/ui/inc/multmrk.hxx
@@ -64,7 +64,7 @@ class SwMultiTOXMarkDlg : public SvxStandardDialog
CancelButton aCancelBT;
SwTOXMgr &rMgr;
- USHORT nPos;
+ sal_uInt16 nPos;
void Apply();
public:
diff --git a/sw/source/ui/inc/navicont.hxx b/sw/source/ui/inc/navicont.hxx
index f9a0dd9fe5..f1754be1ec 100644
--- a/sw/source/ui/inc/navicont.hxx
+++ b/sw/source/ui/inc/navicont.hxx
@@ -43,19 +43,19 @@ class NaviContentBookmark
String aUrl; // URL inkl. Sprungmarke
String aDescr; // Description
long nDocSh; // Adresse der DocShell
- USHORT nDefDrag; // Description enthaelt defaultDragType
+ sal_uInt16 nDefDrag; // Description enthaelt defaultDragType
public:
NaviContentBookmark();
NaviContentBookmark( const String &rUrl, const String& rDesc,
- USHORT nDragType, const SwDocShell* );
+ sal_uInt16 nDragType, const SwDocShell* );
const String& GetURL() const { return aUrl; }
const String& GetDescription() const { return aDescr; }
- USHORT GetDefaultDragType() const { return nDefDrag; }
+ sal_uInt16 GetDefaultDragType() const { return nDefDrag; }
long GetDocShell() const { return nDocSh; }
void Copy( TransferDataContainer& rData ) const;
- BOOL Paste( TransferableDataHelper& rData );
+ sal_Bool Paste( TransferableDataHelper& rData );
};
#endif
diff --git a/sw/source/ui/inc/navipi.hxx b/sw/source/ui/inc/navipi.hxx
index 9e38b25672..0faae89fe2 100644
--- a/sw/source/ui/inc/navipi.hxx
+++ b/sw/source/ui/inc/navipi.hxx
@@ -98,19 +98,19 @@ class SwNavigationPI : public Window,
long nDocLBIniHeight;
long nWishWidth;
- USHORT nAutoMarkIdx;
- USHORT nRegionMode; // 0 - URL, 1 - Bereich mit Link 2 - B. ohne Link
+ sal_uInt16 nAutoMarkIdx;
+ sal_uInt16 nRegionMode; // 0 - URL, 1 - Bereich mit Link 2 - B. ohne Link
short nZoomIn;
short nZoomOutInit;
short nZoomOut;
- BOOL bSmallMode : 1;
- BOOL bIsZoomedIn : 1;
- BOOL bPageCtrlsVisible : 1;
- BOOL bGlobalMode : 1;
+ sal_Bool bSmallMode : 1;
+ sal_Bool bIsZoomedIn : 1;
+ sal_Bool bPageCtrlsVisible : 1;
+ sal_Bool bGlobalMode : 1;
// --------- methods -----------------------------
- BOOL _IsZoomedIn() const {return bIsZoomedIn;}
+ sal_Bool _IsZoomedIn() const {return bIsZoomedIn;}
void _ZoomOut();
void _ZoomIn();
@@ -142,7 +142,7 @@ class SwNavigationPI : public Window,
protected:
- virtual BOOL Close();
+ virtual sal_Bool Close();
virtual void Resize();
virtual void DataChanged( const DataChangedEvent& rDCEvt );
@@ -151,8 +151,8 @@ protected:
virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
NumEditAction& GetPageEdit();
- BOOL ToggleTree();
- void SetGlobalMode(BOOL bSet) {bGlobalMode = bSet;}
+ sal_Bool ToggleTree();
+ void SetGlobalMode(sal_Bool bSet) {bGlobalMode = bSet;}
public:
@@ -163,32 +163,32 @@ public:
void Update() { FillBox(); }
void UpdateListBox();
- void MoveOutline(USHORT nSource, USHORT nTarget, BOOL bWithCilds);
+ void MoveOutline(sal_uInt16 nSource, sal_uInt16 nTarget, sal_Bool bWithCilds);
- virtual void StateChanged( USHORT nSID, SfxItemState eState,
+ virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState,
const SfxPoolItem* pState );
static String CreateDropFileName( TransferableDataHelper& rData );
static void CleanEntry( String& rEntry );
- USHORT GetRegionDropMode() const {return nRegionMode;}
- void SetRegionDropMode(USHORT nNewMode);
+ sal_uInt16 GetRegionDropMode() const {return nRegionMode;}
+ void SetRegionDropMode(sal_uInt16 nNewMode);
sal_Int8 AcceptDrop( const AcceptDropEvent& rEvt );
sal_Int8 ExecuteDrop( const ExecuteDropEvent& rEvt );
- BOOL IsGlobalDoc() const;
- BOOL IsGlobalMode() const {return bGlobalMode;}
+ sal_Bool IsGlobalDoc() const;
+ sal_Bool IsGlobalMode() const {return bGlobalMode;}
SwView* GetCreateView() const;
- void CreateNavigationTool(const Rectangle& rRect, BOOL bSetFocus);
+ void CreateNavigationTool(const Rectangle& rRect, sal_Bool bSetFocus);
};
class SwNavigationChild : public SfxChildWindowContext
{
public:
SwNavigationChild( Window* ,
- USHORT nId,
+ sal_uInt16 nId,
SfxBindings*,
SfxChildWinInfo* );
diff --git a/sw/source/ui/inc/num.hxx b/sw/source/ui/inc/num.hxx
index 4dd77ffe98..5b2a1121b5 100644
--- a/sw/source/ui/inc/num.hxx
+++ b/sw/source/ui/inc/num.hxx
@@ -64,7 +64,7 @@ class SwOutlineTabDialog;
struct SwBmpItemInfo
{
SvxBrushItem* pBrushItem;
- USHORT nItemId;
+ sal_uInt16 nItemId;
};
@@ -124,11 +124,11 @@ class SwNumPositionTabPage : public SfxTabPage
SwWrtShell* pWrtSh;
SwOutlineTabDialog* pOutlineDlg;
- USHORT nActNumLvl;
+ sal_uInt16 nActNumLvl;
- BOOL bModified : 1;
- BOOL bPreset : 1;
- BOOL bInInintControl : 1; //Modify-Fehler umgehen, soll ab 391 behoben sein
+ sal_Bool bModified : 1;
+ sal_Bool bPreset : 1;
+ sal_Bool bInInintControl : 1; //Modify-Fehler umgehen, soll ab 391 behoben sein
// --> OD 2008-02-01 #newlistlevelattrs#
bool bLabelAlignmentPosAndSpaceModeActive;
// <--
@@ -162,7 +162,7 @@ public:
virtual void ActivatePage(const SfxItemSet& rSet);
virtual int DeactivatePage(SfxItemSet *pSet);
- virtual BOOL FillItemSet( SfxItemSet& rSet );
+ virtual sal_Bool FillItemSet( SfxItemSet& rSet );
virtual void Reset( const SfxItemSet& rSet );
static SfxTabPage* Create( Window* pParent,
@@ -171,10 +171,10 @@ public:
void SetOutlineTabDialog(SwOutlineTabDialog* pDlg){pOutlineDlg = pDlg;}
void SetWrtShell(SwWrtShell* pSh);
#if OSL_DEBUG_LEVEL > 1
- void SetModified(BOOL bRepaint = TRUE);
+ void SetModified(sal_Bool bRepaint = sal_True);
#else
- void SetModified(BOOL bRepaint = TRUE)
- { bModified = TRUE;
+ void SetModified(sal_Bool bRepaint = sal_True)
+ { bModified = sal_True;
if(bRepaint)
{
aPreviewWIN.SetLevel(nActNumLvl);
@@ -193,7 +193,7 @@ class SwSvxNumBulletTabDialog : public SfxTabDialog
protected:
virtual short Ok();
- virtual void PageCreated(USHORT nPageId, SfxTabPage& rPage);
+ virtual void PageCreated(sal_uInt16 nPageId, SfxTabPage& rPage);
DECL_LINK(RemoveNumberingHdl, PushButton*);
public:
SwSvxNumBulletTabDialog(Window* pParent,
diff --git a/sw/source/ui/inc/numberingtypelistbox.hxx b/sw/source/ui/inc/numberingtypelistbox.hxx
index 792dfe3743..2c11549e15 100644
--- a/sw/source/ui/inc/numberingtypelistbox.hxx
+++ b/sw/source/ui/inc/numberingtypelistbox.hxx
@@ -44,10 +44,10 @@ class SW_DLLPUBLIC SwNumberingTypeListBox : public ListBox
public:
SwNumberingTypeListBox( Window* pWin, const ResId& rResId,
- USHORT nTypeFlags = INSERT_NUM_TYPE_PAGE_STYLE_NUMBERING|INSERT_NUM_TYPE_NO_NUMBERING|INSERT_NUM_EXTENDED_TYPES );
+ sal_uInt16 nTypeFlags = INSERT_NUM_TYPE_PAGE_STYLE_NUMBERING|INSERT_NUM_TYPE_NO_NUMBERING|INSERT_NUM_EXTENDED_TYPES );
~SwNumberingTypeListBox();
- void Reload(USHORT nTypeFlags);
+ void Reload(sal_uInt16 nTypeFlags);
sal_Int16 GetSelectedNumberingType();
sal_Bool SelectNumberingType(sal_Int16 nType);
diff --git a/sw/source/ui/inc/numfmtlb.hxx b/sw/source/ui/inc/numfmtlb.hxx
index 50ebd6546f..b82bba9f82 100644
--- a/sw/source/ui/inc/numfmtlb.hxx
+++ b/sw/source/ui/inc/numfmtlb.hxx
@@ -36,49 +36,49 @@ class SwView;
class SW_DLLPUBLIC NumFormatListBox : public ListBox
{
short nCurrFormatType;
- USHORT nStdEntry;
- BOOL bOneArea;
- ULONG nDefFormat;
+ sal_uInt16 nStdEntry;
+ sal_Bool bOneArea;
+ sal_uLong nDefFormat;
SwView* pVw;
SvNumberFormatter* pOwnFormatter;
LanguageType eCurLanguage;
- BOOL bShowLanguageControl; //determine whether the language control has
+ sal_Bool bShowLanguageControl; //determine whether the language control has
//to be shown in the number format dialog
- BOOL bUseAutomaticLanguage;//determine whether language is automatically assigned
+ sal_Bool bUseAutomaticLanguage;//determine whether language is automatically assigned
SW_DLLPRIVATE DECL_LINK( SelectHdl, ListBox * );
SW_DLLPRIVATE double GetDefValue(const short nFormatType) const;
- SW_DLLPRIVATE void Init(short nFormatType, BOOL bUsrFmts);
+ SW_DLLPRIVATE void Init(short nFormatType, sal_Bool bUsrFmts);
SW_DLLPRIVATE SwView* GetView();
public:
NumFormatListBox( Window* pWin, const ResId& rResId,
- short nFormatType = NUMBERFORMAT_NUMBER, ULONG nDefFmt = 0,
- BOOL bUsrFmts = TRUE );
+ short nFormatType = NUMBERFORMAT_NUMBER, sal_uLong nDefFmt = 0,
+ sal_Bool bUsrFmts = sal_True );
NumFormatListBox( Window* pWin, SwView* pView, const ResId& rResId,
- short nFormatType = NUMBERFORMAT_NUMBER, ULONG nDefFmt = 0,
- BOOL bUsrFmts = TRUE );
+ short nFormatType = NUMBERFORMAT_NUMBER, sal_uLong nDefFmt = 0,
+ sal_Bool bUsrFmts = sal_True );
~NumFormatListBox();
void Clear();
- inline void SetOneArea(BOOL bOnlyOne = TRUE) { bOneArea = bOnlyOne; }
+ inline void SetOneArea(sal_Bool bOnlyOne = sal_True) { bOneArea = bOnlyOne; }
void SetFormatType(const short nFormatType);
inline short GetFormatType() const { return nCurrFormatType; }
- void SetDefFormat(const ULONG nDefFmt);
- ULONG GetFormat() const;
+ void SetDefFormat(const sal_uLong nDefFmt);
+ sal_uLong GetFormat() const;
inline LanguageType GetCurLanguage() const { return eCurLanguage;}
void SetLanguage(LanguageType eSet) { eCurLanguage = eSet;}
- void SetAutomaticLanguage(BOOL bSet){bUseAutomaticLanguage = bSet;}
- BOOL IsAutomaticLanguage()const {return bUseAutomaticLanguage;}
+ void SetAutomaticLanguage(sal_Bool bSet){bUseAutomaticLanguage = bSet;}
+ sal_Bool IsAutomaticLanguage()const {return bUseAutomaticLanguage;}
- void SetShowLanguageControl(BOOL bSet){bShowLanguageControl = bSet;}
+ void SetShowLanguageControl(sal_Bool bSet){bShowLanguageControl = bSet;}
};
diff --git a/sw/source/ui/inc/numpara.hxx b/sw/source/ui/inc/numpara.hxx
index 6b62baa694..d292764ee6 100644
--- a/sw/source/ui/inc/numpara.hxx
+++ b/sw/source/ui/inc/numpara.hxx
@@ -66,8 +66,8 @@ class SwParagraphNumTabPage : public SfxTabPage
const String msOutlineNumbering;
// <--
- BOOL bModified : 1;
- BOOL bCurNumrule : 1;
+ sal_Bool bModified : 1;
+ sal_Bool bCurNumrule : 1;
DECL_LINK( NewStartHdl_Impl, CheckBox* );
DECL_LINK( StyleHdl_Impl, ListBox* );
@@ -81,9 +81,9 @@ public:
static SfxTabPage* Create( Window* pParent,
const SfxItemSet& rSet );
- static USHORT* GetRanges();
+ static sal_uInt16* GetRanges();
- virtual BOOL FillItemSet( SfxItemSet& rSet );
+ virtual sal_Bool FillItemSet( SfxItemSet& rSet );
virtual void Reset( const SfxItemSet& rSet );
void EnableNewStart();
diff --git a/sw/source/ui/inc/numprevw.hxx b/sw/source/ui/inc/numprevw.hxx
index 977503c967..84b7d443fd 100644
--- a/sw/source/ui/inc/numprevw.hxx
+++ b/sw/source/ui/inc/numprevw.hxx
@@ -42,8 +42,8 @@ class NumberingPreview : public Window
Font aStdFont;
long nPageWidth;
const String* pOutlineNames;
- BOOL bPosition;
- UINT16 nActLevel;
+ sal_Bool bPosition;
+ sal_uInt16 nActLevel;
protected:
virtual void Paint( const Rectangle& rRect );
@@ -51,7 +51,7 @@ class NumberingPreview : public Window
public:
NumberingPreview(Window* pParent, const ResId& rResId ) :
Window(pParent, rResId),
- pActNum(0),nPageWidth(0), pOutlineNames(0), bPosition(FALSE), nActLevel(USHRT_MAX) {}
+ pActNum(0),nPageWidth(0), pOutlineNames(0), bPosition(sal_False), nActLevel(USHRT_MAX) {}
~NumberingPreview();
void SetNumRule(const SwNumRule* pNum)
@@ -61,8 +61,8 @@ class NumberingPreview : public Window
void SetOutlineNames(const String* pNames)
{pOutlineNames = pNames;}
void SetPositionMode()
- { bPosition = TRUE;}
- void SetLevel(USHORT nSet) {nActLevel = nSet;}
+ { bPosition = sal_True;}
+ void SetLevel(sal_uInt16 nSet) {nActLevel = nSet;}
};
diff --git a/sw/source/ui/inc/olmenu.hxx b/sw/source/ui/inc/olmenu.hxx
index e2285207e4..d6d21f391c 100644
--- a/sw/source/ui/inc/olmenu.hxx
+++ b/sw/source/ui/inc/olmenu.hxx
@@ -64,7 +64,7 @@ class SwSpellPopup : public PopupMenu
Image aInfo16;
- void fillLangPopupMenu( PopupMenu *pPopupMenu, USHORT nLangStart,
+ void fillLangPopupMenu( PopupMenu *pPopupMenu, sal_uInt16 nLangStart,
::com::sun::star::uno::Sequence< ::rtl::OUString > aSeq, SwWrtShell* pWrtSh,
std::map< sal_Int16, ::rtl::OUString > &rLangTable );
@@ -83,7 +83,7 @@ public:
const String & rParaText );
sal_uInt16 Execute( const Rectangle& rPopupPos, Window* pWin );
- void Execute( USHORT nId );
+ void Execute( sal_uInt16 nId );
};
diff --git a/sw/source/ui/inc/optcomp.hxx b/sw/source/ui/inc/optcomp.hxx
index a564cc0715..a35e98653f 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 4adfb96399..388f9e44de 100644
--- a/sw/source/ui/inc/optload.hxx
+++ b/sw/source/ui/inc/optload.hxx
@@ -71,7 +71,7 @@ private:
SwWrtShell* pWrtShell;
sal_Bool bHTMLMode;
- UINT16 nLastTab;
+ sal_uInt16 nLastTab;
sal_Int32 nOldLinkMode;
DECL_LINK(CaptionHdl, PushButton*);
@@ -84,7 +84,7 @@ public:
static SfxTabPage* Create( Window* pParent,
const SfxItemSet& rAttrSet);
- virtual BOOL FillItemSet( SfxItemSet& rSet );
+ virtual sal_Bool FillItemSet( SfxItemSet& rSet );
virtual void Reset( const SfxItemSet& rSet );
};
@@ -180,8 +180,8 @@ private:
String sNone;
SwFldMgr *pMgr;
- USHORT eType;
- BOOL bHTMLMode;
+ sal_uInt16 eType;
+ sal_Bool bHTMLMode;
DECL_LINK( SelectHdl, ListBox *pLB = 0 );
DECL_LINK( ModifyHdl, Edit *pEdt = 0 );
@@ -190,7 +190,7 @@ private:
DECL_LINK( SaveEntryHdl, SvxCheckListBox *pLB = 0 );
void DelUserData();
- void SetOptions( const USHORT nPos,
+ void SetOptions( const sal_uInt16 nPos,
const SwCapObjType eType,
const SvGlobalName *pOleId = 0);
void SaveEntry( SvLBoxEntry* pEntry );
@@ -204,7 +204,7 @@ public:
static SfxTabPage* Create( Window* pParent,
const SfxItemSet& rAttrSet);
- virtual BOOL FillItemSet( SfxItemSet& rSet );
+ virtual sal_Bool FillItemSet( SfxItemSet& rSet );
virtual void Reset( const SfxItemSet& rSet );
};
diff --git a/sw/source/ui/inc/optpage.hxx b/sw/source/ui/inc/optpage.hxx
index fa0af2e473..c2aa3c574b 100644
--- a/sw/source/ui/inc/optpage.hxx
+++ b/sw/source/ui/inc/optpage.hxx
@@ -102,7 +102,7 @@ public:
static SfxTabPage* Create( Window* pParent,
const SfxItemSet& rAttrSet);
- virtual BOOL FillItemSet( SfxItemSet& rSet );
+ virtual sal_Bool FillItemSet( SfxItemSet& rSet );
virtual void Reset( const SfxItemSet& rSet );
};
@@ -148,8 +148,8 @@ class SwAddPrinterTabPage : public SfxTabPage
ListBox aFaxLB;
String sNone;
- BOOL bAttrModified;
- BOOL bPreview;
+ sal_Bool bAttrModified;
+ sal_Bool bPreview;
void Init();
DECL_LINK( AutoClickHdl, CheckBox * );
@@ -163,11 +163,11 @@ public:
static SfxTabPage* Create( Window* pParent,
const SfxItemSet& rAttrSet );
- virtual BOOL FillItemSet( SfxItemSet& rSet );
+ virtual sal_Bool FillItemSet( SfxItemSet& rSet );
virtual void Reset( const SfxItemSet& rSet );
void SetFax( const SvStringsDtor& );
void SelectFax( const String& );
- void SetPreview(BOOL bPrev);
+ void SetPreview(sal_Bool bPrev);
virtual void PageCreated (SfxAllItemSet aSet);
};
@@ -219,20 +219,20 @@ class SwStdFontTabPage : public SfxTabPage
SwWrtShell* pWrtShell;
LanguageType eLanguage;
// waren nur defaults vorhanden? wurden sie mit den Boxen ueberschrieben
- BOOL bListDefault :1;
- BOOL bSetListDefault :1;
- BOOL bLabelDefault :1;
- BOOL bSetLabelDefault :1;
- BOOL bIdxDefault :1;
- BOOL bSetIdxDefault :1;
- BOOL bDeletePrinter :1;
-
- BOOL bListHeightDefault :1;
- BOOL bSetListHeightDefault :1;
- BOOL bLabelHeightDefault :1;
- BOOL bSetLabelHeightDefault :1;
- BOOL bIndexHeightDefault :1;
- BOOL bSetIndexHeightDefault :1;
+ sal_Bool bListDefault :1;
+ sal_Bool bSetListDefault :1;
+ sal_Bool bLabelDefault :1;
+ sal_Bool bSetLabelDefault :1;
+ sal_Bool bIdxDefault :1;
+ sal_Bool bSetIdxDefault :1;
+ sal_Bool bDeletePrinter :1;
+
+ sal_Bool bListHeightDefault :1;
+ sal_Bool bSetListHeightDefault :1;
+ sal_Bool bLabelHeightDefault :1;
+ sal_Bool bSetLabelHeightDefault :1;
+ sal_Bool bIndexHeightDefault :1;
+ sal_Bool bSetIndexHeightDefault :1;
sal_uInt8 nFontGroup; //fontcfg.hxx: FONT_GROUP_[STANDARD|CJK|CTL]
@@ -253,7 +253,7 @@ public:
static SfxTabPage* Create( Window* pParent,
const SfxItemSet& rAttrSet );
- virtual BOOL FillItemSet( SfxItemSet& rSet );
+ virtual sal_Bool FillItemSet( SfxItemSet& rSet );
virtual void Reset( const SfxItemSet& rSet );
void SetFontMode(sal_uInt8 nGroup) {nFontGroup = nGroup;}
@@ -301,7 +301,7 @@ class SwTableOptionsTabPage : public SfxTabPage
FixedText aVarFT;
SwWrtShell* pWrtShell;
- BOOL bHTMLMode;
+ sal_Bool bHTMLMode;
DECL_LINK(CheckBoxHdl, CheckBox *pCB);
@@ -315,7 +315,7 @@ public:
static SfxTabPage* Create( Window* pParent,
const SfxItemSet& rAttrSet );
- virtual BOOL FillItemSet( SfxItemSet& rSet );
+ virtual sal_Bool FillItemSet( SfxItemSet& rSet );
virtual void Reset( const SfxItemSet& rSet );
void SetWrtShell(SwWrtShell* pSh) {pWrtShell = pSh;}
@@ -366,7 +366,7 @@ public:
static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet );
- virtual BOOL FillItemSet( SfxItemSet& rSet );
+ virtual sal_Bool FillItemSet( SfxItemSet& rSet );
virtual void Reset( const SfxItemSet& rSet );
void SetWrtShell( SwWrtShell * pSh ) { m_pWrtShell = pSh; }
@@ -391,7 +391,7 @@ class SwMarkPreview : public Window
Rectangle aLeftPagePrtArea;
Rectangle aRightPagePrtArea;
- USHORT nMarkPos;
+ sal_uInt16 nMarkPos;
using OutputDevice::DrawRect;
void DrawRect(const Rectangle &rRect, const Color &rFillColor, const Color &rLineColor);
@@ -408,7 +408,7 @@ public:
virtual ~SwMarkPreview();
inline void SetColor(const Color& rCol) { m_aMarkCol = rCol; }
- inline void SetMarkPos(USHORT nPos) { nMarkPos = nPos; }
+ inline void SetMarkPos(sal_uInt16 nPos) { nMarkPos = nPos; }
};
/*-----------------------------------------------------------------------
@@ -464,7 +464,7 @@ public:
static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet );
- virtual BOOL FillItemSet( SfxItemSet& rSet );
+ virtual sal_Bool FillItemSet( SfxItemSet& rSet );
virtual void Reset( const SfxItemSet& rSet );
};
@@ -483,7 +483,7 @@ public:
static SfxTabPage* Create( Window* pParent,
const SfxItemSet& rAttrSet );
- virtual BOOL FillItemSet( SfxItemSet& rSet );
+ virtual sal_Bool FillItemSet( SfxItemSet& rSet );
virtual void Reset( const SfxItemSet& rSet );
private:
@@ -499,7 +499,7 @@ private:
CheckBox aTest9CBox;
CheckBox aTest10CBox;
- BOOL bAttrModified;
+ sal_Bool bAttrModified;
void Init();
DECL_LINK( AutoClickHdl, CheckBox * );
diff --git a/sw/source/ui/inc/outline.hxx b/sw/source/ui/inc/outline.hxx
index dbe36d92f6..644fea3f93 100644
--- a/sw/source/ui/inc/outline.hxx
+++ b/sw/source/ui/inc/outline.hxx
@@ -66,7 +66,7 @@ class SwChapterNumRules;
* --------------------------------------------------*/
class SwOutlineTabDialog : public SfxTabDialog
{
- static USHORT nNumLevel;
+ static sal_uInt16 nNumLevel;
String aNullStr;
String aCollNames[MAXLEVEL];
@@ -76,14 +76,14 @@ class SwOutlineTabDialog : public SfxTabDialog
SwNumRule* pNumRule;
SwChapterNumRules* pChapterNumRules;
- BOOL bModified : 1;
+ sal_Bool bModified : 1;
protected:
DECL_LINK( CancelHdl, Button * );
DECL_LINK( FormHdl, Button * );
DECL_LINK( MenuSelectHdl, Menu * );
- virtual void PageCreated(USHORT nPageId, SfxTabPage& rPage);
+ virtual void PageCreated(sal_uInt16 nPageId, SfxTabPage& rPage);
virtual short Ok();
public:
@@ -93,11 +93,11 @@ class SwOutlineTabDialog : public SfxTabDialog
~SwOutlineTabDialog();
SwNumRule* GetNumRule() {return pNumRule;}
- USHORT GetLevel(const String &rFmtName) const;
+ sal_uInt16 GetLevel(const String &rFmtName) const;
String* GetCollNames() {return aCollNames;}
- static USHORT GetActNumLevel() {return nNumLevel;}
- static void SetActNumLevel(USHORT nSet) {nNumLevel = nSet;}
+ static sal_uInt16 GetActNumLevel() {return nNumLevel;}
+ static void SetActNumLevel(sal_uInt16 nSet) {nNumLevel = nSet;}
};
/* -----------------07.07.98 13:47-------------------
*
@@ -130,7 +130,7 @@ class SwOutlineSettingsTabPage : public SfxTabPage
SwWrtShell* pSh;
SwNumRule* pNumRule;
String* pCollNames;
- USHORT nActLevel;
+ sal_uInt16 nActLevel;
DECL_LINK( LevelHdl, ListBox * );
DECL_LINK( ToggleComplete, NumericField * );
@@ -158,7 +158,7 @@ public:
virtual void ActivatePage(const SfxItemSet& rSet);
virtual int DeactivatePage(SfxItemSet *pSet);
- virtual BOOL FillItemSet( SfxItemSet& rSet );
+ virtual sal_Bool FillItemSet( SfxItemSet& rSet );
virtual void Reset( const SfxItemSet& rSet );
static SfxTabPage* Create( Window* pParent,
const SfxItemSet& rAttrSet);
diff --git a/sw/source/ui/inc/pgfnote.hxx b/sw/source/ui/inc/pgfnote.hxx
index 9f7a324577..bfff36b339 100644
--- a/sw/source/ui/inc/pgfnote.hxx
+++ b/sw/source/ui/inc/pgfnote.hxx
@@ -50,9 +50,9 @@ class SwFootNotePage: public SfxTabPage
{
public:
static SfxTabPage *Create(Window *pParent, const SfxItemSet &rSet);
- static USHORT* GetRanges();
+ static sal_uInt16* GetRanges();
- virtual BOOL FillItemSet(SfxItemSet &rSet);
+ virtual sal_Bool FillItemSet(SfxItemSet &rSet);
virtual void Reset(const SfxItemSet &rSet);
private:
diff --git a/sw/source/ui/inc/pggrid.hxx b/sw/source/ui/inc/pggrid.hxx
index 281009ae6c..cbc8d52731 100644
--- a/sw/source/ui/inc/pggrid.hxx
+++ b/sw/source/ui/inc/pggrid.hxx
@@ -101,9 +101,9 @@ class SwTextGridPage: public SfxTabPage
public:
static SfxTabPage *Create(Window *pParent, const SfxItemSet &rSet);
- static USHORT* GetRanges();
+ static sal_uInt16* GetRanges();
- virtual BOOL FillItemSet(SfxItemSet &rSet);
+ virtual sal_Bool FillItemSet(SfxItemSet &rSet);
virtual void Reset(const SfxItemSet &rSet);
virtual void ActivatePage( const SfxItemSet& rSet );
diff --git a/sw/source/ui/inc/prcntfld.hxx b/sw/source/ui/inc/prcntfld.hxx
index f5356235ae..a9ef9c1675 100644
--- a/sw/source/ui/inc/prcntfld.hxx
+++ b/sw/source/ui/inc/prcntfld.hxx
@@ -41,12 +41,12 @@ class SW_DLLPUBLIC PercentField : public MetricField
sal_Int64 nOldBaseValue;
sal_Int64 nLastPercent;
sal_Int64 nLastValue;
- USHORT nOldDigits;
+ sal_uInt16 nOldDigits;
FieldUnit eOldUnit;
sal_Bool bLockAutoCalculation; //prevent recalcution of percent values when the
//reference value is changed
- SW_DLLPRIVATE sal_Int64 ImpPower10(USHORT n);
+ SW_DLLPRIVATE sal_Int64 ImpPower10(sal_uInt16 n);
using MetricField::SetValue;
using MetricField::GetValue;
@@ -70,7 +70,7 @@ public:
sal_Int64 GetValue(FieldUnit eOutUnit = FUNIT_NONE);
- BOOL IsValueModified();
+ sal_Bool IsValueModified();
//using NumericFormatter::SetMax;
void SetMax(sal_Int64 nNewMax, FieldUnit eInUnit = FUNIT_NONE);
@@ -87,9 +87,9 @@ public:
sal_Int64 Convert(sal_Int64 nValue, FieldUnit eInUnit, FieldUnit eOutUnit);
- void ShowPercent(BOOL bPercent);
+ void ShowPercent(sal_Bool bPercent);
- USHORT GetOldDigits() const {return nOldDigits;}
+ sal_uInt16 GetOldDigits() const {return nOldDigits;}
void LockAutoCalculation(sal_Bool bLock) {bLockAutoCalculation = bLock;}
sal_Bool IsAutoCalculationLocked()const {return bLockAutoCalculation;}
diff --git a/sw/source/ui/inc/prtopt.hxx b/sw/source/ui/inc/prtopt.hxx
deleted file mode 100644
index c46e93a138..0000000000
--- a/sw/source/ui/inc/prtopt.hxx
+++ /dev/null
@@ -1,55 +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 _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
-
diff --git a/sw/source/ui/inc/pview.hxx b/sw/source/ui/inc/pview.hxx
index 5da44cc7e4..848a022460 100644
--- a/sw/source/ui/inc/pview.hxx
+++ b/sw/source/ui/inc/pview.hxx
@@ -54,8 +54,8 @@ class SwPagePreviewLayout;
class SwPagePreViewWin : public Window
{
ViewShell* mpViewShell;
- USHORT mnSttPage;
- BYTE mnRow, mnCol;
+ sal_uInt16 mnSttPage;
+ sal_uInt8 mnRow, mnCol;
Size maPxWinSize;
Fraction maScale;
SwPagePreView& mrView;
@@ -65,7 +65,7 @@ class SwPagePreViewWin : public Window
// OD 12.12.2002 #103492#
SwPagePreviewLayout* mpPgPrevwLayout;
- void SetPagePreview( BYTE nRow, BYTE nCol );
+ void SetPagePreview( sal_uInt8 nRow, sal_uInt8 nCol );
using Window::Scroll;
@@ -84,14 +84,14 @@ public:
ViewShell* GetViewShell() const { return mpViewShell; }
- BYTE GetRow() const { return mnRow; }
- void SetRow( BYTE n ) { if( n ) mnRow = n; }
+ sal_uInt8 GetRow() const { return mnRow; }
+ void SetRow( sal_uInt8 n ) { if( n ) mnRow = n; }
- BYTE GetCol() const { return mnCol; }
- void SetCol( BYTE n ) { if( n ) mnCol = n; }
+ sal_uInt8 GetCol() const { return mnCol; }
+ void SetCol( sal_uInt8 n ) { if( n ) mnCol = n; }
- USHORT GetSttPage() const { return mnSttPage; }
- void SetSttPage( USHORT n ) { mnSttPage = n; }
+ sal_uInt16 GetSttPage() const { return mnSttPage; }
+ void SetSttPage( sal_uInt16 n ) { mnSttPage = n; }
/** get selected page number of document preview
@@ -115,9 +115,9 @@ public:
void SetSelectedPage( sal_uInt16 _nSelectedPageNum );
//JP 19.08.98: bei Einspaltigkeit gibt es keine 0. Seite!
- USHORT GetDefSttPage() const { return 1 == mnCol ? 1 : 0; }
+ sal_uInt16 GetDefSttPage() const { return 1 == mnCol ? 1 : 0; }
- void CalcWish( BYTE nNewRow, BYTE nNewCol );
+ void CalcWish( sal_uInt8 nNewRow, sal_uInt8 nNewCol );
const Size& GetWinSize() const { return maPxWinSize; }
void SetWinSize( const Size& rNewSize );
@@ -128,7 +128,7 @@ public:
int MovePage( int eMoveMode );
// erzeuge den String fuer die StatusLeiste
- void GetStatusStr( String& rStr, USHORT nPageCount ) const;
+ void GetStatusStr( String& rStr, sal_uInt16 nPageCount ) const;
void RepaintCoreRect( const SwRect& rRect );
@@ -149,7 +149,7 @@ public:
return maPaintedPreviewDocRect;
}
- void Scroll(long nXMove, long nYMove, USHORT nFlags = 0);
+ void Scroll(long nXMove, long nYMove, sal_uInt16 nFlags = 0);
/** method to enable/disable book preview
@@ -159,7 +159,7 @@ public:
@param _bBookPreview
input parameter - boolean indicating, if book preview mode has to
- switch on <TRUE> or of <FALSE>
+ switch on <sal_True> or of <sal_False>
@return boolean indicating, if book preview mode has changed.
*/
@@ -185,7 +185,7 @@ class SW_DLLPUBLIC SwPagePreView: public SfxViewShell
//and the new cursor position if the user double click in the PagePreView
sNewCrsrPos;
// to support keyboard the number of the page to go to can be set too
- USHORT nNewPage;
+ sal_uInt16 nNewPage;
// Sichtbarer Bereich
String sPageStr;
Size aDocSz;
@@ -200,8 +200,8 @@ class SW_DLLPUBLIC SwPagePreView: public SfxViewShell
// aktiv sind
Window *pScrollFill;
- USHORT mnPageCount;
- BOOL bNormalPrint;
+ sal_uInt16 mnPageCount;
+ sal_Bool bNormalPrint;
// OD 09.01.2003 #106334#
// new members to reset design mode at draw view for form shell on switching
@@ -212,19 +212,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 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 +247,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 +264,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 +274,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 5c70eeae63..43d947df4e 100644
--- a/sw/source/ui/inc/redlndlg.hxx
+++ b/sw/source/ui/inc/redlndlg.hxx
@@ -57,9 +57,9 @@ struct SwRedlineDataParent
SvLBoxEntry* pTLBParent; // zugehoeriger TreeListBox-Eintrag
String sComment; // Redline-Kommentar
- inline BOOL operator==( const SwRedlineDataParent& rObj ) const
+ inline sal_Bool operator==( const SwRedlineDataParent& rObj ) const
{ return (pData && pData->GetSeqNo() == rObj.pData->GetSeqNo()); }
- inline BOOL operator< ( const SwRedlineDataParent& rObj ) const
+ inline sal_Bool operator< ( const SwRedlineDataParent& rObj ) const
{ return (pData && pData->GetSeqNo() < rObj.pData->GetSeqNo()); }
};
@@ -99,9 +99,9 @@ class SW_DLLPUBLIC SwRedlineAcceptDlg
SvxRedlinTable* pTable; // PB 2006/02/02 #i48648 now SvHeaderTabListBox
Link aOldSelectHdl;
Link aOldDeselectHdl;
- BOOL bOnlyFormatedRedlines;
- BOOL bHasReadonlySel;
- BOOL bRedlnAutoFmt;
+ sal_Bool bOnlyFormatedRedlines;
+ sal_Bool bHasReadonlySel;
+ sal_Bool bRedlnAutoFmt;
// prevent update dialog data during longer operations (cf #102657#)
bool bInhibitActivate;
@@ -116,27 +116,27 @@ class SW_DLLPUBLIC SwRedlineAcceptDlg
SW_DLLPRIVATE DECL_LINK( GotoHdl, void* );
SW_DLLPRIVATE DECL_LINK( CommandHdl, void* );
- SW_DLLPRIVATE USHORT CalcDiff(USHORT nStart, BOOL bChild);
- SW_DLLPRIVATE void InsertChilds(SwRedlineDataParent *pParent, const SwRedline& rRedln, const USHORT nAutoFmt);
- SW_DLLPRIVATE void InsertParents(USHORT nStart, USHORT nEnd = USHRT_MAX);
- SW_DLLPRIVATE void RemoveParents(USHORT nStart, USHORT nEnd);
+ SW_DLLPRIVATE sal_uInt16 CalcDiff(sal_uInt16 nStart, sal_Bool bChild);
+ SW_DLLPRIVATE void InsertChilds(SwRedlineDataParent *pParent, const SwRedline& rRedln, const sal_uInt16 nAutoFmt);
+ SW_DLLPRIVATE void InsertParents(sal_uInt16 nStart, sal_uInt16 nEnd = USHRT_MAX);
+ SW_DLLPRIVATE void RemoveParents(sal_uInt16 nStart, sal_uInt16 nEnd);
SW_DLLPRIVATE void InitAuthors();
- SW_DLLPRIVATE String GetRedlineText(const SwRedline& rRedln, DateTime &rDateTime, USHORT nStack = 0);
- SW_DLLPRIVATE const String& GetActionText(const SwRedline& rRedln, USHORT nStack = 0);
- SW_DLLPRIVATE USHORT GetRedlinePos( const SvLBoxEntry& rEntry) const;
+ SW_DLLPRIVATE String GetRedlineText(const SwRedline& rRedln, DateTime &rDateTime, sal_uInt16 nStack = 0);
+ SW_DLLPRIVATE const String& GetActionText(const SwRedline& rRedln, sal_uInt16 nStack = 0);
+ SW_DLLPRIVATE sal_uInt16 GetRedlinePos( const SvLBoxEntry& rEntry) const;
public:
- SwRedlineAcceptDlg(Dialog *pParent, BOOL bAutoFmt = FALSE);
+ SwRedlineAcceptDlg(Dialog *pParent, sal_Bool bAutoFmt = sal_False);
virtual ~SwRedlineAcceptDlg();
DECL_LINK( FilterChangedHdl, void *pDummy = 0 );
inline SvxAcceptChgCtr* GetChgCtrl() { return &aTabPagesCTRL; }
- inline BOOL HasRedlineAutoFmt() const { return bRedlnAutoFmt; }
+ inline sal_Bool HasRedlineAutoFmt() const { return bRedlnAutoFmt; }
- void Init(USHORT nStart = 0);
- void CallAcceptReject( BOOL bSelect, BOOL bAccept );
+ void Init(sal_uInt16 nStart = 0);
+ void CallAcceptReject( sal_Bool bSelect, sal_Bool bAccept );
void Initialize(const String &rExtraData);
void FillInfo(String &rExtraData) const;
@@ -174,13 +174,13 @@ class SwRedlineAcceptChild : public SwChildWinWrapper
{
public:
SwRedlineAcceptChild( Window* ,
- USHORT nId,
+ sal_uInt16 nId,
SfxBindings*,
SfxChildWinInfo* );
SFX_DECL_CHILDWINDOW( SwRedlineAcceptChild );
- virtual BOOL ReInitDlg(SwDocShell *pDocSh);
+ virtual sal_Bool ReInitDlg(SwDocShell *pDocSh);
};
diff --git a/sw/source/ui/inc/regionsw.hxx b/sw/source/ui/inc/regionsw.hxx
index 2521232be0..27a987f937 100644
--- a/sw/source/ui/inc/regionsw.hxx
+++ b/sw/source/ui/inc/regionsw.hxx
@@ -116,14 +116,14 @@ class SwEditRegionDlg : public SfxModalDialog
sfx2::DocumentInserter* m_pDocInserter;
Window* m_pOldDefDlgParent;
- BOOL bDontCheckPasswd :1;
- BOOL bWeb :1;
+ sal_Bool bDontCheckPasswd :1;
+ sal_Bool bWeb :1;
- Image BuildBitmap(BOOL bProtect,BOOL bHidden,BOOL bHighContrast);
+ Image BuildBitmap(sal_Bool bProtect,sal_Bool bHidden,sal_Bool bHighContrast);
void RecurseList( const SwSectionFmt* pFmt, SvLBoxEntry* pEntry);
- USHORT FindArrPos(const SwSectionFmt* pFmt);
+ sal_uInt16 FindArrPos(const SwSectionFmt* pFmt);
DECL_LINK( GetFirstEntryHdl, SvTreeListBox * );
DECL_LINK( DeselectHdl, SvTreeListBox * );
@@ -147,7 +147,7 @@ class SwEditRegionDlg : public SfxModalDialog
DECL_LINK( DlgClosedHdl, sfx2::FileDialogHelper* );
DECL_LINK( SubRegionEventHdl, VclWindowEvent * );
- BOOL CheckPasswd(CheckBox* pBox = 0);
+ sal_Bool CheckPasswd(CheckBox* pBox = 0);
public:
SwEditRegionDlg( Window* pParent, SwWrtShell& rWrtSh );
@@ -221,7 +221,7 @@ public:
void SetWrtShell(SwWrtShell& rSh);
- virtual BOOL FillItemSet( SfxItemSet& );
+ virtual sal_Bool FillItemSet( SfxItemSet& );
virtual void Reset( const SfxItemSet& );
static SfxTabPage* Create( Window* pParent,
@@ -260,13 +260,13 @@ class SwSectionFtnEndTabPage : public SfxTabPage
DECL_LINK( FootEndHdl, CheckBox * );
- void ResetState( BOOL bFtn, const SwFmtFtnEndAtTxtEnd& );
+ void ResetState( sal_Bool bFtn, const SwFmtFtnEndAtTxtEnd& );
public:
SwSectionFtnEndTabPage( Window *pParent, const SfxItemSet &rAttrSet );
virtual ~SwSectionFtnEndTabPage();
- virtual BOOL FillItemSet( SfxItemSet& );
+ virtual sal_Bool FillItemSet( SfxItemSet& );
virtual void Reset( const SfxItemSet& );
static SfxTabPage* Create( Window* pParent,
@@ -290,7 +290,7 @@ public:
SwSectionIndentTabPage( Window *pParent, const SfxItemSet &rAttrSet );
virtual ~SwSectionIndentTabPage();
- virtual BOOL FillItemSet( SfxItemSet& );
+ virtual sal_Bool FillItemSet( SfxItemSet& );
virtual void Reset( const SfxItemSet& );
static SfxTabPage* Create( Window* pParent,
@@ -308,7 +308,7 @@ class SwInsertSectionTabDialog : public SfxTabDialog
::std::auto_ptr<SwSectionData> m_pSectionData;
protected:
- virtual void PageCreated( USHORT nId, SfxTabPage &rPage );
+ virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage );
virtual short Ok();
public:
SwInsertSectionTabDialog(Window* pParent, const SfxItemSet& rSet, SwWrtShell& rSh);
@@ -325,7 +325,7 @@ class SwSectionPropertyTabDialog : public SfxTabDialog
{
SwWrtShell& rWrtSh;
protected:
- virtual void PageCreated( USHORT nId, SfxTabPage &rPage );
+ virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage );
public:
SwSectionPropertyTabDialog(Window* pParent, const SfxItemSet& rSet, SwWrtShell& rSh);
virtual ~SwSectionPropertyTabDialog();
diff --git a/sw/source/ui/inc/scroll.hxx b/sw/source/ui/inc/scroll.hxx
index dec1460844..b2fa916c28 100644
--- a/sw/source/ui/inc/scroll.hxx
+++ b/sw/source/ui/inc/scroll.hxx
@@ -33,11 +33,11 @@
class SwScrollbar: public ScrollBar
{
Size aDocSz;
- BOOL bHori :1; // Horizontal = TRUE, sonst Vertikal
- BOOL bAuto :1; // fuer Scrollingmode
- BOOL bThumbEnabled:1;
- BOOL bVisible :1; // Show/Hide sollen nur noch dieses Flag setzen
- BOOL bSizeSet :1; // wurde die Groesse bereits gesetzt?
+ sal_Bool bHori :1; // Horizontal = sal_True, sonst Vertikal
+ sal_Bool bAuto :1; // fuer Scrollingmode
+ sal_Bool bThumbEnabled:1;
+ sal_Bool bVisible :1; // Show/Hide sollen nur noch dieses Flag setzen
+ sal_Bool bSizeSet :1; // wurde die Groesse bereits gesetzt?
void AutoShow();
@@ -47,22 +47,22 @@ class SwScrollbar: public ScrollBar
public:
- void ExtendedShow( BOOL bVisible = TRUE );
- void Hide() { Show( FALSE ); }
+ void ExtendedShow( sal_Bool bVisible = sal_True );
+ void Hide() { Show( sal_False ); }
void SetPosSizePixel( const Point& rNewPos, const Size& rNewSize );
- BOOL IsVisible(BOOL bReal) const { return bReal ? ScrollBar::IsVisible() : bVisible; }
+ sal_Bool IsVisible(sal_Bool bReal) const { return bReal ? ScrollBar::IsVisible() : bVisible; }
// Aenderung der Dokumentgroesse
void DocSzChgd(const Size &rNewSize);
// Aenderung des sichtbaren Bereiches
void ViewPortChgd(const Rectangle &rRectangle);
// was fuer einer ist es denn ??
- BOOL IsHoriScroll() const { return bHori; }
+ sal_Bool IsHoriScroll() const { return bHori; }
- void SetAuto(BOOL bSet);
- BOOL IsAuto() { return bAuto;}
+ void SetAuto(sal_Bool bSet);
+ sal_Bool IsAuto() { return bAuto;}
- SwScrollbar(Window *pParent, BOOL bHori = TRUE );
+ SwScrollbar(Window *pParent, sal_Bool bHori = sal_True );
~SwScrollbar();
};
diff --git a/sw/source/ui/inc/selglos.hxx b/sw/source/ui/inc/selglos.hxx
index b5f8190163..1c67f83a48 100644
--- a/sw/source/ui/inc/selglos.hxx
+++ b/sw/source/ui/inc/selglos.hxx
@@ -54,8 +54,8 @@ public:
SwSelGlossaryDlg(Window * pParent, const String &rShortName);
~SwSelGlossaryDlg();
void InsertGlos(const String &rRegion, const String &rGlosName); // inline
- USHORT GetSelectedIdx() const; // inline
- void SelectEntryPos(USHORT nIdx); // inline
+ sal_uInt16 GetSelectedIdx() const; // inline
+ void SelectEntryPos(sal_uInt16 nIdx); // inline
};
inline void SwSelGlossaryDlg::InsertGlos(const String &rRegion,
@@ -66,9 +66,9 @@ inline void SwSelGlossaryDlg::InsertGlos(const String &rRegion,
aTmp += rGlosName;
aGlosBox.InsertEntry( aTmp );
}
-inline USHORT SwSelGlossaryDlg::GetSelectedIdx() const
+inline sal_uInt16 SwSelGlossaryDlg::GetSelectedIdx() const
{ return aGlosBox.GetSelectEntryPos(); }
-inline void SwSelGlossaryDlg::SelectEntryPos(USHORT nIdx)
+inline void SwSelGlossaryDlg::SelectEntryPos(sal_uInt16 nIdx)
{ aGlosBox.SelectEntryPos(nIdx); }
#endif
diff --git a/sw/source/ui/inc/shdwcrsr.hxx b/sw/source/ui/inc/shdwcrsr.hxx
index abd9a1fc12..fe2b74c4d3 100644
--- a/sw/source/ui/inc/shdwcrsr.hxx
+++ b/sw/source/ui/inc/shdwcrsr.hxx
@@ -40,23 +40,23 @@ class SwShadowCursor
Color aCol;
Point aOldPt;
long nOldHeight;
- USHORT nOldMode;
+ sal_uInt16 nOldMode;
- void DrawTri( const Point& rPt, long nHeight, BOOL bLeft );
- void DrawCrsr( const Point& rPt, long nHeight, USHORT nMode );
+ void DrawTri( const Point& rPt, long nHeight, sal_Bool bLeft );
+ void DrawCrsr( const Point& rPt, long nHeight, sal_uInt16 nMode );
public:
SwShadowCursor( Window& rWin, const Color& rCol )
: pWin( &rWin ), aCol( rCol ), nOldHeight(0), nOldMode( USHRT_MAX ) {}
~SwShadowCursor();
- void SetPos( const Point& rPt, long nHeight, USHORT nMode );
+ void SetPos( const Point& rPt, long nHeight, sal_uInt16 nMode );
void Paint();
const Point& GetPoint() const { return aOldPt; }
long GetHeight() const { return nOldHeight; }
- USHORT GetMode() const { return nOldMode; }
+ sal_uInt16 GetMode() const { return nOldMode; }
Rectangle GetRect() const;
};
diff --git a/sw/source/ui/inc/split.hxx b/sw/source/ui/inc/split.hxx
index 834da1e995..2ffe470197 100644
--- a/sw/source/ui/inc/split.hxx
+++ b/sw/source/ui/inc/split.hxx
@@ -68,8 +68,8 @@ public:
SwSplitTableDlg(Window *pParent, SwWrtShell& rShell );
DECL_LINK( ClickHdl, Button * );
- BOOL IsHorizontal() const { return aHorzBox.IsChecked(); }
- BOOL IsProportional() const { return aPropCB.IsChecked() && aHorzBox.IsChecked(); }
+ sal_Bool IsHorizontal() const { return aHorzBox.IsChecked(); }
+ sal_Bool IsProportional() const { return aPropCB.IsChecked() && aHorzBox.IsChecked(); }
long GetCount() const { return sal::static_int_cast< long >(aCountEdit.GetValue()); }
};
diff --git a/sw/source/ui/inc/splittbl.hxx b/sw/source/ui/inc/splittbl.hxx
index eb610de647..1e3fbfc10d 100644
--- a/sw/source/ui/inc/splittbl.hxx
+++ b/sw/source/ui/inc/splittbl.hxx
@@ -45,7 +45,7 @@ class SwSplitTblDlg : public SvxStandardDialog
RadioButton aBorderCopyRB;
SwWrtShell &rShell;
- USHORT m_nSplit;
+ sal_uInt16 m_nSplit;
protected:
virtual void Apply();
@@ -53,7 +53,7 @@ protected:
public:
SwSplitTblDlg( Window *pParent, SwWrtShell &rSh );
- USHORT GetSplitMode() const { return m_nSplit; }
+ sal_uInt16 GetSplitMode() const { return m_nSplit; }
};
#endif
diff --git a/sw/source/ui/inc/srcedtw.hxx b/sw/source/ui/inc/srcedtw.hxx
index 4df24cefc3..a405469ad1 100644
--- a/sw/source/ui/inc/srcedtw.hxx
+++ b/sw/source/ui/inc/srcedtw.hxx
@@ -86,16 +86,16 @@ private:
utl::SourceViewConfig* pSourceViewConfig;
long nCurTextWidth;
- USHORT nStartLine;
+ sal_uInt16 nStartLine;
rtl_TextEncoding eSourceEncoding;
- BOOL bReadonly;
- BOOL bDoSyntaxHighlight;
- BOOL bHighlighting;
+ sal_Bool bReadonly;
+ sal_Bool bDoSyntaxHighlight;
+ sal_Bool bHighlighting;
Timer aSyntaxIdleTimer;
Table aSyntaxLineTable;
- void ImpDoHighlight( const String& rSource, USHORT nLineOff );
+ void ImpDoHighlight( const String& rSource, sal_uInt16 nLineOff );
using OutputDevice::SetFont;
void SetFont();
@@ -114,7 +114,7 @@ protected:
// virtual void LoseFocus();
void CreateTextEngine();
- void DoSyntaxHighlight( USHORT nPara );
+ void DoSyntaxHighlight( sal_uInt16 nPara );
virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
virtual void ConfigurationChanged( utl::ConfigurationBroadcaster*, sal_uInt32 );
@@ -127,9 +127,9 @@ public:
void SetScrollBarRanges();
void InitScrollBars();
- ULONG Read( SvStream& rInput)
+ sal_uLong Read( SvStream& rInput)
{return pTextEngine->Read(rInput);}
- ULONG Write( SvStream& rOutput)
+ sal_uLong Write( SvStream& rOutput)
{return pTextEngine->Write(rOutput);}
ExtTextView* GetTextView()
@@ -140,20 +140,20 @@ public:
TextViewOutWin* GetOutWin() {return pOutWin;}
- virtual void Invalidate( USHORT nFlags = 0 );
+ virtual void Invalidate( sal_uInt16 nFlags = 0 );
void ClearModifyFlag()
- { pTextEngine->SetModified(FALSE); }
- BOOL IsModified() const
+ { pTextEngine->SetModified(sal_False); }
+ sal_Bool IsModified() const
{ return pTextEngine->IsModified();}
void CreateScrollbars();
- void SetReadonly(BOOL bSet){bReadonly = bSet;}
- BOOL IsReadonly(){return bReadonly;}
+ void SetReadonly(sal_Bool bSet){bReadonly = bSet;}
+ sal_Bool IsReadonly(){return bReadonly;}
- void DoDelayedSyntaxHighlight( USHORT nPara );
+ void DoDelayedSyntaxHighlight( sal_uInt16 nPara );
- void SetStartLine(USHORT nLine){nStartLine = nLine;}
+ void SetStartLine(sal_uInt16 nLine){nStartLine = nLine;}
virtual void Command( const CommandEvent& rCEvt );
void HandleWheelCommand( const CommandEvent& rCEvt );
diff --git a/sw/source/ui/inc/srcview.hxx b/sw/source/ui/inc/srcview.hxx
index 06487fdea3..603bae794d 100644
--- a/sw/source/ui/inc/srcview.hxx
+++ b/sw/source/ui/inc/srcview.hxx
@@ -48,7 +48,7 @@ class SwSrcView: public SfxViewShell
SvxSearchItem* pSearchItem;
- BOOL bSourceSaved :1;
+ sal_Bool bSourceSaved :1;
rtl_TextEncoding eLoadEncoding;
void Init();
@@ -57,10 +57,10 @@ class SwSrcView: public SfxViewShell
protected:
- USHORT StartSearchAndReplace(const SvxSearchItem& rItem,
- BOOL bFromStart,
- BOOL bApi,
- BOOL bRecursive = FALSE);
+ sal_uInt16 StartSearchAndReplace(const SvxSearchItem& rItem,
+ sal_Bool bFromStart,
+ sal_Bool bApi,
+ sal_Bool bRecursive = sal_False);
public:
@@ -79,7 +79,7 @@ public:
void SaveContent(const String& rTmpFile);
void SaveContentTo(SfxMedium& rMed);
- BOOL IsModified() {return aEditWin.IsModified();}
+ sal_Bool IsModified() {return aEditWin.IsModified();}
@@ -91,13 +91,13 @@ public:
void Load(SwDocShell* pDocShell);
- virtual USHORT SetPrinter( SfxPrinter* pNew, USHORT nDiff = SFX_PRINTER_ALL, bool bIsAPI=false );
- virtual SfxPrinter* GetPrinter( BOOL bCreate = FALSE );
+ virtual sal_uInt16 SetPrinter( SfxPrinter* pNew, sal_uInt16 nDiff = SFX_PRINTER_ALL, bool bIsAPI=false );
+ virtual SfxPrinter* GetPrinter( sal_Bool bCreate = sal_False );
sal_Int32 PrintSource( OutputDevice *pOutDev, sal_Int32 nPage, bool bCalcNumPagesOnly );
- void SourceSaved() {bSourceSaved = TRUE;}
- BOOL HasSourceSaved() const {return bSourceSaved;}
+ void SourceSaved() {bSourceSaved = sal_True;}
+ sal_Bool HasSourceSaved() const {return bSourceSaved;}
};
diff --git a/sw/source/ui/inc/srtdlg.hxx b/sw/source/ui/inc/srtdlg.hxx
index 76cc70baa4..bf3fd1341f 100644
--- a/sw/source/ui/inc/srtdlg.hxx
+++ b/sw/source/ui/inc/srtdlg.hxx
@@ -98,8 +98,8 @@ class SwSortDlg : public SvxStandardDialog
SwWrtShell &rSh;
CollatorRessource* pColRes;
- USHORT nX;
- USHORT nY;
+ sal_uInt16 nX;
+ sal_uInt16 nY;
virtual void Apply();
sal_Unicode GetDelimChar() const;
diff --git a/sw/source/ui/inc/swcont.hxx b/sw/source/ui/inc/swcont.hxx
index e0da2a8694..9702aaeea4 100644
--- a/sw/source/ui/inc/swcont.hxx
+++ b/sw/source/ui/inc/swcont.hxx
@@ -69,13 +69,13 @@ class SwContentType;
//mini rtti
class SwTypeNumber
{
- BYTE nTypeId;
+ sal_uInt8 nTypeId;
public:
- SwTypeNumber(BYTE nId) :nTypeId(nId){}
+ SwTypeNumber(sal_uInt8 nId) :nTypeId(nId){}
virtual ~SwTypeNumber();
- virtual BYTE GetTypeId();
+ virtual sal_uInt8 GetTypeId();
};
//----------------------------------------------------------------------------
@@ -84,17 +84,17 @@ class SwContent : public SwTypeNumber
const SwContentType* pParent;
String sContentName;
long nYPosition;
- BOOL bInvisible;
+ sal_Bool bInvisible;
public:
SwContent(const SwContentType* pCnt, const String& rName, long nYPos );
- virtual BOOL IsProtect() const;
+ virtual sal_Bool IsProtect() const;
const SwContentType* GetParent() const {return pParent;}
const String& GetName() const {return sContentName;}
int operator==(const SwContent& /*rCont*/) const
{
//gleich sind sie nie, sonst fallen sie aus dem Array
- return FALSE;
+ return sal_False;
}
int operator<(const SwContent& rCont) const
{
@@ -106,8 +106,8 @@ public:
long GetYPos() const {return nYPosition;}
- BOOL IsInvisible() const {return bInvisible;}
- void SetInvisible(){ bInvisible = TRUE;}
+ sal_Bool IsInvisible() const {return bInvisible;}
+ void SetInvisible(){ bInvisible = sal_True;}
};
#endif
diff --git a/sw/source/ui/inc/swdtflvr.hxx b/sw/source/ui/inc/swdtflvr.hxx
index eb69d8fd67..64cd88033d 100644
--- a/sw/source/ui/inc/swdtflvr.hxx
+++ b/sw/source/ui/inc/swdtflvr.hxx
@@ -82,8 +82,8 @@ class SwTransferable : public TransferableHelper
TransferBufferType eBufferType;
- BOOL bOldIdle :1; //D&D Idle flag from the viewsettings
- BOOL bCleanUp :1; //D&D cleanup after Drop (not by internal Drop)
+ sal_Bool bOldIdle :1; //D&D Idle flag from the viewsettings
+ sal_Bool bCleanUp :1; //D&D cleanup after Drop (not by internal Drop)
// helper methods for the copy
com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject > FindOLEObj( sal_Int64& nAspect ) const;
@@ -92,50 +92,50 @@ class SwTransferable : public TransferableHelper
// helper methods for the paste
static SwTransferable* GetSwTransferable( const TransferableDataHelper& rData );
- static void SetSelInShell( SwWrtShell& , BOOL , const Point* );
- static BOOL _CheckForURLOrLNKFile( TransferableDataHelper& rData,
+ static void SetSelInShell( SwWrtShell& , sal_Bool , const Point* );
+ static sal_Bool _CheckForURLOrLNKFile( TransferableDataHelper& rData,
String& rFileName, String* pTitle = 0 );
static int _TestAllowedFormat( const TransferableDataHelper& rData,
- ULONG nFormat, USHORT nDestination );
+ sal_uLong nFormat, sal_uInt16 nDestination );
static int _PasteFileContent( TransferableDataHelper&,
- SwWrtShell& rSh, ULONG nFmt, BOOL bMsg );
+ SwWrtShell& rSh, sal_uLong nFmt, sal_Bool bMsg );
static int _PasteOLE( TransferableDataHelper& rData, SwWrtShell& rSh,
- ULONG nFmt, BYTE nActionFlags, BOOL bMsg );
+ sal_uLong nFmt, sal_uInt8 nActionFlags, sal_Bool bMsg );
static int _PasteTargetURL( TransferableDataHelper& rData, SwWrtShell& rSh,
- USHORT nAction, const Point* pPt, BOOL bInsertGRF );
+ sal_uInt16 nAction, const Point* pPt, sal_Bool bInsertGRF );
static int _PasteDDE( TransferableDataHelper& rData, SwWrtShell& rWrtShell,
- BOOL bReReadGrf, BOOL bMsg );
+ sal_Bool bReReadGrf, sal_Bool bMsg );
static int _PasteSdrFormat( TransferableDataHelper& rData,
- SwWrtShell& rSh, USHORT nAction,
- const Point* pPt, BYTE nActionFlags );
+ SwWrtShell& rSh, sal_uInt16 nAction,
+ const Point* pPt, sal_uInt8 nActionFlags );
static int _PasteGrf( TransferableDataHelper& rData, SwWrtShell& rSh,
- ULONG nFmt, USHORT nAction, const Point* pPt,
- BYTE nActionFlags, BOOL bMsg );
+ sal_uLong nFmt, sal_uInt16 nAction, const Point* pPt,
+ sal_uInt8 nActionFlags, sal_Bool bMsg );
static int _PasteImageMap( TransferableDataHelper& rData,
SwWrtShell& rSh );
static int _PasteAsHyperlink( TransferableDataHelper& rData,
- SwWrtShell& rSh, ULONG nFmt );
+ SwWrtShell& rSh, sal_uLong nFmt );
static int _PasteFileName( TransferableDataHelper& rData,
- SwWrtShell& rSh, ULONG nFmt, USHORT nAction,
- const Point* pPt, BYTE nActionFlags, BOOL bMsg );
+ SwWrtShell& rSh, sal_uLong nFmt, sal_uInt16 nAction,
+ const Point* pPt, sal_uInt8 nActionFlags, sal_Bool bMsg );
static int _PasteDBData( TransferableDataHelper& rData, SwWrtShell& rSh,
- ULONG nFmt, BOOL bLink, const Point* pDragPt,
- BOOL bMsg );
+ sal_uLong nFmt, sal_Bool bLink, const Point* pDragPt,
+ sal_Bool bMsg );
static int _PasteFileList( TransferableDataHelper& rData,
- SwWrtShell& rSh, BOOL bLink,
- const Point* pPt, BOOL bMsg );
+ SwWrtShell& rSh, sal_Bool bLink,
+ const Point* pPt, sal_Bool bMsg );
- int PrivateDrop( SwWrtShell& rSh, const Point& rDragPt, BOOL bMove,
- BOOL bIsXSelection );
+ int PrivateDrop( SwWrtShell& rSh, const Point& rDragPt, sal_Bool bMove,
+ sal_Bool bIsXSelection );
int PrivatePaste( SwWrtShell& rShell );
void SetDataForDragAndDrop( const Point& rSttPos );
@@ -161,7 +161,7 @@ public:
SwTransferable( SwWrtShell& );
virtual ~SwTransferable();
- static USHORT GetSotDestination( const SwWrtShell& rSh, const Point* = 0 );
+ static sal_uInt16 GetSotDestination( const SwWrtShell& rSh, const Point* = 0 );
// set properties on the document, like PageMargin, VisArea.
// And set real Size
@@ -169,8 +169,8 @@ public:
// copy - methods and helper methods for the copy
int Cut();
- int Copy( BOOL bIsCut = FALSE );
- int PrepareForCopy( BOOL bIsCut = FALSE );
+ int Copy( sal_Bool bIsCut = sal_False );
+ int PrepareForCopy( sal_Bool bIsCut = sal_False );
int CalculateAndCopy(); // special for Calculator
int CopyGlossary( SwTextBlocks& rGlossary, const String& rStr );
@@ -178,21 +178,21 @@ public:
void RemoveDDELinkFormat( const Window& rWin );
// paste - methods and helper methods for the paste
- static BOOL IsPaste( const SwWrtShell&, const TransferableDataHelper& );
+ static sal_Bool IsPaste( const SwWrtShell&, const TransferableDataHelper& );
static int Paste( SwWrtShell&, TransferableDataHelper& );
static int PasteData( TransferableDataHelper& rData,
- SwWrtShell& rSh, USHORT nAction, ULONG nFormat,
- USHORT nDestination, BOOL bIsPasteFmt,
+ SwWrtShell& rSh, sal_uInt16 nAction, sal_uLong nFormat,
+ sal_uInt16 nDestination, sal_Bool bIsPasteFmt,
sal_Bool bIsDefault,
const Point* pDDPos = 0, sal_Int8 nDropAction = 0,
- BOOL bPasteSelection = FALSE );
+ sal_Bool bPasteSelection = sal_False );
- static BOOL IsPasteSpecial( const SwWrtShell& rWrtShell,
+ static sal_Bool IsPasteSpecial( const SwWrtShell& rWrtShell,
const TransferableDataHelper& );
static int PasteUnformatted( SwWrtShell& rSh, TransferableDataHelper& );
- static int PasteSpecial( SwWrtShell& rSh, TransferableDataHelper&, ULONG& rFormatUsed );
+ static int PasteSpecial( SwWrtShell& rSh, TransferableDataHelper&, sal_uLong& rFormatUsed );
static int PasteFormat( SwWrtShell& rSh, TransferableDataHelper& rData,
- ULONG nFormat );
+ sal_uLong nFormat );
static void FillClipFmtItem( const SwWrtShell& rSh,
const TransferableDataHelper& rData,
@@ -202,7 +202,7 @@ public:
void StartDrag( Window* pWin, const Point& rPos );
SwWrtShell* GetShell() { return pWrtShell; }
- void SetCleanUp( BOOL bFlag ) { bCleanUp = bFlag; }
+ void SetCleanUp( sal_Bool bFlag ) { bCleanUp = bFlag; }
// Interfaces for Selection
/* #96392# Added pCreator to distinguish SwFrameShell from SwWrtShell. */
diff --git a/sw/source/ui/inc/swlbox.hxx b/sw/source/ui/inc/swlbox.hxx
index ab4435772f..94938f7067 100644
--- a/sw/source/ui/inc/swlbox.hxx
+++ b/sw/source/ui/inc/swlbox.hxx
@@ -51,14 +51,14 @@ class SW_DLLPUBLIC SwBoxEntry
{
friend class SwComboBox;
- BOOL bModified : 1;
- BOOL bNew : 1;
+ sal_Bool bModified : 1;
+ sal_Bool bNew : 1;
String aName;
- USHORT nId;
+ sal_uInt16 nId;
public:
- SwBoxEntry(const String& aName, USHORT nId=0);
+ SwBoxEntry(const String& aName, sal_uInt16 nId=0);
SwBoxEntry(const SwBoxEntry& rOrg);
SwBoxEntry();
@@ -69,7 +69,7 @@ public:
Beschreibung: fuer ComboBoxen
--------------------------------------------------------------------*/
-typedef USHORT SwComboBoxStyle;
+typedef sal_uInt16 SwComboBoxStyle;
namespace nsSwComboBoxStyle
{
const SwComboBoxStyle CBS_UPPER = 0x01;
@@ -84,7 +84,7 @@ class SW_DLLPUBLIC SwComboBox : public ComboBox
SwEntryLst aEntryLst;
SwEntryLst aDelEntryLst;
SwBoxEntry aDefault;
- USHORT nStyle;
+ sal_uInt16 nStyle;
SW_DLLPRIVATE void InitComboBox();
SW_DLLPRIVATE void InsertSorted(SwBoxEntry* pEntry);
@@ -98,25 +98,25 @@ public:
using ComboBox::GetEntryPos;
SwComboBox(Window* pParent, const ResId& rId,
- USHORT nStyleBits = nsSwComboBoxStyle::CBS_ALL);
+ sal_uInt16 nStyleBits = nsSwComboBoxStyle::CBS_ALL);
~SwComboBox();
virtual void KeyInput( const KeyEvent& rKEvt );
void InsertEntry(const SwBoxEntry&);
- USHORT InsertEntry( const XubString& rStr, USHORT = 0)
+ sal_uInt16 InsertEntry( const XubString& rStr, sal_uInt16 = 0)
{ InsertEntry( SwBoxEntry( rStr ) ); return 0; }
- void RemoveEntry(USHORT nPos);
+ void RemoveEntry(sal_uInt16 nPos);
- USHORT GetEntryPos(const SwBoxEntry& rEntry) const;
- const SwBoxEntry& GetEntry(USHORT) const;
+ sal_uInt16 GetEntryPos(const SwBoxEntry& rEntry) const;
+ const SwBoxEntry& GetEntry(sal_uInt16) const;
- USHORT GetRemovedCount() const;
- const SwBoxEntry& GetRemovedEntry(USHORT nPos) const;
+ sal_uInt16 GetRemovedCount() const;
+ const SwBoxEntry& GetRemovedEntry(sal_uInt16 nPos) const;
- USHORT GetStyle() const { return nStyle; }
- void SetStyle(const USHORT nSt) { nStyle = nSt; }
+ sal_uInt16 GetStyle() const { return nStyle; }
+ void SetStyle(const sal_uInt16 nSt) { nStyle = nSt; }
String GetText() const;
};
diff --git a/sw/source/ui/inc/swmodalredlineacceptdlg.hxx b/sw/source/ui/inc/swmodalredlineacceptdlg.hxx
index b73ec454a1..45a00bca24 100644
--- a/sw/source/ui/inc/swmodalredlineacceptdlg.hxx
+++ b/sw/source/ui/inc/swmodalredlineacceptdlg.hxx
@@ -41,7 +41,7 @@ public:
SwModalRedlineAcceptDlg(Window *pParent);
~SwModalRedlineAcceptDlg();
- void AcceptAll( BOOL bAccept );
+ void AcceptAll( sal_Bool bAccept );
virtual void Activate();
};
diff --git a/sw/source/ui/inc/swtablerep.hxx b/sw/source/ui/inc/swtablerep.hxx
index c9bbaff6b9..3b378684b8 100644
--- a/sw/source/ui/inc/swtablerep.hxx
+++ b/sw/source/ui/inc/swtablerep.hxx
@@ -42,20 +42,20 @@ class SW_DLLPUBLIC SwTableRep
SwTwips nSpace;
SwTwips nLeftSpace;
SwTwips nRightSpace;
- USHORT nAlign;
- USHORT nColCount;
- USHORT nAllCols;
- USHORT nWidthPercent;
- BOOL bComplex : 1;
- BOOL bLineSelected : 1;
- BOOL bWidthChanged : 1;
- BOOL bColsChanged : 1;
+ sal_uInt16 nAlign;
+ sal_uInt16 nColCount;
+ sal_uInt16 nAllCols;
+ sal_uInt16 nWidthPercent;
+ sal_Bool bComplex : 1;
+ sal_Bool bLineSelected : 1;
+ sal_Bool bWidthChanged : 1;
+ sal_Bool bColsChanged : 1;
public:
- SwTableRep( const SwTabCols& rTabCol, BOOL bComplex );
+ SwTableRep( const SwTabCols& rTabCol, sal_Bool bComplex );
~SwTableRep();
- BOOL FillTabCols( SwTabCols& rTabCol ) const;
+ sal_Bool FillTabCols( SwTabCols& rTabCol ) const;
SwTwips GetLeftSpace() const {return nLeftSpace;}
void SetLeftSpace(SwTwips nSet) {nLeftSpace = nSet;}
@@ -66,24 +66,24 @@ public:
SwTwips GetWidth() const {return nTblWidth;}
void SetWidth(SwTwips nSet) {nTblWidth = nSet;}
- USHORT GetWidthPercent() const {return nWidthPercent;}
- void SetWidthPercent(USHORT nSet) {nWidthPercent = nSet;}
+ sal_uInt16 GetWidthPercent() const {return nWidthPercent;}
+ void SetWidthPercent(sal_uInt16 nSet) {nWidthPercent = nSet;}
- USHORT GetAlign() const {return nAlign;}
- void SetAlign(USHORT nSet) {nAlign = nSet;}
+ sal_uInt16 GetAlign() const {return nAlign;}
+ void SetAlign(sal_uInt16 nSet) {nAlign = nSet;}
- BOOL IsComplex() const {return bComplex;}
- USHORT GetColCount() const {return nColCount;}
- USHORT GetAllColCount() const {return nAllCols;}
+ sal_Bool IsComplex() const {return bComplex;}
+ sal_uInt16 GetColCount() const {return nColCount;}
+ sal_uInt16 GetAllColCount() const {return nAllCols;}
- BOOL HasColsChanged() const {return bColsChanged;}
- void SetColsChanged() {bColsChanged = TRUE;}
+ sal_Bool HasColsChanged() const {return bColsChanged;}
+ void SetColsChanged() {bColsChanged = sal_True;}
- BOOL HasWidthChanged() const {return bWidthChanged;}
- void SetWidthChanged() {bWidthChanged = TRUE;}
+ sal_Bool HasWidthChanged() const {return bWidthChanged;}
+ void SetWidthChanged() {bWidthChanged = sal_True;}
- BOOL IsLineSelected() const {return bLineSelected;}
- void SetLineSelected(BOOL bSet) {bLineSelected = bSet;}
+ sal_Bool IsLineSelected() const {return bLineSelected;}
+ void SetLineSelected(sal_Bool bSet) {bLineSelected = bSet;}
SwTwips GetSpace() const { return nSpace;}
void SetSpace(SwTwips nSet) {nSpace = nSet;}
diff --git a/sw/source/ui/inc/swuiccoll.hxx b/sw/source/ui/inc/swuiccoll.hxx
index eab682ea40..87f87ccbb8 100644
--- a/sw/source/ui/inc/swuiccoll.hxx
+++ b/sw/source/ui/inc/swuiccoll.hxx
@@ -57,7 +57,7 @@ class SwCondCollPage : public SfxTabPage
CollName* pNms;
- BOOL bNewTemplate;
+ sal_Bool bNewTemplate;
SwCondCollPage(Window *pParent, const SfxItemSet &rSet);
@@ -75,12 +75,12 @@ class SwCondCollPage : public SfxTabPage
public:
static SfxTabPage *Create(Window *pParent, const SfxItemSet &rSet);
- static USHORT* GetRanges();
+ static sal_uInt16* GetRanges();
- virtual BOOL FillItemSet( SfxItemSet &rSet);
+ virtual sal_Bool FillItemSet( SfxItemSet &rSet);
virtual void Reset (const SfxItemSet &rSet);
- void SetCollection( SwFmt* pFormat, BOOL bNew );
+ void SetCollection( SwFmt* pFormat, sal_Bool bNew );
};
diff --git a/sw/source/ui/inc/swuicnttab.hxx b/sw/source/ui/inc/swuicnttab.hxx
index 6038f4a2de..8b54b7a0ea 100644
--- a/sw/source/ui/inc/swuicnttab.hxx
+++ b/sw/source/ui/inc/swuicnttab.hxx
@@ -95,12 +95,12 @@ class SwMultiTOXTabDialog : public SfxTabDialog
CurTOXType eCurrentTOXType;
String sUserDefinedIndex;
- USHORT nTypeCount;
- USHORT nInitialTOXType;
+ sal_uInt16 nTypeCount;
+ sal_uInt16 nInitialTOXType;
- BOOL bEditTOX;
- BOOL bExampleCreated;
- BOOL bGlobalFlag;
+ sal_Bool bEditTOX;
+ sal_Bool bExampleCreated;
+ sal_Bool bGlobalFlag;
virtual short Ok();
SwTOXDescription* CreateTOXDescFromTOXBase(const SwTOXBase*pCurTOX);
@@ -111,11 +111,11 @@ class SwMultiTOXTabDialog : public SfxTabDialog
public:
SwMultiTOXTabDialog(Window* pParent, const SfxItemSet& rSet,
SwWrtShell &rShell,
- SwTOXBase* pCurTOX, USHORT nToxType = USHRT_MAX,
- BOOL bGlobal = FALSE);
+ SwTOXBase* pCurTOX, sal_uInt16 nToxType = USHRT_MAX,
+ sal_Bool bGlobal = sal_False);
~SwMultiTOXTabDialog();
- virtual void PageCreated( USHORT nId, SfxTabPage &rPage );
+ virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage );
SwForm* GetForm(CurTOXType eType);
@@ -126,15 +126,15 @@ public:
}
void UpdateExample();
- BOOL IsTOXEditMode() const { return bEditTOX;}
+ sal_Bool IsTOXEditMode() const { return bEditTOX;}
SwWrtShell& GetWrtShell() {return rSh;}
SwTOXDescription& GetTOXDescription(CurTOXType eTOXTypes);
void CreateOrUpdateExample(
- TOXTypes nTOXIndex, USHORT nPage = 0, USHORT nCurLevel = USHRT_MAX);
+ TOXTypes nTOXIndex, sal_uInt16 nPage = 0, sal_uInt16 nCurLevel = USHRT_MAX);
- static BOOL IsNoNum(SwWrtShell& rSh, const String& rName);
+ static sal_Bool IsNoNum(SwWrtShell& rSh, const String& rName);
};
/* -----------------14.07.99 12:17-------------------
@@ -229,7 +229,7 @@ class SwTOXSelectTabPage : public SfxTabPage
const IndexEntrySupplierWrapper* pIndexEntryWrapper;
- BOOL bFirstCall;
+ sal_Bool bFirstCall;
DECL_LINK(TOXTypeHdl, ListBox* );
DECL_LINK(TOXAreaHdl, ListBox* );
@@ -253,7 +253,7 @@ public:
SwTOXSelectTabPage(Window* pParent, const SfxItemSet& rAttrSet);
~SwTOXSelectTabPage();
- virtual BOOL FillItemSet( SfxItemSet& );
+ virtual sal_Bool FillItemSet( SfxItemSet& );
virtual void Reset( const SfxItemSet& );
virtual void ActivatePage( const SfxItemSet& );
@@ -282,8 +282,8 @@ class SwTokenWindow : public Window
ImageButton aRightScrollWin;
TOXControlList aControlList;
SwForm* pForm;
- USHORT nLevel;
- BOOL bValid;
+ sal_uInt16 nLevel;
+ sal_Bool bValid;
String aButtonTexts[TOKEN_END]; // Text of the buttons
String aButtonHelpTexts[TOKEN_END]; // QuickHelpText of the buttons
String sCharStyle;
@@ -311,12 +311,12 @@ public:
SwTokenWindow(SwTOXEntryTabPage* pParent, const ResId& rResId);
~SwTokenWindow();
- void SetForm(SwForm& rForm, USHORT nLevel);
- USHORT GetLastLevel()const {return nLevel;};
+ void SetForm(SwForm& rForm, sal_uInt16 nLevel);
+ sal_uInt16 GetLastLevel()const {return nLevel;};
- BOOL IsValid() const {return bValid;}
+ sal_Bool IsValid() const {return bValid;}
- void SetInvalid() {bValid = FALSE;}
+ void SetInvalid() {bValid = sal_False;}
String GetPattern() const;
@@ -329,14 +329,14 @@ public:
{ return pActiveCtrl;}
void InsertAtSelection(const String& rText, const SwFormToken& aToken);
- void RemoveControl(SwTOXButton* pDel, BOOL bInternalCall = FALSE);
+ void RemoveControl(SwTOXButton* pDel, sal_Bool bInternalCall = sal_False);
- BOOL Contains(FormTokenType) const;
+ sal_Bool Contains(FormTokenType) const;
- BOOL DetermineLinkStart();
+ sal_Bool DetermineLinkStart();
//helper for pattern buttons and edits
- BOOL CreateQuickHelp(Control* pCtrl,
+ sal_Bool CreateQuickHelp(Control* pCtrl,
const SwFormToken& rToken, const HelpEvent& );
virtual void Resize();
@@ -439,7 +439,7 @@ class SwTOXEntryTabPage : public SfxTabPage
Size aLevelFLSize;
CurTOXType aLastTOXType;
- BOOL bInLevelHdl;
+ sal_Bool bInLevelHdl;
Point aChapterEntryFTPosition; //!< holds position of ChapterEntryFT control,
//to be used in moving the element among different tokens
@@ -474,7 +474,7 @@ public:
SwTOXEntryTabPage(Window* pParent, const SfxItemSet& rAttrSet);
~SwTOXEntryTabPage();
- virtual BOOL FillItemSet( SfxItemSet& );
+ virtual sal_Bool FillItemSet( SfxItemSet& );
virtual void Reset( const SfxItemSet& );
virtual void ActivatePage( const SfxItemSet& );
virtual int DeactivatePage( SfxItemSet* pSet = 0 );
@@ -483,7 +483,7 @@ public:
const SfxItemSet& rAttrSet);
void SetWrtShell(SwWrtShell& rSh);
- String GetLevelHelp(USHORT nLevel) const;
+ String GetLevelHelp(sal_uInt16 nLevel) const;
void PreTokenButtonRemoved(const SwFormToken& rToken);
};
@@ -524,7 +524,7 @@ public:
SwTOXStylesTabPage(Window* pParent, const SfxItemSet& rAttrSet);
~SwTOXStylesTabPage();
- virtual BOOL FillItemSet( SfxItemSet& );
+ virtual sal_Bool FillItemSet( SfxItemSet& );
virtual void Reset( const SfxItemSet& );
virtual void ActivatePage( const SfxItemSet& );
diff --git a/sw/source/ui/inc/swuiidxmrk.hxx b/sw/source/ui/inc/swuiidxmrk.hxx
index cef3fa83cf..779d504a00 100644
--- a/sw/source/ui/inc/swuiidxmrk.hxx
+++ b/sw/source/ui/inc/swuiidxmrk.hxx
@@ -116,11 +116,11 @@ class SwIndexMarkDlg : public Window
sal_Bool bNewMark;
sal_Bool bSelected;
- BOOL bPhoneticED0_ChangedByUser;
- BOOL bPhoneticED1_ChangedByUser;
- BOOL bPhoneticED2_ChangedByUser;
+ sal_Bool bPhoneticED0_ChangedByUser;
+ sal_Bool bPhoneticED1_ChangedByUser;
+ sal_Bool bPhoneticED2_ChangedByUser;
LanguageType nLangForPhoneticReading; //Language of current text used for phonetic reading proposal
- BOOL bIsPhoneticReadingEnabled; //this value states wether phopentic reading is enabled in principle dependend of global cjk settings and language of current entry
+ sal_Bool bIsPhoneticReadingEnabled; //this value states wether phopentic reading is enabled in principle dependend of global cjk settings and language of current entry
com::sun::star::uno::Reference< com::sun::star::i18n::XExtendedIndexEntrySupplier >
xExtendedIndexEntrySupplier;
diff --git a/sw/source/ui/inc/swuipardlg.hxx b/sw/source/ui/inc/swuipardlg.hxx
index 1dbec7f72c..d4ac28871e 100644
--- a/sw/source/ui/inc/swuipardlg.hxx
+++ b/sw/source/ui/inc/swuipardlg.hxx
@@ -31,20 +31,20 @@
class SwParaDlg: public SfxTabDialog
{
SwView& rView;
- USHORT nHtmlMode;
- BYTE nDlgMode;
- BOOL bDrawParaDlg;
+ sal_uInt16 nHtmlMode;
+ sal_uInt8 nDlgMode;
+ sal_Bool bDrawParaDlg;
- void PageCreated(USHORT nID, SfxTabPage& rPage);
+ void PageCreated(sal_uInt16 nID, SfxTabPage& rPage);
public:
SwParaDlg( Window *pParent,
SwView& rVw,
const SfxItemSet&,
- BYTE nDialogMode,
+ sal_uInt8 nDialogMode,
const String *pCollName = 0,
- BOOL bDraw = FALSE,
- UINT16 nDefPage = 0);
+ sal_Bool bDraw = sal_False,
+ sal_uInt16 nDefPage = 0);
~SwParaDlg();
};
diff --git a/sw/source/ui/inc/swwrtshitem.hxx b/sw/source/ui/inc/swwrtshitem.hxx
index 2469ef806e..4224e81b14 100644
--- a/sw/source/ui/inc/swwrtshitem.hxx
+++ b/sw/source/ui/inc/swwrtshitem.hxx
@@ -38,7 +38,7 @@ class SW_DLLPUBLIC SwWrtShellItem: public SfxPoolItem
public:
TYPEINFO();
SwWrtShellItem();
- SwWrtShellItem( USHORT nWhich , SwWrtShell* pWrtSh);
+ SwWrtShellItem( sal_uInt16 nWhich , SwWrtShell* pWrtSh);
SwWrtShellItem( const SwWrtShellItem& );
diff --git a/sw/source/ui/inc/syncbtn.hxx b/sw/source/ui/inc/syncbtn.hxx
index bd99b185b8..045091bf34 100644
--- a/sw/source/ui/inc/syncbtn.hxx
+++ b/sw/source/ui/inc/syncbtn.hxx
@@ -59,7 +59,7 @@ class SwSyncChildWin : public SfxChildWindow
{
public:
SwSyncChildWin( Window* ,
- USHORT nId,
+ sal_uInt16 nId,
SfxBindings*,
SfxChildWinInfo* );
diff --git a/sw/source/ui/inc/tabledlg.hxx b/sw/source/ui/inc/tabledlg.hxx
index 8ef084bb6a..f66e832aed 100644
--- a/sw/source/ui/inc/tabledlg.hxx
+++ b/sw/source/ui/inc/tabledlg.hxx
@@ -43,9 +43,9 @@ struct TColumn;
class SwTableTabDlg : public SfxTabDialog
{
SwWrtShell* pShell;
- USHORT nHtmlMode;
+ sal_uInt16 nHtmlMode;
- virtual void PageCreated(USHORT nId, SfxTabPage& rPage);
+ virtual void PageCreated(sal_uInt16 nId, SfxTabPage& rPage);
public:
SwTableTabDlg( Window* pParent, SfxItemPool& Pool,
const SfxItemSet* pItemSet, SwWrtShell* pSh );
diff --git a/sw/source/ui/inc/tablemgr.hxx b/sw/source/ui/inc/tablemgr.hxx
index 8ada860a62..955cf7cf0a 100644
--- a/sw/source/ui/inc/tablemgr.hxx
+++ b/sw/source/ui/inc/tablemgr.hxx
@@ -52,7 +52,7 @@ class SW_DLLPUBLIC SwTableFUNC
{
SwFrmFmt *pFmt;
SwWrtShell *pSh;
- BOOL bCopy;
+ sal_Bool bCopy;
SwTabCols aCols;
private:
@@ -60,18 +60,18 @@ private:
public:
inline SwTableFUNC(SwFrmFmt &);
- SwTableFUNC(SwWrtShell *pShell, BOOL bCopyFmt = FALSE);
+ SwTableFUNC(SwWrtShell *pShell, sal_Bool bCopyFmt = sal_False);
~SwTableFUNC();
void InitTabCols();
void ColWidthDlg(Window *pParent );
- SwTwips GetColWidth(USHORT nNum) const;
- SwTwips GetMaxColWidth(USHORT nNum) const;
- void SetColWidth(USHORT nNum, SwTwips nWidth );
- USHORT GetColCount() const;
- USHORT GetCurColNum() const;
+ SwTwips GetColWidth(sal_uInt16 nNum) const;
+ SwTwips GetMaxColWidth(sal_uInt16 nNum) const;
+ void SetColWidth(sal_uInt16 nNum, SwTwips nWidth );
+ sal_uInt16 GetColCount() const;
+ sal_uInt16 GetCurColNum() const;
- BOOL IsTableSelected() const { return pFmt != 0; }
+ sal_Bool IsTableSelected() const { return pFmt != 0; }
const SwFrmFmt *GetTableFmt() const { return pFmt; }
@@ -88,7 +88,7 @@ public:
inline SwTableFUNC::SwTableFUNC(SwFrmFmt &rFmt) :
pFmt(&rFmt),
pSh(0),
- bCopy(FALSE)
+ bCopy(sal_False)
{
}
diff --git a/sw/source/ui/inc/tabsh.hxx b/sw/source/ui/inc/tabsh.hxx
index f2a8b99de9..7c985f7b09 100644
--- a/sw/source/ui/inc/tabsh.hxx
+++ b/sw/source/ui/inc/tabsh.hxx
@@ -35,8 +35,8 @@ class SwWrtShell;
SW_DLLPUBLIC void ItemSetToTableParam( const SfxItemSet& rSet, SwWrtShell &rSh );
-extern const USHORT __FAR_DATA aUITableAttrRange[];
-SW_DLLPUBLIC const USHORT* SwuiGetUITableAttrRange();
+extern const sal_uInt16 __FAR_DATA aUITableAttrRange[];
+SW_DLLPUBLIC const sal_uInt16* SwuiGetUITableAttrRange();
class SwTableShell: public SwBaseShell
{
diff --git a/sw/source/ui/inc/tautofmt.hxx b/sw/source/ui/inc/tautofmt.hxx
index ca455b4432..bb5df4a841 100644
--- a/sw/source/ui/inc/tautofmt.hxx
+++ b/sw/source/ui/inc/tautofmt.hxx
@@ -88,14 +88,14 @@ class SwAutoFormatDlg : public SfxModalDialog
//------------------------
SwWrtShell* pShell;
SwTableAutoFmtTbl* pTableTbl;
- BYTE nIndex;
- BYTE nDfltStylePos;
- BOOL bCoreDataChanged : 1;
- BOOL bSetAutoFmt : 1;
+ sal_uInt8 nIndex;
+ sal_uInt8 nDfltStylePos;
+ sal_Bool bCoreDataChanged : 1;
+ sal_Bool bSetAutoFmt : 1;
void Init( const SwTableAutoFmt* pSelFmt );
- void UpdateChecks( const SwTableAutoFmt&, BOOL bEnableBtn );
+ void UpdateChecks( const SwTableAutoFmt&, sal_Bool bEnableBtn );
//------------------------
DECL_LINK( CheckHdl, Button * );
DECL_LINK( OkHdl, Button * );
@@ -106,7 +106,7 @@ class SwAutoFormatDlg : public SfxModalDialog
public:
SwAutoFormatDlg( Window* pParent, SwWrtShell* pShell,
- BOOL bSetAutoFmt = TRUE,
+ sal_Bool bSetAutoFmt = sal_True,
const SwTableAutoFmt* pSelFmt = 0 );
virtual ~SwAutoFormatDlg();
diff --git a/sw/source/ui/inc/tblctrl.hxx b/sw/source/ui/inc/tblctrl.hxx
index 897d9dc0ac..f7fde59081 100644
--- a/sw/source/ui/inc/tblctrl.hxx
+++ b/sw/source/ui/inc/tblctrl.hxx
@@ -41,7 +41,7 @@ class SwTableOptimizeCtrl : public SfxToolBoxControl
public:
SFX_DECL_TOOLBOX_CONTROL();
- SwTableOptimizeCtrl( USHORT nSlotId, USHORT nId, ToolBox& rTbx );
+ SwTableOptimizeCtrl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx );
~SwTableOptimizeCtrl();
virtual SfxPopupWindowType GetPopupWindowType() const;
diff --git a/sw/source/ui/inc/tbxanchr.hxx b/sw/source/ui/inc/tbxanchr.hxx
index 21670abfd0..d3047be467 100644
--- a/sw/source/ui/inc/tbxanchr.hxx
+++ b/sw/source/ui/inc/tbxanchr.hxx
@@ -31,17 +31,17 @@
class SwTbxAnchor : public SfxToolBoxControl
{
- USHORT nActAnchorId;
+ sal_uInt16 nActAnchorId;
public:
- virtual void StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pState );
+ virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState );
virtual void Click();
virtual SfxPopupWindow* CreatePopupWindow();
SFX_DECL_TOOLBOX_CONTROL();
- SwTbxAnchor( USHORT nSlotId, USHORT nId, ToolBox& rTbx );
+ SwTbxAnchor( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx );
~SwTbxAnchor();
};
diff --git a/sw/source/ui/inc/textcontrolcombo.hxx b/sw/source/ui/inc/textcontrolcombo.hxx
index d367cf3b29..dd73cdcf06 100644
--- a/sw/source/ui/inc/textcontrolcombo.hxx
+++ b/sw/source/ui/inc/textcontrolcombo.hxx
@@ -52,14 +52,14 @@ public:
Control& _rCtrl, FixedText& _rFTbefore, FixedText& _rFTafter );
virtual ~TextControlCombo();
- void Arrange( FixedText& _rOrg, BOOL bShow = true );
+ void Arrange( FixedText& _rOrg, sal_Bool bShow = true );
// identical to window functionality
- void Show( BOOL bVisible = TRUE, USHORT nFlags = 0 );
- void Hide( USHORT nFlags = 0 ) { Show( FALSE, nFlags ); }
+ void Show( sal_Bool bVisible = sal_True, sal_uInt16 nFlags = 0 );
+ void Hide( sal_uInt16 nFlags = 0 ) { Show( sal_False, nFlags ); }
- void Enable( BOOL bEnable = TRUE, BOOL bChild = TRUE );
- void Disable( BOOL bChild = TRUE ) { Enable( FALSE, bChild ); }
+ void Enable( sal_Bool bEnable = sal_True, sal_Bool bChild = sal_True );
+ void Disable( sal_Bool bChild = sal_True ) { Enable( sal_False, bChild ); }
};
diff --git a/sw/source/ui/inc/textsh.hxx b/sw/source/ui/inc/textsh.hxx
index 3212bd7a63..f627491138 100644
--- a/sw/source/ui/inc/textsh.hxx
+++ b/sw/source/ui/inc/textsh.hxx
@@ -41,7 +41,7 @@ class SwTextShell: public SwBaseShell
void InsertSymbol( SfxRequest& );
void InsertHyperlink(const SvxHyperlinkItem& rHlnkItem);
bool InsertMediaDlg( SfxRequest& );
- void ChangeHeaderOrFooter(const String& rStyleName, BOOL bHeader, BOOL bOn, BOOL bShowWarning);
+ void ChangeHeaderOrFooter(const String& rStyleName, sal_Bool bHeader, sal_Bool bOn, sal_Bool bShowWarning);
public:
SFX_DECL_INTERFACE(SW_TEXTSHELL)
diff --git a/sw/source/ui/inc/tmpdlg.hxx b/sw/source/ui/inc/tmpdlg.hxx
index 7f9b8f7de0..7a05c4dc07 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 4a97d0f80d..ed090a0a2c 100644
--- a/sw/source/ui/inc/tmplctrl.hxx
+++ b/sw/source/ui/inc/tmplctrl.hxx
@@ -40,13 +40,13 @@ class SwTemplateControl : public SfxStatusBarControl
protected:
virtual void Command( const CommandEvent& rCEvt );
public:
- virtual void StateChanged( USHORT nSID, SfxItemState eState,
+ virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState,
const SfxPoolItem* pState );
virtual void Paint( const UserDrawEvent& rEvt );
SFX_DECL_STATUSBAR_CONTROL();
- SwTemplateControl( USHORT nSlotId, USHORT nId, StatusBar& rStb );
+ SwTemplateControl( sal_uInt16 nSlotId, sal_uInt16 nId, StatusBar& rStb );
~SwTemplateControl();
private:
diff --git a/sw/source/ui/inc/toxmgr.hxx b/sw/source/ui/inc/toxmgr.hxx
index ca5d93560d..b785ecf509 100644
--- a/sw/source/ui/inc/toxmgr.hxx
+++ b/sw/source/ui/inc/toxmgr.hxx
@@ -50,9 +50,9 @@ class SW_DLLPUBLIC SwTOXDescription
String* pTitle;
String* pTOUName;
SwForm* pForm;
- USHORT nContent;
- USHORT nIndexOptions;
- USHORT nOLEOptions;
+ sal_uInt16 nContent;
+ sal_uInt16 nIndexOptions;
+ sal_uInt16 nOLEOptions;
LanguageType eLanguage;
String sSortAlgorithm;
@@ -61,13 +61,13 @@ class SW_DLLPUBLIC SwTOXDescription
SwTOXSortKey eSortKey1;
SwTOXSortKey eSortKey2;
SwTOXSortKey eSortKey3;
- BYTE nLevel;
- BOOL bFromObjectNames : 1;
- BOOL bFromChapter : 1;
- BOOL bReadonly: 1;
- BOOL bLevelFromChapter : 1;
- BOOL bIsAuthSequence :1;
- BOOL bSortByDocument :1;
+ sal_uInt8 nLevel;
+ sal_Bool bFromObjectNames : 1;
+ sal_Bool bFromChapter : 1;
+ sal_Bool bReadonly: 1;
+ sal_Bool bLevelFromChapter : 1;
+ sal_Bool bIsAuthSequence :1;
+ sal_Bool bSortByDocument :1;
//TODO: TemplateNames
//const String* pTemplateName = 0, ???
@@ -90,12 +90,12 @@ public:
eLanguage((LanguageType)::GetAppLanguage()),
eCaptionDisplay(CAPTION_COMPLETE),
nLevel(MAXLEVEL),
- bFromObjectNames(FALSE),
- bFromChapter(FALSE),
- bReadonly(TRUE),
- bLevelFromChapter(FALSE),
- bIsAuthSequence(FALSE),
- bSortByDocument(TRUE)
+ bFromObjectNames(sal_False),
+ bFromChapter(sal_False),
+ bReadonly(sal_True),
+ bLevelFromChapter(sal_False),
+ bIsAuthSequence(sal_False),
+ bSortByDocument(sal_True)
{}
~SwTOXDescription()
{
@@ -107,9 +107,9 @@ public:
void SetTOXType(TOXTypes eSet) { eTOXType = eSet;}
TOXTypes GetTOXType() const { return eTOXType;}
- const String& GetStyleNames(USHORT nLvl) const
+ const String& GetStyleNames(sal_uInt16 nLvl) const
{return aStyleNames[nLvl];}
- void SetStyleNames(const String& rSet, USHORT nLvl)
+ void SetStyleNames(const String& rSet, sal_uInt16 nLvl)
{aStyleNames[nLvl] = rSet; }
const String& GetAutoMarkURL() const { return sAutoMarkURL;}
@@ -124,20 +124,20 @@ public:
void SetForm(const SwForm& rSet) {delete pForm; pForm = new SwForm(rSet);}
const SwForm* GetForm() const {return pForm;}
- void SetContentOptions(USHORT nSet) { nContent = nSet;}
- USHORT GetContentOptions() const { return nContent;}
+ void SetContentOptions(sal_uInt16 nSet) { nContent = nSet;}
+ sal_uInt16 GetContentOptions() const { return nContent;}
- void SetIndexOptions(USHORT nSet) { nIndexOptions = nSet;}
- USHORT GetIndexOptions() const { return nIndexOptions;}
+ void SetIndexOptions(sal_uInt16 nSet) { nIndexOptions = nSet;}
+ sal_uInt16 GetIndexOptions() const { return nIndexOptions;}
const String& GetMainEntryCharStyle() const {return sMainEntryCharStyle;}
void SetMainEntryCharStyle(const String& rSet) {sMainEntryCharStyle = rSet;}
- void SetLevel(BYTE nSet) {nLevel = nSet;}
- BYTE GetLevel()const {return nLevel; }
+ void SetLevel(sal_uInt8 nSet) {nLevel = nSet;}
+ sal_uInt8 GetLevel()const {return nLevel; }
- void SetCreateFromObjectNames(BOOL bSet) { bFromObjectNames = bSet;}
- BOOL IsCreateFromObjectNames() const {return bFromObjectNames;}
+ void SetCreateFromObjectNames(sal_Bool bSet) { bFromObjectNames = bSet;}
+ sal_Bool IsCreateFromObjectNames() const {return bFromObjectNames;}
const String& GetSequenceName() const {return sSequenceName;}
void SetSequenceName(const String& rSet) {sSequenceName = rSet;}
@@ -145,26 +145,26 @@ public:
SwCaptionDisplay GetCaptionDisplay() const { return eCaptionDisplay;}
void SetCaptionDisplay(SwCaptionDisplay eSet) {eCaptionDisplay = eSet;}
- void SetFromChapter(BOOL bSet) { bFromChapter = bSet;}
- BOOL IsFromChapter() const {return bFromChapter;}
+ void SetFromChapter(sal_Bool bSet) { bFromChapter = bSet;}
+ sal_Bool IsFromChapter() const {return bFromChapter;}
- void SetReadonly(BOOL bSet){bReadonly = bSet;}
- BOOL IsReadonly() const {return bReadonly;}
+ void SetReadonly(sal_Bool bSet){bReadonly = bSet;}
+ sal_Bool IsReadonly() const {return bReadonly;}
- USHORT GetOLEOptions() const {return nOLEOptions;}
- void SetOLEOptions(USHORT nOpt) {nOLEOptions = nOpt;}
+ sal_uInt16 GetOLEOptions() const {return nOLEOptions;}
+ void SetOLEOptions(sal_uInt16 nOpt) {nOLEOptions = nOpt;}
- BOOL IsLevelFromChapter() const {return bLevelFromChapter;}
- void SetLevelFromChapter(BOOL bSet) {bLevelFromChapter = bSet;}
+ sal_Bool IsLevelFromChapter() const {return bLevelFromChapter;}
+ void SetLevelFromChapter(sal_Bool bSet) {bLevelFromChapter = bSet;}
String GetAuthBrackets() const {return sAuthBrackets;}
void SetAuthBrackets(const String& rSet) {sAuthBrackets = rSet;}
- BOOL IsAuthSequence() const {return bIsAuthSequence;}
- void SetAuthSequence(BOOL bSet){bIsAuthSequence = bSet;}
+ sal_Bool IsAuthSequence() const {return bIsAuthSequence;}
+ void SetAuthSequence(sal_Bool bSet){bIsAuthSequence = bSet;}
- BOOL IsSortByDocument()const {return bSortByDocument ;}
- void SetSortByDocument(BOOL bSet) {bSortByDocument = bSet;}
+ sal_Bool IsSortByDocument()const {return bSortByDocument ;}
+ void SetSortByDocument(sal_Bool bSet) {bSortByDocument = bSet;}
void SetSortKeys(SwTOXSortKey eKey1,
SwTOXSortKey eKey2,
@@ -188,7 +188,7 @@ class SwTOXMarkDescription
{
TOXTypes eTOXType;
int nLevel;
- BOOL bMainEntry;
+ sal_Bool bMainEntry;
String* pPrimKey;
String* pSecKey;
@@ -209,7 +209,7 @@ public:
explicit SwTOXMarkDescription(TOXTypes eType) :
eTOXType(eType),
nLevel(0),
- bMainEntry(FALSE),
+ bMainEntry(sal_False),
pPrimKey(0),
pSecKey(0),
pAltStr(0),
@@ -235,8 +235,8 @@ public:
void SetLevel(int nSet) {nLevel = nSet;}
int GetLevel() const {return nLevel;}
- void SetMainEntry(BOOL bSet) {bMainEntry = bSet;}
- BOOL IsMainEntry() const {return bMainEntry;}
+ void SetMainEntry(sal_Bool bSet) {bMainEntry = bSet;}
+ sal_Bool IsMainEntry() const {return bMainEntry;}
void SetPrimKey(const String& rSet)
{delete pPrimKey; pPrimKey = new String(rSet);}
@@ -274,7 +274,7 @@ class SW_DLLPUBLIC SwTOXMgr
SwTOXMark* pCurTOXMark;
SwTOXMarks aCurMarks;
- SW_DLLPRIVATE USHORT GetUserTypeID(const String& rStr);
+ SW_DLLPRIVATE sal_uInt16 GetUserTypeID(const String& rStr);
public:
// single argument ctors shall be explicit.
@@ -289,22 +289,22 @@ public:
void DeleteTOXMark();
- void NextTOXMark(BOOL bSame=FALSE);
- void PrevTOXMark(BOOL bSame=FALSE);
+ void NextTOXMark(sal_Bool bSame=sal_False);
+ void PrevTOXMark(sal_Bool bSame=sal_False);
// Aktuelle TOXmarks holen
- USHORT GetTOXMarks();
- USHORT GetTOXMarkCount();
- SwTOXMark* GetTOXMark(USHORT nId);
+ sal_uInt16 GetTOXMarks();
+ sal_uInt16 GetTOXMarkCount();
+ SwTOXMark* GetTOXMark(sal_uInt16 nId);
SwTOXMark* GetCurTOXMark();
- void SetCurTOXMark(USHORT nId);
+ void SetCurTOXMark(sal_uInt16 nId);
//
// Methoden fuer Verzeichnisse
//
- BOOL UpdateOrInsertTOX(const SwTOXDescription& rDesc, SwTOXBase** ppBase = 0, const SfxItemSet* pSet = 0);
+ sal_Bool UpdateOrInsertTOX(const SwTOXDescription& rDesc, SwTOXBase** ppBase = 0, const SfxItemSet* pSet = 0);
- const SwTOXType* GetTOXType(TOXTypes eTyp, USHORT nId) const;
+ const SwTOXType* GetTOXType(TOXTypes eTyp, sal_uInt16 nId) const;
const SwTOXBase* GetCurTOX();
};
@@ -314,7 +314,7 @@ public:
Beschreibung: Inlines
--------------------------------------------------------------------*/
-inline USHORT SwTOXMgr::GetTOXMarkCount()
+inline sal_uInt16 SwTOXMgr::GetTOXMarkCount()
{ return aCurMarks.Count(); }
diff --git a/sw/source/ui/inc/uiborder.hxx b/sw/source/ui/inc/uiborder.hxx
index 239af9a741..87aacaecbd 100644
--- a/sw/source/ui/inc/uiborder.hxx
+++ b/sw/source/ui/inc/uiborder.hxx
@@ -41,7 +41,7 @@ public:
// SW_BORDER_MODE_TABLE
// SW_BORDER_MODE_FRAME
- SwBorderDlg(Window* pParent, SfxItemSet& rSet, USHORT nType);
+ SwBorderDlg(Window* pParent, SfxItemSet& rSet, sal_uInt16 nType);
~SwBorderDlg();
};
diff --git a/sw/source/ui/inc/uiitems.hxx b/sw/source/ui/inc/uiitems.hxx
index d430abb712..7ddccafccc 100644
--- a/sw/source/ui/inc/uiitems.hxx
+++ b/sw/source/ui/inc/uiitems.hxx
@@ -44,7 +44,7 @@ class SW_DLLPUBLIC SwPageFtnInfoItem : public SfxPoolItem
public:
- SwPageFtnInfoItem(const USHORT nId, SwPageFtnInfo& rInfo);
+ SwPageFtnInfoItem(const sal_uInt16 nId, SwPageFtnInfo& rInfo);
SwPageFtnInfoItem(const SwPageFtnInfoItem& rItem );
~SwPageFtnInfoItem();
@@ -56,8 +56,8 @@ public:
String &rText,
const IntlWrapper* pIntl = 0 ) const;
- virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
- virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
SwPageFtnInfo& GetPageFtnInfo() { return aFtnInfo; }
const SwPageFtnInfo& GetPageFtnInfo() const { return aFtnInfo; }
@@ -71,7 +71,7 @@ class SW_DLLPUBLIC SwPtrItem : public SfxPoolItem
void* pMisc;
public:
- SwPtrItem( const USHORT nId = FN_PARAM_GRF_DIALOG, void* pPtr = 0);
+ SwPtrItem( const sal_uInt16 nId = FN_PARAM_GRF_DIALOG, void* pPtr = 0);
SwPtrItem( const SwPtrItem& rItem );
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
@@ -88,15 +88,15 @@ class SW_DLLPUBLIC SwUINumRuleItem : public SfxPoolItem
SwNumRule* pRule;
public:
- SwUINumRuleItem( const SwNumRule& rRule, const USHORT = FN_PARAM_ACT_NUMBER);
+ SwUINumRuleItem( const SwNumRule& rRule, const sal_uInt16 = FN_PARAM_ACT_NUMBER);
SwUINumRuleItem( const SwUINumRuleItem& rItem );
virtual ~SwUINumRuleItem();
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
virtual int operator==( const SfxPoolItem& ) const;
- virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
- virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
const SwNumRule* GetNumRule() const { return pRule; }
SwNumRule* GetNumRule() { return pRule; }
@@ -108,7 +108,7 @@ public:
class SwBackgroundDestinationItem : public SfxUInt16Item
{
public:
- SwBackgroundDestinationItem(USHORT nWhich, USHORT nValue);
+ SwBackgroundDestinationItem(sal_uInt16 nWhich, sal_uInt16 nValue);
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
};
diff --git a/sw/source/ui/inc/uinums.hxx b/sw/source/ui/inc/uinums.hxx
index 38e18b1a8f..98be353c72 100644
--- a/sw/source/ui/inc/uinums.hxx
+++ b/sw/source/ui/inc/uinums.hxx
@@ -50,7 +50,7 @@ class SW_DLLPUBLIC SwNumRulesWithName
{
SwNumFmt aFmt;
String sCharFmtName;
- USHORT nCharPoolId;
+ sal_uInt16 nCharPoolId;
_SwNumFmtsAttrs aItems;
_SwNumFmtGlobal& operator=( const _SwNumFmtGlobal& );
@@ -58,7 +58,7 @@ class SW_DLLPUBLIC SwNumRulesWithName
public:
_SwNumFmtGlobal( const SwNumFmt& rFmt );
_SwNumFmtGlobal( const _SwNumFmtGlobal& );
- _SwNumFmtGlobal( SvStream&, USHORT nVersion );
+ _SwNumFmtGlobal( SvStream&, sal_uInt16 nVersion );
~_SwNumFmtGlobal();
void Store( SvStream& );
@@ -73,7 +73,7 @@ protected:
public:
SwNumRulesWithName(const SwNumRule &, const String &);
SwNumRulesWithName( const SwNumRulesWithName & );
- SwNumRulesWithName(SvStream &, USHORT nVersion);
+ SwNumRulesWithName(SvStream &, sal_uInt16 nVersion);
~SwNumRulesWithName();
const SwNumRulesWithName &operator=(const SwNumRulesWithName &);
@@ -93,11 +93,11 @@ public:
protected:
SwNumRulesWithName *pNumRules[ MAX_NUM_RULES ];
String sFileName;
- USHORT nVersion;
- BOOL bModified;
+ sal_uInt16 nVersion;
+ sal_Bool bModified;
virtual int Load(SvStream&);
- virtual BOOL Store(SvStream&);
+ virtual sal_Bool Store(SvStream&);
void Init();
@@ -105,10 +105,10 @@ public:
SwBaseNumRules(const String& rFileName);
virtual ~SwBaseNumRules();
- inline const SwNumRulesWithName* GetRules(USHORT nIdx) const;
+ inline const SwNumRulesWithName* GetRules(sal_uInt16 nIdx) const;
virtual void ApplyNumRules(
const SwNumRulesWithName &rCopy,
- USHORT nIdx);
+ sal_uInt16 nIdx);
};
@@ -123,11 +123,11 @@ public:
virtual ~SwChapterNumRules();
virtual void ApplyNumRules( const SwNumRulesWithName &rCopy,
- USHORT nIdx);
+ sal_uInt16 nIdx);
};
// INLINE METHODE --------------------------------------------------------
-inline const SwNumRulesWithName *SwBaseNumRules::GetRules(USHORT nIdx) const
+inline const SwNumRulesWithName *SwBaseNumRules::GetRules(sal_uInt16 nIdx) const
{
ASSERT(nIdx < nMaxRules, Array der NumRules ueberindiziert.);
return pNumRules[nIdx];
diff --git a/sw/source/ui/inc/uitool.hxx b/sw/source/ui/inc/uitool.hxx
index 702f3e18fc..732a735369 100644
--- a/sw/source/ui/inc/uitool.hxx
+++ b/sw/source/ui/inc/uitool.hxx
@@ -62,7 +62,7 @@ SW_DLLPUBLIC void MakeDefTabs(SwTwips nDefDist, SvxTabStopItem& rTabs);
//void EraseDefTabs(SvxTabStopItem& rTabs);
// Abstand zwischen dem 1. und zweitem Element ermitteln
-SW_DLLPUBLIC USHORT GetTabDist(const SvxTabStopItem& rTabs);
+SW_DLLPUBLIC sal_uInt16 GetTabDist(const SvxTabStopItem& rTabs);
// erfrage ob im Set eine Sfx-PageDesc-Kombination vorliegt
// und setze diesen im Set und loesche die Transport Items
@@ -70,23 +70,23 @@ SW_DLLPUBLIC USHORT GetTabDist(const SvxTabStopItem& rTabs);
void SwToSfxPageDescAttr( SfxItemSet& rSet );
void SfxToSwPageDescAttr( const SwWrtShell& rShell, SfxItemSet& rSet );
-SW_DLLPUBLIC FieldUnit GetDfltMetric(BOOL bWeb);
-void SetDfltMetric(FieldUnit eMetric, BOOL bWeb);
+SW_DLLPUBLIC FieldUnit GetDfltMetric(sal_Bool bWeb);
+void SetDfltMetric(FieldUnit eMetric, sal_Bool bWeb);
// ListBox mit allen Zeichenvorlagen fuellen - ausser Standard!
-SW_DLLPUBLIC void FillCharStyleListBox(ListBox& rToFill, SwDocShell* pDocSh, BOOL bSorted = FALSE, BOOL bWithDefault = FALSE);
+SW_DLLPUBLIC void FillCharStyleListBox(ListBox& rToFill, SwDocShell* pDocSh, sal_Bool bSorted = sal_False, sal_Bool bWithDefault = sal_False);
//inserts a string sorted into a ListBox,
-SW_DLLPUBLIC USHORT InsertStringSorted(const String& rEntry, ListBox& rToFill, USHORT nOffset);
+SW_DLLPUBLIC sal_uInt16 InsertStringSorted(const String& rEntry, ListBox& rToFill, sal_uInt16 nOffset);
// Tabellenbreite und Ausrichtung ermitteln
-SwTwips GetTableWidth( SwFrmFmt* pFmt, SwTabCols& rCols, USHORT *pPercent,
+SwTwips GetTableWidth( SwFrmFmt* pFmt, SwTabCols& rCols, sal_uInt16 *pPercent,
SwWrtShell* pSh );
String GetAppLangDateTimeString( const DateTime& );
// search for a command string withing the menu structure and execute it
// at the dispatcher if there is one, if executed return true
-bool ExecuteMenuCommand( PopupMenu& rMenu, SfxViewFrame& rViewFrame, USHORT nId );
+bool ExecuteMenuCommand( PopupMenu& rMenu, SfxViewFrame& rViewFrame, sal_uInt16 nId );
#endif // _UITOOL_HXX
diff --git a/sw/source/ui/inc/uivwimp.hxx b/sw/source/ui/inc/uivwimp.hxx
index ece0bd023f..daed04444c 100644
--- a/sw/source/ui/inc/uivwimp.hxx
+++ b/sw/source/ui/inc/uivwimp.hxx
@@ -93,7 +93,7 @@ public:
void ViewDestroyed() { pView = 0; }
- void AddRemoveListener( BOOL bAdd );
+ void AddRemoveListener( sal_Bool bAdd );
};
diff --git a/sw/source/ui/inc/unotools.hxx b/sw/source/ui/inc/unotools.hxx
index 007860d710..7f7367d7b5 100644
--- a/sw/source/ui/inc/unotools.hxx
+++ b/sw/source/ui/inc/unotools.hxx
@@ -121,7 +121,7 @@ public:
STAR_REFERENCE( frame::XController ) & GetController() {return _xController;}
STAR_REFERENCE( text::XTextCursor ) & GetTextCursor() {return _xCursor;}
- void ClearDocument( BOOL bStartTimer = FALSE );
+ void ClearDocument( sal_Bool bStartTimer = sal_False );
sal_Bool IsInitialized() const {return bIsInitialized;}
sal_Bool IsServiceAvailable() const {return bServiceAvailable;}
diff --git a/sw/source/ui/inc/unotxvw.hxx b/sw/source/ui/inc/unotxvw.hxx
index 4086201956..e4d3a73221 100644
--- a/sw/source/ui/inc/unotxvw.hxx
+++ b/sw/source/ui/inc/unotxvw.hxx
@@ -142,7 +142,7 @@ public:
//XServiceInfo
virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
- virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
//XTransferableSupplier
@@ -196,12 +196,12 @@ public:
//XTextCursor - neu
virtual void SAL_CALL collapseToStart( ) throw(::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL collapseToEnd( ) throw(::com::sun::star::uno::RuntimeException);
- virtual BOOL SAL_CALL isCollapsed( ) throw(::com::sun::star::uno::RuntimeException);
- virtual BOOL SAL_CALL goLeft( sal_Int16 nCount, BOOL bExpand ) throw(::com::sun::star::uno::RuntimeException);
- virtual BOOL SAL_CALL goRight( sal_Int16 nCount, BOOL bExpand ) throw(::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL gotoStart( BOOL bExpand ) throw(::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL gotoEnd( BOOL bExpand ) throw(::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL gotoRange( const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange >& xRange, BOOL bExpand ) throw(::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL isCollapsed( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL goLeft( sal_Int16 nCount, sal_Bool bExpand ) throw(::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL goRight( sal_Int16 nCount, sal_Bool bExpand ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL gotoStart( sal_Bool bExpand ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL gotoEnd( sal_Bool bExpand ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL gotoRange( const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange >& xRange, sal_Bool bExpand ) throw(::com::sun::star::uno::RuntimeException);
//XPageCursor
virtual sal_Bool SAL_CALL jumpToFirstPage(void) throw( ::com::sun::star::uno::RuntimeException );
@@ -253,7 +253,7 @@ public:
//XServiceInfo
virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
- virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId();
diff --git a/sw/source/ui/inc/usrpref.hxx b/sw/source/ui/inc/usrpref.hxx
index dfb5a3f778..75a5da36d1 100644
--- a/sw/source/ui/inc/usrpref.hxx
+++ b/sw/source/ui/inc/usrpref.hxx
@@ -41,11 +41,11 @@ class SwMasterUsrPref;
class SwContentViewConfig : public utl::ConfigItem
{
SwMasterUsrPref& rParent;
- BOOL bWeb;
+ sal_Bool bWeb;
com::sun::star::uno::Sequence<rtl::OUString> GetPropertyNames();
public:
- SwContentViewConfig(BOOL bWeb, SwMasterUsrPref& rParent);
+ SwContentViewConfig(sal_Bool bWeb, SwMasterUsrPref& rParent);
~SwContentViewConfig();
// utl::ConfigItem
@@ -61,11 +61,11 @@ class SwContentViewConfig : public utl::ConfigItem
class SwLayoutViewConfig : public utl::ConfigItem
{
SwMasterUsrPref& rParent;
- BOOL bWeb;
+ sal_Bool bWeb;
com::sun::star::uno::Sequence<rtl::OUString> GetPropertyNames();
public:
- SwLayoutViewConfig(BOOL bWeb, SwMasterUsrPref& rParent);
+ SwLayoutViewConfig(sal_Bool bWeb, SwMasterUsrPref& rParent);
~SwLayoutViewConfig();
virtual void Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& aPropertyNames );
@@ -79,11 +79,11 @@ class SwLayoutViewConfig : public utl::ConfigItem
class SwGridConfig : public utl::ConfigItem
{
SwMasterUsrPref& rParent;
- BOOL bWeb;
+ sal_Bool bWeb;
com::sun::star::uno::Sequence<rtl::OUString> GetPropertyNames();
public:
- SwGridConfig(BOOL bWeb, SwMasterUsrPref& rParent);
+ SwGridConfig(sal_Bool bWeb, SwMasterUsrPref& rParent);
~SwGridConfig();
virtual void Commit();
@@ -156,7 +156,7 @@ class SwMasterUsrPref : public SwViewOption
SwWebColorConfig* pWebColorConfig;
public:
- SwMasterUsrPref(BOOL bWeb);
+ SwMasterUsrPref(sal_Bool bWeb);
~SwMasterUsrPref();
void SetUsrPref(const SwViewOption &rCopy);
@@ -188,7 +188,7 @@ public:
}
sal_Int32 GetUpdateLinkMode() const {return nLinkUpdateMode; }
- void SetUpdateFields(BOOL bSet, sal_Bool bNoModify = sal_False)
+ void SetUpdateFields(sal_Bool bSet, sal_Bool bNoModify = sal_False)
{
if(bSet && eFldUpdateFlags == AUTOUPD_OFF)
{
@@ -213,7 +213,7 @@ public:
aContentConfig.SetModified();
}
- void SetUpdateCharts(BOOL bSet, sal_Bool bNoModify = sal_False)
+ void SetUpdateCharts(sal_Bool bSet, sal_Bool bNoModify = sal_False)
{
if(bSet)
{
diff --git a/sw/source/ui/inc/view.hxx b/sw/source/ui/inc/view.hxx
index 6e30851d86..7ad42b5d81 100644
--- a/sw/source/ui/inc/view.hxx
+++ b/sw/source/ui/inc/view.hxx
@@ -146,15 +146,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;
}
@@ -180,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;
@@ -203,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.
@@ -251,19 +251,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,
@@ -289,14 +289,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();
@@ -311,31 +311,31 @@ class SW_DLLPUBLIC SwView: public SfxViewShell
inline long GetYScroll() const;
SW_DLLPRIVATE Point AlignToPixel(const Point& rPt) const;
SW_DLLPRIVATE void CalcPt( Point* pPt,const Rectangle& rRect,
- USHORT nRangeX = USHRT_MAX,
- USHORT nRangeY = USHRT_MAX);
+ sal_uInt16 nRangeX = USHRT_MAX,
+ sal_uInt16 nRangeY = USHRT_MAX);
- SW_DLLPRIVATE BOOL GetPageScrollUpOffset(SwTwips& rOff) const;
- SW_DLLPRIVATE BOOL GetPageScrollDownOffset(SwTwips& rOff) const;
+ SW_DLLPRIVATE sal_Bool GetPageScrollUpOffset(SwTwips& rOff) const;
+ SW_DLLPRIVATE sal_Bool GetPageScrollDownOffset(SwTwips& rOff) const;
// Scrollbar Movements
SW_DLLPRIVATE long PageUp();
SW_DLLPRIVATE long PageDown();
- SW_DLLPRIVATE long PageUpCrsr(BOOL bSelect);
- SW_DLLPRIVATE long PageDownCrsr(BOOL bSelect);
+ SW_DLLPRIVATE long PageUpCrsr(sal_Bool bSelect);
+ SW_DLLPRIVATE long PageDownCrsr(sal_Bool bSelect);
SW_DLLPRIVATE long PhyPageUp();
SW_DLLPRIVATE long PhyPageDown();
- SW_DLLPRIVATE int _CreateScrollbar( BOOL bHori );
+ SW_DLLPRIVATE int _CreateScrollbar( sal_Bool bHori );
SW_DLLPRIVATE DECL_LINK( ScrollHdl, SwScrollbar * );
SW_DLLPRIVATE DECL_LINK( EndScrollHdl, SwScrollbar * );
- SW_DLLPRIVATE BOOL UpdateScrollbars();
+ SW_DLLPRIVATE sal_Bool UpdateScrollbars();
SW_DLLPRIVATE void CalcVisArea( const Size &rPixelSz );
- SW_DLLPRIVATE void CreatePageButtons(BOOL bShow);
+ SW_DLLPRIVATE void CreatePageButtons(sal_Bool bShow);
// Linguistik-Funktionen
SW_DLLPRIVATE void HyphenateDocument();
- SW_DLLPRIVATE BOOL IsDrawTextHyphenate();
+ SW_DLLPRIVATE sal_Bool IsDrawTextHyphenate();
SW_DLLPRIVATE void HyphenateDrawText();
SW_DLLPRIVATE void StartThesaurus();
@@ -343,17 +343,17 @@ class SW_DLLPUBLIC SwView: public SfxViewShell
SW_DLLPRIVATE void StartTextConversion( LanguageType nSourceLang, LanguageType nTargetLang, const Font *pTargetFont, sal_Int32 nOptions, sal_Bool bIsInteractive );
// used for spell checking and text conversion
- SW_DLLPRIVATE void SpellStart( SvxSpellArea eSpell, BOOL bStartDone,
- BOOL bEndDone, SwConversionArgs *pConvArgs = 0 );
+ SW_DLLPRIVATE void SpellStart( SvxSpellArea eSpell, sal_Bool bStartDone,
+ sal_Bool bEndDone, SwConversionArgs *pConvArgs = 0 );
SW_DLLPRIVATE void SpellEnd( SwConversionArgs *pConvArgs = 0 );
SW_DLLPRIVATE void HyphStart( SvxSpellArea eSpell );
- SW_DLLPRIVATE BOOL CheckSpecialCntnt();
- SW_DLLPRIVATE void SpellKontext(BOOL bOn = TRUE)
+ SW_DLLPRIVATE sal_Bool CheckSpecialCntnt();
+ SW_DLLPRIVATE void SpellKontext(sal_Bool bOn = sal_True)
{ bCenterCrsr = bOn; bAllwaysShowSel = bOn; }
// Methoden fuers Printing
- SW_DLLPRIVATE virtual SfxPrinter* GetPrinter( BOOL bCreate = FALSE );
+ SW_DLLPRIVATE virtual SfxPrinter* GetPrinter( sal_Bool bCreate = sal_False );
SfxTabPage* CreatePrintOptionsPage( Window* pParent,
const SfxItemSet& rSet);
// fuer Readonly-Umschaltung
@@ -367,14 +367,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:
@@ -391,8 +391,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;
@@ -403,7 +403,7 @@ protected:
void SetLastTblFrmFmt(const SwFrmFmt* pSet) {pLastTableFormat = pSet;}
// form letter execution
- void GenerateFormLetter(BOOL bUseCurrentDocument);
+ void GenerateFormLetter(sal_Bool bUseCurrentDocument);
using SfxShell::GetDispatcher;
@@ -418,20 +418,20 @@ public:
void GotFocus() const;
virtual SdrView* GetDrawView() const;
virtual sal_Bool HasUIFeature( sal_uInt32 nFeature );
- virtual void ShowCursor( FASTBOOL bOn = TRUE );
+ virtual void ShowCursor( FASTBOOL bOn = sal_True );
virtual ErrCode DoVerb( long nVerb );
- virtual USHORT SetPrinter( SfxPrinter* pNew,
- USHORT nDiff = SFX_PRINTER_ALL, bool bIsAPI=false);
+ virtual sal_uInt16 SetPrinter( SfxPrinter* pNew,
+ sal_uInt16 nDiff = SFX_PRINTER_ALL, bool bIsAPI=false);
ShellModes GetShellMode();
com::sun::star::view::XSelectionSupplier* GetUNOObject();
- String GetSelectionTextParam( BOOL bCompleteWords,
- BOOL bEraseTrail );
- virtual BOOL HasSelection( BOOL bText ) const;
- virtual String GetSelectionText( BOOL bCompleteWords = FALSE );
- virtual USHORT PrepareClose( BOOL bUI = TRUE, BOOL bForBrowsing = FALSE );
+ String GetSelectionTextParam( sal_Bool bCompleteWords,
+ sal_Bool bEraseTrail );
+ virtual sal_Bool HasSelection( sal_Bool bText ) const;
+ virtual String GetSelectionText( sal_Bool bCompleteWords = sal_False );
+ virtual sal_uInt16 PrepareClose( sal_Bool bUI = sal_True, sal_Bool bForBrowsing = sal_False );
virtual void MarginChanged();
// replace word/selection with text from the thesaurus
@@ -458,58 +458,58 @@ public:
inline const Rectangle& GetVisArea() const { return aVisArea; }
- BOOL IsScroll(const Rectangle& rRect) const;
+ sal_Bool IsScroll(const Rectangle& rRect) const;
void Scroll( const Rectangle& rRect,
- USHORT nRangeX = USHRT_MAX,
- USHORT nRangeY = USHRT_MAX);
+ sal_uInt16 nRangeX = USHRT_MAX,
+ sal_uInt16 nRangeY = USHRT_MAX);
long SetVScrollMax(long lMax);
long SetHScrollMax(long lMax);
DECL_LINK( SpellError, LanguageType * );
- BOOL ExecSpellPopup( const Point& rPt );
- BOOL ExecFieldPopup( const Point& rPt, sw::mark::IFieldmark *fieldBM );
+ sal_Bool ExecSpellPopup( const Point& rPt );
+ sal_Bool ExecFieldPopup( const Point& rPt, sw::mark::IFieldmark *fieldBM );
// SMARTTAGS
- BOOL ExecSmartTagPopup( const Point& rPt );
+ sal_Bool ExecSmartTagPopup( const Point& rPt );
DECL_LINK( OnlineSpellCallback, SpellCallbackInfo*);
- BOOL ExecDrwTxtSpellPopup(const Point& rPt);
+ sal_Bool ExecDrwTxtSpellPopup(const Point& rPt);
void SetTabColFromDocPos( const Point &rPt ) { aTabColFromDocPos = rPt; }
- void SetTabColFromDoc( BOOL b ) { bTabColFromDoc = b; }
- BOOL IsTabColFromDoc() const { return bTabColFromDoc; }
- void SetTabRowFromDoc( BOOL b ) { bTabRowFromDoc = b; }
- BOOL IsTabRowFromDoc() const { return bTabRowFromDoc; }
+ void SetTabColFromDoc( sal_Bool b ) { bTabColFromDoc = b; }
+ sal_Bool IsTabColFromDoc() const { return bTabColFromDoc; }
+ void SetTabRowFromDoc( sal_Bool b ) { bTabRowFromDoc = b; }
+ sal_Bool IsTabRowFromDoc() const { return bTabRowFromDoc; }
// -> #i23726#
void SetNumRuleNodeFromDoc( SwTxtNode * pNumRuleNode )
{ pNumRuleNodeFromDoc = pNumRuleNode; }
- void SetNumIndentFromDoc(BOOL b) { bNumIndentFromDoc = b; }
- BOOL IsNumIndentFromDoc() const { return NULL != pNumRuleNodeFromDoc; }
+ void SetNumIndentFromDoc(sal_Bool b) { bNumIndentFromDoc = b; }
+ sal_Bool IsNumIndentFromDoc() const { return NULL != pNumRuleNodeFromDoc; }
// <- #i23726#
void DocSzChgd( const Size& rNewSize );
const Size& GetDocSz() const { return aDocSz; }
- virtual void SetVisArea( const Rectangle&, BOOL bUpdateScrollbar = TRUE);
- void SetVisArea( const Point&, BOOL bUpdateScrollbar = TRUE);
+ virtual void SetVisArea( const Rectangle&, sal_Bool bUpdateScrollbar = sal_True);
+ void SetVisArea( const Point&, sal_Bool bUpdateScrollbar = sal_True);
void CheckVisArea();
static LAYOUT_NS Dialog* GetSearchDialog();
- static USHORT GetMoveType();
- static void SetMoveType(USHORT nSet);
+ static sal_uInt16 GetMoveType();
+ static void SetMoveType(sal_uInt16 nSet);
DECL_STATIC_LINK( SwView, MoveNavigationHdl, bool* ); // #i75416#
static void SetActMark(sal_Int32 nSet);
- BOOL HandleWheelCommands( const CommandEvent& );
+ sal_Bool HandleWheelCommands( const CommandEvent& );
// Rahmen einfuegen
- void InsFrmMode(USHORT nCols);
+ void InsFrmMode(sal_uInt16 nCols);
- void SetZoom( SvxZoomType eZoomType, short nFactor = 100, BOOL bViewOnly = FALSE);
+ void SetZoom( SvxZoomType eZoomType, short nFactor = 100, sal_Bool bViewOnly = sal_False);
virtual void SetZoomFactor( const Fraction &rX, const Fraction & );
- void SetViewLayout( USHORT nColumns, bool bBookMode, BOOL bViewOnly = FALSE );
+ void SetViewLayout( sal_uInt16 nColumns, bool bBookMode, sal_Bool bViewOnly = sal_False );
void ShowHScrollbar(sal_Bool bShow);
sal_Bool IsHScrollbarVisible()const;
@@ -548,7 +548,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 &);
@@ -559,24 +559,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&);
@@ -589,13 +589,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; }
@@ -607,32 +607,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);
@@ -658,9 +658,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 );
@@ -689,7 +689,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 cc1c7a9c42..3100fb6685 100644
--- a/sw/source/ui/inc/viewlayoutctrl.hxx
+++ b/sw/source/ui/inc/viewlayoutctrl.hxx
@@ -44,12 +44,12 @@ public:
SFX_DECL_STATUSBAR_CONTROL();
- SwViewLayoutControl( USHORT nSlotId, USHORT nId, StatusBar& rStb );
+ SwViewLayoutControl( sal_uInt16 nSlotId, sal_uInt16 nId, StatusBar& rStb );
~SwViewLayoutControl();
- virtual void StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pState );
+ virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState );
virtual void Paint( const UserDrawEvent& rEvt );
- virtual BOOL MouseButtonDown( const MouseEvent & );
+ virtual sal_Bool MouseButtonDown( const MouseEvent & );
};
#endif
diff --git a/sw/source/ui/inc/workctrl.hxx b/sw/source/ui/inc/workctrl.hxx
index f6f878aa15..009a3f0461 100644
--- a/sw/source/ui/inc/workctrl.hxx
+++ b/sw/source/ui/inc/workctrl.hxx
@@ -70,20 +70,20 @@ class SwView;
class SwTbxInsertCtrl : public SfxToolBoxControl
{
- USHORT nLastSlotId;
+ sal_uInt16 nLastSlotId;
using SfxToolBoxControl::Select;
- virtual void Select( BOOL bMod1 = FALSE );
+ virtual void Select( sal_Bool bMod1 = sal_False );
public:
SFX_DECL_TOOLBOX_CONTROL();
- SwTbxInsertCtrl( USHORT nSlotId, USHORT nId, ToolBox& rTbx );
+ SwTbxInsertCtrl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx );
~SwTbxInsertCtrl();
virtual SfxPopupWindowType GetPopupWindowType() const;
virtual SfxPopupWindow* CreatePopupWindow();
- virtual void StateChanged( USHORT nSID,
+ virtual void StateChanged( sal_uInt16 nSID,
SfxItemState eState,
const SfxPoolItem* pState );
@@ -104,12 +104,12 @@ class SwTbxAutoTextCtrl : public SfxToolBoxControl
public:
SFX_DECL_TOOLBOX_CONTROL();
- SwTbxAutoTextCtrl( USHORT nSlotId, USHORT nId, ToolBox& rTbx );
+ SwTbxAutoTextCtrl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx );
~SwTbxAutoTextCtrl();
virtual SfxPopupWindowType GetPopupWindowType() const;
virtual SfxPopupWindow* CreatePopupWindow();
- virtual void StateChanged( USHORT nSID,
+ virtual void StateChanged( sal_uInt16 nSID,
SfxItemState eState,
const SfxPoolItem* pState );
@@ -141,8 +141,8 @@ class SwScrollNaviPopup : public SfxPopupWindow
String sQuickHelp[2 * NID_COUNT];
- USHORT nFwdId;
- USHORT nBackId;
+ sal_uInt16 nFwdId;
+ sal_uInt16 nBackId;
void ApplyImageList();
@@ -153,10 +153,10 @@ protected:
virtual void DataChanged( const DataChangedEvent& rDCEvt );
public:
- SwScrollNaviPopup( USHORT nId, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame );
+ SwScrollNaviPopup( sal_uInt16 nId, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame );
~SwScrollNaviPopup();
- static String GetQuickHelpText(BOOL bNext);
+ static String GetQuickHelpText(sal_Bool bNext);
virtual SfxPopupWindow* Clone() const;
void GrabFocus(){aToolBox.GrabFocus();}
@@ -194,9 +194,9 @@ class SwNaviImageButton : public ImageButton
class SwHlpImageButton : public ImageButton
{
- BOOL bUp;
+ sal_Bool bUp;
public:
- SwHlpImageButton(Window* pParent, const ResId& rResId, BOOL bUpBtn) :
+ SwHlpImageButton(Window* pParent, const ResId& rResId, sal_Bool bUpBtn) :
ImageButton(pParent, rResId), bUp(bUpBtn){}
virtual void RequestHelp( const HelpEvent& rHEvt );
@@ -210,10 +210,10 @@ class SwPreviewZoomControl : public SfxToolBoxControl
public:
SFX_DECL_TOOLBOX_CONTROL();
- SwPreviewZoomControl( USHORT nSlotId, USHORT nId, ToolBox& rTbx );
+ SwPreviewZoomControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx );
~SwPreviewZoomControl();
- virtual void StateChanged( USHORT nSID,
+ virtual void StateChanged( sal_uInt16 nSID,
SfxItemState eState,
const SfxPoolItem* pState );
diff --git a/sw/source/ui/inc/wrap.hxx b/sw/source/ui/inc/wrap.hxx
index 16bda288f8..52db2f62cd 100644
--- a/sw/source/ui/inc/wrap.hxx
+++ b/sw/source/ui/inc/wrap.hxx
@@ -55,7 +55,7 @@ class SwWrapDlg : public SfxSingleTabDialog
SwWrtShell* pWrtShell;
public:
- SwWrapDlg(Window* pParent, SfxItemSet& rSet, SwWrtShell* pSh, BOOL bDrawMode);
+ SwWrapDlg(Window* pParent, SfxItemSet& rSet, SwWrtShell* pSh, sal_Bool bDrawMode);
~SwWrapDlg();
inline SwWrtShell* GetWrtShell() { return pWrtShell; }
@@ -99,22 +99,22 @@ class SwWrapTabPage: public SfxTabPage
ImageList aWrapIL;
ImageList aWrapILH;
- USHORT nOldLeftMargin;
- USHORT nOldRightMargin;
- USHORT nOldUpperMargin;
- USHORT nOldLowerMargin;
+ sal_uInt16 nOldLeftMargin;
+ sal_uInt16 nOldRightMargin;
+ sal_uInt16 nOldUpperMargin;
+ sal_uInt16 nOldLowerMargin;
RndStdIds nAnchorId;
- USHORT nHtmlMode;
+ sal_uInt16 nHtmlMode;
Size aFrmSize;
SwWrtShell* pWrtSh;
- BOOL bFormat;
- BOOL bNew;
- BOOL bHtmlMode;
- BOOL bDrawMode;
- BOOL bContourImage;
+ sal_Bool bFormat;
+ sal_Bool bNew;
+ sal_Bool bHtmlMode;
+ sal_Bool bDrawMode;
+ sal_Bool bContourImage;
SwWrapTabPage(Window *pParent, const SfxItemSet &rSet);
~SwWrapTabPage();
@@ -136,12 +136,12 @@ public:
static SfxTabPage *Create(Window *pParent, const SfxItemSet &rSet);
- virtual BOOL FillItemSet(SfxItemSet &rSet);
+ virtual sal_Bool FillItemSet(SfxItemSet &rSet);
virtual void Reset(const SfxItemSet &rSet);
- static USHORT* GetRanges();
- inline void SetNewFrame(BOOL bNewFrame) { bNew = bNewFrame; }
- inline void SetFormatUsed(BOOL bFmt, BOOL bDrw) { bFormat = bFmt;
+ static sal_uInt16* GetRanges();
+ inline void SetNewFrame(sal_Bool bNewFrame) { bNew = bNewFrame; }
+ inline void SetFormatUsed(sal_Bool bFmt, sal_Bool bDrw) { bFormat = bFmt;
bDrawMode = bDrw; }
inline void SetShell(SwWrtShell* pSh) { pWrtSh = pSh; }
};
diff --git a/sw/source/ui/inc/wrtsh.hxx b/sw/source/ui/inc/wrtsh.hxx
index f7f423a440..f1e82a1d4c 100644
--- a/sw/source/ui/inc/wrtsh.hxx
+++ b/sw/source/ui/inc/wrtsh.hxx
@@ -106,7 +106,7 @@ public:
using SwEditShell::Insert;
- typedef long (SwWrtShell::*SELECTFUNC)(const Point *, BOOL bProp );
+ typedef long (SwWrtShell::*SELECTFUNC)(const Point *, sal_Bool bProp );
SELECTFUNC fnDrag;
SELECTFUNC fnSetCrsr;
@@ -114,160 +114,160 @@ public:
SELECTFUNC fnKillSel;
// Alle Selektionen aufheben
- long ResetSelect( const Point *, BOOL );
+ long ResetSelect( const Point *, sal_Bool );
//setzt den Cursorstack nach dem Bewegen mit PageUp/-Down
//zurueck, falls ein Stack aufgebaut ist
inline void ResetCursorStack();
SelectionType GetSelectionType() const;
- BOOL IsModePushed() const { return 0 != pModeStack; }
+ sal_Bool IsModePushed() const { return 0 != pModeStack; }
void PushMode();
void PopMode();
void SttSelect();
void EndSelect();
- BOOL IsInSelect() const { return bInSelect; }
- void SetInSelect(BOOL bSel = TRUE) { bInSelect = bSel; }
+ sal_Bool IsInSelect() const { return bInSelect; }
+ void SetInSelect(sal_Bool bSel = sal_True) { bInSelect = bSel; }
// Liegt eine Text- oder Rahmenselektion vor?
- BOOL HasSelection() const { return SwCrsrShell::HasSelection() ||
+ sal_Bool HasSelection() const { return SwCrsrShell::HasSelection() ||
IsMultiSelection() || IsSelFrmMode() || IsObjSelected(); }
- BOOL Pop( BOOL bOldCrsr = TRUE );
+ sal_Bool Pop( sal_Bool bOldCrsr = sal_True );
void EnterStdMode();
- BOOL IsStdMode() const { return !bExtMode && !bAddMode && !bBlockMode; }
+ sal_Bool IsStdMode() const { return !bExtMode && !bAddMode && !bBlockMode; }
void EnterExtMode();
void LeaveExtMode();
long ToggleExtMode();
- BOOL IsExtMode() const { return bExtMode; }
+ sal_Bool IsExtMode() const { return bExtMode; }
void EnterAddMode();
void LeaveAddMode();
long ToggleAddMode();
- BOOL IsAddMode() const { return bAddMode; }
+ sal_Bool IsAddMode() const { return bAddMode; }
void EnterBlockMode();
void LeaveBlockMode();
long ToggleBlockMode();
- BOOL IsBlockMode() const { return bBlockMode; }
+ sal_Bool IsBlockMode() const { return bBlockMode; }
- void SetInsMode( BOOL bOn = TRUE );
+ void SetInsMode( sal_Bool bOn = sal_True );
void ToggleInsMode() { SetInsMode( !bIns ); }
- BOOL IsInsMode() const { return bIns; }
- void SetRedlineModeAndCheckInsMode( USHORT eMode );
+ sal_Bool IsInsMode() const { return bIns; }
+ void SetRedlineModeAndCheckInsMode( sal_uInt16 eMode );
void EnterSelFrmMode(const Point *pStartDrag = 0);
void LeaveSelFrmMode();
- BOOL IsSelFrmMode() const { return bLayoutMode; }
+ sal_Bool IsSelFrmMode() const { return bLayoutMode; }
// Selektion von Rahmen aufheben
void UnSelectFrm();
void Invalidate();
// Tabellenzellen selektieren fuer Bearbeiten von Formeln in der Ribbonbar
- inline void SelTblCells( const Link &rLink, BOOL bMark = TRUE );
+ inline void SelTblCells( const Link &rLink, sal_Bool bMark = sal_True );
inline void EndSelTblCells();
//Wortweisen oder zeilenweisen Selektionsmodus verlassen. Wird
//in der Regel in MB-Up gerufen.
- BOOL IsExtSel() const { return bSelWrd || bSelLn; }
+ sal_Bool IsExtSel() const { return bSelWrd || bSelLn; }
// erfrage, ob der akt. fnDrag - Pointer auf BeginDrag gesetzt ist
// Wird fuer MouseMove gebraucht, um die Bugs 55592/55931 zu umgehen.
- inline BOOL Is_FnDragEQBeginDrag() const;
+ inline sal_Bool Is_FnDragEQBeginDrag() const;
//Basisabfragen
- BOOL IsInWrd() { return IsInWord(); }
- BOOL IsSttWrd() { return IsStartWord(); }
- BOOL IsEndWrd();
- BOOL IsSttOfPara() const { return IsSttPara(); }
- BOOL IsEndOfPara() const { return IsEndPara(); }
+ sal_Bool IsInWrd() { return IsInWord(); }
+ sal_Bool IsSttWrd() { return IsStartWord(); }
+ sal_Bool IsEndWrd();
+ sal_Bool IsSttOfPara() const { return IsSttPara(); }
+ sal_Bool IsEndOfPara() const { return IsEndPara(); }
//Word bzw. Satz selektieren.
- BOOL SelNearestWrd();
- BOOL SelWrd (const Point * = 0, BOOL bProp=FALSE );
+ sal_Bool SelNearestWrd();
+ sal_Bool SelWrd (const Point * = 0, sal_Bool bProp=sal_False );
// --> FME 2004-07-30 #i32329# Enhanced selection
- void SelSentence (const Point * = 0, BOOL bProp=FALSE );
- void SelPara (const Point * = 0, BOOL bProp=FALSE );
+ void SelSentence (const Point * = 0, sal_Bool bProp=sal_False );
+ void SelPara (const Point * = 0, sal_Bool bProp=sal_False );
// <--
long SelAll();
//Basiscursortravelling
-typedef BOOL (SwWrtShell:: *FNSimpleMove)();
- BOOL SimpleMove( FNSimpleMove, BOOL bSelect );
-
- BOOL Left ( USHORT nMode, BOOL bSelect,
- USHORT nCount, BOOL bBasicCall, BOOL bVisual = FALSE );
- BOOL Right ( USHORT nMode, BOOL bSelect,
- USHORT nCount, BOOL bBasicCall, BOOL bVisual = FALSE );
- BOOL Up ( BOOL bSelect = FALSE, USHORT nCount = 1,
- BOOL bBasicCall = FALSE );
- BOOL Down ( BOOL bSelect = FALSE, USHORT nCount = 1,
- BOOL bBasicCall = FALSE );
- BOOL NxtWrd ( BOOL bSelect = FALSE ) { return SimpleMove( &SwWrtShell::_NxtWrd, bSelect ); }
- BOOL PrvWrd ( BOOL bSelect = FALSE ) { return SimpleMove( &SwWrtShell::_PrvWrd, bSelect ); }
-
- BOOL LeftMargin ( BOOL bSelect, BOOL bBasicCall );
- BOOL RightMargin( BOOL bSelect, BOOL bBasicCall );
-
- BOOL SttDoc ( BOOL bSelect = FALSE );
- BOOL EndDoc ( BOOL bSelect = FALSE );
-
- BOOL SttNxtPg ( BOOL bSelect = FALSE );
- BOOL SttPrvPg ( BOOL bSelect = FALSE );
- BOOL EndNxtPg ( BOOL bSelect = FALSE );
- BOOL EndPrvPg ( BOOL bSelect = FALSE );
- BOOL SttPg ( BOOL bSelect = FALSE );
- BOOL EndPg ( BOOL bSelect = FALSE );
- BOOL SttPara ( BOOL bSelect = FALSE );
- BOOL EndPara ( BOOL bSelect = FALSE );
- BOOL FwdPara ( BOOL bSelect = FALSE )
+typedef sal_Bool (SwWrtShell:: *FNSimpleMove)();
+ sal_Bool SimpleMove( FNSimpleMove, sal_Bool bSelect );
+
+ sal_Bool Left ( sal_uInt16 nMode, sal_Bool bSelect,
+ sal_uInt16 nCount, sal_Bool bBasicCall, sal_Bool bVisual = sal_False );
+ sal_Bool Right ( sal_uInt16 nMode, sal_Bool bSelect,
+ sal_uInt16 nCount, sal_Bool bBasicCall, sal_Bool bVisual = sal_False );
+ sal_Bool Up ( sal_Bool bSelect = sal_False, sal_uInt16 nCount = 1,
+ sal_Bool bBasicCall = sal_False );
+ sal_Bool Down ( sal_Bool bSelect = sal_False, sal_uInt16 nCount = 1,
+ sal_Bool bBasicCall = sal_False );
+ sal_Bool NxtWrd ( sal_Bool bSelect = sal_False ) { return SimpleMove( &SwWrtShell::_NxtWrd, bSelect ); }
+ sal_Bool PrvWrd ( sal_Bool bSelect = sal_False ) { return SimpleMove( &SwWrtShell::_PrvWrd, bSelect ); }
+
+ sal_Bool LeftMargin ( sal_Bool bSelect, sal_Bool bBasicCall );
+ sal_Bool RightMargin( sal_Bool bSelect, sal_Bool bBasicCall );
+
+ sal_Bool SttDoc ( sal_Bool bSelect = sal_False );
+ sal_Bool EndDoc ( sal_Bool bSelect = sal_False );
+
+ sal_Bool SttNxtPg ( sal_Bool bSelect = sal_False );
+ sal_Bool SttPrvPg ( sal_Bool bSelect = sal_False );
+ sal_Bool EndNxtPg ( sal_Bool bSelect = sal_False );
+ sal_Bool EndPrvPg ( sal_Bool bSelect = sal_False );
+ sal_Bool SttPg ( sal_Bool bSelect = sal_False );
+ sal_Bool EndPg ( sal_Bool bSelect = sal_False );
+ sal_Bool SttPara ( sal_Bool bSelect = sal_False );
+ sal_Bool EndPara ( sal_Bool bSelect = sal_False );
+ sal_Bool FwdPara ( sal_Bool bSelect = sal_False )
{ return SimpleMove( &SwWrtShell::_FwdPara, bSelect ); }
- BOOL BwdPara ( BOOL bSelect = FALSE )
+ sal_Bool BwdPara ( sal_Bool bSelect = sal_False )
{ return SimpleMove( &SwWrtShell::_BwdPara, bSelect ); }
- BOOL FwdSentence( BOOL bSelect = FALSE )
+ sal_Bool FwdSentence( sal_Bool bSelect = sal_False )
{ return SimpleMove( &SwWrtShell::_FwdSentence, bSelect ); }
- BOOL BwdSentence( BOOL bSelect = FALSE )
+ sal_Bool BwdSentence( sal_Bool bSelect = sal_False )
{ return SimpleMove( &SwWrtShell::_BwdSentence, bSelect ); }
// --> FME 2004-07-30 #i20126# Enhanced table selection
- BOOL SelectTableRowCol( const Point& rPt, const Point* pEnd = 0, bool bRowDrag = false );
+ sal_Bool SelectTableRowCol( const Point& rPt, const Point* pEnd = 0, bool bRowDrag = false );
// <--
- BOOL SelectTableRow();
- BOOL SelectTableCol();
- BOOL SelectTableCell();
+ sal_Bool SelectTableRow();
+ sal_Bool SelectTableCol();
+ sal_Bool SelectTableCell();
- BOOL SelectTxtAttr( USHORT nWhich, const SwTxtAttr* pAttr = 0 );
+ sal_Bool SelectTxtAttr( sal_uInt16 nWhich, const SwTxtAttr* pAttr = 0 );
// Spaltenweise Spruenge
- BOOL StartOfColumn ( BOOL bSelect = FALSE );
- BOOL EndOfColumn ( BOOL bSelect = FALSE );
- BOOL StartOfNextColumn ( BOOL bSelect = FALSE );
- BOOL EndOfNextColumn ( BOOL bSelect = FALSE );
- BOOL StartOfPrevColumn ( BOOL bSelect = FALSE );
- BOOL EndOfPrevColumn ( BOOL bSelect = FALSE );
+ sal_Bool StartOfColumn ( sal_Bool bSelect = sal_False );
+ sal_Bool EndOfColumn ( sal_Bool bSelect = sal_False );
+ sal_Bool StartOfNextColumn ( sal_Bool bSelect = sal_False );
+ sal_Bool EndOfNextColumn ( sal_Bool bSelect = sal_False );
+ sal_Bool StartOfPrevColumn ( sal_Bool bSelect = sal_False );
+ sal_Bool EndOfPrevColumn ( sal_Bool bSelect = sal_False );
// setze den Cursor auf die Seite "nPage" an den Anfang
// zusaetzlich zu der gleichnamigen Implementierung in crsrsh.hxx
// werden hier alle bestehenden Selektionen vor dem Setzen des
// Cursors aufgehoben
- BOOL GotoPage( USHORT nPage, BOOL bRecord );
+ sal_Bool GotoPage( sal_uInt16 nPage, sal_Bool bRecord );
//setzen des Cursors; merken der alten Position fuer Zurueckblaettern.
DECL_LINK( ExecFlyMac, void * );
- BOOL PageCrsr(SwTwips lOffset, BOOL bSelect);
+ sal_Bool PageCrsr(SwTwips lOffset, sal_Bool bSelect);
// Felder Update
- void UpdateInputFlds( SwInputFieldList* pLst = 0, BOOL bOnlyInSel = FALSE );
+ void UpdateInputFlds( SwInputFieldList* pLst = 0, sal_Bool bOnlyInSel = sal_False );
- void NoEdit(BOOL bHideCrsr = TRUE);
+ void NoEdit(sal_Bool bHideCrsr = sal_True);
void Edit();
- BOOL IsNoEdit() const { return bNoEdit; }
+ sal_Bool IsNoEdit() const { return bNoEdit; }
- BOOL IsRetainSelection() const { return mbRetainSelection; }
- void SetRetainSelection( BOOL bRet ) { mbRetainSelection = bRet; }
+ sal_Bool IsRetainSelection() const { return mbRetainSelection; }
+ void SetRetainSelection( sal_Bool bRet ) { mbRetainSelection = bRet; }
// change current data base and notify
void ChgDBData(const SwDBData& SwDBData);
@@ -279,7 +279,7 @@ typedef BOOL (SwWrtShell:: *FNSimpleMove)();
long DelLeft();
// loescht auch Rahmen bzw. setzt den Cursor in den Rahmen,
- // wenn bDelFrm == FALSE ist
+ // wenn bDelFrm == sal_False ist
long DelRight();
long DelToEndOfPara();
long DelToStartOfPara();
@@ -298,7 +298,7 @@ typedef BOOL (SwWrtShell:: *FNSimpleMove)();
WORD_SPACE_AFTER = 2,
WORD_NO_SPACE = 3
};
- int IntelligentCut(int nSelectionType, BOOL bCut = TRUE);
+ int IntelligentCut(int nSelectionType, sal_Bool bCut = sal_True);
// Editieren
void Insert(SwField &);
@@ -306,28 +306,28 @@ typedef BOOL (SwWrtShell:: *FNSimpleMove)();
// Graphic
void Insert( const String &rPath, const String &rFilter,
const Graphic &, SwFlyFrmAttrMgr * = 0,
- BOOL bRule = FALSE );
+ sal_Bool bRule = sal_False );
void InsertByWord( const String & );
- void InsertPageBreak(const String *pPageDesc = 0, USHORT nPgNum = 0 );
+ void InsertPageBreak(const String *pPageDesc = 0, sal_uInt16 nPgNum = 0 );
void InsertLineBreak();
void InsertColumnBreak();
- void InsertFootnote(const String &, BOOL bEndNote = FALSE, BOOL bEdit = TRUE );
- void SplitNode( BOOL bAutoFormat = FALSE, BOOL bCheckTableStart = TRUE );
- BOOL CanInsert();
+ void InsertFootnote(const String &, sal_Bool bEndNote = sal_False, sal_Bool bEdit = sal_True );
+ void SplitNode( sal_Bool bAutoFormat = sal_False, sal_Bool bCheckTableStart = sal_True );
+ sal_Bool CanInsert();
// Verzeichnisse
void InsertTableOf(const SwTOXBase& rTOX, const SfxItemSet* pSet = 0);
- BOOL UpdateTableOf(const SwTOXBase& rTOX, const SfxItemSet* pSet = 0);
+ sal_Bool UpdateTableOf(const SwTOXBase& rTOX, const SfxItemSet* pSet = 0);
// Numerierung und Bullets
/**
Turns on numbering or bullets.
- @param bNum TRUE: turn on numbering
- FALSE: turn on bullets
+ @param bNum sal_True: turn on numbering
+ sal_False: turn on bullets
*/
- void NumOrBulletOn(BOOL bNum); // #i29560#
+ void NumOrBulletOn(sal_Bool bNum); // #i29560#
void NumOrBulletOff(); // #i29560#
void NumOn();
void BulletOn();
@@ -336,12 +336,12 @@ typedef BOOL (SwWrtShell:: *FNSimpleMove)();
void InsertObject( /*SvInPlaceObjectRef *pObj, */ // != 0 fuer Clipboard
const svt::EmbeddedObjectRef&,
SvGlobalName *pName = 0, // != 0 entspr. Object erzeugen.
- BOOL bActivate = TRUE,
- USHORT nSlotId = 0); // SlotId fuer Dialog
+ sal_Bool bActivate = sal_True,
+ sal_uInt16 nSlotId = 0); // SlotId fuer Dialog
- BOOL InsertOleObject( const svt::EmbeddedObjectRef& xObj, SwFlyFrmFmt **pFlyFrmFmt = 0 );
+ sal_Bool InsertOleObject( const svt::EmbeddedObjectRef& xObj, SwFlyFrmFmt **pFlyFrmFmt = 0 );
void LaunchOLEObj( long nVerb = 0 ); // Server starten
- BOOL IsOLEObj() const { return GetCntType() == CNT_OLE;}
+ sal_Bool IsOLEObj() const { return GetCntType() == CNT_OLE;}
virtual void MoveObjectIfActive( svt::EmbeddedObjectRef& xObj, const Point& rOffset );
virtual void CalcAndSetScale( svt::EmbeddedObjectRef& xObj,
const SwRect *pFlyPrtRect = 0,
@@ -364,32 +364,32 @@ typedef BOOL (SwWrtShell:: *FNSimpleMove)();
void SetPageStyle(const String &rCollName);
- String GetCurPageStyle( const BOOL bCalcFrm = TRUE ) const;
+ String GetCurPageStyle( const sal_Bool bCalcFrm = sal_True ) const;
// Aktuelle Vorlage anhand der geltenden Attribute aendern
void QuickUpdateStyle();
enum DoType { UNDO, REDO, REPEAT };
- void Do( DoType eDoType, USHORT nCnt = 1 );
+ void Do( DoType eDoType, sal_uInt16 nCnt = 1 );
String GetDoString( DoType eDoType ) const;
String GetRepeatString() const;
- USHORT GetDoStrings( DoType eDoType, SfxStringListItem& rStrLstItem ) const;
+ sal_uInt16 GetDoStrings( DoType eDoType, SfxStringListItem& rStrLstItem ) const;
//Suchen oder Ersetzen
- ULONG SearchPattern(const com::sun::star::util::SearchOptions& rSearchOpt,
- BOOL bSearchInNotes,
+ sal_uLong SearchPattern(const com::sun::star::util::SearchOptions& rSearchOpt,
+ sal_Bool bSearchInNotes,
SwDocPositions eStart, SwDocPositions eEnde,
FindRanges eFlags = FND_IN_BODY,
- int bReplace = FALSE );
+ int bReplace = sal_False );
- ULONG SearchTempl (const String &rTempl,
+ sal_uLong SearchTempl (const String &rTempl,
SwDocPositions eStart, SwDocPositions eEnde,
FindRanges eFlags = FND_IN_BODY,
const String* pReplTempl = 0 );
- ULONG SearchAttr (const SfxItemSet& rFindSet,
- BOOL bNoColls,
+ sal_uLong SearchAttr (const SfxItemSet& rFindSet,
+ sal_Bool bNoColls,
SwDocPositions eStart,SwDocPositions eEnde,
FindRanges eFlags = FND_IN_BODY,
const com::sun::star::util::SearchOptions* pSearchOpt = 0,
@@ -399,30 +399,30 @@ typedef BOOL (SwWrtShell:: *FNSimpleMove)();
// Aktion vor Cursorbewegung
// Hebt gfs. Selektionen auf, triggert Timer und GCAttr()
- void MoveCrsr( BOOL bWithSelect = FALSE );
+ void MoveCrsr( sal_Bool bWithSelect = sal_False );
// Eingabefelder updaten
- BOOL StartInputFldDlg(SwField*, BOOL bNextButton, Window* pParentWin = 0, ByteString* pWindowState = 0);
+ sal_Bool StartInputFldDlg(SwField*, sal_Bool bNextButton, Window* pParentWin = 0, ByteString* pWindowState = 0);
// update DropDown fields
- BOOL StartDropDownFldDlg(SwField*, BOOL bNextButton, ByteString* pWindowState = 0);
+ sal_Bool StartDropDownFldDlg(SwField*, sal_Bool bNextButton, ByteString* pWindowState = 0);
//"Handler" fuer Anederungen an der DrawView - fuer Controls.
virtual void DrawSelChanged( );
// springe zum Bookmark und setze die "Selections-Flags" wieder richtig
- BOOL GotoMark( const ::sw::mark::IMark* const pMark );
- BOOL GotoMark( const ::sw::mark::IMark* const pMark, BOOL bSelect, BOOL bStart );
- BOOL GotoMark( const ::rtl::OUString& rName );
- BOOL GoNextBookmark(); // TRUE, wenn's noch eine gab
- BOOL GoPrevBookmark();
+ sal_Bool GotoMark( const ::sw::mark::IMark* const pMark );
+ sal_Bool GotoMark( const ::sw::mark::IMark* const pMark, sal_Bool bSelect, sal_Bool bStart );
+ sal_Bool GotoMark( const ::rtl::OUString& rName );
+ sal_Bool GoNextBookmark(); // sal_True, wenn's noch eine gab
+ sal_Bool GoPrevBookmark();
bool GotoFieldmark(::sw::mark::IFieldmark const * const pMark);
- BOOL GotoField( const SwFmtFld& rFld );
+ sal_Bool GotoField( const SwFmtFld& rFld );
// jump to the next / previous hyperlink - inside text and also
// on graphics
- BOOL SelectNextPrevHyperlink( BOOL bNext = TRUE );
+ sal_Bool SelectNextPrevHyperlink( sal_Bool bNext = sal_True );
// Zugehoerige SwView ermitteln
const SwView& GetView() const { return rView; }
@@ -431,23 +431,23 @@ typedef BOOL (SwWrtShell:: *FNSimpleMove)();
//Weil es sonst keiner macht, gibt es hier eine ExecMacro()
void ExecMacro( const SvxMacro& rMacro, String* pRet = 0, SbxArray* pArgs = 0 );
// rufe ins dunkle Basic/JavaScript
- USHORT CallEvent( USHORT nEvent, const SwCallMouseEvent& rCallEvent,
- BOOL bCheckPtr = FALSE, SbxArray* pArgs = 0,
+ sal_uInt16 CallEvent( sal_uInt16 nEvent, const SwCallMouseEvent& rCallEvent,
+ sal_Bool bCheckPtr = sal_False, SbxArray* pArgs = 0,
const Link* pCallBack = 0 );
// ein Klick aus das angegebene Feld. Der Cursor steht auf diesem.
// Fuehre die vor definierten Aktionen aus.
void ClickToField( const SwField& rFld );
- void ClickToINetAttr( const SwFmtINetFmt& rItem, USHORT nFilter = URLLOAD_NOFILTER );
- BOOL ClickToINetGrf( const Point& rDocPt, USHORT nFilter = URLLOAD_NOFILTER );
- inline BOOL IsInClickToEdit() const ;
+ void ClickToINetAttr( const SwFmtINetFmt& rItem, sal_uInt16 nFilter = URLLOAD_NOFILTER );
+ sal_Bool ClickToINetGrf( const Point& rDocPt, sal_uInt16 nFilter = URLLOAD_NOFILTER );
+ inline sal_Bool IsInClickToEdit() const ;
// fall ein URL-Button selektiert ist, dessen URL returnen, ansonsten
// einen LeerString
- BOOL GetURLFromButton( String& rURL, String& rDescr ) const;
+ sal_Bool GetURLFromButton( String& rURL, String& rDescr ) const;
void NavigatorPaste( const NaviContentBookmark& rBkmk,
- const USHORT nAction );
+ const sal_uInt16 nAction );
// die Core erzeugt eine Selektion, das SttSelect muss gerufen werden
virtual void NewCoreSelection();
@@ -467,14 +467,14 @@ typedef BOOL (SwWrtShell:: *FNSimpleMove)();
const SwViewOption *pViewOpt = 0);
virtual ~SwWrtShell();
- BOOL TryRemoveIndent(); // #i23725#
+ sal_Bool TryRemoveIndent(); // #i23725#
String GetSelDescr() const;
private:
SW_DLLPRIVATE void OpenMark();
- SW_DLLPRIVATE void CloseMark( BOOL bOkFlag );
+ SW_DLLPRIVATE void CloseMark( sal_Bool bOkFlag );
SW_DLLPRIVATE String GetWrdDelim();
SW_DLLPRIVATE String GetSDelim();
@@ -483,11 +483,11 @@ private:
struct ModeStack
{
ModeStack *pNext;
- BOOL bAdd,
+ sal_Bool bAdd,
bBlock,
bExt,
bIns;
- ModeStack(ModeStack *pNextMode, BOOL _bIns, BOOL _bExt, BOOL _bAdd, BOOL _bBlock):
+ ModeStack(ModeStack *pNextMode, sal_Bool _bIns, sal_Bool _bExt, sal_Bool _bAdd, sal_Bool _bBlock):
pNext(pNextMode),
bAdd(_bAdd),
bBlock(_bBlock),
@@ -508,11 +508,11 @@ private:
{
Point aDocPos;
CrsrStack *pNext;
- BOOL bValidCurPos : 1;
- BOOL bIsFrmSel : 1;
+ sal_Bool bValidCurPos : 1;
+ sal_Bool bIsFrmSel : 1;
SwTwips lOffset;
- CrsrStack( BOOL bValid, BOOL bFrmSel, const Point &rDocPos,
+ CrsrStack( sal_Bool bValid, sal_Bool bFrmSel, const Point &rDocPos,
SwTwips lOff, CrsrStack *pN )
: aDocPos(rDocPos),
pNext(pN),
@@ -529,39 +529,39 @@ private:
SwView &rView;
Point aDest;
- BOOL bDestOnStack;
- BOOL HasCrsrStack() const { return 0 != pCrsrStack; }
- SW_DLLPRIVATE BOOL PushCrsr(SwTwips lOffset, BOOL bSelect);
- SW_DLLPRIVATE BOOL PopCrsr(BOOL bUpdate, BOOL bSelect = FALSE);
+ sal_Bool bDestOnStack;
+ sal_Bool HasCrsrStack() const { return 0 != pCrsrStack; }
+ SW_DLLPRIVATE sal_Bool PushCrsr(SwTwips lOffset, sal_Bool bSelect);
+ SW_DLLPRIVATE sal_Bool PopCrsr(sal_Bool bUpdate, sal_Bool bSelect = sal_False);
// ENDE Cursor bei PageUp / -Down mitnehmen
- SW_DLLPRIVATE BOOL _SttWrd();
- SW_DLLPRIVATE BOOL _EndWrd();
- SW_DLLPRIVATE BOOL _NxtWrd();
- SW_DLLPRIVATE BOOL _PrvWrd();
+ SW_DLLPRIVATE sal_Bool _SttWrd();
+ SW_DLLPRIVATE sal_Bool _EndWrd();
+ SW_DLLPRIVATE sal_Bool _NxtWrd();
+ SW_DLLPRIVATE sal_Bool _PrvWrd();
// --> OD 2008-08-06 #i92468#
- SW_DLLPRIVATE BOOL _NxtWrdForDelete();
- SW_DLLPRIVATE BOOL _PrvWrdForDelete();
+ SW_DLLPRIVATE sal_Bool _NxtWrdForDelete();
+ SW_DLLPRIVATE sal_Bool _PrvWrdForDelete();
// <--
- SW_DLLPRIVATE BOOL _FwdSentence();
- SW_DLLPRIVATE BOOL _BwdSentence();
- BOOL _FwdPara();
- SW_DLLPRIVATE BOOL _BwdPara();
+ SW_DLLPRIVATE sal_Bool _FwdSentence();
+ SW_DLLPRIVATE sal_Bool _BwdSentence();
+ sal_Bool _FwdPara();
+ SW_DLLPRIVATE sal_Bool _BwdPara();
// Selektionen
- BOOL bIns :1;
- BOOL bInSelect :1;
- BOOL bExtMode :1;
- BOOL bAddMode :1;
- BOOL bBlockMode :1;
- BOOL bLayoutMode :1;
- BOOL bNoEdit :1;
- BOOL bCopy :1;
- BOOL bSelWrd :1;
- BOOL bSelLn :1;
- BOOL bIsInClickToEdit:1;
- BOOL bClearMark :1; // Selektion fuer ChartAutoPilot nicht loeschen
- BOOL mbRetainSelection :1; // Do not remove selections
+ sal_Bool bIns :1;
+ sal_Bool bInSelect :1;
+ sal_Bool bExtMode :1;
+ sal_Bool bAddMode :1;
+ sal_Bool bBlockMode :1;
+ sal_Bool bLayoutMode :1;
+ sal_Bool bNoEdit :1;
+ sal_Bool bCopy :1;
+ sal_Bool bSelWrd :1;
+ sal_Bool bSelLn :1;
+ sal_Bool bIsInClickToEdit:1;
+ sal_Bool bClearMark :1; // Selektion fuer ChartAutoPilot nicht loeschen
+ sal_Bool mbRetainSelection :1; // Do not remove selections
Point aStart;
Link aSelTblLink;
@@ -574,37 +574,37 @@ private:
SW_DLLPRIVATE void SttDragDrop(Timer *);
using SwCrsrShell::SetCrsr;
- SW_DLLPRIVATE long SetCrsr(const Point *, BOOL bProp=FALSE );
+ SW_DLLPRIVATE long SetCrsr(const Point *, sal_Bool bProp=sal_False );
- SW_DLLPRIVATE long SetCrsrKillSel(const Point *, BOOL bProp=FALSE );
+ SW_DLLPRIVATE long SetCrsrKillSel(const Point *, sal_Bool bProp=sal_False );
- SW_DLLPRIVATE long StdSelect(const Point *, BOOL bProp=FALSE );
- SW_DLLPRIVATE long BeginDrag(const Point *, BOOL bProp=FALSE );
- SW_DLLPRIVATE long Drag(const Point *, BOOL bProp=FALSE );
- SW_DLLPRIVATE long EndDrag(const Point *, BOOL bProp=FALSE );
+ SW_DLLPRIVATE long StdSelect(const Point *, sal_Bool bProp=sal_False );
+ SW_DLLPRIVATE long BeginDrag(const Point *, sal_Bool bProp=sal_False );
+ SW_DLLPRIVATE long Drag(const Point *, sal_Bool bProp=sal_False );
+ SW_DLLPRIVATE long EndDrag(const Point *, sal_Bool bProp=sal_False );
- SW_DLLPRIVATE long ExtSelWrd(const Point *, BOOL bProp=FALSE );
- SW_DLLPRIVATE long ExtSelLn(const Point *, BOOL bProp=FALSE );
+ SW_DLLPRIVATE long ExtSelWrd(const Point *, sal_Bool bProp=sal_False );
+ SW_DLLPRIVATE long ExtSelLn(const Point *, sal_Bool bProp=sal_False );
//Verschieben von Text aus Drag and Drop; Point ist
//Destination fuer alle Selektionen.
- SW_DLLPRIVATE long MoveText(const Point *, BOOL bProp=FALSE );
+ SW_DLLPRIVATE long MoveText(const Point *, sal_Bool bProp=sal_False );
- SW_DLLPRIVATE long BeginFrmDrag(const Point *, BOOL bProp=FALSE );
+ SW_DLLPRIVATE long BeginFrmDrag(const Point *, sal_Bool bProp=sal_False );
//nach SSize/Move eines Frames Update; Point ist Destination.
- SW_DLLPRIVATE long UpdateLayoutFrm(const Point *, BOOL bProp=FALSE );
+ SW_DLLPRIVATE long UpdateLayoutFrm(const Point *, sal_Bool bProp=sal_False );
- SW_DLLPRIVATE long SttLeaveSelect(const Point *, BOOL bProp=FALSE );
- SW_DLLPRIVATE long AddLeaveSelect(const Point *, BOOL bProp=FALSE );
- SW_DLLPRIVATE long Ignore(const Point *, BOOL bProp=FALSE );
+ SW_DLLPRIVATE long SttLeaveSelect(const Point *, sal_Bool bProp=sal_False );
+ SW_DLLPRIVATE long AddLeaveSelect(const Point *, sal_Bool bProp=sal_False );
+ SW_DLLPRIVATE long Ignore(const Point *, sal_Bool bProp=sal_False );
- SW_DLLPRIVATE void LeaveExtSel() { bSelWrd = bSelLn = FALSE;}
- SW_DLLPRIVATE BOOL _CanInsert();
+ SW_DLLPRIVATE void LeaveExtSel() { bSelWrd = bSelLn = sal_False;}
+ SW_DLLPRIVATE sal_Bool _CanInsert();
- SW_DLLPRIVATE BOOL GoStart(BOOL KeepArea = FALSE, BOOL * = 0,
- BOOL bSelect = FALSE, BOOL bDontMoveRegion = FALSE);
- SW_DLLPRIVATE BOOL GoEnd(BOOL KeepArea = FALSE, BOOL * = 0);
+ SW_DLLPRIVATE sal_Bool GoStart(sal_Bool KeepArea = sal_False, sal_Bool * = 0,
+ sal_Bool bSelect = sal_False, sal_Bool bDontMoveRegion = sal_False);
+ SW_DLLPRIVATE sal_Bool GoEnd(sal_Bool KeepArea = sal_False, sal_Bool * = 0);
enum BookMarkMove
{
@@ -614,7 +614,7 @@ private:
BOOKMARK_LAST_LAST_ENTRY
};
- SW_DLLPRIVATE BOOL MoveBookMark(BookMarkMove eFuncId, const ::sw::mark::IMark* const pMark=NULL);
+ SW_DLLPRIVATE sal_Bool MoveBookMark(BookMarkMove eFuncId, const ::sw::mark::IMark* const pMark=NULL);
};
inline void SwWrtShell::ResetCursorStack()
@@ -623,27 +623,27 @@ inline void SwWrtShell::ResetCursorStack()
_ResetCursorStack();
}
-inline void SwWrtShell::SelTblCells(const Link &rLink, BOOL bMark )
+inline void SwWrtShell::SelTblCells(const Link &rLink, sal_Bool bMark )
{
- SetSelTblCells( TRUE );
+ SetSelTblCells( sal_True );
bClearMark = bMark;
aSelTblLink = rLink;
}
inline void SwWrtShell::EndSelTblCells()
{
- SetSelTblCells( FALSE );
- bClearMark = TRUE;
+ SetSelTblCells( sal_False );
+ bClearMark = sal_True;
}
-inline BOOL SwWrtShell::IsInClickToEdit() const { return bIsInClickToEdit; }
+inline sal_Bool SwWrtShell::IsInClickToEdit() const { return bIsInClickToEdit; }
-inline BOOL SwWrtShell::Is_FnDragEQBeginDrag() const
+inline sal_Bool SwWrtShell::Is_FnDragEQBeginDrag() const
{
#ifdef GCC
SELECTFUNC fnTmp = &SwWrtShell::BeginDrag;
return fnDrag == fnTmp;
#else
- return sal::static_int_cast< BOOL >(fnDrag == &SwWrtShell::BeginDrag);
+ return sal::static_int_cast< sal_Bool >(fnDrag == &SwWrtShell::BeginDrag);
#endif
}
diff --git a/sw/source/ui/inc/zoomctrl.hxx b/sw/source/ui/inc/zoomctrl.hxx
index 53a36d6dcc..59a17bad46 100644
--- a/sw/source/ui/inc/zoomctrl.hxx
+++ b/sw/source/ui/inc/zoomctrl.hxx
@@ -35,13 +35,13 @@ private:
String sPreviewZoom;
public:
virtual void Command( const CommandEvent& rCEvt );
- virtual void StateChanged( USHORT nSID, SfxItemState eState,
+ virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState,
const SfxPoolItem* pState );
virtual void Paint( const UserDrawEvent& rEvt );
SFX_DECL_STATUSBAR_CONTROL();
- SwZoomControl( USHORT nSlotId, USHORT nId, StatusBar& rStb );
+ SwZoomControl( sal_uInt16 nSlotId, sal_uInt16 nId, StatusBar& rStb );
~SwZoomControl();
};
diff --git a/sw/source/ui/index/cntex.cxx b/sw/source/ui/index/cntex.cxx
index 6eb78b7da8..3bc9565217 100644
--- a/sw/source/ui/index/cntex.cxx
+++ b/sw/source/ui/index/cntex.cxx
@@ -119,13 +119,13 @@ void lcl_SetProp( uno::Reference< XPropertySetInfo > & xInfo,
}
void lcl_SetProp( uno::Reference< XPropertySetInfo > & xInfo,
uno::Reference< XPropertySet > & xProps,
- USHORT nId, const String& rValue)
+ sal_uInt16 nId, const String& rValue)
{
lcl_SetProp( xInfo, xProps, SW_PROP_NAME_STR(nId), rValue);
}
void lcl_SetProp( uno::Reference< XPropertySetInfo > & xInfo,
uno::Reference< XPropertySet > & xProps,
- USHORT nId, sal_Int16 nValue )
+ sal_uInt16 nId, sal_Int16 nValue )
{
OUString uPropName(C2U(SW_PROP_NAME_STR(nId)));
if(xInfo->hasPropertyByName(uPropName))
@@ -139,7 +139,7 @@ void lcl_SetProp( uno::Reference< XPropertySetInfo > & xInfo,
void lcl_SetBOOLProp(
uno::Reference< beans::XPropertySetInfo > & xInfo,
uno::Reference< beans::XPropertySet > & xProps,
- USHORT nId, sal_Bool bValue )
+ sal_uInt16 nId, sal_Bool bValue )
{
OUString uPropName(C2U(SW_PROP_NAME_STR(nId)));
if(xInfo->hasPropertyByName(uPropName))
@@ -159,7 +159,7 @@ IMPL_LINK( SwMultiTOXTabDialog, CreateExample_Hdl, void*, EMPTYARG )
SwXTextDocument* pDoc = reinterpret_cast<SwXTextDocument*>(xDocTunnel->getSomething(SwXTextDocument::getUnoTunnelId()));
if( pDoc )
- pDoc->GetDocShell()->_LoadStyles( *rSh.GetView().GetDocShell(), TRUE );
+ pDoc->GetDocShell()->_LoadStyles( *rSh.GetView().GetDocShell(), sal_True );
uno::Reference< lang::XMultiServiceFactory > xFact(
xModel, uno::UNO_QUERY);
@@ -251,7 +251,7 @@ void SwMultiTOXTabDialog::CreateOrUpdateExample(
if(xSectPr.is())
{
- BOOL bTemp = i == nTOXIndex;
+ sal_Bool bTemp = i == nTOXIndex;
aVal.setValue(&bTemp, ::getBooleanCppuType());
xSectPr->setPropertyValue(uIsVisible, aVal);
}
@@ -421,7 +421,7 @@ void SwMultiTOXTabDialog::CreateOrUpdateExample(
if(TOKEN_TAB_STOP == aToken.eTokenType)
{
pPropValArr[2].Name = C2U("TabStopRightAligned");
- BOOL bTemp = SVX_TAB_ADJUST_END == aToken.eTabAlign;
+ sal_Bool bTemp = SVX_TAB_ADJUST_END == aToken.eTabAlign;
pPropValArr[2].Value.setValue(&bTemp, ::getBooleanCppuType());
pPropValArr[3].Name = C2U("TabStopFillCharacter");
pPropValArr[3].Value <<= OUString(aToken.cTabFillChar);
diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx
index b8ba8bb65a..87ec19bca1 100644
--- a/sw/source/ui/index/cnttab.cxx
+++ b/sw/source/ui/index/cnttab.cxx
@@ -233,7 +233,7 @@ public:
sal_Bool IsModified()const;
- virtual String GetCellText( long nRow, USHORT nColumn ) const;
+ virtual String GetCellText( long nRow, sal_uInt16 nColumn ) const;
};
class SwAutoMarkDlg_Impl : public ModalDialog
@@ -536,7 +536,7 @@ SwTOXDescription* SwMultiTOXTabDialog::CreateTOXDescFromTOXBase(
pDesc->SetIndexOptions(pCurTOX->GetOptions());
pDesc->SetMainEntryCharStyle(pCurTOX->GetMainEntryCharStyle());
if(pDesc->GetTOXType() != TOX_INDEX)
- pDesc->SetLevel((BYTE)pCurTOX->GetLevel());
+ pDesc->SetLevel((sal_uInt8)pCurTOX->GetLevel());
pDesc->SetCreateFromObjectNames(pCurTOX->IsFromObjectNames());
pDesc->SetSequenceName(pCurTOX->GetSequenceName());
pDesc->SetCaptionDisplay(pCurTOX->GetCaptionDisplay());
@@ -571,7 +571,7 @@ IMPL_LINK( SwMultiTOXTabDialog, ShowPreviewHdl, CheckBox *, pBox )
SvtPathOptions aOpt;
// 6.0 (extension .sxw)
- BOOL bExist = aOpt.SearchFile( sTemplate, SvtPathOptions::PATH_TEMPLATE );
+ sal_Bool bExist = aOpt.SearchFile( sTemplate, SvtPathOptions::PATH_TEMPLATE );
#ifndef MAC_WITHOUT_EXT
if( !bExist )
@@ -674,7 +674,7 @@ long SwIndexTreeLB::GetTabPos( SvLBoxEntry* pEntry, SvLBoxTab* pTab)
long nData = (long)pEntry->GetUserData();
if(nData != USHRT_MAX)
{
- long nPos = pHeaderBar->GetItemRect( static_cast< USHORT >(101 + nData) ).TopLeft().X();
+ long nPos = pHeaderBar->GetItemRect( static_cast< sal_uInt16 >(101 + nData) ).TopLeft().X();
nData = nPos;
}
else
@@ -1022,7 +1022,7 @@ SwTOXSelectTabPage::SwTOXSelectTabPage(Window* pParent, const SfxItemSet& rAttrS
pIndexEntryWrapper = new IndexEntrySupplierWrapper();
aLanguageLB.SetLanguageList( LANG_LIST_ALL | LANG_LIST_ONLY_KNOWN,
- FALSE, FALSE, FALSE );
+ sal_False, sal_False, sal_False );
sAddStyleContent = aAddStylesCB.GetText();
@@ -1246,7 +1246,7 @@ void SwTOXSelectTabPage::ApplyTOXDescription()
aFromObjectNamesRB.Check(rDesc.IsCreateFromObjectNames());
aFromCaptionsRB.Check(!rDesc.IsCreateFromObjectNames());
aCaptionSequenceLB.SelectEntry(rDesc.GetSequenceName());
- aDisplayTypeLB.SelectEntryPos( static_cast< USHORT >(rDesc.GetCaptionDisplay()) );
+ aDisplayTypeLB.SelectEntryPos( static_cast< sal_uInt16 >(rDesc.GetCaptionDisplay()) );
RadioButtonHdl(&aFromCaptionsRB);
}
@@ -1277,11 +1277,11 @@ void SwTOXSelectTabPage::ApplyTOXDescription()
LanguageHdl(0);
for( long nCnt = 0; nCnt < aSortAlgorithmLB.GetEntryCount(); ++nCnt )
{
- const String* pEntryData = (const String*)aSortAlgorithmLB.GetEntryData( (USHORT)nCnt );
+ const String* pEntryData = (const String*)aSortAlgorithmLB.GetEntryData( (sal_uInt16)nCnt );
DBG_ASSERT(pEntryData, "no entry data available");
if( pEntryData && *pEntryData == rDesc.GetSortAlgorithm())
{
- aSortAlgorithmLB.SelectEntryPos( (USHORT)nCnt );
+ aSortAlgorithmLB.SelectEntryPos( (sal_uInt16)nCnt );
break;
}
}
@@ -1360,7 +1360,7 @@ void SwTOXSelectTabPage::FillTOXDescription()
nOLEData |= nData;
}
}
- rDesc.SetOLEOptions((USHORT)nOLEData);
+ rDesc.SetOLEOptions((sal_uInt16)nOLEData);
}
break;
case TOX_AUTHORITIES:
@@ -1385,7 +1385,7 @@ void SwTOXSelectTabPage::FillTOXDescription()
rDesc.SetContentOptions(nContentOptions);
rDesc.SetIndexOptions(nIndexOptions);
- rDesc.SetLevel( static_cast< BYTE >(aLevelNF.GetValue()) );
+ rDesc.SetLevel( static_cast< sal_uInt8 >(aLevelNF.GetValue()) );
rDesc.SetReadonly(aReadOnlyCB.IsChecked());
@@ -1655,16 +1655,16 @@ IMPL_LINK(SwTOXSelectTabPage, LanguageHdl, ListBox*, pBox)
if( 0 != (pUserData = aSortAlgorithmLB.GetEntryData( aSortAlgorithmLB.GetSelectEntryPos())) )
sOldString = *(String*)pUserData;
void* pDel;
- USHORT nEnd = aSortAlgorithmLB.GetEntryCount();
- for( USHORT n = 0; n < nEnd; ++n )
+ sal_uInt16 nEnd = aSortAlgorithmLB.GetEntryCount();
+ for( sal_uInt16 n = 0; n < nEnd; ++n )
if( 0 != ( pDel = aSortAlgorithmLB.GetEntryData( n )) )
delete (String*)pDel;
aSortAlgorithmLB.Clear();
- USHORT nInsPos;
+ sal_uInt16 nInsPos;
String sAlg, sUINm;
- nEnd = static_cast< USHORT >(aSeq.getLength());
- for( USHORT nCnt = 0; nCnt < nEnd; ++nCnt )
+ nEnd = static_cast< sal_uInt16 >(aSeq.getLength());
+ for( sal_uInt16 nCnt = 0; nCnt < nEnd; ++nCnt )
{
sUINm = pIndexRes->GetTranslation( sAlg = aSeq[ nCnt ] );
nInsPos = aSortAlgorithmLB.InsertEntry( sUINm );
@@ -2019,7 +2019,7 @@ void SwIdxTreeListBox::RequestHelp( const HelpEvent& rHEvt )
SvLBoxEntry* pEntry = GetEntry( aPos );
if( pEntry )
{
- USHORT nLevel = static_cast< USHORT >(GetModel()->GetAbsPos(pEntry));
+ sal_uInt16 nLevel = static_cast< sal_uInt16 >(GetModel()->GetAbsPos(pEntry));
String sEntry = pParent->GetLevelHelp(++nLevel);
if('*' == sEntry)
sEntry = GetEntryText(pEntry);
@@ -2178,7 +2178,7 @@ SwTOXEntryTabPage::SwTOXEntryTabPage(Window* pParent, const SfxItemSet& rAttrSet
aCommaSeparatedCB.SetClickHdl(LINK(this, SwTOXEntryTabPage, ModifyHdl));
aRelToStyleCB.SetClickHdl(LINK(this, SwTOXEntryTabPage, ModifyHdl));
- FieldUnit aMetric = ::GetDfltMetric(FALSE);
+ FieldUnit aMetric = ::GetDfltMetric(sal_False);
SetMetric(aTabPosMF, aMetric);
aSortDocPosRB.Check();
@@ -2208,7 +2208,7 @@ SwTOXEntryTabPage::SwTOXEntryTabPage(Window* pParent, const SfxItemSet& rAttrSet
aEntryOutlineLevelFT.GetPosPixel().X();
//fill the types in
- USHORT i;
+ sal_uInt16 i;
for( i = 0; i < AUTH_FIELD_END; i++)
{
String sTmp(SW_RES(STR_AUTH_FIELD_START + i));
@@ -2326,9 +2326,9 @@ void SwTOXEntryTabPage::ActivatePage( const SfxItemSet& /*rSet*/)
m_pCurrentForm = pTOXDlg->GetForm(aCurType);
if( !( aLastTOXType == aCurType ))
{
- BOOL bToxIsAuthorities = TOX_AUTHORITIES == aCurType.eType;
- BOOL bToxIsIndex = TOX_INDEX == aCurType.eType;
- BOOL bToxIsContent = TOX_CONTENT == aCurType.eType;
+ sal_Bool bToxIsAuthorities = TOX_AUTHORITIES == aCurType.eType;
+ sal_Bool bToxIsIndex = TOX_INDEX == aCurType.eType;
+ sal_Bool bToxIsContent = TOX_CONTENT == aCurType.eType;
aLevelLB.Clear();
for(sal_uInt16 i = 1; i < m_pCurrentForm->GetFormMax(); i++)
@@ -2636,7 +2636,7 @@ IMPL_LINK(SwTOXEntryTabPage, InsertTokenHdl, PushButton*, pBtn)
String sText;
FormTokenType eTokenType = TOKEN_ENTRY_NO;
String sCharStyle;
- USHORT nChapterFormat = CF_NUMBER; // i89791
+ sal_uInt16 nChapterFormat = CF_NUMBER; // i89791
if(pBtn == &aEntryNoPB)
{
sText.AssignAscii(SwForm::aFormEntryNum);
@@ -2962,7 +2962,7 @@ IMPL_LINK(SwTOXEntryTabPage, ChapterInfoHdl, ListBox*, pBox)
IMPL_LINK(SwTOXEntryTabPage, ChapterInfoOutlineHdl, NumericField*, pField)
{
- const sal_uInt16 nLevel = static_cast<BYTE>(pField->GetValue());
+ const sal_uInt16 nLevel = static_cast<sal_uInt8>(pField->GetValue());
Control* pCtrl = aTokenWIN.GetActiveControl();
DBG_ASSERT(pCtrl, "no active control?");
@@ -3056,7 +3056,7 @@ IMPL_LINK(SwTOXEntryTabPage, AutoRightHdl, CheckBox*, pBox)
void SwTOXEntryTabPage::SetWrtShell(SwWrtShell& rSh)
{
SwDocShell* pDocSh = rSh.GetView().GetDocShell();
- ::FillCharStyleListBox(aCharStyleLB, pDocSh, TRUE, TRUE);
+ ::FillCharStyleListBox(aCharStyleLB, pDocSh, sal_True, sal_True);
const String sDefault(SW_RES(STR_POOLCOLL_STANDARD));
for(sal_uInt16 i = 0; i < aCharStyleLB.GetEntryCount(); i++)
{
@@ -3141,7 +3141,7 @@ SwTokenWindow::~SwTokenWindow()
pControl->SetLoseFocusHdl( Link() );
}
- for( ULONG i = aControlList.Count(); i; )
+ for( sal_uLong i = aControlList.Count(); i; )
{
Control* pControl = aControlList.Remove( --i );
delete pControl;
@@ -3157,7 +3157,7 @@ void SwTokenWindow::SetForm(SwForm& rForm, sal_uInt16 nL)
if(pForm)
{
//apply current level settings to the form
- for( ULONG i = aControlList.Count(); i; )
+ for( sal_uLong i = aControlList.Count(); i; )
{
Control* pControl = aControlList.Remove( --i );
delete pControl;
@@ -3437,9 +3437,9 @@ void SwTokenWindow::InsertAtSelection(
Selection aSel = ((SwTOXEdit*)pActiveCtrl)->GetSelection();
aSel.Justify();
String sEditText = ((SwTOXEdit*)pActiveCtrl)->GetText();
- String sLeft = sEditText.Copy( 0, static_cast< USHORT >(aSel.A()) );
- String sRight = sEditText.Copy( static_cast< USHORT >(aSel.B()),
- static_cast< USHORT >(sEditText.Len() - aSel.B()));
+ String sLeft = sEditText.Copy( 0, static_cast< sal_uInt16 >(aSel.A()) );
+ String sRight = sEditText.Copy( static_cast< sal_uInt16 >(aSel.B()),
+ static_cast< sal_uInt16 >(sEditText.Len() - aSel.B()));
((SwTOXEdit*)pActiveCtrl)->SetText(sLeft);
((SwTOXEdit*)pActiveCtrl)->AdjustSize();
@@ -3646,7 +3646,7 @@ IMPL_LINK(SwTokenWindow, ScrollHdl, ImageButton*, pBtn )
else
{
//find the first completely visible control (left edge visible)
- for(ULONG i = aControlList.Count(); i; i-- )
+ for(sal_uLong i = aControlList.Count(); i; i-- )
{
Control* pCtrl = aControlList.GetObject(i - 1);
long nCtrlWidth = pCtrl->GetSizePixel().Width();
@@ -3732,11 +3732,11 @@ sal_Bool SwTokenWindow::Contains(FormTokenType eSearchFor) const
return bRet;
}
//---------------------------------------------------
-BOOL SwTokenWindow::CreateQuickHelp(Control* pCtrl,
+sal_Bool SwTokenWindow::CreateQuickHelp(Control* pCtrl,
const SwFormToken& rToken,
const HelpEvent& rHEvt)
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( rHEvt.GetMode() & HELPMODE_QUICK )
{
sal_Bool bBalloon = Help::IsBalloonHelpEnabled();
@@ -3775,7 +3775,7 @@ BOOL SwTokenWindow::CreateQuickHelp(Control* pCtrl,
else
Help::ShowQuickHelp( this, aItemRect, sEntry,
QUICKHELP_LEFT|QUICKHELP_VCENTER );
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
}
@@ -4229,17 +4229,17 @@ SwEntryBrowseBox::SwEntryBrowseBox(Window* pParent, const ResId& rId,
sal_Bool SwEntryBrowseBox::SeekRow( long nRow )
{
nCurrentRow = nRow;
- return TRUE;
+ return sal_True;
}
/* -----------------------------19.01.00 15:32--------------------------------
---------------------------------------------------------------------------*/
-String SwEntryBrowseBox::GetCellText(long nRow, USHORT nColumn) const
+String SwEntryBrowseBox::GetCellText(long nRow, sal_uInt16 nColumn) const
{
const String* pRet = &aEmptyStr;
if(aEntryArr.Count() > nRow)
{
- AutoMarkEntry* pEntry = aEntryArr[ static_cast< USHORT >(nRow) ];
+ AutoMarkEntry* pEntry = aEntryArr[ static_cast< sal_uInt16 >(nRow) ];
switch(nColumn)
{
case ITEM_SEARCH :pRet = &pEntry->sSearch; break;
@@ -4277,7 +4277,7 @@ void SwEntryBrowseBox::PaintCell(OutputDevice& rDev,
sal_Bool SwEntryBrowseBox::SaveModified()
{
SetModified();
- USHORT nRow = static_cast< USHORT >(GetCurRow());
+ sal_uInt16 nRow = static_cast< sal_uInt16 >(GetCurRow());
sal_uInt16 nCol = GetCurColumnId();
String sNew;
@@ -4364,7 +4364,7 @@ void SwEntryBrowseBox::ReadEntries(SvStream& rInStr)
if( !pToInsert )
pToInsert = new AutoMarkEntry;
- USHORT nSttPos = 0;
+ sal_uInt16 nSttPos = 0;
pToInsert->sSearch = sLine.GetToken(0, ';', nSttPos );
pToInsert->sAlternative = sLine.GetToken(0, ';', nSttPos );
pToInsert->sPrimKey = sLine.GetToken(0, ';', nSttPos );
@@ -4480,7 +4480,7 @@ SwAutoMarkDlg_Impl::SwAutoMarkDlg_Impl(Window* pParent, const String& rAutoMarkU
aEntriesBB.RowInserted(0, 1, sal_True);
else
{
- SfxMedium aMed( sAutoMarkURL, STREAM_STD_READ, FALSE );
+ SfxMedium aMed( sAutoMarkURL, STREAM_STD_READ, sal_False );
if( aMed.GetInStream() && !aMed.GetInStream()->GetError() )
aEntriesBB.ReadEntries( *aMed.GetInStream() );
else
@@ -4507,7 +4507,7 @@ IMPL_LINK(SwAutoMarkDlg_Impl, OkHdl, OKButton*, EMPTYARG)
SfxMedium aMed( sAutoMarkURL,
bCreateMode ? STREAM_WRITE
: STREAM_WRITE| STREAM_TRUNC,
- FALSE );
+ sal_False );
SvStream* pStrm = aMed.GetOutStream();
pStrm->SetStreamCharSet( RTL_TEXTENCODING_MS_1253 );
if( !pStrm->GetError() )
diff --git a/sw/source/ui/index/multmrk.cxx b/sw/source/ui/index/multmrk.cxx
index ec329f1985..51ba9f2125 100644
--- a/sw/source/ui/index/multmrk.cxx
+++ b/sw/source/ui/index/multmrk.cxx
@@ -59,8 +59,8 @@ SwMultiTOXMarkDlg::SwMultiTOXMarkDlg( Window* pParent, SwTOXMgr& rTOXMgr ) :
{
aTOXLB.SetSelectHdl(LINK(this, SwMultiTOXMarkDlg, SelectHdl));
- USHORT nSize = rMgr.GetTOXMarkCount();
- for(USHORT i=0; i < nSize; ++i)
+ sal_uInt16 nSize = rMgr.GetTOXMarkCount();
+ for(sal_uInt16 i=0; i < nSize; ++i)
aTOXLB.InsertEntry(rMgr.GetTOXMark(i)->GetText());
aTOXLB.SelectEntryPos(0);
diff --git a/sw/source/ui/index/swuiidxmrk.cxx b/sw/source/ui/index/swuiidxmrk.cxx
index 5253673c72..674ded12f8 100644
--- a/sw/source/ui/index/swuiidxmrk.cxx
+++ b/sw/source/ui/index/swuiidxmrk.cxx
@@ -33,9 +33,7 @@
#include "swuiidxmrk.hxx"
#include <hintids.hxx>
-#ifndef _HELPID_H
#include <helpid.h>
-#endif
#define _SVSTDARR_STRINGSSORT
#include <svl/svstdarr.hxx>
#include <comphelper/processfactory.hxx>
@@ -46,9 +44,7 @@
#include <com/sun/star/util/SearchFlags.hpp>
#include <com/sun/star/i18n/TransliterationModules.hpp>
#include <svl/stritem.hxx>
-#ifndef _MSGBOX_HXX //autogen
#include <vcl/msgbox.hxx>
-#endif
#include <sfx2/dispatch.hxx>
#include <svl/eitem.hxx>
#include <svtools/txtcmp.hxx>
@@ -60,20 +56,12 @@
#include <idxmrk.hxx>
#include <txttxmrk.hxx>
#include <wrtsh.hxx>
-#ifndef _VIEW_HXX
#include <view.hxx>
-#endif
#include <multmrk.hxx>
#include <swundo.hxx> // fuer Undo-Ids
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
-#ifndef _INDEX_HRC
#include <index.hrc>
-#endif
-#ifndef _IDXMRK_HRC
#include <idxmrk.hrc>
-#endif
#include <swmodule.hxx>
#include <fldmgr.hxx>
#include <fldbas.hxx>
@@ -83,7 +71,6 @@
#include <ndtxt.hxx>
#include <breakit.hxx>
#include <SwRewriter.hxx>
-#include <undobj.hxx>
#include "swuiidxmrk.hxx"
#include <unomid.h>
@@ -158,11 +145,11 @@ SwIndexMarkDlg::SwIndexMarkDlg(Window *pParent,
bNewMark(bNewDlg),
bSelected(sal_False),
- bPhoneticED0_ChangedByUser(FALSE),
- bPhoneticED1_ChangedByUser(FALSE),
- bPhoneticED2_ChangedByUser(FALSE),
+ bPhoneticED0_ChangedByUser(sal_False),
+ bPhoneticED1_ChangedByUser(sal_False),
+ bPhoneticED2_ChangedByUser(sal_False),
nLangForPhoneticReading(2052),
- bIsPhoneticReadingEnabled(FALSE),
+ bIsPhoneticReadingEnabled(sal_False),
xExtendedIndexEntrySupplier(NULL),
pTOXMgr(0),
pSh(&rWrtShell)
@@ -373,10 +360,10 @@ void SwIndexMarkDlg::UpdateLanguageDependenciesForPhoneticReading()
//no phonetic reading if no global cjk support
if( !xExtendedIndexEntrySupplier.is() )
{
- bIsPhoneticReadingEnabled = FALSE;
+ bIsPhoneticReadingEnabled = sal_False;
return;
}
- bIsPhoneticReadingEnabled = TRUE;
+ bIsPhoneticReadingEnabled = sal_True;
//get the current language
if(!bNewMark) //if dialog is opened to iterate existing marks
@@ -401,8 +388,8 @@ void SwIndexMarkDlg::UpdateLanguageDependenciesForPhoneticReading()
}
else //if dialog is opened to create a new mark
{
- USHORT nScriptType = pSh->GetScriptType();
- USHORT nWhich;
+ sal_uInt16 nScriptType = pSh->GetScriptType();
+ sal_uInt16 nWhich;
switch(nScriptType)
{
case SCRIPTTYPE_ASIAN: nWhich = RES_CHRATR_CJK_LANGUAGE; break;
@@ -517,7 +504,7 @@ void SwIndexMarkDlg::InsertUpdate()
/*--------------------------------------------------------------------
Beschreibung: Marke einfuegen
--------------------------------------------------------------------*/
-static void lcl_SelectSameStrings(SwWrtShell& rSh, BOOL bWordOnly, BOOL bCaseSensitive)
+static void lcl_SelectSameStrings(SwWrtShell& rSh, sal_Bool bWordOnly, sal_Bool bCaseSensitive)
{
rSh.Push();
@@ -532,12 +519,12 @@ static void lcl_SelectSameStrings(SwWrtShell& rSh, BOOL bWordOnly, BOOL bCaseSen
: TransliterationModules_IGNORE_CASE) );
rSh.ClearMark();
- BOOL bCancel;
+ sal_Bool bCancel;
//todo/mba: assuming that notes should not be searched
- BOOL bSearchInNotes = FALSE;
+ sal_Bool bSearchInNotes = sal_False;
rSh.Find( aSearchOpt, bSearchInNotes, DOCPOS_START, DOCPOS_END, bCancel,
- (FindRanges)(FND_IN_SELALL|FND_IN_BODYONLY), FALSE );
+ (FindRanges)(FND_IN_SELALL|FND_IN_BODYONLY), sal_False );
}
@@ -574,9 +561,9 @@ void SwIndexMarkDlg::InsertMark()
}
if (aOrgStr != aEntryED.GetText())
aDesc.SetAltStr(aEntryED.GetText());
- BOOL bApplyAll = aApplyToAllCB.IsChecked();
- BOOL bWordOnly = aSearchCaseWordOnlyCB.IsChecked();
- BOOL bCaseSensitive = aSearchCaseSensitiveCB.IsChecked();
+ sal_Bool bApplyAll = aApplyToAllCB.IsChecked();
+ sal_Bool bWordOnly = aSearchCaseWordOnlyCB.IsChecked();
+ sal_Bool bCaseSensitive = aSearchCaseSensitiveCB.IsChecked();
pSh->StartAllAction();
// hier muessen alle gleichen Strings selektiert werden
@@ -589,7 +576,7 @@ void SwIndexMarkDlg::InsertMark()
SwTOXMgr aMgr(pSh);
aMgr.InsertTOXMark(aDesc);
if(bApplyAll)
- pSh->Pop(FALSE);
+ pSh->Pop(sal_False);
pSh->EndAllAction();
}
@@ -818,11 +805,11 @@ IMPL_LINK( SwIndexMarkDlg, ModifyHdl, ListBox *, pBox )
}
else //aEntryED !!aEntryED is not a ListBox but a Edit
{
- BOOL bHasText = (aEntryED.GetText().Len()>0);
+ sal_Bool bHasText = (aEntryED.GetText().Len()>0);
if(!bHasText)
{
aPhoneticED0.SetText(aEmptyStr);
- bPhoneticED0_ChangedByUser = FALSE;
+ bPhoneticED0_ChangedByUser = sal_False;
}
else if(!bPhoneticED0_ChangedByUser)
aPhoneticED0.SetText(GetDefaultPhoneticReading(aEntryED.GetText()));
@@ -1038,15 +1025,15 @@ IMPL_LINK( SwIndexMarkDlg, KeyDCBModifyHdl, ComboBox *, pBox )
aKey2DCB.SetText(aEmptyStr);
aPhoneticED1.SetText(aEmptyStr);
aPhoneticED2.SetText(aEmptyStr);
- bPhoneticED1_ChangedByUser = FALSE;
- bPhoneticED2_ChangedByUser = FALSE;
+ bPhoneticED1_ChangedByUser = sal_False;
+ bPhoneticED2_ChangedByUser = sal_False;
}
else
{
if(pBox->IsInDropDown())
{
//reset bPhoneticED1_ChangedByUser if a completly new string is selected
- bPhoneticED1_ChangedByUser = FALSE;
+ bPhoneticED1_ChangedByUser = sal_False;
}
if(!bPhoneticED1_ChangedByUser)
aPhoneticED1.SetText(GetDefaultPhoneticReading(pBox->GetText()));
@@ -1059,14 +1046,14 @@ IMPL_LINK( SwIndexMarkDlg, KeyDCBModifyHdl, ComboBox *, pBox )
if(!(pBox->GetText().Len()>0))
{
aPhoneticED2.SetText(aEmptyStr);
- bPhoneticED2_ChangedByUser = FALSE;
+ bPhoneticED2_ChangedByUser = sal_False;
}
else
{
if(pBox->IsInDropDown())
{
//reset bPhoneticED1_ChangedByUser if a completly new string is selected
- bPhoneticED2_ChangedByUser = FALSE;
+ bPhoneticED2_ChangedByUser = sal_False;
}
if(!bPhoneticED2_ChangedByUser)
aPhoneticED2.SetText(GetDefaultPhoneticReading(pBox->GetText()));
@@ -1103,7 +1090,7 @@ void SwIndexMarkDlg::ReInitDlg(SwWrtShell& rWrtShell, SwTOXMark* pCurTOXMark)
pTOXMgr = new SwTOXMgr(pSh);
if(pCurTOXMark)
{
- for(USHORT i = 0; i < pTOXMgr->GetTOXMarkCount(); i++)
+ for(sal_uInt16 i = 0; i < pTOXMgr->GetTOXMarkCount(); i++)
if(pTOXMgr->GetTOXMark(i) == pCurTOXMark)
{
pTOXMgr->SetCurTOXMark(i);
diff --git a/sw/source/ui/index/toxmgr.cxx b/sw/source/ui/index/toxmgr.cxx
index f705dc0d94..707a114ea4 100644
--- a/sw/source/ui/index/toxmgr.cxx
+++ b/sw/source/ui/index/toxmgr.cxx
@@ -27,6 +27,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
+
#include <wrtsh.hxx>
#include <shellres.hxx>
#include <swwait.hxx>
@@ -34,10 +35,9 @@
#include <toxmgr.hxx>
#include <crsskip.hxx>
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <swundo.hxx>
-#ifndef _GLOBALS_HRC
#include <globals.hrc>
-#endif
/*--------------------------------------------------------------------
Beschreibung: Handhabung der Verzeichnisse durch TOXMgr
@@ -56,13 +56,13 @@ SwTOXMgr::SwTOXMgr(SwWrtShell* pShell):
--------------------------------------------------------------------*/
-USHORT SwTOXMgr::GetTOXMarks()
+sal_uInt16 SwTOXMgr::GetTOXMarks()
{
return pSh->GetCurTOXMarks(aCurMarks);
}
-SwTOXMark* SwTOXMgr::GetTOXMark(USHORT nId)
+SwTOXMark* SwTOXMgr::GetTOXMark(sal_uInt16 nId)
{
if(aCurMarks.Count() > 0)
return aCurMarks[nId];
@@ -98,7 +98,7 @@ void SwTOXMgr::InsertTOXMark(const SwTOXMarkDescription& rDesc)
ASSERT(rDesc.GetLevel() > 0 && rDesc.GetLevel() <= MAXLEVEL,
ungueltiger Level InsertTOCMark);
pMark = new SwTOXMark(pSh->GetTOXType(TOX_CONTENT, 0));
- pMark->SetLevel( static_cast< USHORT >(rDesc.GetLevel()) );
+ pMark->SetLevel( static_cast< sal_uInt16 >(rDesc.GetLevel()) );
if(rDesc.GetAltStr())
pMark->SetAlternativeText(*rDesc.GetAltStr());
@@ -132,10 +132,10 @@ void SwTOXMgr::InsertTOXMark(const SwTOXMarkDescription& rDesc)
{
ASSERT(rDesc.GetLevel() > 0 && rDesc.GetLevel() <= MAXLEVEL,
ungueltiger Level InsertTOCMark);
- USHORT nId = rDesc.GetTOUName() ?
+ sal_uInt16 nId = rDesc.GetTOUName() ?
GetUserTypeID(*rDesc.GetTOUName()) : 0;
pMark = new SwTOXMark(pSh->GetTOXType(TOX_USER, nId));
- pMark->SetLevel( static_cast< USHORT >(rDesc.GetLevel()) );
+ pMark->SetLevel( static_cast< sal_uInt16 >(rDesc.GetLevel()) );
if(rDesc.GetAltStr())
pMark->SetAlternativeText(*rDesc.GetAltStr());
@@ -195,13 +195,13 @@ void SwTOXMgr::UpdateTOXMark(const SwTOXMarkDescription& rDesc)
pCurTOXMark->SetMainEntry(rDesc.IsMainEntry());
}
else
- pCurTOXMark->SetLevel( static_cast< USHORT >(rDesc.GetLevel()) );
+ pCurTOXMark->SetLevel( static_cast< sal_uInt16 >(rDesc.GetLevel()) );
if(rDesc.GetAltStr())
{
// JP 26.08.96: Bug 30344 - entweder der Text aus dem Doc oder
// ein Alternativ-Text, beides gibts nicht!
- BOOL bReplace = pCurTOXMark->IsAlternativeText();
+ sal_Bool bReplace = pCurTOXMark->IsAlternativeText();
if( bReplace )
pCurTOXMark->SetAlternativeText( *rDesc.GetAltStr() );
else
@@ -219,7 +219,7 @@ void SwTOXMgr::UpdateTOXMark(const SwTOXMarkDescription& rDesc)
// Bug 36207 pCurTOXMark zeigt hier in den Wald!
if(!pCurTOXMark)
{
- pSh->Left(CRSR_SKIP_CHARS, FALSE, 1, FALSE );
+ pSh->Left(CRSR_SKIP_CHARS, sal_False, 1, sal_False );
pSh->GetCurTOXMarks(aCurMarks);
SetCurTOXMark(0);
}
@@ -231,10 +231,10 @@ void SwTOXMgr::UpdateTOXMark(const SwTOXMarkDescription& rDesc)
--------------------------------------------------------------------*/
-USHORT SwTOXMgr::GetUserTypeID(const String& rStr)
+sal_uInt16 SwTOXMgr::GetUserTypeID(const String& rStr)
{
- USHORT nSize = pSh->GetTOXTypeCount(TOX_USER);
- for(USHORT i=0; i < nSize; ++i)
+ sal_uInt16 nSize = pSh->GetTOXTypeCount(TOX_USER);
+ for(sal_uInt16 i=0; i < nSize; ++i)
{
const SwTOXType* pTmp = pSh->GetTOXType(TOX_USER, i);
if(pTmp && pTmp->GetTypeName() == rStr)
@@ -250,7 +250,7 @@ USHORT SwTOXMgr::GetUserTypeID(const String& rStr)
--------------------------------------------------------------------*/
-void SwTOXMgr::NextTOXMark(BOOL bSame)
+void SwTOXMgr::NextTOXMark(sal_Bool bSame)
{
ASSERT(pCurTOXMark, "kein aktuelles TOXMark");
if( pCurTOXMark )
@@ -261,7 +261,7 @@ void SwTOXMgr::NextTOXMark(BOOL bSame)
}
-void SwTOXMgr::PrevTOXMark(BOOL bSame)
+void SwTOXMgr::PrevTOXMark(sal_Bool bSame)
{
ASSERT(pCurTOXMark, "kein aktuelles TOXMark");
if( pCurTOXMark )
@@ -279,12 +279,12 @@ const SwTOXBase* SwTOXMgr::GetCurTOX()
return pSh->GetCurTOX();
}
-const SwTOXType* SwTOXMgr::GetTOXType(TOXTypes eTyp, USHORT nId) const
+const SwTOXType* SwTOXMgr::GetTOXType(TOXTypes eTyp, sal_uInt16 nId) const
{
return pSh->GetTOXType(eTyp, nId);
}
-void SwTOXMgr::SetCurTOXMark(USHORT nId)
+void SwTOXMgr::SetCurTOXMark(sal_uInt16 nId)
{
pCurTOXMark = (nId < aCurMarks.Count()) ? aCurMarks[nId] : 0;
}
@@ -293,12 +293,12 @@ void SwTOXMgr::SetCurTOXMark(USHORT nId)
--------------------------------------------------*/
-BOOL SwTOXMgr::UpdateOrInsertTOX(const SwTOXDescription& rDesc,
+sal_Bool SwTOXMgr::UpdateOrInsertTOX(const SwTOXDescription& rDesc,
SwTOXBase** ppBase,
const SfxItemSet* pSet)
{
- SwWait aWait( *pSh->GetView().GetDocShell(), TRUE );
- BOOL bRet = TRUE;
+ SwWait aWait( *pSh->GetView().GetDocShell(), sal_True );
+ sal_Bool bRet = sal_True;
const SwTOXBase* pCurTOX = ppBase && *ppBase ? *ppBase : GetCurTOX();
SwTOXBase* pTOX = (SwTOXBase*)pCurTOX;
@@ -343,9 +343,9 @@ BOOL SwTOXMgr::UpdateOrInsertTOX(const SwTOXDescription& rDesc,
{
if(!pCurTOX || (ppBase && !(*ppBase)))
{
- USHORT nPos = 0;
- USHORT nSize = pSh->GetTOXTypeCount(eCurTOXType);
- for(USHORT i=0; rDesc.GetTOUName() && i < nSize; ++i)
+ sal_uInt16 nPos = 0;
+ sal_uInt16 nSize = pSh->GetTOXTypeCount(eCurTOXType);
+ for(sal_uInt16 i=0; rDesc.GetTOUName() && i < nSize; ++i)
{ const SwTOXType* pType = pSh->GetTOXType(TOX_USER, i);
if(pType->GetTypeName() == *rDesc.GetTOUName())
{ nPos = i;
@@ -417,14 +417,14 @@ BOOL SwTOXMgr::UpdateOrInsertTOX(const SwTOXDescription& rDesc,
DBG_ASSERT(pNewTOX, "no TOXBase created!" );
if(!pNewTOX)
- return FALSE;
+ return sal_False;
pNewTOX->SetFromChapter(rDesc.IsFromChapter());
pNewTOX->SetSequenceName(rDesc.GetSequenceName());
pNewTOX->SetCaptionDisplay(rDesc.GetCaptionDisplay());
pNewTOX->SetProtected(rDesc.IsReadonly());
- for(USHORT nLevel = 0; nLevel < MAXLEVEL; nLevel++)
+ for(sal_uInt16 nLevel = 0; nLevel < MAXLEVEL; nLevel++)
pNewTOX->SetStyleNames(rDesc.GetStyleNames(nLevel), nLevel);
if(rDesc.GetTitle())
@@ -450,12 +450,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
@@ -463,12 +465,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();
+ }
}
}
@@ -482,7 +486,7 @@ void SwTOXDescription::SetSortKeys(SwTOXSortKey eKey1,
SwTOXSortKey eKey3)
{
SwTOXSortKey aArr[3];
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
if(AUTH_FIELD_END > eKey1.eField)
aArr[nPos++] = eKey1;
if(AUTH_FIELD_END > eKey2.eField)
@@ -500,7 +504,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 9d7771e11a..4c88093fc1 100644
--- a/sw/source/ui/lingu/hhcwrp.cxx
+++ b/sw/source/ui/lingu/hhcwrp.cxx
@@ -230,10 +230,10 @@ void SwHHCWrapper::SelectNewUnit_impl( sal_Int32 nUnitStart, sal_Int32 nUnitEnd
pCrsr->DeleteMark();
rWrtShell.Right( CRSR_SKIP_CHARS, /*bExpand*/ sal_False,
- (USHORT) (nUnitOffset + nUnitStart), sal_True );
+ (sal_uInt16) (nUnitOffset + nUnitStart), sal_True );
pCrsr->SetMark();
rWrtShell.Right( CRSR_SKIP_CHARS, /*bExpand*/ sal_True,
- (USHORT) (nUnitEnd - nUnitStart), sal_True );
+ (sal_uInt16) (nUnitEnd - nUnitStart), sal_True );
// end selection now. Otherwise SHIFT+HOME (extending the selection)
// won't work when the dialog is closed without any replacement.
// (see #116346#)
@@ -504,14 +504,14 @@ void SwHHCWrapper::ReplaceUnit(
// of the flag.
rWrtShell.EndSelect();
- rWrtShell.Left( 0, TRUE, aNewOrigText.Len(), TRUE, TRUE );
+ rWrtShell.Left( 0, sal_True, aNewOrigText.Len(), sal_True, sal_True );
}
pRuby->SetPosition( bRubyBelow );
pRuby->SetAdjustment( RubyAdjust_CENTER );
//!! the following seem not to be needed
//pRuby->SetCharFmtName( const String& rNm );
- //pRuby->SetCharFmtId( USHORT nNew );
+ //pRuby->SetCharFmtId( sal_uInt16 nNew );
#ifdef DEBUG
SwPaM *pPaM = rWrtShell.GetCrsr();
(void)pPaM;
diff --git a/sw/source/ui/lingu/olmenu.cxx b/sw/source/ui/lingu/olmenu.cxx
index 98eaf8d466..c399c5b5fb 100755..100644
--- a/sw/source/ui/lingu/olmenu.cxx
+++ b/sw/source/ui/lingu/olmenu.cxx
@@ -47,7 +47,6 @@
#include "swtypes.hxx"
#include "swundo.hxx"
#include "uitool.hxx"
-#include "undobj.hxx"
#include "unomid.h"
#include "view.hxx"
#include "viewopt.hxx"
@@ -110,7 +109,7 @@
using namespace ::com::sun::star;
using ::rtl::OUString;
-extern void lcl_CharDialog( SwWrtShell &rWrtSh, BOOL bUseDialog, USHORT nSlot,const SfxItemSet *pArgs, SfxRequest *pReq );
+extern void lcl_CharDialog( SwWrtShell &rWrtSh, sal_Bool bUseDialog, sal_uInt16 nSlot,const SfxItemSet *pArgs, SfxRequest *pReq );
/*--------------------------------------------------------------------------
@@ -178,10 +177,10 @@ LanguageType lcl_CheckLanguage(
lang::Locale a3( SvxCreateLocale( aLangList[3] ) );
#endif
- INT32 nCount = sizeof(aLangList) / sizeof(aLangList[0]);
- for (INT32 i = 0; i < nCount; i++)
+ sal_Int32 nCount = sizeof(aLangList) / sizeof(aLangList[0]);
+ for (sal_Int32 i = 0; i < nCount; i++)
{
- INT16 nTmpLang = aLangList[i];
+ sal_Int16 nTmpLang = aLangList[i];
if (nTmpLang != LANGUAGE_NONE && nTmpLang != LANGUAGE_DONTKNOW)
{
if (xSpell->hasLanguage( nTmpLang ) &&
@@ -215,7 +214,7 @@ inline bool lcl_checkScriptType( sal_Int16 nScriptType, LanguageType nLang )
void SwSpellPopup::fillLangPopupMenu(
PopupMenu *pPopupMenu,
- USHORT nLangItemIdStart,
+ sal_uInt16 nLangItemIdStart,
uno::Sequence< OUString > aSeq,
SwWrtShell* pWrtSh,
std::map< sal_Int16, ::rtl::OUString > &rLangTable )
@@ -229,7 +228,7 @@ void SwSpellPopup::fillLangPopupMenu(
std::set< OUString > aLangItems;
OUString aCurLang( aSeq[0] );
- USHORT nScriptType = static_cast< sal_Int16 >(aSeq[1].toInt32());
+ sal_uInt16 nScriptType = static_cast< sal_Int16 >(aSeq[1].toInt32());
OUString aKeyboardLang( aSeq[2] );
OUString aGuessedTextLang( aSeq[3] );
@@ -285,7 +284,7 @@ void SwSpellPopup::fillLangPopupMenu(
uno::Sequence< lang::Locale > rLocales( xDocumentLanguages->getDocumentLanguages( nScriptType, nMaxCount ) );
if (rLocales.getLength() > 0)
{
- for (USHORT i = 0; i < rLocales.getLength(); ++i)
+ for (sal_uInt16 i = 0; i < rLocales.getLength(); ++i)
{
if (aLangItems.size() == (size_t)nMaxCount)
break;
@@ -297,7 +296,7 @@ void SwSpellPopup::fillLangPopupMenu(
}
- USHORT nItemId = nLangItemIdStart;
+ sal_uInt16 nItemId = nLangItemIdStart;
const OUString sAsterix(RTL_CONSTASCII_USTRINGPARAM("*")); // multiple languages in current selection
const OUString sEmpty; // 'no language found' from language guessing
std::set< OUString >::const_iterator it;
@@ -314,7 +313,7 @@ void SwSpellPopup::fillLangPopupMenu(
if (aEntryTxt == aCurLang)
{
//make a check mark for the current language
- pPopupMenu->CheckItem( nItemId, TRUE );
+ pPopupMenu->CheckItem( nItemId, sal_True );
}
rLangTable[ nItemId ] = aEntryTxt;
++nItemId;
@@ -428,9 +427,9 @@ bGrammarResults(false)
InsertSeparator(0);
bEnable = sal_True;
- USHORT nAutoCorrItemId = MN_AUTOCORR_START;
- USHORT nItemId = MN_SUGGESTION_START;
- for (USHORT i = 0; i < nStringCount; ++i)
+ sal_uInt16 nAutoCorrItemId = MN_AUTOCORR_START;
+ sal_uInt16 nItemId = MN_SUGGESTION_START;
+ for (sal_uInt16 i = 0; i < nStringCount; ++i)
{
const String aEntry = aSuggestions[ i ];
InsertItem( nItemId, aEntry, 0, i );
@@ -449,7 +448,7 @@ bGrammarResults(false)
OUString aIgnoreSelection( String( SW_RES( STR_IGNORE_SELECTION ) ) );
OUString aSpellingAndGrammar = RetrieveLabelFromCommand( C2U(".uno:SpellingAndGrammarDialog") );
SetItemText( MN_SPELLING_DLG, aSpellingAndGrammar );
- USHORT nItemPos = GetItemPos( MN_IGNORE_WORD );
+ sal_uInt16 nItemPos = GetItemPos( MN_IGNORE_WORD );
InsertItem( MN_IGNORE_SELECTION, aIgnoreSelection, 0, nItemPos );
SetHelpId( MN_IGNORE_SELECTION, HID_LINGU_IGNORE_SELECTION);
@@ -475,7 +474,7 @@ bGrammarResults(false)
pMenu = GetPopupMenu(MN_ADD_TO_DIC);
// pMenu->CreateAutoMnemonics();
pMenu->SetMenuFlags(MENU_FLAG_NOAUTOMNEMONICS); //! necessary to retrieve the correct dictionary name in 'Execute' below
- bEnable = FALSE; // enable MN_ADD_TO_DIC?
+ bEnable = sal_False; // enable MN_ADD_TO_DIC?
uno::Reference< linguistic2::XDictionaryList > xDicList( SvxGetDictionaryList() );
if (xDicList.is())
{
@@ -488,10 +487,10 @@ bGrammarResults(false)
aDics = xDicList->getDictionaries();
const uno::Reference< linguistic2::XDictionary > *pDic = aDics.getConstArray();
- USHORT nDicCount = static_cast< USHORT >(aDics.getLength());
+ sal_uInt16 nDicCount = static_cast< sal_uInt16 >(aDics.getLength());
- USHORT nItemId = MN_DICTIONARIES_START;
- for( USHORT i = 0; i < nDicCount; i++ )
+ sal_uInt16 nItemId = MN_DICTIONARIES_START;
+ for( sal_uInt16 i = 0; i < nDicCount; i++ )
{
uno::Reference< linguistic2::XDictionary > xDicTmp( pDic[i], uno::UNO_QUERY );
if (!xDicTmp.is() || SvxGetIgnoreAllList() == xDicTmp)
@@ -574,7 +573,7 @@ bGrammarResults(false)
//////////////////////////////////////////////////////////////////////////////////
- RemoveDisabledEntries( TRUE, TRUE );
+ RemoveDisabledEntries( sal_True, sal_True );
}
/*--------------------------------------------------------------------------
@@ -595,7 +594,7 @@ aInfo16( SW_RES(IMG_INFO_16) )
{
nCheckedLanguage = SvxLocaleToLanguage( rResult.aLocale );
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
OUString aMessageText( rResult.aErrors[ nErrorInResult ].aShortComment );
InsertSeparator( nPos++ );
InsertItem( MN_SHORT_COMMENT, aMessageText, MIB_NOSELECT, nPos++ );
@@ -617,7 +616,7 @@ aInfo16( SW_RES(IMG_INFO_16) )
aImage = Image( lcl_GetImageFromPngUrl( aSuggestionImageUrl ) );
}
- USHORT nItemId = MN_SUGGESTION_START;
+ sal_uInt16 nItemId = MN_SUGGESTION_START;
for (sal_uInt16 i = 0; i < nStringCount; ++i)
{
const String aEntry = aSuggestions[ i ];
@@ -634,7 +633,7 @@ aInfo16( SW_RES(IMG_INFO_16) )
OUString aIgnoreSelection( String( SW_RES( STR_IGNORE_SELECTION ) ) );
OUString aSpellingAndGrammar = RetrieveLabelFromCommand( C2U(".uno:SpellingAndGrammarDialog") );
SetItemText( MN_SPELLING_DLG, aSpellingAndGrammar );
- USHORT nItemPos = GetItemPos( MN_IGNORE_WORD );
+ sal_uInt16 nItemPos = GetItemPos( MN_IGNORE_WORD );
InsertItem( MN_IGNORE_SELECTION, aIgnoreSelection, 0, nItemPos );
SetHelpId( MN_IGNORE_SELECTION, HID_LINGU_IGNORE_SELECTION);
@@ -707,7 +706,7 @@ aInfo16( SW_RES(IMG_INFO_16) )
//////////////////////////////////////////////////////////////////////////////////
- RemoveDisabledEntries( TRUE, TRUE );
+ RemoveDisabledEntries( sal_True, sal_True );
}
/*--------------------------------------------------------------------------
@@ -723,7 +722,7 @@ sal_uInt16 SwSpellPopup::Execute( const Rectangle& rWordPos, Window* pWin )
/*-- 19.01.2006 08:15:48---------------------------------------------------
-----------------------------------------------------------------------*/
-void SwSpellPopup::Execute( USHORT nId )
+void SwSpellPopup::Execute( sal_uInt16 nId )
{
if (nId == USHRT_MAX)
return;
@@ -789,7 +788,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 );
}
@@ -800,7 +799,7 @@ void SwSpellPopup::Execute( USHORT nId )
{
SvtLinguConfig().SetProperty( A2OU( UPN_IS_GRAMMAR_INTERACTIVE ), uno::makeAny( sal_True ));
}
- pSh->Left(CRSR_SKIP_CHARS, FALSE, 1, FALSE );
+ pSh->Left(CRSR_SKIP_CHARS, sal_False, 1, sal_False );
{
uno::Reference<linguistic2::XDictionaryList> xDictionaryList( SvxGetDictionaryList() );
SvxDicListChgClamp aClamp( xDictionaryList );
@@ -834,7 +833,7 @@ void SwSpellPopup::Execute( USHORT nId )
if (xDic.is())
{
- INT16 nAddRes = linguistic::AddEntryToDic( xDic, aWord, FALSE, aEmptyStr, LANGUAGE_NONE );
+ sal_Int16 nAddRes = linguistic::AddEntryToDic( xDic, aWord, sal_False, aEmptyStr, LANGUAGE_NONE );
// save modified user-dictionary if it is persistent
uno::Reference< frame::XStorable > xSavDic( xDic, uno::UNO_QUERY );
if (xSavDic.is())
@@ -888,7 +887,7 @@ void SwSpellPopup::Execute( USHORT nId )
pSh->Push(); // save cursor
SwLangHelper::SelectCurrentPara( *pSh );
SwLangHelper::SetLanguage( *pSh, aNewLangTxt, true, aCoreSet );
- pSh->Pop( FALSE ); // restore cursor
+ pSh->Pop( sal_False ); // restore cursor
}
else if (nId == MN_SET_PARA_NONE)
{
@@ -896,7 +895,7 @@ void SwSpellPopup::Execute( USHORT nId )
pSh->Push(); // save cursor
SwLangHelper::SelectCurrentPara( *pSh );
SwLangHelper::SetLanguage_None( *pSh, true, aCoreSet );
- pSh->Pop( FALSE ); // restore cursor
+ pSh->Pop( sal_False ); // restore cursor
}
else if (nId == MN_SET_PARA_RESET)
{
@@ -904,7 +903,7 @@ void SwSpellPopup::Execute( USHORT nId )
pSh->Push(); // save cursor
SwLangHelper::SelectCurrentPara( *pSh );
SwLangHelper::ResetLanguages( *pSh, true );
- pSh->Pop( FALSE ); // restore cursor
+ pSh->Pop( sal_False ); // restore cursor
}
else if (nId == MN_SET_PARA_MORE)
{
@@ -912,7 +911,7 @@ void SwSpellPopup::Execute( USHORT nId )
SwLangHelper::SelectCurrentPara( *pSh );
//Open Format/Character Dialog
lcl_CharDialog( *pSh, true, nId, 0, 0 );
- pSh->Pop( FALSE ); // restore cursor
+ pSh->Pop( sal_False ); // restore cursor
}
#if 0
else if (nId == MN_SET_LANGUAGE_ALL_TEXT_START + nNumLanguageDocEntries - 1)
diff --git a/sw/source/ui/misc/bookmark.cxx b/sw/source/ui/misc/bookmark.cxx
index 22da987d57..0bb5f892e3 100644
--- a/sw/source/ui/misc/bookmark.cxx
+++ b/sw/source/ui/misc/bookmark.cxx
@@ -53,17 +53,17 @@ const String BookmarkCombo::aForbiddenChars = String::CreateFromAscii("/\\@:*?\"
IMPL_LINK( SwInsertBookmarkDlg, ModifyHdl, BookmarkCombo *, pBox )
{
- BOOL bSelEntries = pBox->GetSelectEntryCount() != 0;
+ sal_Bool bSelEntries = pBox->GetSelectEntryCount() != 0;
// if a string has been pasted from the clipboard then
// there may be illegal characters in the box
if(!bSelEntries)
{
String sTmp = pBox->GetText();
- USHORT nLen = sTmp.Len();
+ sal_uInt16 nLen = sTmp.Len();
String sMsg;
- for(USHORT i = 0; i < BookmarkCombo::aForbiddenChars.Len(); i++)
+ for(sal_uInt16 i = 0; i < BookmarkCombo::aForbiddenChars.Len(); i++)
{
- USHORT nTmpLen = sTmp.Len();
+ sal_uInt16 nTmpLen = sTmp.Len();
sTmp.EraseAllChars(BookmarkCombo::aForbiddenChars.GetChar(i));
if(sTmp.Len() != nTmpLen)
sMsg += BookmarkCombo::aForbiddenChars.GetChar(i);
@@ -93,11 +93,11 @@ IMPL_LINK( SwInsertBookmarkDlg, DeleteHdl, Button *, EMPTYARG )
{
// Textmarken aus der ComboBox entfernen
- for (USHORT i = aBookmarkBox.GetSelectEntryCount(); i; i-- )
+ for (sal_uInt16 i = aBookmarkBox.GetSelectEntryCount(); i; i-- )
aBookmarkBox.RemoveEntry(aBookmarkBox.GetSelectEntryPos(i - 1));
aBookmarkBox.SetText(aEmptyStr);
- aDeleteBtn.Enable(FALSE); // keine weiteren Eintraege vorhanden
+ aDeleteBtn.Enable(sal_False); // keine weiteren Eintraege vorhanden
// aBookmarkBox.SetText(aEmptyStr);
aOkBtn.Enable(); // Im OK Handler wird geloescht
@@ -115,7 +115,7 @@ void SwInsertBookmarkDlg::Apply()
{
//at first remove deleted bookmarks to prevent multiple bookmarks with the same
//name
- for (USHORT nCount = aBookmarkBox.GetRemovedCount(); nCount > 0; nCount--)
+ for (sal_uInt16 nCount = aBookmarkBox.GetRemovedCount(); nCount > 0; nCount--)
{
String sRemoved = aBookmarkBox.GetRemovedEntry( nCount -1 ).GetName();
IDocumentMarkAccess* const pMarkAccess = rSh.getIDocumentMarkAccess();
@@ -126,7 +126,7 @@ void SwInsertBookmarkDlg::Apply()
}
// Textmarke einfuegen
- USHORT nLen = aBookmarkBox.GetText().Len();
+ sal_uInt16 nLen = aBookmarkBox.GetText().Len();
SwBoxEntry aTmpEntry(aBookmarkBox.GetText(), 0 );
if ( nLen && (aBookmarkBox.GetEntryPos(aTmpEntry) == COMBOBOX_ENTRY_NOTFOUND) )
@@ -162,14 +162,14 @@ SwInsertBookmarkDlg::SwInsertBookmarkDlg( Window *pParent, SwWrtShell &rS, SfxRe
rReq( rRequest )
{
aBookmarkBox.SetModifyHdl(LINK(this, SwInsertBookmarkDlg, ModifyHdl));
- aBookmarkBox.EnableMultiSelection(TRUE);
- aBookmarkBox.EnableAutocomplete( TRUE, TRUE );
+ aBookmarkBox.EnableMultiSelection(sal_True);
+ aBookmarkBox.EnableAutocomplete( sal_True, sal_True );
aDeleteBtn.SetClickHdl(LINK(this, SwInsertBookmarkDlg, DeleteHdl));
// Combobox mit vorhandenen Bookmarks fuellen
IDocumentMarkAccess* const pMarkAccess = rSh.getIDocumentMarkAccess();
- USHORT nId = 0;
+ sal_uInt16 nId = 0;
for( IDocumentMarkAccess::const_iterator_t ppBookmark = pMarkAccess->getBookmarksBegin();
ppBookmark != pMarkAccess->getBookmarksEnd();
ppBookmark++)
@@ -202,7 +202,7 @@ BookmarkCombo::BookmarkCombo( Window* pWin, const ResId& rResId ) :
Beschreibung:
-----------------------------------------------------------------------*/
-USHORT BookmarkCombo::GetFirstSelEntryPos() const
+sal_uInt16 BookmarkCombo::GetFirstSelEntryPos() const
{
return GetSelEntryPos(0);
}
@@ -211,7 +211,7 @@ USHORT BookmarkCombo::GetFirstSelEntryPos() const
Beschreibung:
-----------------------------------------------------------------------*/
-USHORT BookmarkCombo::GetNextSelEntryPos(USHORT nPos) const
+sal_uInt16 BookmarkCombo::GetNextSelEntryPos(sal_uInt16 nPos) const
{
return GetSelEntryPos(nPos + 1);
}
@@ -220,11 +220,11 @@ USHORT BookmarkCombo::GetNextSelEntryPos(USHORT nPos) const
Beschreibung:
-----------------------------------------------------------------------*/
-USHORT BookmarkCombo::GetSelEntryPos(USHORT nPos) const
+sal_uInt16 BookmarkCombo::GetSelEntryPos(sal_uInt16 nPos) const
{
sal_Unicode cSep = GetMultiSelectionSeparator();
- USHORT nCnt = GetText().GetTokenCount(cSep);
+ sal_uInt16 nCnt = GetText().GetTokenCount(cSep);
for (; nPos < nCnt; nPos++)
{
@@ -242,11 +242,11 @@ USHORT BookmarkCombo::GetSelEntryPos(USHORT nPos) const
Beschreibung:
-----------------------------------------------------------------------*/
-USHORT BookmarkCombo::GetSelectEntryCount() const
+sal_uInt16 BookmarkCombo::GetSelectEntryCount() const
{
- USHORT nCnt = 0;
+ sal_uInt16 nCnt = 0;
- USHORT nPos = GetFirstSelEntryPos();
+ sal_uInt16 nPos = GetFirstSelEntryPos();
while (nPos != COMBOBOX_ENTRY_NOTFOUND)
{
nPos = GetNextSelEntryPos(nPos);
@@ -260,10 +260,10 @@ USHORT BookmarkCombo::GetSelectEntryCount() const
Beschreibung: Position in der Listbox (der ComboBox)
-----------------------------------------------------------------------*/
-USHORT BookmarkCombo::GetSelectEntryPos( USHORT nSelIndex ) const
+sal_uInt16 BookmarkCombo::GetSelectEntryPos( sal_uInt16 nSelIndex ) const
{
- USHORT nCnt = 0;
- USHORT nPos = GetFirstSelEntryPos();
+ sal_uInt16 nCnt = 0;
+ sal_uInt16 nPos = GetFirstSelEntryPos();
while (nPos != COMBOBOX_ENTRY_NOTFOUND)
{
diff --git a/sw/source/ui/misc/docfnote.cxx b/sw/source/ui/misc/docfnote.cxx
index 9c6b18a831..4454dbe6c8 100644
--- a/sw/source/ui/misc/docfnote.cxx
+++ b/sw/source/ui/misc/docfnote.cxx
@@ -81,7 +81,7 @@ SwFootNoteOptionDlg::SwFootNoteOptionDlg( Window *pParent, SwWrtShell &rS ) :
AddTabPage( TP_ENDNOTEOPTION, SwEndNoteOptionPage::Create, 0 );
}
-void SwFootNoteOptionDlg::PageCreated( USHORT /*nId*/, SfxTabPage &rPage )
+void SwFootNoteOptionDlg::PageCreated( sal_uInt16 /*nId*/, SfxTabPage &rPage )
{
((SwEndNoteOptionPage&)rPage).SetShell( rSh );
}
@@ -107,7 +107,7 @@ IMPL_LINK( SwFootNoteOptionDlg, OkHdl, Button *, pBtn )
//----------------------------------------------------------------------
-SwEndNoteOptionPage::SwEndNoteOptionPage( Window *pParent, BOOL bEN,
+SwEndNoteOptionPage::SwEndNoteOptionPage( Window *pParent, sal_Bool bEN,
const SfxItemSet &rSet ) :
SfxTabPage( pParent, SW_RES(bEN ? TP_ENDNOTEOPTION : TP_FOOTNOTEOPTION), rSet ),
aNumTypeFT (this, SW_RES( FT_NUMTYPE )),
@@ -147,7 +147,7 @@ SwEndNoteOptionPage::SwEndNoteOptionPage( Window *pParent, BOOL bEN,
aNumPage(aNumCountBox.GetEntry(FTNNUM_PAGE)),
aNumChapter(aNumCountBox.GetEntry(FTNNUM_CHAPTER)),
pSh( 0 ),
- bPosDoc(FALSE),
+ bPosDoc(sal_False),
bEndNote( bEN )
{
FreeResource();
@@ -163,7 +163,7 @@ void SwEndNoteOptionPage::Reset( const SfxItemSet& )
SwEndNoteInfo *pInf = bEndNote ? new SwEndNoteInfo( pSh->GetEndNoteInfo() )
: new SwFtnInfo( pSh->GetFtnInfo() );
SfxObjectShell * pDocSh = SfxObjectShell::Current();
- USHORT i;
+ sal_uInt16 i;
if(PTR_CAST(SwWebDocShell, pDocSh))
{
@@ -188,7 +188,7 @@ void SwEndNoteOptionPage::Reset( const SfxItemSet& )
aContFromLbl.Hide();
aContFromEdit.Hide();
aContFL.Hide();
- bPosDoc = TRUE;
+ bPosDoc = sal_True;
}
else
{
@@ -197,15 +197,15 @@ void SwEndNoteOptionPage::Reset( const SfxItemSet& )
if ( rInf.ePos == FTNPOS_PAGE )
{
aPosPageBox.Check();
- aPageTemplLbl.Enable(FALSE);
- aPageTemplBox.Enable(FALSE);
+ aPageTemplLbl.Enable(sal_False);
+ aPageTemplBox.Enable(sal_False);
}
else // if ( rInf.ePos == FTNPOS_CHAPTER )
{
aPosChapterBox.Check();
aNumCountBox.RemoveEntry(aNumPage);
aNumCountBox.RemoveEntry(aNumChapter);
- bPosDoc = TRUE;
+ bPosDoc = sal_True;
}
// Verweistexte
aContEdit.SetText(rInf.aQuoVadis);
@@ -254,7 +254,7 @@ void SwEndNoteOptionPage::Reset( const SfxItemSet& )
else
{
ASSERT(!pColl->IsDefault(), "Defaultvorlage fuer Fussnoten ist falsch.");
- const USHORT nPos = aParaTemplBox.GetEntryPos(pColl->GetName());
+ const sal_uInt16 nPos = aParaTemplBox.GetEntryPos(pColl->GetName());
if( LISTBOX_ENTRY_NOTFOUND != nPos )
aParaTemplBox.SelectEntryPos( nPos );
else
@@ -268,7 +268,7 @@ void SwEndNoteOptionPage::Reset( const SfxItemSet& )
for( i = RES_POOLPAGE_BEGIN; i < RES_POOLPAGE_END; ++i )
aPageTemplBox.InsertEntry(SwStyleNameMapper::GetUIName( i, aEmptyStr ));
- USHORT nCount = pSh->GetPageDescCnt();
+ sal_uInt16 nCount = pSh->GetPageDescCnt();
for(i = 0; i < nCount; ++i)
{
const SwPageDesc &rPageDesc = pSh->GetPageDesc(i);
@@ -286,7 +286,7 @@ SwEndNoteOptionPage::~SwEndNoteOptionPage()
SfxTabPage *SwEndNoteOptionPage::Create( Window *pParent, const SfxItemSet &rSet )
{
- return new SwEndNoteOptionPage( pParent, TRUE, rSet );
+ return new SwEndNoteOptionPage( pParent, sal_True, rSet );
}
/*------------------------------------------------------------------------
@@ -322,7 +322,7 @@ void SwEndNoteOptionPage::SelectNumbering(int eNum)
int SwEndNoteOptionPage::GetNumbering() const
{
- const USHORT nPos = aNumCountBox.GetSelectEntryPos();
+ const sal_uInt16 nPos = aNumCountBox.GetSelectEntryPos();
return (int) bPosDoc? nPos + 1: nPos;
}
@@ -353,15 +353,15 @@ void SwEndNoteOptionPage::SetShell( SwWrtShell &rShell )
IMPL_LINK( SwEndNoteOptionPage, PosPageHdl, Button *, EMPTYARG )
{
const SwFtnNum eNum = (const SwFtnNum)GetNumbering();
- bPosDoc = FALSE;
+ bPosDoc = sal_False;
if(LISTBOX_ENTRY_NOTFOUND == aNumCountBox.GetEntryPos(aNumPage))
{
aNumCountBox.InsertEntry(aNumPage, FTNNUM_PAGE);
aNumCountBox.InsertEntry(aNumChapter, FTNNUM_CHAPTER);
SelectNumbering(eNum);
}
- aPageTemplLbl.Enable(FALSE);
- aPageTemplBox.Enable(FALSE);
+ aPageTemplLbl.Enable(sal_False);
+ aPageTemplBox.Enable(sal_False);
return 0;
}
@@ -373,10 +373,10 @@ IMPL_LINK( SwEndNoteOptionPage, PosPageHdl, Button *, EMPTYARG )
IMPL_LINK( SwEndNoteOptionPage, NumCountHdl, ListBox*, EMPTYARG )
{
- BOOL bEnable = TRUE;
+ sal_Bool bEnable = sal_True;
if( aNumCountBox.GetEntryCount() - 1 != aNumCountBox.GetSelectEntryPos() )
{
- bEnable = FALSE;
+ bEnable = sal_False;
aOffsetFld.SetValue(1);
}
aOffsetLbl.Enable(bEnable);
@@ -397,7 +397,7 @@ IMPL_LINK_INLINE_START( SwEndNoteOptionPage, PosChapterHdl, Button *, EMPTYARG )
if ( !bPosDoc )
SelectNumbering(FTNNUM_DOC);
- bPosDoc = TRUE;
+ bPosDoc = sal_True;
aNumCountBox.RemoveEntry(aNumPage);
aNumCountBox.RemoveEntry(aNumChapter);
aPageTemplLbl.Enable();
@@ -409,8 +409,8 @@ IMPL_LINK_INLINE_END( SwEndNoteOptionPage, PosChapterHdl, Button *, EMPTYARG )
SwCharFmt* lcl_GetCharFormat( SwWrtShell* pSh, const String& rCharFmtName )
{
SwCharFmt* pFmt = 0;
- USHORT nChCount = pSh->GetCharFmtCount();
- for(USHORT i = 0; i< nChCount; i++)
+ sal_uInt16 nChCount = pSh->GetCharFmtCount();
+ for(sal_uInt16 i = 0; i< nChCount; i++)
{
SwCharFmt& rChFmt = pSh->GetCharFmt(i);
if(rChFmt.GetName() == rCharFmtName )
@@ -431,11 +431,11 @@ SwCharFmt* lcl_GetCharFormat( SwWrtShell* pSh, const String& rCharFmtName )
return pFmt;
}
-BOOL SwEndNoteOptionPage::FillItemSet( SfxItemSet & )
+sal_Bool SwEndNoteOptionPage::FillItemSet( SfxItemSet & )
{
SwEndNoteInfo *pInf = bEndNote ? new SwEndNoteInfo() : new SwFtnInfo();
- pInf->nFtnOffset = static_cast< USHORT >(aOffsetFld.GetValue() -1);
+ pInf->nFtnOffset = static_cast< sal_uInt16 >(aOffsetFld.GetValue() -1);
pInf->aFmt.SetNumberingType(aNumViewBox.GetSelectedNumberingType() );
pInf->SetPrefix(aPrefixED.GetText());
pInf->SetSuffix(aSuffixED.GetText());
@@ -446,7 +446,7 @@ BOOL SwEndNoteOptionPage::FillItemSet( SfxItemSet & )
aFtnCharAnchorTemplBox.GetSelectEntry() ) );
// Absatzvorlage
- USHORT nPos = aParaTemplBox.GetSelectEntryPos();
+ sal_uInt16 nPos = aParaTemplBox.GetSelectEntryPos();
if(LISTBOX_ENTRY_NOTFOUND != nPos)
{
const String aFmtName( aParaTemplBox.GetSelectEntry() );
@@ -457,7 +457,7 @@ BOOL SwEndNoteOptionPage::FillItemSet( SfxItemSet & )
// Seitenvorlage
pInf->ChgPageDesc( pSh->FindPageDescByName(
- aPageTemplBox.GetSelectEntry(), TRUE ) );
+ aPageTemplBox.GetSelectEntry(), sal_True ) );
if ( bEndNote )
{
@@ -475,11 +475,11 @@ BOOL SwEndNoteOptionPage::FillItemSet( SfxItemSet & )
pSh->SetFtnInfo( *pI );
}
delete pInf;
- return TRUE;
+ return sal_True;
}
SwFootNoteOptionPage::SwFootNoteOptionPage( Window *pParent, const SfxItemSet &rSet ) :
- SwEndNoteOptionPage( pParent, FALSE, rSet )
+ SwEndNoteOptionPage( pParent, sal_False, rSet )
{
}
diff --git a/sw/source/ui/misc/glosbib.cxx b/sw/source/ui/misc/glosbib.cxx
index ddb966aad2..4be6db07bf 100644
--- a/sw/source/ui/misc/glosbib.cxx
+++ b/sw/source/ui/misc/glosbib.cxx
@@ -96,7 +96,7 @@ SwGlossaryGroupDlg::SwGlossaryGroupDlg(Window * pParent,
pRenamedArr(0),
pGlosHdl(pHdl)
{
- USHORT i;
+ sal_uInt16 i;
FreeResource();
@@ -121,7 +121,7 @@ SwGlossaryGroupDlg::SwGlossaryGroupDlg(Window * pParent,
INetURLObject aTempURL(sPath);
sPath = aTempURL.GetMainURL(INetURLObject::DECODE_WITH_CHARSET );
aPathLB.InsertEntry(sPath);
- ULONG nCaseReadonly = 0;
+ sal_uLong nCaseReadonly = 0;
utl::TempFile aTempFile(&sPath);
aTempFile.EnableKillingFile();
if(!aTempFile.IsValid())
@@ -131,9 +131,9 @@ SwGlossaryGroupDlg::SwGlossaryGroupDlg(Window * pParent,
aPathLB.SetEntryData(i, (void*)nCaseReadonly);
}
aPathLB.SelectEntryPos(0);
- aPathLB.Enable(TRUE);
+ aPathLB.Enable(sal_True);
- const USHORT nCount = pHdl->GetGroupCnt();
+ const sal_uInt16 nCount = pHdl->GetGroupCnt();
for(i = 0; i < nCount; ++i)
{
String sTitle;
@@ -146,7 +146,7 @@ SwGlossaryGroupDlg::SwGlossaryGroupDlg(Window * pParent,
String sTemp(sTitle);
//sGroup.GetToken(0, GLOS_DELIM)
sTemp += '\t';
- pData->sPath = aPathLB.GetEntry((USHORT)sGroup.GetToken(1, GLOS_DELIM).ToInt32());
+ pData->sPath = aPathLB.GetEntry((sal_uInt16)sGroup.GetToken(1, GLOS_DELIM).ToInt32());
sTemp += pData->sPath;
SvLBoxEntry* pEntry = aGroupTLB.InsertEntry(sTemp);
pEntry->SetUserData(pData);
@@ -192,8 +192,8 @@ void __EXPORT SwGlossaryGroupDlg::Apply()
if(pRemovedArr && pRemovedArr->Count())
{
- USHORT nCount = pRemovedArr->Count();
- for(USHORT i = 0; i < nCount; ++i)
+ sal_uInt16 nCount = pRemovedArr->Count();
+ for(sal_uInt16 i = 0; i < nCount; ++i)
{
const String* pDelEntry = (*pRemovedArr)[i];
const String sDelGroup = pDelEntry->GetToken(0, '\t');
@@ -224,8 +224,8 @@ void __EXPORT SwGlossaryGroupDlg::Apply()
//erst umbenennen, falls es schon eins gab
if(pRenamedArr && pRenamedArr->Count())
{
- USHORT nCount = pRenamedArr->Count();
- for(USHORT i = 0; i < nCount; ++i)
+ sal_uInt16 nCount = pRenamedArr->Count();
+ for(sal_uInt16 i = 0; i < nCount; ++i)
{
String * pEntry = (*pRenamedArr)[i];
xub_StrLen nStrSttPos = 0;
@@ -239,8 +239,8 @@ void __EXPORT SwGlossaryGroupDlg::Apply()
}
if(pInsertedArr && pInsertedArr->Count())
{
- USHORT nCount = pInsertedArr->Count();
- for(USHORT i = 0; i < nCount; ++i)
+ sal_uInt16 nCount = pInsertedArr->Count();
+ for(sal_uInt16 i = 0; i < nCount; ++i)
{
String sNewGroup = *(*pInsertedArr)[i];
String sNewTitle = sNewGroup.GetToken(0, GLOS_DELIM);
@@ -258,15 +258,15 @@ void __EXPORT SwGlossaryGroupDlg::Apply()
--------------------------------------------------*/
IMPL_LINK( SwGlossaryGroupDlg, SelectHdl, SvTabListBox*, EMPTYARG )
{
- aNewPB.Enable(FALSE);
+ aNewPB.Enable(sal_False);
SvLBoxEntry* pFirstEntry = aGroupTLB.FirstSelected();
if(pFirstEntry)
{
GlosBibUserData* pUserData = (GlosBibUserData*)pFirstEntry->GetUserData();
String sEntry(pUserData->sGroupName);
String sName(aNameED.GetText());
- BOOL bExists = FALSE;
- ULONG nPos = aGroupTLB.GetEntryPos(sName, 0);
+ sal_Bool bExists = sal_False;
+ sal_uLong nPos = aGroupTLB.GetEntryPos(sName, 0);
if( 0xffffffff > nPos)
{
SvLBoxEntry* pEntry = aGroupTLB.GetEntry(nPos);
@@ -318,24 +318,24 @@ IMPL_LINK( SwGlossaryGroupDlg, DeleteHdl, Button*, pButton )
SvLBoxEntry* pEntry = aGroupTLB.FirstSelected();
if(!pEntry)
{
- pButton->Enable(FALSE);
+ pButton->Enable(sal_False);
return 0;
}
GlosBibUserData* pUserData = (GlosBibUserData*)pEntry->GetUserData();
String sEntry(pUserData->sGroupName);
// befindet sich der zu loeschende Name schon unter den
// den neuen - dann weg damit
- BOOL bDelete = TRUE;
+ sal_Bool bDelete = sal_True;
if(pInsertedArr && pInsertedArr->Count())
{
- USHORT nCount = pInsertedArr->Count();
- for(USHORT i = 0; i < nCount; ++i)
+ sal_uInt16 nCount = pInsertedArr->Count();
+ for(sal_uInt16 i = 0; i < nCount; ++i)
{
const String* pTemp = (*pInsertedArr)[i];
if(*pTemp == sEntry)
{
pInsertedArr->Remove(i);
- bDelete = FALSE;
+ bDelete = sal_False;
break;
}
@@ -346,15 +346,15 @@ IMPL_LINK( SwGlossaryGroupDlg, DeleteHdl, Button*, pButton )
{
if(pRenamedArr && pRenamedArr->Count())
{
- USHORT nCount = pRenamedArr->Count();
- for(USHORT i = 0; i < nCount; ++i)
+ sal_uInt16 nCount = pRenamedArr->Count();
+ for(sal_uInt16 i = 0; i < nCount; ++i)
{
const String* pTemp = (*pRenamedArr)[i];
String sTemp( pTemp->GetToken(0, RENAME_TOKEN_DELIM ));
if(sTemp == sEntry)
{
pRenamedArr->Remove(i);
- bDelete = FALSE;
+ bDelete = sal_False;
break;
}
}
@@ -372,7 +372,7 @@ IMPL_LINK( SwGlossaryGroupDlg, DeleteHdl, Button*, pButton )
delete pUserData;
aGroupTLB.GetModel()->Remove(pEntry);
if(!aGroupTLB.First())
- pButton->Enable(FALSE);
+ pButton->Enable(sal_False);
//the content must be deleted - otherwise the new handler would be called in Apply()
aNameED.SetText(aEmptyStr);
return 0;
@@ -397,18 +397,18 @@ IMPL_LINK( SwGlossaryGroupDlg, RenameHdl, Button *, EMPTYARG )
// befindet sich der umzubenennende Name unter den
// den neuen - dann austauschen
- BOOL bDone = FALSE;
+ sal_Bool bDone = sal_False;
if(pInsertedArr && pInsertedArr->Count())
{
- USHORT nCount = pInsertedArr->Count();
- for(USHORT i = 0; i < nCount; ++i)
+ sal_uInt16 nCount = pInsertedArr->Count();
+ for(sal_uInt16 i = 0; i < nCount; ++i)
{
const String* pTemp = (*pInsertedArr)[i];
if(*pTemp == sEntry)
{
pInsertedArr->Remove(i);
pInsertedArr->Insert(new String(sNewName), pInsertedArr->Count());
- bDone = TRUE;
+ bDone = sal_True;
break;
}
}
@@ -447,17 +447,17 @@ IMPL_LINK( SwGlossaryGroupDlg, ModifyHdl, Edit*, EMPTYARG )
{
String sEntry(aNameED.GetText());
// sEntry.ToLower();
- BOOL bEnableNew = TRUE;
- BOOL bEnableDel = FALSE;
- ULONG nCaseReadonly =
- (ULONG)aPathLB.GetEntryData(aPathLB.GetSelectEntryPos());
- BOOL bDirReadonly = 0 != (nCaseReadonly&PATH_READONLY);
+ sal_Bool bEnableNew = sal_True;
+ sal_Bool bEnableDel = sal_False;
+ sal_uLong nCaseReadonly =
+ (sal_uLong)aPathLB.GetEntryData(aPathLB.GetSelectEntryPos());
+ sal_Bool bDirReadonly = 0 != (nCaseReadonly&PATH_READONLY);
if(!sEntry.Len() || bDirReadonly)
- bEnableNew = FALSE;
+ bEnableNew = sal_False;
else if(sEntry.Len())
{
- ULONG nPos = 0xffffffff;
+ sal_uLong nPos = 0xffffffff;
nPos = aGroupTLB.GetEntryPos(sEntry, 0);
@@ -465,12 +465,12 @@ IMPL_LINK( SwGlossaryGroupDlg, ModifyHdl, Edit*, EMPTYARG )
if( 0xffffffff == nPos)
{
const ::utl::TransliterationWrapper& rSCmp = GetAppCmpStrIgnore();
- for(USHORT i = 0; i < aGroupTLB.GetEntryCount(); i++)
+ for(sal_uInt16 i = 0; i < aGroupTLB.GetEntryCount(); i++)
{
String sTemp = aGroupTLB.GetEntryText( i, 0 );
- nCaseReadonly = (ULONG)aPathLB.GetEntryData(
+ nCaseReadonly = (sal_uLong)aPathLB.GetEntryData(
aPathLB.GetEntryPos(aGroupTLB.GetEntryText(i,1)));
- BOOL bCase = 0 != (nCaseReadonly & PATH_CASE_SENSITIVE);
+ sal_Bool bCase = 0 != (nCaseReadonly & PATH_CASE_SENSITIVE);
if( !bCase && rSCmp.isEqual( sTemp, sEntry ))
{
@@ -481,7 +481,7 @@ IMPL_LINK( SwGlossaryGroupDlg, ModifyHdl, Edit*, EMPTYARG )
}
if( 0xffffffff > nPos)
{
- bEnableNew = FALSE;
+ bEnableNew = sal_False;
aGroupTLB.Select(aGroupTLB.GetEntry( nPos ));
aGroupTLB.MakeVisible(aGroupTLB.GetEntry( nPos ));
}
@@ -508,23 +508,23 @@ IMPL_LINK( SwGlossaryGroupDlg, ModifyHdl, Edit*, EMPTYARG )
Beschreibung:
------------------------------------------------------------------------*/
-BOOL SwGlossaryGroupDlg::IsDeleteAllowed(const String &rGroup)
+sal_Bool SwGlossaryGroupDlg::IsDeleteAllowed(const String &rGroup)
{
- BOOL bDel = (!pGlosHdl->IsReadOnly(&rGroup));
+ sal_Bool bDel = (!pGlosHdl->IsReadOnly(&rGroup));
// OM: befindet sich der Name unter den den neuen Bereichsnamen,
// dann ist er auch loeschbar! Bei noch nicht existenten Bereichsnamen
- // liefert ReadOnly naemlich TRUE.
+ // liefert ReadOnly naemlich sal_True.
if(pInsertedArr && pInsertedArr->Count())
{
- USHORT nCount = pInsertedArr->Count();
- for(USHORT i = 0; i < nCount; ++i)
+ sal_uInt16 nCount = pInsertedArr->Count();
+ for(sal_uInt16 i = 0; i < nCount; ++i)
{
const String* pTemp = (*pInsertedArr)[i];
if(*pTemp == rGroup)
{
- bDel = TRUE;
+ bDel = sal_True;
break;
}
}
diff --git a/sw/source/ui/misc/glosdoc.cxx b/sw/source/ui/misc/glosdoc.cxx
index 11b50fde12..0482a4c0da 100644
--- a/sw/source/ui/misc/glosdoc.cxx
+++ b/sw/source/ui/misc/glosdoc.cxx
@@ -87,7 +87,7 @@ String lcl_CheckFileName( const String& rNewFilePath,
sRet.EraseLeadingChars();
sRet.EraseTrailingChars();
- BOOL bOk = FALSE;
+ sal_Bool bOk = sal_False;
if( sRet.Len() )
{
String sTmpDir(rNewFilePath);
@@ -270,7 +270,7 @@ sal_Bool SwGlossaries::RenameGroupDoc(
sOldFileURL += INET_PATH_TOKEN;
sOldFileURL += rOldGroup.GetToken(0, GLOS_DELIM);
sOldFileURL += SwGlossaries::GetExtension();
- BOOL bExist = FStatHelper::IsDocument( sOldFileURL );
+ sal_Bool bExist = FStatHelper::IsDocument( sOldFileURL );
DBG_ASSERT(bExist, "Gruppe existiert nicht!");
if(bExist)
{
@@ -290,8 +290,8 @@ sal_Bool SwGlossaries::RenameGroupDoc(
DBG_ASSERT(!bExist, "Gruppe existiert bereits!");
if(!bExist)
{
- BOOL bCopyCompleted = SWUnoHelper::UCB_CopyFile(
- sOldFileURL, sTempNewFilePath, TRUE );
+ sal_Bool bCopyCompleted = SWUnoHelper::UCB_CopyFile(
+ sOldFileURL, sTempNewFilePath, sal_True );
if(bCopyCompleted)
{
bRet = sal_True;
@@ -341,7 +341,7 @@ sal_Bool SwGlossaries::DelGroupDoc(const String &rName)
// Auch, wenn das File nicht existiert, muss es aus der Liste
// der Textbausteinbereiche entfernt werden
// Kein && wegen CFfront
- BOOL bRemoved = SWUnoHelper::UCB_DeleteFile( sFileURL );
+ sal_Bool bRemoved = SWUnoHelper::UCB_DeleteFile( sFileURL );
DBG_ASSERT(bRemoved, "file has not been removed");
RemoveFileFromList( aName );
return bRemoved;
@@ -389,7 +389,7 @@ SwTextBlocks* SwGlossaries::GetGlosDoc( const String &rName, sal_Bool bCreate )
sFileURL += INET_PATH_TOKEN;
sFileURL += aTmp;
- BOOL bExist = FALSE;
+ sal_Bool bExist = sal_False;
if(!bCreate)
bExist = FStatHelper::IsDocument( sFileURL );
@@ -427,7 +427,7 @@ SvStrings* SwGlossaries::GetNameList()
SWUnoHelper::UCB_GetFileListOfFolder( *(*m_pPathArr)[i], aFiles,
&sExt );
- for( USHORT nFiles = 0, nFEnd = aFiles.Count();
+ for( sal_uInt16 nFiles = 0, nFEnd = aFiles.Count();
nFiles < nFEnd; ++nFiles )
{
String* pTitle = aFiles[ nFiles ];
diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx
index b5c137a4e5..2203e216f4 100644
--- a/sw/source/ui/misc/glossary.cxx
+++ b/sw/source/ui/misc/glossary.cxx
@@ -134,11 +134,11 @@ struct GroupUserData
{
String sGroupName;
sal_uInt16 nPathIdx;
- BOOL bReadonly;
+ sal_Bool bReadonly;
GroupUserData()
: nPathIdx(0),
- bReadonly(FALSE) {}
+ bReadonly(sal_False) {}
};
/*------------------------------------------------------------------------
@@ -710,9 +710,9 @@ IMPL_LINK( SwGlossaryDlg, BibHdl, Button *, EMPTYARG )
//check if at least one glossary path is write enabled
SvtPathOptions aPathOpt;
String sGlosPath( aPathOpt.GetAutoTextPath() );
- USHORT nPaths = sGlosPath.GetTokenCount(';');
- BOOL bIsWritable = FALSE;
- for(USHORT nPath = 0; nPath < nPaths; nPath++)
+ sal_uInt16 nPaths = sGlosPath.GetTokenCount(';');
+ sal_Bool bIsWritable = sal_False;
+ for(sal_uInt16 nPath = 0; nPath < nPaths; nPath++)
{
String sPath = URIHelper::SmartRel2Abs(
INetURLObject(), sGlosPath.GetToken(nPath, ';'),
@@ -878,7 +878,7 @@ IMPL_LINK_INLINE_START( SwGlossaryDlg, EditHdl, Button *, EMPTYARG )
if(aEditBtn.GetCurItemId() == FN_GL_EDIT )
{
SwTextBlocks *pGroup = ::GetGlossaries()->GetGroupDoc ( GetCurrGrpName () );
- BOOL bRet = pGlossaryHdl->ConvertToNew ( *pGroup );
+ sal_Bool bRet = pGlossaryHdl->ConvertToNew ( *pGroup );
delete pGroup;
if ( bRet )
EndDialog(RET_EDIT);
@@ -1073,7 +1073,7 @@ sal_Bool SwGlTreeListBox::NotifyAcceptDrop( SvLBoxEntry* pEntry)
sal_Bool SwGlTreeListBox::NotifyMoving( SvLBoxEntry* pTarget,
SvLBoxEntry* pEntry,
SvLBoxEntry*& /*rpNewParent*/,
- ULONG& /*rNewChildPos*/
+ sal_uLong& /*rNewChildPos*/
)
{
pDragEntry = 0;
@@ -1121,7 +1121,7 @@ sal_Bool SwGlTreeListBox::NotifyMoving( SvLBoxEntry* pTarget,
sal_Bool SwGlTreeListBox::NotifyCopying( SvLBoxEntry* pTarget,
SvLBoxEntry* pEntry,
SvLBoxEntry*& /*rpNewParent*/,
- ULONG& /*rNewChildPos*/
+ sal_uLong& /*rNewChildPos*/
)
{
pDragEntry = 0;
@@ -1230,7 +1230,7 @@ IMPL_LINK( SwGlossaryDlg, ShowPreviewHdl, CheckBox *, pBox )
}
}
- BOOL bShow = pBox->IsChecked() && !bCreated;
+ sal_Bool bShow = pBox->IsChecked() && !bCreated;
aExampleWIN.Show( bShow );
aExampleDummyWIN.Show(!bShow);
if( ::GetCurrGlosGroup() )
@@ -1243,7 +1243,7 @@ IMPL_LINK( SwGlossaryDlg, ShowPreviewHdl, CheckBox *, pBox )
--------------------------------------------------*/
IMPL_LINK( SwGlossaryDlg, PreviewLoadedHdl, void *, EMPTYARG )
{
- BOOL bShow = aShowExampleCB.IsChecked();
+ sal_Bool bShow = aShowExampleCB.IsChecked();
aExampleWIN.Show( bShow );
aExampleDummyWIN.Show(!bShow);
ResumeShowAutoText();
@@ -1259,7 +1259,7 @@ void SwGlossaryDlg::ShowAutoText(const String& rGroup, const String& rShortName)
{
SetResumeData(rGroup, rShortName);
//try to make an Undo()
- pExampleFrame->ClearDocument( TRUE );
+ pExampleFrame->ClearDocument( sal_True );
}
}
/* -----------------------------21.12.00 11:33--------------------------------
diff --git a/sw/source/ui/misc/glshell.cxx b/sw/source/ui/misc/glshell.cxx
index d25c570ed0..969babef98 100644
--- a/sw/source/ui/misc/glshell.cxx
+++ b/sw/source/ui/misc/glshell.cxx
@@ -49,18 +49,13 @@
#include <view.hxx>
#include <glshell.hxx>
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <glosdoc.hxx>
#include <shellio.hxx>
#include <initui.hxx> // fuer ::GetGlossaries()
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
-#ifndef _SWERROR_H
#include <swerror.h>
-#endif
-#ifndef _MISC_HRC
#include <misc.hrc>
-#endif
#define SwWebGlosDocShell
@@ -105,7 +100,7 @@ void lcl_Execute( SwDocShell& rSh, SfxRequest& rReq )
void lcl_GetState( SwDocShell& rSh, SfxItemSet& rSet )
{
- if( SFX_ITEM_AVAILABLE >= rSet.GetItemState( SID_SAVEDOC, FALSE ))
+ if( SFX_ITEM_AVAILABLE >= rSet.GetItemState( SID_SAVEDOC, sal_False ))
{
if( !rSh.GetDoc()->IsModified() )
rSet.DisableItem( SID_SAVEDOC );
@@ -115,7 +110,7 @@ void lcl_GetState( SwDocShell& rSh, SfxItemSet& rSet )
}
-BOOL lcl_Save( SwWrtShell& rSh, const String& rGroupName,
+sal_Bool lcl_Save( SwWrtShell& rSh, const String& rGroupName,
const String& rShortNm, const String& rLongNm )
{
const SvxAutoCorrCfg* pCfg = SvxAutoCorrCfg::Get();
@@ -128,7 +123,7 @@ BOOL lcl_Save( SwWrtShell& rSh, const String& rGroupName,
pGlosHdl = rSh.GetView().GetGlosHdl();
pGlosHdl->GetMacros( rShortNm, aStart, aEnd, pBlock );
- USHORT nRet = rSh.SaveGlossaryDoc( *pBlock, rLongNm, rShortNm,
+ sal_uInt16 nRet = rSh.SaveGlossaryDoc( *pBlock, rLongNm, rShortNm,
pCfg->IsSaveRelFile(),
pBlock->IsOnlyTextBlock( rShortNm ) );
@@ -193,7 +188,7 @@ void SwGlosDocShell::GetState( SfxItemSet& rSet )
--------------------------------------------------------------------*/
-BOOL SwGlosDocShell::Save()
+sal_Bool SwGlosDocShell::Save()
{
// In case of an API object which holds this document, it is possible that the WrtShell is already
// dead. For instance, if the doc is modified via this API object, and then, upon office shutdown,
@@ -204,8 +199,8 @@ BOOL SwGlosDocShell::Save()
return ::lcl_Save( *GetWrtShell(), aGroupName, aShortName, aLongName );
else
{
- SetModified( FALSE );
- return FALSE;
+ SetModified( sal_False );
+ return sal_False;
}
}
@@ -256,15 +251,15 @@ void SwWebGlosDocShell::GetState( SfxItemSet& rSet )
--------------------------------------------------------------------*/
-BOOL SwWebGlosDocShell::Save()
+sal_Bool SwWebGlosDocShell::Save()
{
// same comment as in SwGlosDocShell::Save - see there
if ( GetWrtShell() )
return ::lcl_Save( *GetWrtShell(), aGroupName, aShortName, aLongName );
else
{
- SetModified( FALSE );
- return FALSE;
+ SetModified( sal_False );
+ return sal_False;
}
}
@@ -274,7 +269,7 @@ BOOL SwWebGlosDocShell::Save()
SV_IMPL_REF ( SwDocShell )
-SwDocShellRef SwGlossaries::EditGroupDoc( const String& rGroup, const String& rShortName, BOOL bShow )
+SwDocShellRef SwGlossaries::EditGroupDoc( const String& rGroup, const String& rShortName, sal_Bool bShow )
{
SwDocShellRef xDocSh;
@@ -283,7 +278,7 @@ SwDocShellRef SwGlossaries::EditGroupDoc( const String& rGroup, const String& rS
{
// erfrage welche View registriert ist. Im WebWriter gibts es keine
// normale View
- USHORT nViewId = 0 != &SwView::Factory() ? 2 : 6;
+ sal_uInt16 nViewId = 0 != &SwView::Factory() ? 2 : 6;
String sLongName = pGroup->GetLongName(pGroup->GetIndex( rShortName ));
if( 6 == nViewId )
@@ -311,8 +306,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 ) )
@@ -340,7 +336,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 0ea21406b5..29da9b203b 100644
--- a/sw/source/ui/misc/impfnote.hxx
+++ b/sw/source/ui/misc/impfnote.hxx
@@ -83,8 +83,8 @@ class SwEndNoteOptionPage : public SfxTabPage
String aNumPage;
String aNumChapter;
SwWrtShell *pSh;
- BOOL bPosDoc;
- BOOL bEndNote;
+ sal_Bool bPosDoc;
+ sal_Bool bEndNote;
inline void SelectNumbering(int eNum);
int GetNumbering() const;
@@ -95,12 +95,12 @@ class SwEndNoteOptionPage : public SfxTabPage
public:
- SwEndNoteOptionPage( Window *pParent, BOOL bEndNote,
+ SwEndNoteOptionPage( Window *pParent, sal_Bool bEndNote,
const SfxItemSet &rSet );
~SwEndNoteOptionPage();
static SfxTabPage *Create(Window *pParent, const SfxItemSet &rSet);
- virtual BOOL FillItemSet(SfxItemSet &rSet);
+ virtual sal_Bool FillItemSet(SfxItemSet &rSet);
virtual void Reset( const SfxItemSet& );
void SetShell( SwWrtShell &rShell );
diff --git a/sw/source/ui/misc/insfnote.cxx b/sw/source/ui/misc/insfnote.cxx
index 586de971fd..a5211af5fe 100644
--- a/sw/source/ui/misc/insfnote.cxx
+++ b/sw/source/ui/misc/insfnote.cxx
@@ -52,7 +52,7 @@
#include <svx/dialogs.hrc>
#include <sfx2/viewfrm.hxx>
-static BOOL bFootnote = TRUE;
+static sal_Bool bFootnote = sal_True;
/*------------------------------------------------------------------------
Beschreibung: Einfuegen der Fussnote durch OK
@@ -68,14 +68,14 @@ void __EXPORT SwInsFootNoteDlg::Apply()
if ( bEdit )
{
rSh.StartAction();
- rSh.Left(CRSR_SKIP_CHARS, FALSE, 1, FALSE );
+ rSh.Left(CRSR_SKIP_CHARS, sal_False, 1, sal_False );
rSh.StartUndo( UNDO_START );
SwFmtFtn aNote( aEndNoteBtn.IsChecked() );
aNote.SetNumStr( aStr );
if( rSh.SetCurFtn( aNote ) && bExtCharAvailable )
{
- rSh.Right(CRSR_SKIP_CHARS, TRUE, 1, FALSE );
+ rSh.Right(CRSR_SKIP_CHARS, sal_True, 1, sal_False );
SfxItemSet aSet( rSh.GetAttrPool(), RES_CHRATR_FONT, RES_CHRATR_FONT );
rSh.GetCurAttr( aSet );
SvxFontItem &rFont = (SvxFontItem &) aSet.Get( RES_CHRATR_FONT );
@@ -84,8 +84,8 @@ void __EXPORT SwInsFootNoteDlg::Apply()
eCharSet, RES_CHRATR_FONT );
aSet.Put( aFont );
rSh.SetAttr( aSet, nsSetAttrMode::SETATTR_DONTEXPAND );
- rSh.ResetSelect(0, FALSE);
- rSh.Left(CRSR_SKIP_CHARS, FALSE, 1, FALSE );
+ rSh.ResetSelect(0, sal_False);
+ rSh.Left(CRSR_SKIP_CHARS, sal_False, 1, sal_False );
}
rSh.EndUndo( UNDO_END );
rSh.EndAction();
@@ -98,7 +98,7 @@ void __EXPORT SwInsFootNoteDlg::Apply()
if ( bExtCharAvailable )
{
- rSh.Left( CRSR_SKIP_CHARS, TRUE, 1, FALSE );
+ rSh.Left( CRSR_SKIP_CHARS, sal_True, 1, sal_False );
SfxItemSet aSet( rSh.GetAttrPool(), RES_CHRATR_FONT, RES_CHRATR_FONT );
rSh.GetAttr( aSet );
SvxFontItem &rFont = (SvxFontItem &) aSet.Get( RES_CHRATR_FONT );
@@ -108,7 +108,7 @@ void __EXPORT SwInsFootNoteDlg::Apply()
aSet.Put( aFont );
rSh.SetAttr( aSet, SETATTR_DONTEXPAND );
// zur Bearbeitung des Fussnotentextes
- rSh.ResetSelect(0, FALSE);
+ rSh.ResetSelect(0, sal_False);
rSh.GotoFtnTxt();
}
rSh.EndUndo( UNDO_UI_INSERT_FOOTNOTE );
@@ -137,7 +137,7 @@ IMPL_LINK_INLINE_END( SwInsFootNoteDlg, NumberCharHdl, Button *, EMPTYARG )
IMPL_LINK_INLINE_START( SwInsFootNoteDlg, NumberEditHdl, void *, EMPTYARG )
{
- aNumberCharBtn.Check( TRUE );
+ aNumberCharBtn.Check( sal_True );
aOkBtn.Enable( 0 != aNumberCharEdit.GetText().Len() );
return 0;
@@ -150,7 +150,7 @@ IMPL_LINK_INLINE_END( SwInsFootNoteDlg, NumberEditHdl, void *, EMPTYARG )
IMPL_LINK_INLINE_START( SwInsFootNoteDlg, NumberAutoBtnHdl, Button *, EMPTYARG )
{
- aOkBtn.Enable( TRUE );
+ aOkBtn.Enable( sal_True );
return 0;
}
IMPL_LINK_INLINE_END( SwInsFootNoteDlg, NumberAutoBtnHdl, Button *, EMPTYARG )
@@ -161,14 +161,14 @@ IMPL_LINK_INLINE_END( SwInsFootNoteDlg, NumberAutoBtnHdl, Button *, EMPTYARG )
IMPL_LINK( SwInsFootNoteDlg, NumberExtCharHdl, Button *, EMPTYARG )
{
- aNumberCharBtn.Check( TRUE );
+ aNumberCharBtn.Check( sal_True );
SfxItemSet aSet( rSh.GetAttrPool(), RES_CHRATR_FONT, RES_CHRATR_FONT );
rSh.GetCurAttr( aSet );
const SvxFontItem &rFont = (SvxFontItem &) aSet.Get( RES_CHRATR_FONT );
SfxAllItemSet aAllSet( rSh.GetAttrPool() );
- aAllSet.Put( SfxBoolItem( FN_PARAM_1, FALSE ) );
+ aAllSet.Put( SfxBoolItem( FN_PARAM_1, sal_False ) );
aAllSet.Put( rFont );
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
@@ -176,8 +176,8 @@ IMPL_LINK( SwInsFootNoteDlg, NumberExtCharHdl, Button *, EMPTYARG )
rSh.GetView().GetViewFrame()->GetFrame().GetFrameInterface(), RID_SVXDLG_CHARMAP );
if (RET_OK == pDlg->Execute())
{
- SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pItem, SfxStringItem, SID_CHARMAP, FALSE );
- SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pFontItem, SvxFontItem, SID_ATTR_CHAR_FONT, FALSE );
+ SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pItem, SfxStringItem, SID_CHARMAP, sal_False );
+ SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pFontItem, SvxFontItem, SID_ATTR_CHAR_FONT, sal_False );
if ( pItem )
{
String sExtChars(pItem->GetValue());
@@ -193,7 +193,7 @@ IMPL_LINK( SwInsFootNoteDlg, NumberExtCharHdl, Button *, EMPTYARG )
aNumberCharEdit.SetFont( aFont );
}
- bExtCharAvailable = TRUE;
+ bExtCharAvailable = sal_True;
aOkBtn.Enable(0 != aNumberCharEdit.GetText().Len());
}
}
@@ -211,7 +211,7 @@ IMPL_LINK( SwInsFootNoteDlg, NextPrevHdl, Button *, pBtn )
Apply();
// Hier zur naechsten Fuss/Endnote wandern
- rSh.ResetSelect(0, FALSE);
+ rSh.ResetSelect(0, sal_False);
if (pBtn == &aNextBT)
rSh.GotoNextFtnAnchor();
else
@@ -226,12 +226,12 @@ IMPL_LINK( SwInsFootNoteDlg, NextPrevHdl, Button *, pBtn )
Beschreibung:
------------------------------------------------------------------------*/
-SwInsFootNoteDlg::SwInsFootNoteDlg(Window *pParent, SwWrtShell &rShell, BOOL bEd) :
+SwInsFootNoteDlg::SwInsFootNoteDlg(Window *pParent, SwWrtShell &rShell, sal_Bool bEd) :
SvxStandardDialog(pParent,SW_RES(DLG_INS_FOOTNOTE)),
rSh(rShell),
- bExtCharAvailable(FALSE),
+ bExtCharAvailable(sal_False),
bEdit(bEd),
aNumberAutoBtn (this,SW_RES(RB_NUMBER_AUTO)),
aNumberCharBtn (this,SW_RES(RB_NUMBER_CHAR)),
@@ -281,7 +281,7 @@ SwInsFootNoteDlg::~SwInsFootNoteDlg()
rSh.SetCareWin(0);
if (bEdit)
- rSh.ResetSelect(0, FALSE);
+ rSh.ResetSelect(0, sal_False);
}
/*------------------------------------------------------------------------
@@ -293,7 +293,7 @@ void SwInsFootNoteDlg::Init()
SwFmtFtn aFtnNote;
String sNumStr;
Font aFont;
- bExtCharAvailable = FALSE;
+ bExtCharAvailable = sal_False;
rSh.StartAction();
@@ -303,7 +303,7 @@ void SwInsFootNoteDlg::Init()
{
sNumStr = aFtnNote.GetNumStr();
- rSh.Right(CRSR_SKIP_CHARS, TRUE, 1, FALSE );
+ rSh.Right(CRSR_SKIP_CHARS, sal_True, 1, sal_False );
SfxItemSet aSet( rSh.GetAttrPool(), RES_CHRATR_FONT, RES_CHRATR_FONT );
rSh.GetCurAttr( aSet );
const SvxFontItem &rFont = (SvxFontItem &) aSet.Get( RES_CHRATR_FONT );
@@ -313,14 +313,14 @@ void SwInsFootNoteDlg::Init()
eCharSet = rFont.GetCharSet();
aFont.SetName(aFontName);
aFont.SetCharSet(eCharSet);
- bExtCharAvailable = TRUE;
- rSh.Left( CRSR_SKIP_CHARS, FALSE, 1, FALSE );
+ bExtCharAvailable = sal_True;
+ rSh.Left( CRSR_SKIP_CHARS, sal_False, 1, sal_False );
}
bFootnote = !aFtnNote.IsEndNote();
}
aNumberCharEdit.SetFont(aFont);
- BOOL bNumChar = sNumStr.Len() != 0;
+ sal_Bool bNumChar = sNumStr.Len() != 0;
aNumberCharEdit.SetText(sNumStr);
aNumberCharBtn.Check(bNumChar);
@@ -333,12 +333,12 @@ void SwInsFootNoteDlg::Init()
else
aEndNoteBtn.Check();
- BOOL bNext = rSh.GotoNextFtnAnchor();
+ sal_Bool bNext = rSh.GotoNextFtnAnchor();
if (bNext)
rSh.GotoPrevFtnAnchor();
- BOOL bPrev = rSh.GotoPrevFtnAnchor();
+ sal_Bool bPrev = rSh.GotoPrevFtnAnchor();
if (bPrev)
rSh.GotoNextFtnAnchor();
@@ -346,7 +346,7 @@ void SwInsFootNoteDlg::Init()
aPrevBT.Enable(bPrev);
aNextBT.Enable(bNext);
- rSh.Right(CRSR_SKIP_CHARS, TRUE, 1, FALSE );
+ rSh.Right(CRSR_SKIP_CHARS, sal_True, 1, sal_False );
rSh.EndAction();
}
diff --git a/sw/source/ui/misc/insrule.cxx b/sw/source/ui/misc/insrule.cxx
index c508f83dd2..9bc004f771 100644
--- a/sw/source/ui/misc/insrule.cxx
+++ b/sw/source/ui/misc/insrule.cxx
@@ -82,7 +82,7 @@ SwInsertGrfRulerDlg::SwInsertGrfRulerDlg( Window* pParent ) :
pExampleVS->InsertItem( 1, 1);
pExampleVS->SetItemText( 1, sSimple);
- for(USHORT i = 1; i <= aGrfNames.Count(); i++)
+ for(sal_uInt16 i = 1; i <= aGrfNames.Count(); i++)
{
pExampleVS->InsertItem( i + 1, i);
pExampleVS->SetItemText( i + 1, *((String*)aGrfNames.GetObject(i-1)));
@@ -107,7 +107,7 @@ SwInsertGrfRulerDlg::~SwInsertGrfRulerDlg()
String SwInsertGrfRulerDlg::GetGraphicName()
{
String sRet;
- USHORT nSel = nSelPos - 2; //align selection position with ValueSet index
+ sal_uInt16 nSel = nSelPos - 2; //align selection position with ValueSet index
if(nSel < aGrfNames.Count())
sRet = URIHelper::SmartRel2Abs(
INetURLObject(), *(String*) aGrfNames.GetObject(nSel),
@@ -147,7 +147,7 @@ void __EXPORT SwRulerValueSet::UserDraw( const UserDrawEvent& rUDEvt )
{
Rectangle aRect = rUDEvt.GetRect();
OutputDevice* pDev = rUDEvt.GetDevice();
- USHORT nItemId = rUDEvt.GetItemId();
+ sal_uInt16 nItemId = rUDEvt.GetItemId();
Point aBLPos = aRect.TopLeft();
// Itemzaehlung beginnt bei 1, und die 1. ist die einfache Linie
@@ -189,7 +189,7 @@ void __EXPORT SwRulerValueSet::UserDraw( const UserDrawEvent& rUDEvt )
}
else
{
- SetGrfNotFound(TRUE);
+ SetGrfNotFound(sal_True);
}
}
else
diff --git a/sw/source/ui/misc/linenum.cxx b/sw/source/ui/misc/linenum.cxx
index 918d18128d..4cca0d1aa6 100644
--- a/sw/source/ui/misc/linenum.cxx
+++ b/sw/source/ui/misc/linenum.cxx
@@ -163,7 +163,7 @@ void __EXPORT SwLineNumberingPage::Reset( const SfxItemSet& )
IDocumentStylePoolAccess* pIDSPA = pSh->getIDocumentStylePoolAccess();
String sStyleName(rInf.GetCharFmt( *pIDSPA )->GetName());
- const USHORT nPos = aCharStyleLB.GetEntryPos(sStyleName);
+ const sal_uInt16 nPos = aCharStyleLB.GetEntryPos(sStyleName);
if (nPos != LISTBOX_ENTRY_NOTFOUND)
aCharStyleLB.SelectEntryPos(nPos);
@@ -178,13 +178,13 @@ void __EXPORT SwLineNumberingPage::Reset( const SfxItemSet& )
// Format
// SwFldMgr aMgr( pSh );
- USHORT nSelFmt = rInf.GetNumType().GetNumberingType();
-// USHORT nCnt = aMgr.GetFormatCount( TYP_SEQFLD, FALSE );
+ sal_uInt16 nSelFmt = rInf.GetNumType().GetNumberingType();
+// sal_uInt16 nCnt = aMgr.GetFormatCount( TYP_SEQFLD, sal_False );
-// for( USHORT i = 0; i < nCnt; i++)
+// for( sal_uInt16 i = 0; i < nCnt; i++)
// {
// aFormatLB.InsertEntry(aMgr.GetFormatStr( TYP_SEQFLD, i));
-// USHORT nFmtId = aMgr.GetFormatId( TYP_SEQFLD, i );
+// sal_uInt16 nFmtId = aMgr.GetFormatId( TYP_SEQFLD, i );
// aFormatLB.SetEntryData( i, (void*)nFmtId );
// if( nFmtId == nSelFmt )
// aFormatLB.SelectEntryPos( i );
@@ -195,10 +195,10 @@ void __EXPORT SwLineNumberingPage::Reset( const SfxItemSet& )
// aFormatLB.SelectEntryPos(aFormatLB.GetEntryCount() - 1);
// Position
- aPosLB.SelectEntryPos((USHORT)rInf.GetPos());
+ aPosLB.SelectEntryPos((sal_uInt16)rInf.GetPos());
// Offset
- USHORT nOffset = rInf.GetPosFromLeft();
+ sal_uInt16 nOffset = rInf.GetPosFromLeft();
if (nOffset == USHRT_MAX)
nOffset = 0;
@@ -232,7 +232,7 @@ void __EXPORT SwLineNumberingPage::Reset( const SfxItemSet& )
IMPL_LINK( SwLineNumberingPage, ModifyHdl, Edit *, EMPTYARG )
{
- BOOL bHasValue = aDivisorED.GetText().Len() != 0;
+ sal_Bool bHasValue = aDivisorED.GetText().Len() != 0;
aDivIntervalFT.Enable(bHasValue);
aDivIntervalNF.Enable(bHasValue);
@@ -247,7 +247,7 @@ IMPL_LINK( SwLineNumberingPage, ModifyHdl, Edit *, EMPTYARG )
IMPL_LINK( SwLineNumberingPage, LineOnOffHdl, CheckBox *, EMPTYARG )
{
- BOOL bEnable = aNumberingOnCB.IsChecked();
+ sal_Bool bEnable = aNumberingOnCB.IsChecked();
aCharStyleFT.Enable(bEnable);
aCharStyleLB.Enable(bEnable);
@@ -279,7 +279,7 @@ IMPL_LINK( SwLineNumberingPage, LineOnOffHdl, CheckBox *, EMPTYARG )
Beschreibung:
-----------------------------------------------------------------------*/
-BOOL __EXPORT SwLineNumberingPage::FillItemSet( SfxItemSet& )
+sal_Bool __EXPORT SwLineNumberingPage::FillItemSet( SfxItemSet& )
{
SwLineNumberInfo aInf(pSh->GetLineNumberInfo());
@@ -309,16 +309,16 @@ BOOL __EXPORT SwLineNumberingPage::FillItemSet( SfxItemSet& )
aInf.SetPos((LineNumberPosition)aPosLB.GetSelectEntryPos());
// Offset
- aInf.SetPosFromLeft((USHORT)aOffsetMF.Denormalize(aOffsetMF.GetValue(FUNIT_TWIP)));
+ aInf.SetPosFromLeft((sal_uInt16)aOffsetMF.Denormalize(aOffsetMF.GetValue(FUNIT_TWIP)));
// Numerierungsoffset
- aInf.SetCountBy((USHORT)aNumIntervalNF.GetValue());
+ aInf.SetCountBy((sal_uInt16)aNumIntervalNF.GetValue());
// Teiler
aInf.SetDivider(aDivisorED.GetText());
// Teileroffset
- aInf.SetDividerCountBy((USHORT)aDivIntervalNF.GetValue());
+ aInf.SetDividerCountBy((sal_uInt16)aDivIntervalNF.GetValue());
// Zaehlen
aInf.SetCountBlankLines(aCountEmptyLinesCB.IsChecked());
@@ -329,7 +329,7 @@ BOOL __EXPORT SwLineNumberingPage::FillItemSet( SfxItemSet& )
pSh->SetLineNumberInfo(aInf);
- return FALSE;
+ return sal_False;
}
diff --git a/sw/source/ui/misc/num.cxx b/sw/source/ui/misc/num.cxx
index 2e9e318c76..a5fd3511fa 100644
--- a/sw/source/ui/misc/num.cxx
+++ b/sw/source/ui/misc/num.cxx
@@ -93,7 +93,7 @@
#include <svl/aeitem.hxx>
#include <svl/slstitm.hxx>
-static BOOL bLastRelative = FALSE;
+static sal_Bool bLastRelative = sal_False;
/*-----------------03.12.97 10:02-------------------
@@ -134,8 +134,8 @@ SwNumPositionTabPage::SwNumPositionTabPage(Window* pParent,
pSaveNum(0),
pWrtSh(0),
pOutlineDlg(0),
- bPreset( FALSE ),
- bInInintControl(FALSE),
+ bPreset( sal_False ),
+ bInInintControl(sal_False),
// --> OD 2008-02-01 #newlistlevelattrs#
bLabelAlignmentPosAndSpaceModeActive( false )
// <--
@@ -148,7 +148,7 @@ SwNumPositionTabPage::SwNumPositionTabPage(Window* pParent,
aAlignLB.SetSelectHdl(LINK(this, SwNumPositionTabPage, EditModifyHdl));
// --> OD 2008-02-01 #newlistlevelattrs#
aAlign2LB.SetSelectHdl(LINK(this, SwNumPositionTabPage, EditModifyHdl));
- for ( USHORT i = 0; i < aAlignLB.GetEntryCount(); ++i )
+ for ( sal_uInt16 i = 0; i < aAlignLB.GetEntryCount(); ++i )
{
aAlign2LB.InsertEntry( aAlignLB.GetEntry( i ) );
}
@@ -192,7 +192,7 @@ SwNumPositionTabPage::SwNumPositionTabPage(Window* pParent,
aStandardPB.SetClickHdl(LINK(this, SwNumPositionTabPage, StandardHdl));
// Ebenen einfuegen
- for(USHORT i = 1; i <= MAXLEVEL; i++)
+ for(sal_uInt16 i = 1; i <= MAXLEVEL; i++)
aLevelLB.InsertEntry(String::CreateFromInt32(i));
String sEntry(String::CreateFromAscii("1 - "));
sEntry += String::CreateFromInt32(MAXLEVEL);
@@ -214,7 +214,7 @@ SwNumPositionTabPage::~SwNumPositionTabPage()
--------------------------------------------------*/
void SwNumPositionTabPage::InitControls()
{
- bInInintControl = TRUE;
+ bInInintControl = sal_True;
// --> OD 2008-02-01 #newlistlevelattrs#
const bool bRelative = !bLabelAlignmentPosAndSpaceModeActive &&
aRelativeCB.IsEnabled() && aRelativeCB.IsChecked();
@@ -242,11 +242,11 @@ void SwNumPositionTabPage::InitControls()
const SwNumFmt* aNumFmtArr[MAXLEVEL];
const SwFmtVertOrient* pFirstOrient = 0;
- USHORT nMask = 1;
- USHORT nLvl = USHRT_MAX;
+ sal_uInt16 nMask = 1;
+ sal_uInt16 nLvl = USHRT_MAX;
long nFirstBorderText = 0;
long nFirstBorderTextRelative = -1;
- for(USHORT i = 0; i < MAXLEVEL; i++)
+ for(sal_uInt16 i = 0; i < MAXLEVEL; i++)
{
aNumFmtArr[i] = &pActNum->Get(i);
if(nActNumLvl & nMask)
@@ -329,7 +329,7 @@ void SwNumPositionTabPage::InitControls()
aDistBorderMF.SetValue(aDistBorderMF.Normalize(nDistBorderNum),FUNIT_TWIP);
}
else
- bSetDistEmpty = TRUE;
+ bSetDistEmpty = sal_True;
if(bSameDist)
aDistNumMF .SetValue(aDistNumMF.Normalize(aNumFmtArr[nLvl]->GetCharTextDistance()), FUNIT_TWIP);
@@ -342,7 +342,7 @@ void SwNumPositionTabPage::InitControls()
if(bSameAdjust)
{
- USHORT nPos = 1; // zentriert
+ sal_uInt16 nPos = 1; // zentriert
if(aNumFmtArr[nLvl]->GetNumAdjust() == SVX_ADJUST_LEFT)
nPos = 0;
else if(aNumFmtArr[nLvl]->GetNumAdjust() == SVX_ADJUST_RIGHT)
@@ -363,7 +363,7 @@ void SwNumPositionTabPage::InitControls()
// --> OD 2008-02-01 #newlistlevelattrs#
if ( bSameLabelFollowedBy )
{
- USHORT nPos = 0; // LISTTAB
+ sal_uInt16 nPos = 0; // LISTTAB
if ( aNumFmtArr[nLvl]->GetLabelFollowedBy() == SvxNumberFormat::SPACE )
{
nPos = 1;
@@ -422,10 +422,10 @@ void SwNumPositionTabPage::InitControls()
}
// <--
- if(TRUE == bSetDistEmpty)
+ if(sal_True == bSetDistEmpty)
aDistBorderMF.SetText(aEmptyStr);
- bInInintControl = FALSE;
+ bInInintControl = sal_False;
}
/*-----------------03.12.97 10:02-------------------
@@ -434,10 +434,10 @@ void SwNumPositionTabPage::InitControls()
void SwNumPositionTabPage::ActivatePage(const SfxItemSet& )
{
const SfxPoolItem* pItem;
- UINT16 nTmpNumLvl =
+ sal_uInt16 nTmpNumLvl =
pOutlineDlg ? pOutlineDlg->GetActNumLevel() : 0;
const SfxItemSet* pExampleSet = GetTabDialog()->GetExampleSet();
- if(pExampleSet && pExampleSet->GetItemState(FN_PARAM_NUM_PRESET, FALSE, &pItem))
+ if(pExampleSet && pExampleSet->GetItemState(FN_PARAM_NUM_PRESET, sal_False, &pItem))
{
bPreset = ((const SfxBoolItem*)pItem)->GetValue();
}
@@ -448,18 +448,18 @@ void SwNumPositionTabPage::ActivatePage(const SfxItemSet& )
{
*pActNum = *pSaveNum;
nActNumLvl = nTmpNumLvl;
- USHORT nMask = 1;
- aLevelLB.SetUpdateMode(FALSE);
+ sal_uInt16 nMask = 1;
+ aLevelLB.SetUpdateMode(sal_False);
aLevelLB.SetNoSelection();
aLevelLB.SelectEntryPos( MAXLEVEL, nActNumLvl == USHRT_MAX);
if(nActNumLvl != USHRT_MAX)
- for(USHORT i = 0; i < MAXLEVEL; i++)
+ for(sal_uInt16 i = 0; i < MAXLEVEL; i++)
{
if(nActNumLvl & nMask)
- aLevelLB.SelectEntryPos( i, TRUE);
+ aLevelLB.SelectEntryPos( i, sal_True);
nMask <<= 1 ;
}
- aLevelLB.SetUpdateMode(TRUE);
+ aLevelLB.SetUpdateMode(sal_True);
// --> OD 2008-02-01 #newlistlevelattrs#
InitPosAndSpaceMode();
@@ -480,14 +480,14 @@ int SwNumPositionTabPage::DeactivatePage(SfxItemSet *_pSet)
SwOutlineTabDialog::SetActNumLevel(nActNumLvl);
if(_pSet)
FillItemSet(*_pSet);
- return TRUE;
+ return sal_True;
}
/*-----------------03.12.97 10:02-------------------
--------------------------------------------------*/
-BOOL SwNumPositionTabPage::FillItemSet( SfxItemSet& rSet )
+sal_Bool SwNumPositionTabPage::FillItemSet( SfxItemSet& rSet )
{
if(pOutlineDlg)
*pOutlineDlg->GetNumRule() = *pActNum;
@@ -495,7 +495,7 @@ BOOL SwNumPositionTabPage::FillItemSet( SfxItemSet& rSet )
{
*pSaveNum = *pActNum;
rSet.Put(SwUINumRuleItem( *pSaveNum ));
- rSet.Put(SfxBoolItem(FN_PARAM_NUM_PRESET, FALSE));
+ rSet.Put(SfxBoolItem(FN_PARAM_NUM_PRESET, sal_False));
}
return bModified;
}
@@ -509,27 +509,27 @@ void SwNumPositionTabPage::Reset( const SfxItemSet& rSet )
if(pOutlineDlg)
{
pSaveNum = pOutlineDlg->GetNumRule();
- aLevelLB.EnableMultiSelection(FALSE);
+ aLevelLB.EnableMultiSelection(sal_False);
}
- else if(SFX_ITEM_SET == rSet.GetItemState(FN_PARAM_ACT_NUMBER, FALSE, &pItem))
+ else if(SFX_ITEM_SET == rSet.GetItemState(FN_PARAM_ACT_NUMBER, sal_False, &pItem))
pSaveNum = ((SwUINumRuleItem*)pItem)->GetNumRule();
nActNumLvl = SwOutlineTabDialog::GetActNumLevel();
- USHORT nMask = 1;
- aLevelLB.SetUpdateMode(FALSE);
+ sal_uInt16 nMask = 1;
+ aLevelLB.SetUpdateMode(sal_False);
aLevelLB.SetNoSelection();
if(nActNumLvl == USHRT_MAX)
{
- aLevelLB.SelectEntryPos( MAXLEVEL, TRUE);
+ aLevelLB.SelectEntryPos( MAXLEVEL, sal_True);
}
else
- for(USHORT i = 0; i < MAXLEVEL; i++)
+ for(sal_uInt16 i = 0; i < MAXLEVEL; i++)
{
if(nActNumLvl & nMask)
- aLevelLB.SelectEntryPos( i, TRUE);
+ aLevelLB.SelectEntryPos( i, sal_True);
nMask <<= 1;
}
- aLevelLB.SetUpdateMode(TRUE);
+ aLevelLB.SetUpdateMode(sal_True);
if(!pActNum)
pActNum = new SwNumRule(*pSaveNum);
@@ -541,7 +541,7 @@ void SwNumPositionTabPage::Reset( const SfxItemSet& rSet )
ShowControlsDependingOnPosAndSpaceMode();
// <--
InitControls();
- bModified = FALSE;
+ bModified = sal_False;
}
// --> OD 2008-01-11 #newlistlevelattrs#
@@ -556,8 +556,8 @@ void SwNumPositionTabPage::InitPosAndSpaceMode()
SvxNumberFormat::SvxNumPositionAndSpaceMode ePosAndSpaceMode =
SvxNumberFormat::LABEL_ALIGNMENT;
- USHORT nMask = 1;
- for( USHORT i = 0; i < MAXLEVEL; ++i )
+ sal_uInt16 nMask = 1;
+ for( sal_uInt16 i = 0; i < MAXLEVEL; ++i )
{
if(nActNumLvl & nMask)
{
@@ -667,15 +667,15 @@ void SwNumPositionTabPage::SetWrtShell(SwWrtShell* pSh)
--------------------------------------------------*/
IMPL_LINK( SwNumPositionTabPage, EditModifyHdl, Edit *, EMPTYARG )
{
- USHORT nMask = 1;
- for(USHORT i = 0; i < MAXLEVEL; i++)
+ sal_uInt16 nMask = 1;
+ for(sal_uInt16 i = 0; i < MAXLEVEL; i++)
{
if(nActNumLvl & nMask)
{
SwNumFmt aNumFmt(pActNum->Get(i));
// --> OD 2008-02-01 #newlistlevelattrs#
- const USHORT nPos = aAlignLB.IsVisible()
+ const sal_uInt16 nPos = aAlignLB.IsVisible()
? aAlignLB.GetSelectEntryPos()
: aAlign2LB.GetSelectEntryPos();
// <--
@@ -697,33 +697,33 @@ IMPL_LINK( SwNumPositionTabPage, EditModifyHdl, Edit *, EMPTYARG )
--------------------------------------------------*/
IMPL_LINK( SwNumPositionTabPage, LevelHdl, ListBox *, pBox )
{
- USHORT nSaveNumLvl = nActNumLvl;
+ sal_uInt16 nSaveNumLvl = nActNumLvl;
nActNumLvl = 0;
if(pBox->IsEntryPosSelected( MAXLEVEL ) &&
(pBox->GetSelectEntryCount() == 1 || nSaveNumLvl != 0xffff))
{
nActNumLvl = 0xFFFF;
- pBox->SetUpdateMode(FALSE);
- for( USHORT i = 0; i < MAXLEVEL; i++ )
- pBox->SelectEntryPos( i, FALSE );
- pBox->SetUpdateMode(TRUE);
+ pBox->SetUpdateMode(sal_False);
+ for( sal_uInt16 i = 0; i < MAXLEVEL; i++ )
+ pBox->SelectEntryPos( i, sal_False );
+ pBox->SetUpdateMode(sal_True);
}
else if(pBox->GetSelectEntryCount())
{
- USHORT nMask = 1;
- for( USHORT i = 0; i < MAXLEVEL; i++ )
+ sal_uInt16 nMask = 1;
+ for( sal_uInt16 i = 0; i < MAXLEVEL; i++ )
{
if(pBox->IsEntryPosSelected( i ))
nActNumLvl |= nMask;
nMask <<= 1;
}
- pBox->SelectEntryPos( MAXLEVEL, FALSE );
+ pBox->SelectEntryPos( MAXLEVEL, sal_False );
}
else
{
nActNumLvl = nSaveNumLvl;
- USHORT nMask = 1;
- for( USHORT i = 0; i < MAXLEVEL; i++ )
+ sal_uInt16 nMask = 1;
+ for( sal_uInt16 i = 0; i < MAXLEVEL; i++ )
{
if(nActNumLvl & nMask)
{
@@ -750,8 +750,8 @@ IMPL_LINK( SwNumPositionTabPage, DistanceHdl, MetricField *, pFld )
if(bInInintControl)
return 0;
long nValue = static_cast< long >(pFld->Denormalize(pFld->GetValue(FUNIT_TWIP)));
- USHORT nMask = 1;
- for(USHORT i = 0; i < MAXLEVEL; i++)
+ sal_uInt16 nMask = 1;
+ for(sal_uInt16 i = 0; i < MAXLEVEL; i++)
{
if(nActNumLvl & nMask)
{
@@ -764,7 +764,7 @@ IMPL_LINK( SwNumPositionTabPage, DistanceHdl, MetricField *, pFld )
if(0 == i)
{
long nTmp = aNumFmt.GetFirstLineOffset();
- aNumFmt.SetAbsLSpace( USHORT(nValue - nTmp));
+ aNumFmt.SetAbsLSpace( sal_uInt16(nValue - nTmp));
}
else
{
@@ -772,7 +772,7 @@ IMPL_LINK( SwNumPositionTabPage, DistanceHdl, MetricField *, pFld )
pActNum->Get( i - 1 ).GetFirstLineOffset() -
pActNum->Get( i ).GetFirstLineOffset();
- aNumFmt.SetAbsLSpace( USHORT(nValue + nTmp));
+ aNumFmt.SetAbsLSpace( sal_uInt16(nValue + nTmp));
}
}
else
@@ -789,7 +789,7 @@ IMPL_LINK( SwNumPositionTabPage, DistanceHdl, MetricField *, pFld )
//jetzt muss mit dem FirstLineOffset auch der AbsLSpace veraendert werden
long nDiff = nValue + aNumFmt.GetFirstLineOffset();
long nAbsLSpace = aNumFmt.GetAbsLSpace();
- aNumFmt.SetAbsLSpace(USHORT(nAbsLSpace + nDiff));
+ aNumFmt.SetAbsLSpace(sal_uInt16(nAbsLSpace + nDiff));
aNumFmt.SetFirstLineOffset( -(short)nValue );
}
@@ -810,16 +810,16 @@ IMPL_LINK( SwNumPositionTabPage, DistanceHdl, MetricField *, pFld )
--------------------------------------------------*/
IMPL_LINK( SwNumPositionTabPage, RelativeHdl, CheckBox *, pBox )
{
- BOOL bOn = pBox->IsChecked();
- BOOL bSingleSelection = aLevelLB.GetSelectEntryCount() == 1 && USHRT_MAX != nActNumLvl;
- BOOL bSetValue = FALSE;
+ sal_Bool bOn = pBox->IsChecked();
+ sal_Bool bSingleSelection = aLevelLB.GetSelectEntryCount() == 1 && USHRT_MAX != nActNumLvl;
+ sal_Bool bSetValue = sal_False;
long nValue = 0;
if(bOn || bSingleSelection)
{
- USHORT nMask = 1;
- BOOL bFirst = TRUE;
- bSetValue = TRUE;
- for(USHORT i = 0; i < MAXLEVEL; i++)
+ sal_uInt16 nMask = 1;
+ sal_Bool bFirst = sal_True;
+ bSetValue = sal_True;
+ for(sal_uInt16 i = 0; i < MAXLEVEL; i++)
{
if(nActNumLvl & nMask)
{
@@ -832,7 +832,7 @@ IMPL_LINK( SwNumPositionTabPage, RelativeHdl, CheckBox *, pBox )
}
else
bSetValue = nValue == rNumFmt.GetAbsLSpace() - pActNum->Get(i - 1).GetAbsLSpace();
- bFirst = FALSE;
+ bFirst = sal_False;
}
nMask <<= 1;
}
@@ -854,7 +854,7 @@ IMPL_LINK( SwNumPositionTabPage, LabelFollowedByHdl_Impl, ListBox*, EMPTYARG )
SvxNumberFormat::SvxNumLabelFollowedBy eLabelFollowedBy =
SvxNumberFormat::LISTTAB;
{
- const USHORT nPos = aLabelFollowedByLB.GetSelectEntryPos();
+ const sal_uInt16 nPos = aLabelFollowedByLB.GetSelectEntryPos();
if ( nPos == 1 )
{
eLabelFollowedBy = SvxNumberFormat::SPACE;
@@ -867,9 +867,9 @@ IMPL_LINK( SwNumPositionTabPage, LabelFollowedByHdl_Impl, ListBox*, EMPTYARG )
// set value at the chosen list levels
bool bSameListtabPos = true;
- USHORT nFirstLvl = USHRT_MAX;
- USHORT nMask = 1;
- for( USHORT i = 0; i < MAXLEVEL; ++i )
+ sal_uInt16 nFirstLvl = USHRT_MAX;
+ sal_uInt16 nMask = 1;
+ for( sal_uInt16 i = 0; i < MAXLEVEL; ++i )
{
if ( nActNumLvl & nMask )
{
@@ -918,8 +918,8 @@ IMPL_LINK( SwNumPositionTabPage, ListtabPosHdl_Impl, MetricField*, pFld )
const long nValue = static_cast< long >(pFld->Denormalize(pFld->GetValue(FUNIT_TWIP)));
// set value at the chosen list levels
- USHORT nMask = 1;
- for( USHORT i = 0; i < MAXLEVEL; ++i )
+ sal_uInt16 nMask = 1;
+ for( sal_uInt16 i = 0; i < MAXLEVEL; ++i )
{
if ( nActNumLvl & nMask )
{
@@ -943,8 +943,8 @@ IMPL_LINK( SwNumPositionTabPage, AlignAtHdl_Impl, MetricField*, pFld )
const long nValue = static_cast< long >(pFld->Denormalize(pFld->GetValue(FUNIT_TWIP)));
// set value at the chosen list levels
- USHORT nMask = 1;
- for( USHORT i = 0; i < MAXLEVEL; ++i )
+ sal_uInt16 nMask = 1;
+ for( sal_uInt16 i = 0; i < MAXLEVEL; ++i )
{
if ( nActNumLvl & nMask )
{
@@ -969,8 +969,8 @@ IMPL_LINK( SwNumPositionTabPage, IndentAtHdl_Impl, MetricField*, pFld )
const long nValue = static_cast< long >(pFld->Denormalize(pFld->GetValue(FUNIT_TWIP)));
// set value at the chosen list levels
- USHORT nMask = 1;
- for( USHORT i = 0; i < MAXLEVEL; ++i )
+ sal_uInt16 nMask = 1;
+ for( sal_uInt16 i = 0; i < MAXLEVEL; ++i )
{
if ( nActNumLvl & nMask )
{
@@ -996,8 +996,8 @@ IMPL_LINK( SwNumPositionTabPage, IndentAtHdl_Impl, MetricField*, pFld )
--------------------------------------------------*/
IMPL_LINK( SwNumPositionTabPage, StandardHdl, PushButton *, EMPTYARG )
{
- USHORT nMask = 1;
- for(USHORT i = 0; i < MAXLEVEL; i++)
+ sal_uInt16 nMask = 1;
+ for(sal_uInt16 i = 0; i < MAXLEVEL; i++)
{
if(nActNumLvl & nMask)
{
@@ -1037,9 +1037,9 @@ IMPL_LINK( SwNumPositionTabPage, StandardHdl, PushButton *, EMPTYARG )
}
#if OSL_DEBUG_LEVEL > 1
-void SwNumPositionTabPage::SetModified(BOOL bRepaint)
+void SwNumPositionTabPage::SetModified(sal_Bool bRepaint)
{
- bModified = TRUE;
+ bModified = sal_True;
if(bRepaint)
{
aPreviewWIN.SetLevel(nActNumLvl);
@@ -1057,7 +1057,7 @@ void SwNumPositionTabPage::SetModified(BOOL bRepaint)
SwSvxNumBulletTabDialog::SwSvxNumBulletTabDialog(Window* pParent,
const SfxItemSet* pSwItemSet, SwWrtShell & rSh) :
- SfxTabDialog(pParent, SW_RES(DLG_SVXTEST_NUM_BULLET), pSwItemSet, FALSE, &aEmptyStr),
+ SfxTabDialog(pParent, SW_RES(DLG_SVXTEST_NUM_BULLET), pSwItemSet, sal_False, &aEmptyStr),
rWrtSh(rSh),
sRemoveText(SW_RES(ST_RESET)),
nRetOptionsDialog(USHRT_MAX)
@@ -1067,7 +1067,7 @@ SwSvxNumBulletTabDialog::SwSvxNumBulletTabDialog(Window* pParent,
GetUserButton()->SetHelpId(HID_NUM_RESET);
GetUserButton()->SetClickHdl(LINK(this, SwSvxNumBulletTabDialog, RemoveNumberingHdl));
if(!rWrtSh.GetCurNumRule())
- GetUserButton()->Enable(FALSE);
+ GetUserButton()->Enable(sal_False);
AddTabPage( RID_SVXPAGE_PICK_SINGLE_NUM );
AddTabPage( RID_SVXPAGE_PICK_BULLET );
AddTabPage( RID_SVXPAGE_PICK_NUM );
@@ -1088,7 +1088,7 @@ SwSvxNumBulletTabDialog::~SwSvxNumBulletTabDialog()
--------------------------------------------------*/
-void SwSvxNumBulletTabDialog::PageCreated(USHORT nPageId, SfxTabPage& rPage)
+void SwSvxNumBulletTabDialog::PageCreated(sal_uInt16 nPageId, SfxTabPage& rPage)
{
//Namen der Vorlagen und Metric setzen
String sNumCharFmt, sBulletCharFmt;
@@ -1125,7 +1125,7 @@ void SwSvxNumBulletTabDialog::PageCreated(USHORT nPageId, SfxTabPage& rPage)
SwDocShell* pDocShell = rWrtSh.GetView().GetDocShell();
::FillCharStyleListBox(rCharFmtLB, pDocShell);
List aList;
- for(USHORT j = 0; j < rCharFmtLB.GetEntryCount(); j++)
+ for(sal_uInt16 j = 0; j < rCharFmtLB.GetEntryCount(); j++)
{
aList.Insert( new XubString(rCharFmtLB.GetEntry(j)), LIST_APPEND );
@@ -1133,9 +1133,9 @@ void SwSvxNumBulletTabDialog::PageCreated(USHORT nPageId, SfxTabPage& rPage)
aSet.Put( SfxStringListItem( SID_CHAR_FMT_LIST_BOX,&aList ) ) ;
FieldUnit eMetric = ::GetDfltMetric(0 != PTR_CAST(SwWebDocShell, pDocShell));
- aSet.Put ( SfxAllEnumItem(SID_METRIC_ITEM, static_cast< USHORT >(eMetric) ) );
+ aSet.Put ( SfxAllEnumItem(SID_METRIC_ITEM, static_cast< sal_uInt16 >(eMetric) ) );
rPage.PageCreated(aSet);
- for( USHORT i = (USHORT)aList.Count(); i; --i )
+ for( sal_uInt16 i = (sal_uInt16)aList.Count(); i; --i )
delete (XubString*)aList.Remove(i);
aList.Clear();
}
@@ -1145,7 +1145,7 @@ void SwSvxNumBulletTabDialog::PageCreated(USHORT nPageId, SfxTabPage& rPage)
SwDocShell* pDocShell = rWrtSh.GetView().GetDocShell();
FieldUnit eMetric = ::GetDfltMetric(0 != PTR_CAST(SwWebDocShell, pDocShell));
SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool()));
- aSet.Put ( SfxAllEnumItem(SID_METRIC_ITEM, static_cast< USHORT >(eMetric)) );
+ aSet.Put ( SfxAllEnumItem(SID_METRIC_ITEM, static_cast< sal_uInt16 >(eMetric)) );
rPage.PageCreated(aSet);
// ((SvxNumPositionTabPage&)rPage).SetWrtShell(&rWrtSh);
}
diff --git a/sw/source/ui/misc/numberingtypelistbox.cxx b/sw/source/ui/misc/numberingtypelistbox.cxx
index 86e4f12ed5..256303fe3e 100644
--- a/sw/source/ui/misc/numberingtypelistbox.cxx
+++ b/sw/source/ui/misc/numberingtypelistbox.cxx
@@ -53,7 +53,7 @@ struct SwNumberingTypeListBox_Impl
---------------------------------------------------------------------------*/
SwNumberingTypeListBox::SwNumberingTypeListBox( Window* pWin, const ResId& rResId,
- USHORT nTypeFlags ) :
+ sal_uInt16 nTypeFlags ) :
ListBox(pWin, rResId),
pImpl(new SwNumberingTypeListBox_Impl)
{
@@ -76,7 +76,7 @@ SwNumberingTypeListBox::~SwNumberingTypeListBox()
/* -----------------------------01.03.01 16:02--------------------------------
---------------------------------------------------------------------------*/
-void SwNumberingTypeListBox::Reload(USHORT nTypeFlags)
+void SwNumberingTypeListBox::Reload(sal_uInt16 nTypeFlags)
{
Clear();
uno::Sequence<sal_Int16> aTypes;
@@ -95,7 +95,7 @@ void SwNumberingTypeListBox::Reload(USHORT nTypeFlags)
{
long nValue = rNames.GetValue(i);
sal_Bool bInsert = sal_True;
- USHORT nPos = LISTBOX_APPEND;
+ sal_uInt16 nPos = LISTBOX_APPEND;
switch(nValue)
{
case style::NumberingType::NUMBER_NONE:
@@ -125,7 +125,7 @@ void SwNumberingTypeListBox::Reload(USHORT nTypeFlags)
}
if(bInsert)
{
- USHORT nEntry = InsertEntry(rNames.GetString(i), nPos);
+ sal_uInt16 nEntry = InsertEntry(rNames.GetString(i), nPos);
SetEntryData( nEntry, (void*)nValue );
}
}
@@ -138,11 +138,11 @@ void SwNumberingTypeListBox::Reload(USHORT nTypeFlags)
sal_Int16 nCurrent = pTypes[nType];
if(nCurrent > style::NumberingType::CHARS_LOWER_LETTER_N)
{
- if(LISTBOX_ENTRY_NOTFOUND == GetEntryPos((void*)(ULONG)nCurrent))
+ if(LISTBOX_ENTRY_NOTFOUND == GetEntryPos((void*)(sal_uLong)nCurrent))
{
OUString aIdent = pImpl->xInfo->getNumberingIdentifier( nCurrent );
- USHORT nPos = InsertEntry(aIdent);
- SetEntryData(nPos,(void*)(ULONG)nCurrent);
+ sal_uInt16 nPos = InsertEntry(aIdent);
+ SetEntryData(nPos,(void*)(sal_uLong)nCurrent);
}
}
}
@@ -156,9 +156,9 @@ void SwNumberingTypeListBox::Reload(USHORT nTypeFlags)
sal_Int16 SwNumberingTypeListBox::GetSelectedNumberingType()
{
sal_Int16 nRet = 0;
- USHORT nSelPos = GetSelectEntryPos();
+ sal_uInt16 nSelPos = GetSelectEntryPos();
if(LISTBOX_ENTRY_NOTFOUND != nSelPos)
- nRet = (sal_Int16)(ULONG)GetEntryData(nSelPos);
+ nRet = (sal_Int16)(sal_uLong)GetEntryData(nSelPos);
#ifdef DBG_UTIL
else
DBG_ERROR("SwNumberingTypeListBox not selected");
@@ -170,7 +170,7 @@ sal_Int16 SwNumberingTypeListBox::GetSelectedNumberingType()
---------------------------------------------------------------------------*/
sal_Bool SwNumberingTypeListBox::SelectNumberingType(sal_Int16 nType)
{
- USHORT nPos = GetEntryPos((void*)(ULONG)nType);
+ sal_uInt16 nPos = GetEntryPos((void*)(sal_uLong)nType);
SelectEntryPos( nPos );
return LISTBOX_ENTRY_NOTFOUND != nPos;
}
diff --git a/sw/source/ui/misc/outline.cxx b/sw/source/ui/misc/outline.cxx
index ed3343129b..276aadafdf 100644
--- a/sw/source/ui/misc/outline.cxx
+++ b/sw/source/ui/misc/outline.cxx
@@ -118,7 +118,7 @@ public:
~SwNumNamesDlg();
void SetUserNames(const String *pList[]);
String GetName() const { return aFormEdit.GetText(); }
- USHORT GetCurEntryPos() const { return aFormBox.GetSelectEntryPos(); }
+ sal_uInt16 GetCurEntryPos() const { return aFormBox.GetSelectEntryPos(); }
};
/*------------------------------------------------------------------------
@@ -143,8 +143,8 @@ IMPL_LINK_INLINE_END( SwNumNamesDlg, SelectHdl, ListBox *, pBox )
void SwNumNamesDlg::SetUserNames(const String *pList[])
{
- USHORT nSelect = 0;
- for(USHORT i = 0; i < SwBaseNumRules::nMaxRules; ++i)
+ sal_uInt16 nSelect = 0;
+ for(sal_uInt16 i = 0; i < SwBaseNumRules::nMaxRules; ++i)
{
if(pList[i])
{
@@ -210,10 +210,10 @@ __EXPORT SwNumNamesDlg::~SwNumNamesDlg() {}
/* -----------------08.07.98 08:46-------------------
*
* --------------------------------------------------*/
-USHORT lcl_BitToLevel(USHORT nActLevel)
+sal_uInt16 lcl_BitToLevel(sal_uInt16 nActLevel)
{
- USHORT nTmp = nActLevel;
- USHORT nTmpLevel = 0;
+ sal_uInt16 nTmp = nActLevel;
+ sal_uInt16 nTmpLevel = 0;
while( 0 != (nTmp >>= 1) )
nTmpLevel++;
return nTmpLevel;
@@ -222,12 +222,12 @@ USHORT lcl_BitToLevel(USHORT nActLevel)
/* -----------------07.07.98 14:13-------------------
*
* --------------------------------------------------*/
-USHORT SwOutlineTabDialog::nNumLevel = 1;
+sal_uInt16 SwOutlineTabDialog::nNumLevel = 1;
SwOutlineTabDialog::SwOutlineTabDialog(Window* pParent,
const SfxItemSet* pSwItemSet,
SwWrtShell &rSh) :
//der UserString wird danach richtig gesetzt
- SfxTabDialog(pParent, SW_RES(DLG_TAB_OUTLINE), pSwItemSet, FALSE, &aEmptyStr),
+ SfxTabDialog(pParent, SW_RES(DLG_TAB_OUTLINE), pSwItemSet, sal_False, &aEmptyStr),
aNullStr(C2S("____")),
aFormMenu(SW_RES(MN_FORM)),
rWrtSh(rSh),
@@ -250,7 +250,7 @@ SwOutlineTabDialog::SwOutlineTabDialog(Window* pParent,
AddTabPage(TP_OUTLINE_NUM , &SwOutlineSettingsTabPage::Create, 0);
String sHeadline;
- USHORT i;
+ sal_uInt16 i;
for( i = 0; i < MAXLEVEL; ++i )
{
@@ -262,13 +262,13 @@ SwOutlineTabDialog::SwOutlineTabDialog(Window* pParent,
}
// Erfragen der Gliederungsebenen der Textvorlagen
- const USHORT nCount = rWrtSh.GetTxtFmtCollCount();
+ const sal_uInt16 nCount = rWrtSh.GetTxtFmtCollCount();
for(i = 0; i < nCount; ++i )
{
SwTxtFmtColl &rTxtColl = rWrtSh.GetTxtFmtColl(i);
if(!rTxtColl.IsDefault())
{
- //BYTE nOutLevel = rTxtColl.GetOutlineLevel(); //<-#outline level, removed out by zhaojianwei
+ //sal_uInt8 nOutLevel = rTxtColl.GetOutlineLevel(); //<-#outline level, removed out by zhaojianwei
//if(nOutLevel != NO_NUMBERING)
//->added by zhaojianwei
if(rTxtColl.IsAssignedToListLevelOfOutlineStyle())
@@ -292,7 +292,7 @@ SwOutlineTabDialog::~SwOutlineTabDialog()
/* -----------------07.07.98 14:13-------------------
*
* --------------------------------------------------*/
-void SwOutlineTabDialog::PageCreated(USHORT nPageId, SfxTabPage& rPage)
+void SwOutlineTabDialog::PageCreated(sal_uInt16 nPageId, SfxTabPage& rPage)
{
switch ( nPageId )
{
@@ -321,7 +321,7 @@ IMPL_LINK( SwOutlineTabDialog, CancelHdl, Button *, EMPTYARG )
IMPL_LINK( SwOutlineTabDialog, FormHdl, Button *, pBtn )
{
//PopupMenu auffuellen
- for( USHORT i = 0; i < SwChapterNumRules::nMaxRules; ++i )
+ for( sal_uInt16 i = 0; i < SwChapterNumRules::nMaxRules; ++i )
{
const SwNumRulesWithName *pRules = pChapterNumRules->GetRules(i);
if( pRules )
@@ -337,7 +337,7 @@ IMPL_LINK( SwOutlineTabDialog, FormHdl, Button *, pBtn )
* --------------------------------------------------*/
IMPL_LINK( SwOutlineTabDialog, MenuSelectHdl, Menu *, pMenu )
{
- BYTE nLevelNo = 0;
+ sal_uInt8 nLevelNo = 0;
switch(pMenu->GetCurItemId())
{
case MN_FORM1: nLevelNo = 1; break;
@@ -354,7 +354,7 @@ IMPL_LINK( SwOutlineTabDialog, MenuSelectHdl, Menu *, pMenu )
{
SwNumNamesDlg *pDlg = new SwNumNamesDlg(this);
const String *aStrArr[SwChapterNumRules::nMaxRules];
- for(USHORT i = 0; i < SwChapterNumRules::nMaxRules; ++i)
+ for(sal_uInt16 i = 0; i < SwChapterNumRules::nMaxRules; ++i)
{
const SwNumRulesWithName *pRules = pChapterNumRules->GetRules(i);
if(pRules)
@@ -389,7 +389,7 @@ IMPL_LINK( SwOutlineTabDialog, MenuSelectHdl, Menu *, pMenu )
*pNumRule = *rWrtSh.GetOutlineNumRule();
}
- USHORT nPageId = GetCurPageId();
+ sal_uInt16 nPageId = GetCurPageId();
SfxTabPage* pPage = GetTabPage( nPageId );
pPage->Reset(*GetOutputItemSet());
@@ -398,9 +398,9 @@ IMPL_LINK( SwOutlineTabDialog, MenuSelectHdl, Menu *, pMenu )
/* -----------------07.07.98 14:19-------------------
*
* --------------------------------------------------*/
-USHORT SwOutlineTabDialog::GetLevel(const String &rFmtName) const
+sal_uInt16 SwOutlineTabDialog::GetLevel(const String &rFmtName) const
{
- for(USHORT i = 0; i < MAXLEVEL; ++i)
+ for(sal_uInt16 i = 0; i < MAXLEVEL; ++i)
{
if(aCollNames[i] == rFmtName)
return i;
@@ -426,18 +426,18 @@ short SwOutlineTabDialog::Ok()
const SwNumRule * pOutlineRule = rWrtSh.GetOutlineNumRule();
- USHORT i, nCount = rWrtSh.GetTxtFmtCollCount();
+ sal_uInt16 i, nCount = rWrtSh.GetTxtFmtCollCount();
for( i = 0; i < nCount; ++i )
{
SwTxtFmtColl &rTxtColl = rWrtSh.GetTxtFmtColl(i);
if( !rTxtColl.IsDefault() )
{
- //rTxtColl.SetOutlineLevel( (BYTE)GetLevel(rTxtColl.GetName()));//#outline level,removed by zhaojianwei
+ //rTxtColl.SetOutlineLevel( (sal_uInt8)GetLevel(rTxtColl.GetName()));//#outline level,removed by zhaojianwei
const SfxPoolItem & rItem =
- rTxtColl.GetFmtAttr(RES_PARATR_NUMRULE, FALSE);
+ rTxtColl.GetFmtAttr(RES_PARATR_NUMRULE, sal_False);
- //if ((BYTE)GetLevel(rTxtColl.GetName()) == NO_NUMBERING) //#outline level,removed by zhaojianwei
+ //if ((sal_uInt8)GetLevel(rTxtColl.GetName()) == NO_NUMBERING) //#outline level,removed by zhaojianwei
//{
// if (static_cast<const SwNumRuleItem &>(rItem).GetValue() ==
// pOutlineRule->GetName())
@@ -454,7 +454,7 @@ short SwOutlineTabDialog::Ok()
// rTxtColl.SetFmtAttr(aItem);
// }
//}
- if ((BYTE)GetLevel(rTxtColl.GetName()) == MAXLEVEL) //add by zhaojianwei
+ if ((sal_uInt8)GetLevel(rTxtColl.GetName()) == MAXLEVEL) //add by zhaojianwei
{
if(rTxtColl.IsAssignedToListLevelOfOutlineStyle())
{
@@ -491,7 +491,7 @@ short SwOutlineTabDialog::Ok()
//if( !aCollNames[i].Len() ) //#outline level,removed by zhaojianwei
//{
// SwTxtFmtColl* pTxtColl = rWrtSh.GetTxtCollFromPool(
- // static_cast< USHORT >(RES_POOLCOLL_HEADLINE1 + i) );
+ // static_cast< sal_uInt16 >(RES_POOLCOLL_HEADLINE1 + i) );
// pTxtColl->SetOutlineLevel( NO_NUMBERING );
// pTxtColl->ResetFmtAttr(RES_PARATR_NUMRULE);
//}
@@ -501,7 +501,7 @@ short SwOutlineTabDialog::Ok()
// aCollNames[i], SwWrtShell::GETSTYLE_CREATESOME);
// if(pTxtColl)
// {
- // pTxtColl->SetOutlineLevel( static_cast< BYTE >(i) );
+ // pTxtColl->SetOutlineLevel( static_cast< sal_uInt8 >(i) );
// SwNumRuleItem aItem(pOutlineRule->GetName());
// pTxtColl->SetFmtAttr(aItem);
@@ -510,7 +510,7 @@ short SwOutlineTabDialog::Ok()
if(aCollNames[i] != sHeadline)//->added by zhaojianwei
{
SwTxtFmtColl* pTxtColl = rWrtSh.GetTxtCollFromPool(
- static_cast< USHORT >(RES_POOLCOLL_HEADLINE1 + i) );
+ static_cast< sal_uInt16 >(RES_POOLCOLL_HEADLINE1 + i) );
pTxtColl->DeleteAssignmentToListLevelOfOutlineStyle();
pTxtColl->ResetFmtAttr(RES_PARATR_NUMRULE);
@@ -593,17 +593,17 @@ void SwOutlineSettingsTabPage::Update()
aCollBox.Enable(USHRT_MAX != nActLevel);
if(USHRT_MAX == nActLevel)
{
- BOOL bSamePrefix = TRUE;
- BOOL bSameSuffix = TRUE;
- BOOL bSameType = TRUE;
- BOOL bSameComplete = TRUE;
- BOOL bSameStart = TRUE;
- BOOL bSameCharFmt = TRUE;
+ sal_Bool bSamePrefix = sal_True;
+ sal_Bool bSameSuffix = sal_True;
+ sal_Bool bSameType = sal_True;
+ sal_Bool bSameComplete = sal_True;
+ sal_Bool bSameStart = sal_True;
+ sal_Bool bSameCharFmt = sal_True;
const SwNumFmt* aNumFmtArr[MAXLEVEL];
const SwCharFmt* pFirstFmt = 0;
- for(USHORT i = 0; i < MAXLEVEL; i++)
+ for(sal_uInt16 i = 0; i < MAXLEVEL; i++)
{
aNumFmtArr[ i ] = &pNumRule->Get(i);
@@ -649,8 +649,8 @@ void SwOutlineSettingsTabPage::Update()
else
aCharFmtLB.SetNoSelection();
- aAllLevelFT.Enable(TRUE);
- aAllLevelNF.Enable(TRUE);
+ aAllLevelFT.Enable(sal_True);
+ aAllLevelNF.Enable(sal_True);
aAllLevelNF.SetMax(MAXLEVEL);
if(bSameComplete)
{
@@ -663,7 +663,7 @@ void SwOutlineSettingsTabPage::Update()
}
else
{
- USHORT nTmpLevel = lcl_BitToLevel(nActLevel);
+ sal_uInt16 nTmpLevel = lcl_BitToLevel(nActLevel);
String aColl(pCollNames[nTmpLevel]);
if(aColl.Len())
aCollBox.SelectEntry(aColl);
@@ -682,16 +682,16 @@ void SwOutlineSettingsTabPage::Update()
if(nTmpLevel)
{
- aAllLevelFT.Enable(TRUE);
- aAllLevelNF.Enable(TRUE);
+ aAllLevelFT.Enable(sal_True);
+ aAllLevelNF.Enable(sal_True);
aAllLevelNF.SetMax(nTmpLevel + 1);
aAllLevelNF.SetValue(rFmt.GetIncludeUpperLevels());
}
else
{
aAllLevelNF.SetText(aEmptyStr);
- aAllLevelNF.Enable(FALSE);
- aAllLevelFT.Enable(FALSE);
+ aAllLevelNF.Enable(sal_False);
+ aAllLevelFT.Enable(sal_False);
}
CheckForStartValue_Impl(rFmt.GetNumberingType());
aStartEdit.SetValue( rFmt.GetStart() );
@@ -711,8 +711,8 @@ IMPL_LINK( SwOutlineSettingsTabPage, LevelHdl, ListBox *, pBox )
}
else
{
- USHORT nMask = 1;
- for( USHORT i = 0; i < MAXLEVEL; i++ )
+ sal_uInt16 nMask = 1;
+ for( sal_uInt16 i = 0; i < MAXLEVEL; i++ )
{
if(pBox->IsEntryPosSelected( i ))
nActLevel |= nMask;
@@ -727,14 +727,14 @@ IMPL_LINK( SwOutlineSettingsTabPage, LevelHdl, ListBox *, pBox )
* --------------------------------------------------*/
IMPL_LINK( SwOutlineSettingsTabPage, ToggleComplete, NumericField *, pFld )
{
- USHORT nMask = 1;
- for(USHORT i = 0; i < MAXLEVEL; i++)
+ sal_uInt16 nMask = 1;
+ for(sal_uInt16 i = 0; i < MAXLEVEL; i++)
{
if(nActLevel & nMask)
{
SwNumFmt aNumFmt(pNumRule->Get(i));
- aNumFmt.SetIncludeUpperLevels( Min( (BYTE)pFld->GetValue(),
- (BYTE)(i + 1)) );
+ aNumFmt.SetIncludeUpperLevels( Min( (sal_uInt8)pFld->GetValue(),
+ (sal_uInt8)(i + 1)) );
pNumRule->Set(i, aNumFmt);
}
nMask <<= 1;
@@ -747,11 +747,11 @@ IMPL_LINK( SwOutlineSettingsTabPage, ToggleComplete, NumericField *, pFld )
* --------------------------------------------------*/
IMPL_LINK( SwOutlineSettingsTabPage, CollSelect, ListBox *, pBox )
{
- BYTE i;
+ sal_uInt8 i;
const String aCollName(pBox->GetSelectEntry());
//0xFFFF darf hier nicht sein (disable)
- USHORT nTmpLevel = lcl_BitToLevel(nActLevel);
+ sal_uInt16 nTmpLevel = lcl_BitToLevel(nActLevel);
String sOldName( pCollNames[nTmpLevel] );
for( i = 0; i < MAXLEVEL; ++i)
@@ -774,7 +774,7 @@ IMPL_LINK( SwOutlineSettingsTabPage, CollSelect, ListBox *, pBox )
if( aSaveCollNames[ i ] == sOldName && i != nTmpLevel &&
!pCollNames[ i ].Len() )
{
- BYTE n;
+ sal_uInt8 n;
for( n = 0; n < MAXLEVEL; ++n )
if( pCollNames[ n ] == sOldName )
break;
@@ -790,7 +790,7 @@ IMPL_LINK( SwOutlineSettingsTabPage, CollSelect, ListBox *, pBox )
IMPL_LINK( SwOutlineSettingsTabPage, CollSelectGetFocus, ListBox *, EMPTYARG )
{
- for( BYTE i = 0; i < MAXLEVEL; ++i)
+ for( sal_uInt8 i = 0; i < MAXLEVEL; ++i)
aSaveCollNames[i] = pCollNames[i];
return 0;
}
@@ -800,9 +800,9 @@ IMPL_LINK( SwOutlineSettingsTabPage, CollSelectGetFocus, ListBox *, EMPTYARG )
* --------------------------------------------------*/
IMPL_LINK( SwOutlineSettingsTabPage, NumberSelect, SwNumberingTypeListBox *, pBox )
{
- USHORT nMask = 1;
- sal_Int16 nNumberType = pBox->GetSelectedNumberingType();//(sal_Int16)(ULONG)pBox->GetEntryData(pBox->GetSelectEntryPos());
- for(USHORT i = 0; i < MAXLEVEL; i++)
+ sal_uInt16 nMask = 1;
+ sal_Int16 nNumberType = pBox->GetSelectedNumberingType();//(sal_Int16)(sal_uLong)pBox->GetEntryData(pBox->GetSelectEntryPos());
+ for(sal_uInt16 i = 0; i < MAXLEVEL; i++)
{
if(nActLevel & nMask)
{
@@ -821,8 +821,8 @@ IMPL_LINK( SwOutlineSettingsTabPage, NumberSelect, SwNumberingTypeListBox *, pBo
* --------------------------------------------------*/
IMPL_LINK( SwOutlineSettingsTabPage, DelimModify, Edit *, EMPTYARG )
{
- USHORT nMask = 1;
- for(USHORT i = 0; i < MAXLEVEL; i++)
+ sal_uInt16 nMask = 1;
+ for(sal_uInt16 i = 0; i < MAXLEVEL; i++)
{
if(nActLevel & nMask)
{
@@ -841,13 +841,13 @@ IMPL_LINK( SwOutlineSettingsTabPage, DelimModify, Edit *, EMPTYARG )
* --------------------------------------------------*/
IMPL_LINK( SwOutlineSettingsTabPage, StartModified, NumericField *, pFld )
{
- USHORT nMask = 1;
- for(USHORT i = 0; i < MAXLEVEL; i++)
+ sal_uInt16 nMask = 1;
+ for(sal_uInt16 i = 0; i < MAXLEVEL; i++)
{
if(nActLevel & nMask)
{
SwNumFmt aNumFmt(pNumRule->Get(i));
- aNumFmt.SetStart( (USHORT)pFld->GetValue() );
+ aNumFmt.SetStart( (sal_uInt16)pFld->GetValue() );
pNumRule->Set(i, aNumFmt);
}
nMask <<= 1;
@@ -860,15 +860,15 @@ IMPL_LINK( SwOutlineSettingsTabPage, StartModified, NumericField *, pFld )
* --------------------------------------------------*/
IMPL_LINK( SwOutlineSettingsTabPage, CharFmtHdl, ListBox *, EMPTYARG )
{
-// bAutomaticCharStyles = FALSE;
+// bAutomaticCharStyles = sal_False;
String sEntry = aCharFmtLB.GetSelectEntry();
- USHORT nMask = 1;
- BOOL bFormatNone = sEntry == ViewShell::GetShellRes()->aStrNone;
+ sal_uInt16 nMask = 1;
+ sal_Bool bFormatNone = sEntry == ViewShell::GetShellRes()->aStrNone;
SwCharFmt* pFmt = 0;
if(!bFormatNone)
{
- USHORT nChCount = pSh->GetCharFmtCount();
- for(USHORT i = 0; i < nChCount; i++)
+ sal_uInt16 nChCount = pSh->GetCharFmtCount();
+ for(sal_uInt16 i = 0; i < nChCount; i++)
{
SwCharFmt& rChFmt = pSh->GetCharFmt(i);
if(rChFmt.GetName() == sEntry)
@@ -889,7 +889,7 @@ IMPL_LINK( SwOutlineSettingsTabPage, CharFmtHdl, ListBox *, EMPTYARG )
}
}
- for(USHORT i = 0; i < MAXLEVEL; i++)
+ for(sal_uInt16 i = 0; i < MAXLEVEL; i++)
{
if(nActLevel & nMask)
{
@@ -925,13 +925,13 @@ void SwOutlineSettingsTabPage::SetWrtShell(SwWrtShell* pShell)
aPreviewWIN.SetNumRule(pNumRule);
aPreviewWIN.SetOutlineNames(pCollNames);
// Startwert setzen - nActLevel muss hier 1 sein
- USHORT nTmpLevel = lcl_BitToLevel(nActLevel);
+ sal_uInt16 nTmpLevel = lcl_BitToLevel(nActLevel);
const SwNumFmt& rNumFmt = pNumRule->Get( nTmpLevel );
aStartEdit.SetValue( rNumFmt.GetStart() );
// Poolformate fuer Ueberschriften anlegen
String sStr;
- USHORT i;
+ sal_uInt16 i;
for( i = 0; i < MAXLEVEL; ++i )
{
aCollBox.InsertEntry( SwStyleNameMapper::GetUIName(
@@ -943,7 +943,7 @@ void SwOutlineSettingsTabPage::SetWrtShell(SwWrtShell* pShell)
aLevelLB.InsertEntry( sStr );
// Erfragen der Gliederungsebenen der Textvorlagen
- const USHORT nCount = pSh->GetTxtFmtCollCount();
+ const sal_uInt16 nCount = pSh->GetTxtFmtCollCount();
for( i = 0; i < nCount; ++i )
{
SwTxtFmtColl &rTxtColl = pSh->GetTxtFmtColl(i);
@@ -956,11 +956,11 @@ void SwOutlineSettingsTabPage::SetWrtShell(SwWrtShell* pShell)
}
aNumberBox.SelectNumberingType(rNumFmt.GetNumberingType());
- USHORT nOutlinePos = pSh->GetOutlinePos(MAXLEVEL);
- USHORT nTmp = 0;
+ sal_uInt16 nOutlinePos = pSh->GetOutlinePos(MAXLEVEL);
+ sal_uInt16 nTmp = 0;
if(nOutlinePos != USHRT_MAX)
{
- nTmp = static_cast<USHORT>(pSh->getIDocumentOutlineNodesAccess()->getOutlineLevel(nOutlinePos));
+ nTmp = static_cast<sal_uInt16>(pSh->getIDocumentOutlineNodesAccess()->getOutlineLevel(nOutlinePos));
}
aLevelLB.SelectEntryPos(nTmp-1);//nTmp);//#outline level,zhaojianwei
@@ -996,9 +996,9 @@ int SwOutlineSettingsTabPage::DeactivatePage(SfxItemSet*)
/* -----------------07.07.98 14:19-------------------
*
* --------------------------------------------------*/
-BOOL SwOutlineSettingsTabPage::FillItemSet( SfxItemSet& )
+sal_Bool SwOutlineSettingsTabPage::FillItemSet( SfxItemSet& )
{
- return TRUE;
+ return sal_True;
}
/* -----------------07.07.98 14:19-------------------
*
@@ -1020,8 +1020,8 @@ SfxTabPage* SwOutlineSettingsTabPage::Create( Window* pParent,
* --------------------------------------------------*/
void SwOutlineSettingsTabPage::CheckForStartValue_Impl(sal_uInt16 nNumberingType)
{
- BOOL bIsNull = aStartEdit.GetValue() == 0;
- BOOL bNoZeroAllowed = nNumberingType < SVX_NUM_ARABIC ||
+ sal_Bool bIsNull = aStartEdit.GetValue() == 0;
+ sal_Bool bNoZeroAllowed = nNumberingType < SVX_NUM_ARABIC ||
SVX_NUM_CHARS_UPPER_LETTER_N == nNumberingType ||
SVX_NUM_CHARS_LOWER_LETTER_N == nNumberingType;
aStartEdit.SetMin(bNoZeroAllowed ? 1 : 0);
@@ -1031,19 +1031,19 @@ void SwOutlineSettingsTabPage::CheckForStartValue_Impl(sal_uInt16 nNumberingType
/*-----------------09.12.97 11:54-------------------
--------------------------------------------------*/
-USHORT lcl_DrawBullet(VirtualDevice* pVDev,
- const SwNumFmt& rFmt, USHORT nXStart,
- USHORT nYStart, const Size& rSize)
+sal_uInt16 lcl_DrawBullet(VirtualDevice* pVDev,
+ const SwNumFmt& rFmt, sal_uInt16 nXStart,
+ sal_uInt16 nYStart, const Size& rSize)
{
Font aTmpFont(pVDev->GetFont());
Font aFont(*rFmt.GetBulletFont());
aFont.SetSize(rSize);
- aFont.SetTransparent(TRUE);
+ aFont.SetTransparent(sal_True);
pVDev->SetFont( aFont );
String aText(rFmt.GetBulletChar());
pVDev->DrawText( Point(nXStart, nYStart), aText );
- USHORT nRet = (USHORT)pVDev->GetTextWidth(aText);
+ sal_uInt16 nRet = (sal_uInt16)pVDev->GetTextWidth(aText);
pVDev->SetFont(aTmpFont);
return nRet;
@@ -1051,11 +1051,11 @@ USHORT lcl_DrawBullet(VirtualDevice* pVDev,
/*-----------------09.12.97 11:49-------------------
--------------------------------------------------*/
-USHORT lcl_DrawGraphic(VirtualDevice* pVDev, const SwNumFmt &rFmt, USHORT nXStart,
- USHORT nYStart, USHORT nDivision)
+sal_uInt16 lcl_DrawGraphic(VirtualDevice* pVDev, const SwNumFmt &rFmt, sal_uInt16 nXStart,
+ sal_uInt16 nYStart, sal_uInt16 nDivision)
{
const SvxBrushItem* pBrushItem = rFmt.GetBrush();
- USHORT nRet = 0;
+ sal_uInt16 nRet = 0;
if(pBrushItem)
{
const Graphic* pGrf = pBrushItem->GetGraphic();
@@ -1063,7 +1063,7 @@ USHORT lcl_DrawGraphic(VirtualDevice* pVDev, const SwNumFmt &rFmt, USHORT nXStar
{
Size aGSize( rFmt.GetGraphicSize());
aGSize.Width() /= nDivision;
- nRet = (USHORT)aGSize.Width();
+ nRet = (sal_uInt16)aGSize.Width();
aGSize.Height() /= nDivision;
pGrf->Draw( pVDev, Point(nXStart,nYStart),
pVDev->PixelToLogic( aGSize ) );
@@ -1091,10 +1091,10 @@ void NumberingPreview::Paint( const Rectangle& /*rRect*/ )
if(pActNum)
{
- USHORT nWidthRelation;
+ sal_uInt16 nWidthRelation;
if(nPageWidth)
{
- nWidthRelation = USHORT (nPageWidth / aSize.Width());
+ nWidthRelation = sal_uInt16 (nPageWidth / aSize.Width());
if(bPosition)
nWidthRelation = nWidthRelation * 2 / 3;
else
@@ -1104,11 +1104,11 @@ void NumberingPreview::Paint( const Rectangle& /*rRect*/ )
nWidthRelation = 30; // Kapiteldialog
//Hoehe pro Ebene
- USHORT nXStep = USHORT(aSize.Width() / (3 * MAXLEVEL));
+ sal_uInt16 nXStep = sal_uInt16(aSize.Width() / (3 * MAXLEVEL));
if(MAXLEVEL < 10)
nXStep /= 2;
- USHORT nYStart = 4;
- USHORT nYStep = USHORT((aSize.Height() - 6)/ MAXLEVEL);
+ sal_uInt16 nYStart = 4;
+ sal_uInt16 nYStep = sal_uInt16((aSize.Height() - 6)/ MAXLEVEL);
aStdFont = OutputDevice::GetDefaultFont(
DEFAULTFONT_UI_SANS, (LanguageType)GetAppLanguage(),
DEFAULTFONT_FLAGS_ONLYONE, this );
@@ -1116,17 +1116,17 @@ void NumberingPreview::Paint( const Rectangle& /*rRect*/ )
aStdFont.SetColor( SwViewOption::GetFontColor() );
//
- USHORT nFontHeight = nYStep * 6 / 10;
+ sal_uInt16 nFontHeight = nYStep * 6 / 10;
if(bPosition)
nFontHeight = nYStep * 15 / 10;
aStdFont.SetSize(Size( 0, nFontHeight ));
- USHORT nPreNum = pActNum->Get(0).GetStart();
+ sal_uInt16 nPreNum = pActNum->Get(0).GetStart();
if(bPosition)
{
- USHORT nLineHeight = nFontHeight * 8 / 7;
- BYTE nStart = 0;
+ sal_uInt16 nLineHeight = nFontHeight * 8 / 7;
+ sal_uInt8 nStart = 0;
while( !(nActLevel & (1<<nStart)) )
{
nStart++;
@@ -1135,22 +1135,22 @@ void NumberingPreview::Paint( const Rectangle& /*rRect*/ )
nStart--;
SwNumberTree::tNumberVector aNumVector;
- BYTE nEnd = Min( (BYTE)(nStart + 3), MAXLEVEL );
- for( BYTE nLevel = nStart; nLevel < nEnd; ++nLevel )
+ sal_uInt8 nEnd = Min( (sal_uInt8)(nStart + 3), MAXLEVEL );
+ for( sal_uInt8 nLevel = nStart; nLevel < nEnd; ++nLevel )
{
const SwNumFmt &rFmt = pActNum->Get(nLevel);
aNumVector.push_back(rFmt.GetStart());
// --> OD 2008-02-01 #newlistlevelattrs#
- USHORT nXStart( 0 );
+ sal_uInt16 nXStart( 0 );
short nTextOffset( 0 );
- USHORT nNumberXPos( 0 );
+ sal_uInt16 nNumberXPos( 0 );
if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION )
{
nXStart = rFmt.GetAbsLSpace() / nWidthRelation;
nTextOffset = rFmt.GetCharTextDistance() / nWidthRelation;
nNumberXPos = nXStart;
- USHORT nFirstLineOffset = (-rFmt.GetFirstLineOffset()) / nWidthRelation;
+ sal_uInt16 nFirstLineOffset = (-rFmt.GetFirstLineOffset()) / nWidthRelation;
if(nFirstLineOffset <= nNumberXPos)
nNumberXPos = nNumberXPos - nFirstLineOffset;
@@ -1168,12 +1168,12 @@ void NumberingPreview::Paint( const Rectangle& /*rRect*/ )
}
else
{
- nNumberXPos = static_cast<USHORT>(nTmpNumberXPos);
+ nNumberXPos = static_cast<sal_uInt16>(nTmpNumberXPos);
}
}
// <--
- USHORT nBulletWidth = 0;
+ sal_uInt16 nBulletWidth = 0;
if( SVX_NUM_BITMAP == rFmt.GetNumberingType() )
{
nBulletWidth = lcl_DrawGraphic(pVDev, rFmt,
@@ -1193,7 +1193,7 @@ void NumberingPreview::Paint( const Rectangle& /*rRect*/ )
String aText(pActNum->MakeNumString( aNumVector ));
// <--
pVDev->DrawText( Point(nNumberXPos, nYStart), aText );
- nBulletWidth = (USHORT)pVDev->GetTextWidth(aText);
+ nBulletWidth = (sal_uInt16)pVDev->GetTextWidth(aText);
nPreNum++;
}
// --> OD 2008-02-01 #newlistlevelattrs#
@@ -1203,12 +1203,12 @@ void NumberingPreview::Paint( const Rectangle& /*rRect*/ )
pVDev->SetFont(aStdFont);
String aText(' ');
pVDev->DrawText( Point(nNumberXPos, nYStart), aText );
- nBulletWidth = nBulletWidth + (USHORT)pVDev->GetTextWidth(aText);
+ nBulletWidth = nBulletWidth + (sal_uInt16)pVDev->GetTextWidth(aText);
}
// <--
// --> OD 2008-02-01 #newlistlevelattrs#
- USHORT nTextXPos( 0 );
+ sal_uInt16 nTextXPos( 0 );
if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION )
{
nTextXPos = nXStart;
@@ -1223,7 +1223,7 @@ void NumberingPreview::Paint( const Rectangle& /*rRect*/ )
{
case SvxNumberFormat::LISTTAB:
{
- nTextXPos = static_cast<USHORT>(
+ nTextXPos = static_cast<sal_uInt16>(
rFmt.GetListtabPos() / nWidthRelation );
if ( nTextXPos < nNumberXPos + nBulletWidth )
{
@@ -1239,7 +1239,7 @@ void NumberingPreview::Paint( const Rectangle& /*rRect*/ )
break;
}
- nXStart = static_cast<USHORT>( rFmt.GetIndentAt() / nWidthRelation );
+ nXStart = static_cast<sal_uInt16>( rFmt.GetIndentAt() / nWidthRelation );
}
// <--
@@ -1256,14 +1256,14 @@ void NumberingPreview::Paint( const Rectangle& /*rRect*/ )
else
{
SwNumberTree::tNumberVector aNumVector;
- USHORT nLineHeight = nFontHeight * 3 / 2;
- for( BYTE nLevel = 0; nLevel < MAXLEVEL;
+ sal_uInt16 nLineHeight = nFontHeight * 3 / 2;
+ for( sal_uInt8 nLevel = 0; nLevel < MAXLEVEL;
++nLevel, nYStart = nYStart + nYStep )
{
const SwNumFmt &rFmt = pActNum->Get(nLevel);
aNumVector.push_back(rFmt.GetStart());
// --> OD 2008-02-01 #newlistlevelattrs#
- USHORT nXStart( 0 );
+ sal_uInt16 nXStart( 0 );
if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION )
{
nXStart = rFmt.GetAbsLSpace() / nWidthRelation;
@@ -1279,13 +1279,13 @@ void NumberingPreview::Paint( const Rectangle& /*rRect*/ )
}
else
{
- nXStart = static_cast<USHORT>(nTmpXStart);
+ nXStart = static_cast<sal_uInt16>(nTmpXStart);
}
}
nXStart /= 2;
nXStart += 2;
// <--
- USHORT nTextOffset = 2 * nXStep;
+ sal_uInt16 nTextOffset = 2 * nXStep;
if( SVX_NUM_BITMAP == rFmt.GetNumberingType() )
{
lcl_DrawGraphic(pVDev, rFmt, nXStart, nYStart, nWidthRelation);
@@ -1305,7 +1305,7 @@ void NumberingPreview::Paint( const Rectangle& /*rRect*/ )
String aText(pActNum->MakeNumString( aNumVector ));
// <--
pVDev->DrawText( Point(nXStart, nYStart), aText );
- nTextOffset = (USHORT)pVDev->GetTextWidth(aText);
+ nTextOffset = (sal_uInt16)pVDev->GetTextWidth(aText);
nTextOffset = nTextOffset + nXStep;
nPreNum++;
}
diff --git a/sw/source/ui/misc/pgfnote.cxx b/sw/source/ui/misc/pgfnote.cxx
index a8c75455c4..70a807ae37 100644
--- a/sw/source/ui/misc/pgfnote.cxx
+++ b/sw/source/ui/misc/pgfnote.cxx
@@ -70,7 +70,7 @@
Beschreibung: vordefinierte Linien in Point
--------------------------------------------------------------------*/
-static const USHORT __FAR_DATA nLines[] = {
+static const sal_uInt16 __FAR_DATA nLines[] = {
0,
50,
100,
@@ -79,9 +79,9 @@ static const USHORT __FAR_DATA nLines[] = {
500
};
-static const USHORT nLineCount = sizeof(nLines) / sizeof(nLines[0]);
+static const sal_uInt16 nLineCount = sizeof(nLines) / sizeof(nLines[0]);
-static USHORT __FAR_DATA aPageRg[] = {
+static sal_uInt16 __FAR_DATA aPageRg[] = {
FN_PARAM_FTN_INFO, FN_PARAM_FTN_INFO,
0
};
@@ -93,13 +93,13 @@ static USHORT __FAR_DATA aPageRg[] = {
------------------------------------------------------------------------*/
-BOOL lcl_HasLineWidth(USHORT nWidth)
+sal_Bool lcl_HasLineWidth(sal_uInt16 nWidth)
{
- for(USHORT i = 0; i < nLineCount; ++i) {
+ for(sal_uInt16 i = 0; i < nLineCount; ++i) {
if(nLines[i] == nWidth)
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
/*------------------------------------------------------------------------
@@ -111,7 +111,7 @@ BOOL lcl_HasLineWidth(USHORT nWidth)
IMPL_LINK_INLINE_START( SwFootNotePage, HeightPage, Button *, EMPTYARG )
{
- aMaxHeightEdit.Enable(FALSE);
+ aMaxHeightEdit.Enable(sal_False);
return 0;
}
IMPL_LINK_INLINE_END( SwFootNotePage, HeightPage, Button *, EMPTYARG )
@@ -177,7 +177,7 @@ SwFootNotePage::SwFootNotePage(Window *pParent, const SfxItemSet &rSet) :
FreeResource();
SetExchangeSupport();
- FieldUnit aMetric = ::GetDfltMetric(FALSE);
+ FieldUnit aMetric = ::GetDfltMetric(sal_False);
SetMetric( aMaxHeightEdit, aMetric );
SetMetric( aDistEdit, aMetric );
SetMetric( aLineDistEdit, aMetric );
@@ -225,12 +225,12 @@ void SwFootNotePage::Reset(const SfxItemSet &rSet)
if(lHeight)
{
aMaxHeightEdit.SetValue(aMaxHeightEdit.Normalize(lHeight),FUNIT_TWIP);
- aMaxHeightBtn.Check(TRUE);
+ aMaxHeightBtn.Check(sal_True);
}
else
{
- aMaxHeightPageBtn.Check(TRUE);
- aMaxHeightEdit.Enable(FALSE);
+ aMaxHeightPageBtn.Check(sal_True);
+ aMaxHeightEdit.Enable(sal_False);
}
aMaxHeightPageBtn.SetClickHdl(LINK(this,SwFootNotePage,HeightPage));
aMaxHeightBtn.SetClickHdl(LINK(this,SwFootNotePage,HeightMetric));
@@ -240,16 +240,16 @@ void SwFootNotePage::Reset(const SfxItemSet &rSet)
aLineDistEdit.SetLoseFocusHdl( aLk );
// Trennlinie
- for(USHORT i = 0; i < nLineCount; ++i)
+ for(sal_uInt16 i = 0; i < nLineCount; ++i)
aLineTypeBox.InsertEntry(nLines[i]);
- const USHORT nWidth = (USHORT)pFtnInfo->GetLineWidth() * TWIP_TO_LBOX;
+ const sal_uInt16 nWidth = (sal_uInt16)pFtnInfo->GetLineWidth() * TWIP_TO_LBOX;
if ( !lcl_HasLineWidth(nWidth) )
aLineTypeBox.InsertEntry(nWidth);
aLineTypeBox.SelectEntry(nWidth);
// Position
- aLinePosBox.SelectEntryPos( static_cast< USHORT >(pFtnInfo->GetAdj()) );
+ aLinePosBox.SelectEntryPos( static_cast< sal_uInt16 >(pFtnInfo->GetAdj()) );
// Breite
Fraction aTmp( 100, 1 );
@@ -269,7 +269,7 @@ void SwFootNotePage::Reset(const SfxItemSet &rSet)
--------------------------------------------------------------------*/
-BOOL SwFootNotePage::FillItemSet(SfxItemSet &rSet)
+sal_Bool SwFootNotePage::FillItemSet(SfxItemSet &rSet)
{
SwPageFtnInfoItem aItem((const SwPageFtnInfoItem&)GetItemSet().Get(FN_PARAM_FTN_INFO));
@@ -290,7 +290,7 @@ BOOL SwFootNotePage::FillItemSet(SfxItemSet &rSet)
aLineDistEdit.Denormalize(aLineDistEdit.GetValue(FUNIT_TWIP))));
// Trennlinie
- const USHORT nPos = aLineTypeBox.GetSelectEntryPos();
+ const sal_uInt16 nPos = aLineTypeBox.GetSelectEntryPos();
if( LISTBOX_ENTRY_NOTFOUND != nPos )
rFtnInfo.SetLineWidth(nLines[nPos] / TWIP_TO_LBOX);
@@ -305,7 +305,7 @@ BOOL SwFootNotePage::FillItemSet(SfxItemSet &rSet)
aItem != *pOldItem )
rSet.Put(aItem);
- return TRUE;
+ return sal_True;
}
void SwFootNotePage::ActivatePage(const SfxItemSet& rSet)
@@ -314,7 +314,7 @@ void SwFootNotePage::ActivatePage(const SfxItemSet& rSet)
lMaxHeight = rSize.GetSize().Height();
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == rSet.GetItemState( rSet.GetPool()->GetWhich( SID_ATTR_PAGE_HEADERSET), FALSE, &pItem ) )
+ if( SFX_ITEM_SET == rSet.GetItemState( rSet.GetPool()->GetWhich( SID_ATTR_PAGE_HEADERSET), sal_False, &pItem ) )
{
const SfxItemSet& rHeaderSet = ((SvxSetItem*)pItem)->GetItemSet();
const SfxBoolItem& rHeaderOn =
@@ -329,7 +329,7 @@ void SwFootNotePage::ActivatePage(const SfxItemSet& rSet)
}
if( SFX_ITEM_SET == rSet.GetItemState( rSet.GetPool()->GetWhich( SID_ATTR_PAGE_FOOTERSET),
- FALSE, &pItem ) )
+ sal_False, &pItem ) )
{
const SfxItemSet& rFooterSet = ((SvxSetItem*)pItem)->GetItemSet();
const SfxBoolItem& rFooterOn =
@@ -343,7 +343,7 @@ void SwFootNotePage::ActivatePage(const SfxItemSet& rSet)
}
}
- if ( rSet.GetItemState( RES_UL_SPACE , FALSE ) == SFX_ITEM_SET )
+ if ( rSet.GetItemState( RES_UL_SPACE , sal_False ) == SFX_ITEM_SET )
{
const SvxULSpaceItem &rUL = (const SvxULSpaceItem&)rSet.Get( RES_UL_SPACE );
lMaxHeight -= rUL.GetUpper() + rUL.GetLower();
@@ -361,10 +361,10 @@ int SwFootNotePage::DeactivatePage( SfxItemSet* _pSet)
if(_pSet)
FillItemSet(*_pSet);
- return TRUE;
+ return sal_True;
}
-USHORT* SwFootNotePage::GetRanges()
+sal_uInt16* SwFootNotePage::GetRanges()
{
return aPageRg;
}
diff --git a/sw/source/ui/misc/pggrid.cxx b/sw/source/ui/misc/pggrid.cxx
index 673f78b006..8a103b809a 100644
--- a/sw/source/ui/misc/pggrid.cxx
+++ b/sw/source/ui/misc/pggrid.cxx
@@ -149,14 +149,14 @@ SwTextGridPage::SwTextGridPage(Window *pParent, const SfxItemSet &rSet) :
XColorTable* pColorTbl = XColorTable::GetStdColorTable();
aColorLB.InsertAutomaticEntry();
- for( USHORT i = 0; i < pColorTbl->Count(); ++i )
+ for( sal_uInt16 i = 0; i < pColorTbl->Count(); ++i )
{
XColorEntry* pEntry = pColorTbl->GetColor( i );
Color aColor = pEntry->GetColor();
String sName = pEntry->GetName();
aColorLB.InsertEntry( aColor, sName );
}
- aColorLB.SetUpdateMode( TRUE );
+ aColorLB.SetUpdateMode( sal_True );
//Get the default paper mode
SwView *pView = ::GetActiveView();
if( pView )
@@ -202,9 +202,9 @@ SfxTabPage *SwTextGridPage::Create(Window *pParent, const SfxItemSet &rSet)
/*-- 06.02.2002 15:25:40---------------------------------------------------
-----------------------------------------------------------------------*/
-BOOL SwTextGridPage::FillItemSet(SfxItemSet &rSet)
+sal_Bool SwTextGridPage::FillItemSet(SfxItemSet &rSet)
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if(aNoGridRB.GetSavedValue() != aNoGridRB.IsChecked()||
aLinesGridRB.GetSavedValue() != aLinesGridRB.IsChecked()||
aLinesPerPageNF.GetSavedValue().ToInt32()
@@ -221,7 +221,7 @@ BOOL SwTextGridPage::FillItemSet(SfxItemSet &rSet)
aColorLB.GetSavedValue() != aColorLB.GetSelectEntryPos())
{
PutGridItem(rSet);
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
@@ -231,7 +231,7 @@ BOOL SwTextGridPage::FillItemSet(SfxItemSet &rSet)
-----------------------------------------------------------------------*/
void SwTextGridPage::Reset(const SfxItemSet &rSet)
{
- if(SFX_ITEM_AVAILABLE <= rSet.GetItemState(RES_TEXTGRID, TRUE))
+ if(SFX_ITEM_AVAILABLE <= rSet.GetItemState(RES_TEXTGRID, sal_True))
{
const SwTextGridItem& rGridItem = (const SwTextGridItem&)rSet.Get(RES_TEXTGRID);
RadioButton* pButton = 0;
@@ -315,7 +315,7 @@ void SwTextGridPage::PutGridItem(SfxItemSet& rSet)
---------------------------------------------------------------------------*/
void SwTextGridPage::UpdatePageSize(const SfxItemSet& rSet)
{
- if( SFX_ITEM_UNKNOWN != rSet.GetItemState( RES_FRAMEDIR, TRUE ))
+ if( SFX_ITEM_UNKNOWN != rSet.GetItemState( RES_FRAMEDIR, sal_True ))
{
const SvxFrameDirectionItem& rDirItem =
(const SvxFrameDirectionItem&)rSet.Get(RES_FRAMEDIR);
@@ -374,9 +374,9 @@ void SwTextGridPage::UpdatePageSize(const SfxItemSet& rSet)
/* -----------------------------06.02.2002 15:24------------------------------
---------------------------------------------------------------------------*/
-USHORT* SwTextGridPage::GetRanges()
+sal_uInt16* SwTextGridPage::GetRanges()
{
- static USHORT __FAR_DATA aPageRg[] = {
+ static sal_uInt16 __FAR_DATA aPageRg[] = {
RES_TEXTGRID, RES_TEXTGRID,
0};
return aPageRg;
diff --git a/sw/source/ui/misc/redlndlg.cxx b/sw/source/ui/misc/redlndlg.cxx
index 2947edfcee..b32dabff5d 100644
--- a/sw/source/ui/misc/redlndlg.cxx
+++ b/sw/source/ui/misc/redlndlg.cxx
@@ -37,9 +37,7 @@
#include <redline.hxx>
#include <tools/datetime.hxx>
#include <vcl/msgbox.hxx>
-#ifndef _SVSTDARR_HXX
#include <svl/svstdarr.hxx>
-#endif
#include <svl/eitem.hxx>
#include <sfx2/viewfrm.hxx>
#include <sfx2/dispatch.hxx>
@@ -47,9 +45,7 @@
#include <svx/postattr.hxx>
#include <swtypes.hxx>
#include <wrtsh.hxx>
-#ifndef _VIEW_HXX
#include <view.hxx>
-#endif
#include <swmodule.hxx>
#ifndef _REDLNDLG_HXX
#define _REDLNACCEPTDLG
@@ -58,26 +54,15 @@
#include <swwait.hxx>
#include <uitool.hxx>
-#ifndef _HELPID_H
#include <helpid.h>
-#endif
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
-#ifndef _MISC_HRC
#include <misc.hrc>
-#endif
-#ifndef _REDLNDLG_HRC
#include <redlndlg.hrc>
-#endif
-#ifndef _SHELLS_HRC
#include <shells.hrc>
-#endif
// -> #111827#
#include <comcore.hrc>
#include <swundo.hxx>
-#include <undobj.hxx>
#include <SwRewriter.hxx>
// <- #111827#
@@ -102,15 +87,15 @@ SV_IMPL_OP_PTRARR_SORT(SwRedlineDataParentSortArr, SwRedlineDataParentPtr)
SV_IMPL_PTRARR(SwRedlineDataChildArr, SwRedlineDataChildPtr)
SV_IMPL_PTRARR(SvLBoxEntryArr, SvLBoxEntryPtr)
-static USHORT nSortMode = 0xffff;
-static BOOL bSortDir = TRUE;
+static sal_uInt16 nSortMode = 0xffff;
+static sal_Bool bSortDir = sal_True;
/*------------------------------------------------------------------------
Beschreibung:
------------------------------------------------------------------------*/
SwRedlineAcceptChild::SwRedlineAcceptChild( Window* _pParent,
- USHORT nId,
+ sal_uInt16 nId,
SfxBindings* pBindings,
SfxChildWinInfo* pInfo ) :
SwChildWinWrapper( _pParent, nId )
@@ -124,11 +109,11 @@ SwRedlineAcceptChild::SwRedlineAcceptChild( Window* _pParent,
Beschreibung: Nach Dok-Wechsel Dialog neu initialisieren
--------------------------------------------------------------------*/
-BOOL SwRedlineAcceptChild::ReInitDlg(SwDocShell *pDocSh)
+sal_Bool SwRedlineAcceptChild::ReInitDlg(SwDocShell *pDocSh)
{
- BOOL bRet;
+ sal_Bool bRet;
- if ((bRet = SwChildWinWrapper::ReInitDlg(pDocSh)) == TRUE) // Sofort aktualisieren, Dok-Wechsel
+ if ((bRet = SwChildWinWrapper::ReInitDlg(pDocSh)) == sal_True) // Sofort aktualisieren, Dok-Wechsel
((SwModelessRedlineAcceptDlg*)GetWindow())->Activate();
return bRet;
@@ -164,13 +149,13 @@ void SwModelessRedlineAcceptDlg::Activate()
if (pChildWin->GetOldDocShell() != pDocSh)
{ // Dok-Wechsel
- SwWait aWait( *pDocSh, FALSE );
+ SwWait aWait( *pDocSh, sal_False );
SwWrtShell* pSh = pView->GetWrtShellPtr();
pChildWin->SetOldDocShell(pDocSh); // Rekursion vermeiden (durch Modified-Hdl)
- BOOL bMod = pSh->IsModified();
- SfxBoolItem aShow(FN_REDLINE_SHOW, TRUE);
+ sal_Bool bMod = pSh->IsModified();
+ SfxBoolItem aShow(FN_REDLINE_SHOW, sal_True);
pSh->GetView().GetViewFrame()->GetDispatcher()->Execute(
FN_REDLINE_SHOW, SFX_CALLMODE_SYNCHRON|SFX_CALLMODE_RECORD, &aShow, 0L);
if (!bMod)
@@ -229,7 +214,7 @@ SwModelessRedlineAcceptDlg::~SwModelessRedlineAcceptDlg()
Beschreibung:
------------------------------------------------------------------------*/
-SwRedlineAcceptDlg::SwRedlineAcceptDlg(Dialog *pParent, BOOL bAutoFmt) :
+SwRedlineAcceptDlg::SwRedlineAcceptDlg(Dialog *pParent, sal_Bool bAutoFmt) :
pParentDlg (pParent),
aTabPagesCTRL (pParent, SW_RES(CTRL_TABPAGES)),
aPopup (SW_RES(MN_REDLINE_POPUP)),
@@ -239,8 +224,8 @@ SwRedlineAcceptDlg::SwRedlineAcceptDlg(Dialog *pParent, BOOL bAutoFmt) :
sTableChgd (SW_RES(STR_REDLINE_TABLECHG)),
sFmtCollSet (SW_RES(STR_REDLINE_FMTCOLLSET)),
sAutoFormat (SW_RES(STR_REDLINE_AUTOFMT)),
- bOnlyFormatedRedlines( FALSE ),
- bHasReadonlySel ( FALSE ),
+ bOnlyFormatedRedlines( sal_False ),
+ bHasReadonlySel ( sal_False ),
bRedlnAutoFmt (bAutoFmt),
bInhibitActivate( false )
{
@@ -267,7 +252,7 @@ SwRedlineAcceptDlg::SwRedlineAcceptDlg(Dialog *pParent, BOOL bAutoFmt) :
{
pActLB->InsertEntry(sFmtCollSet);
pActLB->InsertEntry(sAutoFormat);
- pTPView->ShowUndo(TRUE);
+ pTPView->ShowUndo(sal_True);
pTPView->DisableUndo(); // Noch gibts keine UNDO-Events
}
@@ -327,11 +312,11 @@ SwRedlineAcceptDlg::~SwRedlineAcceptDlg()
Beschreibung:
------------------------------------------------------------------------*/
-void SwRedlineAcceptDlg::Init(USHORT nStart)
+void SwRedlineAcceptDlg::Init(sal_uInt16 nStart)
{
- SwWait aWait( *::GetActiveView()->GetDocShell(), FALSE );
- pTable->SetUpdateMode(FALSE);
- aUsedSeqNo.Remove((USHORT)0, aUsedSeqNo.Count());
+ SwWait aWait( *::GetActiveView()->GetDocShell(), sal_False );
+ pTable->SetUpdateMode(sal_False);
+ aUsedSeqNo.Remove((sal_uInt16)0, aUsedSeqNo.Count());
if (nStart)
RemoveParents(nStart, aRedlineParents.Count() - 1);
@@ -346,7 +331,7 @@ void SwRedlineAcceptDlg::Init(USHORT nStart)
InsertParents(nStart);
InitAuthors();
- pTable->SetUpdateMode(TRUE);
+ pTable->SetUpdateMode(sal_True);
// #i69618# this moves the list box to the right position, visually
SvLBoxEntry* pSelEntry = pTable->FirstSelected();
if( pSelEntry )
@@ -369,12 +354,12 @@ void SwRedlineAcceptDlg::InitAuthors()
pFilterPage->ClearAuthors();
String sParent;
- USHORT nCount = pSh->GetRedlineCount();
+ sal_uInt16 nCount = pSh->GetRedlineCount();
- bOnlyFormatedRedlines = TRUE;
- bHasReadonlySel = FALSE;
- BOOL bIsNotFormated = FALSE;
- USHORT i;
+ bOnlyFormatedRedlines = sal_True;
+ bHasReadonlySel = sal_False;
+ sal_Bool bIsNotFormated = sal_False;
+ sal_uInt16 i;
// Autoren ermitteln
for ( i = 0; i < nCount; i++)
@@ -382,17 +367,17 @@ void SwRedlineAcceptDlg::InitAuthors()
const SwRedline& rRedln = pSh->GetRedline(i);
if( bOnlyFormatedRedlines && nsRedlineType_t::REDLINE_FORMAT != rRedln.GetType() )
- bOnlyFormatedRedlines = FALSE;
+ bOnlyFormatedRedlines = sal_False;
//JP 27.9.2001: make no sense if we handle readonly sections
// if( !bHasReadonlySel && rRedln.HasReadonlySel() )
-// bHasReadonlySel = TRUE;
+// bHasReadonlySel = sal_True;
String *pAuthor = new String(rRedln.GetAuthorString());
if (!aStrings.Insert(pAuthor))
delete pAuthor;
- for (USHORT nStack = 1; nStack < rRedln.GetStackCount(); nStack++)
+ for (sal_uInt16 nStack = 1; nStack < rRedln.GetStackCount(); nStack++)
{
pAuthor = new String(rRedln.GetAuthorString(nStack));
if (!aStrings.Insert(pAuthor))
@@ -406,13 +391,13 @@ void SwRedlineAcceptDlg::InitAuthors()
if (pFilterPage->SelectAuthor(sOldAuthor) == LISTBOX_ENTRY_NOTFOUND && aStrings.Count())
pFilterPage->SelectAuthor(*aStrings[0]);
- BOOL bEnable = pTable->GetEntryCount() != 0 && !pSh->getIDocumentRedlineAccess()->GetRedlinePassword().getLength();
- BOOL bSel = pTable->FirstSelected() != 0;
+ sal_Bool bEnable = pTable->GetEntryCount() != 0 && !pSh->getIDocumentRedlineAccess()->GetRedlinePassword().getLength();
+ sal_Bool bSel = pTable->FirstSelected() != 0;
SvLBoxEntry* pSelEntry = pTable->FirstSelected();
while (pSelEntry)
{
- USHORT nPos = GetRedlinePos(*pSelEntry);
+ sal_uInt16 nPos = GetRedlinePos(*pSelEntry);
const SwRedline& rRedln = pSh->GetRedline( nPos );
bIsNotFormated |= nsRedlineType_t::REDLINE_FORMAT != rRedln.GetType();
@@ -431,7 +416,7 @@ void SwRedlineAcceptDlg::InitAuthors()
------------------------------------------------------------------------*/
String SwRedlineAcceptDlg::GetRedlineText( const SwRedline& rRedln,
- DateTime &rDateTime, USHORT nStack)
+ DateTime &rDateTime, sal_uInt16 nStack)
{
String sEntry(GetActionText(rRedln, nStack));
sEntry += '\t';
@@ -453,7 +438,7 @@ String SwRedlineAcceptDlg::GetRedlineText( const SwRedline& rRedln,
Beschreibung:
------------------------------------------------------------------------*/
-const String &SwRedlineAcceptDlg::GetActionText(const SwRedline& rRedln, USHORT nStack)
+const String &SwRedlineAcceptDlg::GetActionText(const SwRedline& rRedln, sal_uInt16 nStack)
{
switch( rRedln.GetType(nStack) )
{
@@ -495,9 +480,9 @@ void SwRedlineAcceptDlg::Activate()
return;
SwView *pView = ::GetActiveView();
- SwWait aWait( *pView->GetDocShell(), FALSE );
+ SwWait aWait( *pView->GetDocShell(), sal_False );
- aUsedSeqNo.Remove((USHORT)0, aUsedSeqNo.Count());
+ aUsedSeqNo.Remove((sal_uInt16)0, aUsedSeqNo.Count());
if (!pView) // Kann passieren, wenn man auf eine andere App umschaltet, wenn
return; // vorher eine Listbox im Dialog den Focus hatte (eigentlich THs Bug)
@@ -510,11 +495,11 @@ void SwRedlineAcceptDlg::Activate()
// Hat sich was geaendert?
SwWrtShell* pSh = pView->GetWrtShellPtr();
- USHORT nCount = pSh->GetRedlineCount();
+ sal_uInt16 nCount = pSh->GetRedlineCount();
// Anzahl und Pointer ueberpruefen
SwRedlineDataParent *pParent = 0;
- USHORT i;
+ sal_uInt16 i;
for ( i = 0; i < nCount; i++)
{
@@ -531,7 +516,7 @@ void SwRedlineAcceptDlg::Activate()
if (&rRedln.GetRedlineData() != pParent->pData)
{
// Redline-Parents wurden eingefuegt, geaendert oder geloescht
- if ((i = CalcDiff(i, FALSE)) == USHRT_MAX)
+ if ((i = CalcDiff(i, sal_False)) == USHRT_MAX)
return;
continue;
}
@@ -542,7 +527,7 @@ void SwRedlineAcceptDlg::Activate()
if (!pRedlineData && pBackupData)
{
// Redline-Childs wurden geloescht
- if ((i = CalcDiff(i, TRUE)) == USHRT_MAX)
+ if ((i = CalcDiff(i, sal_True)) == USHRT_MAX)
return;
continue;
}
@@ -553,7 +538,7 @@ void SwRedlineAcceptDlg::Activate()
if (pRedlineData != pBackupData->pChild)
{
// Redline-Childs wurden eingefuegt, geaendert oder geloescht
- if ((i = CalcDiff(i, TRUE)) == USHRT_MAX)
+ if ((i = CalcDiff(i, sal_True)) == USHRT_MAX)
return;
continue;
}
@@ -597,7 +582,7 @@ void SwRedlineAcceptDlg::Activate()
*
* --------------------------------------------------*/
-USHORT SwRedlineAcceptDlg::CalcDiff(USHORT nStart, BOOL bChild)
+sal_uInt16 SwRedlineAcceptDlg::CalcDiff(sal_uInt16 nStart, sal_Bool bChild)
{
if (!nStart)
{
@@ -605,10 +590,10 @@ USHORT SwRedlineAcceptDlg::CalcDiff(USHORT nStart, BOOL bChild)
return USHRT_MAX;
}
- pTable->SetUpdateMode(FALSE);
+ pTable->SetUpdateMode(sal_False);
SwView *pView = ::GetActiveView();
SwWrtShell* pSh = pView->GetWrtShellPtr();
- USHORT nAutoFmt = HasRedlineAutoFmt() ? nsRedlineType_t::REDLINE_FORM_AUTOFMT : 0;
+ sal_uInt16 nAutoFmt = HasRedlineAutoFmt() ? nsRedlineType_t::REDLINE_FORM_AUTOFMT : 0;
SwRedlineDataParent *pParent = aRedlineParents[nStart];
const SwRedline& rRedln = pSh->GetRedline(nStart);
@@ -632,26 +617,26 @@ USHORT SwRedlineAcceptDlg::CalcDiff(USHORT nStart, BOOL bChild)
// Neue Childs einfuegen
InsertChilds(pParent, rRedln, nAutoFmt);
- pTable->SetUpdateMode(TRUE);
+ pTable->SetUpdateMode(sal_True);
return nStart;
}
// Wurden Eintraege geloescht?
const SwRedlineData *pRedlineData = &rRedln.GetRedlineData();
- USHORT i;
+ sal_uInt16 i;
for ( i = nStart + 1; i < aRedlineParents.Count(); i++)
{
if (aRedlineParents[i]->pData == pRedlineData)
{
// Eintraege von nStart bis i-1 entfernen
RemoveParents(nStart, i - 1);
- pTable->SetUpdateMode(TRUE);
+ pTable->SetUpdateMode(sal_True);
return nStart - 1;
}
}
// Wurden Eintraege eingefuegt?
- USHORT nCount = pSh->GetRedlineCount();
+ sal_uInt16 nCount = pSh->GetRedlineCount();
pRedlineData = aRedlineParents[nStart]->pData;
for (i = nStart + 1; i < nCount; i++)
@@ -660,12 +645,12 @@ USHORT SwRedlineAcceptDlg::CalcDiff(USHORT nStart, BOOL bChild)
{
// Eintraege von nStart bis i-1 einfuegen
InsertParents(nStart, i - 1);
- pTable->SetUpdateMode(TRUE);
+ pTable->SetUpdateMode(sal_True);
return nStart - 1;
}
}
- pTable->SetUpdateMode(TRUE);
+ pTable->SetUpdateMode(sal_True);
Init(nStart); // Alle Eintraege bis zum Ende abgleichen
return USHRT_MAX;
}
@@ -674,19 +659,19 @@ USHORT SwRedlineAcceptDlg::CalcDiff(USHORT nStart, BOOL bChild)
*
* --------------------------------------------------*/
-void SwRedlineAcceptDlg::InsertChilds(SwRedlineDataParent *pParent, const SwRedline& rRedln, const USHORT nAutoFmt)
+void SwRedlineAcceptDlg::InsertChilds(SwRedlineDataParent *pParent, const SwRedline& rRedln, const sal_uInt16 nAutoFmt)
{
String sChild;
SwRedlineDataChild *pLastRedlineChild = 0;
const SwRedlineData *pRedlineData = &rRedln.GetRedlineData();
- BOOL bAutoFmt = (rRedln.GetRealType() & nAutoFmt) != 0;
+ sal_Bool bAutoFmt = (rRedln.GetRealType() & nAutoFmt) != 0;
const String *pAction = &GetActionText(rRedln);
- BOOL bValidParent = !sFilterAction.Len() || sFilterAction == *pAction;
+ sal_Bool bValidParent = !sFilterAction.Len() || sFilterAction == *pAction;
bValidParent = bValidParent && pTable->IsValidEntry(&rRedln.GetAuthorString(), &rRedln.GetTimeStamp(), &rRedln.GetComment());
if (nAutoFmt)
{
- USHORT nPos;
+ sal_uInt16 nPos;
if (pParent->pData->GetSeqNo() && !aUsedSeqNo.Insert(pParent, nPos)) // Gibts schon
{
@@ -700,9 +685,9 @@ void SwRedlineAcceptDlg::InsertChilds(SwRedlineDataParent *pParent, const SwRedl
}
bValidParent = bValidParent && bAutoFmt;
}
- BOOL bValidTree = bValidParent;
+ sal_Bool bValidTree = bValidParent;
- for (USHORT nStack = 1; nStack < rRedln.GetStackCount(); nStack++)
+ for (sal_uInt16 nStack = 1; nStack < rRedln.GetStackCount(); nStack++)
{
pRedlineData = pRedlineData->Next();
@@ -716,7 +701,7 @@ void SwRedlineAcceptDlg::InsertChilds(SwRedlineDataParent *pParent, const SwRedl
pParent->pNext = pRedlineChild;
pAction = &GetActionText(rRedln, nStack);
- BOOL bValidChild = !sFilterAction.Len() || sFilterAction == *pAction;
+ sal_Bool bValidChild = !sFilterAction.Len() || sFilterAction == *pAction;
bValidChild = bValidChild && pTable->IsValidEntry(&rRedln.GetAuthorString(nStack), &rRedln.GetTimeStamp(nStack), &rRedln.GetComment());
if (nAutoFmt)
bValidChild = bValidChild && bAutoFmt;
@@ -726,7 +711,7 @@ void SwRedlineAcceptDlg::InsertChilds(SwRedlineDataParent *pParent, const SwRedl
{
RedlinData *pData = new RedlinData;
pData->pData = pRedlineChild;
- pData->bDisabled = TRUE;
+ pData->bDisabled = sal_True;
sChild = GetRedlineText(rRedln, pData->aDateTime, nStack);
SvLBoxEntry* pChild = pTable->InsertEntry(sChild, pData, pParent->pTLBParent);
@@ -757,22 +742,22 @@ void SwRedlineAcceptDlg::InsertChilds(SwRedlineDataParent *pParent, const SwRedl
*
* --------------------------------------------------*/
-void SwRedlineAcceptDlg::RemoveParents(USHORT nStart, USHORT nEnd)
+void SwRedlineAcceptDlg::RemoveParents(sal_uInt16 nStart, sal_uInt16 nEnd)
{
SwWrtShell* pSh = ::GetActiveView()->GetWrtShellPtr();
- USHORT nCount = pSh->GetRedlineCount();
+ sal_uInt16 nCount = pSh->GetRedlineCount();
SvLBoxEntryArr aLBoxArr;
// Wegen Bug der TLB, die bei Remove den SelectHandler IMMER ruft:
pTable->SetSelectHdl(aOldSelectHdl);
pTable->SetDeselectHdl(aOldDeselectHdl);
- BOOL bChildsRemoved = FALSE;
- pTable->SelectAll(FALSE);
+ sal_Bool bChildsRemoved = sal_False;
+ pTable->SelectAll(sal_False);
// Hinter dem letzten Eintrag Cursor setzen, da sonst Performance-Problem in TLB.
// TLB wuerde sonst bei jedem Remove den Cursor erneut umsetzen (teuer)
- USHORT nPos = Min((USHORT)nCount, (USHORT)aRedlineParents.Count());
+ sal_uInt16 nPos = Min((sal_uInt16)nCount, (sal_uInt16)aRedlineParents.Count());
SvLBoxEntry *pCurEntry = NULL;
while( ( pCurEntry == NULL ) && ( nPos > 0 ) )
{
@@ -785,16 +770,16 @@ void SwRedlineAcceptDlg::RemoveParents(USHORT nStart, USHORT nEnd)
SvLBoxTreeList* pModel = pTable->GetModel();
- for (USHORT i = nStart; i <= nEnd; i++)
+ for (sal_uInt16 i = nStart; i <= nEnd; i++)
{
if (!bChildsRemoved && aRedlineParents[i]->pNext)
{
SwRedlineDataChildPtr pChildPtr = (SwRedlineDataChildPtr)aRedlineParents[i]->pNext;
- USHORT nChildPos = aRedlineChilds.GetPos(pChildPtr);
+ sal_uInt16 nChildPos = aRedlineChilds.GetPos(pChildPtr);
if (nChildPos != USHRT_MAX)
{
- USHORT nChilds = 0;
+ sal_uInt16 nChilds = 0;
while (pChildPtr)
{
@@ -803,30 +788,30 @@ void SwRedlineAcceptDlg::RemoveParents(USHORT nStart, USHORT nEnd)
}
aRedlineChilds.DeleteAndDestroy(nChildPos, nChilds);
- bChildsRemoved = TRUE;
+ bChildsRemoved = sal_True;
}
}
SvLBoxEntry *pEntry = aRedlineParents[i]->pTLBParent;
if (pEntry)
{
long nIdx = aLBoxArr.Count() - 1L;
- ULONG nAbsPos = pModel->GetAbsPos(pEntry);
+ sal_uLong nAbsPos = pModel->GetAbsPos(pEntry);
while (nIdx >= 0 &&
- pModel->GetAbsPos(aLBoxArr[ static_cast< USHORT >(nIdx) ]) > nAbsPos)
+ pModel->GetAbsPos(aLBoxArr[ static_cast< sal_uInt16 >(nIdx) ]) > nAbsPos)
nIdx--;
- aLBoxArr.Insert( pEntry, static_cast< USHORT >(++nIdx) );
+ aLBoxArr.Insert( pEntry, static_cast< sal_uInt16 >(++nIdx) );
}
}
// TLB von hinten abraeumen
long nIdx = (long)aLBoxArr.Count() - 1L;
while (nIdx >= 0)
- pTable->RemoveEntry(aLBoxArr[ static_cast< USHORT >(nIdx--) ]);
+ pTable->RemoveEntry(aLBoxArr[ static_cast< sal_uInt16 >(nIdx--) ]);
pTable->SetSelectHdl(LINK(this, SwRedlineAcceptDlg, SelectHdl));
pTable->SetDeselectHdl(LINK(this, SwRedlineAcceptDlg, DeselectHdl));
// Durch Remove wurde leider wieder dauernd von der TLB selektiert...
- pTable->SelectAll(FALSE);
+ pTable->SelectAll(sal_False);
aRedlineParents.DeleteAndDestroy( nStart, nEnd - nStart + 1);
}
@@ -835,15 +820,15 @@ void SwRedlineAcceptDlg::RemoveParents(USHORT nStart, USHORT nEnd)
*
* --------------------------------------------------*/
-void SwRedlineAcceptDlg::InsertParents(USHORT nStart, USHORT nEnd)
+void SwRedlineAcceptDlg::InsertParents(sal_uInt16 nStart, sal_uInt16 nEnd)
{
SwView *pView = ::GetActiveView();
SwWrtShell* pSh = pView->GetWrtShellPtr();
- USHORT nAutoFmt = HasRedlineAutoFmt() ? nsRedlineType_t::REDLINE_FORM_AUTOFMT : 0;
+ sal_uInt16 nAutoFmt = HasRedlineAutoFmt() ? nsRedlineType_t::REDLINE_FORM_AUTOFMT : 0;
String sParent;
- USHORT nCount = pSh->GetRedlineCount();
- nEnd = Min((USHORT)nEnd, (USHORT)(nCount - 1)); // Handelt auch nEnd=USHRT_MAX (bis zum Ende) ab
+ sal_uInt16 nCount = pSh->GetRedlineCount();
+ nEnd = Min((sal_uInt16)nEnd, (sal_uInt16)(nCount - 1)); // Handelt auch nEnd=USHRT_MAX (bis zum Ende) ab
if (nEnd == USHRT_MAX)
return; // Keine Redlines im Dokument
@@ -860,13 +845,13 @@ void SwRedlineAcceptDlg::InsertParents(USHORT nStart, USHORT nEnd)
pSh->SwCrsrShell::Push();
if( 0 == (pCurrRedline = pSh->SelNextRedline()))
pCurrRedline = pSh->SelPrevRedline();
- pSh->SwCrsrShell::Pop( FALSE );
+ pSh->SwCrsrShell::Pop( sal_False );
}
}
else
pCurrRedline = 0;
- for (USHORT i = nStart; i <= nEnd; i++)
+ for (sal_uInt16 i = nStart; i <= nEnd; i++)
{
const SwRedline& rRedln = pSh->GetRedline(i);
const SwRedlineData *pRedlineData = &rRedln.GetRedlineData();
@@ -881,7 +866,7 @@ void SwRedlineAcceptDlg::InsertParents(USHORT nStart, USHORT nEnd)
pData = new RedlinData;
pData->pData = pRedlineParent;
- pData->bDisabled = FALSE;
+ pData->bDisabled = sal_False;
sParent = GetRedlineText(rRedln, pData->aDateTime);
pParent = pTable->InsertEntry(sParent, pData, 0, i);
@@ -902,11 +887,11 @@ void SwRedlineAcceptDlg::InsertParents(USHORT nStart, USHORT nEnd)
*
* --------------------------------------------------*/
-void SwRedlineAcceptDlg::CallAcceptReject( BOOL bSelect, BOOL bAccept )
+void SwRedlineAcceptDlg::CallAcceptReject( sal_Bool bSelect, sal_Bool bAccept )
{
SwWrtShell* pSh = ::GetActiveView()->GetWrtShellPtr();
SvLBoxEntry* pEntry = bSelect ? pTable->FirstSelected() : pTable->First();
- ULONG nPos = LONG_MAX;
+ sal_uLong nPos = LONG_MAX;
typedef std::vector<SvLBoxEntry*> ListBoxEntries_t;
ListBoxEntries_t aRedlines;
@@ -933,11 +918,11 @@ void SwRedlineAcceptDlg::CallAcceptReject( BOOL bSelect, BOOL bAccept )
pEntry = bSelect ? pTable->NextSelected(pEntry) : pTable->Next(pEntry);
}
- BOOL (SwEditShell:: *FnAccRej)( USHORT ) = &SwEditShell::AcceptRedline;
+ sal_Bool (SwEditShell:: *FnAccRej)( sal_uInt16 ) = &SwEditShell::AcceptRedline;
if( !bAccept )
FnAccRej = &SwEditShell::RejectRedline;
- SwWait aWait( *pSh->GetView().GetDocShell(), TRUE );
+ SwWait aWait( *pSh->GetView().GetDocShell(), sal_True );
pSh->StartAction();
// #111827#
@@ -968,14 +953,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();
@@ -1003,7 +990,7 @@ void SwRedlineAcceptDlg::CallAcceptReject( BOOL bSelect, BOOL bAccept )
Beschreibung:
--------------------------------------------------------------------*/
-USHORT SwRedlineAcceptDlg::GetRedlinePos( const SvLBoxEntry& rEntry ) const
+sal_uInt16 SwRedlineAcceptDlg::GetRedlinePos( const SvLBoxEntry& rEntry ) const
{
SwWrtShell* pSh = ::GetActiveView()->GetWrtShellPtr();
return pSh->FindRedlineOfData( *((SwRedlineDataParent*)((RedlinData *)
@@ -1016,7 +1003,7 @@ USHORT SwRedlineAcceptDlg::GetRedlinePos( const SvLBoxEntry& rEntry ) const
IMPL_LINK( SwRedlineAcceptDlg, AcceptHdl, void*, EMPTYARG)
{
- CallAcceptReject( TRUE, TRUE );
+ CallAcceptReject( sal_True, sal_True );
return 0;
}
@@ -1026,7 +1013,7 @@ IMPL_LINK( SwRedlineAcceptDlg, AcceptHdl, void*, EMPTYARG)
IMPL_LINK( SwRedlineAcceptDlg, AcceptAllHdl, void*, EMPTYARG )
{
- CallAcceptReject( FALSE, TRUE );
+ CallAcceptReject( sal_False, sal_True );
return 0;
}
@@ -1036,7 +1023,7 @@ IMPL_LINK( SwRedlineAcceptDlg, AcceptAllHdl, void*, EMPTYARG )
IMPL_LINK( SwRedlineAcceptDlg, RejectHdl, void*, EMPTYARG )
{
- CallAcceptReject( TRUE, FALSE );
+ CallAcceptReject( sal_True, sal_False );
return 0;
}
@@ -1046,7 +1033,7 @@ IMPL_LINK( SwRedlineAcceptDlg, RejectHdl, void*, EMPTYARG )
IMPL_LINK( SwRedlineAcceptDlg, RejectAllHdl, void*, EMPTYARG )
{
- CallAcceptReject( FALSE, FALSE );
+ CallAcceptReject( sal_False, sal_False );
return 0;
}
@@ -1117,9 +1104,9 @@ IMPL_LINK( SwRedlineAcceptDlg, GotoHdl, void*, EMPTYARG )
SwWrtShell* pSh = ::GetActiveView()->GetWrtShellPtr();
aSelectTimer.Stop();
- BOOL bIsNotFormated = FALSE;
- BOOL bSel = FALSE;
-// BOOL bReadonlySel = FALSE;
+ sal_Bool bIsNotFormated = sal_False;
+ sal_Bool bSel = sal_False;
+// sal_Bool bReadonlySel = sal_False;
//#98883# don't select redlines while the dialog is not focussed
//#107938# But not only ask pTable if it has the focus. To move
@@ -1150,10 +1137,10 @@ IMPL_LINK( SwRedlineAcceptDlg, GotoHdl, void*, EMPTYARG )
}
}
else
- bSel = TRUE;
+ bSel = sal_True;
// #98864# find the selected redline (ignore, if the redline is already gone)
- USHORT nPos = GetRedlinePos(*pActEntry);
+ sal_uInt16 nPos = GetRedlinePos(*pActEntry);
if( nPos != USHRT_MAX )
{
@@ -1162,9 +1149,9 @@ IMPL_LINK( SwRedlineAcceptDlg, GotoHdl, void*, EMPTYARG )
//JP 27.9.2001: make no sense if we handle readonly sections
// if( !bReadonlySel && rRedln.HasReadonlySel() )
-// bReadonlySel = TRUE;
+// bReadonlySel = sal_True;
- if (pSh->GotoRedline(nPos, TRUE))
+ if (pSh->GotoRedline(nPos, sal_True))
{
pSh->SetInSelect();
pSh->EnterAddMode();
@@ -1178,7 +1165,7 @@ IMPL_LINK( SwRedlineAcceptDlg, GotoHdl, void*, EMPTYARG )
pSh->EndAction();
pSh->SetCareWin(NULL);
}
- BOOL bEnable = !pSh->getIDocumentRedlineAccess()->GetRedlinePassword().getLength();
+ sal_Bool bEnable = !pSh->getIDocumentRedlineAccess()->GetRedlinePassword().getLength();
pTPView->EnableAccept( bEnable && bSel /*&& !bReadonlySel*/ );
pTPView->EnableReject( bEnable && bSel && bIsNotFormated /*&& !bReadonlySel*/ );
pTPView->EnableRejectAll( bEnable && !bOnlyFormatedRedlines && !bHasReadonlySel );
@@ -1209,10 +1196,10 @@ IMPL_LINK( SwRedlineAcceptDlg, CommandHdl, void*, EMPTYARG )
if (pTable->GetParent(pEntry))
pTopEntry = pTable->GetParent(pEntry);
- USHORT nPos = GetRedlinePos(*pTopEntry);
+ sal_uInt16 nPos = GetRedlinePos(*pTopEntry);
// Bei geschuetzten Bereichen kommentieren disablen
- if ((pRed = pSh->GotoRedline(nPos, TRUE)) != 0)
+ if ((pRed = pSh->GotoRedline(nPos, sal_True)) != 0)
{
if( pSh->IsCrsrPtAtEnd() )
pSh->SwapPam();
@@ -1228,20 +1215,20 @@ IMPL_LINK( SwRedlineAcceptDlg, CommandHdl, void*, EMPTYARG )
);
aPopup.EnableItem( MN_SUB_SORT, pTable->First() != 0 );
- USHORT nColumn = pTable->GetSortedCol();
+ sal_uInt16 nColumn = pTable->GetSortedCol();
if (nColumn == 0xffff)
nColumn = 4;
PopupMenu *pSubMenu = aPopup.GetPopupMenu(MN_SUB_SORT);
if (pSubMenu)
{
- for (USHORT i = MN_SORT_ACTION; i < MN_SORT_ACTION + 5; i++)
- pSubMenu->CheckItem(i, FALSE);
+ for (sal_uInt16 i = MN_SORT_ACTION; i < MN_SORT_ACTION + 5; i++)
+ pSubMenu->CheckItem(i, sal_False);
pSubMenu->CheckItem(nColumn + MN_SORT_ACTION);
}
- USHORT nRet = aPopup.Execute(pTable, aCEvt.GetMousePosPixel());
+ sal_uInt16 nRet = aPopup.Execute(pTable, aCEvt.GetMousePosPixel());
switch( nRet )
{
@@ -1253,7 +1240,7 @@ IMPL_LINK( SwRedlineAcceptDlg, CommandHdl, void*, EMPTYARG )
if (pTable->GetParent(pEntry))
pEntry = pTable->GetParent(pEntry);
- USHORT nPos = GetRedlinePos(*pEntry);
+ sal_uInt16 nPos = GetRedlinePos(*pEntry);
const SwRedline &rRedline = pSh->GetRedline(nPos);
@@ -1278,12 +1265,12 @@ IMPL_LINK( SwRedlineAcceptDlg, CommandHdl, void*, EMPTYARG )
rRedline.GetRedlineData().GetTimeStamp() ),
SID_ATTR_POSTIT_DATE ));
- AbstractSvxPostItDialog* pDlg = pFact->CreateSvxPostItDialog( pParentDlg, aSet, FALSE );
+ AbstractSvxPostItDialog* pDlg = pFact->CreateSvxPostItDialog( pParentDlg, aSet, sal_False );
DBG_ASSERT(pDlg, "Dialogdiet fail!");
pDlg->HideAuthor();
- USHORT nResId = 0;
+ sal_uInt16 nResId = 0;
switch( rRedline.GetType() )
{
case nsRedlineType_t::REDLINE_INSERT:
@@ -1331,7 +1318,7 @@ IMPL_LINK( SwRedlineAcceptDlg, CommandHdl, void*, EMPTYARG )
case MN_SORT_COMMENT:
case MN_SORT_POSITION:
{
- bSortDir = TRUE;
+ bSortDir = sal_True;
if (nRet - MN_SORT_ACTION == 4 && pTable->GetSortedCol() == 0xffff)
break; // Haben wir schon
@@ -1342,7 +1329,7 @@ IMPL_LINK( SwRedlineAcceptDlg, CommandHdl, void*, EMPTYARG )
if (pTable->GetSortedCol() == nSortMode)
bSortDir = !pTable->GetSortDirection();
- SwWait aWait( *::GetActiveView()->GetDocShell(), FALSE );
+ SwWait aWait( *::GetActiveView()->GetDocShell(), sal_False );
pTable->SortByCol(nSortMode, bSortDir);
if (nSortMode == 0xffff)
Init(); // Alles neu fuellen
@@ -1364,16 +1351,16 @@ void SwRedlineAcceptDlg::Initialize(const String& rExtraData)
{
if (rExtraData.Len())
{
- USHORT nPos = rExtraData.Search(C2S("AcceptChgDat:"));
+ sal_uInt16 nPos = rExtraData.Search(C2S("AcceptChgDat:"));
// Versuche, den Alignment-String "ALIGN:(...)" einzulesen; wenn
// er nicht vorhanden ist, liegt eine "altere Version vor
if (nPos != STRING_NOTFOUND)
{
- USHORT n1 = rExtraData.Search('(', nPos);
+ sal_uInt16 n1 = rExtraData.Search('(', nPos);
if (n1 != STRING_NOTFOUND)
{
- USHORT n2 = rExtraData.Search(')', n1);
+ sal_uInt16 n2 = rExtraData.Search(')', n1);
if (n2 != STRING_NOTFOUND)
{
// Alignment-String herausschneiden
@@ -1382,11 +1369,11 @@ void SwRedlineAcceptDlg::Initialize(const String& rExtraData)
if (aStr.Len())
{
- USHORT nCount = static_cast< USHORT >(aStr.ToInt32());
+ sal_uInt16 nCount = static_cast< sal_uInt16 >(aStr.ToInt32());
- for (USHORT i = 0; i < nCount; i++)
+ for (sal_uInt16 i = 0; i < nCount; i++)
{
- USHORT n3 = aStr.Search(';');
+ sal_uInt16 n3 = aStr.Search(';');
aStr.Erase(0, n3 + 1);
pTable->SetTab(i, aStr.ToInt32(), MAP_PIXEL);
}
@@ -1405,11 +1392,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 fcac632511..9f844fa6cc 100644
--- a/sw/source/ui/misc/srtdlg.cxx
+++ b/sw/source/ui/misc/srtdlg.cxx
@@ -60,25 +60,25 @@
SV_IMPL_PTRARR( _FndBoxes, _FndBox* )
SV_IMPL_PTRARR( _FndLines, _FndLine* )
-static BOOL bCheck1 = TRUE;
-static BOOL bCheck2 = FALSE;
-static BOOL bCheck3 = FALSE;
+static sal_Bool bCheck1 = sal_True;
+static sal_Bool bCheck2 = sal_False;
+static sal_Bool bCheck3 = sal_False;
-static USHORT nCol1 = 1;
-static USHORT nCol2 = 1;
-static USHORT nCol3 = 1;
+static sal_uInt16 nCol1 = 1;
+static sal_uInt16 nCol2 = 1;
+static sal_uInt16 nCol3 = 1;
-static USHORT nType1 = 0;
-static USHORT nType2 = 0;
-static USHORT nType3 = 0;
+static sal_uInt16 nType1 = 0;
+static sal_uInt16 nType2 = 0;
+static sal_uInt16 nType3 = 0;
-static USHORT nLang = LANGUAGE_NONE;
+static sal_uInt16 nLang = LANGUAGE_NONE;
-static BOOL bAsc1 = TRUE;
-static BOOL bAsc2 = TRUE;
-static BOOL bAsc3 = TRUE;
-static BOOL bCol = FALSE;
-static BOOL bCsSens= FALSE;
+static sal_Bool bAsc1 = sal_True;
+static sal_Bool bAsc2 = sal_True;
+static sal_Bool bAsc3 = sal_True;
+static sal_Bool bCol = sal_False;
+static sal_Bool bCsSens= sal_False;
static sal_Unicode cDeli = '\t';
@@ -90,7 +90,7 @@ using ::rtl::OUString;
void lcl_ClearLstBoxAndDelUserData( ListBox& rLstBox )
{
void* pDel;
- for( USHORT n = 0, nEnd = rLstBox.GetEntryCount(); n < nEnd; ++n )
+ for( sal_uInt16 n = 0, nEnd = rLstBox.GetEntryCount(); n < nEnd; ++n )
if( 0 != ( pDel = rLstBox.GetEntryData( n )) )
delete (String*)pDel;
rLstBox.Clear();
@@ -102,11 +102,11 @@ void lcl_ClearLstBoxAndDelUserData( ListBox& rLstBox )
--------------------------------------------------------------------*/
-BOOL lcl_GetSelTbl( SwWrtShell &rSh, USHORT& rX, USHORT& rY )
+sal_Bool lcl_GetSelTbl( SwWrtShell &rSh, sal_uInt16& rX, sal_uInt16& rY )
{
const SwTableNode* pTblNd = rSh.IsCrsrInTbl();
if( !pTblNd )
- return FALSE;
+ return sal_False;
_FndBox aFndBox( 0, 0 );
@@ -120,10 +120,10 @@ BOOL lcl_GetSelTbl( SwWrtShell &rSh, USHORT& rX, USHORT& rY )
}
rX = aFndBox.GetLines().Count();
if( !rX )
- return FALSE;
+ return sal_False;
rY = aFndBox.GetLines()[0]->GetBoxes().Count();
- return TRUE;
+ return sal_True;
}
/*--------------------------------------------------------------------
@@ -192,14 +192,14 @@ SwSortDlg::SwSortDlg(Window* pParent, SwWrtShell &rShell) :
aColumnRB.Check(bCol);
aColLbl.SetText(bCol ? aRowTxt : aColTxt);
aRowRB.Check(!bCol);
- aDelimTabRB.Enable(FALSE);
- aDelimFreeRB.Enable(FALSE);
- aDelimEdt.Enable(FALSE);
+ aDelimTabRB.Enable(sal_False);
+ aDelimFreeRB.Enable(sal_False);
+ aDelimEdt.Enable(sal_False);
}
else
{
- aColumnRB.Enable(FALSE);
- aRowRB.Check(TRUE);
+ aColumnRB.Enable(sal_False);
+ aRowRB.Check(sal_True);
aColLbl.SetText(aColTxt);
}
@@ -227,9 +227,9 @@ SwSortDlg::SwSortDlg(Window* pParent, SwWrtShell &rShell) :
// first initialise the language, then select the
if( LANGUAGE_NONE == nLang || LANGUAGE_DONTKNOW == nLang )
- nLang = (USHORT)GetAppLanguage();
+ nLang = (sal_uInt16)GetAppLanguage();
- aLangLB.SetLanguageList( LANG_LIST_ALL | LANG_LIST_ONLY_KNOWN, TRUE, FALSE);
+ aLangLB.SetLanguageList( LANG_LIST_ALL | LANG_LIST_ONLY_KNOWN, sal_True, sal_False);
aLangLB.SelectLanguage( nLang );
LanguageHdl( 0 );
@@ -248,7 +248,7 @@ SwSortDlg::SwSortDlg(Window* pParent, SwWrtShell &rShell) :
if(!aDelimTabRB.IsChecked())
{
aDelimEdt.SetText(cDeli);
- aDelimFreeRB.Check(TRUE);
+ aDelimFreeRB.Check(sal_True);
DelimHdl(&aDelimFreeRB);
}
else
@@ -257,7 +257,7 @@ SwSortDlg::SwSortDlg(Window* pParent, SwWrtShell &rShell) :
FreeResource();
if( ::lcl_GetSelTbl( rSh, nX, nY) )
{
- USHORT nMax = aRowRB.IsChecked()? nY : nX;
+ sal_uInt16 nMax = aRowRB.IsChecked()? nY : nX;
aColEdt1.SetMax(nMax);
aColEdt2.SetMax(nMax);
aColEdt3.SetMax(nMax);
@@ -295,9 +295,9 @@ void SwSortDlg::Apply()
bCheck2 = aKeyCB2.IsChecked();
bCheck3 = aKeyCB3.IsChecked();
- nCol1 = (USHORT)aColEdt1.GetValue();
- nCol2 = (USHORT)aColEdt2.GetValue();
- nCol3 = (USHORT)aColEdt3.GetValue();
+ nCol1 = (sal_uInt16)aColEdt1.GetValue();
+ nCol2 = (sal_uInt16)aColEdt2.GetValue();
+ nCol3 = (sal_uInt16)aColEdt3.GetValue();
nType1 = aTypDLB1.GetSelectEntryPos();
nType2 = aTypDLB2.GetSelectEntryPos();
@@ -361,9 +361,9 @@ void SwSortDlg::Apply()
aOptions.bTable = rSh.IsTableMode();
aOptions.bIgnoreCase = !bCsSens;
- BOOL bRet;
+ sal_Bool bRet;
{
- SwWait aWait( *rSh.GetView().GetDocShell(), TRUE );
+ SwWait aWait( *rSh.GetView().GetDocShell(), sal_True );
rSh.StartAllAction();
if( 0 != (bRet = rSh.Sort( aOptions )))
rSh.SetModified();
@@ -379,7 +379,7 @@ void SwSortDlg::Apply()
* --------------------------------------------------*/
IMPL_LINK( SwSortDlg, DelimHdl, RadioButton*, pButton )
{
- BOOL bEnable = pButton == &aDelimFreeRB && aDelimFreeRB.IsEnabled();
+ sal_Bool bEnable = pButton == &aDelimFreeRB && aDelimFreeRB.IsEnabled();
aDelimEdt.Enable( bEnable );
aDelimPB.Enable( bEnable );
return 0;
@@ -396,7 +396,7 @@ IMPL_LINK( SwSortDlg, DelimCharHdl, PushButton*, EMPTYARG )
rSh.GetView().GetViewFrame()->GetFrame().GetFrameInterface(), RID_SVXDLG_CHARMAP );
if( RET_OK == pMap->Execute() )
{
- SFX_ITEMSET_ARG( pMap->GetOutputItemSet(), pItem, SfxInt32Item, SID_ATTR_CHAR, FALSE );
+ SFX_ITEMSET_ARG( pMap->GetOutputItemSet(), pItem, SfxInt32Item, SID_ATTR_CHAR, sal_False );
if ( pItem )
aDelimEdt.SetText( sal_Unicode ( pItem->GetValue() ) );
}
@@ -427,7 +427,7 @@ IMPL_LINK( SwSortDlg, CheckHdl, CheckBox *, pCheck )
else if(!aKeyCB1.IsChecked() &&
!aKeyCB2.IsChecked() &&
!aKeyCB3.IsChecked())
- pCheck->Check(TRUE);
+ pCheck->Check(sal_True);
return 0;
}
@@ -440,11 +440,11 @@ IMPL_LINK( SwSortDlg, LanguageHdl, ListBox*, pLBox )
if( !pColRes )
pColRes = new CollatorRessource();
- const USHORT nLstBoxCnt = 3;
+ const sal_uInt16 nLstBoxCnt = 3;
ListBox* aLstArr[ nLstBoxCnt ] = { &aTypDLB1, &aTypDLB2, &aTypDLB3 };
- USHORT* aTypeArr[ nLstBoxCnt ] = { &nType1, &nType2, &nType3 };
+ sal_uInt16* aTypeArr[ nLstBoxCnt ] = { &nType1, &nType2, &nType3 };
String aOldStrArr[ nLstBoxCnt ];
- USHORT n;
+ sal_uInt16 n;
void* pUserData;
for( n = 0; n < nLstBoxCnt; ++n )
@@ -455,7 +455,7 @@ IMPL_LINK( SwSortDlg, LanguageHdl, ListBox*, pLBox )
::lcl_ClearLstBoxAndDelUserData( *pL );
}
- USHORT nInsPos;
+ sal_uInt16 nInsPos;
String sAlg, sUINm;
for( long nCnt = 0, nEnd = aSeq.getLength(); nCnt <= nEnd; ++nCnt )
{
diff --git a/sw/source/ui/misc/swmodalredlineacceptdlg.cxx b/sw/source/ui/misc/swmodalredlineacceptdlg.cxx
index 2e11521aaa..5be24603a0 100644
--- a/sw/source/ui/misc/swmodalredlineacceptdlg.cxx
+++ b/sw/source/ui/misc/swmodalredlineacceptdlg.cxx
@@ -87,7 +87,7 @@
SwModalRedlineAcceptDlg::SwModalRedlineAcceptDlg(Window *pParent) :
SfxModalDialog(pParent, SW_RES(DLG_MOD_REDLINE_ACCEPT))
{
- pImplDlg = new SwRedlineAcceptDlg(this, TRUE);
+ pImplDlg = new SwRedlineAcceptDlg(this, sal_True);
pImplDlg->Initialize(GetExtraData());
pImplDlg->Activate(); // Zur Initialisierung der Daten
@@ -101,7 +101,7 @@ SwModalRedlineAcceptDlg::SwModalRedlineAcceptDlg(Window *pParent) :
SwModalRedlineAcceptDlg::~SwModalRedlineAcceptDlg()
{
- AcceptAll(FALSE); // Alles uebriggebliebene ablehnen
+ AcceptAll(sal_False); // Alles uebriggebliebene ablehnen
pImplDlg->FillInfo(GetExtraData());
delete pImplDlg;
@@ -129,19 +129,19 @@ void SwModalRedlineAcceptDlg::Resize()
Beschreibung:
------------------------------------------------------------------------*/
-void SwModalRedlineAcceptDlg::AcceptAll( BOOL bAccept )
+void SwModalRedlineAcceptDlg::AcceptAll( sal_Bool bAccept )
{
SvxTPFilter* pFilterTP = pImplDlg->GetChgCtrl()->GetFilterPage();
if (pFilterTP->IsDate() || pFilterTP->IsAuthor() ||
pFilterTP->IsRange() || pFilterTP->IsAction())
{
- pFilterTP->CheckDate(FALSE); // Alle Filter abschalten
- pFilterTP->CheckAuthor(FALSE);
- pFilterTP->CheckRange(FALSE);
- pFilterTP->CheckAction(FALSE);
+ pFilterTP->CheckDate(sal_False); // Alle Filter abschalten
+ pFilterTP->CheckAuthor(sal_False);
+ pFilterTP->CheckRange(sal_False);
+ pFilterTP->CheckAction(sal_False);
pImplDlg->FilterChangedHdl();
}
- pImplDlg->CallAcceptReject( FALSE, bAccept );
+ pImplDlg->CallAcceptReject( sal_False, bAccept );
}
diff --git a/sw/source/ui/ribbar/conarc.cxx b/sw/source/ui/ribbar/conarc.cxx
index d20cef3c92..de256b77c2 100644
--- a/sw/source/ui/ribbar/conarc.cxx
+++ b/sw/source/ui/ribbar/conarc.cxx
@@ -61,11 +61,11 @@ ConstArc::ConstArc(SwWrtShell* pWrtShell, SwEditWin* pEditWin, SwView* pSwView)
-BOOL ConstArc::MouseButtonDown( const MouseEvent& rMEvt )
+sal_Bool ConstArc::MouseButtonDown( const MouseEvent& rMEvt )
{
- BOOL bReturn;
+ sal_Bool bReturn;
- if ((bReturn = SwDrawBase::MouseButtonDown(rMEvt)) == TRUE)
+ if ((bReturn = SwDrawBase::MouseButtonDown(rMEvt)) == sal_True)
{
if (!nAnzButUp)
aStartPnt = m_pWin->PixelToLogic(rMEvt.GetPosPixel());
@@ -81,9 +81,9 @@ BOOL ConstArc::MouseButtonDown( const MouseEvent& rMEvt )
-BOOL ConstArc::MouseButtonUp( const MouseEvent& rMEvt )
+sal_Bool ConstArc::MouseButtonUp( const MouseEvent& rMEvt )
{
- BOOL bReturn = FALSE;
+ sal_Bool bReturn = sal_False;
if ((m_pSh->IsDrawCreate() || m_pWin->IsDrawAction()) && rMEvt.IsLeft())
{
@@ -91,7 +91,7 @@ BOOL ConstArc::MouseButtonUp( const MouseEvent& rMEvt )
if (!nAnzButUp && aPnt == aStartPnt)
{
SwDrawBase::MouseButtonUp(rMEvt);
- bReturn = TRUE;
+ bReturn = sal_True;
}
else
{ nAnzButUp++;
@@ -100,7 +100,7 @@ BOOL ConstArc::MouseButtonUp( const MouseEvent& rMEvt )
{
SwDrawBase::MouseButtonUp(rMEvt);
nAnzButUp = 0;
- bReturn = TRUE;
+ bReturn = sal_True;
}
else
m_pSh->EndCreate(SDRCREATE_NEXTPOINT);
@@ -109,7 +109,7 @@ BOOL ConstArc::MouseButtonUp( const MouseEvent& rMEvt )
/* else if ( pView->IsCreateObj() && rMEvt.IsRight() )
{
pView->EndCreateObj( SDRCREATE_FORCEEND );
- bReturn = TRUE;
+ bReturn = sal_True;
}*/
return (bReturn);
@@ -123,7 +123,7 @@ BOOL ConstArc::MouseButtonUp( const MouseEvent& rMEvt )
-void ConstArc::Activate(const USHORT nSlotId)
+void ConstArc::Activate(const sal_uInt16 nSlotId)
{
switch (nSlotId)
{
diff --git a/sw/source/ui/ribbar/concustomshape.cxx b/sw/source/ui/ribbar/concustomshape.cxx
index ca6e437da2..75a656ae71 100644
--- a/sw/source/ui/ribbar/concustomshape.cxx
+++ b/sw/source/ui/ribbar/concustomshape.cxx
@@ -104,9 +104,9 @@ rtl::OUString ConstCustomShape::GetShapeTypeFromRequest( SfxRequest& rReq )
|*
\************************************************************************/
-BOOL ConstCustomShape::MouseButtonDown(const MouseEvent& rMEvt)
+sal_Bool ConstCustomShape::MouseButtonDown(const MouseEvent& rMEvt)
{
- BOOL bReturn = SwDrawBase::MouseButtonDown(rMEvt);
+ sal_Bool bReturn = SwDrawBase::MouseButtonDown(rMEvt);
if ( bReturn )
{
SdrView *pSdrView = m_pSh->GetDrawView();
@@ -140,7 +140,7 @@ BOOL ConstCustomShape::MouseButtonDown(const MouseEvent& rMEvt)
|*
\************************************************************************/
-BOOL ConstCustomShape::MouseButtonUp(const MouseEvent& rMEvt)
+sal_Bool ConstCustomShape::MouseButtonUp(const MouseEvent& rMEvt)
{
return SwDrawBase::MouseButtonUp(rMEvt);
}
@@ -151,7 +151,7 @@ BOOL ConstCustomShape::MouseButtonUp(const MouseEvent& rMEvt)
|*
\************************************************************************/
-void ConstCustomShape::Activate(const USHORT nSlotId)
+void ConstCustomShape::Activate(const sal_uInt16 nSlotId)
{
m_pWin->SetSdrDrawMode( OBJ_CUSTOMSHAPE );
diff --git a/sw/source/ui/ribbar/conform.cxx b/sw/source/ui/ribbar/conform.cxx
index 60ff9e7e13..29ec731994 100644
--- a/sw/source/ui/ribbar/conform.cxx
+++ b/sw/source/ui/ribbar/conform.cxx
@@ -39,7 +39,7 @@
#include "drawbase.hxx"
#include "conform.hxx"
-extern BOOL bNoInterrupt; // in mainwn.cxx
+extern sal_Bool bNoInterrupt; // in mainwn.cxx
/*************************************************************************
|*
@@ -51,7 +51,7 @@ extern BOOL bNoInterrupt; // in mainwn.cxx
ConstFormControl::ConstFormControl(SwWrtShell* pWrtShell, SwEditWin* pEditWin, SwView* pSwView) :
SwDrawBase(pWrtShell, pEditWin, pSwView)
{
- m_bInsForm = TRUE;
+ m_bInsForm = sal_True;
}
/*************************************************************************
@@ -61,9 +61,9 @@ ConstFormControl::ConstFormControl(SwWrtShell* pWrtShell, SwEditWin* pEditWin, S
\************************************************************************/
-BOOL ConstFormControl::MouseButtonDown(const MouseEvent& rMEvt)
+sal_Bool ConstFormControl::MouseButtonDown(const MouseEvent& rMEvt)
{
- BOOL bReturn = FALSE;
+ sal_Bool bReturn = sal_False;
SdrView *pSdrView = m_pSh->GetDrawView();
@@ -72,13 +72,13 @@ BOOL ConstFormControl::MouseButtonDown(const MouseEvent& rMEvt)
if (rMEvt.IsMod2())
{
- pSdrView->SetCreate1stPointAsCenter(TRUE);
- pSdrView->SetResizeAtCenter(TRUE);
+ pSdrView->SetCreate1stPointAsCenter(sal_True);
+ pSdrView->SetResizeAtCenter(sal_True);
}
else
{
- pSdrView->SetCreate1stPointAsCenter(FALSE);
- pSdrView->SetResizeAtCenter(FALSE);
+ pSdrView->SetCreate1stPointAsCenter(sal_False);
+ pSdrView->SetResizeAtCenter(sal_False);
}
SdrViewEvent aVEvt;
@@ -88,16 +88,16 @@ BOOL ConstFormControl::MouseButtonDown(const MouseEvent& rMEvt)
if (rMEvt.IsLeft() && !m_pWin->IsDrawAction() &&
(eHit == SDRHIT_UNMARKEDOBJECT || eHit == SDRHIT_NONE || m_pSh->IsDrawCreate()))
{
- bNoInterrupt = TRUE;
+ bNoInterrupt = sal_True;
m_pWin->CaptureMouse();
m_pWin->SetPointer(Pointer(POINTER_DRAW_RECT));
m_aStartPos = m_pWin->PixelToLogic(rMEvt.GetPosPixel());
- bReturn = m_pSh->BeginCreate( static_cast< UINT16 >(m_pWin->GetSdrDrawMode()), FmFormInventor, m_aStartPos);
+ bReturn = m_pSh->BeginCreate( static_cast< sal_uInt16 >(m_pWin->GetSdrDrawMode()), FmFormInventor, m_aStartPos);
if (bReturn)
- m_pWin->SetDrawAction(TRUE);
+ m_pWin->SetDrawAction(sal_True);
}
else
bReturn = SwDrawBase::MouseButtonDown(rMEvt);
@@ -112,7 +112,7 @@ BOOL ConstFormControl::MouseButtonDown(const MouseEvent& rMEvt)
\************************************************************************/
-void ConstFormControl::Activate(const USHORT nSlotId)
+void ConstFormControl::Activate(const sal_uInt16 nSlotId)
{
m_pWin->SetSdrDrawMode( static_cast<SdrObjKind>(nSlotId) );
SwDrawBase::Activate(nSlotId);
@@ -136,8 +136,8 @@ void ConstFormControl::CreateDefaultObject()
m_pSh->MakeDrawView();
SdrView *pSdrView = m_pSh->GetDrawView();
- pSdrView->SetDesignMode(TRUE);
- m_pSh->BeginCreate( static_cast< UINT16 >(m_pWin->GetSdrDrawMode()), FmFormInventor, aStartPos);
+ pSdrView->SetDesignMode(sal_True);
+ m_pSh->BeginCreate( static_cast< sal_uInt16 >(m_pWin->GetSdrDrawMode()), FmFormInventor, aStartPos);
m_pSh->MoveCreate(aEndPos);
m_pSh->EndCreate(SDRCREATE_FORCEEND);
}
diff --git a/sw/source/ui/ribbar/conpoly.cxx b/sw/source/ui/ribbar/conpoly.cxx
index 3fdeff53f8..eb5baeadf0 100644
--- a/sw/source/ui/ribbar/conpoly.cxx
+++ b/sw/source/ui/ribbar/conpoly.cxx
@@ -61,11 +61,11 @@ ConstPolygon::ConstPolygon(SwWrtShell* pWrtShell, SwEditWin* pEditWin, SwView* p
-BOOL ConstPolygon::MouseButtonDown(const MouseEvent& rMEvt)
+sal_Bool ConstPolygon::MouseButtonDown(const MouseEvent& rMEvt)
{
- BOOL bReturn;
+ sal_Bool bReturn;
- if ((bReturn = SwDrawBase::MouseButtonDown(rMEvt)) == TRUE)
+ if ((bReturn = SwDrawBase::MouseButtonDown(rMEvt)) == sal_True)
aLastPos = rMEvt.GetPosPixel();
return (bReturn);
@@ -79,9 +79,9 @@ BOOL ConstPolygon::MouseButtonDown(const MouseEvent& rMEvt)
-BOOL ConstPolygon::MouseMove(const MouseEvent& rMEvt)
+sal_Bool ConstPolygon::MouseMove(const MouseEvent& rMEvt)
{
- BOOL bReturn = FALSE;
+ sal_Bool bReturn = sal_False;
bReturn = SwDrawBase::MouseMove(rMEvt);
@@ -96,9 +96,9 @@ BOOL ConstPolygon::MouseMove(const MouseEvent& rMEvt)
-BOOL ConstPolygon::MouseButtonUp(const MouseEvent& rMEvt)
+sal_Bool ConstPolygon::MouseButtonUp(const MouseEvent& rMEvt)
{
- BOOL bReturn = FALSE;
+ sal_Bool bReturn = sal_False;
if (m_pSh->IsDrawCreate())
{
@@ -109,7 +109,7 @@ BOOL ConstPolygon::MouseButtonUp(const MouseEvent& rMEvt)
{
m_pSh->BreakCreate();
EnterSelectMode(rMEvt);
- return TRUE;
+ return sal_True;
}
}
else
@@ -136,7 +136,7 @@ BOOL ConstPolygon::MouseButtonUp(const MouseEvent& rMEvt)
-void ConstPolygon::Activate(const USHORT nSlotId)
+void ConstPolygon::Activate(const sal_uInt16 nSlotId)
{
switch (nSlotId)
{
diff --git a/sw/source/ui/ribbar/conrect.cxx b/sw/source/ui/ribbar/conrect.cxx
index dbaa6c23bf..608f3ebc08 100644
--- a/sw/source/ui/ribbar/conrect.cxx
+++ b/sw/source/ui/ribbar/conrect.cxx
@@ -58,7 +58,7 @@
ConstRectangle::ConstRectangle( SwWrtShell* pWrtShell, SwEditWin* pEditWin,
SwView* pSwView )
: SwDrawBase( pWrtShell, pEditWin, pSwView ),
- bMarquee(FALSE),
+ bMarquee(sal_False),
// #93382#
mbVertical(sal_False)
{
@@ -70,11 +70,11 @@ ConstRectangle::ConstRectangle( SwWrtShell* pWrtShell, SwEditWin* pEditWin,
|*
\************************************************************************/
-BOOL ConstRectangle::MouseButtonDown(const MouseEvent& rMEvt)
+sal_Bool ConstRectangle::MouseButtonDown(const MouseEvent& rMEvt)
{
- BOOL bReturn;
+ sal_Bool bReturn;
- if ((bReturn = SwDrawBase::MouseButtonDown(rMEvt)) == TRUE
+ if ((bReturn = SwDrawBase::MouseButtonDown(rMEvt)) == sal_True
&& m_pWin->GetSdrDrawMode() == OBJ_CAPTION)
{
m_pView->NoRotate();
@@ -93,11 +93,11 @@ BOOL ConstRectangle::MouseButtonDown(const MouseEvent& rMEvt)
|*
\************************************************************************/
-BOOL ConstRectangle::MouseButtonUp(const MouseEvent& rMEvt)
+sal_Bool ConstRectangle::MouseButtonUp(const MouseEvent& rMEvt)
{
Point aPnt(m_pWin->PixelToLogic(rMEvt.GetPosPixel()));
- BOOL bRet = SwDrawBase::MouseButtonUp(rMEvt);
+ sal_Bool bRet = SwDrawBase::MouseButtonUp(rMEvt);
if( bRet )
{
SdrView *pSdrView = m_pSh->GetDrawView();
@@ -117,13 +117,13 @@ BOOL ConstRectangle::MouseButtonUp(const MouseEvent& rMEvt)
SfxItemSet aItemSet( pSdrView->GetModel()->GetItemPool(),
SDRATTR_MISC_FIRST, SDRATTR_MISC_LAST);
- aItemSet.Put( SdrTextAutoGrowWidthItem( FALSE ) );
- aItemSet.Put( SdrTextAutoGrowHeightItem( FALSE ) );
+ aItemSet.Put( SdrTextAutoGrowWidthItem( sal_False ) );
+ aItemSet.Put( SdrTextAutoGrowHeightItem( sal_False ) );
aItemSet.Put( SdrTextAniKindItem( SDRTEXTANI_SCROLL ) );
aItemSet.Put( SdrTextAniDirectionItem( SDRTEXTANI_LEFT ) );
aItemSet.Put( SdrTextAniCountItem( 0 ) );
aItemSet.Put( SdrTextAniAmountItem(
- (INT16)m_pWin->PixelToLogic(Size(2,1)).Width()) );
+ (sal_Int16)m_pWin->PixelToLogic(Size(2,1)).Width()) );
pObj->SetMergedItemSetAndBroadcast(aItemSet);
}
@@ -134,10 +134,10 @@ BOOL ConstRectangle::MouseButtonUp(const MouseEvent& rMEvt)
SdrTextObj* pText = (SdrTextObj*)pObj;
SfxItemSet aSet(pSdrView->GetModel()->GetItemPool());
- pText->SetVerticalWriting(TRUE);
+ pText->SetVerticalWriting(sal_True);
- aSet.Put(SdrTextAutoGrowWidthItem(TRUE));
- aSet.Put(SdrTextAutoGrowHeightItem(FALSE));
+ aSet.Put(SdrTextAutoGrowWidthItem(sal_True));
+ aSet.Put(SdrTextAutoGrowHeightItem(sal_False));
aSet.Put(SdrTextVertAdjustItem(SDRTEXTVERTADJUST_TOP));
aSet.Put(SdrTextHorzAdjustItem(SDRTEXTHORZADJUST_RIGHT));
@@ -160,7 +160,7 @@ BOOL ConstRectangle::MouseButtonUp(const MouseEvent& rMEvt)
pCaptObj->ForceOutlinerParaObject();
OutlinerParaObject* pOPO = pCaptObj->GetOutlinerParaObject();
if( pOPO && !pOPO->IsVertical() )
- pOPO->SetVertical( TRUE );
+ pOPO->SetVertical( sal_True );
}
}
break;
@@ -176,9 +176,9 @@ BOOL ConstRectangle::MouseButtonUp(const MouseEvent& rMEvt)
|*
\************************************************************************/
-void ConstRectangle::Activate(const USHORT nSlotId)
+void ConstRectangle::Activate(const sal_uInt16 nSlotId)
{
- bMarquee = bCapVertical = FALSE;
+ bMarquee = bCapVertical = sal_False;
mbVertical = sal_False;
switch (nSlotId)
@@ -196,7 +196,7 @@ void ConstRectangle::Activate(const USHORT nSlotId)
break;
case SID_DRAW_TEXT_MARQUEE:
- bMarquee = TRUE;
+ bMarquee = sal_True;
m_pWin->SetSdrDrawMode(OBJ_TEXT);
break;
@@ -211,7 +211,7 @@ void ConstRectangle::Activate(const USHORT nSlotId)
break;
case SID_DRAW_CAPTION_VERTICAL:
- bCapVertical = TRUE;
+ bCapVertical = sal_True;
// no break
case SID_DRAW_CAPTION:
m_pWin->SetSdrDrawMode(OBJ_CAPTION);
diff --git a/sw/source/ui/ribbar/drawbase.cxx b/sw/source/ui/ribbar/drawbase.cxx
index ecf1ba07ae..16e59ba0c9 100644
--- a/sw/source/ui/ribbar/drawbase.cxx
+++ b/sw/source/ui/ribbar/drawbase.cxx
@@ -27,6 +27,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
+
#include <hintids.hxx>
#include <tools/list.hxx>
#include <svx/svdview.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
__EXPORT SwDrawBase::~SwDrawBase()
{
if (m_pView->GetWrtShellPtr()) // Im view-Dtor koennte die wrtsh bereits geloescht worden sein...
- m_pSh->GetDrawView()->SetEditMode(TRUE);
+ m_pSh->GetDrawView()->SetEditMode(sal_True);
}
/*************************************************************************
@@ -93,9 +94,9 @@ __EXPORT SwDrawBase::~SwDrawBase()
\************************************************************************/
-BOOL SwDrawBase::MouseButtonDown(const MouseEvent& rMEvt)
+sal_Bool SwDrawBase::MouseButtonDown(const MouseEvent& rMEvt)
{
- BOOL bReturn = FALSE;
+ sal_Bool bReturn = sal_False;
SdrView *pSdrView = m_pSh->GetDrawView();
@@ -106,13 +107,13 @@ BOOL SwDrawBase::MouseButtonDown(const MouseEvent& rMEvt)
if (rMEvt.IsMod2())
{
- pSdrView->SetCreate1stPointAsCenter(TRUE);
- pSdrView->SetResizeAtCenter(TRUE);
+ pSdrView->SetCreate1stPointAsCenter(sal_True);
+ pSdrView->SetResizeAtCenter(sal_True);
}
else
{
- pSdrView->SetCreate1stPointAsCenter(FALSE);
- pSdrView->SetResizeAtCenter(FALSE);
+ pSdrView->SetCreate1stPointAsCenter(sal_False);
+ pSdrView->SetResizeAtCenter(sal_False);
}
SdrViewEvent aVEvt;
@@ -123,17 +124,17 @@ BOOL SwDrawBase::MouseButtonDown(const MouseEvent& rMEvt)
{
if (IsCreateObj() && (eHit == SDRHIT_UNMARKEDOBJECT || eHit == SDRHIT_NONE || m_pSh->IsDrawCreate()))
{
- bNoInterrupt = TRUE;
+ bNoInterrupt = sal_True;
m_pWin->CaptureMouse();
m_aStartPos = m_pWin->PixelToLogic(rMEvt.GetPosPixel());
- bReturn = m_pSh->BeginCreate( static_cast< UINT16 >(m_pWin->GetSdrDrawMode()), m_aStartPos);
+ bReturn = m_pSh->BeginCreate( static_cast< sal_uInt16 >(m_pWin->GetSdrDrawMode()), m_aStartPos);
SetDrawPointer();
if ( bReturn )
- m_pWin->SetDrawAction(TRUE);
+ m_pWin->SetDrawAction(sal_True);
}
else if (!pSdrView->IsAction())
{
@@ -142,25 +143,25 @@ BOOL SwDrawBase::MouseButtonDown(const MouseEvent& rMEvt)
**********************************************************************/
m_pWin->CaptureMouse();
m_aStartPos = m_pWin->PixelToLogic(rMEvt.GetPosPixel());
- UINT16 nEditMode = m_pWin->GetBezierMode();
+ sal_uInt16 nEditMode = m_pWin->GetBezierMode();
if (eHit == SDRHIT_HANDLE && aVEvt.pHdl->GetKind() == HDL_BWGT)
{
/******************************************************************
* Handle draggen
******************************************************************/
- bNoInterrupt = TRUE;
+ bNoInterrupt = sal_True;
bReturn = pSdrView->BegDragObj(m_aStartPos, (OutputDevice*) NULL, aVEvt.pHdl);
- m_pWin->SetDrawAction(TRUE);
+ m_pWin->SetDrawAction(sal_True);
}
else if (eHit == SDRHIT_MARKEDOBJECT && nEditMode == SID_BEZIER_INSERT)
{
/******************************************************************
* Klebepunkt einfuegen
******************************************************************/
- bNoInterrupt = TRUE;
+ bNoInterrupt = sal_True;
bReturn = pSdrView->BegInsObjPoint(m_aStartPos, rMEvt.IsMod1());
- m_pWin->SetDrawAction(TRUE);
+ m_pWin->SetDrawAction(sal_True);
}
else if (eHit == SDRHIT_MARKEDOBJECT && rMEvt.IsMod1())
{
@@ -171,14 +172,14 @@ BOOL SwDrawBase::MouseButtonDown(const MouseEvent& rMEvt)
pSdrView->UnmarkAllPoints();
bReturn = pSdrView->BegMarkPoints(m_aStartPos);
- m_pWin->SetDrawAction(TRUE);
+ m_pWin->SetDrawAction(sal_True);
}
else if (eHit == SDRHIT_MARKEDOBJECT && !rMEvt.IsShift() && !rMEvt.IsMod2())
{
/******************************************************************
* Objekt verschieben
******************************************************************/
- return FALSE;
+ return sal_False;
}
else if (eHit == SDRHIT_HANDLE)
{
@@ -209,10 +210,10 @@ BOOL SwDrawBase::MouseButtonDown(const MouseEvent& rMEvt)
if (pHdl)
{
- bNoInterrupt = TRUE;
+ bNoInterrupt = sal_True;
pSdrView->MarkPoint(*pHdl);
// bReturn = pSdrView->BegDragObj(m_aStartPos, (OutputDevice*) NULL, pHdl);
-// m_pWin->SetDrawAction(TRUE);
+// m_pWin->SetDrawAction(sal_True);
}
}
}
@@ -226,12 +227,12 @@ BOOL SwDrawBase::MouseButtonDown(const MouseEvent& rMEvt)
if (pSdrView->HasMarkablePoints())
pSdrView->UnmarkAllPoints();
- bNoInterrupt = FALSE;
+ bNoInterrupt = sal_False;
// Drag im edtwin verwenden
- return FALSE;
+ return sal_False;
}
- bNoInterrupt = TRUE;
+ bNoInterrupt = sal_True;
if (m_pSh->IsObjSelected())
{
@@ -241,11 +242,11 @@ BOOL SwDrawBase::MouseButtonDown(const MouseEvent& rMEvt)
{
//JP 10.10.2001: Bug 89619 - don't scroll the
// cursor into the visible area
- BOOL bUnlockView = !m_pSh->IsViewLocked();
- m_pSh->LockView( TRUE ); //lock visible section
+ sal_Bool bUnlockView = !m_pSh->IsViewLocked();
+ m_pSh->LockView( sal_True ); //lock visible section
m_pSh->SelectObj(Point(LONG_MAX, LONG_MAX)); // Alles deselektieren
if( bUnlockView )
- m_pSh->LockView( FALSE );
+ m_pSh->LockView( sal_False );
}
else
pSdrView->UnmarkAllPoints();
@@ -255,7 +256,7 @@ BOOL SwDrawBase::MouseButtonDown(const MouseEvent& rMEvt)
m_pSh->EnterSelFrmMode(NULL);
if( 0 != (bReturn = m_pSh->BeginMark(m_aStartPos)) )
- m_pWin->SetDrawAction(TRUE);
+ m_pWin->SetDrawAction(sal_True);
SetDrawPointer();
}
@@ -271,11 +272,11 @@ BOOL SwDrawBase::MouseButtonDown(const MouseEvent& rMEvt)
\************************************************************************/
-BOOL SwDrawBase::MouseMove(const MouseEvent& rMEvt)
+sal_Bool SwDrawBase::MouseMove(const MouseEvent& rMEvt)
{
SdrView *pSdrView = m_pSh->GetDrawView();
Point aPnt(m_pWin->PixelToLogic(rMEvt.GetPosPixel()));
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if (IsCreateObj() && !m_pWin->IsDrawSelMode() && pSdrView->IsCreateObj())
{
@@ -285,12 +286,12 @@ BOOL SwDrawBase::MouseMove(const MouseEvent& rMEvt)
pSdrView->SetAngleSnapEnabled(rMEvt.IsShift());
m_pSh->MoveCreate(aPnt);
- bRet = TRUE;
+ bRet = sal_True;
}
else if (pSdrView->IsAction() || pSdrView->IsInsObjPoint() || pSdrView->IsMarkPoints())
{
m_pSh->MoveMark(aPnt);
- bRet = TRUE;
+ bRet = sal_True;
}
return (bRet);
@@ -303,11 +304,11 @@ BOOL SwDrawBase::MouseMove(const MouseEvent& rMEvt)
\************************************************************************/
-BOOL SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt)
+sal_Bool SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt)
{
- BOOL bReturn = FALSE;
- BOOL bCheckShell = FALSE;
- BOOL bAutoCap = FALSE;
+ sal_Bool bReturn = sal_False;
+ sal_Bool bCheckShell = sal_False;
+ sal_Bool bAutoCap = sal_False;
Point aPnt(m_pWin->PixelToLogic(rMEvt.GetPosPixel()));
@@ -315,7 +316,7 @@ BOOL SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt)
{
const SdrObjKind nDrawMode = m_pWin->GetSdrDrawMode();
//objects with multiple point may end at the start position
- BOOL bMultiPoint = OBJ_PLIN == nDrawMode ||
+ sal_Bool bMultiPoint = OBJ_PLIN == nDrawMode ||
OBJ_PATHLINE == nDrawMode ||
OBJ_FREELINE == nDrawMode;
if(rMEvt.IsRight() || (aPnt == m_aStartPos && !bMultiPoint))
@@ -342,12 +343,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);
@@ -363,10 +364,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);
}
@@ -384,7 +387,7 @@ BOOL SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt)
{
bReturn = m_pSh->EndMark();
- m_pWin->SetDrawAction(FALSE);
+ m_pWin->SetDrawAction(sal_False);
if (aPnt == m_aStartPos && m_pSh->IsObjSelectable(aPnt))
{
@@ -402,7 +405,7 @@ BOOL SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt)
}
m_pView->NoRotate();
- bCheckShell = TRUE; // ggf BezierShell anwerfen
+ bCheckShell = sal_True; // ggf BezierShell anwerfen
}
else if (!m_pSh->IsObjSelected() && !m_pWin->IsDrawAction())
{
@@ -417,7 +420,7 @@ BOOL SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt)
}
m_pView->NoRotate();
- bReturn = TRUE;
+ bReturn = sal_True;
}
}
}
@@ -435,9 +438,9 @@ BOOL SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt)
else
{
pSdrView->EndAction();
- bReturn = TRUE;
+ bReturn = sal_True;
}
- m_pWin->SetDrawAction(FALSE);
+ m_pWin->SetDrawAction(sal_False);
if (aPnt == m_aStartPos)
{
@@ -462,7 +465,7 @@ BOOL SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt)
}
m_pView->NoRotate();
- bCheckShell = TRUE; // ggf BezierShell anwerfen
+ bCheckShell = sal_True; // ggf BezierShell anwerfen
}
}
@@ -475,7 +478,7 @@ BOOL SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt)
m_pSh->LeaveSelFrmMode();
m_pView->NoRotate();
- bReturn = TRUE;
+ bReturn = sal_True;
}
}
}
@@ -497,13 +500,13 @@ BOOL SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt)
\************************************************************************/
-void SwDrawBase::Activate(const USHORT nSlot)
+void SwDrawBase::Activate(const sal_uInt16 nSlot)
{
SetSlotId(nSlot);
SdrView *pSdrView = m_pSh->GetDrawView();
- pSdrView->SetCurrentObj( static_cast< UINT16 >(m_pWin->GetSdrDrawMode()) );
- pSdrView->SetEditMode(FALSE);
+ pSdrView->SetCurrentObj( static_cast< sal_uInt16 >(m_pWin->GetSdrDrawMode()) );
+ pSdrView->SetEditMode(sal_False);
SetDrawPointer();
m_pSh->NoEdit();
@@ -519,16 +522,16 @@ void SwDrawBase::Activate(const USHORT nSlot)
void __EXPORT SwDrawBase::Deactivate()
{
SdrView *pSdrView = m_pSh->GetDrawView();
- pSdrView->SetOrtho(FALSE);
- pSdrView->SetAngleSnapEnabled(FALSE);
+ pSdrView->SetOrtho(sal_False);
+ pSdrView->SetAngleSnapEnabled(sal_False);
if (m_pWin->IsDrawAction() && m_pSh->IsDrawCreate())
m_pSh->BreakCreate();
- m_pWin->SetDrawAction(FALSE);
+ m_pWin->SetDrawAction(sal_False);
m_pWin->ReleaseMouse();
- bNoInterrupt = FALSE;
+ bNoInterrupt = sal_False;
// if(!m_pSh->IsObjSelected())
// m_pSh->Edit();
@@ -542,16 +545,16 @@ void __EXPORT SwDrawBase::Deactivate()
|*
|* Tastaturereignisse bearbeiten
|*
-|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert TRUE, andernfalls
-|* FALSE.
+|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert sal_True, andernfalls
+|* sal_False.
|*
\************************************************************************/
-BOOL SwDrawBase::KeyInput(const KeyEvent& rKEvt)
+sal_Bool SwDrawBase::KeyInput(const KeyEvent& rKEvt)
{
- BOOL bReturn = FALSE;
- USHORT nCode = rKEvt.GetKeyCode().GetCode();
+ sal_Bool bReturn = sal_False;
+ sal_uInt16 nCode = rKEvt.GetKeyCode().GetCode();
switch (nCode)
{
@@ -563,14 +566,14 @@ BOOL SwDrawBase::KeyInput(const KeyEvent& rKEvt)
m_pView->LeaveDrawCreate();
}
- bReturn = TRUE;
+ bReturn = sal_True;
}
break;
case KEY_DELETE:
{
m_pSh->DelSelectedObj();
- bReturn = TRUE;
+ bReturn = sal_True;
}
break;
@@ -619,7 +622,7 @@ BOOL SwDrawBase::KeyInput(const KeyEvent& rKEvt)
pSdrView->MoveAllMarked(Size(nX, nY));
}
- bReturn = TRUE;
+ bReturn = sal_True;
}
}
break;
@@ -633,8 +636,8 @@ BOOL SwDrawBase::KeyInput(const KeyEvent& rKEvt)
|*
|* Tastaturereignisse bearbeiten
|*
-|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert TRUE, andernfalls
-|* FALSE.
+|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert sal_True, andernfalls
+|* sal_False.
|*
\************************************************************************/
@@ -642,7 +645,7 @@ BOOL SwDrawBase::KeyInput(const KeyEvent& rKEvt)
void SwDrawBase::BreakCreate()
{
m_pSh->BreakCreate();
- m_pWin->SetDrawAction(FALSE);
+ m_pWin->SetDrawAction(sal_False);
m_pWin->ReleaseMouse();
Deactivate();
@@ -674,7 +677,7 @@ void SwDrawBase::SetDrawPointer()
void SwDrawBase::EnterSelectMode(const MouseEvent& rMEvt)
{
- m_pWin->SetDrawAction(FALSE);
+ m_pWin->SetDrawAction(sal_False);
if (!m_pSh->IsObjSelected() && !m_pWin->IsDrawAction())
{
@@ -711,7 +714,7 @@ void SwDrawBase::CreateDefaultObject()
aEndPos.X() += 8 * MM50;
aEndPos.Y() += 4 * MM50;
Rectangle aRect(aStartPos, aEndPos);
- m_pSh->CreateDefaultShape( static_cast< UINT16 >(m_pWin->GetSdrDrawMode()), aRect, m_nSlotId);
+ m_pSh->CreateDefaultShape( static_cast< sal_uInt16 >(m_pWin->GetSdrDrawMode()), aRect, m_nSlotId);
}
/* -----------------25.10.2002 14:14-----------------
*
diff --git a/sw/source/ui/ribbar/dselect.cxx b/sw/source/ui/ribbar/dselect.cxx
index 08ac58062d..d2871f0c91 100644
--- a/sw/source/ui/ribbar/dselect.cxx
+++ b/sw/source/ui/ribbar/dselect.cxx
@@ -37,7 +37,7 @@
#include "drawbase.hxx"
#include "dselect.hxx"
-extern BOOL bNoInterrupt; // in mainwn.cxx
+extern sal_Bool bNoInterrupt; // in mainwn.cxx
/*************************************************************************
|*
@@ -48,21 +48,21 @@ extern BOOL bNoInterrupt; // in mainwn.cxx
DrawSelection::DrawSelection(SwWrtShell* pWrtShell, SwEditWin* pEditWin, SwView* pSwView) :
SwDrawBase(pWrtShell, pEditWin, pSwView)
{
- m_bCreateObj = FALSE;
+ m_bCreateObj = sal_False;
}
/*************************************************************************
|*
|* Tastaturereignisse bearbeiten
|*
-|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert TRUE, andernfalls
-|* FALSE.
+|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert sal_True, andernfalls
+|* sal_False.
|*
\************************************************************************/
-BOOL DrawSelection::KeyInput(const KeyEvent& rKEvt)
+sal_Bool DrawSelection::KeyInput(const KeyEvent& rKEvt)
{
- BOOL bReturn = FALSE;
+ sal_Bool bReturn = sal_False;
switch (rKEvt.GetKeyCode().GetCode())
{
@@ -73,7 +73,7 @@ BOOL DrawSelection::KeyInput(const KeyEvent& rKEvt)
m_pSh->BreakMark();
m_pWin->ReleaseMouse();
}
- bReturn = TRUE;
+ bReturn = sal_True;
}
break;
}
@@ -90,10 +90,10 @@ BOOL DrawSelection::KeyInput(const KeyEvent& rKEvt)
|*
\************************************************************************/
-void DrawSelection::Activate(const USHORT nSlotId)
+void DrawSelection::Activate(const sal_uInt16 nSlotId)
{
m_pWin->SetSdrDrawMode(OBJ_NONE);
- m_pWin->SetObjectSelect( TRUE );
+ m_pWin->SetObjectSelect( sal_True );
SwDrawBase::Activate(nSlotId);
m_pSh->GetView().GetViewFrame()->GetBindings().Invalidate(SID_INSERT_DRAW);
diff --git a/sw/source/ui/ribbar/inputwin.cxx b/sw/source/ui/ribbar/inputwin.cxx
index 2d61300860..0016a4ac45 100755
--- a/sw/source/ui/ribbar/inputwin.cxx
+++ b/sw/source/ui/ribbar/inputwin.cxx
@@ -36,6 +36,7 @@
#include <svx/ruler.hxx>
#include <svl/zforlist.hxx>
#include <svl/stritem.hxx>
+#include <unotools/undoopt.hxx>
#include "swtypes.hxx"
#include "cmdid.h"
@@ -74,9 +75,13 @@ 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();
@@ -94,7 +99,7 @@ SwInputWindow::SwInputWindow( Window* pParent, SfxBindings* pBind )
InsertWindow( ED_FORMULA, &aEdit);
SetHelpId(ED_FORMULA, HID_EDIT_FORMULA);
- BOOL bHC = GetSettings().GetStyleSettings().GetHighContrastMode();
+ sal_Bool bHC = GetSettings().GetStyleSettings().GetHighContrastMode();
SetItemImage( FN_FORMULA_CALC, pManager->GetImage(FN_FORMULA_CALC, bHC ));
SetItemImage( FN_FORMULA_CANCEL, pManager->GetImage(FN_FORMULA_CANCEL, bHC ));
SetItemImage( FN_FORMULA_APPLY, pManager->GetImage(FN_FORMULA_APPLY, bHC ));
@@ -135,24 +140,35 @@ __EXPORT SwInputWindow::~SwInputWindow()
//Lineale aufwecken
if(pView)
{
- pView->GetHLineal().SetActive( TRUE );
- pView->GetVLineal().SetActive( TRUE );
+ pView->GetHLineal().SetActive( sal_True );
+ pView->GetVLineal().SetActive( sal_True );
}
if ( pMgr )
delete pMgr;
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 )
@@ -162,7 +178,7 @@ void SwInputWindow::DataChanged( const DataChangedEvent& rDCEvt )
// update item images
SwModule *pMod = SW_MOD();
SfxImageManager *pImgMgr = SfxImageManager::GetImageManager( pMod );
- BOOL bHC = GetSettings().GetStyleSettings().GetHighContrastMode();
+ sal_Bool bHC = GetSettings().GetStyleSettings().GetHighContrastMode();
//
SetItemImage( FN_FORMULA_CALC, pImgMgr->GetImage(FN_FORMULA_CALC, bHC ));
SetItemImage( FN_FORMULA_CANCEL, pImgMgr->GetImage(FN_FORMULA_CANCEL, bHC ));
@@ -191,16 +207,16 @@ void __EXPORT SwInputWindow::Resize()
void SwInputWindow::ShowWin()
{
- bIsTable = FALSE;
+ bIsTable = sal_False;
//Lineale anhalten
if(pView)
{
- pView->GetHLineal().SetActive( FALSE );
- pView->GetVLineal().SetActive( FALSE );
+ pView->GetHLineal().SetActive( sal_False );
+ pView->GetVLineal().SetActive( sal_False );
DBG_ASSERT(pWrtShell, "Keine WrtShell!");
// Cursor in Tabelle
- bIsTable = pWrtShell->IsCrsrInTbl() ? TRUE : FALSE;
+ bIsTable = pWrtShell->IsCrsrInTbl() ? sal_True : sal_False;
if( bFirst )
pWrtShell->SelTblCells( LINK( this, SwInputWindow,
@@ -208,7 +224,7 @@ void SwInputWindow::ShowWin()
if( bIsTable )
{
const String& rPos = pWrtShell->GetBoxNms();
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
short nSrch = -1;
while( (nPos = rPos.Search( ':',nPos + 1 ) ) != STRING_NOTFOUND )
nSrch = (short) nPos;
@@ -233,13 +249,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() )
{
@@ -252,9 +272,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 ))
@@ -269,7 +291,7 @@ void SwInputWindow::ShowWin()
pWrtShell->EndSelect();
}
- bFirst = FALSE;
+ bFirst = sal_False;
aEdit.SetModifyHdl( LINK( this, SwInputWindow, ModifyHdl ));
@@ -282,8 +304,8 @@ void SwInputWindow::ShowWin()
aEdit.GrabFocus();
// UserInterface fuer die Eingabe abklemmen
- pView->GetEditWin().LockKeyInput(TRUE);
- pView->GetViewFrame()->GetDispatcher()->Lock(TRUE);
+ pView->GetEditWin().LockKeyInput(sal_True);
+ pView->GetViewFrame()->GetDispatcher()->Lock(sal_True);
pWrtShell->Push();
}
ToolBox::Show();
@@ -320,7 +342,7 @@ static const char * __READONLY_DATA aStrArr[] = {
sCalc_Round
};
- USHORT nId = pMenu->GetCurItemId();
+ sal_uInt16 nId = pMenu->GetCurItemId();
if ( nId <= MN_CALC_ROUND )
{
String aTmp( String::CreateFromAscii(aStrArr[nId - 1]) );
@@ -332,7 +354,7 @@ static const char * __READONLY_DATA aStrArr[] = {
IMPL_LINK( SwInputWindow, DropdownClickHdl, ToolBox*, EMPTYARG )
{
- USHORT nCurID = GetCurItemId();
+ sal_uInt16 nCurID = GetCurItemId();
EndSelection(); // setzt CurItemId zurueck !
switch ( nCurID )
{
@@ -345,7 +367,7 @@ IMPL_LINK( SwInputWindow, DropdownClickHdl, ToolBox*, EMPTYARG )
}
}
- return TRUE;
+ return sal_True;
}
//==================================================================
@@ -353,7 +375,7 @@ IMPL_LINK( SwInputWindow, DropdownClickHdl, ToolBox*, EMPTYARG )
void __EXPORT SwInputWindow::Click( )
{
- USHORT nCurID = GetCurItemId();
+ sal_uInt16 nCurID = GetCurItemId();
EndSelection(); // setzt CurItemId zurueck !
switch ( nCurID )
{
@@ -374,18 +396,10 @@ void __EXPORT 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 );
// JP 13.01.97: Formel soll immer mit einem "=" beginnen, hier
// also wieder entfernen
@@ -409,18 +423,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();
@@ -478,7 +484,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() )
@@ -496,7 +502,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();
@@ -518,7 +524,7 @@ void SwInputWindow::DelBoxCntnt()
{
pWrtShell->StartAllAction();
pWrtShell->ClearMark();
- pWrtShell->Pop( FALSE );
+ pWrtShell->Pop( sal_False );
pWrtShell->Push();
pWrtShell->MoveSection( fnSectionCurr, fnSectionStart );
pWrtShell->SetMark();
@@ -559,32 +565,32 @@ void __EXPORT InputEdit::UpdateRange(const String& rBoxes,
String aBoxes = aPrefix;
aBoxes += rBoxes;
Selection aSelection(GetSelection());
- USHORT nSel = (USHORT) aSelection.Len();
+ sal_uInt16 nSel = (sal_uInt16) aSelection.Len();
//OS: mit dem folgenden Ausdruck wird sichergestellt, dass im overwrite-Modus
//die selektierte schliessende Klammer nicht geloescht wird
if( nSel && ( nSel > 1 ||
- GetText().GetChar( (USHORT)aSelection.Min() ) != cClose ) )
+ GetText().GetChar( (sal_uInt16)aSelection.Min() ) != cClose ) )
Cut();
else
aSelection.Max() = aSelection.Min();
String aActText(GetText());
- const USHORT nLen = aActText.Len();
+ const sal_uInt16 nLen = aActText.Len();
if( !nLen )
{
String aStr(cOpen);
aStr += aBoxes;
aStr += cClose;
SetText(aStr);
- USHORT nPos = aStr.Search( cClose );
+ sal_uInt16 nPos = aStr.Search( cClose );
ASSERT(nPos < aStr.Len(), Delimiter nicht gefunden.);
++nPos;
SetSelection( Selection( nPos, nPos ));
}
else
{
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
sal_Unicode cCh;
- USHORT nPos, nEndPos = 0, nStartPos = (USHORT) aSelection.Min();
+ sal_uInt16 nPos, nEndPos = 0, nStartPos = (sal_uInt16) aSelection.Min();
if( nStartPos-- )
{
do {
@@ -598,22 +604,22 @@ void __EXPORT InputEdit::UpdateRange(const String& rBoxes,
}
if( bFound )
{
- bFound = FALSE;
+ bFound = sal_False;
nEndPos = nStartPos;
while( nEndPos < nLen )
{
if( cClose == (cCh = aActText.GetChar( nEndPos )) /*||
cCh == cCloseBracket*/ )
{
- bFound = TRUE;
+ bFound = sal_True;
break;
}
++nEndPos;
}
// nur wenn akt. Pos im Breich oder direkt dahinter liegt
- if( bFound && !( nStartPos < (USHORT)aSelection.Max() &&
- (USHORT)aSelection.Max() <= nEndPos + 1 ))
- bFound = FALSE;
+ if( bFound && !( nStartPos < (sal_uInt16)aSelection.Max() &&
+ (sal_uInt16)aSelection.Max() <= nEndPos + 1 ))
+ bFound = sal_False;
}
if( bFound )
{
@@ -627,7 +633,7 @@ void __EXPORT InputEdit::UpdateRange(const String& rBoxes,
String aTmp( (char)cOpen );
aTmp += aBoxes;
aTmp += (char)cClose;
- nPos = (USHORT)aSelection.Min();
+ nPos = (sal_uInt16)aSelection.Min();
aActText.Insert( aTmp, nPos );
nPos = nPos + aTmp.Len();
}
@@ -645,7 +651,7 @@ void __EXPORT InputEdit::UpdateRange(const String& rBoxes,
SwInputChild::SwInputChild(Window* _pParent,
- USHORT nId,
+ sal_uInt16 nId,
SfxBindings* pBindings,
SfxChildWinInfo* ) :
SfxChildWindow( _pParent, nId )
@@ -660,7 +666,7 @@ SwInputChild::SwInputChild(Window* _pParent,
__EXPORT SwInputChild::~SwInputChild()
{
if(pDispatch)
- pDispatch->Lock(FALSE);
+ pDispatch->Lock(sal_False);
}
@@ -670,25 +676,3 @@ SfxChildWinInfo __EXPORT SwInputChild::GetInfo() const
return aInfo;
}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/sw/source/ui/ribbar/tblctrl.cxx b/sw/source/ui/ribbar/tblctrl.cxx
index dbbbfcb44a..7d750435e7 100644
--- a/sw/source/ui/ribbar/tblctrl.cxx
+++ b/sw/source/ui/ribbar/tblctrl.cxx
@@ -51,8 +51,8 @@ SFX_IMPL_TOOLBOX_CONTROL( SwTableOptimizeCtrl, SfxUInt16Item );
SwTableOptimizeCtrl::SwTableOptimizeCtrl(
- USHORT nSlotId,
- USHORT nId,
+ sal_uInt16 nSlotId,
+ sal_uInt16 nId,
ToolBox& rTbx ) :
SfxToolBoxControl( nSlotId, nId, rTbx )
{
diff --git a/sw/source/ui/ribbar/tbxanchr.cxx b/sw/source/ui/ribbar/tbxanchr.cxx
index ba6865e827..2cfbc6f085 100644
--- a/sw/source/ui/ribbar/tbxanchr.cxx
+++ b/sw/source/ui/ribbar/tbxanchr.cxx
@@ -61,7 +61,7 @@ SFX_IMPL_TOOLBOX_CONTROL(SwTbxAnchor, SfxUInt16Item);
* Beschreibung:
******************************************************************************/
-SwTbxAnchor::SwTbxAnchor( USHORT nSlotId, USHORT nId, ToolBox& rTbx ) :
+SwTbxAnchor::SwTbxAnchor( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ) :
SfxToolBoxControl( nSlotId, nId, rTbx ),
nActAnchorId(0)
{
@@ -80,7 +80,7 @@ SwTbxAnchor::SwTbxAnchor( USHORT nSlotId, USHORT nId, ToolBox& rTbx ) :
* Beschreibung:
******************************************************************************/
-void SwTbxAnchor::StateChanged( USHORT /*nSID*/, SfxItemState eState, const SfxPoolItem* pState )
+void SwTbxAnchor::StateChanged( sal_uInt16 /*nSID*/, SfxItemState eState, const SfxPoolItem* pState )
{
GetToolBox().EnableItem( GetId(), (GetItemState(pState) != SFX_ITEM_DISABLED) );
@@ -148,8 +148,8 @@ void SwTbxAnchor::Click()
aPopMenu.EnableItem( FN_TOOL_ANKER_FRAME, 0 != pWrtShell->IsFlyInFly() );
Rectangle aRect(GetToolBox().GetItemRect(GetId()));
- USHORT nHtmlMode = ::GetHtmlMode((SwDocShell*)SfxObjectShell::Current());
- BOOL bHtmlModeNoAnchor = ( nHtmlMode & HTMLMODE_ON) && 0 == (nHtmlMode & HTMLMODE_SOME_ABS_POS);
+ sal_uInt16 nHtmlMode = ::GetHtmlMode((SwDocShell*)SfxObjectShell::Current());
+ sal_Bool bHtmlModeNoAnchor = ( nHtmlMode & HTMLMODE_ON) && 0 == (nHtmlMode & HTMLMODE_SOME_ABS_POS);
if (bHtmlModeNoAnchor || pWrtShell->IsInHeaderFooter())
aPopMenu.RemoveItem(aPopMenu.GetItemPos(FN_TOOL_ANKER_PAGE));
@@ -158,7 +158,7 @@ void SwTbxAnchor::Click()
aPopMenu.CheckItem(nActAnchorId);
- USHORT nSlotId = aPopMenu.Execute(&GetToolBox(), aRect);
+ sal_uInt16 nSlotId = aPopMenu.Execute(&GetToolBox(), aRect);
GetToolBox().EndSelection();
if (nSlotId)
diff --git a/sw/source/ui/ribbar/workctrl.cxx b/sw/source/ui/ribbar/workctrl.cxx
index 313265e853..a534907ef5 100644
--- a/sw/source/ui/ribbar/workctrl.cxx
+++ b/sw/source/ui/ribbar/workctrl.cxx
@@ -88,8 +88,8 @@ SFX_IMPL_TOOLBOX_CONTROL( SwTbxAutoTextCtrl, SfxBoolItem );
**********************************************************************/
SwTbxInsertCtrl::SwTbxInsertCtrl(
- USHORT nSlotId,
- USHORT nId,
+ sal_uInt16 nSlotId,
+ sal_uInt16 nId,
ToolBox& rTbx ) :
SfxToolBoxControl( nSlotId, nId, rTbx ),
nLastSlotId(FN_INSERT_CTRL == nSlotId ? FN_INSERT_TABLE : SID_INSERT_DIAGRAM)
@@ -124,11 +124,11 @@ void SAL_CALL SwTbxInsertCtrl::update() throw (uno::RuntimeException)
**********************************************************************/
-void SwTbxInsertCtrl::StateChanged( USHORT /*nSID*/,
+void SwTbxInsertCtrl::StateChanged( sal_uInt16 /*nSID*/,
SfxItemState eState,
const SfxPoolItem* pState )
{
- USHORT nId = GetId();
+ sal_uInt16 nId = GetId();
GetToolBox().EnableItem( nId, (GetItemState(pState) != SFX_ITEM_DISABLED) );
if( eState == SFX_ITEM_AVAILABLE )
@@ -148,7 +148,7 @@ void SwTbxInsertCtrl::StateChanged( USHORT /*nSID*/,
hasBigImages(),
rBox.GetSettings().GetStyleSettings().GetHighContrastMode() );
rBox.SetItemImage(GetId(), aImage);
- rBox.SetItemImageMirrorMode( GetId(), FALSE );
+ rBox.SetItemImageMirrorMode( GetId(), sal_False );
rBox.SetItemImageAngle( GetId(), pItem->GetRotation() );
rBox.SetItemImageMirrorMode( GetId(), pItem->IsMirrored() );
}
@@ -191,7 +191,7 @@ SfxPopupWindowType SwTbxInsertCtrl::GetPopupWindowType() const
**********************************************************************/
-void SwTbxInsertCtrl::Select( BOOL /*bMod1*/ )
+void SwTbxInsertCtrl::Select( sal_Bool /*bMod1*/ )
{
if( nLastSlotId )
{
@@ -216,8 +216,8 @@ void SwTbxInsertCtrl::Select( BOOL /*bMod1*/ )
SwTbxAutoTextCtrl::SwTbxAutoTextCtrl(
- USHORT nSlotId,
- USHORT nId,
+ sal_uInt16 nSlotId,
+ sal_uInt16 nId,
ToolBox& rTbx ) :
SfxToolBoxControl( nSlotId, nId, rTbx ),
pPopup(0),
@@ -271,22 +271,22 @@ SfxPopupWindow* SwTbxAutoTextCtrl::CreatePopupWindow()
{
pPopup = new PopupMenu;
SwGlossaryList* pGlossaryList = ::GetGlossaryList();
- USHORT nGroupCount = pGlossaryList->GetGroupCount();
- for(USHORT i = 1; i <= nGroupCount; i++)
+ sal_uInt16 nGroupCount = pGlossaryList->GetGroupCount();
+ for(sal_uInt16 i = 1; i <= nGroupCount; i++)
{
// Gruppenname mit Pfad-Extension besorgen
String sTitle;
- String sGroupName = pGlossaryList->GetGroupName(i - 1, FALSE, &sTitle);
- USHORT nBlockCount = pGlossaryList->GetBlockCount(i -1);
+ String sGroupName = pGlossaryList->GetGroupName(i - 1, sal_False, &sTitle);
+ sal_uInt16 nBlockCount = pGlossaryList->GetBlockCount(i -1);
if(nBlockCount)
{
- USHORT nIndex = 100 * (i);
+ sal_uInt16 nIndex = 100 * (i);
// aber ohne extension einfuegen
pPopup->InsertItem( i, sTitle);//sGroupName.GetToken(0, GLOS_DELIM));
PopupMenu* pSub = new PopupMenu;
pSub->SetSelectHdl(aLnk);
pPopup->SetPopupMenu(i, pSub);
- for(USHORT j = 0; j < nBlockCount; j++)
+ for(sal_uInt16 j = 0; j < nBlockCount; j++)
{
String sEntry;
String sLongName(pGlossaryList->GetBlockName(i - 1, j, sEntry));
@@ -299,14 +299,14 @@ SfxPopupWindow* SwTbxAutoTextCtrl::CreatePopupWindow()
}
}
ToolBox* pToolBox = &GetToolBox();
- USHORT nId = GetId();
- pToolBox->SetItemDown( nId, TRUE );
+ sal_uInt16 nId = GetId();
+ pToolBox->SetItemDown( nId, sal_True );
pPopup->Execute( pToolBox, pToolBox->GetItemRect( nId ),
(pToolBox->GetAlign() == WINDOWALIGN_TOP || pToolBox->GetAlign() == WINDOWALIGN_BOTTOM) ?
POPUPMENU_EXECUTE_DOWN : POPUPMENU_EXECUTE_RIGHT );
- pToolBox->SetItemDown( nId, FALSE );
+ pToolBox->SetItemDown( nId, sal_False );
}
GetToolBox().EndSelection();
DelPopup();
@@ -330,7 +330,7 @@ SfxPopupWindowType SwTbxAutoTextCtrl::GetPopupWindowType() const
**********************************************************************/
-void SwTbxAutoTextCtrl::StateChanged( USHORT nSID,
+void SwTbxAutoTextCtrl::StateChanged( sal_uInt16 nSID,
SfxItemState eState,
const SfxPoolItem* pState )
{
@@ -348,7 +348,7 @@ void SwTbxAutoTextCtrl::StateChanged( USHORT nSID,
IMPL_LINK(SwTbxAutoTextCtrl, PopupHdl, PopupMenu*, pMenu)
{
- USHORT nId = pMenu->GetCurItemId();
+ sal_uInt16 nId = pMenu->GetCurItemId();
if ( GetSlotId() == FN_INSERT_FIELD_CTRL)
{
@@ -384,11 +384,11 @@ IMPL_LINK(SwTbxAutoTextCtrl, PopupHdl, PopupMenu*, pMenu)
}
else
{
- USHORT nBlock = nId / 100;
+ sal_uInt16 nBlock = nId / 100;
SwGlossaryList* pGlossaryList = ::GetGlossaryList();
String sShortName;
- String sGroup = pGlossaryList->GetGroupName(nBlock - 1, FALSE);
+ String sGroup = pGlossaryList->GetGroupName(nBlock - 1, sal_False);
String sLongName(pGlossaryList->GetBlockName(nBlock - 1, nId - (100 * nBlock) - 1, sShortName));
SwGlossaryHdl* pGlosHdl = pView->GetGlosHdl();
@@ -397,7 +397,7 @@ IMPL_LINK(SwTbxAutoTextCtrl, PopupHdl, PopupMenu*, pMenu)
::GlossarySetActGroup fnSetActGroup = pFact->SetGlossaryActGroupFunc( DLG_RENAME_GLOS );
if ( fnSetActGroup )
(*fnSetActGroup)( sGroup );
- pGlosHdl->SetCurGroup(sGroup, TRUE);
+ pGlosHdl->SetCurGroup(sGroup, sal_True);
pGlosHdl->InsertGlossary(sShortName);
}
return 0;
@@ -414,7 +414,7 @@ void SwTbxAutoTextCtrl::DelPopup()
{
if (GetSlotId() != FN_INSERT_FIELD_CTRL)
{
- for( USHORT i = 0; i < pPopup->GetItemCount(); i ++ )
+ for( sal_uInt16 i = 0; i < pPopup->GetItemCount(); i ++ )
{
PopupMenu* pSubPopup = pPopup->GetPopupMenu(pPopup->GetItemId(i));
delete pSubPopup;
@@ -429,7 +429,7 @@ void SwTbxAutoTextCtrl::DelPopup()
Navigations-Popup
--------------------------------------------------*/
// determine the order of the toolbox items
-static USHORT __READONLY_DATA aNavigationInsertIds[ NAVI_ENTRIES ] =
+static sal_uInt16 __READONLY_DATA aNavigationInsertIds[ NAVI_ENTRIES ] =
{
// -- first line
NID_TBL,
@@ -480,7 +480,7 @@ static const char* __READONLY_DATA aNavigationHelpIds[ NAVI_ENTRIES ] =
HID_NID_NEXT
};
-SwScrollNaviPopup::SwScrollNaviPopup( USHORT nId, const Reference< XFrame >& rFrame )
+SwScrollNaviPopup::SwScrollNaviPopup( sal_uInt16 nId, const Reference< XFrame >& rFrame )
: SfxPopupWindow(nId, rFrame, SW_RES(RID_SCROLL_NAVIGATION_WIN) ),
aToolBox(this, 0),
aSeparator(this, SW_RES(FL_SEP)),
@@ -490,20 +490,20 @@ SwScrollNaviPopup::SwScrollNaviPopup( USHORT nId, const Reference< XFrame >& rFr
nFwdId(FN_START_OF_NEXT_PAGE),
nBackId(FN_START_OF_PREV_PAGE)
{
- USHORT i;
+ sal_uInt16 i;
aToolBox.SetHelpId(HID_NAVI_VS);
aToolBox.SetLineCount( 2 );
aToolBox.SetOutStyle(TOOLBOX_STYLE_FLAT);
for( i = 0; i < NID_COUNT; i++)
{
- USHORT nNaviId = aNavigationInsertIds[i];
+ sal_uInt16 nNaviId = aNavigationInsertIds[i];
String sText;
ToolBoxItemBits nTbxBits = 0;
if((NID_PREV != nNaviId) && (NID_NEXT != nNaviId))
{
// -2, there's no string for Next/Prev
- USHORT nResStr = ST_TBL - 2 + nNaviId - NID_START;
+ sal_uInt16 nResStr = ST_TBL - 2 + nNaviId - NID_START;
sText = String(SW_RES(nResStr));
nTbxBits = TIB_CHECKABLE;
}
@@ -526,7 +526,7 @@ SwScrollNaviPopup::SwScrollNaviPopup( USHORT nId, const Reference< XFrame >& rFr
aImgSize.Height() += 5;
Size aSz = aToolBox.CalcWindowSizePixel(2);
aToolBox.SetPosSizePixel( Point(), aSz );
- USHORT nItemId = SwView::GetMoveType();
+ sal_uInt16 nItemId = SwView::GetMoveType();
aInfoField.SetText(aToolBox.GetItemText(nItemId));
aToolBox.CheckItem( nItemId, sal_True );
Size aFTSize(aInfoField.GetSizePixel());
@@ -570,9 +570,9 @@ void SwScrollNaviPopup::ApplyImageList()
{
ImageList& rImgLst = aToolBox.GetSettings().GetStyleSettings().GetHighContrastMode() ?
aIListH : aIList;
- for(USHORT i = 0; i < NID_COUNT; i++)
+ for(sal_uInt16 i = 0; i < NID_COUNT; i++)
{
- USHORT nNaviId = aNavigationInsertIds[i];
+ sal_uInt16 nNaviId = aNavigationInsertIds[i];
aToolBox.SetItemImage(nNaviId, rImgLst.GetImage(nNaviId));
}
}
@@ -591,7 +591,7 @@ SfxPopupWindow* SwScrollNaviPopup::Clone() const
IMPL_LINK(SwScrollNaviPopup, SelectHdl, ToolBox*, pSet)
{
- USHORT nSet = pSet->GetCurItemId();
+ sal_uInt16 nSet = pSet->GetCurItemId();
if( nSet != NID_PREV && nSet != NID_NEXT )
{
SwView::SetMoveType(nSet);
@@ -599,9 +599,9 @@ IMPL_LINK(SwScrollNaviPopup, SelectHdl, ToolBox*, pSet)
aToolBox.SetItemText(NID_PREV, sQuickHelp[nSet - NID_START + NID_COUNT]);
aInfoField.SetText(aToolBox.GetItemText(nSet));
//check the current button only
- for(USHORT i = 0; i < NID_COUNT; i++)
+ for(sal_uInt16 i = 0; i < NID_COUNT; i++)
{
- USHORT nItemId = aToolBox.GetItemId( i );
+ sal_uInt16 nItemId = aToolBox.GetItemId( i );
aToolBox.CheckItem( nItemId, nItemId == nSet );
}
}
@@ -635,8 +635,8 @@ void SwScrollNaviToolBox::MouseButtonUp( const MouseEvent& rMEvt )
--------------------------------------------------*/
void SwScrollNaviToolBox::RequestHelp( const HelpEvent& rHEvt )
{
- SetItemText(NID_NEXT, SwScrollNaviPopup::GetQuickHelpText(TRUE));
- SetItemText(NID_PREV, SwScrollNaviPopup::GetQuickHelpText(FALSE));
+ SetItemText(NID_NEXT, SwScrollNaviPopup::GetQuickHelpText(sal_True));
+ SetItemText(NID_PREV, SwScrollNaviPopup::GetQuickHelpText(sal_False));
ToolBox::RequestHelp( rHEvt );
}
@@ -644,9 +644,9 @@ void SwScrollNaviToolBox::RequestHelp( const HelpEvent& rHEvt )
/*-----------------20.06.97 13:41-------------------
--------------------------------------------------*/
-String SwScrollNaviPopup::GetQuickHelpText(BOOL bNext)
+String SwScrollNaviPopup::GetQuickHelpText(sal_Bool bNext)
{
- USHORT nResId = STR_IMGBTN_START;
+ sal_uInt16 nResId = STR_IMGBTN_START;
nResId += SwView::GetMoveType() - NID_START;
if(!bNext)
nResId += NID_COUNT;
@@ -760,14 +760,14 @@ void SwNaviImageButton::DataChanged( const DataChangedEvent& rDCEvt )
* --------------------------------------------------*/
class SwZoomBox_Impl : public ComboBox
{
- USHORT nSlotId;
- BOOL bRelease;
+ sal_uInt16 nSlotId;
+ sal_Bool bRelease;
uno::Reference< frame::XDispatchProvider > m_xDispatchProvider;
public:
SwZoomBox_Impl(
Window* pParent,
- USHORT nSlot,
+ sal_uInt16 nSlot,
const Reference< XDispatchProvider >& rDispatchProvider );
~SwZoomBox_Impl();
@@ -783,17 +783,17 @@ protected:
* --------------------------------------------------*/
SwZoomBox_Impl::SwZoomBox_Impl(
Window* pParent,
- USHORT nSlot,
+ sal_uInt16 nSlot,
const Reference< XDispatchProvider >& rDispatchProvider ):
ComboBox( pParent, SW_RES(RID_PVIEW_ZOOM_LB)),
nSlotId(nSlot),
- bRelease(TRUE),
+ bRelease(sal_True),
m_xDispatchProvider( rDispatchProvider )
{
- EnableAutocomplete( FALSE );
- USHORT aZoomValues[] =
+ EnableAutocomplete( sal_False );
+ sal_uInt16 aZoomValues[] =
{ 25, 50, 75, 100, 150, 200 };
- for(USHORT i = 0; i < sizeof(aZoomValues)/sizeof(USHORT); i++)
+ for(sal_uInt16 i = 0; i < sizeof(aZoomValues)/sizeof(sal_uInt16); i++)
{
String sEntry = String::CreateFromInt32(aZoomValues[i]);
sEntry += '%';
@@ -814,7 +814,7 @@ void SwZoomBox_Impl::Select()
{
String sEntry(GetText());
sEntry.EraseAllChars( '%' );
- USHORT nZoom = (USHORT)sEntry.ToInt32();
+ sal_uInt16 nZoom = (sal_uInt16)sEntry.ToInt32();
if(nZoom < MINZOOM)
nZoom = MINZOOM;
if(nZoom > MAXZOOM)
@@ -846,7 +846,7 @@ long SwZoomBox_Impl::Notify( NotifyEvent& rNEvt )
if ( rNEvt.GetType() == EVENT_KEYINPUT )
{
- USHORT nCode = rNEvt.GetKeyEvent()->GetKeyCode().GetCode();
+ sal_uInt16 nCode = rNEvt.GetKeyEvent()->GetKeyCode().GetCode();
switch ( nCode )
{
@@ -854,7 +854,7 @@ long SwZoomBox_Impl::Notify( NotifyEvent& rNEvt )
case KEY_TAB:
{
if ( KEY_TAB == nCode )
- bRelease = FALSE;
+ bRelease = sal_False;
else
nHandled = 1;
Select();
@@ -883,7 +883,7 @@ void SwZoomBox_Impl::ReleaseFocus()
{
if ( !bRelease )
{
- bRelease = TRUE;
+ bRelease = sal_True;
return;
}
SfxViewShell* pCurSh = SfxViewShell::Current();
@@ -903,8 +903,8 @@ void SwZoomBox_Impl::ReleaseFocus()
SFX_IMPL_TOOLBOX_CONTROL( SwPreviewZoomControl, SfxUInt16Item);
SwPreviewZoomControl::SwPreviewZoomControl(
- USHORT nSlotId,
- USHORT nId,
+ sal_uInt16 nSlotId,
+ sal_uInt16 nId,
ToolBox& rTbx) :
SfxToolBoxControl( nSlotId, nId, rTbx )
{
@@ -918,11 +918,11 @@ SwPreviewZoomControl::~SwPreviewZoomControl()
/* -----------------26.11.2002 09:29-----------------
*
* --------------------------------------------------*/
-void SwPreviewZoomControl::StateChanged( USHORT /*nSID*/,
+void SwPreviewZoomControl::StateChanged( sal_uInt16 /*nSID*/,
SfxItemState eState,
const SfxPoolItem* pState )
{
- USHORT nId = GetId();
+ sal_uInt16 nId = GetId();
GetToolBox().EnableItem( nId, (GetItemState(pState) != SFX_ITEM_DISABLED) );
SwZoomBox_Impl* pBox = (SwZoomBox_Impl*)GetToolBox().GetItemWindow( GetId() );
if(SFX_ITEM_AVAILABLE <= eState)
diff --git a/sw/source/ui/shells/annotsh.cxx b/sw/source/ui/shells/annotsh.cxx
index bd465c6dd1..84181f183d 100755
--- a/sw/source/ui/shells/annotsh.cxx
+++ b/sw/source/ui/shells/annotsh.cxx
@@ -161,7 +161,7 @@ SwAnnotationShell::~SwAnnotationShell()
{
}
-SfxUndoManager* SwAnnotationShell::GetUndoManager()
+::svl::IUndoManager* SwAnnotationShell::GetUndoManager()
{
SwPostItMgr* pPostItMgr = rView.GetPostItMgr();
if ( !pPostItMgr ||
@@ -266,9 +266,9 @@ void SwAnnotationShell::Exec( SfxRequest &rReq )
Outliner * pOutliner = pOLV->GetOutliner();
if(pOutliner)
{
- ULONG nParaCount = pOutliner->GetParagraphCount();
+ sal_uLong nParaCount = pOutliner->GetParagraphCount();
if (nParaCount > 0)
- pOLV->SelectRange(0L, USHORT(nParaCount) );
+ pOLV->SelectRange(0L, sal_uInt16(nParaCount) );
}
break;
}
@@ -363,7 +363,7 @@ void SwAnnotationShell::Exec( SfxRequest &rReq )
{
const SfxPoolItem* pItem = 0;
if(pNewAttrs)
- pNewAttrs->GetItemState(nSlot, FALSE, &pItem );
+ pNewAttrs->GetItemState(nSlot, sal_False, &pItem );
if (pPostItMgr->GetActiveSidebarWin()->GetLayoutStatus()!=SwPostItHelper::DELETED)
pOLV->InsertText(((const SfxStringItem *)pItem)->GetValue());
break;
@@ -415,7 +415,7 @@ void SwAnnotationShell::Exec( SfxRequest &rReq )
SwDocStat aCurr;
SwDocStat aDocStat( rSh.getIDocumentStatistics()->GetDocStat() );
{
- SwWait aWait( *rView.GetDocShell(), TRUE );
+ SwWait aWait( *rView.GetDocShell(), sal_True );
rSh.StartAction();
rSh.CountWords( aCurr );
rSh.UpdateDocStat( aDocStat );
@@ -454,7 +454,7 @@ void SwAnnotationShell::Exec( SfxRequest &rReq )
SfxAbstractTabDialog* pDlg = pFact->CreateSwCharDlg( rView.GetWindow(), rView, aDlgAttr, DLG_CHAR,0, sal_True );
DBG_ASSERT(pDlg, "Dialogdiet fail!");//CHINA001
- USHORT nRet = pDlg->Execute();
+ sal_uInt16 nRet = pDlg->Execute();
if(RET_OK == nRet )
{
rReq.Done( *( pDlg->GetOutputItemSet() ) );
@@ -503,7 +503,7 @@ void SwAnnotationShell::Exec( SfxRequest &rReq )
SfxAbstractTabDialog* pDlg = pFact->CreateSwParaDlg( rView.GetWindow(), rView, aDlgAttr,DLG_STD, DLG_PARA, 0, sal_True );
DBG_ASSERT(pDlg, "Dialogdiet fail!");//CHINA001
- USHORT nRet = pDlg->Execute();
+ sal_uInt16 nRet = pDlg->Execute();
if(RET_OK == nRet)
{
rReq.Done( *( pDlg->GetOutputItemSet() ) );
@@ -529,7 +529,7 @@ void SwAnnotationShell::Exec( SfxRequest &rReq )
sal_Bool bLeftToRight = nSlot == SID_ATTR_PARA_LEFT_TO_RIGHT;
const SfxPoolItem* pPoolItem;
- if( pNewAttrs && SFX_ITEM_SET == pNewAttrs->GetItemState( nSlot, TRUE, &pPoolItem ) )
+ if( pNewAttrs && SFX_ITEM_SET == pNewAttrs->GetItemState( nSlot, sal_True, &pPoolItem ) )
{
if( !( (SfxBoolItem*)pPoolItem)->GetValue() )
bLeftToRight = !bLeftToRight;
@@ -539,8 +539,8 @@ void SwAnnotationShell::Exec( SfxRequest &rReq )
EE_PARA_WRITINGDIR, EE_PARA_WRITINGDIR,
0 );
- USHORT nAdjust = SVX_ADJUST_LEFT;
- if( SFX_ITEM_ON == aEditAttr.GetItemState(EE_PARA_JUST, TRUE, &pPoolItem ) )
+ sal_uInt16 nAdjust = SVX_ADJUST_LEFT;
+ if( SFX_ITEM_ON == aEditAttr.GetItemState(EE_PARA_JUST, sal_True, &pPoolItem ) )
nAdjust = ( (SvxAdjustItem*)pPoolItem)->GetEnumValue();
if( bLeftToRight )
@@ -593,7 +593,7 @@ void SwAnnotationShell::GetState(SfxItemSet& rSet)
while(nWhich)
{
sal_uInt16 nEEWhich = 0;
- USHORT nSlotId = GetPool().GetSlotId( nWhich );
+ sal_uInt16 nSlotId = GetPool().GetSlotId( nWhich );
switch( nSlotId )
{
case SID_ATTR_CHAR_FONT:
@@ -603,12 +603,12 @@ void SwAnnotationShell::GetState(SfxItemSet& rSet)
{
if ( pOLV )
{
- USHORT nScriptType = pOLV->GetSelectedScriptType();
+ sal_uInt16 nScriptType = pOLV->GetSelectedScriptType();
SfxItemPool* pSecondPool = aEditAttr.GetPool()->GetSecondaryPool();
if( !pSecondPool )
pSecondPool = aEditAttr.GetPool();
SvxScriptSetItem aSetItem( nSlotId, *pSecondPool );
- aSetItem.GetItemSet().Put( aEditAttr, FALSE );
+ aSetItem.GetItemSet().Put( aEditAttr, sal_False );
const SfxPoolItem* pI = aSetItem.GetItemOfScript( nScriptType );
if( pI )
rSet.Put( *pI, nWhich );
@@ -629,7 +629,7 @@ void SwAnnotationShell::GetState(SfxItemSet& rSet)
case FN_SET_SUPER_SCRIPT:
case FN_SET_SUB_SCRIPT:
{
- USHORT nEsc = 0;
+ sal_uInt16 nEsc = 0;
const SfxPoolItem *pEscItem = 0;
if (nWhich==FN_SET_SUPER_SCRIPT)
nEsc = SVX_ESCAPEMENT_SUPERSCRIPT;
@@ -729,7 +729,7 @@ void SwAnnotationShell::GetState(SfxItemSet& rSet)
rSet.DisableItem( nWhich );
else
{
- BOOL bFlag = FALSE;
+ sal_Bool bFlag = sal_False;
switch( ( ( (SvxFrameDirectionItem&) aEditAttr.Get( EE_PARA_WRITINGDIR ) ) ).GetValue() )
{
case FRMDIR_HORI_LEFT_TOP:
@@ -776,7 +776,7 @@ void SwAnnotationShell::GetState(SfxItemSet& rSet)
}
}
-void SwAnnotationShell::ExecSearch(SfxRequest& rReq, BOOL bNoMessage)
+void SwAnnotationShell::ExecSearch(SfxRequest& rReq, sal_Bool bNoMessage)
{
rView.ExecSearch(rReq,bNoMessage);
}
@@ -824,7 +824,7 @@ void SwAnnotationShell::ExecClpbrd(SfxRequest &rReq)
TransferableDataHelper aDataHelper( TransferableDataHelper::CreateFromSystemClipboard( &rView.GetEditWin() ) );
- ULONG nFormat = pDlg->GetFormat( aDataHelper.GetTransferable() );
+ sal_uLong nFormat = pDlg->GetFormat( aDataHelper.GetTransferable() );
if (nFormat > 0)
{
@@ -839,9 +839,9 @@ void SwAnnotationShell::ExecClpbrd(SfxRequest &rReq)
}
case SID_CLIPBOARD_FORMAT_ITEMS:
{
- ULONG nFormat = 0;
+ sal_uLong nFormat = 0;
const SfxPoolItem* pItem;
- if ( rReq.GetArgs() && rReq.GetArgs()->GetItemState(nSlot, TRUE, &pItem) == SFX_ITEM_SET &&
+ if ( rReq.GetArgs() && rReq.GetArgs()->GetItemState(nSlot, sal_True, &pItem) == SFX_ITEM_SET &&
pItem->ISA(SfxUInt32Item) )
{
nFormat = ((const SfxUInt32Item*)pItem)->GetValue();
@@ -919,7 +919,7 @@ void SwAnnotationShell::StateClpbrd(SfxItemSet &rSet)
void SwAnnotationShell::StateStatusLine(SfxItemSet &rSet)
{
SfxWhichIter aIter( rSet );
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while( nWhich )
{
@@ -1018,7 +1018,7 @@ void SwAnnotationShell::NoteExec(SfxRequest &rReq)
break;
case FN_DELETE_NOTE_AUTHOR:
{
- SFX_REQUEST_ARG( rReq, pItem, SfxStringItem, nSlot, FALSE);
+ SFX_REQUEST_ARG( rReq, pItem, SfxStringItem, nSlot, sal_False);
if ( pItem )
pPostItMgr->Delete( pItem->GetValue() );
break;
@@ -1039,7 +1039,7 @@ void SwAnnotationShell::NoteExec(SfxRequest &rReq)
break;
case FN_HIDE_NOTE_AUTHOR:
{
- SFX_REQUEST_ARG( rReq, pItem, SfxStringItem, nSlot, FALSE);
+ SFX_REQUEST_ARG( rReq, pItem, SfxStringItem, nSlot, sal_False);
if ( pItem )
pPostItMgr->Hide( pItem->GetValue() );
}
@@ -1053,7 +1053,7 @@ void SwAnnotationShell::GetNoteState(SfxItemSet &rSet)
sal_uInt16 nWhich = aIter.FirstWhich();
while(nWhich)
{
- USHORT nSlotId = GetPool().GetSlotId( nWhich );
+ sal_uInt16 nSlotId = GetPool().GetSlotId( nWhich );
switch( nSlotId )
{
case FN_POSTIT:
@@ -1272,7 +1272,7 @@ void SwAnnotationShell::GetLinguState(SfxItemSet &rSet)
{
const SfxPoolItem &rItem = rView.GetWrtShell().GetDoc()->GetDefault(
GetWhichOfScript( RES_CHRATR_LANGUAGE,
- GetI18NScriptTypeOfLanguage( (USHORT)GetAppLanguage())) );
+ GetI18NScriptTypeOfLanguage( (sal_uInt16)GetAppLanguage())) );
LanguageType nLang = ((const SvxLanguageItem &)
rItem).GetLanguage();
uno::Reference< linguistic2::XThesaurus > xThes( ::GetThesaurus() );
@@ -1358,17 +1358,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 )
{
@@ -1387,7 +1387,7 @@ void SwAnnotationShell::ExecUndo(SfxRequest &rReq)
nCnt = 0;
while( nSteps-- )
- pUndoManager->Undo(0);
+ pUndoManager->Undo();
}
if ( nCnt )
@@ -1411,7 +1411,7 @@ void SwAnnotationShell::ExecUndo(SfxRequest &rReq)
nCnt = 0;
while( nSteps-- )
- pUndoManager->Redo(0);
+ pUndoManager->Redo();
}
if ( nCnt )
@@ -1434,8 +1434,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();
@@ -1448,8 +1448,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;
@@ -1459,8 +1461,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;
@@ -1470,34 +1474,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 );
}
@@ -1529,7 +1535,7 @@ void SwAnnotationShell::StateUndo(SfxItemSet &rSet)
void SwAnnotationShell::StateDisableItems( SfxItemSet &rSet )
{
SfxWhichIter aIter(rSet);
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while (nWhich)
{
rSet.DisableItem( nWhich );
@@ -1548,7 +1554,7 @@ void SwAnnotationShell::InsertSymbol(SfxRequest& rReq)
const SfxItemSet *pArgs = rReq.GetArgs();
const SfxPoolItem* pItem = 0;
if( pArgs )
- pArgs->GetItemState(GetPool().GetWhich(SID_CHARMAP), FALSE, &pItem);
+ pArgs->GetItemState(GetPool().GetWhich(SID_CHARMAP), sal_False, &pItem);
String sSym;
String sFontName;
@@ -1556,25 +1562,25 @@ void SwAnnotationShell::InsertSymbol(SfxRequest& rReq)
{
sSym = ((const SfxStringItem*)pItem)->GetValue();
const SfxPoolItem* pFtItem = NULL;
- pArgs->GetItemState( GetPool().GetWhich(SID_ATTR_SPECIALCHAR), FALSE, &pFtItem);
+ pArgs->GetItemState( GetPool().GetWhich(SID_ATTR_SPECIALCHAR), sal_False, &pFtItem);
const SfxStringItem* pFontItem = PTR_CAST( SfxStringItem, pFtItem );
if ( pFontItem )
sFontName = pFontItem->GetValue();
}
SfxItemSet aSet(pOLV->GetAttribs());
- USHORT nScript = pOLV->GetSelectedScriptType();
+ sal_uInt16 nScript = pOLV->GetSelectedScriptType();
SvxFontItem aSetDlgFont( RES_CHRATR_FONT );
{
SvxScriptSetItem aSetItem( SID_ATTR_CHAR_FONT, *aSet.GetPool() );
- aSetItem.GetItemSet().Put( aSet, FALSE );
+ aSetItem.GetItemSet().Put( aSet, sal_False );
const SfxPoolItem* pI = aSetItem.GetItemOfScript( nScript );
if( pI )
aSetDlgFont = *(SvxFontItem*)pI;
else
aSetDlgFont = (SvxFontItem&)aSet.Get( GetWhichOfScript(
SID_ATTR_CHAR_FONT,
- GetI18NScriptTypeOfLanguage( (USHORT)GetAppLanguage() ) ));
+ GetI18NScriptTypeOfLanguage( (sal_uInt16)GetAppLanguage() ) ));
if (!sFontName.Len())
sFontName = aSetDlgFont.GetFamilyName();
}
@@ -1585,7 +1591,7 @@ void SwAnnotationShell::InsertSymbol(SfxRequest& rReq)
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
SfxAllItemSet aAllSet( GetPool() );
- aAllSet.Put( SfxBoolItem( FN_PARAM_1, FALSE ) );
+ aAllSet.Put( SfxBoolItem( FN_PARAM_1, sal_False ) );
SwViewOption aOpt(*rView.GetWrtShell().GetViewOptions());
String sSymbolFont = aOpt.GetSymbolFont();
@@ -1598,11 +1604,11 @@ void SwAnnotationShell::InsertSymbol(SfxRequest& rReq)
SfxAbstractDialog* pDlg = pFact->CreateSfxDialog( rView.GetWindow(), aAllSet,
rView.GetViewFrame()->GetFrame().GetFrameInterface(), RID_SVXDLG_CHARMAP );
- USHORT nResult = pDlg->Execute();
+ sal_uInt16 nResult = pDlg->Execute();
if( nResult == RET_OK )
{
- SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pCItem, SfxStringItem, SID_CHARMAP, FALSE );
- SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pFontItem, SvxFontItem, SID_ATTR_CHAR_FONT, FALSE );
+ SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pCItem, SfxStringItem, SID_CHARMAP, sal_False );
+ SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pFontItem, SvxFontItem, SID_ATTR_CHAR_FONT, sal_False );
if ( pFontItem )
{
aFont.SetName( pFontItem->GetFamilyName() );
@@ -1627,7 +1633,7 @@ void SwAnnotationShell::InsertSymbol(SfxRequest& rReq)
// nicht flackern
pOLV->HideCursor();
Outliner * pOutliner = pOLV->GetOutliner();
- pOutliner->SetUpdateMode(FALSE);
+ pOutliner->SetUpdateMode(sal_False);
SfxItemSet aOldSet( pOLV->GetAttribs() );
SfxItemSet aFontSet( *aOldSet.GetPool(),
@@ -1646,7 +1652,7 @@ void SwAnnotationShell::InsertSymbol(SfxRequest& rReq)
aFont.GetStyleName(), aFont.GetPitch(),
aFont.GetCharSet(),
EE_CHAR_FONTINFO );
- USHORT nScriptBreak = pBreakIt->GetAllScriptsOfText( sSym );
+ sal_uInt16 nScriptBreak = pBreakIt->GetAllScriptsOfText( sSym );
if( SCRIPTTYPE_LATIN & nScriptBreak )
aSetFont.Put( aFontItem, EE_CHAR_FONTINFO );
if( SCRIPTTYPE_ASIAN & nScriptBreak )
@@ -1665,7 +1671,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 c9c5584c57..05b7fdea6e 100644
--- a/sw/source/ui/shells/basesh.cxx
+++ b/sw/source/ui/shells/basesh.cxx
@@ -27,14 +27,13 @@
// 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>
#include <svl/languageoptions.hxx>
-#ifndef _SVX_SVXIDS_HRC
#include <svx/svxids.hrc>
-#endif
#include <sfx2/linkmgr.hxx>
#include <svx/htmlmode.hxx>
#include <svx/imapdlg.hxx>
@@ -97,15 +96,9 @@
#include <caption.hxx>
#include <swwait.hxx>
#include <cmdid.h>
-#ifndef _GLOBALS_HRC
#include <globals.hrc>
-#endif
-#ifndef _SHELLS_HRC
#include <shells.hrc>
-#endif
-#ifndef _STATSTR_HRC
#include <statstr.hrc>
-#endif
#include <globals.h>
#include <unotxdoc.hxx>
#include <crsskip.hxx>
@@ -120,10 +113,7 @@
#include <instable.hxx>
#include <svx/fmshell.hxx> // for FN_XFORMS_DESIGN_MODE
#include <SwRewriter.hxx>
-#include <undobj.hxx>
-#ifndef _COMCORE_HRC
#include <comcore.hrc>
-#endif
#include <unomid.h>
@@ -132,16 +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;
+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
@@ -191,9 +181,9 @@ void lcl_UpdateIMapDlg( SwWrtShell& rSh )
SvxIMapDlgChildWindow::UpdateIMapDlg(
aGrf, rURL.GetMap(), pList, pEditObj );
- USHORT nCount = (USHORT)pList->Count();
+ sal_uInt16 nCount = (sal_uInt16)pList->Count();
if(nCount)
- for( USHORT i = nCount; i; i-- )
+ for( sal_uInt16 i = nCount; i; i-- )
{
delete pList->GetObject(i-1);
}
@@ -201,11 +191,11 @@ void lcl_UpdateIMapDlg( SwWrtShell& rSh )
}
-BOOL lcl_UpdateContourDlg( SwWrtShell &rSh, int nSel )
+sal_Bool lcl_UpdateContourDlg( SwWrtShell &rSh, int nSel )
{
Graphic aGraf( rSh.GetIMapGraphic() );
GraphicType nGrfType = aGraf.GetType();
- BOOL bRet = GRAPHIC_NONE != nGrfType && GRAPHIC_DEFAULT != nGrfType;
+ sal_Bool bRet = GRAPHIC_NONE != nGrfType && GRAPHIC_DEFAULT != nGrfType;
if( bRet )
{
String aGrfName;
@@ -238,12 +228,12 @@ void SwBaseShell::ExecDelete(SfxRequest &rReq)
if( rSh.IsNoNum() )
{
rSh.SttCrsrMove();
- BOOL bLeft = rSh.Left( CRSR_SKIP_CHARS, TRUE, 1, FALSE );
+ sal_Bool bLeft = rSh.Left( CRSR_SKIP_CHARS, sal_True, 1, sal_False );
if( bLeft )
{
// JP 28.03.96: ein Backspace im Absatz ohne Nummer wird zum Delete
//rSh.SwapPam();
- //rSh.DelRight( FALSE );
+ //rSh.DelRight( sal_False );
rSh.DelLeft();
}
@@ -282,7 +272,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 )
{
@@ -298,8 +288,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 );
}
@@ -333,7 +323,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(
@@ -405,7 +395,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 );
@@ -446,9 +436,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)
{
@@ -502,10 +492,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!
@@ -543,42 +533,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 );
@@ -589,7 +585,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 );
@@ -612,9 +608,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:
@@ -631,12 +627,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();
}
@@ -644,7 +640,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;
@@ -656,7 +652,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();
@@ -668,7 +664,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()));
@@ -699,7 +695,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);
@@ -718,15 +714,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())
{
@@ -739,14 +735,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() );
@@ -794,19 +790,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);
@@ -817,7 +813,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:
@@ -833,7 +829,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
@@ -841,14 +837,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 )
@@ -860,19 +856,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;
}
@@ -896,7 +892,7 @@ void SwBaseShell::Execute(SfxRequest &rReq)
{
//Shellwechsel!
SwView& rSaveView = rView;
- BOOL bInserted = FALSE;
+ sal_Bool bInserted = sal_False;
//recording:
SfxViewFrame* pViewFrame = GetView().GetViewFrame();
@@ -947,8 +943,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);
@@ -965,7 +961,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 );
@@ -994,7 +990,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 );
@@ -1024,7 +1020,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 );
@@ -1085,7 +1081,7 @@ void SwBaseShell::Execute(SfxRequest &rReq)
if (bDoMathBaselineAlignment)
rSh.AlignFormulaToBaseline( xObj );
- USHORT nHtmlMode = ::GetHtmlMode(GetView().GetDocShell());
+ sal_uInt16 nHtmlMode = ::GetHtmlMode(GetView().GetDocShell());
if( nHtmlMode )
{
SfxItemSet aSet(GetPool(), RES_SURROUND, RES_HORI_ORIENT);
@@ -1167,10 +1163,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();
}
}
@@ -1178,11 +1174,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
@@ -1200,12 +1196,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)
{
@@ -1228,7 +1224,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();
}
@@ -1260,7 +1256,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();
}
@@ -1284,25 +1280,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;
@@ -1313,14 +1309,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;
@@ -1328,7 +1324,7 @@ IMPL_LINK(SwBaseShell, GraphicArrivedHdl, SwCrsrShell* , EMPTYARG )
rSh.GetIMapInventor() )
lcl_UpdateContourDlg( rSh, nsSelectionType::SEL_GRF );
- bSetState = TRUE;
+ bSetState = sal_True;
bState = 0 != pDlg;
}
break;
@@ -1339,7 +1335,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;
@@ -1379,7 +1375,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 )
{
@@ -1393,7 +1389,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() )
@@ -1407,7 +1403,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 );
@@ -1415,7 +1411,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 );
@@ -1423,7 +1419,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 );
@@ -1438,11 +1434,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
@@ -1461,17 +1457,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#
@@ -1480,10 +1476,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
{
@@ -1509,17 +1505,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
{
@@ -1538,21 +1534,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.
@@ -1560,12 +1556,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 )
@@ -1591,16 +1587,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));
}
@@ -1613,8 +1609,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()))
{
@@ -1624,7 +1620,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) &&
@@ -1637,7 +1633,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() ) )
@@ -1647,7 +1643,7 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
}
else
{
- USHORT nSlotId = 0;
+ sal_uInt16 nSlotId = 0;
switch (eSet)
{
@@ -1686,8 +1682,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()))
{
@@ -1706,9 +1702,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);
@@ -1758,10 +1754,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() )
{
@@ -1771,7 +1767,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:
@@ -1829,7 +1825,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)
{
@@ -1845,7 +1841,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 ||
@@ -1856,7 +1852,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 );
@@ -1872,10 +1868,10 @@ void SwBaseShell::StateStyle( SfxItemSet &rSet )
--------------------------------------------------------------------*/
-void SwBaseShell::SetWrapMode( USHORT nSlot )
+void SwBaseShell::SetWrapMode( sal_uInt16 nSlot )
{
SwWrtShell &rSh = GetShell();
- BOOL bObj = 0 != rSh.IsObjSelected();
+ sal_Bool bObj = 0 != rSh.IsObjSelected();
if( bObj || rSh.IsFrmSelected())
{
SfxItemSet aSet(GetPool(), RES_OPAQUE, RES_SURROUND);
@@ -1892,7 +1888,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;
@@ -1916,7 +1912,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;
@@ -1941,7 +1937,7 @@ void SwBaseShell::SetWrapMode( USHORT nSlot )
if (bObj && nOldSurround != nSurround &&
(nOldSurround == SURROUND_NONE || nOldSurround == SURROUND_THROUGHT))
{
- aWrap.SetContour(TRUE);
+ aWrap.SetContour(sal_True);
}
}
@@ -1979,7 +1975,7 @@ void SwBaseShell::SetFrmMode(FlyMode eMode, SwWrtShell *pSh )
}
else if( eMode == FLY_DRAG_END )
{
- static USHORT __READONLY_DATA aInval[] =
+ static sal_uInt16 __READONLY_DATA aInval[] =
{
SID_ATTR_POSITION, SID_ATTR_SIZE, 0
};
@@ -2026,10 +2022,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,
@@ -2071,7 +2067,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,
@@ -2108,9 +2104,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;
}
}
@@ -2139,7 +2135,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();
}
@@ -2156,11 +2152,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 )
@@ -2193,7 +2189,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 );
@@ -2212,7 +2208,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 |
@@ -2225,7 +2221,7 @@ void SwBaseShell::GetTxtFontCtrlState( SfxItemSet& rSet )
if( bFirst )
{
rSh.GetCurAttr( rSet );
- bFirst = FALSE;
+ bFirst = sal_False;
}
}
nWhich = aIter.NextWhich();
@@ -2241,7 +2237,7 @@ void SwBaseShell::GetBckColState(SfxItemSet &rSet)
{
SwWrtShell &rSh = GetShell();
SfxWhichIter aIter( rSet );
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
int nSelType = rSh.GetSelectionType();
// if ( nSelType & nsSelectionType::SEL_GRF ||
@@ -2253,7 +2249,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 );
@@ -2308,7 +2304,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 ;
@@ -2328,7 +2324,7 @@ void SwBaseShell::ExecBckCol(SfxRequest& rReq)
aBrushItem = (const SvxBrushItem&)aCoreSet.Get(RES_BACKGROUND);
}
-// BOOL bMsgOk = FALSE;
+// sal_Bool bMsgOk = sal_False;
switch (nSlot)
{
@@ -2364,7 +2360,7 @@ void SwBaseShell::ExecBckCol(SfxRequest& rReq)
}
break;
default:
-// bMsgOk = FALSE;
+// bMsgOk = sal_False;
rReq.Ignore();
DBG_ERROR( "Unbekannte Message bei ExecuteAttr!" );
return;
@@ -2411,8 +2407,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(),
@@ -2425,9 +2421,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
@@ -2448,15 +2444,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 )
{
@@ -2465,7 +2461,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
@@ -2504,7 +2500,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();
@@ -2641,11 +2637,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() )
@@ -2654,9 +2650,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);
@@ -2664,8 +2660,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;
@@ -2691,7 +2687,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 )
{
@@ -2703,7 +2699,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();
@@ -2738,7 +2734,7 @@ void SwBaseShell::InsertTable( SfxRequest& _rRequest )
_rRequest.Done();
rSh.StartUndo(UNDO_INSTABLE);
- bCallEndUndo = TRUE;
+ bCallEndUndo = sal_True;
rSh.StartAllAction();
if( rSh.HasSelection() )
@@ -2778,7 +2774,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:
@@ -2789,11 +2785,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) )
@@ -2833,7 +2829,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() );
@@ -2860,7 +2856,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:
@@ -2869,7 +2865,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));
@@ -2890,7 +2886,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 );
@@ -2917,7 +2913,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:
@@ -2932,7 +2928,7 @@ void SwBaseShell::ExecField( SfxRequest& rReq )
}
break;
default:
- ASSERT(FALSE, falscher Dispatcher);
+ ASSERT(sal_False, falscher Dispatcher);
}
}
diff --git a/sw/source/ui/shells/beziersh.cxx b/sw/source/ui/shells/beziersh.cxx
index b227f3df14..7f419d96bd 100644
--- a/sw/source/ui/shells/beziersh.cxx
+++ b/sw/source/ui/shells/beziersh.cxx
@@ -89,12 +89,12 @@ void SwBezierShell::Execute(SfxRequest &rReq)
SwWrtShell *pSh = &GetShell();
SdrView* pSdrView = pSh->GetDrawView();
const SfxItemSet *pArgs = rReq.GetArgs();
- USHORT nSlotId = rReq.GetSlot();
- BOOL bChanged = pSdrView->GetModel()->IsChanged();
- pSdrView->GetModel()->SetChanged(FALSE);
+ sal_uInt16 nSlotId = rReq.GetSlot();
+ sal_Bool bChanged = pSdrView->GetModel()->IsChanged();
+ pSdrView->GetModel()->SetChanged(sal_False);
const SfxPoolItem* pItem;
if(pArgs)
- pArgs->GetItemState(nSlotId, FALSE, &pItem);
+ pArgs->GetItemState(nSlotId, sal_False, &pItem);
switch (nSlotId)
{
@@ -103,7 +103,7 @@ void SwBezierShell::Execute(SfxRequest &rReq)
if (pSh->IsObjSelected())
{
if (pSdrView->HasMarkedPoints())
- pSh->GetView().GetViewFrame()->GetDispatcher()->Execute(SID_BEZIER_DELETE, FALSE);
+ pSh->GetView().GetViewFrame()->GetDispatcher()->Execute(SID_BEZIER_DELETE, sal_False);
else
{
pSh->DelSelectedObj();
@@ -140,7 +140,7 @@ void SwBezierShell::Execute(SfxRequest &rReq)
case SID_BEZIER_INSERT:
{
GetView().GetEditWin().SetBezierMode(nSlotId);
- static USHORT __READONLY_DATA aInva[] =
+ static sal_uInt16 __READONLY_DATA aInva[] =
{
SID_BEZIER_INSERT,
SID_BEZIER_MOVE,
@@ -200,7 +200,7 @@ void SwBezierShell::Execute(SfxRequest &rReq)
{
pSdrView->SetMarkedPointsSmooth(eKind);
- static USHORT __READONLY_DATA aInva[] =
+ static sal_uInt16 __READONLY_DATA aInva[] =
{
SID_BEZIER_SMOOTH,
SID_BEZIER_EDGE,
@@ -236,7 +236,7 @@ void SwBezierShell::Execute(SfxRequest &rReq)
if (pSdrView->GetModel()->IsChanged())
GetShell().SetModified();
else if (bChanged)
- pSdrView->GetModel()->SetChanged(TRUE);
+ pSdrView->GetModel()->SetChanged(sal_True);
}
/*--------------------------------------------------------------------
@@ -249,7 +249,7 @@ void SwBezierShell::GetState(SfxItemSet &rSet)
SdrView* pSdrView = GetShell().GetDrawView();
SfxWhichIter aIter( rSet );
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while( nWhich )
{
@@ -258,7 +258,7 @@ void SwBezierShell::GetState(SfxItemSet &rSet)
case SID_BEZIER_MOVE:
case SID_BEZIER_INSERT:
{
- USHORT nEditMode = GetView().GetEditWin().GetBezierMode();
+ sal_uInt16 nEditMode = GetView().GetEditWin().GetBezierMode();
rSet.Put(SfxBoolItem(nWhich, nEditMode == nWhich));
}
@@ -289,8 +289,8 @@ void SwBezierShell::GetState(SfxItemSet &rSet)
switch (eSegm)
{
case SDRPATHSEGMENT_DONTCARE: rSet.InvalidateItem(SID_BEZIER_CONVERT); break;
- case SDRPATHSEGMENT_LINE : rSet.Put(SfxBoolItem(SID_BEZIER_CONVERT,FALSE)); break; // Button reingedrueckt = Kurve
- case SDRPATHSEGMENT_CURVE : rSet.Put(SfxBoolItem(SID_BEZIER_CONVERT,TRUE)); break;
+ case SDRPATHSEGMENT_LINE : rSet.Put(SfxBoolItem(SID_BEZIER_CONVERT,sal_False)); break; // Button reingedrueckt = Kurve
+ case SDRPATHSEGMENT_CURVE : rSet.Put(SfxBoolItem(SID_BEZIER_CONVERT,sal_True)); break;
default:; //prevent warning
}
}
@@ -304,7 +304,7 @@ void SwBezierShell::GetState(SfxItemSet &rSet)
else
{
SdrPathSmoothKind eSmooth = pSdrView->GetMarkedPointsSmooth();
- BOOL bEnable = FALSE;
+ sal_Bool bEnable = sal_False;
switch (eSmooth)
{
case SDRPATHSMOOTH_DONTCARE :
@@ -334,8 +334,8 @@ void SwBezierShell::GetState(SfxItemSet &rSet)
switch (eClose)
{
case SDROBJCLOSED_DONTCARE: rSet.InvalidateItem(SID_BEZIER_CLOSE); break;
- case SDROBJCLOSED_OPEN : rSet.Put(SfxBoolItem(SID_BEZIER_CLOSE,FALSE)); break;
- case SDROBJCLOSED_CLOSED : rSet.Put(SfxBoolItem(SID_BEZIER_CLOSE,TRUE)); break;
+ case SDROBJCLOSED_OPEN : rSet.Put(SfxBoolItem(SID_BEZIER_CLOSE,sal_False)); break;
+ case SDROBJCLOSED_CLOSED : rSet.Put(SfxBoolItem(SID_BEZIER_CLOSE,sal_True)); break;
default:; //prevent warning
}
}
diff --git a/sw/source/ui/shells/drawdlg.cxx b/sw/source/ui/shells/drawdlg.cxx
index fad82ace6f..a9088e991c 100644
--- a/sw/source/ui/shells/drawdlg.cxx
+++ b/sw/source/ui/shells/drawdlg.cxx
@@ -65,8 +65,8 @@ void SwDrawShell::ExecDrawDlg(SfxRequest& rReq)
SwWrtShell* pSh = &GetShell();
SdrView* pView = pSh->GetDrawView();
SdrModel* pDoc = pView->GetModel();
- BOOL bChanged = pDoc->IsChanged();
- pDoc->SetChanged(FALSE);
+ sal_Bool bChanged = pDoc->IsChanged();
+ pDoc->SetChanged(sal_False);
SfxItemSet aNewAttr( pDoc->GetItemPool() );
pView->GetAttributes( aNewAttr );
@@ -81,7 +81,7 @@ void SwDrawShell::ExecDrawDlg(SfxRequest& rReq)
if ( pFact )
{
SfxAbstractTabDialog *pDlg = pFact->CreateTextTabDialog( NULL, &aNewAttr, pView );
- USHORT nResult = pDlg->Execute();
+ sal_uInt16 nResult = pDlg->Execute();
if (nResult == RET_OK)
{
@@ -101,7 +101,7 @@ void SwDrawShell::ExecDrawDlg(SfxRequest& rReq)
case SID_ATTRIBUTES_AREA:
{
- BOOL bHasMarked = pView->AreObjectsMarked();
+ sal_Bool bHasMarked = pView->AreObjectsMarked();
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
DBG_ASSERT(pFact, "Dialogdiet Factory fail!");
@@ -120,10 +120,10 @@ void SwDrawShell::ExecDrawDlg(SfxRequest& rReq)
if (bHasMarked)
pView->SetAttributes(*pDlg->GetOutputItemSet());
else
- pView->SetDefaultAttr(*pDlg->GetOutputItemSet(), FALSE);
+ pView->SetDefaultAttr(*pDlg->GetOutputItemSet(), sal_False);
pSh->EndAction();
- static USHORT __READONLY_DATA aInval[] =
+ static sal_uInt16 __READONLY_DATA aInval[] =
{
SID_ATTR_FILL_STYLE, SID_ATTR_FILL_COLOR, 0
};
@@ -138,7 +138,7 @@ void SwDrawShell::ExecDrawDlg(SfxRequest& rReq)
case SID_ATTRIBUTES_LINE:
{
- BOOL bHasMarked = pView->AreObjectsMarked();
+ sal_Bool bHasMarked = pView->AreObjectsMarked();
const SdrObject* pObj = NULL;
const SdrMarkList& rMarkList = pView->GetMarkedObjectList();
@@ -157,12 +157,12 @@ void SwDrawShell::ExecDrawDlg(SfxRequest& rReq)
{
pSh->StartAction();
if(bHasMarked)
- pView->SetAttrToMarked(*pDlg->GetOutputItemSet(), FALSE);
+ pView->SetAttrToMarked(*pDlg->GetOutputItemSet(), sal_False);
else
- pView->SetDefaultAttr(*pDlg->GetOutputItemSet(), FALSE);
+ pView->SetDefaultAttr(*pDlg->GetOutputItemSet(), sal_False);
pSh->EndAction();
- static USHORT __READONLY_DATA aInval[] =
+ static sal_uInt16 __READONLY_DATA aInval[] =
{
SID_ATTR_LINE_STYLE, SID_ATTR_LINE_WIDTH,
SID_ATTR_LINE_COLOR, 0
@@ -183,7 +183,7 @@ void SwDrawShell::ExecDrawDlg(SfxRequest& rReq)
GetShell().SetModified();
else
if (bChanged)
- pDoc->SetChanged(TRUE);
+ pDoc->SetChanged(sal_True);
}
/*--------------------------------------------------------------------
@@ -196,17 +196,17 @@ void SwDrawShell::ExecDrawAttrArgs(SfxRequest& rReq)
SwWrtShell* pSh = &GetShell();
SdrView* pView = pSh->GetDrawView();
const SfxItemSet* pArgs = rReq.GetArgs();
- BOOL bChanged = pView->GetModel()->IsChanged();
- pView->GetModel()->SetChanged(FALSE);
+ sal_Bool bChanged = pView->GetModel()->IsChanged();
+ pView->GetModel()->SetChanged(sal_False);
GetView().NoRotate();
if (pArgs)
{
if(pView->AreObjectsMarked())
- pView->SetAttrToMarked(*rReq.GetArgs(), FALSE);
+ pView->SetAttrToMarked(*rReq.GetArgs(), sal_False);
else
- pView->SetDefaultAttr(*rReq.GetArgs(), FALSE);
+ pView->SetDefaultAttr(*rReq.GetArgs(), sal_False);
}
else
{
@@ -218,13 +218,13 @@ void SwDrawShell::ExecDrawAttrArgs(SfxRequest& rReq)
case SID_ATTR_FILL_GRADIENT:
case SID_ATTR_FILL_HATCH:
case SID_ATTR_FILL_BITMAP:
- pDis->Execute(SID_ATTRIBUTES_AREA, FALSE);
+ pDis->Execute(SID_ATTRIBUTES_AREA, sal_False);
break;
case SID_ATTR_LINE_STYLE:
case SID_ATTR_LINE_DASH:
case SID_ATTR_LINE_WIDTH:
case SID_ATTR_LINE_COLOR:
- pDis->Execute(SID_ATTRIBUTES_LINE, FALSE);
+ pDis->Execute(SID_ATTRIBUTES_LINE, sal_False);
break;
}
}
@@ -232,7 +232,7 @@ void SwDrawShell::ExecDrawAttrArgs(SfxRequest& rReq)
GetShell().SetModified();
else
if (bChanged)
- pView->GetModel()->SetChanged(TRUE);
+ pView->GetModel()->SetChanged(sal_True);
}
/*--------------------------------------------------------------------
@@ -246,7 +246,7 @@ void SwDrawShell::GetDrawAttrState(SfxItemSet& rSet)
if (pSdrView->AreObjectsMarked())
{
- BOOL bDisable = Disable( rSet );
+ sal_Bool bDisable = Disable( rSet );
if( !bDisable )
pSdrView->GetAttributes( rSet );
diff --git a/sw/source/ui/shells/drawsh.cxx b/sw/source/ui/shells/drawsh.cxx
index c29b296ad0..0560b011fc 100644
--- a/sw/source/ui/shells/drawsh.cxx
+++ b/sw/source/ui/shells/drawsh.cxx
@@ -94,16 +94,16 @@ void SwDrawShell::Execute(SfxRequest &rReq)
SdrView *pSdrView = rSh.GetDrawView();
const SfxItemSet *pArgs = rReq.GetArgs();
SfxBindings &rBnd = GetView().GetViewFrame()->GetBindings();
- USHORT nSlotId = rReq.GetSlot();
- BOOL bChanged = pSdrView->GetModel()->IsChanged();
+ sal_uInt16 nSlotId = rReq.GetSlot();
+ sal_Bool bChanged = pSdrView->GetModel()->IsChanged();
- pSdrView->GetModel()->SetChanged(FALSE);
+ pSdrView->GetModel()->SetChanged(sal_False);
const SfxPoolItem* pItem;
if(pArgs)
- pArgs->GetItemState(nSlotId, FALSE, &pItem);
+ pArgs->GetItemState(nSlotId, sal_False, &pItem);
- BOOL bMirror = TRUE;
+ sal_Bool bMirror = sal_True;
switch (nSlotId)
{
@@ -173,7 +173,7 @@ void SwDrawShell::Execute(SfxRequest &rReq)
break;
case FN_FLIP_HORZ_GRAFIC:
- bMirror = FALSE;
+ bMirror = sal_False;
/* no break */
case FN_FLIP_VERT_GRAFIC:
rSh.MirrorSelection( bMirror );
@@ -182,7 +182,7 @@ void SwDrawShell::Execute(SfxRequest &rReq)
case SID_FONTWORK:
{
FieldUnit eMetric = ::GetDfltMetric(0 != PTR_CAST(SwWebView, &rSh.GetView()));
- SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< UINT16 >(eMetric)) );
+ SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric)) );
SfxViewFrame* pVFrame = GetView().GetViewFrame();
if (pArgs)
{
@@ -239,7 +239,7 @@ void SwDrawShell::Execute(SfxRequest &rReq)
SwDocStat aCurr;
SwDocStat aDocStat( rSh.getIDocumentStatistics()->GetDocStat() );
{
- SwWait aWait( *GetView().GetDocShell(), TRUE );
+ SwWait aWait( *GetView().GetDocShell(), sal_True );
rSh.StartAction();
rSh.CountWords( aCurr );
rSh.UpdateDocStat( aDocStat );
@@ -295,7 +295,7 @@ void SwDrawShell::Execute(SfxRequest &rReq)
if (pSdrView->GetModel()->IsChanged())
rSh.SetModified();
else if (bChanged)
- pSdrView->GetModel()->SetChanged(TRUE);
+ pSdrView->GetModel()->SetChanged(sal_True);
}
/*--------------------------------------------------------------------
@@ -309,8 +309,8 @@ void SwDrawShell::GetState(SfxItemSet& rSet)
SwWrtShell &rSh = GetShell();
SdrView* pSdrView = rSh.GetDrawViewWithValidMarkList();
SfxWhichIter aIter( rSet );
- USHORT nWhich = aIter.FirstWhich();
- BOOL bProtected = rSh.IsSelObjProtected(FLYPROTECT_CONTENT);
+ sal_uInt16 nWhich = aIter.FirstWhich();
+ sal_Bool bProtected = rSh.IsSelObjProtected(FLYPROTECT_CONTENT);
if (!bProtected) // Im Parent nachsehen
bProtected |= rSh.IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT ) != 0;
@@ -336,7 +336,7 @@ void SwDrawShell::GetState(SfxItemSet& rSet)
case SID_OBJECT_ROTATE:
{
- const BOOL bIsRotate = GetView().IsDrawRotate();
+ const sal_Bool bIsRotate = GetView().IsDrawRotate();
if ( (!bIsRotate && !pSdrView->IsRotateAllowed()) || bProtected )
rSet.DisableItem( nWhich );
else
@@ -365,7 +365,7 @@ void SwDrawShell::GetState(SfxItemSet& rSet)
rSet.DisableItem( nWhich );
else
{
- const USHORT nId = SvxFontWorkChildWindow::GetChildWindowId();
+ const sal_uInt16 nId = SvxFontWorkChildWindow::GetChildWindowId();
rSet.Put(SfxBoolItem( nWhich , GetView().GetViewFrame()->HasChildWindow(nId)));
}
}
@@ -402,8 +402,8 @@ void SwDrawShell::ExecFormText(SfxRequest& rReq)
{
SwWrtShell &rSh = GetShell();
SdrView* pDrView = rSh.GetDrawView();
- BOOL bChanged = pDrView->GetModel()->IsChanged();
- pDrView->GetModel()->SetChanged(FALSE);
+ sal_Bool bChanged = pDrView->GetModel()->IsChanged();
+ pDrView->GetModel()->SetChanged(sal_False);
const SdrMarkList& rMarkList = pDrView->GetMarkedObjectList();
@@ -414,16 +414,16 @@ void SwDrawShell::ExecFormText(SfxRequest& rReq)
if ( pDrView->IsTextEdit() )
{
- pDrView->SdrEndTextEdit( TRUE );
+ pDrView->SdrEndTextEdit( sal_True );
GetView().AttrChangedNotify(&rSh);
}
- if ( rSet.GetItemState(XATTR_FORMTXTSTDFORM, TRUE, &pItem) ==
+ if ( rSet.GetItemState(XATTR_FORMTXTSTDFORM, sal_True, &pItem) ==
SFX_ITEM_SET &&
((const XFormTextStdFormItem*) pItem)->GetValue() != XFTFORM_NONE )
{
- const USHORT nId = SvxFontWorkChildWindow::GetChildWindowId();
+ const sal_uInt16 nId = SvxFontWorkChildWindow::GetChildWindowId();
SvxFontWorkDialog* pDlg = (SvxFontWorkDialog*)(GetView().GetViewFrame()->
GetChildWindow(nId)->GetWindow());
@@ -441,7 +441,7 @@ void SwDrawShell::ExecFormText(SfxRequest& rReq)
rSh.SetModified();
else
if (bChanged)
- pDrView->GetModel()->SetChanged(TRUE);
+ pDrView->GetModel()->SetChanged(sal_True);
}
/*************************************************************************
@@ -460,7 +460,7 @@ void SwDrawShell::GetFormTextState(SfxItemSet& rSet)
const SdrObject* pObj = NULL;
SvxFontWorkDialog* pDlg = NULL;
- const USHORT nId = SvxFontWorkChildWindow::GetChildWindowId();
+ const sal_uInt16 nId = SvxFontWorkChildWindow::GetChildWindowId();
SfxViewFrame* pVFrame = GetView().GetViewFrame();
if ( pVFrame->HasChildWindow(nId) )
@@ -473,14 +473,14 @@ void SwDrawShell::GetFormTextState(SfxItemSet& rSet)
!((SdrTextObj*) pObj)->HasText() )
{
#define XATTR_ANZ 12
- static const USHORT nXAttr[ XATTR_ANZ ] =
+ static const sal_uInt16 nXAttr[ XATTR_ANZ ] =
{
XATTR_FORMTXTSTYLE, XATTR_FORMTXTADJUST, XATTR_FORMTXTDISTANCE,
XATTR_FORMTXTSTART, XATTR_FORMTXTMIRROR, XATTR_FORMTXTSTDFORM,
XATTR_FORMTXTHIDEFORM, XATTR_FORMTXTOUTLINE, XATTR_FORMTXTSHADOW,
XATTR_FORMTXTSHDWCOLOR, XATTR_FORMTXTSHDWXVAL, XATTR_FORMTXTSHDWYVAL
};
- for( USHORT i = 0; i < XATTR_ANZ; )
+ for( sal_uInt16 i = 0; i < XATTR_ANZ; )
rSet.DisableItem( nXAttr[ i++ ] );
}
else
diff --git a/sw/source/ui/shells/drwbassh.cxx b/sw/source/ui/shells/drwbassh.cxx
index a99abc9895..43967174d0 100644
--- a/sw/source/ui/shells/drwbassh.cxx
+++ b/sw/source/ui/shells/drwbassh.cxx
@@ -93,14 +93,14 @@ TYPEINIT1(SwDrawBaseShell,SwBaseShell)
SwDrawBaseShell::SwDrawBaseShell(SwView &_rView):
SwBaseShell( _rView )
{
- GetShell().NoEdit(TRUE);
+ GetShell().NoEdit(sal_True);
SwEditWin& rWin = GetView().GetEditWin();
rWin.SetBezierMode(SID_BEZIER_MOVE);
if ( !_rView.GetDrawFuncPtr() )
- _rView.GetEditWin().StdDrawMode( OBJ_NONE, TRUE );
+ _rView.GetEditWin().StdDrawMode( OBJ_NONE, sal_True );
SwTransferable::CreateSelection( GetShell() );
}
@@ -127,12 +127,12 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
SwWrtShell *pSh = &GetShell();
SdrView* pSdrView = pSh->GetDrawView();
const SfxItemSet *pArgs = rReq.GetArgs();
- USHORT nSlotId = rReq.GetSlot();
- BOOL bChanged = pSdrView->GetModel()->IsChanged();
- pSdrView->GetModel()->SetChanged(FALSE);
+ sal_uInt16 nSlotId = rReq.GetSlot();
+ sal_Bool bChanged = pSdrView->GetModel()->IsChanged();
+ pSdrView->GetModel()->SetChanged(sal_False);
const SfxPoolItem* pItem = 0;
if(pArgs)
- pArgs->GetItemState(nSlotId, FALSE, &pItem);
+ pArgs->GetItemState(nSlotId, sal_False, &pItem);
//Sonderfall Align per Menue
if(pItem && nSlotId == SID_OBJECT_ALIGN)
@@ -142,11 +142,11 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
nSlotId++;
}
- BOOL bAlignPossible = pSh->IsAlignPossible();
+ sal_Bool bAlignPossible = pSh->IsAlignPossible();
- BOOL bTopParam = TRUE, bBottomParam = TRUE;
- BOOL bNotify = FALSE;
- BOOL bDone = FALSE;
+ sal_Bool bTopParam = sal_True, bBottomParam = sal_True;
+ sal_Bool bNotify = sal_False;
+ sal_Bool bDone = sal_False;
SfxBindings& rBind = GetView().GetViewFrame()->GetBindings();
switch (nSlotId)
@@ -176,14 +176,14 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!");
- SfxAbstractDialog* pDlg = pFact->CreateSwWrapDlg( GetView().GetWindow(), aSet, pSh, TRUE, RC_DLG_SWWRAPDLG );
+ SfxAbstractDialog* pDlg = pFact->CreateSwWrapDlg( GetView().GetWindow(), aSet, pSh, sal_True, RC_DLG_SWWRAPDLG );
DBG_ASSERT(pDlg, "Dialogdiet fail!");
if (pDlg->Execute() == RET_OK)
{
const SfxPoolItem* pWrapItem;
const SfxItemSet* pOutSet = pDlg->GetOutputItemSet();
- if(SFX_ITEM_SET == pOutSet->GetItemState(FN_DRAW_WRAP_DLG, FALSE, &pWrapItem))
+ if(SFX_ITEM_SET == pOutSet->GetItemState(FN_DRAW_WRAP_DLG, sal_False, &pWrapItem))
{
short nLayer = ((const SfxInt16Item*)pWrapItem)->GetValue();
if (nLayer == 1)
@@ -212,12 +212,12 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
{
SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
SfxAbstractTabDialog *pDlg=NULL;
- BOOL bCaption = FALSE;
+ sal_Bool bCaption = sal_False;
// Erlaubte Verankerungen:
short nAnchor = pSh->GetAnchorId();
- USHORT nAllowedAnchors = SVX_OBJ_AT_CNTNT|SVX_OBJ_IN_CNTNT;
- USHORT nHtmlMode = ::GetHtmlMode(pSh->GetView().GetDocShell());
+ sal_uInt16 nAllowedAnchors = SVX_OBJ_AT_CNTNT|SVX_OBJ_IN_CNTNT;
+ sal_uInt16 nHtmlMode = ::GetHtmlMode(pSh->GetView().GetDocShell());
if( !((HTMLMODE_ON & nHtmlMode) && (0 == (nHtmlMode & HTMLMODE_SOME_ABS_POS))) )
nAllowedAnchors |= SVX_OBJ_PAGE;
@@ -225,7 +225,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
nAllowedAnchors |= SVX_OBJ_AT_FLY;
if (pObj->GetObjIdentifier() == OBJ_CAPTION )
- bCaption = TRUE;
+ bCaption = sal_True;
if (bCaption)
{
@@ -254,19 +254,19 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
}
SfxItemSet aNewAttr(pSdrView->GetGeoAttrFromMarked());
- const USHORT* pRange = pDlg->GetInputRanges( *aNewAttr.GetPool() );
+ const sal_uInt16* pRange = pDlg->GetInputRanges( *aNewAttr.GetPool() );
SfxItemSet aSet( *aNewAttr.GetPool(), pRange );
FieldUnit eMetric = ::GetDfltMetric(0 != dynamic_cast<SwWebView*>(&GetView()));
- SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< UINT16 >(eMetric)) );
+ SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric)) );
- aSet.Put( aNewAttr, FALSE );
+ aSet.Put( aNewAttr, sal_False );
if (bCaption)
pSdrView->GetAttributes( aSet );
aSet.Put(SfxInt16Item(SID_ATTR_TRANSFORM_ANCHOR, nAnchor));
- BOOL bRTL;
- aSet.Put(SfxBoolItem(SID_ATTR_TRANSFORM_IN_VERTICAL_TEXT, pSh->IsFrmVertical(TRUE, bRTL)));
+ sal_Bool bRTL;
+ aSet.Put(SfxBoolItem(SID_ATTR_TRANSFORM_IN_VERTICAL_TEXT, pSh->IsFrmVertical(sal_True, bRTL)));
aSet.Put(SfxBoolItem(SID_ATTR_TRANSFORM_IN_RTL_TEXT, bRTL));
SwFrmFmt* pFrmFmt = FindFrmFmt( pObj );
@@ -294,18 +294,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);
@@ -313,11 +313,11 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
const SfxPoolItem* pAnchorItem;
if(SFX_ITEM_SET == pOutSet->GetItemState(
- SID_ATTR_TRANSFORM_ANCHOR, FALSE, &pAnchorItem))
+ SID_ATTR_TRANSFORM_ANCHOR, sal_False, &pAnchorItem))
{
if(!bSingleSelection)
pSh->ChgAnchor(((const SfxInt16Item*)pAnchorItem)
- ->GetValue(), FALSE, bPosCorr );
+ ->GetValue(), sal_False, bPosCorr );
else
{
SwFmtAnchor aAnchor(pFrmFmt->GetAnchor());
@@ -329,10 +329,10 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
const SfxPoolItem* pHoriRelation = 0;
const SfxPoolItem* pHoriPosition = 0;
const SfxPoolItem* pHoriMirror = 0;
- pOutSet->GetItemState(SID_ATTR_TRANSFORM_HORI_ORIENT, FALSE, &pHoriOrient);
- pOutSet->GetItemState(SID_ATTR_TRANSFORM_HORI_RELATION, FALSE, &pHoriRelation);
- pOutSet->GetItemState(SID_ATTR_TRANSFORM_HORI_POSITION, FALSE, &pHoriPosition);
- pOutSet->GetItemState(SID_ATTR_TRANSFORM_HORI_MIRROR, FALSE, &pHoriMirror);
+ pOutSet->GetItemState(SID_ATTR_TRANSFORM_HORI_ORIENT, sal_False, &pHoriOrient);
+ pOutSet->GetItemState(SID_ATTR_TRANSFORM_HORI_RELATION, sal_False, &pHoriRelation);
+ pOutSet->GetItemState(SID_ATTR_TRANSFORM_HORI_POSITION, sal_False, &pHoriPosition);
+ pOutSet->GetItemState(SID_ATTR_TRANSFORM_HORI_MIRROR, sal_False, &pHoriMirror);
if(pHoriOrient || pHoriRelation || pHoriPosition || pHoriMirror)
{
if(pHoriOrient)
@@ -351,9 +351,9 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
const SfxPoolItem* pVertOrient = 0;
const SfxPoolItem* pVertRelation = 0;
const SfxPoolItem* pVertPosition = 0;
- pOutSet->GetItemState(SID_ATTR_TRANSFORM_VERT_ORIENT, FALSE, &pVertOrient);
- pOutSet->GetItemState(SID_ATTR_TRANSFORM_VERT_RELATION, FALSE, &pVertRelation);
- pOutSet->GetItemState(SID_ATTR_TRANSFORM_VERT_POSITION, FALSE, &pVertPosition);
+ pOutSet->GetItemState(SID_ATTR_TRANSFORM_VERT_ORIENT, sal_False, &pVertOrient);
+ pOutSet->GetItemState(SID_ATTR_TRANSFORM_VERT_RELATION, sal_False, &pVertRelation);
+ pOutSet->GetItemState(SID_ATTR_TRANSFORM_VERT_POSITION, sal_False, &pVertPosition);
if(pVertOrient || pVertRelation || pVertPosition )
{
if(pVertOrient)
@@ -367,14 +367,14 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
aFrmAttrSet.Put( aVOrient );
}
const SfxPoolItem* pFollowItem = 0;
- pOutSet->GetItemState(RES_FOLLOW_TEXT_FLOW, FALSE, &pFollowItem);
+ pOutSet->GetItemState(RES_FOLLOW_TEXT_FLOW, sal_False, &pFollowItem);
if(pFollowItem)
aFrmAttrSet.Put(*pFollowItem);
if(aFrmAttrSet.Count())
pSh->SetDrawingAttr(aFrmAttrSet);
- rBind.InvalidateAll(FALSE);
+ rBind.InvalidateAll(sal_False);
// --> OD 2004-07-14 #i30451#
pSh->EndUndo( UNDO_INSFMTATTR );
@@ -393,7 +393,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
case FN_BACKSPACE:
if (pSh->IsObjSelected() && !pSdrView->IsTextEdit())
{
- bDone = TRUE;
+ bDone = sal_True;
if( GetView().IsDrawRotate() )
{
@@ -423,7 +423,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
// #105852# FME
// pSh->NoEdit();
}
- bNotify = TRUE;
+ bNotify = sal_True;
}
break;
@@ -447,7 +447,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
if (pSh->IsGroupSelected())
{
pSdrView->EnterMarkedGroup();
- rBind.InvalidateAll(FALSE);
+ rBind.InvalidateAll(sal_False);
}
break;
@@ -473,7 +473,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
if( rMarkList.GetMarkCount() == 1 && bAlignPossible )
{ // Objekte nicht aneinander ausrichten
- USHORT nAnchor = pSh->GetAnchorId();
+ sal_uInt16 nAnchor = pSh->GetAnchorId();
if (nAnchor == FLY_AS_CHAR)
{
sal_Int16 nVertOrient = -1;
@@ -536,14 +536,14 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
break;
case FN_FRAME_UP:
- bTopParam = FALSE;
+ bTopParam = sal_False;
/* no break */
case SID_FRAME_TO_TOP:
pSh->SelectionToTop( bTopParam );
break;
case FN_FRAME_DOWN:
- bBottomParam = FALSE;
+ bBottomParam = sal_False;
/* no break */
case SID_FRAME_TO_BOTTOM:
pSh->SelectionToBottom( bBottomParam );
@@ -551,7 +551,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
case FN_NAME_SHAPE:
{
- bDone = TRUE;
+ bDone = sal_True;
if(1L == pSdrView->GetMarkedObjectCount())
{
@@ -583,7 +583,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
// #i68101#
case FN_TITLE_DESCRIPTION_SHAPE:
{
- bDone = TRUE;
+ bDone = sal_True;
if(1L == pSdrView->GetMarkedObjectCount())
{
@@ -625,7 +625,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
if (pSdrView->GetModel()->IsChanged())
pSh->SetModified();
else if (bChanged)
- pSdrView->GetModel()->SetChanged(TRUE);
+ pSdrView->GetModel()->SetChanged(sal_True);
// 40220: Nach dem Loeschen von DrawObjekten ueber die API GPF durch Selbstzerstoerung
if(bNotify)
GetView().AttrChangedNotify(pSh); // ggf Shellwechsel...
@@ -686,8 +686,8 @@ void SwDrawBaseShell::GetState(SfxItemSet& rSet)
SwWrtShell &rSh = GetShell();
SdrView* pSdrView = rSh.GetDrawViewWithValidMarkList();
SfxWhichIter aIter( rSet );
- USHORT nWhich = aIter.FirstWhich();
- BOOL bProtected = rSh.IsSelObjProtected(FLYPROTECT_CONTENT);
+ sal_uInt16 nWhich = aIter.FirstWhich();
+ sal_Bool bProtected = rSh.IsSelObjProtected(FLYPROTECT_CONTENT);
if (!bProtected) // Im Parent nachsehen
bProtected |= rSh.IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT ) != 0;
@@ -778,9 +778,9 @@ void SwDrawBaseShell::GetState(SfxItemSet& rSet)
--------------------------------------------------------------------*/
-BOOL SwDrawBaseShell::Disable(SfxItemSet& rSet, USHORT nWhich)
+sal_Bool SwDrawBaseShell::Disable(SfxItemSet& rSet, sal_uInt16 nWhich)
{
- BOOL bDisable = GetShell().IsSelObjProtected(FLYPROTECT_CONTENT);
+ sal_Bool bDisable = GetShell().IsSelObjProtected(FLYPROTECT_CONTENT);
if (bDisable)
{
@@ -832,8 +832,8 @@ IMPL_LINK(SwDrawBaseShell, ValidatePosition, SvxSwFrameValidation*, pValidation
pValidation->bFollowTextFlow,
pValidation->bMirror, NULL, &pValidation->aPercentSize);
- BOOL bRTL;
- BOOL bIsInVertical = pSh->IsFrmVertical(TRUE, bRTL);
+ sal_Bool bRTL;
+ sal_Bool bIsInVertical = pSh->IsFrmVertical(sal_True, bRTL);
if(bIsInVertical)
{
Point aPos(aBoundRect.Pos());
diff --git a/sw/source/ui/shells/drwtxtex.cxx b/sw/source/ui/shells/drwtxtex.cxx
index 3004ebd4d4..3296ab56f8 100644
--- a/sw/source/ui/shells/drwtxtex.cxx
+++ b/sw/source/ui/shells/drwtxtex.cxx
@@ -193,7 +193,7 @@ void SwDrawTextShell::Execute( SfxRequest &rReq )
SvxScriptSetItem aSetItem( nSlot, *pPool2 );
// #i78017 establish the same behaviour as in Writer
- USHORT nScriptTypes = SCRIPTTYPE_LATIN | SCRIPTTYPE_ASIAN | SCRIPTTYPE_COMPLEX;
+ sal_uInt16 nScriptTypes = SCRIPTTYPE_LATIN | SCRIPTTYPE_ASIAN | SCRIPTTYPE_COMPLEX;
if (nSlot == SID_ATTR_CHAR_FONT)
nScriptTypes = pOLV->GetSelectedScriptType();
@@ -308,7 +308,7 @@ void SwDrawTextShell::Execute( SfxRequest &rReq )
SwView* pView = &GetView();
FieldUnit eMetric = ::GetDfltMetric(0 != PTR_CAST(SwWebView, pView));
- SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< UINT16 >(eMetric)) );
+ SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric)) );
SfxItemSet aDlgAttr(GetPool(), EE_ITEMS_START, EE_ITEMS_END);
// util::Language gibts an der EditEngine nicht! Daher nicht im Set.
@@ -321,7 +321,7 @@ void SwDrawTextShell::Execute( SfxRequest &rReq )
SfxAbstractTabDialog* pDlg = pFact->CreateSwCharDlg( pView->GetWindow(), *pView, aDlgAttr, DLG_CHAR,0, sal_True );
DBG_ASSERT(pDlg, "Dialogdiet fail!");
- USHORT nRet = pDlg->Execute();
+ sal_uInt16 nRet = pDlg->Execute();
if(RET_OK == nRet )
{
rReq.Done( *( pDlg->GetOutputItemSet() ) );
@@ -380,7 +380,7 @@ void SwDrawTextShell::Execute( SfxRequest &rReq )
SwDocStat aCurr;
SwDocStat aDocStat( rSh.getIDocumentStatistics()->GetDocStat() );
{
- SwWait aWait( *GetView().GetDocShell(), TRUE );
+ SwWait aWait( *GetView().GetDocShell(), sal_True );
rSh.StartAction();
rSh.CountWords( aCurr );
rSh.UpdateDocStat( aDocStat );
@@ -403,7 +403,7 @@ void SwDrawTextShell::Execute( SfxRequest &rReq )
{
SwView* pView = &GetView();
FieldUnit eMetric = ::GetDfltMetric(0 != PTR_CAST(SwWebView, pView));
- SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< UINT16 >(eMetric)) );
+ SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric)) );
SfxItemSet aDlgAttr(GetPool(),
EE_ITEMS_START, EE_ITEMS_END,
SID_ATTR_PARA_HYPHENZONE, SID_ATTR_PARA_HYPHENZONE,
@@ -429,7 +429,7 @@ void SwDrawTextShell::Execute( SfxRequest &rReq )
SfxAbstractTabDialog* pDlg = pFact->CreateSwParaDlg( GetView().GetWindow(), GetView(), aDlgAttr,DLG_STD, DLG_PARA, 0, sal_True );
DBG_ASSERT(pDlg, "Dialogdiet fail!");
- USHORT nRet = pDlg->Execute();
+ sal_uInt16 nRet = pDlg->Execute();
if(RET_OK == nRet)
{
rReq.Done( *( pDlg->GetOutputItemSet() ) );
@@ -523,7 +523,7 @@ void SwDrawTextShell::Execute( SfxRequest &rReq )
sal_Bool bLeftToRight = nSlot == SID_ATTR_PARA_LEFT_TO_RIGHT;
const SfxPoolItem* pPoolItem;
- if( pNewAttrs && SFX_ITEM_SET == pNewAttrs->GetItemState( nSlot, TRUE, &pPoolItem ) )
+ if( pNewAttrs && SFX_ITEM_SET == pNewAttrs->GetItemState( nSlot, sal_True, &pPoolItem ) )
{
if( !( (SfxBoolItem*)pPoolItem)->GetValue() )
bLeftToRight = !bLeftToRight;
@@ -533,8 +533,8 @@ void SwDrawTextShell::Execute( SfxRequest &rReq )
EE_PARA_WRITINGDIR, EE_PARA_WRITINGDIR,
0 );
- USHORT nAdjust = SVX_ADJUST_LEFT;
- if( SFX_ITEM_ON == aEditAttr.GetItemState(EE_PARA_JUST, TRUE, &pPoolItem ) )
+ sal_uInt16 nAdjust = SVX_ADJUST_LEFT;
+ if( SFX_ITEM_ON == aEditAttr.GetItemState(EE_PARA_JUST, sal_True, &pPoolItem ) )
nAdjust = ( (SvxAdjustItem*)pPoolItem)->GetEnumValue();
if( bLeftToRight )
@@ -594,8 +594,8 @@ void SwDrawTextShell::GetState(SfxItemSet& rSet)
while(nWhich)
{
- USHORT nSlotId = GetPool().GetSlotId( nWhich );
- BOOL bFlag = FALSE;
+ sal_uInt16 nSlotId = GetPool().GetSlotId( nWhich );
+ sal_Bool bFlag = sal_False;
switch( nSlotId )
{
case SID_LANGUAGE_STATUS://20412:
@@ -679,7 +679,7 @@ ASK_ESCAPE:
// disable "Thesaurus" if the language is not supported
const SfxPoolItem &rItem = GetShell().GetDoc()->GetDefault(
GetWhichOfScript( RES_CHRATR_LANGUAGE,
- GetI18NScriptTypeOfLanguage( (USHORT)GetAppLanguage())) );
+ GetI18NScriptTypeOfLanguage( (sal_uInt16)GetAppLanguage())) );
LanguageType nLang = ((const SvxLanguageItem &) rItem).GetLanguage();
uno::Reference< linguistic2::XThesaurus > xThes( ::GetThesaurus() );
@@ -814,11 +814,11 @@ void SwDrawTextShell::GetDrawTxtCtrlState(SfxItemSet& rSet)
SfxWhichIter aIter(rSet);
sal_uInt16 nWhich = aIter.FirstWhich();
- USHORT nScriptType = pOLV->GetSelectedScriptType();
+ sal_uInt16 nScriptType = pOLV->GetSelectedScriptType();
while(nWhich)
{
sal_uInt16 nEEWhich = 0;
- USHORT nSlotId = GetPool().GetSlotId( nWhich );
+ sal_uInt16 nSlotId = GetPool().GetSlotId( nWhich );
switch( nSlotId )
{
case SID_ATTR_CHAR_FONT:
@@ -830,7 +830,7 @@ void SwDrawTextShell::GetDrawTxtCtrlState(SfxItemSet& rSet)
if( !pEditPool )
pEditPool = aEditAttr.GetPool();
SvxScriptSetItem aSetItem( nSlotId, *pEditPool );
- aSetItem.GetItemSet().Put( aEditAttr, FALSE );
+ aSetItem.GetItemSet().Put( aEditAttr, sal_False );
const SfxPoolItem* pI = aSetItem.GetItemOfScript( nScriptType );
if( pI )
rSet.Put( *pI, nWhich );
diff --git a/sw/source/ui/shells/drwtxtsh.cxx b/sw/source/ui/shells/drwtxtsh.cxx
index a46210639a..1bdd8c2872 100644
--- a/sw/source/ui/shells/drwtxtsh.cxx
+++ b/sw/source/ui/shells/drwtxtsh.cxx
@@ -127,7 +127,7 @@ void SwDrawTextShell::Init()
if( !pOutliner )
return ;
OutlinerView* pOLV = pSdrView->GetTextEditOutlinerView();
- ULONG nCtrl = pOutliner->GetControlWord();
+ sal_uLong nCtrl = pOutliner->GetControlWord();
nCtrl |= EE_CNTRL_AUTOCORRECT;
SetUndoManager(&pOutliner->GetUndoManager());
@@ -160,7 +160,7 @@ SwDrawTextShell::SwDrawTextShell(SwView &rV) :
Init();
- rSh.NoEdit(TRUE);
+ rSh.NoEdit(sal_True);
SetName(String::CreateFromAscii("ObjectText"));
SetHelpId(SW_DRWTXTSHELL);
}
@@ -202,7 +202,7 @@ SwWrtShell& SwDrawTextShell::GetShell()
void SwDrawTextShell::StateDisableItems( SfxItemSet &rSet )
{
SfxWhichIter aIter(rSet);
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while (nWhich)
{
@@ -239,7 +239,7 @@ void SwDrawTextShell::SetAttrToMarked(const SfxItemSet& rAttr)
-BOOL SwDrawTextShell::IsTextEdit()
+sal_Bool SwDrawTextShell::IsTextEdit()
{
return pSdrView->IsTextEdit();
}
@@ -254,7 +254,7 @@ void SwDrawTextShell::ExecFontWork(SfxRequest& rReq)
{
SwWrtShell &rSh = GetShell();
FieldUnit eMetric = ::GetDfltMetric(0 != PTR_CAST(SwWebView, &rSh.GetView()));
- SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< UINT16 >(eMetric)) );
+ SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric)) );
SfxViewFrame* pVFrame = GetView().GetViewFrame();
if ( rReq.GetArgs() )
{
@@ -276,7 +276,7 @@ void SwDrawTextShell::ExecFontWork(SfxRequest& rReq)
void SwDrawTextShell::StateFontWork(SfxItemSet& rSet)
{
- const USHORT nId = SvxFontWorkChildWindow::GetChildWindowId();
+ const sal_uInt16 nId = SvxFontWorkChildWindow::GetChildWindowId();
rSet.Put(SfxBoolItem(SID_FONTWORK, GetView().GetViewFrame()->HasChildWindow(nId)));
}
@@ -312,12 +312,12 @@ void SwDrawTextShell::ExecFormText(SfxRequest& rReq)
rTempView.AttrChangedNotify(&rSh);
}
- if ( rSet.GetItemState(XATTR_FORMTXTSTDFORM, TRUE, &pItem) ==
+ if ( rSet.GetItemState(XATTR_FORMTXTSTDFORM, sal_True, &pItem) ==
SFX_ITEM_SET &&
((const XFormTextStdFormItem*) pItem)->GetValue() != XFTFORM_NONE )
{
- const USHORT nId = SvxFontWorkChildWindow::GetChildWindowId();
+ const sal_uInt16 nId = SvxFontWorkChildWindow::GetChildWindowId();
SvxFontWorkDialog* pDlg = (SvxFontWorkDialog*)(
pVFrame->GetChildWindow(nId)->GetWindow());
@@ -348,7 +348,7 @@ void SwDrawTextShell::GetFormTextState(SfxItemSet& rSet)
const SdrObject* pObj = NULL;
SvxFontWorkDialog* pDlg = NULL;
- const USHORT nId = SvxFontWorkChildWindow::GetChildWindowId();
+ const sal_uInt16 nId = SvxFontWorkChildWindow::GetChildWindowId();
SfxViewFrame* pVFrame = GetView().GetViewFrame();
if ( pVFrame->HasChildWindow(nId) )
@@ -361,13 +361,13 @@ void SwDrawTextShell::GetFormTextState(SfxItemSet& rSet)
!((SdrTextObj*) pObj)->HasText() )
{
#define XATTR_ANZ 12
- static const USHORT nXAttr[ XATTR_ANZ ] =
+ static const sal_uInt16 nXAttr[ XATTR_ANZ ] =
{ XATTR_FORMTXTSTYLE, XATTR_FORMTXTADJUST, XATTR_FORMTXTDISTANCE,
XATTR_FORMTXTSTART, XATTR_FORMTXTMIRROR, XATTR_FORMTXTSTDFORM,
XATTR_FORMTXTHIDEFORM, XATTR_FORMTXTOUTLINE, XATTR_FORMTXTSHADOW,
XATTR_FORMTXTSHDWCOLOR, XATTR_FORMTXTSHDWXVAL, XATTR_FORMTXTSHDWYVAL
};
- for( USHORT i = 0; i < XATTR_ANZ; )
+ for( sal_uInt16 i = 0; i < XATTR_ANZ; )
rSet.DisableItem( nXAttr[ i++ ] );
}
else
@@ -524,7 +524,7 @@ void SwDrawTextShell::ExecDraw(SfxRequest &rReq)
const SfxPoolItem* pItem = 0;
if(pNewAttrs)
{
- pNewAttrs->GetItemState(nSlot, FALSE, &pItem );
+ pNewAttrs->GetItemState(nSlot, sal_False, &pItem );
pOLV->InsertText(((const SfxStringItem *)pItem)->GetValue());
}
break;
@@ -535,9 +535,9 @@ void SwDrawTextShell::ExecDraw(SfxRequest &rReq)
SdrOutliner * pOutliner = pSdrView->GetTextEditOutliner();
if(pOutliner)
{
- ULONG nParaCount = pOutliner->GetParagraphCount();
+ sal_uLong nParaCount = pOutliner->GetParagraphCount();
if (nParaCount > 0)
- pOLV->SelectRange(0L, USHORT(nParaCount) );
+ pOLV->SelectRange(0L, sal_uInt16(nParaCount) );
}
}
break;
@@ -545,7 +545,7 @@ void SwDrawTextShell::ExecDraw(SfxRequest &rReq)
case FN_FORMAT_RESET: // delete hard text attributes
{
pOLV->RemoveAttribsKeepLanguages( true );
- pOLV->GetEditView().GetEditEngine()->RemoveFields(TRUE);
+ pOLV->GetEditView().GetEditEngine()->RemoveFields(sal_True);
rReq.Done();
}
break;
@@ -572,7 +572,7 @@ void SwDrawTextShell::ExecDraw(SfxRequest &rReq)
SfxAbstractTabDialog *pDlg = pFact->CreateTextTabDialog(
&(GetView().GetViewFrame()->GetWindow()),
&aNewAttr, pSdrView );
- USHORT nResult = pDlg->Execute();
+ sal_uInt16 nResult = pDlg->Execute();
if (nResult == RET_OK)
{
@@ -593,7 +593,7 @@ void SwDrawTextShell::ExecDraw(SfxRequest &rReq)
return;
}
- GetView().GetViewFrame()->GetBindings().InvalidateAll(FALSE);
+ GetView().GetViewFrame()->GetBindings().InvalidateAll(sal_False);
if (IsTextEdit() && pOLV->GetOutliner()->IsModified())
rSh.SetModified();
@@ -609,31 +609,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;
@@ -660,7 +660,7 @@ void SwDrawTextShell::StateUndo(SfxItemSet &rSet)
SfxViewFrame *pSfxViewFrame = GetView().GetViewFrame();
SfxWhichIter aIter(rSet);
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while( nWhich )
{
switch ( nWhich )
@@ -668,27 +668,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 );
@@ -772,7 +772,7 @@ void SwDrawTextShell::InsertSymbol(SfxRequest& rReq)
const SfxItemSet *pArgs = rReq.GetArgs();
const SfxPoolItem* pItem = 0;
if( pArgs )
- pArgs->GetItemState(GetPool().GetWhich(SID_CHARMAP), FALSE, &pItem);
+ pArgs->GetItemState(GetPool().GetWhich(SID_CHARMAP), sal_False, &pItem);
String sSym;
String sFontName;
@@ -780,25 +780,25 @@ void SwDrawTextShell::InsertSymbol(SfxRequest& rReq)
{
sSym = ((const SfxStringItem*)pItem)->GetValue();
const SfxPoolItem* pFtItem = NULL;
- pArgs->GetItemState( GetPool().GetWhich(SID_ATTR_SPECIALCHAR), FALSE, &pFtItem);
+ pArgs->GetItemState( GetPool().GetWhich(SID_ATTR_SPECIALCHAR), sal_False, &pFtItem);
const SfxStringItem* pFontItem = PTR_CAST( SfxStringItem, pFtItem );
if ( pFontItem )
sFontName = pFontItem->GetValue();
}
SfxItemSet aSet(pOLV->GetAttribs());
- USHORT nScript = pOLV->GetSelectedScriptType();
+ sal_uInt16 nScript = pOLV->GetSelectedScriptType();
SvxFontItem aSetDlgFont( RES_CHRATR_FONT );
{
SvxScriptSetItem aSetItem( SID_ATTR_CHAR_FONT, *aSet.GetPool() );
- aSetItem.GetItemSet().Put( aSet, FALSE );
+ aSetItem.GetItemSet().Put( aSet, sal_False );
const SfxPoolItem* pI = aSetItem.GetItemOfScript( nScript );
if( pI )
aSetDlgFont = *(SvxFontItem*)pI;
else
aSetDlgFont = (SvxFontItem&)aSet.Get( GetWhichOfScript(
SID_ATTR_CHAR_FONT,
- GetI18NScriptTypeOfLanguage( (USHORT)GetAppLanguage() ) ));
+ GetI18NScriptTypeOfLanguage( (sal_uInt16)GetAppLanguage() ) ));
if (!sFontName.Len())
sFontName = aSetDlgFont.GetFamilyName();
}
@@ -807,7 +807,7 @@ void SwDrawTextShell::InsertSymbol(SfxRequest& rReq)
if(!sSym.Len())
{
SfxAllItemSet aAllSet( GetPool() );
- aAllSet.Put( SfxBoolItem( FN_PARAM_1, FALSE ) );
+ aAllSet.Put( SfxBoolItem( FN_PARAM_1, sal_False ) );
SwViewOption aOpt(*rView.GetWrtShell().GetViewOptions());
String sSymbolFont = aOpt.GetSymbolFont();
@@ -820,11 +820,11 @@ void SwDrawTextShell::InsertSymbol(SfxRequest& rReq)
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
SfxAbstractDialog* pDlg = pFact->CreateSfxDialog( rView.GetWindow(), aAllSet,
rView.GetViewFrame()->GetFrame().GetFrameInterface(), RID_SVXDLG_CHARMAP );
- USHORT nResult = pDlg->Execute();
+ sal_uInt16 nResult = pDlg->Execute();
if( nResult == RET_OK )
{
- SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pCItem, SfxStringItem, SID_CHARMAP, FALSE );
- SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pFontItem, SvxFontItem, SID_ATTR_CHAR_FONT, FALSE );
+ SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pCItem, SfxStringItem, SID_CHARMAP, sal_False );
+ SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pFontItem, SvxFontItem, SID_ATTR_CHAR_FONT, sal_False );
if ( pFontItem )
{
aFont.SetName( pFontItem->GetFamilyName() );
@@ -849,7 +849,7 @@ void SwDrawTextShell::InsertSymbol(SfxRequest& rReq)
// nicht flackern
pOLV->HideCursor();
SdrOutliner * pOutliner = pSdrView->GetTextEditOutliner();
- pOutliner->SetUpdateMode(FALSE);
+ pOutliner->SetUpdateMode(sal_False);
SfxItemSet aOldSet( pOLV->GetAttribs() );
SfxItemSet aFontSet( *aOldSet.GetPool(),
@@ -887,7 +887,7 @@ void SwDrawTextShell::InsertSymbol(SfxRequest& rReq)
pOLV->SetAttribs( aFontSet );
// ab jetzt wieder anzeigen
- pOutliner->SetUpdateMode(TRUE);
+ pOutliner->SetUpdateMode(sal_True);
pOLV->ShowCursor();
rReq.AppendItem( SfxStringItem( GetPool().GetWhich(SID_CHARMAP), sSym ) );
@@ -899,7 +899,7 @@ void SwDrawTextShell::InsertSymbol(SfxRequest& rReq)
/*-- 22.10.2003 14:26:32---------------------------------------------------
-----------------------------------------------------------------------*/
-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 5c63a56da7..969819d07c 100644
--- a/sw/source/ui/shells/frmsh.cxx
+++ b/sw/source/ui/shells/frmsh.cxx
@@ -122,10 +122,10 @@ void SwFrameShell::Execute(SfxRequest &rReq)
{
//Erstmal die, die keinen FrmMgr benoetigen.
SwWrtShell &rSh = GetShell();
- BOOL bMore = FALSE;
+ sal_Bool bMore = sal_False;
const SfxItemSet* pArgs = rReq.GetArgs();
const SfxPoolItem* pItem;
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
switch ( nSlot )
{
@@ -146,11 +146,11 @@ void SwFrameShell::Execute(SfxRequest &rReq)
break;
case FN_FRAME_UP:
- rSh.SelectionToTop( FALSE );
+ rSh.SelectionToTop( sal_False );
break;
case FN_FRAME_DOWN:
- rSh.SelectionToBottom( FALSE );
+ rSh.SelectionToBottom( sal_False );
break;
case FN_INSERT_FRAME:
if (!pArgs)
@@ -165,15 +165,15 @@ void SwFrameShell::Execute(SfxRequest &rReq)
else
{
// Rahmen existiert bereits, nur Spaltenanzahl wird geaendert
- USHORT nCols = 1;
- if(pArgs->GetItemState(SID_ATTR_COLUMNS, FALSE, &pItem) == SFX_ITEM_SET)
+ sal_uInt16 nCols = 1;
+ if(pArgs->GetItemState(SID_ATTR_COLUMNS, sal_False, &pItem) == SFX_ITEM_SET)
nCols = ((SfxUInt16Item *)pItem)->GetValue();
SfxItemSet aSet(GetPool(),RES_COL,RES_COL);
rSh.GetFlyFrmAttr( aSet );
SwFmtCol aCol((const SwFmtCol&)aSet.Get(RES_COL));
// GutterWidth wird nicht immer uebergeben, daher erst besorgen (siehe view2: Execute auf diesen Slot)
- USHORT nGutterWidth = aCol.GetGutterWidth();
+ sal_uInt16 nGutterWidth = aCol.GetGutterWidth();
if(!nCols )
nCols++;
aCol.Init(nCols, nGutterWidth, aCol.GetWishWidth());
@@ -197,7 +197,7 @@ void SwFrameShell::Execute(SfxRequest &rReq)
case SID_HYPERLINK_SETLINK:
{
- if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(SID_HYPERLINK_SETLINK, FALSE, &pItem))
+ if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(SID_HYPERLINK_SETLINK, sal_False, &pItem))
{
const SvxHyperlinkItem& rHLinkItem = *(const SvxHyperlinkItem *)pItem;
const String& rURL = rHLinkItem.GetURL();
@@ -212,7 +212,7 @@ void SwFrameShell::Execute(SfxRequest &rReq)
if (sOldName.ToUpperAscii() != sFlyName.ToUpperAscii())
{
String sName(sOldName);
- USHORT i = 1;
+ sal_uInt16 i = 1;
while (rSh.FindFlyByName(sName))
{
sName = sOldName;
@@ -221,7 +221,7 @@ void SwFrameShell::Execute(SfxRequest &rReq)
}
rSh.SetFlyName(sName);
}
- aURL.SetURL( rURL, FALSE );
+ aURL.SetURL( rURL, sal_False );
aURL.SetTargetFrameName(rTarget);
aSet.Put( aURL );
@@ -283,7 +283,7 @@ void SwFrameShell::Execute(SfxRequest &rReq)
SwDocStat aCurr;
SwDocStat aDocStat( rSh.getIDocumentStatistics()->GetDocStat() );
{
- SwWait aWait( *GetView().GetDocShell(), TRUE );
+ SwWait aWait( *GetView().GetDocShell(), sal_True );
rSh.StartAction();
rSh.CountWords( aCurr );
rSh.UpdateDocStat( aDocStat );
@@ -298,7 +298,7 @@ void SwFrameShell::Execute(SfxRequest &rReq)
delete pDialog;
}
break;
- default: bMore = TRUE;
+ default: bMore = sal_True;
}
if ( !bMore )
@@ -306,9 +306,9 @@ void SwFrameShell::Execute(SfxRequest &rReq)
return;
}
- SwFlyFrmAttrMgr aMgr( FALSE, &rSh, FRMMGR_TYPE_NONE );
- BOOL bUpdateMgr = TRUE;
- BOOL bCopyToFmt = FALSE;
+ SwFlyFrmAttrMgr aMgr( sal_False, &rSh, FRMMGR_TYPE_NONE );
+ sal_Bool bUpdateMgr = sal_True;
+ sal_Bool bCopyToFmt = sal_False;
switch ( nSlot )
{
case SID_OBJECT_ALIGN_MIDDLE:
@@ -371,18 +371,18 @@ void SwFrameShell::Execute(SfxRequest &rReq)
if(pArgs)
{
aMgr.SetAttrSet( *pArgs );
- bCopyToFmt = TRUE;
+ bCopyToFmt = sal_True;
}
}
break;
case SID_ATTR_ULSPACE:
case SID_ATTR_LRSPACE:
{
- if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(GetPool().GetWhich(nSlot), FALSE, &pItem))
+ if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(GetPool().GetWhich(nSlot), sal_False, &pItem))
{
aMgr.SetAttrSet( *pArgs );
if(SID_ATTR_ULSPACE == nSlot && SID_ATTR_ULSPACE == nSlot)
- bCopyToFmt = TRUE;
+ bCopyToFmt = sal_True;
}
}
break;
@@ -392,7 +392,7 @@ void SwFrameShell::Execute(SfxRequest &rReq)
if (nSel & nsSelectionType::SEL_GRF)
{
rSh.GetView().GetViewFrame()->GetDispatcher()->Execute(FN_FORMAT_GRAFIC_DLG);
- bUpdateMgr = FALSE;
+ bUpdateMgr = sal_False;
}
else
{
@@ -452,23 +452,23 @@ void SwFrameShell::Execute(SfxRequest &rReq)
const uno::Reference < embed::XEmbeddedObject > xObj( rSh.GetOleRef() );
aSet.Put( SfxBoolItem( FN_OLE_IS_MATH, xObj.is() && SotExchange::IsMath( xObj->getClassID() ) ) );
- UINT16 nDefPage = 0;
- if(pArgs && pArgs->GetItemState(FN_FORMAT_FRAME_DLG, FALSE, &pItem) == SFX_ITEM_SET)
+ sal_uInt16 nDefPage = 0;
+ if(pArgs && pArgs->GetItemState(FN_FORMAT_FRAME_DLG, sal_False, &pItem) == SFX_ITEM_SET)
nDefPage = ((SfxUInt16Item *)pItem)->GetValue();
aSet.Put(SfxFrameItem( SID_DOCFRAME, &GetView().GetViewFrame()->GetTopFrame()));
FieldUnit eMetric = ::GetDfltMetric(0 != PTR_CAST(SwWebView, &GetView()));
- SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< UINT16 >(eMetric) ));
+ SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric) ));
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
DBG_ASSERT(pFact, "Dialogdiet fail!");
SfxAbstractTabDialog* pDlg = pFact->CreateFrmTabDialog( DLG_FRM_STD,
GetView().GetViewFrame(),
GetView().GetWindow(),
- aSet, FALSE,
+ aSet, sal_False,
nSel & nsSelectionType::SEL_GRF ? DLG_FRM_GRF :
nSel & nsSelectionType::SEL_OLE ? DLG_FRM_OLE :
DLG_FRM_STD,
- FALSE,
+ sal_False,
nDefPage);
DBG_ASSERT(pDlg, "Dialogdiet fail!");
@@ -479,13 +479,13 @@ void SwFrameShell::Execute(SfxRequest &rReq)
{
rReq.Done(*pOutSet);
if(nSel & nsSelectionType::SEL_OLE &&
- SFX_ITEM_SET == pOutSet->GetItemState(FN_KEEP_ASPECT_RATIO, TRUE, &pItem))
+ SFX_ITEM_SET == pOutSet->GetItemState(FN_KEEP_ASPECT_RATIO, sal_True, &pItem))
{
SwViewOption aUsrPref( *pVOpt );
aUsrPref.SetKeepRatio(((const SfxBoolItem*)pItem)->GetValue());
SW_MOD()->ApplyUsrPref(aUsrPref, &GetView());
}
- if (SFX_ITEM_SET == pOutSet->GetItemState(FN_SET_FRM_ALT_NAME, TRUE, &pItem))
+ if (SFX_ITEM_SET == pOutSet->GetItemState(FN_SET_FRM_ALT_NAME, sal_True, &pItem))
{
// --> OD 2009-07-13 #i73249#
// rSh.SetAlternateText(((const SfxStringItem*)pItem)->GetValue());
@@ -499,7 +499,7 @@ void SwFrameShell::Execute(SfxRequest &rReq)
rSh.AutoUpdateFrame(pFmt, *pOutSet);
// alles, dass das Format nicht kann, muss hart
// gesetzt werden
- if(SFX_ITEM_SET == pOutSet->GetItemState(FN_SET_FRM_NAME, FALSE, &pItem))
+ if(SFX_ITEM_SET == pOutSet->GetItemState(FN_SET_FRM_NAME, sal_False, &pItem))
rSh.SetFlyName(((SfxStringItem*)pItem)->GetValue());
SfxItemSet aShellSet(GetPool(), RES_FRM_SIZE, RES_FRM_SIZE,
RES_SURROUND, RES_SURROUND,
@@ -508,7 +508,7 @@ void SwFrameShell::Execute(SfxRequest &rReq)
0);
aShellSet.Put(*pOutSet);
aMgr.SetAttrSet(aShellSet);
- if(SFX_ITEM_SET == pOutSet->GetItemState(FN_SET_FRM_NAME, FALSE, &pItem))
+ if(SFX_ITEM_SET == pOutSet->GetItemState(FN_SET_FRM_NAME, sal_False, &pItem))
rSh.SetFlyName(((SfxStringItem*)pItem)->GetValue());
}
else
@@ -517,7 +517,7 @@ void SwFrameShell::Execute(SfxRequest &rReq)
const SwFrmFmt* pCurrFlyFmt = rSh.GetFlyFrmFmt();
if(SFX_ITEM_SET ==
pOutSet->GetItemState(FN_PARAM_CHAIN_PREVIOUS,
- FALSE, &pItem))
+ sal_False, &pItem))
{
rSh.HideChainMarker();
@@ -551,7 +551,7 @@ void SwFrameShell::Execute(SfxRequest &rReq)
rSh.SetChainMarker();
}
if(SFX_ITEM_SET ==
- pOutSet->GetItemState(FN_PARAM_CHAIN_NEXT, FALSE,
+ pOutSet->GetItemState(FN_PARAM_CHAIN_NEXT, sal_False,
&pItem))
{
rSh.HideChainMarker();
@@ -588,7 +588,7 @@ void SwFrameShell::Execute(SfxRequest &rReq)
}
}
else
- bUpdateMgr = FALSE;
+ bUpdateMgr = sal_False;
delete pDlg;
}
}
@@ -596,19 +596,19 @@ void SwFrameShell::Execute(SfxRequest &rReq)
case FN_FRAME_MIRROR_ON_EVEN_PAGES:
{
SwFmtHoriOrient aHori(aMgr.GetHoriOrient());
- BOOL bMirror = !aHori.IsPosToggle();
+ sal_Bool bMirror = !aHori.IsPosToggle();
aHori.SetPosToggle(bMirror);
SfxItemSet aSet(GetPool(), RES_HORI_ORIENT, RES_HORI_ORIENT);
aSet.Put(aHori);
aMgr.SetAttrSet(aSet);
- bCopyToFmt = TRUE;
+ bCopyToFmt = sal_True;
rReq.SetReturnValue(SfxBoolItem(nSlot, bMirror));
}
break;
// --> OD 2009-07-14 #i73249#
case FN_TITLE_DESCRIPTION_SHAPE:
{
- bUpdateMgr = FALSE;
+ bUpdateMgr = sal_False;
SdrView* pSdrView = rSh.GetDrawViewWithValidMarkList();
if ( pSdrView &&
pSdrView->GetMarkedObjectCount() == 1 )
@@ -664,7 +664,7 @@ void SwFrameShell::Execute(SfxRequest &rReq)
void SwFrameShell::GetState(SfxItemSet& rSet)
{
SwWrtShell &rSh = GetShell();
- BOOL bHtmlMode = 0 != ::GetHtmlMode(rSh.GetView().GetDocShell());
+ sal_Bool bHtmlMode = 0 != ::GetHtmlMode(rSh.GetView().GetDocShell());
if (rSh.IsFrmSelected())
{
SfxItemSet aSet( rSh.GetAttrPool(),
@@ -675,16 +675,16 @@ void SwFrameShell::GetState(SfxItemSet& rSet)
0 );
rSh.GetFlyFrmAttr( aSet );
- BOOL bProtect = rSh.IsSelObjProtected(FLYPROTECT_POS);
- BOOL bParentCntProt = rSh.IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT ) != 0;
+ sal_Bool bProtect = rSh.IsSelObjProtected(FLYPROTECT_POS);
+ sal_Bool bParentCntProt = rSh.IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT ) != 0;
bProtect |= bParentCntProt;
- const USHORT eFrmType = rSh.GetFrmType(0,TRUE);
- SwFlyFrmAttrMgr aMgr( FALSE, &rSh, FRMMGR_TYPE_NONE );
+ const sal_uInt16 eFrmType = rSh.GetFrmType(0,sal_True);
+ SwFlyFrmAttrMgr aMgr( sal_False, &rSh, FRMMGR_TYPE_NONE );
SfxWhichIter aIter( rSet );
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while ( nWhich )
{
switch ( nWhich )
@@ -706,7 +706,7 @@ void SwFrameShell::GetState(SfxItemSet& rSet)
case RES_PRINT:
case RES_SURROUND:
{
- rSet.Put(aSet.Get(GetPool().GetWhich(nWhich), TRUE ));
+ rSet.Put(aSet.Get(GetPool().GetWhich(nWhich), sal_True ));
}
break;
case SID_OBJECT_ALIGN_LEFT :
@@ -742,7 +742,7 @@ void SwFrameShell::GetState(SfxItemSet& rSet)
rSet.DisableItem( nWhich );
else
{
- USHORT nId = 0;
+ sal_uInt16 nId = 0;
if (eFrmType & FRMTYPE_FLY_INCNT)
{
switch (nWhich)
@@ -807,7 +807,7 @@ void SwFrameShell::GetState(SfxItemSet& rSet)
SfxItemSet aURLSet(GetPool(), RES_URL, RES_URL);
rSh.GetFlyFrmAttr( aURLSet );
- if(SFX_ITEM_SET == aURLSet.GetItemState(RES_URL, TRUE, &pItem))
+ if(SFX_ITEM_SET == aURLSet.GetItemState(RES_URL, sal_True, &pItem))
{
const SwFmtURL* pFmtURL = (const SwFmtURL*)pItem;
aHLinkItem.SetURL(pFmtURL->GetURL());
@@ -837,7 +837,7 @@ void SwFrameShell::GetState(SfxItemSet& rSet)
}
else
{
- BOOL bChainMode = rSh.GetView().GetEditWin().IsChainMode();
+ sal_Bool bChainMode = rSh.GetView().GetEditWin().IsChainMode();
rSet.Put( SfxBoolItem( FN_FRAME_CHAIN, bChainMode ) );
}
}
@@ -928,7 +928,7 @@ SwFrameShell::~SwFrameShell()
void SwFrameShell::ExecFrameStyle(SfxRequest& rReq)
{
SwWrtShell &rSh = GetShell();
- BOOL bDefault = FALSE;
+ sal_Bool bDefault = sal_False;
if (!rSh.IsFrmSelected())
return;
@@ -943,7 +943,7 @@ void SwFrameShell::ExecFrameStyle(SfxRequest& rReq)
const SvxBoxItem& rBoxItem = (const SvxBoxItem&)aFrameSet.Get(RES_BOX);
if (pPoolBoxItem == &rBoxItem)
- bDefault = TRUE;
+ bDefault = sal_True;
SvxBoxItem aBoxItem(rBoxItem);
@@ -956,7 +956,7 @@ void SwFrameShell::ExecFrameStyle(SfxRequest& rReq)
{
case SID_ATTR_BORDER:
{
- if (pArgs->GetItemState(RES_BOX, TRUE, &pItem) == SFX_ITEM_SET)
+ if (pArgs->GetItemState(RES_BOX, sal_True, &pItem) == SFX_ITEM_SET)
{
SvxBoxItem aNewBox(*((SvxBoxItem *)pItem));
const SvxBorderLine* pBorderLine;
@@ -1000,7 +1000,7 @@ void SwFrameShell::ExecFrameStyle(SfxRequest& rReq)
case SID_FRAME_LINESTYLE:
{
- if (pArgs->GetItemState(SID_FRAME_LINESTYLE, FALSE, &pItem) == SFX_ITEM_SET)
+ if (pArgs->GetItemState(SID_FRAME_LINESTYLE, sal_False, &pItem) == SFX_ITEM_SET)
{
const SvxLineItem* pLineItem =
(const SvxLineItem*)pItem;
@@ -1054,7 +1054,7 @@ void SwFrameShell::ExecFrameStyle(SfxRequest& rReq)
case SID_FRAME_LINECOLOR:
{
- if (pArgs->GetItemState(SID_FRAME_LINECOLOR, FALSE, &pItem) == SFX_ITEM_SET)
+ if (pArgs->GetItemState(SID_FRAME_LINECOLOR, sal_False, &pItem) == SFX_ITEM_SET)
{
const Color& rNewColor = ((const SvxColorItem*)pItem)->GetValue();
@@ -1121,7 +1121,7 @@ void lcl_FrmGetMaxLineWidth(const SvxBorderLine* pBorderLine, SvxBorderLine& rBo
void SwFrameShell::GetLineStyleState(SfxItemSet &rSet)
{
SwWrtShell &rSh = GetShell();
- BOOL bParentCntProt = rSh.IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT ) != 0;
+ sal_Bool bParentCntProt = rSh.IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT ) != 0;
if (bParentCntProt)
{
diff --git a/sw/source/ui/shells/grfsh.cxx b/sw/source/ui/shells/grfsh.cxx
index 1ba55d45dd..079bf94bbc 100644
--- a/sw/source/ui/shells/grfsh.cxx
+++ b/sw/source/ui/shells/grfsh.cxx
@@ -96,7 +96,7 @@ void SwGrfShell::Execute(SfxRequest &rReq)
{
SwWrtShell &rSh = GetShell();
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
switch(nSlot)
{
case SID_TWAIN_TRANSFER:
@@ -118,7 +118,7 @@ void SwGrfShell::Execute(SfxRequest &rReq)
case SID_INSERT_GRAPHIC:
case FN_FORMAT_GRAFIC_DLG:
{
- SwFlyFrmAttrMgr aMgr( FALSE, &rSh, rSh.IsFrmSelected() ?
+ SwFlyFrmAttrMgr aMgr( sal_False, &rSh, rSh.IsFrmSelected() ?
FRMMGR_TYPE_NONE : FRMMGR_TYPE_GRF);
const SwViewOption* pVOpt = rSh.GetViewOptions();
SwViewOption aUsrPref( *pVOpt );
@@ -140,10 +140,10 @@ void SwGrfShell::Execute(SfxRequest &rReq)
FN_SET_FRM_ALT_NAME, FN_SET_FRM_ALT_NAME,
0);
- USHORT nHtmlMode = ::GetHtmlMode(GetView().GetDocShell());
+ sal_uInt16 nHtmlMode = ::GetHtmlMode(GetView().GetDocShell());
aSet.Put(SfxUInt16Item(SID_HTML_MODE, nHtmlMode));
FieldUnit eMetric = ::GetDfltMetric((0 != (nHtmlMode&HTMLMODE_ON)));
- SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< UINT16 >(eMetric)) );
+ SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric)) );
const SwRect* pRect = &rSh.GetAnyCurRect(RECT_PAGE);
SwFmtFrmSize aFrmSize( ATT_VAR_SIZE, pRect->Width(), pRect->Height());
@@ -232,7 +232,7 @@ void SwGrfShell::Execute(SfxRequest &rReq)
SfxAbstractTabDialog* pDlg = pFact->CreateFrmTabDialog( DLG_FRM_GRF,
GetView().GetViewFrame(),
GetView().GetWindow(),
- aSet, FALSE, DLG_FRM_GRF);
+ aSet, sal_False, DLG_FRM_GRF);
DBG_ASSERT(pDlg, "Dialogdiet fail!");
if( pDlg->Execute() )
{
@@ -243,7 +243,7 @@ void SwGrfShell::Execute(SfxRequest &rReq)
rReq.Done(*pSet);
// change the 2 frmsize SizeItems to the correct SwFrmSizeItem
if( SFX_ITEM_SET == pSet->GetItemState(
- SID_ATTR_GRAF_FRMSIZE, FALSE, &pItem ))
+ SID_ATTR_GRAF_FRMSIZE, sal_False, &pItem ))
{
SwFmtFrmSize aSize;
const Size& rSz = ((SvxSizeItem*)pItem)->GetSize();
@@ -251,11 +251,11 @@ void SwGrfShell::Execute(SfxRequest &rReq)
aSize.SetHeight( rSz.Height() );
if( SFX_ITEM_SET == pSet->GetItemState(
- SID_ATTR_GRAF_FRMSIZE_PERCENT, FALSE, &pItem ))
+ SID_ATTR_GRAF_FRMSIZE_PERCENT, sal_False, &pItem ))
{
const Size& rRelativeSize = ((SvxSizeItem*)pItem)->GetSize();
- aSize.SetWidthPercent( static_cast< BYTE >( rRelativeSize.Width() ) );
- aSize.SetHeightPercent( static_cast< BYTE >( rRelativeSize.Height() ) );
+ aSize.SetWidthPercent( static_cast< sal_uInt8 >( rRelativeSize.Width() ) );
+ aSize.SetHeightPercent( static_cast< sal_uInt8 >( rRelativeSize.Height() ) );
}
pSet->Put( aSize );
}
@@ -279,20 +279,20 @@ void SwGrfShell::Execute(SfxRequest &rReq)
}
aMgr.UpdateFlyFrm();
- BOOL bApplyUsrPref = FALSE;
+ sal_Bool bApplyUsrPref = sal_False;
if (SFX_ITEM_SET == pSet->GetItemState(
- FN_KEEP_ASPECT_RATIO, TRUE, &pItem ))
+ FN_KEEP_ASPECT_RATIO, sal_True, &pItem ))
{
aUsrPref.SetKeepRatio(
((const SfxBoolItem*)pItem)->GetValue() );
- bApplyUsrPref = TRUE;
+ bApplyUsrPref = sal_True;
}
if( SFX_ITEM_SET == pSet->GetItemState(
- SID_ATTR_GRAF_KEEP_ZOOM, TRUE, &pItem ))
+ SID_ATTR_GRAF_KEEP_ZOOM, sal_True, &pItem ))
{
aUsrPref.SetGrfKeepZoom(
((const SfxBoolItem*)pItem)->GetValue() );
- bApplyUsrPref = TRUE;
+ bApplyUsrPref = sal_True;
}
if( bApplyUsrPref )
@@ -300,7 +300,7 @@ void SwGrfShell::Execute(SfxRequest &rReq)
// and now set all the graphic attributes and other stuff
if( SFX_ITEM_SET == pSet->GetItemState(
- SID_ATTR_GRAF_GRAPHIC, TRUE, &pItem ))
+ SID_ATTR_GRAF_GRAPHIC, sal_True, &pItem ))
{
if( ((SvxBrushItem*)pItem)->GetGraphicLink() )
sGrfNm = *((SvxBrushItem*)pItem)->GetGraphicLink();
@@ -315,7 +315,7 @@ void SwGrfShell::Execute(SfxRequest &rReq)
if( sGrfNm.Len() )
{
SwDocShell* pDocSh = GetView().GetDocShell();
- SwWait aWait( *pDocSh, TRUE );
+ SwWait aWait( *pDocSh, sal_True );
SfxMedium* pMedium = pDocSh->GetMedium();
INetURLObject aAbs;
if( pMedium )
@@ -327,7 +327,7 @@ void SwGrfShell::Execute(SfxRequest &rReq)
}
}
if ( SFX_ITEM_SET == pSet->GetItemState(
- FN_SET_FRM_ALT_NAME, TRUE, &pItem ))
+ FN_SET_FRM_ALT_NAME, sal_True, &pItem ))
{
// --> OD 2009-07-13 #i73249#
// rSh.SetAlternateText(
@@ -368,7 +368,7 @@ void SwGrfShell::Execute(SfxRequest &rReq)
void SwGrfShell::ExecAttr( SfxRequest &rReq )
{
- USHORT nGrfType;
+ sal_uInt16 nGrfType;
if( CNT_GRF == GetShell().GetCntType() &&
( GRAPHIC_BITMAP == ( nGrfType = GetShell().GetGraphicType()) ||
GRAPHIC_GDIMETAFILE == nGrfType ))
@@ -377,8 +377,8 @@ void SwGrfShell::ExecAttr( SfxRequest &rReq )
RES_GRFATR_END -1 );
const SfxItemSet *pArgs = rReq.GetArgs();
const SfxPoolItem* pItem;
- USHORT nSlot = rReq.GetSlot();
- if( !pArgs || SFX_ITEM_SET != pArgs->GetItemState( nSlot, FALSE, &pItem ))
+ sal_uInt16 nSlot = rReq.GetSlot();
+ if( !pArgs || SFX_ITEM_SET != pArgs->GetItemState( nSlot, sal_False, &pItem ))
pItem = 0;
switch( nSlot )
@@ -389,7 +389,7 @@ void SwGrfShell::ExecAttr( SfxRequest &rReq )
GetShell().GetCurAttr( aGrfSet );
SwMirrorGrf aMirror( (SwMirrorGrf&)aGrfSet.Get(
RES_GRFATR_MIRRORGRF ) );
- USHORT nMirror = aMirror.GetValue();
+ sal_uInt16 nMirror = aMirror.GetValue();
if( FN_FLIP_VERT_GRAFIC == nSlot )
switch( nMirror )
{
@@ -517,27 +517,27 @@ void SwGrfShell::GetAttrState(SfxItemSet &rSet)
SwWrtShell &rSh = GetShell();
SfxItemSet aCoreSet( GetPool(), aNoTxtNodeSetRange );
rSh.GetCurAttr( aCoreSet );
- BOOL bParentCntProt = 0 != rSh.IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT );
- BOOL bIsGrfCntnt = CNT_GRF == GetShell().GetCntType();
+ sal_Bool bParentCntProt = 0 != rSh.IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT );
+ sal_Bool bIsGrfCntnt = CNT_GRF == GetShell().GetCntType();
// --> OD 2006-11-03 #i59688#
-// BOOL bSwappedOut = rSh.IsGrfSwapOut( TRUE );
-// BOOL bBitmapType = !bSwappedOut && GRAPHIC_BITMAP == rSh.GetGraphicType();
+// sal_Bool bSwappedOut = rSh.IsGrfSwapOut( sal_True );
+// sal_Bool bBitmapType = !bSwappedOut && GRAPHIC_BITMAP == rSh.GetGraphicType();
// <--
SetGetStateSet( &rSet );
SfxWhichIter aIter( rSet );
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while( nWhich )
{
- BOOL bDisable = bParentCntProt;
+ sal_Bool bDisable = bParentCntProt;
switch( nWhich )
{
case SID_INSERT_GRAPHIC:
case FN_FORMAT_GRAFIC_DLG:
case SID_TWAIN_TRANSFER:
if( bParentCntProt || !bIsGrfCntnt )
- bDisable = TRUE;
+ bDisable = sal_True;
break;
case FN_SAVE_GRAPHIC:
if( rSh.GetGraphicType() == GRAPHIC_NONE )
@@ -546,7 +546,7 @@ void SwGrfShell::GetAttrState(SfxItemSet &rSet)
case SID_COLOR_SETTINGS:
{
if ( bParentCntProt || !bIsGrfCntnt )
- bDisable = TRUE;
+ bDisable = sal_True;
else
{
svx::ToolboxAccess aToolboxAccess( TOOLBOX_NAME );
@@ -606,7 +606,7 @@ void SwGrfShell::GetAttrState(SfxItemSet &rSet)
case SID_ATTR_GRAF_GAMMA:
if( !bParentCntProt )
- rSet.Put( SfxUInt32Item( nWhich, static_cast< UINT32 >(
+ rSet.Put( SfxUInt32Item( nWhich, static_cast< sal_uInt32 >(
( (SwGammaGrf&)aCoreSet.Get( RES_GRFATR_GAMMA ) ).GetValue() * 100 ) ) );
break;
case SID_ATTR_GRAF_TRANSPARENCE:
@@ -618,7 +618,7 @@ void SwGrfShell::GetAttrState(SfxItemSet &rSet)
{
if( pGrfObj->IsAnimated() ||
GRAPHIC_GDIMETAFILE == pGrfObj->GetType() )
- bDisable = TRUE;
+ bDisable = sal_True;
else
rSet.Put( SfxUInt16Item( nWhich, ((SwTransparencyGrf&)
aCoreSet.Get(RES_GRFATR_TRANSPARENCY)).GetValue() ));
@@ -651,27 +651,27 @@ void SwGrfShell::GetAttrState(SfxItemSet &rSet)
case SID_GRFFILTER_SOLARIZE:
{
if( bParentCntProt || !bIsGrfCntnt )
- bDisable = TRUE;
+ bDisable = sal_True;
// --> OD 2006-11-03 #i59688#
// load graphic only if type is unknown
// else if( bSwappedOut )
// {
// rSet.DisableItem( nWhich );
// if( AddGrfUpdateSlot( nWhich ))
-// rSh.GetGraphic(FALSE); // start the loading
+// rSh.GetGraphic(sal_False); // start the loading
// }
// else
// bDisable = !bBitmapType;
else
{
- const USHORT eGraphicType( rSh.GetGraphicType() );
+ const sal_uInt16 eGraphicType( rSh.GetGraphicType() );
if ( ( eGraphicType == GRAPHIC_NONE ||
eGraphicType == GRAPHIC_DEFAULT ) &&
- rSh.IsGrfSwapOut( TRUE ) )
+ rSh.IsGrfSwapOut( sal_True ) )
{
rSet.DisableItem( nWhich );
if( AddGrfUpdateSlot( nWhich ))
- rSh.GetGraphic(FALSE); // start the loading
+ rSh.GetGraphic(sal_False); // start the loading
}
else
{
@@ -683,7 +683,7 @@ void SwGrfShell::GetAttrState(SfxItemSet &rSet)
break;
default:
- bDisable = FALSE;
+ bDisable = sal_False;
}
if( bDisable )
diff --git a/sw/source/ui/shells/grfshex.cxx b/sw/source/ui/shells/grfshex.cxx
index ec0cd2a6c2..da3c94dc7d 100644
--- a/sw/source/ui/shells/grfshex.cxx
+++ b/sw/source/ui/shells/grfshex.cxx
@@ -34,42 +34,28 @@
#include <wrtsh.hxx>
#include <view.hxx>
#include <docary.hxx>
-#ifndef _TEXTSH_HXX
#include <textsh.hxx>
-#endif
#include <viewopt.hxx>
#include <swundo.hxx>
-#ifndef _SHELLS_HRC
#include <shells.hrc>
-#endif
#include <caption.hxx>
#define _SVSTDARR_STRINGSSORTDTOR
#include <svl/svstdarr.hxx>
#include <svtools/filter.hxx>
#include <svx/htmlmode.hxx>
-#ifndef _DOCSH_HXX
#include <docsh.hxx>
-#endif
#include <frmfmt.hxx>
#include <frmmgr.hxx>
#include <vcl/msgbox.hxx>
-#ifndef _SVX_SVDOMEDIA_HXX
#include <svx/svdomedia.hxx>
-#endif
-#ifndef _SVX_SVDVIEW_HXX
#include <svx/svdview.hxx>
-#endif
-#ifndef _SVX_SVDPAGV_HXX
#include <svx/svdpagv.hxx>
-#endif
#include <SwStyleNameMapper.hxx>
#include <sfx2/filedlghelper.hxx>
#include <com/sun/star/ui/dialogs/XFilePickerControlAccess.hpp>
#include <com/sun/star/ui/dialogs/ExtendedFilePickerElementIds.hpp>
#include <com/sun/star/ui/dialogs/ListboxControlActions.hpp>
-#ifndef _POOLFMT_HRC
#include <poolfmt.hrc>
-#endif
#include <sfx2/request.hxx>
#include <sfx2/viewfrm.hxx>
@@ -79,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 878d18fc42..5f6f520f0e 100755
--- a/sw/source/ui/shells/langhelper.cxx
+++ b/sw/source/ui/shells/langhelper.cxx
@@ -67,14 +67,14 @@ using namespace ::com::sun::star;
namespace SwLangHelper
{
- USHORT GetLanguageStatus( OutlinerView* pOLV, SfxItemSet& rSet )
+ sal_uInt16 GetLanguageStatus( OutlinerView* pOLV, SfxItemSet& rSet )
{
ESelection aSelection = pOLV->GetSelection();
EditView& rEditView=pOLV->GetEditView();
EditEngine* pEditEngine=rEditView.GetEditEngine();
// the value of used script types
- const USHORT nScriptType =pOLV->GetSelectedScriptType();
+ const sal_uInt16 nScriptType =pOLV->GetSelectedScriptType();
String aScriptTypesInUse( String::CreateFromInt32( nScriptType ) );//pEditEngine->GetScriptType(aSelection)
SvtLanguageTable aLangTable;
@@ -185,7 +185,7 @@ namespace SwLangHelper
if (!bForSelection) // document language to be changed...
{
rSh.StartAction();
- rSh.LockView( TRUE );
+ rSh.LockView( sal_True );
rSh.Push();
// prepare to apply new language to all text in document
@@ -205,7 +205,7 @@ namespace SwLangHelper
if (bForSelection)
{
const SwViewOption* pVOpt = rView.GetWrtShellPtr()->GetViewOptions();
- ULONG nCntrl = pEditEngine->GetControlWord();
+ sal_uLong nCntrl = pEditEngine->GetControlWord();
// turn off
if (!pVOpt->IsOnlineSpell())
nCntrl &= ~EE_CNTRL_ONLINESPELLING;
@@ -227,8 +227,8 @@ namespace SwLangHelper
if (!bForSelection)
{
// need to release view and restore selection...
- rSh.Pop( FALSE );
- rSh.LockView( FALSE );
+ rSh.Pop( sal_False );
+ rSh.LockView( sal_False );
rSh.EndAction();
}
}
@@ -252,13 +252,13 @@ namespace SwLangHelper
const LanguageType nLang = SvtLanguageTable().GetType( rLangText );
if (nLang != LANGUAGE_DONTKNOW)
{
- USHORT nScriptType = SvtLanguageOptions::GetScriptTypeOfLanguage( nLang );
+ sal_uInt16 nScriptType = SvtLanguageOptions::GetScriptTypeOfLanguage( nLang );
EditEngine* pEditEngine = pOLV ? pOLV->GetEditView().GetEditEngine() : NULL;
DBG_ASSERT( !pOLV || pEditEngine, "OutlinerView without EditEngine???" );
//get ScriptType
- USHORT nLangWhichId = 0;
+ sal_uInt16 nLangWhichId = 0;
bool bIsSingleScriptType = true;
switch (nScriptType)
{
@@ -300,11 +300,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 ) );
}
}
}
@@ -318,7 +316,7 @@ namespace SwLangHelper
void SetLanguage_None( SwWrtShell &rWrtSh, OutlinerView* pOLV, ESelection aSelection, bool bIsForSelection, SfxItemSet &rCoreSet )
{
// EditEngine IDs
- const USHORT aLangWhichId_EE[3] =
+ const sal_uInt16 aLangWhichId_EE[3] =
{
EE_CHAR_LANGUAGE,
EE_CHAR_LANGUAGE_CJK,
@@ -326,7 +324,7 @@ namespace SwLangHelper
};
// Writewr IDs
- const USHORT aLangWhichId_Writer[3] =
+ const sal_uInt16 aLangWhichId_Writer[3] =
{
RES_CHRATR_LANGUAGE,
RES_CHRATR_CJK_LANGUAGE,
@@ -408,7 +406,7 @@ namespace SwLangHelper
/// If there are more than one languages used LANGUAGE_DONTKNOW will be returned.
/// @param nLangWhichId : one of
/// RES_CHRATR_LANGUAGE, RES_CHRATR_CJK_LANGUAGE, RES_CHRATR_CTL_LANGUAGE,
- LanguageType GetLanguage( SwWrtShell &rSh, USHORT nLangWhichId )
+ LanguageType GetLanguage( SwWrtShell &rSh, sal_uInt16 nLangWhichId )
{
SfxItemSet aSet( rSh.GetAttrPool(), nLangWhichId, nLangWhichId );
rSh.GetCurAttr( aSet );
@@ -416,13 +414,13 @@ namespace SwLangHelper
return GetLanguage(aSet,nLangWhichId);
}
- LanguageType GetLanguage( SfxItemSet aSet, USHORT nLangWhichId )
+ LanguageType GetLanguage( SfxItemSet aSet, sal_uInt16 nLangWhichId )
{
LanguageType nLang = LANGUAGE_SYSTEM;
const SfxPoolItem *pItem = 0;
- SfxItemState nState = aSet.GetItemState( nLangWhichId, TRUE, &pItem );
+ SfxItemState nState = aSet.GetItemState( nLangWhichId, sal_True, &pItem );
if (nState > SFX_ITEM_DEFAULT && pItem)
{
// the item is set and can be used
@@ -450,10 +448,10 @@ namespace SwLangHelper
LanguageType GetCurrentLanguage( SwWrtShell &rSh )
{
// get all script types used in current selection
- const USHORT nScriptType = rSh.GetScriptType();
+ const sal_uInt16 nScriptType = rSh.GetScriptType();
//set language attribute to use according to the script type
- USHORT nLangWhichId = 0;
+ sal_uInt16 nLangWhichId = 0;
bool bIsSingleScriptType = true;
switch (nScriptType)
{
@@ -472,7 +470,7 @@ namespace SwLangHelper
// check if all script types are set to LANGUAGE_NONE and return
// that if this is the case. Otherwise, having multiple script types
// in use always means there are several languages in use...
- const USHORT aScriptTypes[3] =
+ const sal_uInt16 aScriptTypes[3] =
{
RES_CHRATR_LANGUAGE,
RES_CHRATR_CJK_LANGUAGE,
@@ -498,10 +496,10 @@ namespace SwLangHelper
/// 'In use' means the language(s) matching the script type(s) of the
/// selected text. Or in other words, the language a spell checker would use.
/// If there is more than one language LANGUAGE_DONTKNOW will be returned.
- LanguageType GetCurrentLanguage( SfxItemSet aSet, USHORT nScriptType )
+ LanguageType GetCurrentLanguage( SfxItemSet aSet, sal_uInt16 nScriptType )
{
//set language attribute to use according to the script type
- USHORT nLangWhichId = 0;
+ sal_uInt16 nLangWhichId = 0;
bool bIsSingleScriptType = true;
switch (nScriptType)
{
@@ -520,7 +518,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 6178d5b173..ba60d44912 100644
--- a/sw/source/ui/shells/listsh.cxx
+++ b/sw/source/ui/shells/listsh.cxx
@@ -85,7 +85,7 @@ void lcl_OutlineUpDownWithSubPoints( SwWrtShell& rSh, bool bMove, bool bUp )
if ( nActPos < USHRT_MAX && rSh.IsOutlineMovable( nActPos ) )
{
rSh.Push();
- rSh.MakeOutlineSel( nActPos, nActPos, TRUE );
+ rSh.MakeOutlineSel( nActPos, nActPos, sal_True );
if ( bMove )
{
@@ -149,7 +149,7 @@ void lcl_OutlineUpDownWithSubPoints( SwWrtShell& rSh, bool bMove, bool bUp )
void SwListShell::Execute(SfxRequest &rReq)
{
const SfxItemSet* pArgs = rReq.GetArgs();
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
SwWrtShell& rSh = GetShell();
// --> FME 2005-01-04 #i35572#
@@ -167,8 +167,8 @@ void SwListShell::Execute(SfxRequest &rReq)
rReq.Done();
rSh.NumUpDown( ( nSlot == FN_NUM_BULLET_DOWN )
- ? TRUE
- : FALSE );
+ ? sal_True
+ : sal_False );
pFrame->GetBindings().Invalidate( SID_TABLE_CELL ); // StatusZeile updaten!
}
break;
@@ -187,7 +187,7 @@ void SwListShell::Execute(SfxRequest &rReq)
{
rReq.Ignore();
SfxRequest aReq( GetView().GetViewFrame(), FN_NUM_BULLET_ON );
- aReq.AppendItem( SfxBoolItem( FN_PARAM_1, FALSE ) );
+ aReq.AppendItem( SfxBoolItem( FN_PARAM_1, sal_False ) );
aReq.Done();
rSh.DelNumRules();
break;
@@ -197,7 +197,7 @@ void SwListShell::Execute(SfxRequest &rReq)
if ( bOutline )
lcl_OutlineUpDownWithSubPoints( rSh, false, false );
else
- rSh.MoveNumParas(FALSE, FALSE);
+ rSh.MoveNumParas(sal_False, sal_False);
rReq.Done();
break;
@@ -205,7 +205,7 @@ void SwListShell::Execute(SfxRequest &rReq)
if ( bOutline )
lcl_OutlineUpDownWithSubPoints( rSh, true, false );
else
- rSh.MoveNumParas(TRUE, FALSE);
+ rSh.MoveNumParas(sal_True, sal_False);
rReq.Done();
break;
@@ -213,7 +213,7 @@ void SwListShell::Execute(SfxRequest &rReq)
if ( bOutline )
lcl_OutlineUpDownWithSubPoints( rSh, true, true );
else
- rSh.MoveNumParas(TRUE, TRUE);
+ rSh.MoveNumParas(sal_True, sal_True);
rReq.Done();
break;
@@ -221,7 +221,7 @@ void SwListShell::Execute(SfxRequest &rReq)
if ( bOutline )
lcl_OutlineUpDownWithSubPoints( rSh, false, true );
else
- rSh.MoveNumParas(FALSE, TRUE);
+ rSh.MoveNumParas(sal_False, sal_True);
rReq.Done();
break;
@@ -232,8 +232,8 @@ void SwListShell::Execute(SfxRequest &rReq)
case FN_NUM_OR_NONUM:
{
- BOOL bApi = rReq.IsAPI();
- BOOL bDelete = !rSh.IsNoNum(!bApi);
+ sal_Bool bApi = rReq.IsAPI();
+ sal_Bool bDelete = !rSh.IsNoNum(!bApi);
if(pArgs )
bDelete = ((SfxBoolItem &)pArgs->Get(rReq.GetSlot())).GetValue();
rSh.NumOrNoNum( bDelete, !bApi );
@@ -251,15 +251,15 @@ void SwListShell::Execute(SfxRequest &rReq)
void SwListShell::GetState(SfxItemSet &rSet)
{
SfxWhichIter aIter( rSet );
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
SwWrtShell& rSh = GetShell();
- BYTE nCurrentNumLevel = rSh.GetNumLevel();
+ sal_uInt8 nCurrentNumLevel = rSh.GetNumLevel();
while ( nWhich )
{
switch( nWhich )
{
case FN_NUM_OR_NONUM:
- rSet.Put(SfxBoolItem(nWhich, GetShell().IsNoNum(FALSE)));
+ rSet.Put(SfxBoolItem(nWhich, GetShell().IsNoNum(sal_False)));
break;
case FN_NUM_BULLET_OUTLINE_UP:
case FN_NUM_BULLET_UP:
diff --git a/sw/source/ui/shells/mediash.cxx b/sw/source/ui/shells/mediash.cxx
index d5c3dd3ecd..c2ad81e399 100644
--- a/sw/source/ui/shells/mediash.cxx
+++ b/sw/source/ui/shells/mediash.cxx
@@ -104,10 +104,10 @@ void SwMediaShell::ExecMedia(SfxRequest &rReq)
if( pSdrView )
{
const SfxItemSet* pArgs = rReq.GetArgs();
- USHORT nSlotId = rReq.GetSlot();
- BOOL bChanged = pSdrView->GetModel()->IsChanged();
+ sal_uInt16 nSlotId = rReq.GetSlot();
+ sal_Bool bChanged = pSdrView->GetModel()->IsChanged();
- pSdrView->GetModel()->SetChanged( FALSE );
+ pSdrView->GetModel()->SetChanged( sal_False );
switch( nSlotId )
{
@@ -132,7 +132,7 @@ void SwMediaShell::ExecMedia(SfxRequest &rReq)
{
const SfxPoolItem* pItem;
- if( !pArgs || ( SFX_ITEM_SET != pArgs->GetItemState( SID_AVMEDIA_TOOLBOX, FALSE, &pItem ) ) )
+ if( !pArgs || ( SFX_ITEM_SET != pArgs->GetItemState( SID_AVMEDIA_TOOLBOX, sal_False, &pItem ) ) )
pItem = NULL;
if( pItem )
@@ -163,7 +163,7 @@ void SwMediaShell::ExecMedia(SfxRequest &rReq)
if( pSdrView->GetModel()->IsChanged() )
GetShell().SetModified();
else if( bChanged )
- pSdrView->GetModel()->SetChanged(TRUE);
+ pSdrView->GetModel()->SetChanged(sal_True);
}
}
@@ -172,7 +172,7 @@ void SwMediaShell::ExecMedia(SfxRequest &rReq)
void SwMediaShell::GetMediaState(SfxItemSet &rSet)
{
SfxWhichIter aIter( rSet );
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while( nWhich )
{
diff --git a/sw/source/ui/shells/tabsh.cxx b/sw/source/ui/shells/tabsh.cxx
index 9d4a860e18..2b7163f50b 100644
--- a/sw/source/ui/shells/tabsh.cxx
+++ b/sw/source/ui/shells/tabsh.cxx
@@ -134,7 +134,7 @@ TYPEINIT1(SwTableShell,SwBaseShell)
/************************************************************************/
-const USHORT __FAR_DATA aUITableAttrRange[] =
+const sal_uInt16 __FAR_DATA aUITableAttrRange[] =
{
FN_PARAM_TABLE_NAME, FN_PARAM_TABLE_NAME,
FN_PARAM_TABLE_HEADLINE, FN_PARAM_TABLE_HEADLINE,
@@ -161,7 +161,7 @@ const USHORT __FAR_DATA aUITableAttrRange[] =
0
};
-const USHORT* SwuiGetUITableAttrRange()
+const sal_uInt16* SwuiGetUITableAttrRange()
{
return aUITableAttrRange;
}
@@ -192,7 +192,7 @@ static SwTableRep* lcl_TableParamToItemSet( SfxItemSet& rSet, SwWrtShell &rSh )
SvxULSpaceItem aULSpace( pFmt->GetULSpace() );
rSet.Put( aULSpace );
- USHORT nBackgroundDestination = rSh.GetViewOptions()->GetTblDest();
+ sal_uInt16 nBackgroundDestination = rSh.GetViewOptions()->GetTblDest();
rSet.Put(SwBackgroundDestinationItem(SID_BACKGRND_DESTINATION, nBackgroundDestination ));
SvxBrushItem aBrush( RES_BACKGROUND );
// rSh.GetBoxBackground(aBrush);
@@ -209,12 +209,12 @@ static SwTableRep* lcl_TableParamToItemSet( SfxItemSet& rSet, SwWrtShell &rSh )
if(rSh.GetBoxDirection( aBoxDirection ))
rSet.Put(aBoxDirection, FN_TABLE_BOX_TEXTDIRECTION);
- BOOL bTableSel = rSh.IsTableMode();
+ sal_Bool bTableSel = rSh.IsTableMode();
if(!bTableSel)
{
rSh.StartAllAction();
rSh.Push();
- rSh.GetView().GetViewFrame()->GetDispatcher()->Execute( FN_TABLE_SELECT_ALL, FALSE );
+ rSh.GetView().GetViewFrame()->GetDispatcher()->Execute( FN_TABLE_SELECT_ALL, sal_False );
}
SvxBoxInfoItem aBoxInfo( SID_ATTR_BORDER_INNER );
@@ -223,7 +223,7 @@ static SwTableRep* lcl_TableParamToItemSet( SfxItemSet& rSet, SwWrtShell &rSh )
aBoxInfo.SetTable ((rSh.IsTableMode() && rSh.GetCrsrCnt() > 1) ||
!bTableSel);
// Abstandsfeld immer anzeigen
- aBoxInfo.SetDist ((BOOL) TRUE);
+ aBoxInfo.SetDist ((sal_Bool) sal_True);
// Minimalgroesse in Tabellen und Absaetzen setzen
aBoxInfo.SetMinDist( !bTableSel || rSh.IsTableMode() ||
rSh.GetSelectionType() &
@@ -248,7 +248,7 @@ static SwTableRep* lcl_TableParamToItemSet( SfxItemSet& rSet, SwWrtShell &rSh )
if(!bTableSel)
{
rSh.ClearMark();
- rSh.Pop(FALSE);
+ rSh.Pop(sal_False);
rSh.EndAllAction();
}
@@ -261,12 +261,12 @@ static SwTableRep* lcl_TableParamToItemSet( SfxItemSet& rSet, SwWrtShell &rSh )
SwTableRep* pRep = new SwTableRep( aTabCols, rSh.IsTblComplex());
pRep->SetSpace(aCols.GetRightMax());
- USHORT nPercent = 0;
+ sal_uInt16 nPercent = 0;
long nWidth = ::GetTableWidth(pFmt, aCols, &nPercent, &rSh );
// Die Tabellenbreite ist fuer relative Angaben nicht korrekt
if(nPercent)
nWidth = pRep->GetSpace() * nPercent / 100;
- USHORT nAlign = pFmt->GetHoriOrient().GetHoriOrient();
+ sal_uInt16 nAlign = pFmt->GetHoriOrient().GetHoriOrient();
pRep->SetAlign(nAlign);
SvxLRSpaceItem aLRSpace( pFmt->GetLRSpace() );
SwTwips nLeft = aLRSpace.GetLeft();
@@ -314,24 +314,24 @@ void ItemSetToTableParam( const SfxItemSet& rSet,
const SfxPoolItem* pItem = 0;
SwViewOption aUsrPref( *rSh.GetViewOptions() );
- USHORT nBackgroundDestination = aUsrPref.GetTblDest();
- if(SFX_ITEM_SET == rSet.GetItemState(SID_BACKGRND_DESTINATION, FALSE, &pItem))
+ sal_uInt16 nBackgroundDestination = aUsrPref.GetTblDest();
+ if(SFX_ITEM_SET == rSet.GetItemState(SID_BACKGRND_DESTINATION, sal_False, &pItem))
{
nBackgroundDestination = ((SfxUInt16Item*)pItem)->GetValue();
- aUsrPref.SetTblDest((BYTE)nBackgroundDestination);
+ aUsrPref.SetTblDest((sal_uInt8)nBackgroundDestination);
SW_MOD()->ApplyUsrPref(aUsrPref, &rSh.GetView());
}
- BOOL bBorder = ( SFX_ITEM_SET == rSet.GetItemState( RES_BOX ) ||
+ sal_Bool bBorder = ( SFX_ITEM_SET == rSet.GetItemState( RES_BOX ) ||
SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_BORDER_INNER ) );
pItem = 0;
- BOOL bBackground = SFX_ITEM_SET == rSet.GetItemState( RES_BACKGROUND, FALSE, &pItem );
+ sal_Bool bBackground = SFX_ITEM_SET == rSet.GetItemState( RES_BACKGROUND, sal_False, &pItem );
const SfxPoolItem* pRowItem = 0, *pTableItem = 0;
- bBackground |= SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_BRUSH_ROW, FALSE, &pRowItem );
- bBackground |= SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_BRUSH_TABLE, FALSE, &pTableItem );
+ bBackground |= SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_BRUSH_ROW, sal_False, &pRowItem );
+ bBackground |= SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_BRUSH_TABLE, sal_False, &pTableItem );
const SfxPoolItem* pSplit = 0;
- BOOL bRowSplit = SFX_ITEM_SET == rSet.GetItemState( RES_ROW_SPLIT, FALSE, &pSplit );
+ sal_Bool bRowSplit = SFX_ITEM_SET == rSet.GetItemState( RES_ROW_SPLIT, sal_False, &pSplit );
const SfxPoolItem* pBoxDirection = 0;
- BOOL bBoxDirection = SFX_ITEM_SET == rSet.GetItemState( FN_TABLE_BOX_TEXTDIRECTION, FALSE, &pBoxDirection );
+ sal_Bool bBoxDirection = SFX_ITEM_SET == rSet.GetItemState( FN_TABLE_BOX_TEXTDIRECTION, sal_False, &pBoxDirection );
if( bBackground || bBorder || bRowSplit || bBoxDirection)
{
/*
@@ -340,7 +340,7 @@ void ItemSetToTableParam( const SfxItemSet& rSet,
Der Hintergrund wird immer auf den aktuellen Zustand angewendet.
*/
- BOOL bTableSel = rSh.IsTableMode();
+ sal_Bool bTableSel = rSh.IsTableMode();
rSh.StartAllAction();
if(bBackground)
@@ -387,19 +387,19 @@ void ItemSetToTableParam( const SfxItemSet& rSet,
{
rSh.ClearMark();
}
- rSh.Pop(FALSE);
+ rSh.Pop(sal_False);
}
rSh.EndAllAction();
}
SwTabCols aTabCols;
- BOOL bTabCols = FALSE;
- BOOL bSingleLine = FALSE;
+ sal_Bool bTabCols = sal_False;
+ sal_Bool bSingleLine = sal_False;
SwTableRep* pRep = 0;
SwFrmFmt *pFmt = rSh.GetTableFmt();
SfxItemSet aSet( rSh.GetAttrPool(), RES_FRMATR_BEGIN, RES_FRMATR_END-1 );
- if(SFX_ITEM_SET == rSet.GetItemState( FN_TABLE_REP, FALSE, &pItem ))
+ if(SFX_ITEM_SET == rSet.GetItemState( FN_TABLE_REP, sal_False, &pItem ))
{
pRep = (SwTableRep*)((const SwPtrItem*)pItem)->GetValue();
@@ -415,7 +415,7 @@ void ItemSetToTableParam( const SfxItemSet& rSet,
SwFmtFrmSize aSz( ATT_VAR_SIZE, nWidth );
if(pRep->GetWidthPercent())
{
- aSz.SetWidthPercent( (BYTE)pRep->GetWidthPercent() );
+ aSz.SetWidthPercent( (sal_uInt8)pRep->GetWidthPercent() );
}
aSet.Put(aSz);
}
@@ -436,22 +436,22 @@ void ItemSetToTableParam( const SfxItemSet& rSet,
if(pRep->HasColsChanged())
{
- bTabCols = TRUE;
+ bTabCols = sal_True;
}
}
- if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_TABLE_HEADLINE, FALSE, &pItem))
+ if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_TABLE_HEADLINE, sal_False, &pItem))
rSh.SetRowsToRepeat( ((SfxUInt16Item*)pItem)->GetValue() );
- if( SFX_ITEM_SET == rSet.GetItemState( FN_TABLE_SET_VERT_ALIGN, FALSE, &pItem))
+ if( SFX_ITEM_SET == rSet.GetItemState( FN_TABLE_SET_VERT_ALIGN, sal_False, &pItem))
rSh.SetBoxAlign(((SfxUInt16Item*)(pItem))->GetValue());
- if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_TABLE_NAME, FALSE, &pItem ))
+ if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_TABLE_NAME, sal_False, &pItem ))
rSh.SetTableName( *pFmt, ((const SfxStringItem*)pItem)->GetValue() );
// kopiere die ausgesuchten Attribute in den ItemSet
- static USHORT __READONLY_DATA aIds[] =
+ static sal_uInt16 __READONLY_DATA aIds[] =
{
RES_PAGEDESC,
RES_BREAK,
@@ -465,8 +465,8 @@ void ItemSetToTableParam( const SfxItemSet& rSet,
// <-- collapsing borders
0
};
- for( const USHORT* pIds = aIds; *pIds; ++pIds )
- if( SFX_ITEM_SET == rSet.GetItemState( *pIds, FALSE, &pItem))
+ for( const sal_uInt16* pIds = aIds; *pIds; ++pIds )
+ if( SFX_ITEM_SET == rSet.GetItemState( *pIds, sal_False, &pItem))
aSet.Put( *pItem );
if( aSet.Count() )
@@ -503,22 +503,22 @@ static void lcl_TabGetMaxLineWidth(const SvxBorderLine* pBorderLine, SvxBorderLi
void SwTableShell::Execute(SfxRequest &rReq)
{
- BOOL bUseDialog = TRUE;
+ sal_Bool bUseDialog = sal_True;
const SfxItemSet* pArgs = rReq.GetArgs();
SwWrtShell &rSh = GetShell();
//Erstmal die Slots, die keinen FrmMgr benoetigen.
- BOOL bMore = FALSE;
+ sal_Bool bMore = sal_False;
const SfxPoolItem* pItem = 0;
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
if(pArgs)
- pArgs->GetItemState(GetPool().GetWhich(nSlot), FALSE, &pItem);
- BOOL bCallDone = FALSE;
+ pArgs->GetItemState(GetPool().GetWhich(nSlot), sal_False, &pItem);
+ sal_Bool bCallDone = sal_False;
switch ( nSlot )
{
case SID_ATTR_BORDER:
{
-/* BOOL bPopCrsr = FALSE;
+/* sal_Bool bPopCrsr = sal_False;
if ( !rReq.IsAPI() )
{
//Keine Tabellenselektion -> Aenderung wird auf die gesamte
@@ -526,7 +526,7 @@ void SwTableShell::Execute(SfxRequest &rReq)
if ( !rSh.IsTableMode() )
{
rSh.StartAction();
- bPopCrsr = TRUE;
+ bPopCrsr = sal_True;
rSh.Push();
rSh.EnterStdMode();
rSh.MoveTable( fnTableCurr, fnTableStart );
@@ -549,29 +549,29 @@ void SwTableShell::Execute(SfxRequest &rReq)
const SvxBoxItem& rCoreBox = (const SvxBoxItem&)
aCoreSet.Get(RES_BOX);
const SfxPoolItem *pBoxItem = 0;
- if ( pArgs->GetItemState(RES_BOX, TRUE, &pBoxItem) == SFX_ITEM_SET )
+ if ( pArgs->GetItemState(RES_BOX, sal_True, &pBoxItem) == SFX_ITEM_SET )
{
aBox = *(SvxBoxItem*)pBoxItem;
if ( !rReq.IsAPI() )
- aBox.SetDistance( Max(rCoreBox.GetDistance(),USHORT(55)) );
+ aBox.SetDistance( Max(rCoreBox.GetDistance(),sal_uInt16(55)) );
else if ( aBox.GetDistance() < MIN_BORDER_DIST )
- aBox.SetDistance( Max(rCoreBox.GetDistance(),(USHORT)MIN_BORDER_DIST) );
+ aBox.SetDistance( Max(rCoreBox.GetDistance(),(sal_uInt16)MIN_BORDER_DIST) );
}
else
{ASSERT( !this, "Wo ist das Box-Item?" )}
//since the drawing layer also supports borders the which id might be a different one
SvxBoxInfoItem aInfo( SID_ATTR_BORDER_INNER );
- if (pArgs->GetItemState(SID_ATTR_BORDER_INNER, TRUE, &pBoxItem) == SFX_ITEM_SET)
+ if (pArgs->GetItemState(SID_ATTR_BORDER_INNER, sal_True, &pBoxItem) == SFX_ITEM_SET)
aInfo = *(SvxBoxInfoItem*)pBoxItem;
- else if( pArgs->GetItemState(SDRATTR_TABLE_BORDER_INNER, TRUE, &pBoxItem) == SFX_ITEM_SET )
+ else if( pArgs->GetItemState(SDRATTR_TABLE_BORDER_INNER, sal_True, &pBoxItem) == SFX_ITEM_SET )
{
aInfo = *(SvxBoxInfoItem*)pBoxItem;
aInfo.SetWhich(SID_ATTR_BORDER_INNER);
}
- aInfo.SetTable( TRUE );
- aInfo.SetValid( VALID_DISABLE, FALSE );
+ aInfo.SetTable( sal_True );
+ aInfo.SetValid( VALID_DISABLE, sal_False );
// Die Attribute aller Linien werden gelesen und das staerkste gewinnt
@@ -596,19 +596,19 @@ void SwTableShell::Execute(SfxRequest &rReq)
aBorderLine.SetOutWidth(DEF_LINE_WIDTH_0);
}
- BOOL bLine = FALSE;
+ sal_Bool bLine = sal_False;
if ( (pBorderLine = aBox.GetTop()) != NULL)
- aBox.SetLine(&aBorderLine, BOX_LINE_TOP), bLine |= TRUE;
+ aBox.SetLine(&aBorderLine, BOX_LINE_TOP), bLine |= sal_True;
if ((pBorderLine = aBox.GetBottom()) != NULL)
- aBox.SetLine(&aBorderLine, BOX_LINE_BOTTOM), bLine |= TRUE;
+ aBox.SetLine(&aBorderLine, BOX_LINE_BOTTOM), bLine |= sal_True;
if ((pBorderLine = aBox.GetLeft()) != NULL)
- aBox.SetLine(&aBorderLine, BOX_LINE_LEFT), bLine |= TRUE;
+ aBox.SetLine(&aBorderLine, BOX_LINE_LEFT), bLine |= sal_True;
if ((pBorderLine = aBox.GetRight()) != NULL)
- aBox.SetLine(&aBorderLine, BOX_LINE_RIGHT), bLine |= TRUE;
+ aBox.SetLine(&aBorderLine, BOX_LINE_RIGHT), bLine |= sal_True;
if ((pBorderLine = aInfo.GetHori()) != NULL)
- aInfo.SetLine(&aBorderLine, BOXINFO_LINE_HORI), bLine |= TRUE;
+ aInfo.SetLine(&aBorderLine, BOXINFO_LINE_HORI), bLine |= sal_True;
if ((pBorderLine = aInfo.GetVert()) != NULL)
- aInfo.SetLine(&aBorderLine, BOXINFO_LINE_VERT), bLine |= TRUE;
+ aInfo.SetLine(&aBorderLine, BOXINFO_LINE_VERT), bLine |= sal_True;
// if ( bPopCrsr && !bLine )
// aBox.SetDistance( 0 );
@@ -622,12 +622,12 @@ void SwTableShell::Execute(SfxRequest &rReq)
// the SvxBoxItem
rReq.AppendItem( aBox );
rReq.AppendItem( aInfo );
- bCallDone = TRUE;
+ bCallDone = sal_True;
/* if ( bPopCrsr )
{
rSh.KillPams();
- rSh.Pop(FALSE);
+ rSh.Pop(sal_False);
rSh.EndAction();
}*/
}
@@ -643,7 +643,7 @@ void SwTableShell::Execute(SfxRequest &rReq)
SfxItemSet aCoreSet( GetPool(), aUITableAttrRange);
FieldUnit eMetric = ::GetDfltMetric(0 != PTR_CAST(SwWebView, &rSh.GetView()));
- SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< UINT16 >(eMetric)));
+ SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric)));
SwTableRep* pTblRep = ::lcl_TableParamToItemSet( aCoreSet, rSh );
SfxAbstractTabDialog * pDlg = NULL;
if ( bUseDialog )
@@ -695,7 +695,7 @@ void SwTableShell::Execute(SfxRequest &rReq)
if(pView)
{
FieldUnit eMetric = ::GetDfltMetric(0 != PTR_CAST(SwWebView, pView));
- SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< UINT16 >(eMetric)));
+ SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric)));
SvNumberFormatter* pFormatter = rSh.GetNumberFormatter();
SfxItemSet aCoreSet( GetPool(),
SID_ATTR_NUMBERFORMAT_VALUE, SID_ATTR_NUMBERFORMAT_VALUE,
@@ -743,13 +743,13 @@ void SwTableShell::Execute(SfxRequest &rReq)
const sal_uInt32* pDelArr = ((SvxNumberInfoItem*)
pNumberFormatItem)->GetDelArray();
- for ( USHORT i = 0; i < ((SvxNumberInfoItem*)pNumberFormatItem)->GetDelCount(); i++ )
+ for ( sal_uInt16 i = 0; i < ((SvxNumberInfoItem*)pNumberFormatItem)->GetDelCount(); i++ )
((SvxNumberInfoItem*)pNumberFormatItem)->
GetNumberFormatter()->DeleteEntry( pDelArr[i] );
}
if( SFX_ITEM_SET == pDlg->GetOutputItemSet()->GetItemState(
- SID_ATTR_NUMBERFORMAT_VALUE, FALSE, &pNumberFormatItem ))
+ SID_ATTR_NUMBERFORMAT_VALUE, sal_False, &pNumberFormatItem ))
{
SfxItemSet aBoxFormatSet( *aCoreSet.GetPool(),
RES_BOXATR_FORMAT, RES_BOXATR_FORMAT );
@@ -765,53 +765,53 @@ void SwTableShell::Execute(SfxRequest &rReq)
break;
case FN_CALC_TABLE:
rSh.UpdateTable();
- bCallDone = TRUE;
+ bCallDone = sal_True;
break;
case FN_TABLE_OPTIMAL_HEIGHT:
{
const SwFmtFrmSize aSz;
rSh.SetRowHeight( aSz );
- bCallDone = TRUE;
+ bCallDone = sal_True;
}
break;
case FN_TABLE_DELETE_COL:
if ( rSh.DeleteCol() && rSh.HasSelection() )
rSh.EnterStdMode();
- bCallDone = TRUE;
+ bCallDone = sal_True;
break;
case FN_END_TABLE:
rSh.MoveTable( fnTableCurr, fnTableEnd );
- bCallDone = TRUE;
+ bCallDone = sal_True;
break;
case FN_START_TABLE:
rSh.MoveTable( fnTableCurr, fnTableStart );
- bCallDone = TRUE;
+ bCallDone = sal_True;
break;
case FN_GOTO_NEXT_CELL:
{
- BOOL bAppendLine = TRUE;
+ sal_Bool bAppendLine = sal_True;
if( pItem )
bAppendLine = ((SfxBoolItem*)pItem)->GetValue();
rReq.SetReturnValue( SfxBoolItem( nSlot,
rSh.GoNextCell( bAppendLine ) ) );
- bCallDone = TRUE;
+ bCallDone = sal_True;
}
break;
case FN_GOTO_PREV_CELL:
rReq.SetReturnValue( SfxBoolItem( nSlot, rSh.GoPrevCell() ) );
- bCallDone = TRUE;
+ bCallDone = sal_True;
break;
case FN_TABLE_DELETE_ROW:
if ( rSh.DeleteRow() && rSh.HasSelection() )
rSh.EnterStdMode();
- bCallDone = TRUE;
+ bCallDone = sal_True;
break;
case FN_TABLE_MERGE_CELLS:
if ( rSh.IsTableMode() )
switch ( rSh.MergeTab() )
{
case TBLMERGE_OK:
- bCallDone = TRUE;
+ bCallDone = sal_True;
//no break;
case TBLMERGE_NOSELECTION: break;
case TBLMERGE_TOOCOMPLEX:
@@ -827,7 +827,7 @@ void SwTableShell::Execute(SfxRequest &rReq)
case FN_TABLE_ADJUST_CELLS:
case FN_TABLE_BALANCE_CELLS:
{
- BOOL bBalance = (FN_TABLE_BALANCE_CELLS == nSlot);
+ sal_Bool bBalance = (FN_TABLE_BALANCE_CELLS == nSlot);
if ( rSh.IsAdjustCellWidthAllowed(bBalance) )
{
{
@@ -836,13 +836,13 @@ void SwTableShell::Execute(SfxRequest &rReq)
}
rSh.AdjustCellWidth(bBalance);
}
- bCallDone = TRUE;
+ bCallDone = sal_True;
}
break;
case FN_TABLE_BALANCE_ROWS:
- if ( rSh.BalanceRowHeight(TRUE) )
- rSh.BalanceRowHeight(FALSE);
- bCallDone = TRUE;
+ if ( rSh.BalanceRowHeight(sal_True) )
+ rSh.BalanceRowHeight(sal_False);
+ bCallDone = sal_True;
break;
case FN_TABLE_SELECT_ALL:
rSh.EnterStdMode();
@@ -850,26 +850,26 @@ void SwTableShell::Execute(SfxRequest &rReq)
rSh.SttSelect();
rSh.MoveTable( fnTableCurr, fnTableEnd );
rSh.EndSelect();
- bCallDone = TRUE;
+ bCallDone = sal_True;
break;
case FN_TABLE_SELECT_COL:
rSh.EnterStdMode();
rSh.SelectTableCol();
- bCallDone = TRUE;
+ bCallDone = sal_True;
break;
case FN_TABLE_SELECT_ROW:
rSh.EnterStdMode();
rSh.SelectTableRow();
- bCallDone = TRUE;
+ bCallDone = sal_True;
break;
case FN_TABLE_SET_READ_ONLY_CELLS:
rSh.ProtectCells();
- rSh.ResetSelect( 0, FALSE );
- bCallDone = TRUE;
+ rSh.ResetSelect( 0, sal_False );
+ bCallDone = sal_True;
break;
case FN_TABLE_UNSET_READ_ONLY_CELLS:
rSh.UnProtectCells();
- bCallDone = TRUE;
+ bCallDone = sal_True;
break;
case SID_AUTOFORMAT:
{
@@ -901,13 +901,13 @@ void SwTableShell::Execute(SfxRequest &rReq)
case FN_TABLE_INSERT_COL:
case FN_TABLE_INSERT_ROW:
{
- BOOL bColumn = rReq.GetSlot() == FN_TABLE_INSERT_COL;
- USHORT nCount = 0;
- BOOL bAfter = TRUE;
+ sal_Bool bColumn = rReq.GetSlot() == FN_TABLE_INSERT_COL;
+ sal_uInt16 nCount = 0;
+ sal_Bool bAfter = sal_True;
if (pItem)
{
nCount = ((const SfxInt16Item* )pItem)->GetValue();
- if(SFX_ITEM_SET == pArgs->GetItemState(FN_PARAM_INSERT_AFTER, TRUE, &pItem))
+ if(SFX_ITEM_SET == pArgs->GetItemState(FN_PARAM_INSERT_AFTER, sal_True, &pItem))
bAfter = ((const SfxBoolItem* )pItem)->GetValue();
}
else if( !rReq.IsAPI() )
@@ -951,7 +951,7 @@ void SwTableShell::Execute(SfxRequest &rReq)
}
// <--
- bCallDone = TRUE;
+ bCallDone = sal_True;
break;
}
@@ -969,8 +969,8 @@ void SwTableShell::Execute(SfxRequest &rReq)
if( pDlg.get() && (pDlg->Execute() == 1) )
{
- USHORT nDispatchSlot = (nSlot == FN_TABLE_INSERT_COL_DLG) ? FN_TABLE_INSERT_COL : FN_TABLE_INSERT_ROW;
- SfxUInt16Item aCountItem( nDispatchSlot, static_cast< UINT16 >(pDlg->getInsertCount()) );
+ sal_uInt16 nDispatchSlot = (nSlot == FN_TABLE_INSERT_COL_DLG) ? FN_TABLE_INSERT_COL : FN_TABLE_INSERT_ROW;
+ SfxUInt16Item aCountItem( nDispatchSlot, static_cast< sal_uInt16 >(pDlg->getInsertCount()) );
SfxBoolItem aAfter( FN_PARAM_INSERT_AFTER, !pDlg->isInsertBefore() );
SfxViewFrame* pVFrame = GetView().GetViewFrame();
if( pVFrame )
@@ -982,8 +982,8 @@ void SwTableShell::Execute(SfxRequest &rReq)
case FN_TABLE_SPLIT_CELLS:
{
long nCount=0;
- BOOL bHorizontal=TRUE;
- BOOL bProportional = FALSE;
+ sal_Bool bHorizontal=sal_True;
+ sal_Bool bProportional = sal_False;
SFX_REQUEST_ARG( rReq, pSplit, SfxInt32Item, FN_TABLE_SPLIT_CELLS, sal_False );
SFX_REQUEST_ARG( rReq, pHor, SfxBoolItem, FN_PARAM_1, sal_False );
SFX_REQUEST_ARG( rReq, pProp, SfxBoolItem, FN_PARAM_2, sal_False );
@@ -1017,8 +1017,8 @@ void SwTableShell::Execute(SfxRequest &rReq)
if ( nCount>1 )
{
- rSh.SplitTab(!bHorizontal, static_cast< USHORT >( nCount-1 ), bProportional );
- bCallDone = TRUE;
+ rSh.SplitTab(!bHorizontal, static_cast< sal_uInt16 >( nCount-1 ), bProportional );
+ bCallDone = sal_True;
}
else
rReq.Ignore();
@@ -1058,8 +1058,8 @@ void SwTableShell::Execute(SfxRequest &rReq)
case FN_TABLE_MERGE_TABLE:
{
- BOOL bPrev = rSh.CanMergeTable( TRUE );
- BOOL bNext = rSh.CanMergeTable( FALSE );
+ sal_Bool bPrev = rSh.CanMergeTable( sal_True );
+ sal_Bool bNext = rSh.CanMergeTable( sal_False );
if( bPrev && bNext )
{
@@ -1068,7 +1068,7 @@ void SwTableShell::Execute(SfxRequest &rReq)
VclAbstractDialog* pDlg = pFact->CreateSwVclDialog( DLG_MERGE_TABLE, GetView().GetWindow(), bPrev );
DBG_ASSERT(pDlg, "dialogdiet pDlg fail!");
if( RET_OK != pDlg->Execute())
- bPrev = bNext = FALSE;
+ bPrev = bNext = sal_False;
delete pDlg;
}
@@ -1087,21 +1087,21 @@ void SwTableShell::Execute(SfxRequest &rReq)
: TBLVAR_CHGABS ) );
SfxBindings& rBind = GetView().GetViewFrame()->GetBindings();
- static USHORT __READONLY_DATA aInva[] =
+ static sal_uInt16 __READONLY_DATA aInva[] =
{ FN_TABLE_MODE_FIX,
FN_TABLE_MODE_FIX_PROP,
FN_TABLE_MODE_VARIABLE,
0
};
rBind.Invalidate( aInva );
- bCallDone = TRUE;
+ bCallDone = sal_True;
}
break;
case FN_TABLE_AUTOSUM:
{
SfxViewFrame* pVFrame = GetView().GetViewFrame();
pVFrame->GetDispatcher()->Execute(FN_EDIT_FORMULA, SFX_CALLMODE_SYNCHRON);
- const USHORT nId = SwInputChild::GetChildWindowId();
+ const sal_uInt16 nId = SwInputChild::GetChildWindowId();
SwInputChild* pChildWin = (SwInputChild*)pVFrame->
GetChildWindow( nId );
String sSum;
@@ -1133,7 +1133,7 @@ void SwTableShell::Execute(SfxRequest &rReq)
return;
//break;
default:
- bMore = TRUE;
+ bMore = sal_True;
}
if ( !bMore )
@@ -1143,7 +1143,7 @@ void SwTableShell::Execute(SfxRequest &rReq)
return;
}
else
- bMore = FALSE;
+ bMore = sal_False;
//Jetzt die Slots, die direkt auf dem TableFmt arbeiten.
SwFrmFmt *pFmt = rSh.GetTableFmt();
switch ( nSlot )
@@ -1178,7 +1178,7 @@ void SwTableShell::Execute(SfxRequest &rReq)
// der letzte case-Zweig der noch einen TabellenManager braucht!!
case FN_TABLE_SET_COL_WIDTH:
{
- SwTableFUNC aMgr( &rSh, FALSE);
+ SwTableFUNC aMgr( &rSh, sal_False);
aMgr.ColWidthDlg(GetView().GetWindow());
}
break;
@@ -1186,12 +1186,12 @@ void SwTableShell::Execute(SfxRequest &rReq)
case FN_TABLE_VERT_CENTER:
case FN_TABLE_VERT_BOTTOM:
{
- USHORT nAlign = nSlot == FN_TABLE_VERT_NONE ?
+ sal_uInt16 nAlign = nSlot == FN_TABLE_VERT_NONE ?
text::VertOrientation::NONE :
nSlot == FN_TABLE_VERT_CENTER ?
text::VertOrientation::CENTER : text::VertOrientation::BOTTOM;
rSh.SetBoxAlign(nAlign);
- bCallDone = TRUE;
+ bCallDone = sal_True;
}
break;
@@ -1225,7 +1225,7 @@ void SwTableShell::Execute(SfxRequest &rReq)
if(pSplit)
pSplit->SetValue(!pSplit->GetValue());
else
- pSplit = new SwFmtRowSplit(TRUE);
+ pSplit = new SwFmtRowSplit(sal_True);
}
else
{
@@ -1255,7 +1255,7 @@ void SwTableShell::GetState(SfxItemSet &rSet)
// os #124829# crash report: in case of an invalid shell selection return immediately
if(!pFmt)
return;
- USHORT nSlot = aIter.FirstWhich();
+ sal_uInt16 nSlot = aIter.FirstWhich();
while ( nSlot )
{
switch ( nSlot )
@@ -1270,19 +1270,19 @@ void SwTableShell::GetState(SfxItemSet &rSet)
break;
case FN_TABLE_BALANCE_CELLS:
- if ( !rSh.IsAdjustCellWidthAllowed(TRUE) )
+ if ( !rSh.IsAdjustCellWidthAllowed(sal_True) )
rSet.DisableItem(FN_TABLE_BALANCE_CELLS);
break;
case FN_TABLE_BALANCE_ROWS:
- if ( !rSh.BalanceRowHeight(TRUE) )
+ if ( !rSh.BalanceRowHeight(sal_True) )
rSet.DisableItem(FN_TABLE_BALANCE_ROWS);
break;
case FN_OPTIMIZE_TABLE:
if ( !rSh.IsTableMode() &&
!rSh.IsAdjustCellWidthAllowed() &&
- !rSh.IsAdjustCellWidthAllowed(TRUE) &&
- !rSh.BalanceRowHeight(TRUE) )
+ !rSh.IsAdjustCellWidthAllowed(sal_True) &&
+ !rSh.BalanceRowHeight(sal_True) )
rSet.DisableItem(FN_OPTIMIZE_TABLE);
break;
case SID_INSERT_DIAGRAM:
@@ -1329,8 +1329,8 @@ void SwTableShell::GetState(SfxItemSet &rSet)
case FN_TABLE_VERT_CENTER:
case FN_TABLE_VERT_BOTTOM:
{
- USHORT nAlign = rSh.GetBoxAlign();
- BOOL bSet = (nSlot == FN_TABLE_VERT_NONE && nAlign == text::VertOrientation::NONE) ||
+ sal_uInt16 nAlign = rSh.GetBoxAlign();
+ sal_Bool bSet = (nSlot == FN_TABLE_VERT_NONE && nAlign == text::VertOrientation::NONE) ||
(nSlot == FN_TABLE_VERT_CENTER && nAlign == text::VertOrientation::CENTER) ||
(nSlot == FN_TABLE_VERT_BOTTOM && nAlign == text::VertOrientation::BOTTOM);
rSet.Put(SfxBoolItem(nSlot, bSet));
@@ -1342,7 +1342,7 @@ void SwTableShell::GetState(SfxItemSet &rSet)
case FN_TABLE_MODE_VARIABLE :
{
TblChgMode nMode = rSh.GetTblChgMode();
- BOOL bSet = (nSlot == FN_TABLE_MODE_FIX && nMode == TBLFIX_CHGABS) ||
+ sal_Bool bSet = (nSlot == FN_TABLE_MODE_FIX && nMode == TBLFIX_CHGABS) ||
(nSlot == FN_TABLE_MODE_FIX_PROP && nMode == TBLFIX_CHGPROP) ||
(nSlot == FN_TABLE_MODE_VARIABLE && nMode == TBLVAR_CHGABS);
rSet.Put(SfxBoolItem(nSlot, bSet));
@@ -1364,8 +1364,8 @@ void SwTableShell::GetState(SfxItemSet &rSet)
break;
case FN_TABLE_MERGE_TABLE:
{
- BOOL bAsk;
- if( !rSh.CanMergeTable( TRUE, &bAsk ))
+ sal_Bool bAsk;
+ if( !rSh.CanMergeTable( sal_True, &bAsk ))
rSet.DisableItem( nSlot );
}
break;
@@ -1469,14 +1469,14 @@ void SwTableShell::ExecTableStyle(SfxRequest& rReq)
case SID_FRAME_LINECOLOR:
{
/* Tabellenselektion ist abgeschafft
- BOOL bPopCrsr = FALSE;
+ sal_Bool bPopCrsr = sal_False;
if ( !rReq.IsAPI() )
{
//Keine Tabellenselektion -> Aenderung wird auf die gesamte
//Tabelle.
if ( !rSh.IsTableMode() )
{
- bPopCrsr = TRUE;
+ bPopCrsr = sal_True;
rSh.Push();
rSh.StartAction();
rSh.EnterStdMode();
@@ -1491,7 +1491,7 @@ void SwTableShell::ExecTableStyle(SfxRequest& rReq)
const SvxLineItem &rLineItem = (const SvxLineItem&)pArgs->
Get( SID_FRAME_LINESTYLE );
const SvxBorderLine* pBorderLine = rLineItem.GetLine();
- rSh.SetTabLineStyle( 0, TRUE, pBorderLine);
+ rSh.SetTabLineStyle( 0, sal_True, pBorderLine);
}
else
{
@@ -1504,7 +1504,7 @@ void SwTableShell::ExecTableStyle(SfxRequest& rReq)
/* if ( bPopCrsr )
{
rSh.KillPams();
- rSh.Pop(FALSE);
+ rSh.Pop(sal_False);
rSh.EndAction();
}*/
break;
@@ -1538,15 +1538,15 @@ void SwTableShell::ExecNumberFormat(SfxRequest& rReq)
//Erstmal die Slots, die keinen FrmMgr benoetigen.
const SfxPoolItem* pItem = 0;
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
if(pArgs)
- pArgs->GetItemState(GetPool().GetWhich(nSlot), FALSE, &pItem);
+ pArgs->GetItemState(GetPool().GetWhich(nSlot), sal_False, &pItem);
// Sprache immer von Cursorposition besorgen
LanguageType eLang = rSh.GetCurLang();
SvNumberFormatter* pFormatter = rSh.GetNumberFormatter();
sal_uInt32 nNumberFormat = NUMBERFORMAT_ENTRY_NOT_FOUND;
- USHORT nFmtType = 0, nOffset = 0;
+ sal_uInt16 nFmtType = 0, nOffset = 0;
switch ( nSlot )
{
@@ -1580,7 +1580,7 @@ void SwTableShell::ExecNumberFormat(SfxRequest& rReq)
break;
default:
- ASSERT(FALSE, falscher Dispatcher);
+ ASSERT(sal_False, falscher Dispatcher);
return;
}
diff --git a/sw/source/ui/shells/textdrw.cxx b/sw/source/ui/shells/textdrw.cxx
index e4d1bc8179..584da30a17 100644
--- a/sw/source/ui/shells/textdrw.cxx
+++ b/sw/source/ui/shells/textdrw.cxx
@@ -69,7 +69,7 @@ void SwBaseShell::InsertURLButton(const String& rURL, const String& rTarget, con
SdrView *pSdrView = rSh.GetDrawView();
// OBJ_FM_BUTTON
- pSdrView->SetDesignMode(TRUE);
+ pSdrView->SetDesignMode(sal_True);
pSdrView->SetCurrentObj(OBJ_FM_BUTTON);
pSdrView->SetEditMode(sal_False);
diff --git a/sw/source/ui/shells/textfld.cxx b/sw/source/ui/shells/textfld.cxx
index 1c1efba2cd..01f20a1bc4 100644
--- a/sw/source/ui/shells/textfld.cxx
+++ b/sw/source/ui/shells/textfld.cxx
@@ -85,11 +85,11 @@
using namespace nsSwDocInfoSubType;
-extern BOOL bNoInterrupt; // in mainwn.cxx
+extern sal_Bool bNoInterrupt; // in mainwn.cxx
-String& lcl_AppendRedlineStr( String& rStr, USHORT nRedlId )
+String& lcl_AppendRedlineStr( String& rStr, sal_uInt16 nRedlId )
{
- USHORT nResId = 0;
+ sal_uInt16 nResId = 0;
switch( nRedlId )
{
case nsRedlineType_t::REDLINE_INSERT: nResId = STR_REDLINE_INSERTED; break;
@@ -110,17 +110,17 @@ void SwTextShell::ExecField(SfxRequest &rReq)
SwWrtShell& rSh = GetShell();
const SfxPoolItem* pItem = 0;
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
const SfxItemSet* pArgs = rReq.GetArgs();
if(pArgs)
- pArgs->GetItemState(GetPool().GetWhich(nSlot), FALSE, &pItem);
+ pArgs->GetItemState(GetPool().GetWhich(nSlot), sal_False, &pItem);
Window *pMDI = &GetView().GetViewFrame()->GetWindow();
- BOOL bMore = FALSE;
- BOOL bIsText = TRUE;
- USHORT nInsertType = 0;
- USHORT nInsertSubType = 0;
- ULONG nInsertFormat = 0;
+ sal_Bool bMore = sal_False;
+ sal_Bool bIsText = sal_True;
+ sal_uInt16 nInsertType = 0;
+ sal_uInt16 nInsertSubType = 0;
+ sal_uLong nInsertFormat = 0;
switch(nSlot)
{
@@ -138,7 +138,7 @@ void SwTextShell::ExecField(SfxRequest &rReq)
if(rLink.IsVisible())
{
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
- SfxAbstractLinksDialog* pDlg = pFact->CreateLinksDialog( pMDI, &rSh.GetLinkManager(), FALSE, &rLink );
+ SfxAbstractLinksDialog* pDlg = pFact->CreateLinksDialog( pMDI, &rSh.GetLinkManager(), sal_False, &rLink );
if ( pDlg )
{
pDlg->Execute();
@@ -168,7 +168,7 @@ void SwTextShell::ExecField(SfxRequest &rReq)
{
const String& rMacro = ((SwMacroField*)pFld)->GetMacro();
- USHORT nPos = rMacro.Search('.', 0);
+ sal_uInt16 nPos = rMacro.Search('.', 0);
if(nPos != STRING_NOTFOUND)
{
SvxMacro aMacro( rMacro.Copy(nPos + 1), rMacro.Copy(0,nPos), STARBASIC );
@@ -181,14 +181,14 @@ void SwTextShell::ExecField(SfxRequest &rReq)
case FN_GOTO_NEXT_INPUTFLD:
case FN_GOTO_PREV_INPUTFLD:
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
SwFieldType* pFld = rSh.GetFldType( 0, RES_INPUTFLD );
if( pFld && rSh.MoveFldType( pFld,
FN_GOTO_NEXT_INPUTFLD == nSlot ))
{
rSh.ClearMark();
- rSh.StartInputFldDlg( rSh.GetCurFld(), FALSE );
- bRet = TRUE;
+ rSh.StartInputFldDlg( rSh.GetCurFld(), sal_False );
+ bRet = sal_True;
}
rReq.SetReturnValue( SfxBoolItem( nSlot, bRet ));
@@ -196,7 +196,7 @@ void SwTextShell::ExecField(SfxRequest &rReq)
break;
default:
- bMore = TRUE;
+ bMore = sal_True;
}
if(bMore)
{
@@ -206,40 +206,40 @@ void SwTextShell::ExecField(SfxRequest &rReq)
{
case FN_INSERT_DBFIELD:
{
- BOOL bRes = FALSE;
+ sal_Bool bRes = sal_False;
if( pItem )
{
- ULONG nFormat = 0;
- USHORT nType = 0;
+ sal_uLong nFormat = 0;
+ sal_uInt16 nType = 0;
String aPar1 = ((SfxStringItem *)pItem)->GetValue();
String aPar2;
sal_Int32 nCommand = 0;
if( SFX_ITEM_SET == pArgs->GetItemState( FN_PARAM_FIELD_TYPE,
- FALSE, &pItem ))
+ sal_False, &pItem ))
nType = ((SfxUInt16Item *)pItem)->GetValue();
aPar1 += DB_DELIM;
if( SFX_ITEM_SET == pArgs->GetItemState(
- FN_PARAM_1, FALSE, &pItem ))
+ FN_PARAM_1, sal_False, &pItem ))
{
aPar1 += ((SfxStringItem *)pItem)->GetValue();
}
if( SFX_ITEM_SET == pArgs->GetItemState(
- FN_PARAM_3, FALSE, &pItem ))
+ FN_PARAM_3, sal_False, &pItem ))
nCommand = ((SfxInt32Item*)pItem)->GetValue();
aPar1 += DB_DELIM;
aPar1 += String::CreateFromInt32(nCommand);
aPar1 += DB_DELIM;
if( SFX_ITEM_SET == pArgs->GetItemState(
- FN_PARAM_2, FALSE, &pItem ))
+ FN_PARAM_2, sal_False, &pItem ))
{
aPar1 += ((SfxStringItem *)pItem)->GetValue();
}
if( SFX_ITEM_SET == pArgs->GetItemState(
- FN_PARAM_FIELD_CONTENT, FALSE, &pItem ))
+ FN_PARAM_FIELD_CONTENT, sal_False, &pItem ))
aPar2 = ((SfxStringItem *)pItem)->GetValue();
if( SFX_ITEM_SET == pArgs->GetItemState(
- FN_PARAM_FIELD_FORMAT, FALSE, &pItem ))
+ FN_PARAM_FIELD_FORMAT, sal_False, &pItem ))
nFormat = ((SfxUInt32Item *)pItem)->GetValue();
DBG_WARNING("Command is not yet used");
sal_Unicode cSeparator = ' ';
@@ -252,30 +252,30 @@ void SwTextShell::ExecField(SfxRequest &rReq)
case FN_INSERT_FIELD_CTRL:
case FN_INSERT_FIELD:
{
- BOOL bRes = FALSE;
+ sal_Bool bRes = sal_False;
if( pItem && nSlot != FN_INSERT_FIELD_CTRL)
{
- ULONG nFormat = 0;
- USHORT nType = 0;
- USHORT nSubType = 0;
+ sal_uLong nFormat = 0;
+ sal_uInt16 nType = 0;
+ sal_uInt16 nSubType = 0;
String aPar1 = ((SfxStringItem *)pItem)->GetValue();
String aPar2;
sal_Unicode cSeparator = ' ';
if( SFX_ITEM_SET == pArgs->GetItemState( FN_PARAM_FIELD_TYPE,
- FALSE, &pItem ))
+ sal_False, &pItem ))
nType = ((SfxUInt16Item *)pItem)->GetValue();
if( SFX_ITEM_SET == pArgs->GetItemState( FN_PARAM_FIELD_SUBTYPE,
- FALSE, &pItem ))
+ sal_False, &pItem ))
nSubType = ((SfxUInt16Item *)pItem)->GetValue();
if( SFX_ITEM_SET == pArgs->GetItemState(
- FN_PARAM_FIELD_CONTENT, FALSE, &pItem ))
+ FN_PARAM_FIELD_CONTENT, sal_False, &pItem ))
aPar2 = ((SfxStringItem *)pItem)->GetValue();
if( SFX_ITEM_SET == pArgs->GetItemState(
- FN_PARAM_FIELD_FORMAT, FALSE, &pItem ))
+ FN_PARAM_FIELD_FORMAT, sal_False, &pItem ))
nFormat = ((SfxUInt32Item *)pItem)->GetValue();
if( SFX_ITEM_SET == pArgs->GetItemState(
- FN_PARAM_3, FALSE, &pItem ))
+ FN_PARAM_3, sal_False, &pItem ))
{
String sTmp = ((SfxStringItem *)pItem)->GetValue();
if(sTmp.Len())
@@ -306,7 +306,7 @@ void SwTextShell::ExecField(SfxRequest &rReq)
pVFrame->ToggleChildWindow(FN_INSERT_FIELD); // Dialog anzeigen
// Flddlg auf neue TabPage umschalten
- USHORT nId = SwFldDlgWrapper::GetChildWindowId();
+ sal_uInt16 nId = SwFldDlgWrapper::GetChildWindowId();
SwFldDlgWrapper *pWrp = (SwFldDlgWrapper*)pVFrame->GetChildWindow(nId);
if (pWrp)
pWrp->ShowPage();
@@ -326,7 +326,7 @@ void SwTextShell::ExecField(SfxRequest &rReq)
break;
case FN_DELETE_NOTE_AUTHOR:
{
- SFX_REQUEST_ARG( rReq, pNoteItem, SfxStringItem, nSlot, FALSE);
+ SFX_REQUEST_ARG( rReq, pNoteItem, SfxStringItem, nSlot, sal_False);
if ( pNoteItem && GetView().GetPostItMgr() )
GetView().GetPostItMgr()->Delete( pNoteItem->GetValue() );
}
@@ -344,7 +344,7 @@ void SwTextShell::ExecField(SfxRequest &rReq)
break;
case FN_HIDE_NOTE_AUTHOR:
{
- SFX_REQUEST_ARG( rReq, pNoteItem, SfxStringItem, nSlot, FALSE);
+ SFX_REQUEST_ARG( rReq, pNoteItem, SfxStringItem, nSlot, sal_False);
if ( pNoteItem && GetView().GetPostItMgr() )
GetView().GetPostItMgr()->Hide( pNoteItem->GetValue() );
}
@@ -352,7 +352,7 @@ void SwTextShell::ExecField(SfxRequest &rReq)
case FN_POSTIT:
{
SwPostItField* pPostIt = (SwPostItField*)aFldMgr.GetCurFld();
- BOOL bNew = !(pPostIt && pPostIt->GetTyp()->Which() == RES_POSTITFLD);
+ sal_Bool bNew = !(pPostIt && pPostIt->GetTyp()->Which() == RES_POSTITFLD);
if (bNew || GetView().GetPostItMgr()->IsAnswer())
{
SvtUserOptions aUserOpt;
@@ -369,9 +369,9 @@ void SwTextShell::ExecField(SfxRequest &rReq)
SwInsertFld_Data aData(TYP_POSTITFLD, 0, sAuthor, aEmptyStr, 0);
aFldMgr.InsertFld(aData);
rSh.Push();
- rSh.SwCrsrShell::Left(1, CRSR_SKIP_CHARS, FALSE);
+ rSh.SwCrsrShell::Left(1, CRSR_SKIP_CHARS, sal_False);
pPostIt = (SwPostItField*)aFldMgr.GetCurFld();
- rSh.Pop(FALSE); // Cursorpos restaurieren
+ rSh.Pop(sal_False); // Cursorpos restaurieren
}
if (pPostIt)
@@ -416,7 +416,7 @@ void SwTextShell::ExecField(SfxRequest &rReq)
sComment = pRedline->GetComment();
- BOOL bTravel = FALSE;
+ sal_Bool bTravel = sal_False;
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
DBG_ASSERT(pFact, "Dialogdiet fail!");
@@ -443,8 +443,8 @@ void SwTextShell::ExecField(SfxRequest &rReq)
pActRed = rSh.SelPrevRedline();
}
- BOOL bPrev = pActRed != 0;
- rSh.Pop(FALSE);
+ sal_Bool bPrev = pActRed != 0;
+ rSh.Pop(sal_False);
rSh.EndAction();
rSh.ClearMark();
@@ -453,8 +453,8 @@ void SwTextShell::ExecField(SfxRequest &rReq)
rSh.StartAction();
rSh.Push();
pActRed = rSh.SelNextRedline();
- BOOL bNext = pActRed != 0;
- rSh.Pop(FALSE); // Cursorpos restaurieren
+ sal_Bool bNext = pActRed != 0;
+ rSh.Pop(sal_False); // Cursorpos restaurieren
if( rSh.IsCrsrPtAtEnd() )
rSh.SwapPam();
@@ -465,7 +465,7 @@ void SwTextShell::ExecField(SfxRequest &rReq)
SvxAbstractDialogFactory* pFact2 = SvxAbstractDialogFactory::Create();
DBG_ASSERT(pFact2, "Dialogdiet fail!");
- AbstractSvxPostItDialog* pDlg = pFact2->CreateSvxPostItDialog( pMDI, aSet, bTravel, TRUE );
+ AbstractSvxPostItDialog* pDlg = pFact2->CreateSvxPostItDialog( pMDI, aSet, bTravel, sal_True );
DBG_ASSERT(pDlg, "Dialogdiet fail!");
pDlg->HideAuthor();
@@ -482,7 +482,7 @@ void SwTextShell::ExecField(SfxRequest &rReq)
}
rSh.SetCareWin(pDlg->GetWindow());
- bNoInterrupt = TRUE;
+ bNoInterrupt = sal_True;
if ( pDlg->Execute() == RET_OK )
{
@@ -495,7 +495,7 @@ void SwTextShell::ExecField(SfxRequest &rReq)
delete pDlg;
rSh.SetCareWin(NULL);
- bNoInterrupt = FALSE;
+ bNoInterrupt = sal_False;
rSh.ClearMark();
GetView().AttrChangedNotify(GetShellPtr());
}
@@ -505,8 +505,8 @@ void SwTextShell::ExecField(SfxRequest &rReq)
case FN_JAVAEDIT:
{
String aType, aText;
- BOOL bIsUrl=FALSE;
- BOOL bNew=FALSE, bUpdate=FALSE;
+ sal_Bool bIsUrl=sal_False;
+ sal_Bool bNew=sal_False, bUpdate=sal_False;
SwFldMgr* pMgr = new SwFldMgr;
if ( pItem )
{
@@ -563,21 +563,21 @@ void SwTextShell::ExecField(SfxRequest &rReq)
case FN_INSERT_FLD_DATE :
nInsertType = TYP_DATEFLD;
- bIsText = FALSE;
+ bIsText = sal_False;
goto FIELD_INSERT;
case FN_INSERT_FLD_TIME :
nInsertType = TYP_TIMEFLD;
- bIsText = FALSE;
+ bIsText = sal_False;
goto FIELD_INSERT;
case FN_INSERT_FLD_PGNUMBER:
nInsertType = TYP_PAGENUMBERFLD;
nInsertFormat = SVX_NUM_PAGEDESC; // wie Seitenvorlage
- bIsText = FALSE;
+ bIsText = sal_False;
goto FIELD_INSERT;
case FN_INSERT_FLD_PGCOUNT :
nInsertType = TYP_DOCSTATFLD;
nInsertSubType = 0;
- bIsText = FALSE;
+ bIsText = sal_False;
nInsertFormat = SVX_NUM_PAGEDESC;
goto FIELD_INSERT;
case FN_INSERT_FLD_TOPIC :
@@ -604,7 +604,7 @@ FIELD_INSERT:
}
break;
default:
- ASSERT(FALSE, falscher Dispatcher);
+ ASSERT(sal_False, falscher Dispatcher);
return;
}
}
@@ -615,8 +615,8 @@ void SwTextShell::StateField( SfxItemSet &rSet )
SwWrtShell& rSh = GetShell();
SfxWhichIter aIter( rSet );
const SwField* pField = 0;
- int bGetField = FALSE;
- USHORT nWhich = aIter.FirstWhich();
+ int bGetField = sal_False;
+ sal_uInt16 nWhich = aIter.FirstWhich();
while (nWhich)
{
@@ -651,10 +651,10 @@ void SwTextShell::StateField( SfxItemSet &rSet )
if( !bGetField )
{
pField = rSh.GetCurFld();
- bGetField = TRUE;
+ bGetField = sal_True;
}
- USHORT nTempWhich = pField ? pField->GetTyp()->Which() : USHRT_MAX;
+ sal_uInt16 nTempWhich = pField ? pField->GetTyp()->Which() : USHRT_MAX;
if( USHRT_MAX == nTempWhich ||
RES_POSTITFLD == nTempWhich ||
RES_SCRIPTFLD == nTempWhich ||
@@ -673,7 +673,7 @@ void SwTextShell::StateField( SfxItemSet &rSet )
if(!bGetField)
{
pField = rSh.GetCurFld();
- bGetField = TRUE;
+ bGetField = sal_True;
}
if(!pField || pField->GetTyp()->Which() != RES_MACROFLD)
rSet.DisableItem(nWhich);
@@ -707,7 +707,7 @@ void SwTextShell::StateField( SfxItemSet &rSet )
break;
case FN_POSTIT :
case FN_JAVAEDIT :
- BOOL bCurField = FALSE;
+ sal_Bool bCurField = sal_False;
pField = rSh.GetCurFld();
if(nWhich == FN_POSTIT)
bCurField = pField && pField->GetTyp()->Which() == RES_POSTITFLD;
@@ -732,7 +732,7 @@ void SwTextShell::InsertHyperlink(const SvxHyperlinkItem& rHlnkItem)
const String& rName = rHlnkItem.GetName();
const String& rURL = rHlnkItem.GetURL();
const String& rTarget = rHlnkItem.GetTargetFrame();
- USHORT nType = (USHORT)rHlnkItem.GetInsertMode();
+ sal_uInt16 nType = (sal_uInt16)rHlnkItem.GetInsertMode();
nType &= ~HLINK_HTMLMODE;
const SvxMacroTableDtor* pMacroTbl = rHlnkItem.GetMacroTbl();
@@ -745,10 +745,10 @@ void SwTextShell::InsertHyperlink(const SvxHyperlinkItem& rHlnkItem)
rSh.GetCurAttr( aSet );
const SfxPoolItem* pItem;
- if(SFX_ITEM_SET == aSet.GetItemState(RES_TXTATR_INETFMT, FALSE, &pItem))
+ if(SFX_ITEM_SET == aSet.GetItemState(RES_TXTATR_INETFMT, sal_False, &pItem))
{
// Links selektieren
- rSh.SwCrsrShell::SelectTxtAttr(RES_TXTATR_INETFMT, FALSE);
+ rSh.SwCrsrShell::SelectTxtAttr(RES_TXTATR_INETFMT, sal_False);
}
switch (nType)
{
@@ -770,13 +770,13 @@ void SwTextShell::InsertHyperlink(const SvxHyperlinkItem& rHlnkItem)
aINetFmt.SetMacro(SFX_EVENT_MOUSEOUT_OBJECT, *pMacro);
}
rSh.SttSelect();
- rSh.InsertURL( aINetFmt, rName, TRUE );
+ rSh.InsertURL( aINetFmt, rName, sal_True );
rSh.EndSelect();
}
break;
case HLINK_BUTTON:
- BOOL bSel = rSh.HasSelection();
+ sal_Bool bSel = rSh.HasSelection();
if(bSel)
rSh.DelRight();
InsertURLButton( rURL, rTarget, rName );
@@ -809,18 +809,18 @@ IMPL_LINK( SwTextShell, RedlineNextHdl, AbstractSvxPostItDialog *, pBtn )
const SwRedline *pActRed = pSh->SelNextRedline();
pSh->Pop(pActRed != 0);
- BOOL bEnable = FALSE;
+ sal_Bool bEnable = sal_False;
if (pActRed)
{
pSh->StartAction();
pSh->Push();
bEnable = pSh->SelNextRedline() != 0;
- pSh->Pop(FALSE);
+ pSh->Pop(sal_False);
pSh->EndAction();
}
- pDlg->EnableTravel(bEnable, TRUE);
+ pDlg->EnableTravel(bEnable, sal_True);
if( pSh->IsCrsrPtAtEnd() )
pSh->SwapPam();
@@ -861,18 +861,18 @@ IMPL_LINK( SwTextShell, RedlinePrevHdl, AbstractSvxPostItDialog *, pBtn )
const SwRedline *pActRed = pSh->SelPrevRedline();
pSh->Pop(pActRed != 0);
- BOOL bEnable = FALSE;
+ sal_Bool bEnable = sal_False;
if (pActRed)
{
pSh->StartAction();
pSh->Push();
bEnable = pSh->SelPrevRedline() != 0;
- pSh->Pop(FALSE);
+ pSh->Pop(sal_False);
pSh->EndAction();
}
- pDlg->EnableTravel(TRUE, bEnable);
+ pDlg->EnableTravel(sal_True, bEnable);
pRedline = pSh->GetCurrRedline();
sComment = pRedline->GetComment();
diff --git a/sw/source/ui/shells/textglos.cxx b/sw/source/ui/shells/textglos.cxx
index 117320a9c9..839db6ab45 100644
--- a/sw/source/ui/shells/textglos.cxx
+++ b/sw/source/ui/shells/textglos.cxx
@@ -49,28 +49,28 @@
void SwTextShell::ExecGlossary(SfxRequest &rReq)
{
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
::GetGlossaries()->UpdateGlosPath(!rReq.IsAPI() ||
FN_GLOSSARY_DLG == nSlot );
SwGlossaryHdl* pGlosHdl = GetView().GetGlosHdl();
// SwGlossaryList updaten?
- BOOL bUpdateList = FALSE;
+ sal_Bool bUpdateList = sal_False;
const SfxItemSet *pArgs = rReq.GetArgs();
const SfxPoolItem* pItem = 0;
if(pArgs)
- pArgs->GetItemState(nSlot, FALSE, &pItem );
+ pArgs->GetItemState(nSlot, sal_False, &pItem );
switch( nSlot )
{
case FN_GLOSSARY_DLG:
pGlosHdl->GlossaryDlg();
- bUpdateList = TRUE;
+ bUpdateList = sal_True;
rReq.Ignore();
break;
case FN_EXPAND_GLOSSARY:
{
- BOOL bReturn;
+ sal_Bool bReturn;
bReturn = pGlosHdl->ExpandGlossary();
rReq.SetReturnValue( SfxBoolItem( nSlot, bReturn ) );
rReq.Done();
@@ -81,10 +81,10 @@ void SwTextShell::ExecGlossary(SfxRequest &rReq)
{
String aGroup = (( const SfxStringItem *)pItem)->GetValue();
String aName;
- if(SFX_ITEM_SET == pArgs->GetItemState(FN_PARAM_1, FALSE, &pItem ))
+ if(SFX_ITEM_SET == pArgs->GetItemState(FN_PARAM_1, sal_False, &pItem ))
aName = (( const SfxStringItem *)pItem)->GetValue();
String aShortName;
- if(SFX_ITEM_SET == pArgs->GetItemState(FN_PARAM_2, FALSE, &pItem ))
+ if(SFX_ITEM_SET == pArgs->GetItemState(FN_PARAM_2, sal_False, &pItem ))
aShortName = (( const SfxStringItem *)pItem)->GetValue();
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
@@ -92,12 +92,12 @@ void SwTextShell::ExecGlossary(SfxRequest &rReq)
::GlossarySetActGroup fnSetActGroup = pFact->SetGlossaryActGroupFunc( DLG_RENAME_GLOS );
if ( fnSetActGroup )
(*fnSetActGroup)( aGroup );
- pGlosHdl->SetCurGroup(aGroup, TRUE);
+ pGlosHdl->SetCurGroup(aGroup, sal_True);
//eingestellte Gruppe muss in NewGlossary ggf. erzeugt werden!
- pGlosHdl->NewGlossary( aName, aShortName, TRUE );
+ pGlosHdl->NewGlossary( aName, aShortName, sal_True );
rReq.Done();
}
- bUpdateList = TRUE;
+ bUpdateList = sal_True;
break;
case FN_SET_ACT_GLOSSARY:
if(pItem)
@@ -117,21 +117,21 @@ void SwTextShell::ExecGlossary(SfxRequest &rReq)
{
String aGroup = (( const SfxStringItem *)pItem)->GetValue();
String aName;
- if(SFX_ITEM_SET == pArgs->GetItemState(FN_PARAM_1, FALSE, &pItem ))
+ if(SFX_ITEM_SET == pArgs->GetItemState(FN_PARAM_1, sal_False, &pItem ))
aName = (( const SfxStringItem *)pItem)->GetValue();
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
DBG_ASSERT(pFact, "Dialogdiet fail!");
::GlossarySetActGroup fnSetActGroup = pFact->SetGlossaryActGroupFunc( DLG_RENAME_GLOS );
if ( fnSetActGroup )
(*fnSetActGroup)( aGroup );
- pGlosHdl->SetCurGroup(aGroup, TRUE);
+ pGlosHdl->SetCurGroup(aGroup, sal_True);
rReq.SetReturnValue(SfxBoolItem(nSlot, pGlosHdl->InsertGlossary( aName )));
rReq.Done();
}
}
break;
default:
- ASSERT(FALSE, falscher Dispatcher);
+ ASSERT(sal_False, falscher Dispatcher);
return;
}
if(bUpdateList)
diff --git a/sw/source/ui/shells/textidx.cxx b/sw/source/ui/shells/textidx.cxx
index d9b4593e81..c7040261cf 100644
--- a/sw/source/ui/shells/textidx.cxx
+++ b/sw/source/ui/shells/textidx.cxx
@@ -58,9 +58,9 @@ void SwTextShell::ExecIdx(SfxRequest &rReq)
{
const SfxItemSet *pArgs = rReq.GetArgs();
const SfxPoolItem* pItem = 0;
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
if(pArgs)
- pArgs->GetItemState(nSlot, FALSE, &pItem );
+ pArgs->GetItemState(nSlot, sal_False, &pItem );
SfxViewFrame* pVFrame = GetView().GetViewFrame();
Window *pMDI = &pVFrame->GetWindow();
@@ -93,7 +93,7 @@ void SwTextShell::ExecIdx(SfxRequest &rReq)
case FN_EDIT_IDX_ENTRY_DLG:
{
SwTOXMgr aMgr(GetShellPtr());
- USHORT nRet = RET_OK;
+ sal_uInt16 nRet = RET_OK;
if(aMgr.GetTOXMarkCount() > 1)
{ // Mehrere Marken, welche solls denn sein ?
//
@@ -140,11 +140,11 @@ void SwTextShell::ExecIdx(SfxRequest &rReq)
// Hoehe=Breite fuer konsistentere Vorschau (analog zu Bereich bearbeiten)
aSet.Put(SvxSizeItem(SID_ATTR_PAGE_SIZE, Size(nWidth, nWidth)));
const SwTOXBase* pCurTOX = 0;
- BOOL bGlobal = FALSE;
+ sal_Bool bGlobal = sal_False;
if(pItem)
{
pCurTOX = (const SwTOXBase* )((SwPtrItem*)pItem)->GetValue();
- bGlobal = TRUE;
+ bGlobal = sal_True;
}
else
pCurTOX = rSh.GetCurTOX();
@@ -170,7 +170,7 @@ void SwTextShell::ExecIdx(SfxRequest &rReq)
const SwTOXBase* pBase = rSh.GetCurTOX();
DBG_ASSERT(pBase, "no TOXBase to remove");
if( pBase )
- rSh.DeleteTOX(*pBase, TRUE);
+ rSh.DeleteTOX(*pBase, sal_True);
}
break;
default:
@@ -189,7 +189,7 @@ void SwTextShell::GetIdxState(SfxItemSet &rSet)
SfxChildWindow* pAuthMark = pVFrame->GetChildWindow(FN_INSERT_AUTH_ENTRY_DLG);
- const BOOL bHtmlMode = 0 != ::GetHtmlMode( GetView().GetDocShell() );
+ const sal_Bool bHtmlMode = 0 != ::GetHtmlMode( GetView().GetDocShell() );
const SwTOXBase* pBase = 0;
if( bHtmlMode || 0 != ( pBase = rSh.GetCurTOX()) )
{
@@ -207,27 +207,27 @@ void SwTextShell::GetIdxState(SfxItemSet &rSet)
if(!pIdxMrk)
rSet.DisableItem( FN_INSERT_IDX_ENTRY_DLG );
else
- rSet.Put(SfxBoolItem(FN_INSERT_IDX_ENTRY_DLG, TRUE));
+ rSet.Put(SfxBoolItem(FN_INSERT_IDX_ENTRY_DLG, sal_True));
if(!pAuthMark)
rSet.DisableItem( FN_INSERT_AUTH_ENTRY_DLG );
else
- rSet.Put(SfxBoolItem(FN_INSERT_AUTH_ENTRY_DLG, TRUE));
+ rSet.Put(SfxBoolItem(FN_INSERT_AUTH_ENTRY_DLG, sal_True));
}
else //if( SFX_ITEM_UNKNOWN != rSet.GetItemState( FN_EDIT_IDX_ENTRY_DLG ))
{
- BOOL bEnableEdit = TRUE;
- BOOL bInReadonly = rSh.HasReadonlySel();
+ sal_Bool bEnableEdit = sal_True;
+ sal_Bool bInReadonly = rSh.HasReadonlySel();
if( rSh.HasSelection() || bInReadonly)
- bEnableEdit = FALSE;
+ bEnableEdit = sal_False;
else
{
SwTOXMarks aArr;
rSh.GetCurTOXMarks( aArr );
if( !aArr.Count())
- bEnableEdit = FALSE;
+ bEnableEdit = sal_False;
}
if(!bEnableEdit)
diff --git a/sw/source/ui/shells/textsh.cxx b/sw/source/ui/shells/textsh.cxx
index 8117200882..b99cc467f7 100644
--- a/sw/source/ui/shells/textsh.cxx
+++ b/sw/source/ui/shells/textsh.cxx
@@ -79,9 +79,7 @@
#include <doc.hxx>
#include <uitool.hxx>
#include <cmdid.h>
-#ifndef _GLOBALS_HRC
#include <globals.hrc>
-#endif
#include <frmmgr.hxx>
#include <textsh.hxx>
#include <frmfmt.hxx>
@@ -100,12 +98,8 @@
#include <modcfg.hxx>
#include <column.hxx>
#include <edtwin.hxx>
-#ifndef _SHELLS_HRC
#include <shells.hrc>
-#endif
-#ifndef _POPUP_HRC
#include <popup.hrc>
-#endif
#include <swerror.h>
#include <SwAppletImpl.hxx>
#include <unochart.hxx>
@@ -120,10 +114,7 @@
#include <sfx2/msg.hxx>
#include <swslots.hxx>
#include <SwRewriter.hxx>
-#include <undobj.hxx>
-#ifndef _COMCORE_HRC
#include <comcore.hrc>
-#endif
using namespace ::com::sun::star;
using ::rtl::OUString;
@@ -168,9 +159,9 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
const SfxItemSet *pArgs = rReq.GetArgs();
const SfxPoolItem* pItem = 0;
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
if(pArgs)
- pArgs->GetItemState(nSlot, FALSE, &pItem );
+ pArgs->GetItemState(nSlot, sal_False, &pItem );
switch( nSlot )
{
@@ -179,8 +170,8 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
rSh.InsertByWord(((const SfxStringItem *)pItem)->GetValue());
break;
case FN_INSERT_SOFT_HYPHEN:
- if( CHAR_SOFTHYPHEN != rSh.SwCrsrShell::GetChar( TRUE, 0 ) &&
- CHAR_SOFTHYPHEN != rSh.SwCrsrShell::GetChar( TRUE, -1 ))
+ if( CHAR_SOFTHYPHEN != rSh.SwCrsrShell::GetChar( sal_True, 0 ) &&
+ CHAR_SOFTHYPHEN != rSh.SwCrsrShell::GetChar( sal_True, -1 ))
rSh.Insert( String( CHAR_SOFTHYPHEN ) );
break;
@@ -275,7 +266,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
}
}
- rSh.InsertObject( xObj, 0, TRUE, nSlot);
+ rSh.InsertObject( xObj, 0, sal_True, nSlot);
}
}
}
@@ -305,7 +296,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
SvCommandList aCommandList;
if(pCommandsItem)
{
- USHORT nTemp;
+ sal_uInt16 nTemp;
aCommandList.AppendCommands( pCommandsItem->GetValue(), &nTemp );
}
@@ -346,7 +337,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
else
{
DBG_ASSERT( !pNameItem || nSlot == SID_INSERT_OBJECT, "Superfluous argument!" );
- rSh.InsertObject( xObj, pName, TRUE, nSlot);
+ rSh.InsertObject( xObj, pName, sal_True, nSlot);
rReq.Done();
}
break;
@@ -418,7 +409,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
}
else
{
- rSh.InsertObject( xObj, 0, TRUE, nSlot);
+ rSh.InsertObject( xObj, 0, sal_True, nSlot);
rReq.Done();
}
}
@@ -455,7 +446,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
else
bFillWithData = sal_False; // will create chart with only it's default image
- SwTableFUNC( &rSh, FALSE ).InsertChart( xDataProvider, bFillWithData, aRangeString );
+ SwTableFUNC( &rSh, sal_False ).InsertChart( xDataProvider, bFillWithData, aRangeString );
rSh.LaunchOLEObj();
svt::EmbeddedObjectRef& xObj = rSh.GetOLEObject();
@@ -483,7 +474,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
// the suggestion has to be removed before
GetView().GetEditWin().StopQuickHelp();
SvGlobalName aGlobalName( SO3_SM_CLASSID );
- rSh.InsertObject( svt::EmbeddedObjectRef(), &aGlobalName, TRUE, 0 );
+ rSh.InsertObject( svt::EmbeddedObjectRef(), &aGlobalName, sal_True, 0 );
}
break;
@@ -494,14 +485,14 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
case FN_INSERT_FRAME_INTERACT_NOCOL:
case FN_INSERT_FRAME_INTERACT:
{
- USHORT nCols = 1;
- BOOL bModifier1 = rReq.GetModifier() == KEY_MOD1;
+ sal_uInt16 nCols = 1;
+ sal_Bool bModifier1 = rReq.GetModifier() == KEY_MOD1;
if(pArgs)
{
if(FN_INSERT_FRAME_INTERACT_NOCOL != nSlot &&
- pArgs->GetItemState(SID_ATTR_COLUMNS, FALSE, &pItem) == SFX_ITEM_SET)
+ pArgs->GetItemState(SID_ATTR_COLUMNS, sal_False, &pItem) == SFX_ITEM_SET)
nCols = ((SfxUInt16Item *)pItem)->GetValue();
- if(pArgs->GetItemState(SID_MODIFIER, FALSE, &pItem) == SFX_ITEM_SET)
+ if(pArgs->GetItemState(SID_MODIFIER, sal_False, &pItem) == SFX_ITEM_SET)
bModifier1 |= KEY_MOD1 == ((SfxUInt16Item *)pItem)->GetValue();
}
if(bModifier1 )
@@ -515,7 +506,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
Size aSize(16 * MM50, 8 * MM50);
GetShell().LockPaint();
GetShell().StartAllAction();
- SwFlyFrmAttrMgr aMgr( TRUE, GetShellPtr(), FRMMGR_TYPE_TEXT );
+ SwFlyFrmAttrMgr aMgr( sal_True, GetShellPtr(), FRMMGR_TYPE_TEXT );
if(nCols > 1)
{
SwFmtCol aCol;
@@ -535,37 +526,37 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
break;
case FN_INSERT_FRAME:
{
- BOOL bSingleCol = FALSE;
+ sal_Bool bSingleCol = sal_False;
if( 0!= dynamic_cast< SwWebDocShell*>( GetView().GetDocShell()) )
{
SvxHtmlOptions* pHtmlOpt = SvxHtmlOptions::Get();
- USHORT nExport = pHtmlOpt->GetExportMode();
+ sal_uInt16 nExport = pHtmlOpt->GetExportMode();
if( HTML_CFG_MSIE == nExport ||
HTML_CFG_HTML32 == nExport ||
HTML_CFG_MSIE_40 == nExport ||
HTML_CFG_HTML32 == nExport )
{
- bSingleCol = TRUE;
+ bSingleCol = sal_True;
}
}
// Rahmen neu anlegen
- SwFlyFrmAttrMgr aMgr( TRUE, GetShellPtr(), FRMMGR_TYPE_TEXT );
+ SwFlyFrmAttrMgr aMgr( sal_True, GetShellPtr(), FRMMGR_TYPE_TEXT );
if(pArgs)
{
Size aSize(aMgr.GetSize());
aSize.Width() = GetShell().GetAnyCurRect(RECT_PAGE_PRT).Width();
Point aPos = aMgr.GetPos();
RndStdIds eAnchor = FLY_AT_PARA;
- if(pArgs->GetItemState(nSlot, FALSE, &pItem) == SFX_ITEM_SET)
+ if(pArgs->GetItemState(nSlot, sal_False, &pItem) == SFX_ITEM_SET)
eAnchor = (RndStdIds)((SfxUInt16Item *)pItem)->GetValue();
- if(pArgs->GetItemState(FN_PARAM_1, FALSE, &pItem) == SFX_ITEM_SET)
+ if(pArgs->GetItemState(FN_PARAM_1, sal_False, &pItem) == SFX_ITEM_SET)
aPos = ((SfxPointItem *)pItem)->GetValue();
- if(pArgs->GetItemState(FN_PARAM_2, FALSE, &pItem) == SFX_ITEM_SET)
+ if(pArgs->GetItemState(FN_PARAM_2, sal_False, &pItem) == SFX_ITEM_SET)
aSize = ((SvxSizeItem *)pItem)->GetSize();
- if(pArgs->GetItemState(SID_ATTR_COLUMNS, FALSE, &pItem) == SFX_ITEM_SET)
+ if(pArgs->GetItemState(SID_ATTR_COLUMNS, sal_False, &pItem) == SFX_ITEM_SET)
{
- USHORT nCols = ((SfxUInt16Item *)pItem)->GetValue();
+ sal_uInt16 nCols = ((SfxUInt16Item *)pItem)->GetValue();
if( !bSingleCol && 1 < nCols )
{
SwFmtCol aFmtCol;
@@ -585,7 +576,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
}
else
{
- static USHORT __READONLY_DATA aFrmAttrRange[] =
+ static sal_uInt16 __READONLY_DATA aFrmAttrRange[] =
{
RES_FRMATR_BEGIN, RES_FRMATR_END-1,
SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER,
@@ -614,16 +605,16 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
// Minimalgroesse in Spalten loeschen
SvxBoxInfoItem aBoxInfo((SvxBoxInfoItem &)aSet.Get(SID_ATTR_BORDER_INNER));
const SvxBoxItem& rBox = (const SvxBoxItem&)aSet.Get(RES_BOX);
- aBoxInfo.SetMinDist(FALSE);
+ aBoxInfo.SetMinDist(sal_False);
aBoxInfo.SetDefDist(rBox.GetDistance(BOX_LINE_LEFT));
aSet.Put(aBoxInfo);
FieldUnit eMetric = ::GetDfltMetric(0 != PTR_CAST(SwWebDocShell, GetView().GetDocShell()));
- SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< UINT16 >(eMetric)));
+ SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric)));
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
DBG_ASSERT(pFact, "Dialogdiet fail!");
SfxAbstractTabDialog* pDlg = pFact->CreateFrmTabDialog( DLG_FRM_STD,
- GetView().GetViewFrame(), &GetView().GetViewFrame()->GetWindow(), aSet, TRUE);
+ GetView().GetViewFrame(), &GetView().GetViewFrame()->GetWindow(), aSet, sal_True);
DBG_ASSERT(pDlg, "Dialogdiet fail!");
if(pDlg->Execute() && pDlg->GetOutputItemSet())
{
@@ -647,7 +638,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
if ( xRecorder.is() )
{
//FN_INSERT_FRAME
- USHORT nAnchor = (USHORT)aMgr.GetAnchor();
+ sal_uInt16 nAnchor = (sal_uInt16)aMgr.GetAnchor();
rReq.AppendItem(SfxUInt16Item(nSlot, nAnchor));
rReq.AppendItem(SfxPointItem(FN_PARAM_1, rShell.GetObjAbsPos()));
rReq.AppendItem(SvxSizeItem(FN_PARAM_2, rShell.GetObjSize()));
@@ -674,8 +665,8 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
case FN_INSERT_HRULER:
{
String sPath;
- BOOL bSimpleLine = FALSE;
- BOOL bRet = FALSE;
+ sal_Bool bSimpleLine = sal_False;
+ sal_Bool bRet = sal_False;
Window* pParent = GetView().GetWindow();
if ( pItem )
{
@@ -710,28 +701,28 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
if(bSimpleLine)
{
if(!(rSh.IsSttOfPara() && rSh.IsEndOfPara())) // kein leerer Absatz?
- rSh.SplitNode( FALSE, FALSE ); // dann Platz schaffen
- rSh.SplitNode( FALSE, FALSE );
- rSh.Left(CRSR_SKIP_CHARS, FALSE, 1, FALSE );
+ rSh.SplitNode( sal_False, sal_False ); // dann Platz schaffen
+ rSh.SplitNode( sal_False, sal_False );
+ rSh.Left(CRSR_SKIP_CHARS, sal_False, 1, sal_False );
rSh.SetTxtFmtColl( rSh.GetTxtCollFromPool( RES_POOLCOLL_HTML_HR ));
- rSh.Right(CRSR_SKIP_CHARS, FALSE, 1, FALSE );
- bRet = TRUE;
+ rSh.Right(CRSR_SKIP_CHARS, sal_False, 1, sal_False );
+ bRet = sal_True;
}
else if(sPath.Len())
{
- SwFlyFrmAttrMgr aFrmMgr( TRUE, &rSh, FRMMGR_TYPE_GRF );
+ SwFlyFrmAttrMgr aFrmMgr( sal_True, &rSh, FRMMGR_TYPE_GRF );
// am FrmMgr muessen die richtigen Parameter eingestellt werden
aFrmMgr.SetAnchor(FLY_AS_CHAR);
- rSh.SplitNode( FALSE, FALSE );
- rSh.SplitNode( FALSE, FALSE );
- rSh.Left(CRSR_SKIP_CHARS, FALSE, 1, FALSE );
+ rSh.SplitNode( sal_False, sal_False );
+ rSh.SplitNode( sal_False, sal_False );
+ rSh.Left(CRSR_SKIP_CHARS, sal_False, 1, sal_False );
rSh.SetAttr(SvxAdjustItem(SVX_ADJUST_CENTER,RES_PARATR_ADJUST ));
- if(GRFILTER_OK == GetView().InsertGraphic(sPath, aEmptyStr, TRUE, 0, 0 ))
- bRet = TRUE;
+ if(GRFILTER_OK == GetView().InsertGraphic(sPath, aEmptyStr, sal_True, 0, 0 ))
+ bRet = sal_True;
rSh.EnterStdMode();
- rSh.Right(CRSR_SKIP_CHARS, FALSE, 1, FALSE );
+ rSh.Right(CRSR_SKIP_CHARS, sal_False, 1, sal_False );
}
rSh.EndAllAction();
rSh.EndUndo(UNDO_UI_INSERT_RULER);
@@ -767,18 +758,18 @@ bool lcl_IsMarkInSameSection( SwWrtShell& rWrtSh, const SwSection* pSect )
void SwTextShell::StateInsert( SfxItemSet &rSet )
{
- USHORT nHtmlMode = ::GetHtmlMode(GetView().GetDocShell());
+ sal_uInt16 nHtmlMode = ::GetHtmlMode(GetView().GetDocShell());
SfxWhichIter aIter( rSet );
SwWrtShell &rSh = GetShell();
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
SvtModuleOptions aMOpt;
SfxObjectCreateMode eCreateMode =
GetView().GetDocShell()->GetCreateMode();
rSh.Push();
- const BOOL bCrsrInHidden = rSh.SelectHiddenRange();
+ const sal_Bool bCrsrInHidden = rSh.SelectHiddenRange();
// --> OD 2009-08-05 #i103839#, #b6855246#
- // Do not call method <SwCrsrShell::Pop(..)> with 1st parameter = <FALSE>
+ // Do not call method <SwCrsrShell::Pop(..)> with 1st parameter = <sal_False>
// in order to avoid that the view jumps to the visible cursor.
rSh.Pop();
// <--
@@ -827,7 +818,7 @@ void SwTextShell::StateInsert( SfxItemSet &rSet )
else if(SID_INSERT_FLOATINGFRAME == nWhich && nHtmlMode&HTMLMODE_ON)
{
SvxHtmlOptions* pHtmlOpt = SvxHtmlOptions::Get();
- USHORT nExport = pHtmlOpt->GetExportMode();
+ sal_uInt16 nExport = pHtmlOpt->GetExportMode();
if(HTML_CFG_MSIE_40 != nExport && HTML_CFG_WRITER != nExport )
rSet.DisableItem(nWhich);
}
@@ -848,7 +839,7 @@ void SwTextShell::StateInsert( SfxItemSet &rSet )
SvxHyperlinkItem aHLinkItem;
const SfxPoolItem* pItem;
- if(SFX_ITEM_SET == aSet.GetItemState(RES_TXTATR_INETFMT, FALSE, &pItem))
+ if(SFX_ITEM_SET == aSet.GetItemState(RES_TXTATR_INETFMT, sal_False, &pItem))
{
const SwFmtINetFmt* pINetFmt = (const SwFmtINetFmt*)pItem;
aHLinkItem.SetURL(pINetFmt->GetValue());
@@ -869,7 +860,7 @@ void SwTextShell::StateInsert( SfxItemSet &rSet )
// Text des Links besorgen
rSh.StartAction();
rSh.CreateCrsr();
- rSh.SwCrsrShell::SelectTxtAttr(RES_TXTATR_INETFMT,TRUE);
+ rSh.SwCrsrShell::SelectTxtAttr(RES_TXTATR_INETFMT,sal_True);
String sLinkName = rSh.GetSelTxt();
aHLinkItem.SetName(sLinkName);
aHLinkItem.SetInsertMode(HLINK_FIELD);
@@ -914,7 +905,7 @@ void SwTextShell::StateInsert( SfxItemSet &rSet )
if( bDisable )
{
const SwSection* pCurrSection = rSh.GetCurrSection();
- USHORT nFullSectCnt = rSh.GetFullSelectedSectionCount();
+ sal_uInt16 nFullSectCnt = rSh.GetFullSelectedSectionCount();
if( pCurrSection && ( !rSh.HasSelection() || 0 != nFullSectCnt ))
bDisable = false;
else if(
@@ -1059,14 +1050,14 @@ void SwTextShell::InsertSymbol( SfxRequest& rReq )
const SfxItemSet *pArgs = rReq.GetArgs();
const SfxPoolItem* pItem = 0;
if( pArgs )
- pArgs->GetItemState(GetPool().GetWhich(SID_CHARMAP), FALSE, &pItem);
+ pArgs->GetItemState(GetPool().GetWhich(SID_CHARMAP), sal_False, &pItem);
String aChars, aFontName;
if ( pItem )
{
aChars = ((const SfxStringItem*)pItem)->GetValue();
const SfxPoolItem* pFtItem = NULL;
- pArgs->GetItemState( GetPool().GetWhich(SID_ATTR_SPECIALCHAR), FALSE, &pFtItem);
+ pArgs->GetItemState( GetPool().GetWhich(SID_ATTR_SPECIALCHAR), sal_False, &pFtItem);
const SfxStringItem* pFontItem = PTR_CAST( SfxStringItem, pFtItem );
if ( pFontItem )
aFontName = pFontItem->GetValue();
@@ -1078,19 +1069,19 @@ void SwTextShell::InsertSymbol( SfxRequest& rReq )
RES_CHRATR_CTL_FONT, RES_CHRATR_CTL_FONT,
0 );
rSh.GetCurAttr( aSet );
- USHORT nScript = rSh.GetScriptType();
+ sal_uInt16 nScript = rSh.GetScriptType();
SvxFontItem aFont( RES_CHRATR_FONT );
{
SvxScriptSetItem aSetItem( SID_ATTR_CHAR_FONT, *aSet.GetPool() );
- aSetItem.GetItemSet().Put( aSet, FALSE );
+ aSetItem.GetItemSet().Put( aSet, sal_False );
const SfxPoolItem* pI = aSetItem.GetItemOfScript( nScript );
if( pI )
aFont = *(SvxFontItem*)pI;
else
aFont = (SvxFontItem&)aSet.Get( GetWhichOfScript(
RES_CHRATR_FONT,
- GetI18NScriptTypeOfLanguage( (USHORT)GetAppLanguage() ) ));
+ GetI18NScriptTypeOfLanguage( (sal_uInt16)GetAppLanguage() ) ));
if (!aFontName.Len())
aFontName = aFont.GetFamilyName();
}
@@ -1100,7 +1091,7 @@ void SwTextShell::InsertSymbol( SfxRequest& rReq )
{
// Eingestellten Font als Default
SfxAllItemSet aAllSet( rSh.GetAttrPool() );
- aAllSet.Put( SfxBoolItem( FN_PARAM_1, FALSE ) );
+ aAllSet.Put( SfxBoolItem( FN_PARAM_1, sal_False ) );
SwViewOption aOpt(*GetShell().GetViewOptions());
String sSymbolFont = aOpt.GetSymbolFont();
@@ -1114,8 +1105,8 @@ void SwTextShell::InsertSymbol( SfxRequest& rReq )
GetView().GetViewFrame()->GetFrame().GetFrameInterface(), RID_SVXDLG_CHARMAP );
if( RET_OK == pDlg->Execute() )
{
- SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pCItem, SfxStringItem, SID_CHARMAP, FALSE );
- SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pFontItem, SvxFontItem, SID_ATTR_CHAR_FONT, FALSE );
+ SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pCItem, SfxStringItem, SID_CHARMAP, sal_False );
+ SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pFontItem, SvxFontItem, SID_ATTR_CHAR_FONT, sal_False );
if ( pFontItem )
{
aNewFont.SetName( pFontItem->GetFamilyName() );
@@ -1135,7 +1126,7 @@ void SwTextShell::InsertSymbol( SfxRequest& rReq )
delete pDlg;
}
- BOOL bFontChanged = FALSE;
+ sal_Bool bFontChanged = sal_False;
if( aChars.Len() )
{
rSh.StartAllAction();
@@ -1152,14 +1143,14 @@ void SwTextShell::InsertSymbol( SfxRequest& rReq )
rSh.GetCurAttr( aSet );
SvxScriptSetItem aSetItem( SID_ATTR_CHAR_FONT, *aSet.GetPool() );
- aSetItem.GetItemSet().Put( aSet, FALSE );
+ aSetItem.GetItemSet().Put( aSet, sal_False );
const SfxPoolItem* pI = aSetItem.GetItemOfScript( nScript );
if( pI )
aFont = *(SvxFontItem*)pI;
else
aFont = (SvxFontItem&)aSet.Get( GetWhichOfScript(
RES_CHRATR_FONT,
- GetI18NScriptTypeOfLanguage( (USHORT)GetAppLanguage() ) ));
+ GetI18NScriptTypeOfLanguage( (sal_uInt16)GetAppLanguage() ) ));
}
// Zeichen einfuegen
@@ -1168,7 +1159,7 @@ void SwTextShell::InsertSymbol( SfxRequest& rReq )
// #108876# a font attribute has to be set always due to a guessed script type
if( aNewFont.GetName().Len() )
{
- bFontChanged = TRUE;
+ bFontChanged = sal_True;
SvxFontItem aNewFontItem( aFont );
aNewFontItem.GetFamilyName() = aNewFont.GetName();
aNewFontItem.GetFamily() = aNewFont.GetFamily();
@@ -1182,22 +1173,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();
@@ -1217,7 +1208,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 63d767fe24..5baaf23d57 100644
--- a/sw/source/ui/shells/textsh1.cxx
+++ b/sw/source/ui/shells/textsh1.cxx
@@ -133,10 +133,10 @@
using namespace ::com::sun::star;
-void lcl_CharDialog( SwWrtShell &rWrtSh, BOOL bUseDialog, USHORT nSlot,const SfxItemSet *pArgs, SfxRequest *pReq )
+void lcl_CharDialog( SwWrtShell &rWrtSh, sal_Bool bUseDialog, sal_uInt16 nSlot,const SfxItemSet *pArgs, SfxRequest *pReq )
{
FieldUnit eMetric = ::GetDfltMetric(0 != PTR_CAST(SwWebView, &rWrtSh.GetView()));
- SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< UINT16 >(eMetric)));
+ SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric)));
SfxItemSet aCoreSet( rWrtSh.GetView().GetPool(),
RES_CHRATR_BEGIN, RES_CHRATR_END-1,
RES_TXTATR_INETFMT, RES_TXTATR_INETFMT,
@@ -146,8 +146,8 @@ void lcl_CharDialog( SwWrtShell &rWrtSh, BOOL bUseDialog, USHORT nSlot,const Sfx
SID_ATTR_CHAR_WIDTH_FIT_TO_LINE, SID_ATTR_CHAR_WIDTH_FIT_TO_LINE,
0 );
rWrtSh.GetCurAttr( aCoreSet );
- BOOL bSel = rWrtSh.HasSelection();
- BOOL bSelectionPut = FALSE;
+ sal_Bool bSel = rWrtSh.HasSelection();
+ sal_Bool bSelectionPut = sal_False;
if(bSel || rWrtSh.IsInWord())
{
if(!bSel)
@@ -158,10 +158,10 @@ void lcl_CharDialog( SwWrtShell &rWrtSh, BOOL bUseDialog, USHORT nSlot,const Sfx
rWrtSh.SelWrd();
}
aCoreSet.Put(SfxStringItem(FN_PARAM_SELECTION, rWrtSh.GetSelTxt()));
- bSelectionPut = TRUE;
+ bSelectionPut = sal_True;
if(!bSel)
{
- rWrtSh.Pop(FALSE);
+ rWrtSh.Pop(sal_False);
rWrtSh.EndAction();
}
}
@@ -170,7 +170,7 @@ void lcl_CharDialog( SwWrtShell &rWrtSh, BOOL bUseDialog, USHORT nSlot,const Sfx
// Das CHRATR_BACKGROUND-Attribut wird fuer den Dialog in
// ein RES_BACKGROUND verwandelt und wieder zurueck ...
const SfxPoolItem *pTmpBrush;
- if( SFX_ITEM_SET == aCoreSet.GetItemState( RES_CHRATR_BACKGROUND, TRUE, &pTmpBrush ) )
+ if( SFX_ITEM_SET == aCoreSet.GetItemState( RES_CHRATR_BACKGROUND, sal_True, &pTmpBrush ) )
{
SvxBrushItem aTmpBrush( *((SvxBrushItem*)pTmpBrush) );
aTmpBrush.SetWhich( RES_BACKGROUND );
@@ -201,7 +201,7 @@ void lcl_CharDialog( SwWrtShell &rWrtSh, BOOL bUseDialog, USHORT nSlot,const Sfx
if ( pSet)
{
SfxItemSet aTmpSet( *pSet );
- if( SFX_ITEM_SET == aTmpSet.GetItemState( RES_BACKGROUND, FALSE, &pTmpBrush ) )
+ if( SFX_ITEM_SET == aTmpSet.GetItemState( RES_BACKGROUND, sal_False, &pTmpBrush ) )
{
SvxBrushItem aTmpBrush( *((SvxBrushItem*)pTmpBrush) );
aTmpBrush.SetWhich( RES_CHRATR_BACKGROUND );
@@ -211,11 +211,11 @@ void lcl_CharDialog( SwWrtShell &rWrtSh, BOOL bUseDialog, USHORT nSlot,const Sfx
aTmpSet.ClearItem( RES_BACKGROUND );
const SfxPoolItem* pSelectionItem;
- BOOL bInsert = FALSE;
+ sal_Bool bInsert = sal_False;
xub_StrLen nInsert = 0;
// aus ungeklaerter Ursache ist das alte Item wieder im Set
- if( !bSelectionPut && SFX_ITEM_SET == aTmpSet.GetItemState(FN_PARAM_SELECTION, FALSE, &pSelectionItem) )
+ if( !bSelectionPut && SFX_ITEM_SET == aTmpSet.GetItemState(FN_PARAM_SELECTION, sal_False, &pSelectionItem) )
{
String sInsert = ((const SfxStringItem*)pSelectionItem)->GetValue();
bInsert = sInsert.Len() != 0;
@@ -225,13 +225,13 @@ void lcl_CharDialog( SwWrtShell &rWrtSh, BOOL bUseDialog, USHORT nSlot,const Sfx
rWrtSh.StartAction();
rWrtSh.Insert( sInsert );
rWrtSh.SetMark();
- rWrtSh.ExtendSelection(FALSE, sInsert.Len());
+ rWrtSh.ExtendSelection(sal_False, sInsert.Len());
SfxRequest aReq( rWrtSh.GetView().GetViewFrame(), FN_INSERT_STRING );
aReq.AppendItem( SfxStringItem( FN_INSERT_STRING, sInsert ) );
aReq.Done();
SfxRequest aReq1( rWrtSh.GetView().GetViewFrame(), FN_CHAR_LEFT );
aReq1.AppendItem( SfxInt16Item(FN_PARAM_MOVE_COUNT, nInsert) );
- aReq1.AppendItem( SfxBoolItem(FN_PARAM_MOVE_SELECTION, TRUE) );
+ aReq1.AppendItem( SfxBoolItem(FN_PARAM_MOVE_SELECTION, sal_True) );
aReq1.Done();
}
}
@@ -250,7 +250,7 @@ void lcl_CharDialog( SwWrtShell &rWrtSh, BOOL bUseDialog, USHORT nSlot,const Sfx
{
SfxRequest aReq1( rWrtSh.GetView().GetViewFrame(), FN_CHAR_RIGHT );
aReq1.AppendItem( SfxInt16Item(FN_PARAM_MOVE_COUNT, nInsert) );
- aReq1.AppendItem( SfxBoolItem(FN_PARAM_MOVE_SELECTION, FALSE) );
+ aReq1.AppendItem( SfxBoolItem(FN_PARAM_MOVE_SELECTION, sal_False) );
aReq1.Done();
rWrtSh.SwapPam();
rWrtSh.ClearMark();
@@ -272,7 +272,7 @@ short lcl_AskRedlineMode(Window *pWin)
String( SW_RES( STR_REDLINE_TITLE ) ),
String( SW_RES( STR_REDLINE_MSG ) ) );
aQBox.SetImage( QueryBox::GetStandardImage() );
- USHORT nBtnFlags = BUTTONDIALOG_DEFBUTTON |
+ sal_uInt16 nBtnFlags = BUTTONDIALOG_DEFBUTTON |
BUTTONDIALOG_OKBUTTON |
BUTTONDIALOG_FOCUSBUTTON;
@@ -289,13 +289,13 @@ short lcl_AskRedlineMode(Window *pWin)
void SwTextShell::Execute(SfxRequest &rReq)
{
- BOOL bUseDialog = TRUE;
+ sal_Bool bUseDialog = sal_True;
const SfxItemSet *pArgs = rReq.GetArgs();
SwWrtShell& rWrtSh = GetShell();
const SfxPoolItem* pItem = 0;
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
if(pArgs)
- pArgs->GetItemState(GetPool().GetWhich(nSlot), FALSE, &pItem);
+ pArgs->GetItemState(GetPool().GetWhich(nSlot), sal_False, &pItem);
switch( nSlot )
{
case SID_LANGUAGE_STATUS:
@@ -330,7 +330,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
//!! due to the selection changes coming below.
rWrtSh.StartAction();
// prevent view from jumping because of (temporary) selection changes
- rWrtSh.LockView( TRUE );
+ rWrtSh.LockView( sal_True );
// save selection for later restoration
rWrtSh.Push();
@@ -389,9 +389,9 @@ void SwTextShell::Execute(SfxRequest &rReq)
}
// restore selection...
- rWrtSh.Pop( FALSE );
+ rWrtSh.Pop( sal_False );
- rWrtSh.LockView( FALSE );
+ rWrtSh.LockView( sal_False );
rWrtSh.EndAction();
}
@@ -433,12 +433,12 @@ void SwTextShell::Execute(SfxRequest &rReq)
SFX_REQUEST_ARG( rReq, pNameItem, SfxStringItem, nSlot , sal_False );
if ( pNameItem )
aStr = pNameItem->GetValue();
- BOOL bFont = pFont && pFont->GetValue().Len();
+ sal_Bool bFont = pFont && pFont->GetValue().Len();
rWrtSh.StartUndo( UNDO_UI_INSERT_FOOTNOTE );
rWrtSh.InsertFootnote( aStr, nSlot == FN_INSERT_ENDNOTE, !bFont );
if ( bFont )
{
- rWrtSh.Left( CRSR_SKIP_CHARS, TRUE, 1, FALSE );
+ rWrtSh.Left( CRSR_SKIP_CHARS, sal_True, 1, sal_False );
SfxItemSet aSet( rWrtSh.GetAttrPool(), RES_CHRATR_FONT, RES_CHRATR_FONT );
rWrtSh.GetCurAttr( aSet );
SvxFontItem &rFont = (SvxFontItem &) aSet.Get( RES_CHRATR_FONT );
@@ -446,7 +446,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
rFont.GetStyleName(), rFont.GetPitch(), RTL_TEXTENCODING_DONTKNOW, RES_CHRATR_FONT );
//pCharset ? (CharSet) pCharset->GetValue() : RTL_TEXTENCODING_DONTKNOW );
rWrtSh.SetAttr( aSet, nsSetAttrMode::SETATTR_DONTEXPAND );
- rWrtSh.ResetSelect(0, FALSE);
+ rWrtSh.ResetSelect(0, sal_False);
rWrtSh.EndSelect();
rWrtSh.GotoFtnTxt();
}
@@ -459,12 +459,12 @@ void SwTextShell::Execute(SfxRequest &rReq)
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
DBG_ASSERT(pFact, "Dialogdiet fail!");
AbstractInsFootNoteDlg* pDlg = pFact->CreateInsFootNoteDlg( DLG_INS_FOOTNOTE,
- GetView().GetWindow(), rWrtSh, FALSE );
+ GetView().GetWindow(), rWrtSh, sal_False );
DBG_ASSERT(pDlg, "Dialogdiet fail!");
pDlg->SetHelpId(GetStaticInterface()->GetSlot(nSlot)->GetCommand());
if ( pDlg->Execute() == RET_OK )
{
- USHORT nId = pDlg->IsEndNote() ? FN_INSERT_ENDNOTE : FN_INSERT_FOOTNOTE;
+ sal_uInt16 nId = pDlg->IsEndNote() ? FN_INSERT_ENDNOTE : FN_INSERT_FOOTNOTE;
SfxRequest aReq( GetView().GetViewFrame(), nId );
if ( pDlg->GetStr().Len() )
aReq.AppendItem( SfxStringItem( nId, pDlg->GetStr() ) );
@@ -501,7 +501,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
// remove the languages from that)
SvUShortsSort aAttribs;
- USHORT __FAR_DATA aResetableSetRange[] = {
+ sal_uInt16 __FAR_DATA aResetableSetRange[] = {
RES_FRMATR_BEGIN, RES_FRMATR_END-1,
RES_CHRATR_BEGIN, RES_CHRATR_LANGUAGE - 1,
RES_CHRATR_LANGUAGE + 1, RES_CHRATR_CJK_LANGUAGE - 1,
@@ -515,12 +515,12 @@ void SwTextShell::Execute(SfxRequest &rReq)
RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END-1,
0
};
- USHORT __FAR_DATA *pUShorts = aResetableSetRange;
+ sal_uInt16 __FAR_DATA *pUShorts = aResetableSetRange;
while (*pUShorts)
{
- USHORT nL = pUShorts[1] - pUShorts[0] + 1;
- USHORT nE = pUShorts[0];
- for (USHORT i = 0; i < nL; ++i)
+ sal_uInt16 nL = pUShorts[1] - pUShorts[0] + 1;
+ sal_uInt16 nE = pUShorts[0];
+ for (sal_uInt16 i = 0; i < nL; ++i)
aAttribs.Insert( nE++ );
pUShorts += 2;
}
@@ -531,7 +531,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
}
case FN_INSERT_BREAK_DLG:
{
- USHORT nKind=0, nPageNumber=0;
+ sal_uInt16 nKind=0, nPageNumber=0;
String aTemplateName;
if ( pItem )
{
@@ -616,11 +616,11 @@ void SwTextShell::Execute(SfxRequest &rReq)
case FN_AUTOFORMAT_REDLINE_APPLY:
{
SvxSwAutoFmtFlags aFlags(SvxAutoCorrCfg::Get()->GetAutoCorrect()->GetSwFlags());
- // das muss fuer die Nachbearbeitung immer FALSE sein
- aFlags.bAFmtByInput = FALSE;
- aFlags.bWithRedlining = TRUE;
+ // das muss fuer die Nachbearbeitung immer sal_False sein
+ aFlags.bAFmtByInput = sal_False;
+ aFlags.bWithRedlining = sal_True;
rWrtSh.AutoFormat( &aFlags );
- aFlags.bWithRedlining = FALSE;
+ aFlags.bWithRedlining = sal_False;
SfxViewFrame* pVFrame = GetView().GetViewFrame();
if (pVFrame->HasChildWindow(FN_REDLINE_ACCEPT))
@@ -636,7 +636,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
{
case RET_OK:
{
- pDlg->AcceptAll(TRUE);
+ pDlg->AcceptAll(sal_True);
SfxRequest aReq( pVFrame, FN_AUTOFORMAT_APPLY );
aReq.Done();
rReq.Ignore();
@@ -644,7 +644,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
}
case RET_CANCEL:
- pDlg->AcceptAll(FALSE);
+ pDlg->AcceptAll(sal_False);
rReq.Ignore();
break;
@@ -660,8 +660,8 @@ void SwTextShell::Execute(SfxRequest &rReq)
case FN_AUTOFORMAT_APPLY:
{
SvxSwAutoFmtFlags aFlags(SvxAutoCorrCfg::Get()->GetAutoCorrect()->GetSwFlags());
- // das muss fuer die Nachbearbeitung immer FALSE sein
- aFlags.bAFmtByInput = FALSE;
+ // das muss fuer die Nachbearbeitung immer sal_False sein
+ aFlags.bAFmtByInput = sal_False;
rWrtSh.AutoFormat( &aFlags );
rReq.Done();
}
@@ -669,7 +669,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
case FN_AUTOFORMAT_AUTO:
{
SvxAutoCorrCfg* pACfg = SvxAutoCorrCfg::Get();
- BOOL bSet = pItem ? ((const SfxBoolItem*)pItem)->GetValue() : !pACfg->IsAutoFmtByInput();
+ sal_Bool bSet = pItem ? ((const SfxBoolItem*)pItem)->GetValue() : !pACfg->IsAutoFmtByInput();
if( bSet != pACfg->IsAutoFmtByInput() )
{
pACfg->SetAutoFmtByInput( bSet );
@@ -740,7 +740,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
break;
case FN_EDIT_FORMULA:
{
- const USHORT nId = SwInputChild::GetChildWindowId();
+ const sal_uInt16 nId = SwInputChild::GetChildWindowId();
SfxViewFrame* pVFrame = GetView().GetViewFrame();
if(pItem)
{
@@ -748,13 +748,13 @@ void SwTextShell::Execute(SfxRequest &rReq)
if( pVFrame->HasChildWindow( nId ) )
{
pVFrame->ToggleChildWindow( nId );
- pVFrame->GetBindings().InvalidateAll( TRUE );
+ pVFrame->GetBindings().InvalidateAll( sal_True );
}
String sFormula(((const SfxStringItem*)pItem)->GetValue());
SwFldMgr aFldMgr;
rWrtSh.StartAllAction();
- BOOL bDelSel;
+ sal_Bool bDelSel;
if( 0 != (bDelSel = rWrtSh.HasSelection()) )
{
rWrtSh.StartUndo( UNDO_START );
@@ -779,7 +779,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
else
{
SvNumberFormatter* pFormatter = rWrtSh.GetNumberFormatter();
- ULONG nSysNumFmt = pFormatter->GetFormatIndex( NF_NUMBER_STANDARD, LANGUAGE_SYSTEM);
+ sal_uLong nSysNumFmt = pFormatter->GetFormatIndex( NF_NUMBER_STANDARD, LANGUAGE_SYSTEM);
SwInsertFld_Data aData(TYP_FORMELFLD, nsSwGetSetExpType::GSE_FORMULA, aEmptyStr, sFormula, nSysNumFmt);
aFldMgr.InsertFld(aData);
}
@@ -795,7 +795,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
rWrtSh.EndAllTblBoxEdit();
pVFrame->ToggleChildWindow( nId );
if( !pVFrame->HasChildWindow( nId ) )
- pVFrame->GetBindings().InvalidateAll( TRUE );
+ pVFrame->GetBindings().InvalidateAll( sal_True );
rReq.Ignore();
}
}
@@ -811,7 +811,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
break;
case FN_REMOVE_HYPERLINK:
{
- BOOL bSel = rWrtSh.HasSelection();
+ sal_Bool bSel = rWrtSh.HasSelection();
if(!bSel)
{
rWrtSh.StartAction();
@@ -825,7 +825,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
rWrtSh.ResetAttr( &aAttribs );
if(!bSel)
{
- rWrtSh.Pop(FALSE);
+ rWrtSh.Pop(sal_False);
rWrtSh.EndAction();
}
}
@@ -836,9 +836,9 @@ void SwTextShell::Execute(SfxRequest &rReq)
case FN_TXTATR_INET :
case FN_INSERT_HYPERLINK:
{
- USHORT nWhich = GetPool().GetWhich( nSlot );
+ sal_uInt16 nWhich = GetPool().GetWhich( nSlot );
if ( pArgs && pArgs->GetItemState( nWhich ) == SFX_ITEM_SET )
- bUseDialog = FALSE;
+ bUseDialog = sal_False;
// intentionally no break
}
case SID_CHAR_DLG:
@@ -851,7 +851,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
rWrtSh.Push(); //save current cursor
SwLangHelper::SelectCurrentPara( rWrtSh );
lcl_CharDialog( rWrtSh, bUseDialog, nSlot, pArgs, &rReq );
- rWrtSh.Pop( FALSE ); //restore old cursor
+ rWrtSh.Pop( sal_False ); //restore old cursor
}
break;
case SID_ATTR_LRSPACE :
@@ -867,16 +867,16 @@ void SwTextShell::Execute(SfxRequest &rReq)
case FN_FORMAT_DROPCAPS :
case FN_DROP_TEXT:
{
- USHORT nWhich = GetPool().GetWhich( nSlot );
+ sal_uInt16 nWhich = GetPool().GetWhich( nSlot );
if ( pArgs && pArgs->GetItemState( nWhich ) == SFX_ITEM_SET )
- bUseDialog = FALSE;
+ bUseDialog = sal_False;
// intentionally no break
}
case SID_PARA_DLG:
{
FieldUnit eMetric = ::GetDfltMetric(0 != PTR_CAST(SwWebView, &GetView()));
- SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< UINT16 >(eMetric)));
+ SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric)));
SfxItemSet aCoreSet( GetPool(),
RES_PARATR_BEGIN, RES_PARATR_END - 1,
// --> OD 2008-02-25 #refactorlists#
@@ -905,7 +905,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
const SvxTabStopItem& rDefTabs = (const SvxTabStopItem&)
GetPool().GetDefaultItem(RES_PARATR_TABSTOP);
- USHORT nDefDist = ::GetTabDist( rDefTabs );
+ sal_uInt16 nDefDist = ::GetTabDist( rDefTabs );
SfxUInt16Item aDefDistItem( SID_ATTR_TABSTOP_DEFAULTS, nDefDist );
aCoreSet.Put( aDefDistItem );
@@ -926,7 +926,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
//aktuelles Seitenformat
::SwToSfxPageDescAttr( aCoreSet );
- UINT16 nDefPage = 0;
+ sal_uInt16 nDefPage = 0;
if( pItem )
nDefPage = ((SfxUInt16Item *)pItem)->GetValue();
@@ -950,7 +950,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!");
- pDlg = pFact->CreateSwParaDlg( GetView().GetWindow(),GetView(), aCoreSet,DLG_STD, DLG_PARA,NULL, FALSE, nDefPage );
+ pDlg = pFact->CreateSwParaDlg( GetView().GetWindow(),GetView(), aCoreSet,DLG_STD, DLG_PARA,NULL, sal_False, nDefPage );
DBG_ASSERT(pDlg, "Dialogdiet fail!");
}
SfxItemSet* pSet = NULL;
@@ -963,8 +963,8 @@ void SwTextShell::Execute(SfxRequest &rReq)
{
// Defaults evtl umsetzen
pSet = (SfxItemSet*)pDlg->GetOutputItemSet();
- USHORT nNewDist;
- if( SFX_ITEM_SET == pSet->GetItemState( SID_ATTR_TABSTOP_DEFAULTS, FALSE, &pItem ) &&
+ sal_uInt16 nNewDist;
+ if( SFX_ITEM_SET == pSet->GetItemState( SID_ATTR_TABSTOP_DEFAULTS, sal_False, &pItem ) &&
nDefDist != (nNewDist = ((SfxUInt16Item*)pItem)->GetValue()) )
{
SvxTabStopItem aDefTabs( 0, 0, SVX_TAB_ADJUST_DEFAULT, RES_PARATR_TABSTOP );
@@ -973,13 +973,13 @@ void SwTextShell::Execute(SfxRequest &rReq)
pSet->ClearItem( SID_ATTR_TABSTOP_DEFAULTS );
}
- if ( SFX_ITEM_SET == pSet->GetItemState(FN_PARAM_1,FALSE,&pItem) )
+ if ( SFX_ITEM_SET == pSet->GetItemState(FN_PARAM_1,sal_False,&pItem) )
{
pSet->Put(SfxStringItem(FN_DROP_TEXT, ((const SfxStringItem*)pItem)->GetValue()));
pSet->ClearItem(FN_PARAM_1);
}
- if( SFX_ITEM_SET == pSet->GetItemState( RES_PARATR_DROP, FALSE, &pItem ))
+ if( SFX_ITEM_SET == pSet->GetItemState( RES_PARATR_DROP, sal_False, &pItem ))
{
String sCharStyleName;
if(((const SwFmtDrop*)pItem)->GetCharFmt())
@@ -1007,7 +1007,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
{
rWrtSh.StartAction();
// rWrtSh.StartUndo( UNDO_START );
- if ( SFX_ITEM_SET == pSet->GetItemState(FN_DROP_TEXT, FALSE, &pItem) )
+ if ( SFX_ITEM_SET == pSet->GetItemState(FN_DROP_TEXT, sal_False, &pItem) )
{
if ( ((SfxStringItem*)pItem)->GetValue().Len() )
rWrtSh.ReplaceDropTxt(((SfxStringItem*)pItem)->GetValue());
@@ -1024,17 +1024,17 @@ void SwTextShell::Execute(SfxRequest &rReq)
if( SFX_ITEM_SET == pSet->GetItemState(FN_NUMBER_NEWSTART) )
{
- //SetNumRuleStart(TRUE) restarts the numbering at the value
+ //SetNumRuleStart(sal_True) restarts the numbering at the value
//that is defined at the starting point of the numbering level
//otherwise the SetNodeNumStart() value determines the start
//if it's set to something different than USHRT_MAX
- BOOL bStart = ((SfxBoolItem&)pSet->Get(FN_NUMBER_NEWSTART)).GetValue();
+ sal_Bool bStart = ((SfxBoolItem&)pSet->Get(FN_NUMBER_NEWSTART)).GetValue();
// --> OD 2007-06-11 #b6560525#
// Default value for restart value has to be USHRT_MAX
// in order to indicate that the restart value of the list
// style has to be used on restart.
- USHORT nNumStart = USHRT_MAX;
+ sal_uInt16 nNumStart = USHRT_MAX;
// <--
if( SFX_ITEM_SET == pSet->GetItemState(FN_NUMBER_NEWSTART_AT) )
{
@@ -1045,9 +1045,9 @@ void SwTextShell::Execute(SfxRequest &rReq)
}
else if( SFX_ITEM_SET == pSet->GetItemState(FN_NUMBER_NEWSTART_AT) )
{
- USHORT nNumStart = ((SfxUInt16Item&)pSet->Get(FN_NUMBER_NEWSTART_AT)).GetValue();
+ sal_uInt16 nNumStart = ((SfxUInt16Item&)pSet->Get(FN_NUMBER_NEWSTART_AT)).GetValue();
rWrtSh.SetNodeNumStart(nNumStart);
- rWrtSh.SetNumRuleStart(FALSE);
+ rWrtSh.SetNumRuleStart(sal_False);
}
// --> OD 2006-12-06 #i56253#
if ( bUndoNeeded )
@@ -1083,10 +1083,10 @@ void SwTextShell::Execute(SfxRequest &rReq)
case FN_SELECT_PARA:
{
if(!rWrtSh.IsSttOfPara())
- rWrtSh.SttPara(FALSE);
+ rWrtSh.SttPara(sal_False);
else
rWrtSh.EnterStdMode();
- rWrtSh.EndPara(TRUE);
+ rWrtSh.EndPara(sal_True);
}
break;
@@ -1182,7 +1182,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
SwEditWin& rEdtWin = GetView().GetEditWin();
SwApplyTemplate* pApply = rEdtWin.GetApplyTemplate();
SwApplyTemplate aTempl;
- BOOL bSelection = rWrtSh.HasSelection();
+ sal_Bool bSelection = rWrtSh.HasSelection();
if(bSelection)
{
@@ -1232,8 +1232,8 @@ void SwTextShell::Execute(SfxRequest &rReq)
String sStyleName;
if(pItem)
sStyleName = ((const SfxStringItem*)pItem)->GetValue();
- BOOL bOn = TRUE;
- if( SFX_ITEM_SET == pArgs->GetItemState(FN_PARAM_1, FALSE, &pItem))
+ sal_Bool bOn = sal_True;
+ if( SFX_ITEM_SET == pArgs->GetItemState(FN_PARAM_1, sal_False, &pItem))
bOn = ((const SfxBoolItem*)pItem)->GetValue();
ChangeHeaderOrFooter(sStyleName, FN_INSERT_PAGEHEADER == nSlot, bOn, !rReq.IsAPI());
rReq.Done();
@@ -1251,7 +1251,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
case FN_SELECTION_MODE_BLOCK :
{
bool bSetBlockMode = !rWrtSh.IsBlockMode();
- if( pArgs && SFX_ITEM_SET == pArgs->GetItemState(nSlot, FALSE, &pItem))
+ if( pArgs && SFX_ITEM_SET == pArgs->GetItemState(nSlot, sal_False, &pItem))
bSetBlockMode = ((const SfxBoolItem*)pItem)->GetValue();
if( ( nSlot == FN_SELECTION_MODE_DEFAULT ) ^ bSetBlockMode )
rWrtSh.EnterBlockMode();
@@ -1269,9 +1269,9 @@ void SwTextShell::Execute(SfxRequest &rReq)
RES_TXTATR_INETFMT,
RES_TXTATR_INETFMT);
rWrtSh.GetCurAttr(aSet);
- if(SFX_ITEM_SET <= aSet.GetItemState( RES_TXTATR_INETFMT, TRUE ))
+ if(SFX_ITEM_SET <= aSet.GetItemState( RES_TXTATR_INETFMT, sal_True ))
{
- const SwFmtINetFmt& rINetFmt = dynamic_cast<const SwFmtINetFmt&>( aSet.Get(RES_TXTATR_INETFMT, TRUE) );
+ const SwFmtINetFmt& rINetFmt = dynamic_cast<const SwFmtINetFmt&>( aSet.Get(RES_TXTATR_INETFMT, sal_True) );
if( nSlot == FN_COPY_HYPERLINK_LOCATION )
{
::uno::Reference< datatransfer::clipboard::XClipboard > xClipboard = GetView().GetEditWin().GetClipboard();
@@ -1326,7 +1326,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
SwDocStat aCurr;
SwDocStat aDocStat( rSh.getIDocumentStatistics()->GetDocStat() );
{
- SwWait aWait( *GetView().GetDocShell(), TRUE );
+ SwWait aWait( *GetView().GetDocShell(), sal_True );
rSh.StartAction();
rSh.CountWords( aCurr );
rSh.UpdateDocStat( aDocStat );
@@ -1357,7 +1357,7 @@ void SwTextShell::GetState( SfxItemSet &rSet )
{
SwWrtShell &rSh = GetShell();
SfxWhichIter aIter( rSet );
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while ( nWhich )
{
switch ( nWhich )
@@ -1452,15 +1452,15 @@ void SwTextShell::GetState( SfxItemSet &rSet )
case FN_INSERT_FOOTNOTE:
case FN_INSERT_FOOTNOTE_DLG:
{
- const USHORT nNoType = FRMTYPE_FLY_ANY | FRMTYPE_HEADER |
+ const sal_uInt16 nNoType = FRMTYPE_FLY_ANY | FRMTYPE_HEADER |
FRMTYPE_FOOTER | FRMTYPE_FOOTNOTE;
- if ( (rSh.GetFrmType(0,TRUE) & nNoType) )
+ if ( (rSh.GetFrmType(0,sal_True) & nNoType) )
rSet.DisableItem(nWhich);
}
break;
case FN_INSERT_TABLE:
if ( rSh.GetTableFmt() ||
- (rSh.GetFrmType(0,TRUE) & FRMTYPE_FOOTNOTE) )
+ (rSh.GetFrmType(0,sal_True) & FRMTYPE_FOOTNOTE) )
rSet.DisableItem( nWhich );
break;
@@ -1482,17 +1482,17 @@ void SwTextShell::GetState( SfxItemSet &rSet )
break;
case FN_GLOSSARY_DLG:
{
- rSet.Put(SfxBoolItem(nWhich), TRUE);
+ rSet.Put(SfxBoolItem(nWhich), sal_True);
}
break;
case SID_DEC_INDENT:
case SID_INC_INDENT:
{
- USHORT nHtmlMode = ::GetHtmlMode(GetView().GetDocShell());
+ sal_uInt16 nHtmlMode = ::GetHtmlMode(GetView().GetDocShell());
nHtmlMode &= HTMLMODE_ON|HTMLMODE_SOME_STYLES;
if( (nHtmlMode == HTMLMODE_ON) || !rSh.IsMoveLeftMargin(
- SID_INC_INDENT == nWhich, TRUE ))
+ SID_INC_INDENT == nWhich, sal_True ))
rSet.DisableItem( nWhich );
}
break;
@@ -1500,11 +1500,11 @@ void SwTextShell::GetState( SfxItemSet &rSet )
case FN_DEC_INDENT_OFFSET:
case FN_INC_INDENT_OFFSET:
{
- USHORT nHtmlMode = ::GetHtmlMode(GetView().GetDocShell());
+ sal_uInt16 nHtmlMode = ::GetHtmlMode(GetView().GetDocShell());
nHtmlMode &= HTMLMODE_ON|HTMLMODE_SOME_STYLES;
if( (nHtmlMode == HTMLMODE_ON) ||
!rSh.IsMoveLeftMargin( FN_INC_INDENT_OFFSET == nWhich,
- FALSE ))
+ sal_False ))
rSet.DisableItem( nWhich );
}
break;
@@ -1542,8 +1542,8 @@ void SwTextShell::GetState( SfxItemSet &rSet )
rSet.Put( SfxObjectShellItem( nWhich, GetView().GetDocShell() ));
#else
// Seitenvorlagen besorgen
- BOOL bFound = FALSE;
- USHORT n, nCnt = rSh.GetPageDescCnt();
+ sal_Bool bFound = sal_False;
+ sal_uInt16 n, nCnt = rSh.GetPageDescCnt();
for( n = 0; n < nCnt; ++n )
{
const SwPageDesc& rDesc = rSh.GetPageDesc( n );
@@ -1551,7 +1551,7 @@ void SwTextShell::GetState( SfxItemSet &rSet )
? !rDesc.GetMaster().GetHeader().IsActive()
: !rDesc.GetMaster().GetFooter().IsActive() )
{
- bFound = TRUE;
+ bFound = sal_True;
break;
}
}
@@ -1599,7 +1599,7 @@ void SwTextShell::GetState( SfxItemSet &rSet )
RES_TXTATR_INETFMT,
RES_TXTATR_INETFMT);
rSh.GetCurAttr(aSet);
- if(SFX_ITEM_SET > aSet.GetItemState( RES_TXTATR_INETFMT, TRUE ) || rSh.HasReadonlySel())
+ if(SFX_ITEM_SET > aSet.GetItemState( RES_TXTATR_INETFMT, sal_True ) || rSh.HasReadonlySel())
{
rSet.DisableItem(nWhich);
}
@@ -1638,7 +1638,7 @@ void SwTextShell::GetState( SfxItemSet &rSet )
RES_TXTATR_INETFMT,
RES_TXTATR_INETFMT);
rSh.GetCurAttr(aSet);
- if(SFX_ITEM_SET > aSet.GetItemState( RES_TXTATR_INETFMT, FALSE ))
+ if(SFX_ITEM_SET > aSet.GetItemState( RES_TXTATR_INETFMT, sal_False ))
rSet.DisableItem(nWhich);
}
break;
@@ -1727,17 +1727,17 @@ void SwTextShell::GetState( SfxItemSet &rSet )
given all styles are changed
---------------------------------------------------------------------------*/
void SwTextShell::ChangeHeaderOrFooter(
- const String& rStyleName, BOOL bHeader, BOOL bOn, BOOL bShowWarning)
+ const String& rStyleName, sal_Bool bHeader, sal_Bool bOn, sal_Bool bShowWarning)
{
SwWrtShell& rSh = GetShell();
rSh.StartAllAction();
rSh.StartUndo( UNDO_HEADER_FOOTER ); // #i7983#
- BOOL bExecute = TRUE;
- BOOL bCrsrSet = FALSE;
- for( USHORT nFrom = 0, nTo = rSh.GetPageDescCnt();
+ sal_Bool bExecute = sal_True;
+ sal_Bool bCrsrSet = sal_False;
+ for( sal_uInt16 nFrom = 0, nTo = rSh.GetPageDescCnt();
nFrom < nTo; ++nFrom )
{
- int bChgd = FALSE;
+ int bChgd = sal_False;
SwPageDesc aDesc( rSh.GetPageDesc( nFrom ));
String sTmp(aDesc.GetName());
if( !rStyleName.Len() || rStyleName == sTmp )
@@ -1746,19 +1746,19 @@ void SwTextShell::ChangeHeaderOrFooter(
((bHeader && aDesc.GetMaster().GetHeader().IsActive()) ||
(!bHeader && aDesc.GetMaster().GetFooter().IsActive())))
{
- bShowWarning = FALSE;
+ bShowWarning = sal_False;
//Actions have to be closed while the dialog is showing
rSh.EndAllAction();
Window* pParent = &GetView().GetViewFrame()->GetWindow();
- BOOL bRet = RET_YES == QueryBox( pParent, ResId( RID_SVXQBX_DELETE_HEADFOOT,
+ sal_Bool bRet = RET_YES == QueryBox( pParent, ResId( RID_SVXQBX_DELETE_HEADFOOT,
DIALOG_MGR() ) ).Execute();
bExecute = bRet;
rSh.StartAllAction();
}
if( bExecute )
{
- bChgd = TRUE;
+ bChgd = sal_True;
SwFrmFmt &rMaster = aDesc.GetMaster();
if(bHeader)
rMaster.SetFmtAttr( SwFmtHeader( bOn ));
diff --git a/sw/source/ui/shells/textsh2.cxx b/sw/source/ui/shells/textsh2.cxx
index e08db985ec..e711989a58 100644
--- a/sw/source/ui/shells/textsh2.cxx
+++ b/sw/source/ui/shells/textsh2.cxx
@@ -108,7 +108,7 @@ void SwTextShell::ExecDB(SfxRequest &rReq)
{
const SfxItemSet *pArgs = rReq.GetArgs();
SwNewDBMgr* pNewDBMgr = GetShell().GetNewDBMgr();
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
::rtl::OUString sSourceArg, sCommandArg;
sal_Int32 nCommandTypeArg = 0;
@@ -120,29 +120,29 @@ void SwTextShell::ExecDB(SfxRequest &rReq)
const SfxPoolItem* pSelectionItem = 0;
// first get the selection of rows to be inserted
- pArgs->GetItemState(FN_DB_DATA_SELECTION_ANY, FALSE, &pSelectionItem);
+ pArgs->GetItemState(FN_DB_DATA_SELECTION_ANY, sal_False, &pSelectionItem);
Sequence<Any> aSelection;
if(pSelectionItem)
((SfxUsrAnyItem*)pSelectionItem)->GetValue() >>= aSelection;
// get the data source name
- pArgs->GetItemState(FN_DB_DATA_SOURCE_ANY, FALSE, &pSourceItem);
+ pArgs->GetItemState(FN_DB_DATA_SOURCE_ANY, sal_False, &pSourceItem);
if(pSourceItem)
((const SfxUsrAnyItem*)pSourceItem)->GetValue() >>= sSourceArg;
// get the command
- pArgs->GetItemState(FN_DB_DATA_COMMAND_ANY, FALSE, &pCommandItem);
+ pArgs->GetItemState(FN_DB_DATA_COMMAND_ANY, sal_False, &pCommandItem);
if(pCommandItem)
((const SfxUsrAnyItem*)pCommandItem)->GetValue() >>= sCommandArg;
// get the command type
- pArgs->GetItemState(FN_DB_DATA_COMMAND_TYPE_ANY, FALSE, &pCommandTypeItem);
+ pArgs->GetItemState(FN_DB_DATA_COMMAND_TYPE_ANY, sal_False, &pCommandTypeItem);
if(pCommandTypeItem)
((const SfxUsrAnyItem*)pCommandTypeItem)->GetValue() >>= nCommandTypeArg;
Reference<XConnection> xConnection;
- pArgs->GetItemState(FN_DB_CONNECTION_ANY, FALSE, &pConnectionItem);
+ pArgs->GetItemState(FN_DB_CONNECTION_ANY, sal_False, &pConnectionItem);
if ( pConnectionItem )
((const SfxUsrAnyItem*)pConnectionItem)->GetValue() >>= xConnection;
// may be we even get no connection
@@ -156,7 +156,7 @@ void SwTextShell::ExecDB(SfxRequest &rReq)
// get the cursor, we use to travel, may be NULL
Reference<XResultSet> xCursor;
- pArgs->GetItemState(FN_DB_DATA_CURSOR_ANY, FALSE, &pCursorItem);
+ pArgs->GetItemState(FN_DB_DATA_CURSOR_ANY, sal_False, &pCursorItem);
if ( pCursorItem )
((const SfxUsrAnyItem*)pCursorItem)->GetValue() >>= xCursor;
@@ -186,7 +186,7 @@ void SwTextShell::ExecDB(SfxRequest &rReq)
case FN_QRY_MERGE_FIELD:
{
// we don't get any cursor, so we must create our own
- BOOL bDisposeResultSet = FALSE;
+ sal_Bool bDisposeResultSet = sal_False;
if ( !xCursor.is() )
{
xCursor = SwNewDBMgr::createCursor(sSourceArg,sCommandArg,nCommandTypeArg,xConnection);
@@ -213,8 +213,8 @@ void SwTextShell::ExecDB(SfxRequest &rReq)
const SfxPoolItem* pColumnItem = 0;
const SfxPoolItem* pColumnNameItem = 0;
- pArgs->GetItemState(FN_DB_COLUMN_ANY, FALSE, &pColumnItem);
- pArgs->GetItemState(FN_DB_DATA_COLUMN_NAME_ANY, FALSE, &pColumnNameItem);
+ pArgs->GetItemState(FN_DB_COLUMN_ANY, sal_False, &pColumnItem);
+ pArgs->GetItemState(FN_DB_DATA_COLUMN_NAME_ANY, sal_False, &pColumnNameItem);
::rtl::OUString sColumnName;
if(pColumnNameItem)
@@ -228,7 +228,7 @@ void SwTextShell::ExecDB(SfxRequest &rReq)
sDBName += (String)sColumnName;
SwFldMgr aFldMgr(GetShellPtr());
- SwInsertFld_Data aData(TYP_DBFLD, 0, sDBName, aEmptyStr, 0, FALSE, TRUE);
+ SwInsertFld_Data aData(TYP_DBFLD, 0, sDBName, aEmptyStr, 0, sal_False, sal_True);
if(pConnectionItem)
aData.aDBConnection = ((SfxUsrAnyItem*)pConnectionItem)->GetValue();
if(pColumnItem)
diff --git a/sw/source/ui/shells/txtattr.cxx b/sw/source/ui/shells/txtattr.cxx
index 0993657adc..3b65cbc3f9 100644
--- a/sw/source/ui/shells/txtattr.cxx
+++ b/sw/source/ui/shells/txtattr.cxx
@@ -89,12 +89,12 @@ void SwTextShell::ExecCharAttr(SfxRequest &rReq)
SwWrtShell &rSh = GetShell();
const SfxItemSet *pArgs = rReq.GetArgs();
int eState = STATE_TOGGLE;
- USHORT nWhich = rReq.GetSlot();
+ sal_uInt16 nWhich = rReq.GetSlot();
if(pArgs )
{
const SfxPoolItem* pItem;
- pArgs->GetItemState(nWhich, FALSE, &pItem);
+ pArgs->GetItemState(nWhich, sal_False, &pItem);
eState = ((const SfxBoolItem &) pArgs->
Get( nWhich )).GetValue() ? STATE_ON : STATE_OFF;
}
@@ -126,10 +126,10 @@ void SwTextShell::ExecCharAttr(SfxRequest &rReq)
SfxBindings& rBind = GetView().GetViewFrame()->GetBindings();
if( nWhich == FN_SET_SUB_SCRIPT )
rBind.SetState( SfxBoolItem( FN_SET_SUPER_SCRIPT,
- FALSE ) );
+ sal_False ) );
else
rBind.SetState( SfxBoolItem( FN_SET_SUB_SCRIPT,
- FALSE ) );
+ sal_False ) );
}
break;
@@ -191,7 +191,7 @@ void SwTextShell::ExecCharAttr(SfxRequest &rReq)
rSh.DontExpandFmt();
break;
default:
- ASSERT(FALSE, falscher Dispatcher);
+ ASSERT(sal_False, falscher Dispatcher);
return;
}
}
@@ -199,10 +199,10 @@ void SwTextShell::ExecCharAttr(SfxRequest &rReq)
void SwTextShell::ExecCharAttrArgs(SfxRequest &rReq)
{
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
const SfxItemSet* pArgs = rReq.GetArgs();
- BOOL bArgs = pArgs != 0 && pArgs->Count() > 0;
- int bGrow = FALSE;
+ sal_Bool bArgs = pArgs != 0 && pArgs->Count() > 0;
+ int bGrow = sal_False;
SwWrtShell& rWrtSh = GetShell();
SwTxtFmtColl* pColl = 0;
@@ -214,7 +214,7 @@ void SwTextShell::ExecCharAttrArgs(SfxRequest &rReq)
pColl = 0;
}
SfxItemPool& rPool = GetPool();
- USHORT nWhich = rPool.GetWhich(nSlot);
+ sal_uInt16 nWhich = rPool.GetWhich(nSlot);
switch ( nSlot )
{
case FN_TXTATR_INET:
@@ -243,7 +243,7 @@ void SwTextShell::ExecCharAttrArgs(SfxRequest &rReq)
break;
case FN_GROW_FONT_SIZE:
- bGrow = TRUE;
+ bGrow = sal_True;
// kein break !!
case FN_SHRINK_FONT_SIZE:
{
@@ -252,10 +252,10 @@ void SwTextShell::ExecCharAttrArgs(SfxRequest &rReq)
SfxItemSet aAttrSet( rPool, aSetItem.GetItemSet().GetRanges() );
const SfxPoolItem* pI;
- static const USHORT aScrTypes[] = {
+ static const sal_uInt16 aScrTypes[] = {
SCRIPTTYPE_LATIN, SCRIPTTYPE_ASIAN, SCRIPTTYPE_COMPLEX, 0 };
- USHORT nScriptType = rWrtSh.GetScriptType();
- for( const USHORT* pScrpTyp = aScrTypes; *pScrpTyp; ++pScrpTyp )
+ sal_uInt16 nScriptType = rWrtSh.GetScriptType();
+ for( const sal_uInt16* pScrpTyp = aScrTypes; *pScrpTyp; ++pScrpTyp )
if( ( nScriptType & *pScrpTyp ) &&
0 != ( pI = aSetItem.GetItemOfScript( *pScrpTyp )))
{
@@ -291,7 +291,7 @@ void SwTextShell::ExecCharAttrArgs(SfxRequest &rReq)
break;
default:
- ASSERT(FALSE, falscher Dispatcher);
+ ASSERT(sal_False, falscher Dispatcher);
return;
}
}
@@ -307,7 +307,7 @@ void lcl_SetAdjust(SvxAdjust eAdjst, SfxItemSet& rSet)
-void lcl_SetLineSpace(BYTE ePropL,SfxItemSet& rSet)
+void lcl_SetLineSpace(sal_uInt8 ePropL,SfxItemSet& rSet)
{
SvxLineSpacingItem aLineSpacing(ePropL, RES_PARATR_LINESPACING );
aLineSpacing.GetLineSpaceRule() = SVX_LINE_SPACE_AUTO;
@@ -360,7 +360,7 @@ void SwTextShell::ExecParaAttr(SfxRequest &rReq)
void SwTextShell::ExecParaAttr(SfxRequest &rReq)
{
SvxAdjust eAdjst;
- BYTE ePropL;
+ sal_uInt8 ePropL;
const SfxItemSet* pArgs = rReq.GetArgs();
// gleich beide Attribute holen, ist nicht teuerer !!
@@ -369,7 +369,7 @@ void SwTextShell::ExecParaAttr(SfxRequest &rReq)
RES_FRAMEDIR, RES_FRAMEDIR,
0 );
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
switch (nSlot)
{
case SID_ATTR_PARA_ADJUST:
@@ -395,7 +395,7 @@ void SwTextShell::ExecParaAttr(SfxRequest &rReq)
SET_ADJUST:
{
aSet.Put(SvxAdjustItem(eAdjst,RES_PARATR_ADJUST));
- rReq.AppendItem( SfxBoolItem( GetPool().GetWhich(nSlot), TRUE ) );
+ rReq.AppendItem( SfxBoolItem( GetPool().GetWhich(nSlot), sal_True ) );
}
break;
@@ -427,7 +427,7 @@ SET_LINESPACE:
case SID_ATTR_PARA_LEFT_TO_RIGHT :
case SID_ATTR_PARA_RIGHT_TO_LEFT :
{
- BOOL bSet = TRUE;
+ sal_Bool bSet = sal_True;
int eState = pArgs ? pArgs->GetItemState(nSlot) : SFX_ITEM_DISABLED;
if (pArgs && SFX_ITEM_SET == eState)
bSet = ((const SfxBoolItem&)pArgs->Get(nSlot)).GetValue();
@@ -442,8 +442,8 @@ SET_LINESPACE:
SfxItemSet aAdjustSet( GetPool(),
RES_PARATR_ADJUST, RES_PARATR_ADJUST );
GetShell().GetCurAttr(aAdjustSet);
- BOOL bChgAdjust = FALSE;
- SfxItemState eAdjustState = aAdjustSet.GetItemState(RES_PARATR_ADJUST, FALSE);
+ sal_Bool bChgAdjust = sal_False;
+ SfxItemState eAdjustState = aAdjustSet.GetItemState(RES_PARATR_ADJUST, sal_False);
if(eAdjustState >= SFX_ITEM_DEFAULT)
{
int eAdjust = (int)(( const SvxAdjustItem& )
@@ -453,7 +453,7 @@ SET_LINESPACE:
(SVX_ADJUST_RIGHT == eAdjust && SID_ATTR_PARA_LEFT_TO_RIGHT == nSlot);
}
else
- bChgAdjust = TRUE;
+ bChgAdjust = sal_True;
SvxFrameDirection eFrmDirection =
(SID_ATTR_PARA_LEFT_TO_RIGHT == nSlot) ?
@@ -474,7 +474,7 @@ SET_LINESPACE:
{
SvxNumRule aRule = pCurRule->MakeSvxNumRule();
- for(USHORT i = 0; i < aRule.GetLevelCount(); i++)
+ for(sal_uInt16 i = 0; i < aRule.GetLevelCount(); i++)
{
SvxNumberFormat aFmt(aRule.GetLevel(i));
if(SVX_ADJUST_LEFT == aFmt.GetNumAdjust())
@@ -490,7 +490,7 @@ SET_LINESPACE:
pCurRule->Get( 0 ).GetPositionAndSpaceMode() );
// <--
aSetRule.SetSvxRule( aRule, GetShell().GetDoc());
- aSetRule.SetAutoRule( TRUE );
+ aSetRule.SetAutoRule( sal_True );
// --> OD 2008-03-17 #refactorlists#
// no start or continuation of a list - list style is only changed
GetShell().SetCurNumRule( aSetRule, false );
@@ -501,7 +501,7 @@ SET_LINESPACE:
break;
default:
- ASSERT(FALSE, falscher Dispatcher);
+ ASSERT(sal_False, falscher Dispatcher);
return;
}
SwWrtShell& rWrtSh = GetShell();
@@ -525,9 +525,9 @@ void SwTextShell::ExecParaAttrArgs(SfxRequest &rReq)
const SfxItemSet *pArgs = rReq.GetArgs();
const SfxPoolItem *pItem = 0;
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
if(pArgs)
- pArgs->GetItemState(GetPool().GetWhich(nSlot), FALSE, &pItem);
+ pArgs->GetItemState(GetPool().GetWhich(nSlot), sal_False, &pItem);
switch ( nSlot )
{
case FN_DROP_CHAR_STYLE_NAME:
@@ -567,7 +567,7 @@ void SwTextShell::ExecParaAttrArgs(SfxRequest &rReq)
{
rSh.StartAction();
rSh.StartUndo( UNDO_START );
- if ( SFX_ITEM_SET == aSet.GetItemState(HINT_END,FALSE,&pItem) )
+ if ( SFX_ITEM_SET == aSet.GetItemState(HINT_END,sal_False,&pItem) )
{
if ( ((SfxStringItem*)pItem)->GetValue().Len() )
rSh.ReplaceDropTxt(((SfxStringItem*)pItem)->GetValue());
@@ -604,7 +604,7 @@ void SwTextShell::ExecParaAttrArgs(SfxRequest &rReq)
break;
default:
- ASSERT(FALSE, falscher Dispatcher);
+ ASSERT(sal_False, falscher Dispatcher);
return;
}
}
@@ -619,12 +619,12 @@ void SwTextShell::GetAttrState(SfxItemSet &rSet)
rSh.GetCurAttr(aCoreSet); // *alle* Textattribute von der Core erfragen
SfxWhichIter aIter(rSet);
- USHORT nSlot = aIter.FirstWhich();
+ sal_uInt16 nSlot = aIter.FirstWhich();
sal_Bool bFlag = sal_False;
SfxBoolItem aFlagItem;
const SfxPoolItem* pItem = 0;
int eAdjust = -1; // Illegaler Wert, um DONTCARE zu erkennen
- SfxItemState eState = aCoreSet.GetItemState(RES_PARATR_ADJUST, FALSE, &pItem);
+ SfxItemState eState = aCoreSet.GetItemState(RES_PARATR_ADJUST, sal_False, &pItem);
if( SFX_ITEM_DEFAULT == eState )
pItem = &rPool.GetDefaultItem(RES_PARATR_ADJUST);
@@ -632,14 +632,14 @@ void SwTextShell::GetAttrState(SfxItemSet &rSet)
eAdjust = (int)(( SvxAdjustItem* ) pItem)->GetAdjust();
short nEsc = 0;
- eState = aCoreSet.GetItemState(RES_CHRATR_ESCAPEMENT, FALSE, &pItem);
+ eState = aCoreSet.GetItemState(RES_CHRATR_ESCAPEMENT, sal_False, &pItem);
if( SFX_ITEM_DEFAULT == eState )
pItem = &rPool.GetDefaultItem(RES_CHRATR_ESCAPEMENT);
if( eState >= SFX_ITEM_DEFAULT )
nEsc = ((SvxEscapementItem* )pItem)->GetEsc();
- USHORT nLineSpace = 0;
- eState = aCoreSet.GetItemState(RES_PARATR_LINESPACING, FALSE, &pItem);
+ sal_uInt16 nLineSpace = 0;
+ eState = aCoreSet.GetItemState(RES_PARATR_LINESPACING, sal_False, &pItem);
if( SFX_ITEM_DEFAULT == eState )
pItem = &rPool.GetDefaultItem(RES_PARATR_LINESPACING);
if( SFX_ITEM_DEFAULT <= eState &&
@@ -699,7 +699,7 @@ void SwTextShell::GetAttrState(SfxItemSet &rSet)
else
{
bFlag = SVX_ADJUST_BLOCK == eAdjust;
- USHORT nHtmlMode = GetHtmlMode(rSh.GetView().GetDocShell());
+ sal_uInt16 nHtmlMode = GetHtmlMode(rSh.GetView().GetDocShell());
if((nHtmlMode & HTMLMODE_ON) && !(nHtmlMode & (HTMLMODE_FULL_STYLES|HTMLMODE_FIRSTLINE) ))
{
rSet.DisableItem( nSlot );
@@ -722,7 +722,7 @@ void SwTextShell::GetAttrState(SfxItemSet &rSet)
{
SvxScriptSetItem aSetItem( SID_ATTR_CHAR_FONTHEIGHT,
*rSet.GetPool() );
- aSetItem.GetItemSet().Put( aCoreSet, FALSE );
+ aSetItem.GetItemSet().Put( aCoreSet, sal_False );
if( !aSetItem.GetItemOfScript( rSh.GetScriptType() ))
rSet.DisableItem( nSlot );
nSlot = 0;
@@ -761,9 +761,9 @@ void SwTextShell::GetAttrState(SfxItemSet &rSet)
else
{
// is the item set?
- USHORT nHtmlMode = GetHtmlMode(rSh.GetView().GetDocShell());
+ sal_uInt16 nHtmlMode = GetHtmlMode(rSh.GetView().GetDocShell());
if((!(nHtmlMode & HTMLMODE_ON) || (0 != (nHtmlMode & HTMLMODE_SOME_STYLES))) &&
- aCoreSet.GetItemState( RES_FRAMEDIR, FALSE ) >= SFX_ITEM_DEFAULT)
+ aCoreSet.GetItemState( RES_FRAMEDIR, sal_False ) >= SFX_ITEM_DEFAULT)
{
SvxFrameDirection eFrmDir = (SvxFrameDirection)
((const SvxFrameDirectionItem& )aCoreSet.Get(RES_FRAMEDIR)).GetValue();
@@ -791,10 +791,10 @@ void SwTextShell::GetAttrState(SfxItemSet &rSet)
case RES_PARATR_DROP:
{
#if OSL_DEBUG_LEVEL > 1
- const SfxPoolItem& rItem = aCoreSet.Get(GetPool().GetWhich(nSlot), TRUE);
+ const SfxPoolItem& rItem = aCoreSet.Get(GetPool().GetWhich(nSlot), sal_True);
rSet.Put(rItem);
#else
- rSet.Put(aCoreSet.Get( GetPool().GetWhich(nSlot), TRUE));
+ rSet.Put(aCoreSet.Get( GetPool().GetWhich(nSlot), sal_True));
#endif
nSlot = 0;
}
@@ -816,10 +816,10 @@ void SwTextShell::GetAttrState(SfxItemSet &rSet)
SfxItemSet aSet(GetPool(), RES_TXTATR_INETFMT, RES_TXTATR_INETFMT);
rSh.GetCurAttr(aSet);
#if OSL_DEBUG_LEVEL > 1
- const SfxPoolItem& rItem = aSet.Get(RES_TXTATR_INETFMT, TRUE);
+ const SfxPoolItem& rItem = aSet.Get(RES_TXTATR_INETFMT, sal_True);
rSet.Put(rItem);
#else
- rSet.Put(aSet.Get( RES_TXTATR_INETFMT, TRUE));
+ rSet.Put(aSet.Get( RES_TXTATR_INETFMT, sal_True));
#endif
nSlot = 0;
}
@@ -840,7 +840,7 @@ void SwTextShell::GetAttrState(SfxItemSet &rSet)
nSlot = aIter.NextWhich();
}
- rSet.Put(aCoreSet,FALSE);
+ rSet.Put(aCoreSet,sal_False);
}
diff --git a/sw/source/ui/shells/txtcrsr.cxx b/sw/source/ui/shells/txtcrsr.cxx
index cf0a5f99ac..9d4b4e038d 100644
--- a/sw/source/ui/shells/txtcrsr.cxx
+++ b/sw/source/ui/shells/txtcrsr.cxx
@@ -69,22 +69,22 @@ void SwTextShell::ExecBasicMove(SfxRequest &rReq)
SwWrtShell &rSh = GetShell();
GetView().GetEditWin().FlushInBuffer();
const SfxItemSet *pArgs = rReq.GetArgs();
- BOOL bSelect = FALSE;
- USHORT nCount = 1;
+ sal_Bool bSelect = sal_False;
+ sal_uInt16 nCount = 1;
if(pArgs)
{
const SfxPoolItem *pItem;
- if(SFX_ITEM_SET == pArgs->GetItemState(FN_PARAM_MOVE_COUNT, TRUE, &pItem))
+ if(SFX_ITEM_SET == pArgs->GetItemState(FN_PARAM_MOVE_COUNT, sal_True, &pItem))
nCount = ((const SfxInt16Item *)pItem)->GetValue();
- if(SFX_ITEM_SET == pArgs->GetItemState(FN_PARAM_MOVE_SELECTION, TRUE, &pItem))
+ if(SFX_ITEM_SET == pArgs->GetItemState(FN_PARAM_MOVE_SELECTION, sal_True, &pItem))
bSelect = ((const SfxBoolItem *)pItem)->GetValue();
}
switch(rReq.GetSlot())
{
- case FN_CHAR_LEFT_SEL: rReq.SetSlot( FN_CHAR_LEFT ); bSelect = TRUE; break;
- case FN_CHAR_RIGHT_SEL: rReq.SetSlot( FN_CHAR_RIGHT ); bSelect = TRUE; break;
- case FN_LINE_UP_SEL: rReq.SetSlot( FN_LINE_UP ); bSelect = TRUE; break;
- case FN_LINE_DOWN_SEL: rReq.SetSlot( FN_LINE_DOWN ); bSelect = TRUE; break;
+ case FN_CHAR_LEFT_SEL: rReq.SetSlot( FN_CHAR_LEFT ); bSelect = sal_True; break;
+ case FN_CHAR_RIGHT_SEL: rReq.SetSlot( FN_CHAR_RIGHT ); bSelect = sal_True; break;
+ case FN_LINE_UP_SEL: rReq.SetSlot( FN_LINE_UP ); bSelect = sal_True; break;
+ case FN_LINE_DOWN_SEL: rReq.SetSlot( FN_LINE_DOWN ); bSelect = sal_True; break;
}
uno::Reference< frame::XDispatchRecorder > xRecorder =
@@ -94,19 +94,19 @@ void SwTextShell::ExecBasicMove(SfxRequest &rReq)
rReq.AppendItem( SfxInt16Item(FN_PARAM_MOVE_COUNT, nCount) );
rReq.AppendItem( SfxBoolItem(FN_PARAM_MOVE_SELECTION, bSelect) );
}
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
rReq.Done();
// Get EditWin before calling the move functions (shell change may occur!)
SwEditWin& rTmpEditWin = GetView().GetEditWin();
- for( USHORT i = 0; i < nCount; i++ )
+ for( sal_uInt16 i = 0; i < nCount; i++ )
{
switch(nSlot)
{
- case FN_CHAR_LEFT: rSh.Left( CRSR_SKIP_CELLS, bSelect, 1, FALSE, TRUE ); break;
- case FN_CHAR_RIGHT: rSh.Right( CRSR_SKIP_CELLS, bSelect, 1, FALSE, TRUE ); break;
+ case FN_CHAR_LEFT: rSh.Left( CRSR_SKIP_CELLS, bSelect, 1, sal_False, sal_True ); break;
+ case FN_CHAR_RIGHT: rSh.Right( CRSR_SKIP_CELLS, bSelect, 1, sal_False, sal_True ); break;
case FN_LINE_UP: rSh.Up ( bSelect, 1 ); break;
case FN_LINE_DOWN: rSh.Down ( bSelect, 1 ); break;
- default: ASSERT(FALSE, falscher Dispatcher); return;
+ default: ASSERT(sal_False, falscher Dispatcher); return;
}
}
@@ -120,16 +120,16 @@ void SwTextShell::ExecMove(SfxRequest &rReq)
SwEditWin& rTmpEditWin = GetView().GetEditWin();
rTmpEditWin.FlushInBuffer();
- USHORT nSlot = rReq.GetSlot();
- BOOL bRet = FALSE;
+ sal_uInt16 nSlot = rReq.GetSlot();
+ sal_Bool bRet = sal_False;
switch ( nSlot )
{
case FN_START_OF_LINE_SEL:
- case FN_START_OF_LINE: bRet = rSh.LeftMargin ( FN_START_OF_LINE_SEL == nSlot, FALSE );
+ case FN_START_OF_LINE: bRet = rSh.LeftMargin ( FN_START_OF_LINE_SEL == nSlot, sal_False );
break;
case FN_END_OF_LINE_SEL:
- case FN_END_OF_LINE: bRet = rSh.RightMargin( FN_END_OF_LINE_SEL == nSlot, FALSE );
+ case FN_END_OF_LINE: bRet = rSh.RightMargin( FN_END_OF_LINE_SEL == nSlot, sal_False );
break;
case FN_START_OF_DOCUMENT_SEL:
@@ -143,7 +143,7 @@ void SwTextShell::ExecMove(SfxRequest &rReq)
case FN_SELECT_WORD: bRet = rSh.SelNearestWrd(); break;
case SID_SELECTALL: bRet = 0 != rSh.SelAll(); break;
- default: ASSERT(FALSE, falscher Dispatcher); return;
+ default: ASSERT(sal_False, falscher Dispatcher); return;
}
if ( bRet )
@@ -160,7 +160,7 @@ void SwTextShell::ExecMovePage(SfxRequest &rReq)
SwWrtShell &rSh = GetShell();
GetView().GetEditWin().FlushInBuffer();
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
switch( nSlot )
{
case FN_START_OF_NEXT_PAGE_SEL :
@@ -180,7 +180,7 @@ void SwTextShell::ExecMovePage(SfxRequest &rReq)
case FN_END_OF_PAGE_SEL:
case FN_END_OF_PAGE: rSh.EndPg ( FN_END_OF_PAGE_SEL == nSlot ); break;
- default: ASSERT(FALSE, falscher Dispatcher); return;
+ default: ASSERT(sal_False, falscher Dispatcher); return;
}
rReq.Done();
}
@@ -191,13 +191,13 @@ void SwTextShell::ExecMoveCol(SfxRequest &rReq)
SwWrtShell &rSh = GetShell();
switch ( rReq.GetSlot() )
{
- case FN_START_OF_COLUMN: rSh.StartOfColumn ( FALSE ); break;
- case FN_END_OF_COLUMN: rSh.EndOfColumn ( FALSE ); break;
- case FN_START_OF_NEXT_COLUMN: rSh.StartOfNextColumn( FALSE ) ; break;
- case FN_END_OF_NEXT_COLUMN: rSh.EndOfNextColumn ( FALSE ); break;
- case FN_START_OF_PREV_COLUMN: rSh.StartOfPrevColumn( FALSE ); break;
- case FN_END_OF_PREV_COLUMN: rSh.EndOfPrevColumn ( FALSE ); break;
- default: ASSERT(FALSE, falscher Dispatcher); return;
+ case FN_START_OF_COLUMN: rSh.StartOfColumn ( sal_False ); break;
+ case FN_END_OF_COLUMN: rSh.EndOfColumn ( sal_False ); break;
+ case FN_START_OF_NEXT_COLUMN: rSh.StartOfNextColumn( sal_False ) ; break;
+ case FN_END_OF_NEXT_COLUMN: rSh.EndOfNextColumn ( sal_False ); break;
+ case FN_START_OF_PREV_COLUMN: rSh.StartOfPrevColumn( sal_False ); break;
+ case FN_END_OF_PREV_COLUMN: rSh.EndOfPrevColumn ( sal_False ); break;
+ default: ASSERT(sal_False, falscher Dispatcher); return;
}
rReq.Done();
}
@@ -207,8 +207,8 @@ void SwTextShell::ExecMoveLingu(SfxRequest &rReq)
SwWrtShell &rSh = GetShell();
GetView().GetEditWin().FlushInBuffer();
- USHORT nSlot = rReq.GetSlot();
- BOOL bRet = FALSE;
+ sal_uInt16 nSlot = rReq.GetSlot();
+ sal_Bool bRet = sal_False;
switch ( nSlot )
{
case FN_NEXT_WORD_SEL:
@@ -235,12 +235,12 @@ void SwTextShell::ExecMoveLingu(SfxRequest &rReq)
case FN_PREV_SENT: bRet = rSh.BwdSentence( FN_PREV_SENT_SEL == nSlot );
break;
- case FN_NEXT_PARA: bRet = rSh.FwdPara ( FALSE );
+ case FN_NEXT_PARA: bRet = rSh.FwdPara ( sal_False );
break;
- case FN_PREV_PARA: bRet = rSh.BwdPara ( FALSE );
+ case FN_PREV_PARA: bRet = rSh.BwdPara ( sal_False );
break;
- default: ASSERT(FALSE, falscher Dispatcher); return;
+ default: ASSERT(sal_False, falscher Dispatcher); return;
}
rReq.Done();
}
@@ -248,8 +248,8 @@ void SwTextShell::ExecMoveLingu(SfxRequest &rReq)
void SwTextShell::ExecMoveMisc(SfxRequest &rReq)
{
SwWrtShell &rSh = GetShell();
- USHORT nSlot = rReq.GetSlot();
- BOOL bSetRetVal = TRUE, bRet = TRUE;
+ sal_uInt16 nSlot = rReq.GetSlot();
+ sal_Bool bSetRetVal = sal_True, bRet = sal_True;
switch ( nSlot )
{
case SID_FM_TOGGLECONTROLFOCUS:
@@ -270,7 +270,7 @@ void SwTextShell::ExecMoveMisc(SfxRequest &rReq)
if ( !pFilter.get() )
break;
- const SdrObject* pNearestControl = rSh.GetBestObject( TRUE, GOTOOBJ_DRAW_CONTROL, FALSE, pFilter.get() );
+ const SdrObject* pNearestControl = rSh.GetBestObject( sal_True, GOTOOBJ_DRAW_CONTROL, sal_False, pFilter.get() );
if ( !pNearestControl )
break;
@@ -283,7 +283,7 @@ void SwTextShell::ExecMoveMisc(SfxRequest &rReq)
}
break;
case FN_CNTNT_TO_NEXT_FRAME:
- bRet = rSh.GotoObj(TRUE, GOTOOBJ_GOTO_ANY);
+ bRet = rSh.GotoObj(sal_True, GOTOOBJ_GOTO_ANY);
if(bRet)
{
rSh.HideCrsr();
@@ -300,27 +300,27 @@ void SwTextShell::ExecMoveMisc(SfxRequest &rReq)
break;
case FN_TO_HEADER:
rSh.MoveCrsr();
- if ( FRMTYPE_HEADER & rSh.GetFrmType(0,FALSE) )
+ if ( FRMTYPE_HEADER & rSh.GetFrmType(0,sal_False) )
rSh.SttPg();
else
rSh.GotoHeaderTxt();
- bSetRetVal = FALSE;
+ bSetRetVal = sal_False;
break;
case FN_TO_FOOTER:
rSh.MoveCrsr();
- if ( FRMTYPE_FOOTER & rSh.GetFrmType(0,FALSE) )
+ if ( FRMTYPE_FOOTER & rSh.GetFrmType(0,sal_False) )
rSh.EndPg();
else
rSh.GotoFooterTxt();
- bSetRetVal = FALSE;
+ bSetRetVal = sal_False;
break;
case FN_FOOTNOTE_TO_ANCHOR:
rSh.MoveCrsr();
- if ( FRMTYPE_FOOTNOTE & rSh.GetFrmType(0,FALSE) )
+ if ( FRMTYPE_FOOTNOTE & rSh.GetFrmType(0,sal_False) )
rSh.GotoFtnAnchor();
else
rSh.GotoFtnTxt();
- bSetRetVal = FALSE;
+ bSetRetVal = sal_False;
break;
case FN_TO_FOOTNOTE_AREA :
rSh.GotoFtnTxt();
@@ -339,26 +339,26 @@ void SwTextShell::ExecMoveMisc(SfxRequest &rReq)
break;
case FN_NEXT_TOXMARK:
- bRet = rSh.GotoNxtPrvTOXMark( TRUE );
+ bRet = rSh.GotoNxtPrvTOXMark( sal_True );
break;
case FN_PREV_TOXMARK:
- bRet = rSh.GotoNxtPrvTOXMark( FALSE );
+ bRet = rSh.GotoNxtPrvTOXMark( sal_False );
break;
case FN_NEXT_TBLFML:
- bRet = rSh.GotoNxtPrvTblFormula( TRUE, FALSE );
+ bRet = rSh.GotoNxtPrvTblFormula( sal_True, sal_False );
break;
case FN_PREV_TBLFML:
- bRet = rSh.GotoNxtPrvTblFormula( FALSE, FALSE );
+ bRet = rSh.GotoNxtPrvTblFormula( sal_False, sal_False );
break;
case FN_NEXT_TBLFML_ERR:
- bRet = rSh.GotoNxtPrvTblFormula( TRUE, TRUE );
+ bRet = rSh.GotoNxtPrvTblFormula( sal_True, sal_True );
break;
case FN_PREV_TBLFML_ERR:
- bRet = rSh.GotoNxtPrvTblFormula( FALSE, TRUE );
+ bRet = rSh.GotoNxtPrvTblFormula( sal_False, sal_True );
break;
default:
- ASSERT(FALSE, falscher Dispatcher);
+ ASSERT(sal_False, falscher Dispatcher);
return;
}
diff --git a/sw/source/ui/shells/txtnum.cxx b/sw/source/ui/shells/txtnum.cxx
index 0cdb405df7..0bf427ccbc 100644
--- a/sw/source/ui/shells/txtnum.cxx
+++ b/sw/source/ui/shells/txtnum.cxx
@@ -59,7 +59,7 @@ void SwTextShell::ExecEnterNum(SfxRequest &rReq)
case FN_NUM_NUMBERING_ON:
{
SFX_REQUEST_ARG( rReq, pItem, SfxBoolItem, FN_PARAM_1 , sal_False );
- BOOL bMode = !GetShell().HasNumber(); // #i29560#
+ sal_Bool bMode = !GetShell().HasNumber(); // #i29560#
if ( pItem )
bMode = pItem->GetValue();
else
@@ -78,7 +78,7 @@ void SwTextShell::ExecEnterNum(SfxRequest &rReq)
case FN_NUM_BULLET_ON:
{
SFX_REQUEST_ARG( rReq, pItem, SfxBoolItem, FN_PARAM_1 , sal_False );
- BOOL bMode = !GetShell().HasBullet(); // #i29560#
+ sal_Bool bMode = !GetShell().HasBullet(); // #i29560#
if ( pItem )
bMode = pItem->GetValue();
else
@@ -97,22 +97,22 @@ void SwTextShell::ExecEnterNum(SfxRequest &rReq)
case FN_NUMBER_BULLETS:
{
// --> OD 2008-02-29 #refactorlists#
-// // per default TRUE, damit die Schleife im Dialog richtig arbeitet!
-// BOOL bHasChild = TRUE;
+// // per default sal_True, damit die Schleife im Dialog richtig arbeitet!
+// sal_Bool bHasChild = sal_True;
// <--
SfxItemSet aSet(GetPool(),
SID_HTML_MODE, SID_HTML_MODE,
SID_ATTR_NUMBERING_RULE, SID_PARAM_CUR_NUM_LEVEL,
0 );
SwDocShell* pDocSh = GetView().GetDocShell();
- BOOL bHtml = 0 != PTR_CAST(SwWebDocShell, pDocSh);
+ sal_Bool bHtml = 0 != PTR_CAST(SwWebDocShell, pDocSh);
const SwNumRule* pCurRule = GetShell().GetCurNumRule();
if( pCurRule )
{
SvxNumRule aRule = pCurRule->MakeSvxNumRule();
//convert type of linked bitmaps from SVX_NUM_BITMAP to (SVX_NUM_BITMAP|LINK_TOKEN)
- for(USHORT i = 0; i < aRule.GetLevelCount(); i++)
+ for(sal_uInt16 i = 0; i < aRule.GetLevelCount(); i++)
{
SvxNumberFormat aFmt(aRule.GetLevel(i));
if(SVX_NUM_BITMAP == aFmt.GetNumberingType())
@@ -127,13 +127,13 @@ void SwTextShell::ExecEnterNum(SfxRequest &rReq)
}
}
if(bHtml)
- aRule.SetFeatureFlag(NUM_ENABLE_EMBEDDED_BMP, FALSE);
+ aRule.SetFeatureFlag(NUM_ENABLE_EMBEDDED_BMP, sal_False);
aSet.Put(SvxNumBulletItem(aRule));
// --> OD 2008-02-29 #refactorlists# - removed <bHasChild>
ASSERT( GetShell().GetNumLevel() < MAXLEVEL,
"<SwTextShell::ExecEnterNum()> - numbered node without valid list level. Serious defect -> please inform OD." );
- USHORT nLevel = GetShell().GetNumLevel();
+ sal_uInt16 nLevel = GetShell().GetNumLevel();
// <--
if( nLevel < MAXLEVEL )
{
@@ -154,7 +154,7 @@ void SwTextShell::ExecEnterNum(SfxRequest &rReq)
if( bHtml || bRightToLeft )
{
- for( BYTE n = 0; n < MAXLEVEL; ++n )
+ for( sal_uInt8 n = 0; n < MAXLEVEL; ++n )
{
SvxNumberFormat aFmt( aSvxRule.GetLevel( n ) );
if ( n && bHtml )
@@ -170,14 +170,14 @@ void SwTextShell::ExecEnterNum(SfxRequest &rReq)
aFmt.SetNumAdjust( SVX_ADJUST_RIGHT );
}
// <--
- aSvxRule.SetLevel( n, aFmt, FALSE );
+ aSvxRule.SetLevel( n, aFmt, sal_False );
}
- aSvxRule.SetFeatureFlag(NUM_ENABLE_EMBEDDED_BMP, FALSE);
+ aSvxRule.SetFeatureFlag(NUM_ENABLE_EMBEDDED_BMP, sal_False);
}
aSet.Put(SvxNumBulletItem(aSvxRule));
}
- aSet.Put( SfxBoolItem( SID_PARAM_NUM_PRESET,FALSE ));
+ aSet.Put( SfxBoolItem( SID_PARAM_NUM_PRESET,sal_False ));
// vor dem Dialog wird der HtmlMode an der DocShell versenkt
pDocSh->PutItem(SfxUInt16Item(SID_HTML_MODE, ::GetHtmlMode(pDocSh)));
@@ -187,11 +187,11 @@ void SwTextShell::ExecEnterNum(SfxRequest &rReq)
SfxAbstractTabDialog* pDlg = pFact->CreateSwTabDialog( DLG_SVXTEST_NUM_BULLET,
GetView().GetWindow(), &aSet, GetShell());
DBG_ASSERT(pDlg, "Dialogdiet fail!");
- USHORT nRet = pDlg->Execute();
+ sal_uInt16 nRet = pDlg->Execute();
const SfxPoolItem* pItem;
if( RET_OK == nRet )
{
- if( SFX_ITEM_SET == pDlg->GetOutputItemSet()->GetItemState( SID_ATTR_NUMBERING_RULE, FALSE, &pItem ))
+ if( SFX_ITEM_SET == pDlg->GetOutputItemSet()->GetItemState( SID_ATTR_NUMBERING_RULE, sal_False, &pItem ))
{
rReq.AppendItem(*pItem);
rReq.Done();
@@ -206,7 +206,7 @@ void SwTextShell::ExecEnterNum(SfxRequest &rReq)
// <--
// <--
aSetRule.SetSvxRule( *pSetRule, GetShell().GetDoc());
- aSetRule.SetAutoRule( TRUE );
+ aSetRule.SetAutoRule( sal_True );
// --> OD 2008-03-17 #refactorlists#
// No start of new list, if an existing list style is edited.
// Otherwise start a new list.
@@ -217,7 +217,7 @@ void SwTextShell::ExecEnterNum(SfxRequest &rReq)
// wenn der Dialog mit OK verlassen wurde, aber nichts ausgewaehlt
// wurde dann muss die Numerierung zumindest eingeschaltet werden,
// wenn sie das noch nicht ist
- else if( !pCurRule && SFX_ITEM_SET == aSet.GetItemState( SID_ATTR_NUMBERING_RULE, FALSE, &pItem ))
+ else if( !pCurRule && SFX_ITEM_SET == aSet.GetItemState( SID_ATTR_NUMBERING_RULE, sal_False, &pItem ))
{
rReq.AppendItem( *pItem );
rReq.Done();
@@ -229,7 +229,7 @@ void SwTextShell::ExecEnterNum(SfxRequest &rReq)
// <--
// <--
aSetRule.SetSvxRule(*pSetRule, GetShell().GetDoc());
- aSetRule.SetAutoRule( TRUE );
+ aSetRule.SetAutoRule( sal_True );
// --> OD 2008-03-17 #refactorlists#
// start new list
GetShell().SetCurNumRule( aSetRule, true );
@@ -243,7 +243,7 @@ void SwTextShell::ExecEnterNum(SfxRequest &rReq)
}
break;
default:
- ASSERT(FALSE, falscher Dispatcher);
+ ASSERT(sal_False, falscher Dispatcher);
return;
}
}
diff --git a/sw/source/ui/smartmenu/stmenu.cxx b/sw/source/ui/smartmenu/stmenu.cxx
index c27f206d01..d8c10fc3ed 100644
--- a/sw/source/ui/smartmenu/stmenu.cxx
+++ b/sw/source/ui/smartmenu/stmenu.cxx
@@ -62,10 +62,10 @@ SwSmartTagPopup::SwSmartTagPopup( SwView* pSwView,
Reference <frame::XController> xController = mpSwView->GetController();
const lang::Locale aLocale( SW_BREAKITER()->GetLocale( (LanguageType)GetAppLanguage() ) );
- USHORT nMenuPos = 0;
- USHORT nSubMenuPos = 0;
- USHORT nMenuId = 1;
- USHORT nSubMenuId = MN_ST_INSERT_START;
+ sal_uInt16 nMenuPos = 0;
+ sal_uInt16 nSubMenuPos = 0;
+ sal_uInt16 nMenuId = 1;
+ sal_uInt16 nSubMenuId = MN_ST_INSERT_START;
const rtl::OUString aRangeText = mxTextRange->getString();
@@ -81,7 +81,7 @@ SwSmartTagPopup::SwSmartTagPopup( SwView* pSwView,
InsertSeparator(0);
- for ( USHORT j = 0; j < aActionComponentsSequence.getLength(); ++j )
+ for ( sal_uInt16 j = 0; j < aActionComponentsSequence.getLength(); ++j )
{
Reference< container::XStringKeyMap > xSmartTagProperties = rStringKeyMaps[j];
@@ -118,7 +118,7 @@ SwSmartTagPopup::SwSmartTagPopup( SwView* pSwView,
pSbMenu->InsertSeparator( nSubMenuPos++ );
// Add subitem for every action reference for the current smart tag type:
- for ( USHORT i = 0; i < rActionComponents.getLength(); ++i )
+ for ( sal_uInt16 i = 0; i < rActionComponents.getLength(); ++i )
{
xAction = rActionComponents[i];
@@ -154,7 +154,7 @@ sal_uInt16 SwSmartTagPopup::Execute( const Rectangle& rWordPos, Window* pWin )
if ( nId == MN_SMARTTAG_OPTIONS )
{
- SfxBoolItem aBool(SID_OPEN_SMARTTAGOPTIONS, TRUE);
+ SfxBoolItem aBool(SID_OPEN_SMARTTAGOPTIONS, sal_True);
mpSwView->GetViewFrame()->GetDispatcher()->Execute( SID_AUTO_CORRECT_DLG, SFX_CALLMODE_ASYNCHRON, &aBool, 0L );
}
diff --git a/sw/source/ui/table/chartins.cxx b/sw/source/ui/table/chartins.cxx
index 5649fca2b8..418e805ae2 100644
--- a/sw/source/ui/table/chartins.cxx
+++ b/sw/source/ui/table/chartins.cxx
@@ -53,9 +53,7 @@
#include <edtwin.hxx>
#include <cmdid.h>
-#ifndef _CHARTINS_HRC
#include <chartins.hrc>
-#endif
#include <anchoredobject.hxx>
#include <sot/clsids.hxx>
@@ -94,7 +92,7 @@ Point SwGetChartDialogPos( const Window *pParentWin, const Size& rDialogSize, co
Rectangle aDesktop = pParentWin->GetDesktopRectPixel();
Size aSpace = pParentWin->LogicToPixel( Size( 8, 12 ), MAP_APPFONT );
- BOOL bLayoutRTL = ::GetActiveView()->GetWrtShell().IsTableRightToLeft();
+ sal_Bool bLayoutRTL = ::GetActiveView()->GetWrtShell().IsTableRightToLeft();
bool bCenterHor = false;
if ( aDesktop.Bottom() - aObjAbs.Bottom() >= rDialogSize.Height() + aSpace.Height() )
@@ -192,7 +190,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
@@ -259,7 +257,7 @@ void SwInsertChart(Window* pParent, SfxBindings* pBindings )
if( nDialogRet == ui::dialogs::ExecutableDialogResults::CANCEL )
{
rWrtShell.Undo();
- rWrtShell.getIDocumentUndoRedoAccess()->ClearRedo();
+ rWrtShell.GetIDocumentUndoRedo().ClearRedo();
}
else
{
@@ -277,7 +275,7 @@ void SwInsertChart(Window* pParent, SfxBindings* pBindings )
void __EXPORT AutoEdit::KeyInput( const KeyEvent& rEvt )
{
- USHORT nCode = rEvt.GetKeyCode().GetCode();
+ sal_uInt16 nCode = rEvt.GetKeyCode().GetCode();
if( nCode != KEY_SPACE )
Edit::KeyInput( rEvt );
}
diff --git a/sw/source/ui/table/colwd.cxx b/sw/source/ui/table/colwd.cxx
index a5b4d9cf9c..dc7ca95821 100644
--- a/sw/source/ui/table/colwd.cxx
+++ b/sw/source/ui/table/colwd.cxx
@@ -63,7 +63,7 @@
IMPL_LINK_INLINE_START( SwTableWidthDlg, LoseFocusHdl, Edit *, EMPTYARG )
{
- USHORT nId = (USHORT)aColEdit.GetValue()-1;
+ sal_uInt16 nId = (sal_uInt16)aColEdit.GetValue()-1;
const SwTwips lWidth = rFnc.GetColWidth(nId);
aWidthEdit.SetValue(aWidthEdit.Normalize(lWidth), FUNIT_TWIP);
aWidthEdit.SetMax(aWidthEdit.Normalize(rFnc.GetMaxColWidth(nId)), FUNIT_TWIP);
@@ -89,10 +89,10 @@ SwTableWidthDlg::SwTableWidthDlg(Window *pParent, SwTableFUNC &rTableFnc ) :
{
FreeResource();
- BOOL bIsWeb = rTableFnc.GetShell()
- ? static_cast< BOOL >(0 != PTR_CAST( SwWebDocShell,
+ sal_Bool bIsWeb = rTableFnc.GetShell()
+ ? static_cast< sal_Bool >(0 != PTR_CAST( SwWebDocShell,
rTableFnc.GetShell()->GetView().GetDocShell()) )
- : FALSE;
+ : sal_False;
FieldUnit eFieldUnit = SW_MOD()->GetUsrPref( bIsWeb )->GetMetric();
::SetFieldUnit(aWidthEdit, eFieldUnit );
@@ -114,8 +114,8 @@ void SwTableWidthDlg::Apply()
{
rFnc.InitTabCols();
rFnc.SetColWidth(
- static_cast< USHORT >(aColEdit.GetValue() - 1),
- static_cast< USHORT >(aWidthEdit.Denormalize(aWidthEdit.GetValue(FUNIT_TWIP))));
+ static_cast< sal_uInt16 >(aColEdit.GetValue() - 1),
+ static_cast< sal_uInt16 >(aWidthEdit.Denormalize(aWidthEdit.GetValue(FUNIT_TWIP))));
}
diff --git a/sw/source/ui/table/convert.cxx b/sw/source/ui/table/convert.cxx
index 9418e7fbaf..9678ff6f51 100644
--- a/sw/source/ui/table/convert.cxx
+++ b/sw/source/ui/table/convert.cxx
@@ -96,13 +96,13 @@ void SwConvertTableDlg::GetValues( sal_Unicode& rDelim,
}
- USHORT nInsMode = 0;
+ sal_uInt16 nInsMode = 0;
if (aBorderCB.IsChecked())
nInsMode |= tabopts::DEFAULT_BORDER;
if (aHeaderCB.IsChecked())
nInsMode |= tabopts::HEADLINE;
if (aRepeatHeaderCB.IsEnabled() && aRepeatHeaderCB.IsChecked())
- rInsTblOpts.mnRowsToRepeat = USHORT( aRepeatHeaderNF.GetValue() );
+ rInsTblOpts.mnRowsToRepeat = sal_uInt16( aRepeatHeaderNF.GetValue() );
else
rInsTblOpts.mnRowsToRepeat = 0;
if (!aDontSplitCB.IsChecked())
@@ -184,12 +184,12 @@ SwConvertTableDlg::SwConvertTableDlg( SwView& rView, bool bToTable )
else
{
//Einfuege-Optionen verstecken
- aHeaderCB .Show(FALSE);
- aRepeatHeaderCB .Show(FALSE);
- aDontSplitCB .Show(FALSE);
- aBorderCB .Show(FALSE);
- aOptionsFL .Show(FALSE);
- aRepeatHeaderCombo.Show(FALSE);
+ aHeaderCB .Show(sal_False);
+ aRepeatHeaderCB .Show(sal_False);
+ aDontSplitCB .Show(sal_False);
+ aBorderCB .Show(sal_False);
+ aOptionsFL .Show(sal_False);
+ aRepeatHeaderCombo.Show(sal_False);
//Groesse anpassen
Size aSize(GetSizePixel());
@@ -207,10 +207,10 @@ SwConvertTableDlg::SwConvertTableDlg( SwView& rView, bool bToTable )
const SwModuleOptions* pModOpt = SW_MOD()->GetModuleConfig();
- BOOL bHTMLMode = 0 != (::GetHtmlMode(rView.GetDocShell())&HTMLMODE_ON);
+ sal_Bool bHTMLMode = 0 != (::GetHtmlMode(rView.GetDocShell())&HTMLMODE_ON);
SwInsertTableOptions aInsOpts = pModOpt->GetInsTblFlags(bHTMLMode);
- USHORT nInsTblFlags = aInsOpts.mnInsMode;
+ sal_uInt16 nInsTblFlags = aInsOpts.mnInsMode;
aHeaderCB.Check( 0 != (nInsTblFlags & tabopts::HEADLINE) );
aRepeatHeaderCB.Check(aInsOpts.mnRowsToRepeat > 0);
@@ -233,7 +233,7 @@ IMPL_LINK( SwConvertTableDlg, AutoFmtHdl, PushButton*, pButton )
SwAbstractDialogFactory* pFact = swui::GetFactory();
DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!");
- AbstractSwAutoFormatDlg* pDlg = pFact->CreateSwAutoFormatDlg(pButton, pShell, DLG_AUTOFMT_TABLE, FALSE, pTAutoFmt);
+ AbstractSwAutoFormatDlg* pDlg = pFact->CreateSwAutoFormatDlg(pButton, pShell, DLG_AUTOFMT_TABLE, sal_False, pTAutoFmt);
DBG_ASSERT(pDlg, "Dialogdiet fail!");
if( RET_OK == pDlg->Execute())
pDlg->FillAutoFmtOfIndex( pTAutoFmt );
@@ -249,7 +249,7 @@ IMPL_LINK( SwConvertTableDlg, BtnHdl, Button*, pButton )
{
if( aKeepColumn.IsEnabled() )
aKeepColumn.SaveValue();
- aKeepColumn.Check( TRUE );
+ aKeepColumn.Check( sal_True );
}
aKeepColumn.Enable( aTabBtn.IsChecked() );
aOtherEd.Enable( aOtherBtn.IsChecked() );
diff --git a/sw/source/ui/table/instable.cxx b/sw/source/ui/table/instable.cxx
index a81074c8df..d5243cef98 100644
--- a/sw/source/ui/table/instable.cxx
+++ b/sw/source/ui/table/instable.cxx
@@ -57,21 +57,21 @@ namespace swui
#define ROW_COL_PROD 16384
-void SwInsTableDlg::GetValues( String& rName, USHORT& rRow, USHORT& rCol,
+void SwInsTableDlg::GetValues( String& rName, sal_uInt16& rRow, sal_uInt16& rCol,
SwInsertTableOptions& rInsTblOpts, String& rAutoName,
SwTableAutoFmt *& prTAFmt )
{
- USHORT nInsMode = 0;
+ sal_uInt16 nInsMode = 0;
rName = aNameEdit.GetText();
- rRow = (USHORT)aRowEdit.GetValue();
- rCol = (USHORT)aColEdit.GetValue();
+ rRow = (sal_uInt16)aRowEdit.GetValue();
+ rCol = (sal_uInt16)aColEdit.GetValue();
if (aBorderCB.IsChecked())
nInsMode |= tabopts::DEFAULT_BORDER;
if (aHeaderCB.IsChecked())
nInsMode |= tabopts::HEADLINE;
if (aRepeatHeaderCB.IsEnabled() && aRepeatHeaderCB.IsChecked())
- rInsTblOpts.mnRowsToRepeat = USHORT( aRepeatHeaderNF.GetValue() );
+ rInsTblOpts.mnRowsToRepeat = sal_uInt16( aRepeatHeaderNF.GetValue() );
else
rInsTblOpts.mnRowsToRepeat = 0;
if (!aDontSplitCB.IsChecked())
@@ -130,11 +130,11 @@ SwInsTableDlg::SwInsTableDlg( SwView& rView )
aColEdit.SetMax(ROW_COL_PROD/aRowEdit.GetValue());
aAutoFmtBtn.SetClickHdl(LINK(this, SwInsTableDlg, AutoFmtHdl));
- BOOL bHTMLMode = 0 != (::GetHtmlMode(rView.GetDocShell())&HTMLMODE_ON);
+ sal_Bool bHTMLMode = 0 != (::GetHtmlMode(rView.GetDocShell())&HTMLMODE_ON);
const SwModuleOptions* pModOpt = SW_MOD()->GetModuleConfig();
SwInsertTableOptions aInsOpts = pModOpt->GetInsTblFlags(bHTMLMode);
- USHORT nInsTblFlags = aInsOpts.mnInsMode;
+ sal_uInt16 nInsTblFlags = aInsOpts.mnInsMode;
aHeaderCB.Check( 0 != (nInsTblFlags & tabopts::HEADLINE) );
aRepeatHeaderCB.Check(aInsOpts.mnRowsToRepeat > 0);
@@ -222,7 +222,7 @@ IMPL_LINK( SwInsTableDlg, AutoFmtHdl, PushButton*, pButton )
SwAbstractDialogFactory* pFact = swui::GetFactory();
DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!");
- AbstractSwAutoFormatDlg* pDlg = pFact->CreateSwAutoFormatDlg(pButton,pShell, DLG_AUTOFMT_TABLE, FALSE, pTAutoFmt );
+ AbstractSwAutoFormatDlg* pDlg = pFact->CreateSwAutoFormatDlg(pButton,pShell, DLG_AUTOFMT_TABLE, sal_False, pTAutoFmt );
DBG_ASSERT(pDlg, "Dialogdiet fail!");
if( RET_OK == pDlg->Execute())
pDlg->FillAutoFmtOfIndex( pTAutoFmt );
diff --git a/sw/source/ui/table/mergetbl.cxx b/sw/source/ui/table/mergetbl.cxx
index 2e96a58846..777f38db0f 100644
--- a/sw/source/ui/table/mergetbl.cxx
+++ b/sw/source/ui/table/mergetbl.cxx
@@ -43,7 +43,7 @@
#endif
-SwMergeTblDlg::SwMergeTblDlg( Window *pParent, BOOL& rWithPrev )
+SwMergeTblDlg::SwMergeTblDlg( Window *pParent, sal_Bool& rWithPrev )
: SvxStandardDialog(pParent, SW_RES(DLG_MERGE_TABLE)),
aOKPB( this, SW_RES(PB_OK )),
aCancelPB( this, SW_RES(PB_CANCEL )),
diff --git a/sw/source/ui/table/swtablerep.cxx b/sw/source/ui/table/swtablerep.cxx
index ae561b2bc5..018628680b 100644
--- a/sw/source/ui/table/swtablerep.cxx
+++ b/sw/source/ui/table/swtablerep.cxx
@@ -81,9 +81,9 @@
#ifdef DEBUG_TBLDLG
-void DbgTColumn(TColumn* pTColumn, USHORT nCount)
+void DbgTColumn(TColumn* pTColumn, sal_uInt16 nCount)
{
- for(USHORT i = 0; i < nCount; i++)
+ for(sal_uInt16 i = 0; i < nCount; i++)
{
String sMsg(i);
sMsg += pTColumn[i].bVisible ? " v " : " h ";
@@ -96,7 +96,7 @@ void DbgTColumn(TColumn* pTColumn, USHORT nCount)
/*-----------------20.08.96 09.43-------------------
--------------------------------------------------*/
-SwTableRep::SwTableRep( const SwTabCols& rTabCol, BOOL bCplx )
+SwTableRep::SwTableRep( const SwTabCols& rTabCol, sal_Bool bCplx )
:
nTblWidth(0),
nSpace(0),
@@ -105,15 +105,15 @@ SwTableRep::SwTableRep( const SwTabCols& rTabCol, BOOL bCplx )
nAlign(0),
nWidthPercent(0),
bComplex(bCplx),
- bLineSelected(FALSE),
- bWidthChanged(FALSE),
- bColsChanged(FALSE)
+ bLineSelected(sal_False),
+ bWidthChanged(sal_False),
+ bColsChanged(sal_False)
{
nAllCols = nColCount = rTabCol.Count();
pTColumns = new TColumn[ nColCount + 1 ];
SwTwips nStart = 0,
nEnd;
- for( USHORT i = 0; i < nAllCols; ++i )
+ for( sal_uInt16 i = 0; i < nAllCols; ++i )
{
nEnd = rTabCol[ i ] - rTabCol.GetLeft();
pTColumns[ i ].nWidth = nEnd - nStart;
@@ -123,7 +123,7 @@ SwTableRep::SwTableRep( const SwTabCols& rTabCol, BOOL bCplx )
nStart = nEnd;
}
pTColumns[ nAllCols ].nWidth = rTabCol.GetRight() - rTabCol.GetLeft() - nStart;
- pTColumns[ nAllCols ].bVisible = TRUE;
+ pTColumns[ nAllCols ].bVisible = sal_True;
nColCount++;
nAllCols++;
}
@@ -137,18 +137,18 @@ SwTableRep::~SwTableRep()
/*-----------------20.08.96 13.33-------------------
--------------------------------------------------*/
-BOOL SwTableRep::FillTabCols( SwTabCols& rTabCols ) const
+sal_Bool SwTableRep::FillTabCols( SwTabCols& rTabCols ) const
{
long nOldLeft = rTabCols.GetLeft(),
nOldRight = rTabCols.GetRight();
- BOOL bSingleLine = FALSE;
- USHORT i;
+ sal_Bool bSingleLine = sal_False;
+ sal_uInt16 i;
for ( i = 0; i < rTabCols.Count(); ++i )
if(!pTColumns[i].bVisible)
{
- bSingleLine = TRUE;
+ bSingleLine = sal_True;
break;
}
@@ -174,18 +174,18 @@ BOOL SwTableRep::FillTabCols( SwTabCols& rTabCols ) const
nStart = nEnd;
}
pOldTColumns[nAllCols - 1].nWidth = rTabCols.GetRight() - rTabCols.GetLeft() - nStart;
- pOldTColumns[nAllCols - 1].bVisible = TRUE;
+ pOldTColumns[nAllCols - 1].bVisible = sal_True;
#ifdef DEBUG_TBLDLG
#define DbgTColumn(pOldTColumns, nAllCols);
#endif
- USHORT nOldPos = 0;
- USHORT nNewPos = 0;
+ sal_uInt16 nOldPos = 0;
+ sal_uInt16 nNewPos = 0;
SwTwips nOld = 0;
SwTwips nNew = 0;
- BOOL bOld = FALSE;
- BOOL bFirst = TRUE;
+ sal_Bool bOld = sal_False;
+ sal_Bool bFirst = sal_True;
i = 0;
while ( i < nAllCols -1 )
@@ -204,10 +204,10 @@ BOOL SwTableRep::FillTabCols( SwTabCols& rTabCols ) const
if(pOldTColumns[nNewPos - 1].bVisible)
break;
}
- bFirst = FALSE;
+ bFirst = sal_False;
// sie muessen sortiert eingefuegt werden
bOld = nOld < nNew;
- nPos = USHORT(bOld ? nOld : nNew);
+ nPos = sal_uInt16(bOld ? nOld : nNew);
rTabCols[i] = nPos + nLeft;
rTabCols.SetHidden( i, bOld );
i++;
diff --git a/sw/source/ui/table/tabledlg.cxx b/sw/source/ui/table/tabledlg.cxx
index 8578dc3b99..3d8f81241c 100644
--- a/sw/source/ui/table/tabledlg.cxx
+++ b/sw/source/ui/table/tabledlg.cxx
@@ -96,7 +96,7 @@ void DbgTblRep(SwTableRep* pRep)
DBG_ERROR(String(pRep->GetColCount()))
DBG_ERROR(String(pRep->GetAllColCount()))
SwTwips nSum = 0;
- for(USHORT i = 0; i < pRep->GetAllColCount(); i++)
+ for(sal_uInt16 i = 0; i < pRep->GetAllColCount(); i++)
{
String sMsg(i);
sMsg += pRep->GetColumns()[i].bVisible ? " v " : " h ";
@@ -159,7 +159,7 @@ SwFormatTablePage::SwFormatTablePage( Window* pParent, const SfxItemSet& rSet )
pTblData(0),
nSaveWidth(0),
nMinTableWidth(MINLAY),
- bModified(FALSE),
+ bModified(sal_False),
bFull(0),
bHtmlMode(sal_False)
{
@@ -167,7 +167,7 @@ SwFormatTablePage::SwFormatTablePage( Window* pParent, const SfxItemSet& rSet )
SetExchangeSupport();
const SfxPoolItem* pItem;
- if(SFX_ITEM_SET == rSet.GetItemState(SID_HTML_MODE, FALSE, &pItem))
+ if(SFX_ITEM_SET == rSet.GetItemState(SID_HTML_MODE, sal_False, &pItem))
bHtmlMode = 0 != (((const SfxUInt16Item*)pItem)->GetValue() & HTMLMODE_ON);
sal_Bool bCTL = SW_MOD()->GetCTLOptions().IsCTLFontEnabled();
@@ -224,7 +224,7 @@ void SwFormatTablePage::Init()
IMPL_LINK( SwFormatTablePage, RelWidthClickHdl, CheckBox *, pBtn )
{
DBG_ASSERT(pTblData, "Tabellendaten nicht da?");
- BOOL bIsChecked = pBtn->IsChecked();
+ sal_Bool bIsChecked = pBtn->IsChecked();
sal_Int64 nLeft = aLeftMF.DenormalizePercent(aLeftMF.GetValue(FUNIT_TWIP ));
sal_Int64 nRight = aRightMF.DenormalizePercent(aRightMF.GetValue(FUNIT_TWIP ));
aWidthMF.ShowPercent(bIsChecked);
@@ -248,11 +248,11 @@ IMPL_LINK( SwFormatTablePage, RelWidthClickHdl, CheckBox *, pBtn )
if(aFreeBtn.IsChecked())
{
- BOOL bEnable = !pBtn->IsChecked();
+ sal_Bool bEnable = !pBtn->IsChecked();
aRightMF.Enable(bEnable);
aRightFT.Enable(bEnable);
}
- bModified = TRUE;
+ bModified = sal_True;
return 0;
}
@@ -261,45 +261,45 @@ IMPL_LINK( SwFormatTablePage, RelWidthClickHdl, CheckBox *, pBtn )
------------------------------------------------------------------------*/
IMPL_LINK( SwFormatTablePage, AutoClickHdl, CheckBox *, pBox )
{
- BOOL bRestore = TRUE,
- bLeftEnable = FALSE,
- bRightEnable= FALSE,
- bWidthEnable= FALSE,
- bOthers = TRUE;
+ sal_Bool bRestore = sal_True,
+ bLeftEnable = sal_False,
+ bRightEnable= sal_False,
+ bWidthEnable= sal_False,
+ bOthers = sal_True;
if( (RadioButton *) pBox == &aFullBtn )
{
aLeftMF.SetPrcntValue(0);
aRightMF.SetPrcntValue(0);
nSaveWidth = static_cast< SwTwips >(aWidthMF.DenormalizePercent(aWidthMF.GetValue(FUNIT_TWIP )));
aWidthMF.SetPrcntValue(aWidthMF.NormalizePercent(pTblData->GetSpace() ), FUNIT_TWIP );
- bFull = TRUE;
- bRestore = FALSE;
+ bFull = sal_True;
+ bRestore = sal_False;
}
else if( (RadioButton *) pBox == &aLeftBtn )
{
- bRightEnable = bWidthEnable = TRUE;
+ bRightEnable = bWidthEnable = sal_True;
aLeftMF.SetPrcntValue(0);
}
else if( (RadioButton *) pBox == &aFromLeftBtn )
{
- bLeftEnable = bWidthEnable = TRUE;
+ bLeftEnable = bWidthEnable = sal_True;
aRightMF.SetPrcntValue(0);
}
else if( (RadioButton *) pBox == &aRightBtn )
{
- bLeftEnable = bWidthEnable = TRUE;
+ bLeftEnable = bWidthEnable = sal_True;
aRightMF.SetPrcntValue(0);
}
else if( ( RadioButton * ) pBox == &aCenterBtn )
{
- bLeftEnable = bWidthEnable = TRUE;
+ bLeftEnable = bWidthEnable = sal_True;
}
else if( ( RadioButton * ) pBox == &aFreeBtn )
{
RightModifyHdl(&aRightMF);
- bLeftEnable = TRUE;
- bWidthEnable = TRUE;
- bOthers = FALSE;
+ bLeftEnable = sal_True;
+ bWidthEnable = sal_True;
+ bOthers = sal_False;
}
aLeftMF.Enable(bLeftEnable);
aLeftFT.Enable(bLeftEnable);
@@ -316,11 +316,11 @@ IMPL_LINK( SwFormatTablePage, AutoClickHdl, CheckBox *, pBox )
{
// nachdem auf autom. geschaltet wurde, wurde die Breite gemerkt,
// um sie beim Zurueckschalten restaurieren zu koennen
- bFull = FALSE;
+ bFull = sal_False;
aWidthMF.SetPrcntValue(aWidthMF.NormalizePercent(nSaveWidth ), FUNIT_TWIP );
}
ModifyHdl(&aWidthMF);
- bModified = TRUE;
+ bModified = sal_True;
return 0;
}
@@ -329,13 +329,13 @@ IMPL_LINK( SwFormatTablePage, RightModifyHdl, MetricField *, EMPTYARG )
{
if(aFreeBtn.IsChecked())
{
- BOOL bEnable = aRightMF.GetValue() == 0;
+ sal_Bool bEnable = aRightMF.GetValue() == 0;
// aWidthMF.Enable(bEnable);
aRelWidthCB.Enable(bEnable);
// aWidthFT.Enable(bEnable);
if ( !bEnable )
{
- aRelWidthCB.Check(FALSE);
+ aRelWidthCB.Check(sal_False);
RelWidthClickHdl(&aRelWidthCB);
}
bEnable = aRelWidthCB.IsChecked();
@@ -430,7 +430,7 @@ void SwFormatTablePage::ModifyHdl( Edit* pEdit )
{
if(!aFromLeftBtn.IsChecked())
{
- BOOL bCenter = aCenterBtn.IsChecked();
+ sal_Bool bCenter = aCenterBtn.IsChecked();
if( bCenter )
nRight = nLeft;
if(nRight + nLeft > pTblData->GetSpace() - MINLAY )
@@ -455,7 +455,7 @@ void SwFormatTablePage::ModifyHdl( Edit* pEdit )
aWidthMF.SetPrcntValue( aWidthMF.NormalizePercent( nCurWidth ), FUNIT_TWIP );
aRightMF.SetPrcntValue( aRightMF.NormalizePercent( nRight ), FUNIT_TWIP );
aLeftMF.SetPrcntValue( aLeftMF.NormalizePercent( nLeft ), FUNIT_TWIP );
- bModified = TRUE;
+ bModified = sal_True;
}
/*------------------------------------------------------------------------
@@ -468,7 +468,7 @@ SfxTabPage* SwFormatTablePage::Create( Window* pParent,
/*------------------------------------------------------------------------
-------------------------------------------------------------------------*/
-BOOL SwFormatTablePage::FillItemSet( SfxItemSet& rCoreSet )
+sal_Bool SwFormatTablePage::FillItemSet( SfxItemSet& rCoreSet )
{
// Testen, ob eins der Control noch den Focus hat
if(aWidthMF.HasFocus())
@@ -488,9 +488,9 @@ BOOL SwFormatTablePage::FillItemSet( SfxItemSet& rCoreSet )
aTopMF.GetText() != aTopMF.GetSavedValue() )
{
SvxULSpaceItem aULSpace(RES_UL_SPACE);
- aULSpace.SetUpper( (USHORT) aTopMF.Denormalize(
+ aULSpace.SetUpper( (sal_uInt16) aTopMF.Denormalize(
aTopMF.GetValue( FUNIT_TWIP )));
- aULSpace.SetLower( (USHORT) aBottomMF.Denormalize(
+ aULSpace.SetLower( (sal_uInt16) aBottomMF.Denormalize(
aBottomMF.GetValue( FUNIT_TWIP )));
rCoreSet.Put(aULSpace);
}
@@ -499,17 +499,17 @@ BOOL SwFormatTablePage::FillItemSet( SfxItemSet& rCoreSet )
if(aNameED.GetText() != aNameED.GetSavedValue())
{
rCoreSet.Put(SfxStringItem( FN_PARAM_TABLE_NAME, aNameED.GetText()));
- bModified = TRUE;
+ bModified = sal_True;
}
- USHORT nPos;
+ sal_uInt16 nPos;
if( aTextDirectionLB.IsVisible() &&
( nPos = aTextDirectionLB.GetSelectEntryPos() ) !=
aTextDirectionLB.GetSavedValue() )
{
sal_uInt32 nDirection = (sal_uInt32)(sal_uIntPtr)aTextDirectionLB.GetEntryData( nPos );
rCoreSet.Put( SvxFrameDirectionItem( (SvxFrameDirection)nDirection, RES_FRAMEDIR));
- bModified = TRUE;
+ bModified = sal_True;
}
return bModified;
@@ -529,7 +529,7 @@ void SwFormatTablePage::Reset( const SfxItemSet& )
aTopMF .Hide();
aBottomFT.Hide();
aBottomMF.Hide();
- aFreeBtn.Enable(FALSE);
+ aFreeBtn.Enable(sal_False);
}
FieldUnit aMetric = ::GetDfltMetric(bHtmlMode);
SetMetric( aWidthMF, aMetric );
@@ -539,20 +539,20 @@ void SwFormatTablePage::Reset( const SfxItemSet& )
SetMetric( aBottomMF, aMetric );
//Name
- if(SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_TABLE_NAME, FALSE, &pItem ))
+ if(SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_TABLE_NAME, sal_False, &pItem ))
{
aNameED.SetText(((const SfxStringItem*)pItem)->GetValue());
aNameED.SaveValue();
}
- if(SFX_ITEM_SET == rSet.GetItemState( FN_TABLE_REP, FALSE, &pItem ))
+ if(SFX_ITEM_SET == rSet.GetItemState( FN_TABLE_REP, sal_False, &pItem ))
{
pTblData = (SwTableRep*)((const SwPtrItem*) pItem)->GetValue();
nMinTableWidth = pTblData->GetColCount() * MINLAY;
if(pTblData->GetWidthPercent())
{
- aRelWidthCB.Check(TRUE);
+ aRelWidthCB.Check(sal_True);
RelWidthClickHdl(&aRelWidthCB);
aWidthMF.SetPrcntValue(pTblData->GetWidthPercent(), FUNIT_CUSTOM);
@@ -582,45 +582,45 @@ void SwFormatTablePage::Reset( const SfxItemSet& )
nOldAlign = pTblData->GetAlign();
- BOOL bSetRight = FALSE, bRightEnable = FALSE,
- bSetLeft = FALSE, bLeftEnable = FALSE;
+ sal_Bool bSetRight = sal_False, bRightEnable = sal_False,
+ bSetLeft = sal_False, bLeftEnable = sal_False;
switch( nOldAlign )
{
case text::HoriOrientation::NONE:
aFreeBtn.Check();
if(aRelWidthCB.IsChecked())
- bSetRight = TRUE;
+ bSetRight = sal_True;
break;
case text::HoriOrientation::FULL:
{
- bSetRight = bSetLeft = TRUE;
+ bSetRight = bSetLeft = sal_True;
aFullBtn.Check();
- aWidthMF.Enable(FALSE);
- aRelWidthCB.Enable(FALSE);
- aWidthFT.Enable(FALSE);
+ aWidthMF.Enable(sal_False);
+ aRelWidthCB.Enable(sal_False);
+ aWidthFT.Enable(sal_False);
}
break;
case text::HoriOrientation::LEFT:
{
- bSetLeft = TRUE;
+ bSetLeft = sal_True;
aLeftBtn.Check();
}
break;
case text::HoriOrientation::LEFT_AND_WIDTH :
{
- bSetRight = TRUE;
+ bSetRight = sal_True;
aFromLeftBtn.Check();
}
break;
case text::HoriOrientation::RIGHT:
{
- bSetRight = TRUE;
+ bSetRight = sal_True;
aRightBtn.Check();
}
break;
case text::HoriOrientation::CENTER:
{
- bSetRight = TRUE;
+ bSetRight = sal_True;
aCenterBtn.Check();
}
break;
@@ -639,7 +639,7 @@ void SwFormatTablePage::Reset( const SfxItemSet& )
}
//Raender
- if(SFX_ITEM_SET == rSet.GetItemState( RES_UL_SPACE, FALSE,&pItem ))
+ if(SFX_ITEM_SET == rSet.GetItemState( RES_UL_SPACE, sal_False,&pItem ))
{
aTopMF.SetValue(aTopMF.Normalize(
((const SvxULSpaceItem*)pItem)->GetUpper()), FUNIT_TWIP);
@@ -650,10 +650,10 @@ void SwFormatTablePage::Reset( const SfxItemSet& )
}
//text direction
- if( SFX_ITEM_SET == rSet.GetItemState( RES_FRAMEDIR, TRUE, &pItem ) )
+ if( SFX_ITEM_SET == rSet.GetItemState( RES_FRAMEDIR, sal_True, &pItem ) )
{
sal_uInt32 nVal = ((SvxFrameDirectionItem*)pItem)->GetValue();
- USHORT nPos = aTextDirectionLB.GetEntryPos( (void*) nVal );
+ sal_uInt16 nPos = aTextDirectionLB.GetEntryPos( (void*) nVal );
aTextDirectionLB.SelectEntryPos( nPos );
aTextDirectionLB.SaveValue();
}
@@ -728,7 +728,7 @@ int SwFormatTablePage::DeactivatePage( SfxItemSet* _pSet )
if (aRelWidthCB.IsChecked() && aRelWidthCB.IsEnabled())
{
lWidth = pTblData->GetSpace() - lRight - lLeft;
- USHORT nPercentWidth = (USHORT)aWidthMF.GetValue(FUNIT_CUSTOM);
+ sal_uInt16 nPercentWidth = (sal_uInt16)aWidthMF.GetValue(FUNIT_CUSTOM);
if(pTblData->GetWidthPercent() != nPercentWidth)
{
pTblData->SetWidthPercent(nPercentWidth);
@@ -743,7 +743,7 @@ int SwFormatTablePage::DeactivatePage( SfxItemSet* _pSet )
pTblData->SetWidth(lWidth);
SwTwips nColSum = 0;
- USHORT i;
+ sal_uInt16 i;
for( i = 0; i < pTblData->GetColCount(); i++)
{
@@ -812,7 +812,7 @@ int SwFormatTablePage::DeactivatePage( SfxItemSet* _pSet )
DbgTblRep(pTblData)
#endif
}
- return TRUE;
+ return sal_True;
}
/*------------------------------------------------------------------------
Beschreibung: Seite Spaltenkonfiguration
@@ -845,9 +845,9 @@ SwTableColumnPage::SwTableColumnPage( Window* pParent,
nMinWidth( MINLAY ),
nNoOfCols( 0 ),
nNoOfVisibleCols( 0 ),
- bModified(FALSE),
- bModifyTbl(FALSE),
- bPercentMode(FALSE)
+ bModified(sal_False),
+ bModifyTbl(sal_False),
+ bPercentMode(sal_False)
{
FreeResource();
SetExchangeSupport();
@@ -867,7 +867,7 @@ SwTableColumnPage::SwTableColumnPage( Window* pParent,
pTextArr[5] = &aFT6;
const SfxPoolItem* pItem;
- Init((SFX_ITEM_SET == rSet.GetItemState( SID_HTML_MODE, FALSE,&pItem )
+ Init((SFX_ITEM_SET == rSet.GetItemState( SID_HTML_MODE, sal_False,&pItem )
&& ((const SfxUInt16Item*)pItem)->GetValue() & HTMLMODE_ON));
};
@@ -893,7 +893,7 @@ void SwTableColumnPage::Reset( const SfxItemSet& )
const SfxItemSet& rSet = GetItemSet();
const SfxPoolItem* pItem;
- if(SFX_ITEM_SET == rSet.GetItemState( FN_TABLE_REP, FALSE, &pItem ))
+ if(SFX_ITEM_SET == rSet.GetItemState( FN_TABLE_REP, sal_False, &pItem ))
{
pTblData = (SwTableRep*)((const SwPtrItem*) pItem)->GetValue();
nNoOfVisibleCols = pTblData->GetColCount();
@@ -902,7 +902,7 @@ void SwTableColumnPage::Reset( const SfxItemSet& )
pTblData->GetAlign() != text::HoriOrientation::LEFT_AND_WIDTH?
pTblData->GetWidth() : pTblData->GetSpace();
- USHORT i;
+ sal_uInt16 i;
for( i = 0; i < nNoOfCols; i++ )
{
if( pTblData->GetColumns()[i].nWidth < nMinWidth )
@@ -936,13 +936,13 @@ void SwTableColumnPage::Reset( const SfxItemSet& )
/*------------------------------------------------------------------------
------------------------------------------------------------------------*/
-void SwTableColumnPage::Init(BOOL bWeb)
+void SwTableColumnPage::Init(sal_Bool bWeb)
{
FieldUnit aMetric = ::GetDfltMetric(bWeb);
Link aLkUp = LINK( this, SwTableColumnPage, UpHdl );
Link aLkDown = LINK( this, SwTableColumnPage, DownHdl );
Link aLkLF = LINK( this, SwTableColumnPage, LoseFocusHdl );
- for( USHORT i = 0; i < MET_FIELDS; i++ )
+ for( sal_uInt16 i = 0; i < MET_FIELDS; i++ )
{
aValueTbl[i] = i;
SetMetric(*pFieldArr[i], aMetric);
@@ -971,7 +971,7 @@ IMPL_LINK( SwTableColumnPage, AutoClickHdl, CheckBox *, pBox )
{
if(aValueTbl[0] > 0)
{
- for( USHORT i=0; i < MET_FIELDS; i++ )
+ for( sal_uInt16 i=0; i < MET_FIELDS; i++ )
aValueTbl[i] -= 1;
}
}
@@ -979,11 +979,11 @@ IMPL_LINK( SwTableColumnPage, AutoClickHdl, CheckBox *, pBox )
{
if( aValueTbl[ MET_FIELDS -1 ] < nNoOfVisibleCols -1 )
{
- for(USHORT i=0;i < MET_FIELDS;i++)
+ for(sal_uInt16 i=0;i < MET_FIELDS;i++)
aValueTbl[i] += 1;
}
}
- for( USHORT i = 0; (i < nNoOfVisibleCols ) && ( i < MET_FIELDS); i++ )
+ for( sal_uInt16 i = 0; (i < nNoOfVisibleCols ) && ( i < MET_FIELDS); i++ )
{
String sEntry('~');
sEntry += String::CreateFromInt32( aValueTbl[i] + 1 );
@@ -1000,7 +1000,7 @@ IMPL_LINK( SwTableColumnPage, AutoClickHdl, CheckBox *, pBox )
------------------------------------------------------------------------*/
IMPL_LINK_INLINE_START( SwTableColumnPage, UpHdl, PercentField *, pEdit )
{
- bModified = TRUE;
+ bModified = sal_True;
ModifyHdl( pEdit );
return 0;
};
@@ -1010,7 +1010,7 @@ IMPL_LINK_INLINE_END( SwTableColumnPage, UpHdl, PercentField *, pEdit )
------------------------------------------------------------------------*/
IMPL_LINK_INLINE_START( SwTableColumnPage, DownHdl, PercentField *, pEdit )
{
- bModified = TRUE;
+ bModified = sal_True;
ModifyHdl( pEdit );
return 0;
};
@@ -1022,7 +1022,7 @@ IMPL_LINK_INLINE_START( SwTableColumnPage, LoseFocusHdl, PercentField *, pEdit )
{
if(pEdit->IsModified())
{
- bModified = TRUE;
+ bModified = sal_True;
ModifyHdl( pEdit );
}
return 0;
@@ -1033,7 +1033,7 @@ IMPL_LINK_INLINE_END( SwTableColumnPage, LoseFocusHdl, PercentField *, pEdit )
------------------------------------------------------------------------*/
IMPL_LINK( SwTableColumnPage, ModeHdl, CheckBox*, pBox )
{
- BOOL bCheck = pBox->IsChecked();
+ sal_Bool bCheck = pBox->IsChecked();
if(pBox == &aProportionalCB)
{
if(bCheck)
@@ -1045,9 +1045,9 @@ IMPL_LINK( SwTableColumnPage, ModeHdl, CheckBox*, pBox )
/*------------------------------------------------------------------------
------------------------------------------------------------------------*/
-BOOL SwTableColumnPage::FillItemSet( SfxItemSet& )
+sal_Bool SwTableColumnPage::FillItemSet( SfxItemSet& )
{
- for( USHORT i = 0; i < MET_FIELDS; i++ )
+ for( sal_uInt16 i = 0; i < MET_FIELDS; i++ )
{
if(pFieldArr[i]->HasFocus())
{
@@ -1067,8 +1067,8 @@ BOOL SwTableColumnPage::FillItemSet( SfxItemSet& )
------------------------------------------------------------------------*/
void SwTableColumnPage::ModifyHdl( PercentField* pEdit )
{
- USHORT nAktPos;
- USHORT i;
+ sal_uInt16 nAktPos;
+ sal_uInt16 i;
for( i = 0; i < MET_FIELDS; i++)
if(pEdit == pFieldArr[i])
@@ -1082,10 +1082,10 @@ void SwTableColumnPage::ModifyHdl( PercentField* pEdit )
/*------------------------------------------------------------------------
------------------------------------------------------------------------*/
-void SwTableColumnPage::UpdateCols( USHORT nAktPos )
+void SwTableColumnPage::UpdateCols( sal_uInt16 nAktPos )
{
SwTwips nSum = 0;
- USHORT i;
+ sal_uInt16 i;
for( i = 0; i < nNoOfCols; i++ )
{
@@ -1093,8 +1093,8 @@ void SwTableColumnPage::UpdateCols( USHORT nAktPos )
}
SwTwips nDiff = nSum - nTableWidth;
- BOOL bModifyTable = aModifyTableCB.IsChecked();
- BOOL bProp = aProportionalCB.IsChecked();
+ sal_Bool bModifyTable = aModifyTableCB.IsChecked();
+ sal_Bool bProp = aProportionalCB.IsChecked();
if(!bModifyTable && !bProp )
{
@@ -1187,10 +1187,10 @@ void SwTableColumnPage::UpdateCols( USHORT nAktPos )
SwTwips nDiffn = nDiff/(nNoOfVisibleCols - 1);
if(nDiff < 0 && (nNoOfVisibleCols - 1) * nDiffn != nDiff)
nDiffn-- ;
- USHORT nStart = nAktPos++;
+ sal_uInt16 nStart = nAktPos++;
if(nAktPos == nNoOfVisibleCols)
nStart = 0;
- for(USHORT i = 0; i < nNoOfVisibleCols; i++ )
+ for(sal_uInt16 i = 0; i < nNoOfVisibleCols; i++ )
{
if((nVisWidth = GetVisibleWidth(i)) + nDiff < MINLAY)
{
@@ -1223,13 +1223,13 @@ DbgTblRep(pTblData)
void SwTableColumnPage::ActivatePage( const SfxItemSet& )
{
bPercentMode = pTblData->GetWidthPercent() != 0;
- for( USHORT i = 0; (i < MET_FIELDS) && (i < nNoOfVisibleCols); i++ )
+ for( sal_uInt16 i = 0; (i < MET_FIELDS) && (i < nNoOfVisibleCols); i++ )
{
pFieldArr[i]->SetRefValue(pTblData->GetWidth());
pFieldArr[i]->ShowPercent( bPercentMode );
}
- USHORT nTblAlign = pTblData->GetAlign();
+ sal_uInt16 nTblAlign = pTblData->GetAlign();
if((text::HoriOrientation::FULL != nTblAlign && nTableWidth != pTblData->GetWidth()) ||
(text::HoriOrientation::FULL == nTblAlign && nTableWidth != pTblData->GetSpace()))
{
@@ -1238,20 +1238,20 @@ void SwTableColumnPage::ActivatePage( const SfxItemSet& )
pTblData->GetWidth();
UpdateCols(0);
}
- bModifyTbl = TRUE;
+ bModifyTbl = sal_True;
if(pTblData->GetWidthPercent() ||
text::HoriOrientation::FULL == nTblAlign ||
pTblData->IsLineSelected() )
- bModifyTbl = FALSE;
+ bModifyTbl = sal_False;
if(bPercentMode)
{
- aModifyTableCB .Check(FALSE);
- aProportionalCB .Check(FALSE);
+ aModifyTableCB .Check(sal_False);
+ aProportionalCB .Check(sal_False);
}
else if( !bModifyTbl )
{
- aProportionalCB.Check(FALSE);
- aModifyTableCB.Check(FALSE);
+ aProportionalCB.Check(sal_False);
+ aModifyTableCB.Check(sal_False);
}
aSpaceFT.Enable(!bPercentMode);
aSpaceED.Enable(!bPercentMode);
@@ -1331,14 +1331,14 @@ DbgTblRep(pTblData)
#endif
_pSet->Put(SwPtrItem( FN_TABLE_REP, pTblData ));
}
- return TRUE;
+ return sal_True;
}
/*------------------------------------------------------------------------
------------------------------------------------------------------------*/
-SwTwips SwTableColumnPage::GetVisibleWidth(USHORT nPos)
+SwTwips SwTableColumnPage::GetVisibleWidth(sal_uInt16 nPos)
{
- USHORT i=0;
+ sal_uInt16 i=0;
while( nPos )
{
@@ -1357,9 +1357,9 @@ SwTwips SwTableColumnPage::GetVisibleWidth(USHORT nPos)
/*------------------------------------------------------------------------
------------------------------------------------------------------------*/
-void SwTableColumnPage::SetVisibleWidth(USHORT nPos, SwTwips nNewWidth)
+void SwTableColumnPage::SetVisibleWidth(sal_uInt16 nPos, SwTwips nNewWidth)
{
- USHORT i=0;
+ sal_uInt16 i=0;
while( nPos )
{
if(pTblData->GetColumns()[i].bVisible && nPos)
@@ -1394,7 +1394,7 @@ SwTableTabDlg::SwTableTabDlg(Window* pParent, SfxItemPool& ,
/*------------------------------------------------------------------------
------------------------------------------------------------------------*/
-void SwTableTabDlg::PageCreated(USHORT nId, SfxTabPage& rPage)
+void SwTableTabDlg::PageCreated(sal_uInt16 nId, SfxTabPage& rPage)
{
SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool()));
if( TP_BACKGROUND == nId )
@@ -1414,7 +1414,7 @@ void SwTableTabDlg::PageCreated(USHORT nId, SfxTabPage& rPage)
else if(TP_TABLE_TEXTFLOW == nId)
{
((SwTextFlowPage&)rPage).SetShell(pShell);
- const USHORT eType = pShell->GetFrmType(0,TRUE);
+ const sal_uInt16 eType = pShell->GetFrmType(0,sal_True);
if( !(FRMTYPE_BODY & eType) )
((SwTextFlowPage&)rPage).DisablePageBreak();
}
@@ -1453,8 +1453,8 @@ SwTextFlowPage::SwTextFlowPage( Window* pParent,
pShell(0),
- bPageBreak(TRUE),
- bHtmlMode(FALSE)
+ bPageBreak(sal_True),
+ bHtmlMode(sal_False)
{
FreeResource();
@@ -1477,7 +1477,7 @@ SwTextFlowPage::SwTextFlowPage( Window* pParent,
#ifndef SW_FILEFORMAT_40
const SfxPoolItem *pItem;
- if(SFX_ITEM_SET == rSet.GetItemState( SID_HTML_MODE, FALSE,&pItem )
+ if(SFX_ITEM_SET == rSet.GetItemState( SID_HTML_MODE, sal_False,&pItem )
&& ((const SfxUInt16Item*)pItem)->GetValue() & HTMLMODE_ON)
#endif
{
@@ -1507,16 +1507,16 @@ SfxTabPage* SwTextFlowPage::Create( Window* pParent,
/*-----------------12.12.96 12.22-------------------
--------------------------------------------------*/
-BOOL SwTextFlowPage::FillItemSet( SfxItemSet& rSet )
+sal_Bool SwTextFlowPage::FillItemSet( SfxItemSet& rSet )
{
- BOOL bModified = FALSE;
+ sal_Bool bModified = sal_False;
//Ueberschrift wiederholen
if(aHeadLineCB.IsChecked() != aHeadLineCB.GetSavedValue() ||
- String::CreateFromInt32( static_cast< INT32 >(aRepeatHeaderNF.GetValue()) ) != aRepeatHeaderNF.GetSavedValue() )
+ String::CreateFromInt32( static_cast< sal_Int32 >(aRepeatHeaderNF.GetValue()) ) != aRepeatHeaderNF.GetSavedValue() )
{
bModified |= 0 != rSet.Put(
- SfxUInt16Item(FN_PARAM_TABLE_HEADLINE, aHeadLineCB.IsChecked()? USHORT(aRepeatHeaderNF.GetValue()) : 0 ));
+ SfxUInt16Item(FN_PARAM_TABLE_HEADLINE, aHeadLineCB.IsChecked()? sal_uInt16(aRepeatHeaderNF.GetValue()) : 0 ));
}
if(aKeepCB.IsChecked() != aKeepCB.GetSavedValue())
bModified |= 0 != rSet.Put( SvxFmtKeepItem( aKeepCB.IsChecked(), RES_KEEP));
@@ -1532,10 +1532,10 @@ BOOL SwTextFlowPage::FillItemSet( SfxItemSet& rSet )
const SwFmtPageDesc* pDesc = (const SwFmtPageDesc*) GetOldItem( rSet, RES_PAGEDESC );
- BOOL bState = aPageCollCB.IsChecked();
+ sal_Bool bState = aPageCollCB.IsChecked();
//Wenn Seitenvorlage, dann kein Break
- BOOL bPageItemPut = FALSE;
+ sal_Bool bPageItemPut = sal_False;
if ( bState != aPageCollCB.GetSavedValue() ||
( bState &&
aPageCollLB.GetSelectEntryPos() != aPageCollLB.GetSavedValue() )
@@ -1547,18 +1547,18 @@ BOOL SwTextFlowPage::FillItemSet( SfxItemSet& rSet )
{
sPage = aPageCollLB.GetSelectEntry();
}
- USHORT nPgNum = static_cast< USHORT >(aPageNoNF.GetValue());
+ sal_uInt16 nPgNum = static_cast< sal_uInt16 >(aPageNoNF.GetValue());
if ( !pDesc || !pDesc->GetPageDesc() ||
( pDesc->GetPageDesc() && ((pDesc->GetPageDesc()->GetName() != sPage) ||
aPageNoNF.GetSavedValue() != (String)nPgNum)))
{
- SwFmtPageDesc aFmt( pShell->FindPageDescByName( sPage, TRUE ) );
+ SwFmtPageDesc aFmt( pShell->FindPageDescByName( sPage, sal_True ) );
aFmt.SetNumOffset(bState ? nPgNum : 0);
bModified |= 0 != rSet.Put( aFmt );
bPageItemPut = bState;
}
}
- BOOL bIsChecked = aPgBrkCB.IsChecked();
+ sal_Bool bIsChecked = aPgBrkCB.IsChecked();
if ( !bPageItemPut &&
( bState != aPageCollCB.GetSavedValue() ||
bIsChecked != aPgBrkCB.GetSavedValue() ||
@@ -1570,7 +1570,7 @@ BOOL SwTextFlowPage::FillItemSet( SfxItemSet& rSet )
if(bIsChecked)
{
- BOOL bBefore = aPgBrkBeforeRB.IsChecked();
+ sal_Bool bBefore = aPgBrkBeforeRB.IsChecked();
if ( aPgBrkRB.IsChecked() )
{
@@ -1602,13 +1602,13 @@ BOOL SwTextFlowPage::FillItemSet( SfxItemSet& rSet )
{
bModified |= 0 != rSet.Put(
SvxFrameDirectionItem(
- (SvxFrameDirection)(ULONG)aTextDirectionLB.GetEntryData(aTextDirectionLB.GetSelectEntryPos())
+ (SvxFrameDirection)(sal_uLong)aTextDirectionLB.GetEntryData(aTextDirectionLB.GetSelectEntryPos())
, FN_TABLE_BOX_TEXTDIRECTION));
}
if(aVertOrientLB.GetSelectEntryPos() != aVertOrientLB.GetSavedValue())
{
- USHORT nOrient = USHRT_MAX;
+ sal_uInt16 nOrient = USHRT_MAX;
switch(aVertOrientLB.GetSelectEntryPos())
{
case 0 : nOrient = text::VertOrientation::NONE; break;
@@ -1629,12 +1629,12 @@ void SwTextFlowPage::Reset( const SfxItemSet& rSet )
{
const SfxPoolItem* pItem;
SvxHtmlOptions* pHtmlOpt = SvxHtmlOptions::Get();
- BOOL bFlowAllowed = !bHtmlMode || pHtmlOpt->IsPrintLayoutExtension();
+ sal_Bool bFlowAllowed = !bHtmlMode || pHtmlOpt->IsPrintLayoutExtension();
if(bFlowAllowed)
{
// Einfuegen der vorhandenen Seitenvorlagen in die Listbox
- const USHORT nCount = pShell->GetPageDescCnt();
- USHORT i;
+ const sal_uInt16 nCount = pShell->GetPageDescCnt();
+ sal_uInt16 i;
for( i = 0; i < nCount; ++i)
{
@@ -1648,12 +1648,12 @@ void SwTextFlowPage::Reset( const SfxItemSet& rSet )
aFmtName = SwStyleNameMapper::GetUIName( i, aFmtName ) ))
aPageCollLB.InsertEntry( aFmtName );
- if(SFX_ITEM_SET == rSet.GetItemState( RES_KEEP, FALSE, &pItem ))
+ if(SFX_ITEM_SET == rSet.GetItemState( RES_KEEP, sal_False, &pItem ))
{
aKeepCB.Check( ((const SvxFmtKeepItem*)pItem)->GetValue() );
aKeepCB.SaveValue();
}
- if(SFX_ITEM_SET == rSet.GetItemState( RES_LAYOUT_SPLIT, FALSE, &pItem ))
+ if(SFX_ITEM_SET == rSet.GetItemState( RES_LAYOUT_SPLIT, sal_False, &pItem ))
{
aSplitCB.Check( ((const SwFmtLayoutSplit*)pItem)->GetValue() );
}
@@ -1663,7 +1663,7 @@ void SwTextFlowPage::Reset( const SfxItemSet& rSet )
aSplitCB.SaveValue();
SplitHdl_Impl(&aSplitCB);
- if(SFX_ITEM_SET == rSet.GetItemState( RES_ROW_SPLIT, FALSE, &pItem ))
+ if(SFX_ITEM_SET == rSet.GetItemState( RES_ROW_SPLIT, sal_False, &pItem ))
{
aSplitRowCB.Check( ((const SwFmtRowSplit*)pItem)->GetValue() );
}
@@ -1673,7 +1673,7 @@ void SwTextFlowPage::Reset( const SfxItemSet& rSet )
if(bPageBreak)
{
- if(SFX_ITEM_SET == rSet.GetItemState( RES_PAGEDESC, FALSE, &pItem ))
+ if(SFX_ITEM_SET == rSet.GetItemState( RES_PAGEDESC, sal_False, &pItem ))
{
String sPageDesc;
const SwPageDesc* pDesc = ((const SwFmtPageDesc*)pItem)->GetPageDesc();
@@ -1694,19 +1694,19 @@ void SwTextFlowPage::Reset( const SfxItemSet& rSet )
aPageCollCB.Enable();
aPgBrkCB.Check();
- aPgBrkCB.Check( TRUE );
- aColBrkRB.Check( FALSE );
- aPgBrkBeforeRB.Check( TRUE );
- aPgBrkAfterRB.Check( FALSE );
+ aPgBrkCB.Check( sal_True );
+ aColBrkRB.Check( sal_False );
+ aPgBrkBeforeRB.Check( sal_True );
+ aPgBrkAfterRB.Check( sal_False );
}
else
{
aPageCollLB.SetNoSelection();
- aPageCollCB.Check(FALSE);
+ aPageCollCB.Check(sal_False);
}
}
- if(SFX_ITEM_SET == rSet.GetItemState( RES_BREAK, FALSE, &pItem ))
+ if(SFX_ITEM_SET == rSet.GetItemState( RES_BREAK, sal_False, &pItem ))
{
const SvxFmtBreakItem* pPageBreak = (const SvxFmtBreakItem*)pItem;
SvxBreak eBreak = (SvxBreak)pPageBreak->GetValue();
@@ -1714,36 +1714,36 @@ void SwTextFlowPage::Reset( const SfxItemSet& rSet )
if ( eBreak != SVX_BREAK_NONE )
{
aPgBrkCB.Check();
- aPageCollCB.Enable(FALSE);
- aPageCollLB.Enable(FALSE);
- aPageNoFT.Enable(FALSE);
- aPageNoNF.Enable(FALSE);
+ aPageCollCB.Enable(sal_False);
+ aPageCollLB.Enable(sal_False);
+ aPageNoFT.Enable(sal_False);
+ aPageNoNF.Enable(sal_False);
}
switch ( eBreak )
{
case SVX_BREAK_PAGE_BEFORE:
- aPgBrkRB.Check( TRUE );
- aColBrkRB.Check( FALSE );
- aPgBrkBeforeRB.Check( TRUE );
- aPgBrkAfterRB.Check( FALSE );
+ aPgBrkRB.Check( sal_True );
+ aColBrkRB.Check( sal_False );
+ aPgBrkBeforeRB.Check( sal_True );
+ aPgBrkAfterRB.Check( sal_False );
break;
case SVX_BREAK_PAGE_AFTER:
- aPgBrkRB.Check( TRUE );
- aColBrkRB.Check( FALSE );
- aPgBrkBeforeRB.Check( FALSE );
- aPgBrkAfterRB.Check( TRUE );
+ aPgBrkRB.Check( sal_True );
+ aColBrkRB.Check( sal_False );
+ aPgBrkBeforeRB.Check( sal_False );
+ aPgBrkAfterRB.Check( sal_True );
break;
case SVX_BREAK_COLUMN_BEFORE:
- aPgBrkRB.Check( FALSE );
- aColBrkRB.Check( TRUE );
- aPgBrkBeforeRB.Check( TRUE );
- aPgBrkAfterRB.Check( FALSE );
+ aPgBrkRB.Check( sal_False );
+ aColBrkRB.Check( sal_True );
+ aPgBrkBeforeRB.Check( sal_True );
+ aPgBrkAfterRB.Check( sal_False );
break;
case SVX_BREAK_COLUMN_AFTER:
- aPgBrkRB.Check( FALSE );
- aColBrkRB.Check( TRUE );
- aPgBrkBeforeRB.Check( FALSE );
- aPgBrkAfterRB.Check( TRUE );
+ aPgBrkRB.Check( sal_False );
+ aColBrkRB.Check( sal_True );
+ aPgBrkBeforeRB.Check( sal_False );
+ aPgBrkAfterRB.Check( sal_True );
break;
default:; //prevent warning
}
@@ -1758,20 +1758,20 @@ void SwTextFlowPage::Reset( const SfxItemSet& rSet )
}
else
{
- aPgBrkRB.Enable(FALSE);
- aColBrkRB.Enable(FALSE);
- aPgBrkBeforeRB.Enable(FALSE);
- aPgBrkAfterRB.Enable(FALSE);
- aKeepCB .Enable(FALSE);
- aSplitCB.Enable(FALSE);
- aPgBrkCB.Enable(FALSE);
- aPageCollCB.Enable(FALSE);
- aPageCollLB.Enable(FALSE);
+ aPgBrkRB.Enable(sal_False);
+ aColBrkRB.Enable(sal_False);
+ aPgBrkBeforeRB.Enable(sal_False);
+ aPgBrkAfterRB.Enable(sal_False);
+ aKeepCB .Enable(sal_False);
+ aSplitCB.Enable(sal_False);
+ aPgBrkCB.Enable(sal_False);
+ aPageCollCB.Enable(sal_False);
+ aPageCollLB.Enable(sal_False);
}
- if(SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_TABLE_HEADLINE, FALSE, &pItem ))
+ if(SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_TABLE_HEADLINE, sal_False, &pItem ))
{
- USHORT nRep = ((const SfxUInt16Item*)pItem)->GetValue();
+ sal_uInt16 nRep = ((const SfxUInt16Item*)pItem)->GetValue();
aHeadLineCB.Check( nRep > 0 );
aHeadLineCB.SaveValue();
aRepeatHeaderNF.SetValue( nRep );
@@ -1779,14 +1779,14 @@ void SwTextFlowPage::Reset( const SfxItemSet& rSet )
}
if ( rSet.GetItemState(FN_TABLE_BOX_TEXTDIRECTION) > SFX_ITEM_AVAILABLE )
{
- ULONG nDirection = ((const SvxFrameDirectionItem&)rSet.Get(FN_TABLE_BOX_TEXTDIRECTION)).GetValue();
+ sal_uLong nDirection = ((const SvxFrameDirectionItem&)rSet.Get(FN_TABLE_BOX_TEXTDIRECTION)).GetValue();
aTextDirectionLB.SelectEntryPos(aTextDirectionLB.GetEntryPos( (const void*)nDirection ));
}
if ( rSet.GetItemState(FN_TABLE_SET_VERT_ALIGN) > SFX_ITEM_AVAILABLE )
{
- USHORT nVert = ((const SfxUInt16Item&)rSet.Get(FN_TABLE_SET_VERT_ALIGN)).GetValue();
- USHORT nPos = 0;
+ sal_uInt16 nVert = ((const SfxUInt16Item&)rSet.Get(FN_TABLE_SET_VERT_ALIGN)).GetValue();
+ sal_uInt16 nPos = 0;
switch(nVert)
{
case text::VertOrientation::NONE: nPos = 0; break;
@@ -1819,8 +1819,8 @@ void SwTextFlowPage::SetShell(SwWrtShell* pSh)
bHtmlMode = 0 != (::GetHtmlMode(pShell->GetView().GetDocShell()) & HTMLMODE_ON);
if(bHtmlMode)
{
- aPageNoNF.Enable(FALSE);
- aPageNoFT.Enable(FALSE);
+ aPageNoNF.Enable(sal_False);
+ aPageNoFT.Enable(sal_False);
}
}
@@ -1839,7 +1839,7 @@ IMPL_LINK( SwTextFlowPage, PageBreakHdl_Impl, CheckBox*, EMPTYARG )
{
aPageCollCB.Enable();
- BOOL bEnable = aPageCollCB.IsChecked() &&
+ sal_Bool bEnable = aPageCollCB.IsChecked() &&
aPageCollLB.GetEntryCount();
aPageCollLB.Enable(bEnable);
if(!bHtmlMode)
@@ -1851,15 +1851,15 @@ IMPL_LINK( SwTextFlowPage, PageBreakHdl_Impl, CheckBox*, EMPTYARG )
}
else
{
- aPageCollCB.Check( FALSE );
- aPageCollCB.Enable(FALSE);
- aPageCollLB.Enable(FALSE);
- aPageNoFT.Enable(FALSE);
- aPageNoNF.Enable(FALSE);
- aPgBrkRB. Enable(FALSE);
- aColBrkRB. Enable(FALSE);
- aPgBrkBeforeRB. Enable(FALSE);
- aPgBrkAfterRB. Enable(FALSE);
+ aPageCollCB.Check( sal_False );
+ aPageCollCB.Enable(sal_False);
+ aPageCollLB.Enable(sal_False);
+ aPageNoFT.Enable(sal_False);
+ aPageNoNF.Enable(sal_False);
+ aPgBrkRB. Enable(sal_False);
+ aColBrkRB. Enable(sal_False);
+ aPgBrkBeforeRB. Enable(sal_False);
+ aPgBrkAfterRB. Enable(sal_False);
}
return 0;
}
@@ -1868,11 +1868,11 @@ IMPL_LINK( SwTextFlowPage, PageBreakHdl_Impl, CheckBox*, EMPTYARG )
--------------------------------------------------*/
IMPL_LINK( SwTextFlowPage, ApplyCollClickHdl_Impl, CheckBox*, EMPTYARG )
{
- BOOL bEnable = FALSE;
+ sal_Bool bEnable = sal_False;
if ( aPageCollCB.IsChecked() &&
aPageCollLB.GetEntryCount() )
{
- bEnable = TRUE;
+ bEnable = sal_True;
aPageCollLB.SelectEntryPos( 0 );
}
else
@@ -1898,7 +1898,7 @@ IMPL_LINK( SwTextFlowPage, PageBreakPosHdl_Impl, RadioButton*, pBtn )
{
aPageCollCB.Enable();
- BOOL bEnable = aPageCollCB.IsChecked() &&
+ sal_Bool bEnable = aPageCollCB.IsChecked() &&
aPageCollLB.GetEntryCount();
aPageCollLB.Enable(bEnable);
@@ -1910,11 +1910,11 @@ IMPL_LINK( SwTextFlowPage, PageBreakPosHdl_Impl, RadioButton*, pBtn )
}
else if ( pBtn == &aPgBrkAfterRB )
{
- aPageCollCB .Check( FALSE );
- aPageCollCB .Enable(FALSE);
- aPageCollLB .Enable(FALSE);
- aPageNoFT .Enable(FALSE);
- aPageNoNF .Enable(FALSE);
+ aPageCollCB .Check( sal_False );
+ aPageCollCB .Enable(sal_False);
+ aPageCollLB .Enable(sal_False);
+ aPageNoFT .Enable(sal_False);
+ aPageNoNF .Enable(sal_False);
}
}
return 0;
@@ -1926,11 +1926,11 @@ IMPL_LINK( SwTextFlowPage, PageBreakTypeHdl_Impl, RadioButton*, pBtn )
{
if ( pBtn == &aColBrkRB || aPgBrkAfterRB.IsChecked() )
{
- aPageCollCB .Check(FALSE);
- aPageCollCB .Enable(FALSE);
- aPageCollLB .Enable(FALSE);
- aPageNoFT .Enable(FALSE);
- aPageNoNF .Enable(FALSE);
+ aPageCollCB .Check(sal_False);
+ aPageCollCB .Enable(sal_False);
+ aPageCollLB .Enable(sal_False);
+ aPageNoFT .Enable(sal_False);
+ aPageNoNF .Enable(sal_False);
}
else if ( aPgBrkBeforeRB.IsChecked() )
PageBreakPosHdl_Impl( &aPgBrkBeforeRB );
@@ -1949,7 +1949,7 @@ IMPL_LINK( SwTextFlowPage, SplitHdl_Impl, CheckBox*, pBox )
* --------------------------------------------------*/
IMPL_LINK( SwTextFlowPage, SplitRowHdl_Impl, TriStateBox*, pBox )
{
- pBox->EnableTriState(FALSE);
+ pBox->EnableTriState(sal_False);
return 0;
}
@@ -1965,7 +1965,7 @@ IMPL_LINK( SwTextFlowPage, HeadLineCBClickHdl, void*, EMPTYARG )
--------------------------------------------------*/
void SwTextFlowPage::DisablePageBreak()
{
- bPageBreak = FALSE;
+ bPageBreak = sal_False;
aPgBrkCB .Disable();
aPgBrkRB .Disable();
aColBrkRB .Disable();
diff --git a/sw/source/ui/table/tablemgr.cxx b/sw/source/ui/table/tablemgr.cxx
index 16958e3fc1..7ba9a89783 100644
--- a/sw/source/ui/table/tablemgr.cxx
+++ b/sw/source/ui/table/tablemgr.cxx
@@ -79,7 +79,7 @@ void SwTableFUNC::ColWidthDlg( Window *pParent )
--------------------------------------------------------------------*/
-SwTwips SwTableFUNC::GetColWidth(USHORT nNum) const
+SwTwips SwTableFUNC::GetColWidth(sal_uInt16 nNum) const
{
SwTwips nWidth = 0;
@@ -95,10 +95,10 @@ SwTwips SwTableFUNC::GetColWidth(USHORT nNum) const
else
{
SwTwips nRValid = nNum < GetColCount() ?
- aCols[(USHORT)GetRightSeparator((int)nNum)]:
+ aCols[(sal_uInt16)GetRightSeparator((int)nNum)]:
aCols.GetRight();
SwTwips nLValid = nNum ?
- aCols[(USHORT)GetRightSeparator((int)nNum - 1)]:
+ aCols[(sal_uInt16)GetRightSeparator((int)nNum - 1)]:
aCols.GetLeft();
nWidth = nRValid - nLValid;
}
@@ -111,7 +111,7 @@ SwTwips SwTableFUNC::GetColWidth(USHORT nNum) const
-SwTwips SwTableFUNC::GetMaxColWidth( USHORT nNum ) const
+SwTwips SwTableFUNC::GetMaxColWidth( sal_uInt16 nNum ) const
{
ASSERT(nNum <= aCols.Count(), "Index out of Area");
@@ -133,35 +133,35 @@ SwTwips SwTableFUNC::GetMaxColWidth( USHORT nNum ) const
-void SwTableFUNC::SetColWidth(USHORT nNum, SwTwips nNewWidth )
+void SwTableFUNC::SetColWidth(sal_uInt16 nNum, SwTwips nNewWidth )
{
// aktuelle Breite setzen
// alle folgenden Verschieben
- BOOL bCurrentOnly = FALSE;
+ sal_Bool bCurrentOnly = sal_False;
SwTwips nWidth = 0;
if ( aCols.Count() > 0 )
{
if(aCols.Count() != GetColCount())
- bCurrentOnly = TRUE;
+ bCurrentOnly = sal_True;
nWidth = GetColWidth(nNum);
int nDiff = (int)(nNewWidth - nWidth);
if( !nNum )
- aCols[ static_cast< USHORT >(GetRightSeparator(0)) ] += nDiff;
+ aCols[ static_cast< sal_uInt16 >(GetRightSeparator(0)) ] += nDiff;
else if( nNum < GetColCount() )
{
if(nDiff < GetColWidth(nNum + 1) - MINLAY)
- aCols[ static_cast< USHORT >(GetRightSeparator(nNum)) ] += nDiff;
+ aCols[ static_cast< sal_uInt16 >(GetRightSeparator(nNum)) ] += nDiff;
else
{
int nDiffLeft = nDiff - (int)GetColWidth(nNum + 1) + (int)MINLAY;
- aCols[ static_cast< USHORT >(GetRightSeparator(nNum)) ] += (nDiff - nDiffLeft);
- aCols[ static_cast< USHORT >(GetRightSeparator(nNum - 1)) ] -= nDiffLeft;
+ aCols[ static_cast< sal_uInt16 >(GetRightSeparator(nNum)) ] += (nDiff - nDiffLeft);
+ aCols[ static_cast< sal_uInt16 >(GetRightSeparator(nNum - 1)) ] -= nDiffLeft;
}
}
else
- aCols[ static_cast< USHORT >(GetRightSeparator(nNum-1)) ] -= nDiff;
+ aCols[ static_cast< sal_uInt16 >(GetRightSeparator(nNum-1)) ] -= nDiff;
}
else
aCols.SetRight( Min( nNewWidth, aCols.GetRightMax()) );
@@ -183,7 +183,7 @@ void SwTableFUNC::InitTabCols()
-SwTableFUNC::SwTableFUNC(SwWrtShell *pShell, BOOL bCopyFmt)
+SwTableFUNC::SwTableFUNC(SwWrtShell *pShell, sal_Bool bCopyFmt)
: pFmt(pShell->GetTableFmt()),
pSh(pShell),
bCopy(bCopyFmt)
@@ -230,11 +230,11 @@ uno::Reference< frame::XModel > SwTableFUNC::InsertChart(
aName = pSh->GetTableFmt()->GetName();
// insert node before table
pSh->MoveTable( fnTableCurr, fnTableStart );
- pSh->Up( FALSE, 1, FALSE );
+ pSh->Up( sal_False, 1, sal_False );
if ( pSh->IsCrsrInTbl() )
{
if ( aName != pSh->GetTableFmt()->GetName() )
- pSh->Down( FALSE, 1, FALSE ); // two adjacent tables
+ pSh->Down( sal_False, 1, sal_False ); // two adjacent tables
}
pSh->SplitNode();
}
@@ -275,7 +275,7 @@ uno::Reference< frame::XModel > SwTableFUNC::InsertChart(
if ( !pClient )
{
pClient = new SwOleClient( &pSh->GetView(), &pSh->GetView().GetEditWin(), aEmbObjRef );
- pSh->SetCheckForOLEInCaption( TRUE );
+ pSh->SetCheckForOLEInCaption( sal_True );
}
pSh->CalcAndSetScale( aEmbObjRef );
//#50270# Error brauchen wir nicht handeln, das erledigt das
@@ -341,11 +341,11 @@ uno::Reference< frame::XModel > SwTableFUNC::InsertChart(
return xChartModel;
}
-USHORT SwTableFUNC::GetCurColNum() const
+sal_uInt16 SwTableFUNC::GetCurColNum() const
{
- USHORT nPos = pSh->GetCurTabColNum();
- USHORT nCount = 0;
- for(USHORT i = 0; i < nPos; i++ )
+ sal_uInt16 nPos = pSh->GetCurTabColNum();
+ sal_uInt16 nCount = 0;
+ for(sal_uInt16 i = 0; i < nPos; i++ )
if(aCols.IsHidden(i))
nCount ++;
return nPos - nCount;
@@ -354,10 +354,10 @@ USHORT SwTableFUNC::GetCurColNum() const
-USHORT SwTableFUNC::GetColCount() const
+sal_uInt16 SwTableFUNC::GetColCount() const
{
- USHORT nCount = 0;
- for(USHORT i = 0; i < aCols.Count(); i++ )
+ sal_uInt16 nCount = 0;
+ for(sal_uInt16 i = 0; i < aCols.Count(); i++ )
if(aCols.IsHidden(i))
nCount ++;
return aCols.Count() - nCount;
@@ -371,7 +371,7 @@ int SwTableFUNC::GetRightSeparator(int nNum) const
int i = 0;
while( nNum >= 0 )
{
- if( !aCols.IsHidden( static_cast< USHORT >(i)) )
+ if( !aCols.IsHidden( static_cast< sal_uInt16 >(i)) )
nNum--;
i++;
}
diff --git a/sw/source/ui/table/tablepg.hxx b/sw/source/ui/table/tablepg.hxx
index ea40fec677..ea200094c6 100644
--- a/sw/source/ui/table/tablepg.hxx
+++ b/sw/source/ui/table/tablepg.hxx
@@ -47,7 +47,7 @@ class SwTableRep;
struct TColumn
{
SwTwips nWidth;
- BOOL bVisible;
+ sal_Bool bVisible;
};
class SwFormatTablePage : public SfxTabPage
@@ -84,10 +84,10 @@ class SwFormatTablePage : public SfxTabPage
SwTableRep* pTblData;
SwTwips nSaveWidth;
SwTwips nMinTableWidth;
- USHORT nOldAlign;
- BOOL bModified;
- BOOL bFull:1;
- BOOL bHtmlMode : 1;
+ sal_uInt16 nOldAlign;
+ sal_Bool bModified;
+ sal_Bool bFull:1;
+ sal_Bool bHtmlMode : 1;
void Init();
void ModifyHdl( Edit* pEdit );
@@ -104,7 +104,7 @@ public:
SwFormatTablePage( Window* pParent, const SfxItemSet& rSet );
static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet);
- virtual BOOL FillItemSet( SfxItemSet& rSet );
+ virtual sal_Bool FillItemSet( SfxItemSet& rSet );
virtual void Reset( const SfxItemSet& rSet );
virtual void ActivatePage( const SfxItemSet& rSet );
virtual int DeactivatePage( SfxItemSet* pSet = 0 );
@@ -143,24 +143,24 @@ class SwTableColumnPage : public SfxTabPage
FixedText* pTextArr[MET_FIELDS];
SwTwips nTableWidth;
SwTwips nMinWidth;
- USHORT nNoOfCols;
- USHORT nNoOfVisibleCols;
+ sal_uInt16 nNoOfCols;
+ sal_uInt16 nNoOfVisibleCols;
//Breite merken, wenn auf autom. Ausrichtung gestellt wird
- USHORT aValueTbl[MET_FIELDS];//primaere Zuordnung der MetricFields
- BOOL bModified:1;
- BOOL bModifyTbl:1;
- BOOL bPercentMode:1;
+ sal_uInt16 aValueTbl[MET_FIELDS];//primaere Zuordnung der MetricFields
+ sal_Bool bModified:1;
+ sal_Bool bModifyTbl:1;
+ sal_Bool bPercentMode:1;
- void Init(BOOL bWeb);
+ void Init(sal_Bool bWeb);
DECL_LINK( AutoClickHdl, CheckBox * );
void ModifyHdl( PercentField* pEdit );
DECL_LINK( UpHdl, PercentField * );
DECL_LINK( DownHdl, PercentField * );
DECL_LINK( LoseFocusHdl, PercentField * );
DECL_LINK( ModeHdl, CheckBox * );
- void UpdateCols( USHORT nAktPos );
- SwTwips GetVisibleWidth(USHORT nPos);
- void SetVisibleWidth(USHORT nPos, SwTwips nNewWidth);
+ void UpdateCols( sal_uInt16 nAktPos );
+ SwTwips GetVisibleWidth(sal_uInt16 nPos);
+ void SetVisibleWidth(sal_uInt16 nPos, SwTwips nNewWidth);
using TabPage::ActivatePage;
using TabPage::DeactivatePage;
@@ -170,7 +170,7 @@ public:
~SwTableColumnPage();
static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet);
- virtual BOOL FillItemSet( SfxItemSet& rSet );
+ virtual sal_Bool FillItemSet( SfxItemSet& rSet );
virtual void Reset( const SfxItemSet& rSet );
virtual void ActivatePage( const SfxItemSet& rSet );
virtual int DeactivatePage( SfxItemSet* pSet = 0 );
@@ -210,8 +210,8 @@ class SwTextFlowPage : public SfxTabPage
SwWrtShell* pShell;
- BOOL bPageBreak;
- BOOL bHtmlMode;
+ sal_Bool bPageBreak;
+ sal_Bool bHtmlMode;
DECL_LINK( PageBreakHdl_Impl, CheckBox* );
@@ -228,7 +228,7 @@ class SwTextFlowPage : public SfxTabPage
public:
static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet);
- virtual BOOL FillItemSet( SfxItemSet& rSet );
+ virtual sal_Bool FillItemSet( SfxItemSet& rSet );
virtual void Reset( const SfxItemSet& rSet );
void SetShell(SwWrtShell* pSh);
diff --git a/sw/source/ui/table/tautofmt.cxx b/sw/source/ui/table/tautofmt.cxx
index a0a2f1c41e..e9665532f1 100644
--- a/sw/source/ui/table/tautofmt.cxx
+++ b/sw/source/ui/table/tautofmt.cxx
@@ -86,7 +86,7 @@ private:
VirtualDevice aVD;
SvtScriptedTextHelper aScriptedText;
svx::frame::Array maArray; /// Implementation to draw the frame borders.
- BOOL bFitWidth;
+ sal_Bool bFitWidth;
bool mbRTL;
Size aPrvSize;
long nLabelColWidth;
@@ -108,19 +108,19 @@ private:
//-------------------------------------------
void Init ();
void DoPaint ( const Rectangle& rRect );
- void CalcCellArray ( BOOL bFitWidth );
+ void CalcCellArray ( sal_Bool bFitWidth );
void CalcLineMap ();
void PaintCells ();
- BYTE GetFormatIndex( size_t nCol, size_t nRow ) const;
+ sal_uInt8 GetFormatIndex( size_t nCol, size_t nRow ) const;
const SvxBoxItem& GetBoxItem( size_t nCol, size_t nRow ) const;
void DrawString( size_t nCol, size_t nRow );
void DrawStrings();
void DrawBackground();
- void MakeFonts ( BYTE nIndex, Font& rFont, Font& rCJKFont, Font& rCTLFont );
- String MakeNumberString( String cellString, BOOL bAddDec );
+ void MakeFonts ( sal_uInt8 nIndex, Font& rFont, Font& rCJKFont, Font& rCTLFont );
+ String MakeNumberString( String cellString, sal_Bool bAddDec );
};
//========================================================================
@@ -179,7 +179,7 @@ __EXPORT SwStringInputDlg::~SwStringInputDlg()
SwAutoFormatDlg::SwAutoFormatDlg( Window* pParent, SwWrtShell* pWrtShell,
- BOOL bSetAutoFormat, const SwTableAutoFmt* pSelFmt )
+ sal_Bool bSetAutoFormat, const SwTableAutoFmt* pSelFmt )
: SfxModalDialog( pParent, SW_RES( DLG_AUTOFMT_TABLE ) ),
//
aFlFormat ( this, SW_RES( FL_FORMAT ) ),
@@ -210,7 +210,7 @@ SwAutoFormatDlg::SwAutoFormatDlg( Window* pParent, SwWrtShell* pWrtShell,
pShell ( pWrtShell ),
nIndex ( 0 ),
nDfltStylePos ( 0 ),
- bCoreDataChanged( FALSE ),
+ bCoreDataChanged( sal_False ),
bSetAutoFmt ( bSetAutoFormat )
{
pTableTbl = new SwTableAutoFmtTbl;
@@ -270,7 +270,7 @@ void SwAutoFormatDlg::Init( const SwTableAutoFmt* pSelFmt )
nIndex = 255;
}
- for( BYTE i = 0, nCount = (BYTE)pTableTbl->Count(); i < nCount; i++ )
+ for( sal_uInt8 i = 0, nCount = (sal_uInt8)pTableTbl->Count(); i < nCount; i++ )
{
SwTableAutoFmt* pFmt = (*pTableTbl)[ i ];
aLbFormat.InsertEntry( pFmt->GetName() );
@@ -285,7 +285,7 @@ void SwAutoFormatDlg::Init( const SwTableAutoFmt* pSelFmt )
//------------------------------------------------------------------------
-void SwAutoFormatDlg::UpdateChecks( const SwTableAutoFmt& rFmt, BOOL bEnable )
+void SwAutoFormatDlg::UpdateChecks( const SwTableAutoFmt& rFmt, sal_Bool bEnable )
{
aBtnNumFormat.Enable( bEnable );
aBtnNumFormat.Check( rFmt.IsValueFormat() );
@@ -325,7 +325,7 @@ void SwAutoFormatDlg::FillAutoFmtOfIndex( SwTableAutoFmt*& rToFill ) const
IMPL_LINK( SwAutoFormatDlg, CheckHdl, Button *, pBtn )
{
SwTableAutoFmtPtr pData = (*pTableTbl)[nIndex];
- BOOL bCheck = ((CheckBox*)pBtn)->IsChecked(), bDataChgd = TRUE;
+ sal_Bool bCheck = ((CheckBox*)pBtn)->IsChecked(), bDataChgd = sal_True;
if( pBtn == &aBtnNumFormat )
pData->SetValueFormat( bCheck );
@@ -340,14 +340,14 @@ IMPL_LINK( SwAutoFormatDlg, CheckHdl, Button *, pBtn )
// else if ( pBtn == &aBtnAdjust )
// pData->SetIncludeWidthHeight( bCheck );
else
- bDataChgd = FALSE;
+ bDataChgd = sal_False;
if( bDataChgd )
{
if( !bCoreDataChanged )
{
aBtnCancel.SetText( aStrClose );
- bCoreDataChanged = TRUE;
+ bCoreDataChanged = sal_True;
}
pWndPreview->NotifyChange( *pData );
@@ -360,7 +360,7 @@ IMPL_LINK( SwAutoFormatDlg, CheckHdl, Button *, pBtn )
IMPL_LINK( SwAutoFormatDlg, AddHdl, void *, EMPTYARG )
{
- BOOL bOk = FALSE, bFmtInserted = FALSE;
+ sal_Bool bOk = sal_False, bFmtInserted = sal_False;
while( !bOk )
{
SwStringInputDlg* pDlg = new SwStringInputDlg( this,
@@ -374,7 +374,7 @@ IMPL_LINK( SwAutoFormatDlg, AddHdl, void *, EMPTYARG )
if( aFormatName.Len() > 0 )
{
- USHORT n;
+ sal_uInt16 n;
for( n = 0; n < pTableTbl->Count(); ++n )
if( (*pTableTbl)[n]->GetName() == aFormatName )
break;
@@ -395,16 +395,16 @@ IMPL_LINK( SwAutoFormatDlg, AddHdl, void *, EMPTYARG )
pTableTbl->Insert( pNewData, n );
aLbFormat.InsertEntry( aFormatName, nDfltStylePos + n );
aLbFormat.SelectEntryPos( nDfltStylePos + n );
- bFmtInserted = TRUE;
- aBtnAdd.Enable( FALSE );
+ bFmtInserted = sal_True;
+ aBtnAdd.Enable( sal_False );
if ( !bCoreDataChanged )
{
aBtnCancel.SetText( aStrClose );
- bCoreDataChanged = TRUE;
+ bCoreDataChanged = sal_True;
}
SelFmtHdl( 0 );
- bOk = TRUE;
+ bOk = sal_True;
}
}
@@ -417,7 +417,7 @@ IMPL_LINK( SwAutoFormatDlg, AddHdl, void *, EMPTYARG )
}
}
else
- bOk = TRUE;
+ bOk = sal_True;
delete pDlg;
}
return 0;
@@ -445,14 +445,14 @@ IMPL_LINK( SwAutoFormatDlg, RemoveHdl, void *, EMPTYARG )
if( !nIndex )
{
- aBtnRemove.Enable(FALSE);
- aBtnRename.Enable(FALSE);
+ aBtnRemove.Enable(sal_False);
+ aBtnRename.Enable(sal_False);
}
if( !bCoreDataChanged )
{
aBtnCancel.SetText( aStrClose );
- bCoreDataChanged = TRUE;
+ bCoreDataChanged = sal_True;
}
}
delete pBox;
@@ -464,7 +464,7 @@ IMPL_LINK( SwAutoFormatDlg, RemoveHdl, void *, EMPTYARG )
IMPL_LINK( SwAutoFormatDlg, RenameHdl, void *, EMPTYARG )
{
- BOOL bOk = FALSE;
+ sal_Bool bOk = sal_False;
while( !bOk )
{
SwStringInputDlg* pDlg = new SwStringInputDlg( this,
@@ -472,13 +472,13 @@ IMPL_LINK( SwAutoFormatDlg, RenameHdl, void *, EMPTYARG )
aEmptyStr );
if( pDlg->Execute() == RET_OK )
{
- BOOL bFmtRenamed = FALSE;
+ sal_Bool bFmtRenamed = sal_False;
String aFormatName;
pDlg->GetInputString( aFormatName );
if ( aFormatName.Len() > 0 )
{
- USHORT n;
+ sal_uInt16 n;
for( n = 0; n < pTableTbl->Count(); ++n )
if ((*pTableTbl)[n]->GetName() == aFormatName)
break;
@@ -506,12 +506,12 @@ IMPL_LINK( SwAutoFormatDlg, RenameHdl, void *, EMPTYARG )
if ( !bCoreDataChanged )
{
aBtnCancel.SetText( aStrClose );
- bCoreDataChanged = TRUE;
+ bCoreDataChanged = sal_True;
}
SelFmtHdl( 0 );
- bOk = TRUE;
- bFmtRenamed = TRUE;
+ bOk = sal_True;
+ bFmtRenamed = sal_True;
}
}
@@ -524,7 +524,7 @@ IMPL_LINK( SwAutoFormatDlg, RenameHdl, void *, EMPTYARG )
}
}
else
- bOk = TRUE;
+ bOk = sal_True;
delete pDlg;
}
return 0;
@@ -534,30 +534,30 @@ IMPL_LINK( SwAutoFormatDlg, RenameHdl, void *, EMPTYARG )
IMPL_LINK( SwAutoFormatDlg, SelFmtHdl, void *, EMPTYARG )
{
- BOOL bBtnEnable = FALSE;
- BYTE nSelPos = (BYTE) aLbFormat.GetSelectEntryPos(), nOldIdx = nIndex;
+ sal_Bool bBtnEnable = sal_False;
+ sal_uInt8 nSelPos = (sal_uInt8) aLbFormat.GetSelectEntryPos(), nOldIdx = nIndex;
if( nSelPos >= nDfltStylePos )
{
nIndex = nSelPos - nDfltStylePos;
pWndPreview->NotifyChange( *(*pTableTbl)[nIndex] );
bBtnEnable = 0 != nIndex;
- UpdateChecks( *(*pTableTbl)[nIndex], TRUE );
+ UpdateChecks( *(*pTableTbl)[nIndex], sal_True );
}
else
{
nIndex = 255;
SwTableAutoFmt aTmp( ViewShell::GetShellRes()->aStrNone );
- aTmp.SetFont( FALSE );
- aTmp.SetJustify( FALSE );
- aTmp.SetFrame( FALSE );
- aTmp.SetBackground( FALSE );
- aTmp.SetValueFormat( FALSE );
- aTmp.SetWidthHeight( FALSE );
+ aTmp.SetFont( sal_False );
+ aTmp.SetJustify( sal_False );
+ aTmp.SetFrame( sal_False );
+ aTmp.SetBackground( sal_False );
+ aTmp.SetValueFormat( sal_False );
+ aTmp.SetWidthHeight( sal_False );
if( nOldIdx != nIndex )
pWndPreview->NotifyChange( aTmp );
- UpdateChecks( aTmp, FALSE );
+ UpdateChecks( aTmp, sal_False );
}
aBtnRemove.Enable( bBtnEnable );
@@ -572,7 +572,7 @@ IMPL_LINK_INLINE_START( SwAutoFormatDlg, OkHdl, Button *, EMPTYARG )
if( bSetAutoFmt )
pShell->SetTableAutoFmt( *(*pTableTbl)[ nIndex ] );
EndDialog( RET_OK );
- return TRUE;
+ return sal_True;
}
IMPL_LINK_INLINE_END( SwAutoFormatDlg, OkHdl, Button *, EMPTYARG )
@@ -587,7 +587,7 @@ AutoFmtPreview::AutoFmtPreview( Window* pParent, const ResId& rRes, SwWrtShell*
aCurData ( aEmptyStr ),
aVD ( *this ),
aScriptedText ( aVD ),
- bFitWidth ( FALSE ),
+ bFitWidth ( sal_False ),
mbRTL ( false ),
aPrvSize ( GetSizePixel().Width() - 6, GetSizePixel().Height() - 30 ),
nLabelColWidth ( (aPrvSize.Width() - 4) / 4 - 12 ),
@@ -650,7 +650,7 @@ rFont.MethodName( Value ); \
rCJKFont.MethodName( Value ); \
rCTLFont.MethodName( Value );
-void AutoFmtPreview::MakeFonts( BYTE nIndex, Font& rFont, Font& rCJKFont, Font& rCTLFont )
+void AutoFmtPreview::MakeFonts( sal_uInt8 nIndex, Font& rFont, Font& rCJKFont, Font& rCTLFont )
{
const SwBoxAutoFmt& rBoxFmt = aCurData.GetBoxFmt( nIndex );
@@ -668,14 +668,14 @@ void AutoFmtPreview::MakeFonts( BYTE nIndex, Font& rFont, Font& rCJKFont, Font&
SETONALLFONTS( SetShadow, rBoxFmt.GetShadowed().GetValue() );
SETONALLFONTS( SetColor, rBoxFmt.GetColor().GetValue() );
SETONALLFONTS( SetSize, aFontSize );
- SETONALLFONTS( SetTransparent, TRUE );
+ SETONALLFONTS( SetTransparent, sal_True );
}
//------------------------------------------------------------------------
-BYTE AutoFmtPreview::GetFormatIndex( size_t nCol, size_t nRow ) const
+sal_uInt8 AutoFmtPreview::GetFormatIndex( size_t nCol, size_t nRow ) const
{
- static const BYTE pnFmtMap[] =
+ static const sal_uInt8 pnFmtMap[] =
{
0, 1, 2, 1, 3,
4, 5, 6, 5, 7,
@@ -698,10 +698,10 @@ void AutoFmtPreview::DrawString( size_t nCol, size_t nRow )
//------------------------
// Ausgabe des Zelltextes:
//------------------------
- ULONG nNum;
+ sal_uLong nNum;
double nVal;
String cellString;
- BYTE nIndex = static_cast< BYTE >( maArray.GetCellIndex( nCol, nRow, mbRTL ) );
+ sal_uInt8 nIndex = static_cast< sal_uInt8 >( maArray.GetCellIndex( nCol, nRow, mbRTL ) );
switch( nIndex )
{
@@ -741,10 +741,10 @@ MAKENUMSTR:
if( aCurData.IsValueFormat() )
{
String sFmt; LanguageType eLng, eSys;
- aCurData.GetBoxFmt( (BYTE)nNum ).GetValueFormat( sFmt, eLng, eSys );
+ aCurData.GetBoxFmt( (sal_uInt8)nNum ).GetValueFormat( sFmt, eLng, eSys );
short nType;
- BOOL bNew;
+ sal_Bool bNew;
xub_StrLen nCheckPos;
sal_uInt32 nKey = pNumFmt->GetIndexPuttingAndConverting( sFmt, eLng,
eSys, nType, bNew, nCheckPos);
@@ -760,11 +760,11 @@ MAKENUMSTR:
if( cellString.Len() )
{
Size aStrSize;
- BYTE nFmtIndex = GetFormatIndex( nCol, nRow );
+ sal_uInt8 nFmtIndex = GetFormatIndex( nCol, nRow );
Rectangle cellRect = maArray.GetCellRect( nCol, nRow );
Point aPos = cellRect.TopLeft();
- USHORT nRightX = 0;
-// BOOL bJustify = aCurData.IsJustify();
+ sal_uInt16 nRightX = 0;
+// sal_Bool bJustify = aCurData.IsJustify();
// ScHorJustifyAttr aHorJustifyItem;
// CellHorJustify eJustification;
@@ -803,7 +803,7 @@ MAKENUMSTR:
aStrSize = aScriptedText.GetTextSize();
}
- nRightX = (USHORT)( cellRect.GetWidth()
+ nRightX = (sal_uInt16)( cellRect.GetWidth()
- aStrSize.Width()
- FRAME_OFFSET );
//-------------
@@ -822,7 +822,7 @@ MAKENUMSTR:
//-----------------------------
// vertikal (immer zentrieren):
//-----------------------------
- aPos.Y() += (nRowHeight - (USHORT)aStrSize.Height()) / 2;
+ aPos.Y() += (nRowHeight - (sal_uInt16)aStrSize.Height()) / 2;
//-----------
// horizontal
@@ -832,7 +832,7 @@ MAKENUMSTR:
aPos.X() += nRightX;
else if (aCurData.IsJustify())
{
- USHORT nHorPos = (USHORT)
+ sal_uInt16 nHorPos = (sal_uInt16)
((cellRect.GetWidth()-aStrSize.Width())/2);
const SvxAdjustItem& rAdj = aCurData.GetBoxFmt(nFmtIndex).GetAdjust();
switch ( rAdj.GetAdjust() )
@@ -927,14 +927,14 @@ void __EXPORT AutoFmtPreview::Init()
SetBorderStyle( GetBorderStyle() | WINDOW_BORDER_MONO );
maArray.Initialize( 5, 5 );
maArray.SetUseDiagDoubleClipping( false );
- CalcCellArray( FALSE );
+ CalcCellArray( sal_False );
CalcLineMap();
}
//------------------------------------------------------------------------
-void AutoFmtPreview::CalcCellArray( BOOL _bFitWidth )
+void AutoFmtPreview::CalcCellArray( sal_Bool _bFitWidth )
{
maArray.SetXOffset( 2 );
maArray.SetAllColWidths( _bFitWidth ? nDataColWidth2 : nDataColWidth1 );
@@ -988,7 +988,7 @@ void AutoFmtPreview::CalcLineMap()
void AutoFmtPreview::NotifyChange( const SwTableAutoFmt& rNewData )
{
aCurData = rNewData;
- bFitWidth = aCurData.IsJustify();//TRUE; //???
+ bFitWidth = aCurData.IsJustify();//sal_True; //???
CalcCellArray( bFitWidth );
CalcLineMap();
DoPaint( Rectangle( Point(0,0), GetSizePixel() ) );
@@ -1012,7 +1012,7 @@ void AutoFmtPreview::DoPaint( const Rectangle& /*rRect*/ )
Font aFont;
aFont = aVD.GetFont();
- aFont.SetTransparent( TRUE );
+ aFont.SetTransparent( sal_True );
aVD.SetFont ( aFont );
aVD.SetLineColor ();
diff --git a/sw/source/ui/uiview/formatclipboard.cxx b/sw/source/ui/uiview/formatclipboard.cxx
index 64ae4a42e4..2cfeb7305c 100644
--- a/sw/source/ui/uiview/formatclipboard.cxx
+++ b/sw/source/ui/uiview/formatclipboard.cxx
@@ -202,13 +202,13 @@ void lcl_getTableAttributes( SfxItemSet& rSet, SwWrtShell &rSh )
void lcl_setTableAttributes( const SfxItemSet& rSet, SwWrtShell &rSh )
{
const SfxPoolItem* pItem = 0;
- BOOL bBorder = ( SFX_ITEM_SET == rSet.GetItemState( RES_BOX ) ||
+ sal_Bool bBorder = ( SFX_ITEM_SET == rSet.GetItemState( RES_BOX ) ||
SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_BORDER_INNER ) );
pItem = 0;
- BOOL bBackground = SFX_ITEM_SET == rSet.GetItemState( RES_BACKGROUND, FALSE, &pItem );
+ sal_Bool bBackground = SFX_ITEM_SET == rSet.GetItemState( RES_BACKGROUND, sal_False, &pItem );
const SfxPoolItem* pRowItem = 0, *pTableItem = 0;
- bBackground |= SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_BRUSH_ROW, FALSE, &pRowItem );
- bBackground |= SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_BRUSH_TABLE, FALSE, &pTableItem );
+ bBackground |= SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_BRUSH_ROW, sal_False, &pRowItem );
+ bBackground |= SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_BRUSH_TABLE, sal_False, &pTableItem );
if(bBackground)
{
@@ -230,7 +230,7 @@ void lcl_setTableAttributes( const SfxItemSet& rSet, SwWrtShell &rSh )
if(bBorder)
rSh.SetTabBorders( rSet );
- if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_TABLE_HEADLINE, FALSE, &pItem) )
+ if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_TABLE_HEADLINE, sal_False, &pItem) )
rSh.SetRowsToRepeat( ((SfxUInt16Item*)pItem)->GetValue() );
SwFrmFmt* pFrmFmt = rSh.GetTableFmt();
@@ -238,57 +238,57 @@ void lcl_setTableAttributes( const SfxItemSet& rSet, SwWrtShell &rSh )
{
//RES_SHADOW
pItem=0;
- rSet.GetItemState(rSet.GetPool()->GetWhich(RES_SHADOW), FALSE, &pItem);
+ rSet.GetItemState(rSet.GetPool()->GetWhich(RES_SHADOW), sal_False, &pItem);
if(pItem)
pFrmFmt->SetFmtAttr( *pItem );
//RES_BREAK
pItem=0;
- rSet.GetItemState(rSet.GetPool()->GetWhich(RES_BREAK), FALSE, &pItem);
+ rSet.GetItemState(rSet.GetPool()->GetWhich(RES_BREAK), sal_False, &pItem);
if(pItem)
pFrmFmt->SetFmtAttr( *pItem );
//RES_PAGEDESC
pItem=0;
- rSet.GetItemState(rSet.GetPool()->GetWhich(RES_PAGEDESC), FALSE, &pItem);
+ rSet.GetItemState(rSet.GetPool()->GetWhich(RES_PAGEDESC), sal_False, &pItem);
if(pItem)
pFrmFmt->SetFmtAttr( *pItem );
//RES_LAYOUT_SPLIT
pItem=0;
- rSet.GetItemState(rSet.GetPool()->GetWhich(RES_LAYOUT_SPLIT), FALSE, &pItem);
+ rSet.GetItemState(rSet.GetPool()->GetWhich(RES_LAYOUT_SPLIT), sal_False, &pItem);
if(pItem)
pFrmFmt->SetFmtAttr( *pItem );
//RES_KEEP
pItem=0;
- rSet.GetItemState(rSet.GetPool()->GetWhich(RES_KEEP), FALSE, &pItem);
+ rSet.GetItemState(rSet.GetPool()->GetWhich(RES_KEEP), sal_False, &pItem);
if(pItem)
pFrmFmt->SetFmtAttr( *pItem );
//RES_FRAMEDIR
pItem=0;
- rSet.GetItemState(rSet.GetPool()->GetWhich(RES_FRAMEDIR), FALSE, &pItem);
+ rSet.GetItemState(rSet.GetPool()->GetWhich(RES_FRAMEDIR), sal_False, &pItem);
if(pItem)
pFrmFmt->SetFmtAttr( *pItem );
}
- if( SFX_ITEM_SET == rSet.GetItemState( FN_TABLE_BOX_TEXTDIRECTION, FALSE, &pItem) )
+ if( SFX_ITEM_SET == rSet.GetItemState( FN_TABLE_BOX_TEXTDIRECTION, sal_False, &pItem) )
{
SvxFrameDirectionItem aDirection( FRMDIR_ENVIRONMENT, RES_FRAMEDIR );
aDirection.SetValue(static_cast< const SvxFrameDirectionItem* >(pItem)->GetValue());
rSh.SetBoxDirection(aDirection);
}
- if( SFX_ITEM_SET == rSet.GetItemState( FN_TABLE_SET_VERT_ALIGN, FALSE, &pItem))
+ if( SFX_ITEM_SET == rSet.GetItemState( FN_TABLE_SET_VERT_ALIGN, sal_False, &pItem))
rSh.SetBoxAlign(((SfxUInt16Item*)(pItem))->GetValue());
- if( SFX_ITEM_SET == rSet.GetItemState( RES_ROW_SPLIT, FALSE, &pItem) )
+ if( SFX_ITEM_SET == rSet.GetItemState( RES_ROW_SPLIT, sal_False, &pItem) )
rSh.SetRowSplit(*static_cast<const SwFmtRowSplit*>(pItem));
//-- numberformat in cells
#ifdef FORMAT_PAINTBRUSH_ALSO_COPY_NUMBERFORMAT_FOR_TABLES
- if( SFX_ITEM_SET == rSet.GetItemState( RES_BOXATR_FORMAT, FALSE, &pItem ))
+ if( SFX_ITEM_SET == rSet.GetItemState( RES_BOXATR_FORMAT, sal_False, &pItem ))
{
SfxItemSet aBoxSet( *rSet.GetPool(), RES_BOXATR_FORMAT, RES_BOXATR_FORMAT );
aBoxSet.Put( SwTblBoxNumFormat( ((SfxUInt32Item*)pItem)->GetValue() ));
@@ -364,8 +364,8 @@ void SwFormatClipboard::Copy( SwWrtShell& rWrtShell, SfxItemPool& rPool, bool bP
{
SwPaM* pCrsr = rWrtShell.GetCrsr();
//select one character only to get the attributes of this single character only
- BOOL bHasSelection = pCrsr->HasMark();
- BOOL bForwardSelection = FALSE;
+ sal_Bool bHasSelection = pCrsr->HasMark();
+ sal_Bool bForwardSelection = sal_False;
if(!bHasSelection) //check for and handle multiselections
{
@@ -415,7 +415,7 @@ void SwFormatClipboard::Copy( SwWrtShell& rWrtShell, SfxItemPool& rPool, bool bP
SdrView* pDrawView = rWrtShell.GetDrawView();
if(pDrawView)
{
- BOOL bOnlyHardAttr = TRUE;
+ sal_Bool bOnlyHardAttr = sal_True;
if( pDrawView->AreObjectsMarked() )
{
pItemSet = new SfxItemSet( pDrawView->GetAttrFromMarked(bOnlyHardAttr) );
@@ -446,7 +446,7 @@ void SwFormatClipboard::Copy( SwWrtShell& rWrtShell, SfxItemPool& rPool, bool bP
if( pFmt )
m_aParaStyle = pFmt->GetName();
}
- rWrtShell.Pop(FALSE);
+ rWrtShell.Pop(sal_False);
rWrtShell.EndAction();
}
typedef boost::shared_ptr< SfxPoolItem > SfxPoolItemSharedPtr;
@@ -454,10 +454,10 @@ typedef std::vector< SfxPoolItemSharedPtr > ItemVector;
// #144857# collect all PoolItems from the applied styles
void lcl_AppendSetItems( ItemVector& rItemVector, const SfxItemSet& rStyleAttrSet )
{
- const USHORT* pRanges = rStyleAttrSet.GetRanges();
+ const sal_uInt16* pRanges = rStyleAttrSet.GetRanges();
while( *pRanges )
{
- for ( USHORT nWhich = *pRanges; nWhich <= *(pRanges+1); ++nWhich )
+ for ( sal_uInt16 nWhich = *pRanges; nWhich <= *(pRanges+1); ++nWhich )
{
const SfxPoolItem* pItem;
if( SFX_ITEM_SET == rStyleAttrSet.GetItemState( nWhich, sal_False, &pItem ) )
@@ -512,7 +512,7 @@ void SwFormatClipboard::Paste( SwWrtShell& rWrtShell, SfxStyleSheetBasePool* pPo
SwFmtCharFmt aFmt(pStyle->GetCharFmt());
// #144857# collect items from character style
lcl_AppendSetItems( aItemVector, aFmt.GetCharFmt()->GetAttrSet());
- USHORT nFlags=0; //(nMode & KEY_SHIFT) ? SETATTR_DONTREPLACE : SETATTR_DEFAULT;
+ sal_uInt16 nFlags=0; //(nMode & KEY_SHIFT) ? SETATTR_DONTREPLACE : SETATTR_DEFAULT;
rWrtShell.SetAttr( aFmt, nFlags );
}
}
@@ -535,7 +535,7 @@ void SwFormatClipboard::Paste( SwWrtShell& rWrtShell, SfxStyleSheetBasePool* pPo
SdrView* pDrawView = rWrtShell.GetDrawView();
if(pDrawView)
{
- BOOL bReplaceAll = TRUE;
+ sal_Bool bReplaceAll = sal_True;
pDrawView->SetAttrToMarked(*m_pItemSet, bReplaceAll);
}
}
@@ -561,22 +561,22 @@ void SwFormatClipboard::Paste( SwWrtShell& rWrtShell, SfxStyleSheetBasePool* pPo
{
if( SFX_ITEM_SET == pTemplateItemSet->GetItemState(FN_NUMBER_NEWSTART) )
{
- BOOL bStart = ((SfxBoolItem&)pTemplateItemSet->Get(FN_NUMBER_NEWSTART)).GetValue();
- USHORT nNumStart = USHRT_MAX;
+ sal_Bool bStart = ((SfxBoolItem&)pTemplateItemSet->Get(FN_NUMBER_NEWSTART)).GetValue();
+ sal_uInt16 nNumStart = USHRT_MAX;
if( SFX_ITEM_SET == pTemplateItemSet->GetItemState(FN_NUMBER_NEWSTART_AT) )
{
nNumStart = ((SfxUInt16Item&)pTemplateItemSet->Get(FN_NUMBER_NEWSTART_AT)).GetValue();
if(USHRT_MAX != nNumStart)
- bStart = FALSE;
+ bStart = sal_False;
}
rWrtShell.SetNumRuleStart(bStart);
rWrtShell.SetNodeNumStart(nNumStart);
}
else if( SFX_ITEM_SET == pTemplateItemSet->GetItemState(FN_NUMBER_NEWSTART_AT) )
{
- USHORT nNumStart = ((SfxUInt16Item&)pTemplateItemSet->Get(FN_NUMBER_NEWSTART_AT)).GetValue();
+ sal_uInt16 nNumStart = ((SfxUInt16Item&)pTemplateItemSet->Get(FN_NUMBER_NEWSTART_AT)).GetValue();
rWrtShell.SetNodeNumStart(nNumStart);
- rWrtShell.SetNumRuleStart(FALSE);
+ rWrtShell.SetNumRuleStart(sal_False);
}
}
}
diff --git a/sw/source/ui/uiview/pview.cxx b/sw/source/ui/uiview/pview.cxx
index 50e3944bd1..a3eb75e924 100644
--- a/sw/source/ui/uiview/pview.cxx
+++ b/sw/source/ui/uiview/pview.cxx
@@ -118,13 +118,13 @@ TYPEINIT1(SwPagePreView,SfxViewShell)
/* -----------------26.11.2002 10:41-----------------
*
* --------------------------------------------------*/
-USHORT lcl_GetNextZoomStep(USHORT nCurrentZoom, BOOL bZoomIn)
+sal_uInt16 lcl_GetNextZoomStep(sal_uInt16 nCurrentZoom, sal_Bool bZoomIn)
{
- static USHORT aZoomArr[] =
+ static sal_uInt16 aZoomArr[] =
{
25, 50, 75, 100, 150, 200, 400, 600
};
- const sal_uInt16 nZoomArrSize = sizeof(aZoomArr)/sizeof(USHORT);
+ const sal_uInt16 nZoomArrSize = sizeof(aZoomArr)/sizeof(sal_uInt16);
if(bZoomIn)
for(int i = nZoomArrSize - 1; i >= 0; --i)
{
@@ -144,7 +144,7 @@ USHORT lcl_GetNextZoomStep(USHORT nCurrentZoom, BOOL bZoomIn)
* --------------------------------------------------*/
void lcl_InvalidateZoomSlots(SfxBindings& rBindings)
{
- static USHORT __READONLY_DATA aInval[] =
+ static sal_uInt16 __READONLY_DATA aInval[] =
{
SID_ATTR_ZOOM, SID_ZOOM_OUT, SID_ZOOM_IN, SID_ATTR_ZOOMSLIDER, FN_PREVIEW_ZOOM, FN_STAT_ZOOM,
0
@@ -206,8 +206,8 @@ SwPreViewZoomDlg::~SwPreViewZoomDlg() {}
void SwPreViewZoomDlg::Apply()
{
((SwPagePreViewWin*)GetParent())->CalcWish(
- BYTE(aRowEdit.GetValue()),
- BYTE(aColEdit.GetValue()) );
+ sal_uInt8(aRowEdit.GetValue()),
+ sal_uInt8(aColEdit.GetValue()) );
}
/*--------------------------------------------------------------------
@@ -230,7 +230,7 @@ SwPagePreViewWin::SwPagePreViewWin( Window *pParent, SwPagePreView& rPView )
SetLineColor( GetBackground().GetColor());
SetMapMode( MapMode(MAP_TWIP) );
- const SwMasterUsrPref *pUsrPref = SW_MOD()->GetUsrPref(FALSE);
+ const SwMasterUsrPref *pUsrPref = SW_MOD()->GetUsrPref(sal_False);
mnRow = pUsrPref->GetPagePrevRow(); // 1 Zeile
mnCol = pUsrPref->GetPagePrevCol(); // 1 Spalte
// OD 24.03.2003 #108282# - member <mnVirtPage> no longer exists.
@@ -284,16 +284,16 @@ void SwPagePreViewWin::Paint( const Rectangle& rRect )
/*--------------------------------------------------------------------
Beschreibung:
--------------------------------------------------------------------*/
-void SwPagePreViewWin::CalcWish( BYTE nNewRow, BYTE nNewCol )
+void SwPagePreViewWin::CalcWish( sal_uInt8 nNewRow, sal_uInt8 nNewCol )
{
if( !mpViewShell || !mpViewShell->GetLayout() )
return;
- USHORT nOldCol = mnCol;
+ sal_uInt16 nOldCol = mnCol;
// OD 02.12.2002 #103492# - update <mnRow> and <mnCol>.
mnRow = nNewRow;
mnCol = nNewCol;
- USHORT nPages = mnRow * mnCol,
+ sal_uInt16 nPages = mnRow * mnCol,
nLastSttPg = mrView.GetPageCount()+1 > nPages
? mrView.GetPageCount()+1 - nPages : 0;
if( mnSttPage > nLastSttPg )
@@ -313,7 +313,7 @@ void SwPagePreViewWin::CalcWish( BYTE nNewRow, BYTE nNewCol )
// Sortierung muss eingehalten werden!!
// OD 24.03.2003 #108282# - additional invalidate page status.
- static USHORT __READONLY_DATA aInval[] =
+ static sal_uInt16 __READONLY_DATA aInval[] =
{
SID_ATTR_ZOOM, SID_ZOOM_OUT, SID_ZOOM_IN,
FN_PREVIEW_ZOOM,
@@ -337,11 +337,11 @@ void SwPagePreViewWin::CalcWish( BYTE nNewRow, BYTE nNewCol )
int SwPagePreViewWin::MovePage( int eMoveMode )
{
// soviele Seiten hoch
- USHORT nPages = mnRow * mnCol;
- USHORT nNewSttPage = mnSttPage;
+ sal_uInt16 nPages = mnRow * mnCol;
+ sal_uInt16 nNewSttPage = mnSttPage;
// OD 04.12.2002 #103492#
- USHORT nPageCount = mrView.GetPageCount();
- USHORT nDefSttPg = GetDefSttPage();
+ sal_uInt16 nPageCount = mrView.GetPageCount();
+ sal_uInt16 nDefSttPg = GetDefSttPage();
// OD 06.12.2002 #103492#
bool bPaintPageAtFirstCol = true;
@@ -420,13 +420,13 @@ int SwPagePreViewWin::MovePage( int eMoveMode )
maPaintedPreviewDocRect, bPaintPageAtFirstCol );
if( nNewSttPage == mnSttPage &&
eMoveMode != MV_SELPAGE )
- return FALSE;
+ return sal_False;
SetPagePreview(mnRow, mnCol);
mnSttPage = nNewSttPage;
// OD 24.03.2003 #108282# - additional invalidate page status.
- static USHORT __READONLY_DATA aInval[] =
+ static sal_uInt16 __READONLY_DATA aInval[] =
{
FN_START_OF_DOCUMENT, FN_END_OF_DOCUMENT, FN_PAGEUP, FN_PAGEDOWN,
FN_STAT_PAGE, 0
@@ -435,7 +435,7 @@ int SwPagePreViewWin::MovePage( int eMoveMode )
SfxBindings& rBindings = mrView.GetViewFrame()->GetBindings();
rBindings.Invalidate( aInval );
- return TRUE;
+ return sal_True;
}
/*--------------------------------------------------------------------
@@ -476,7 +476,7 @@ void SwPagePreViewWin::SetWinSize( const Size& rNewSize )
--------------------------------------------------------------------*/
-void SwPagePreViewWin::GetStatusStr( String& rStr, USHORT nPageCnt ) const
+void SwPagePreViewWin::GetStatusStr( String& rStr, sal_uInt16 nPageCnt ) const
{
// OD 24.03.2003 #108282# - show physical and virtual page number of
// selected page, if it's visible.
@@ -508,11 +508,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;
@@ -521,7 +521,7 @@ void SwPagePreViewWin::KeyInput( const KeyEvent &rKEvt )
}
if(nSlot)
{
- bHandled = TRUE;
+ bHandled = sal_True;
mrView.GetViewFrame()->GetDispatcher()->Execute(
nSlot, SFX_CALLMODE_ASYNCHRON );
}
@@ -536,12 +536,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:
@@ -607,7 +607,7 @@ void SwPagePreViewWin::MouseButtonDown( const MouseEvent& rMEvt )
mrView.SetVScrollbarThumbPos( nNewSelectedPage );
}
// OD 24.03.2003 #108282# - invalidate page status.
- static USHORT __READONLY_DATA aInval[] =
+ static sal_uInt16 __READONLY_DATA aInval[] =
{
FN_STAT_PAGE, 0
};
@@ -622,9 +622,9 @@ void SwPagePreViewWin::MouseButtonDown( const MouseEvent& rMEvt )
******************************************************************************/
-void SwPagePreViewWin::SetPagePreview( BYTE nRow, BYTE nCol )
+void SwPagePreViewWin::SetPagePreview( sal_uInt8 nRow, sal_uInt8 nCol )
{
- SwMasterUsrPref *pOpt = (SwMasterUsrPref *)SW_MOD()->GetUsrPref(FALSE);
+ SwMasterUsrPref *pOpt = (SwMasterUsrPref *)SW_MOD()->GetUsrPref(sal_False);
if (nRow != pOpt->GetPagePrevRow() || nCol != pOpt->GetPagePrevCol())
{
@@ -719,7 +719,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
@@ -763,7 +763,7 @@ void SwPagePreView::_ExecPgUpAndPgDown( const bool _bPgUp,
}
ScrollViewSzChg();
// OD 24.03.2003 #108282# - additional invalidate page status.
- static USHORT __READONLY_DATA aInval[] =
+ static sal_uInt16 __READONLY_DATA aInval[] =
{
FN_START_OF_DOCUMENT, FN_END_OF_DOCUMENT, FN_PAGEUP, FN_PAGEDOWN,
FN_STAT_PAGE, 0
@@ -785,8 +785,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())
@@ -801,9 +801,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 );
@@ -818,7 +818,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 );
@@ -829,7 +829,7 @@ void SwPagePreView::Execute( SfxRequest &rReq )
// book preview mode changed. Thus, adjust scrollbars and
// invalidate corresponding states.
ScrollViewSzChg();
- static USHORT __READONLY_DATA aInval[] =
+ static sal_uInt16 __READONLY_DATA aInval[] =
{
FN_START_OF_DOCUMENT, FN_END_OF_DOCUMENT, FN_PAGEUP, FN_PAGEDOWN,
FN_STAT_PAGE, FN_SHOW_BOOKVIEW, 0
@@ -881,13 +881,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);
@@ -900,9 +900,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 );
}
}
@@ -949,12 +949,12 @@ void SwPagePreView::Execute( SfxRequest &rReq )
{
aViewWin.SetSelectedPage( nNewSelectedPage );
aViewWin.SetSttPage( nNewStartPage );
- int nRet = ChgPage( SwPagePreViewWin::MV_SELPAGE, TRUE );
+ int nRet = ChgPage( SwPagePreViewWin::MV_SELPAGE, sal_True );
bRefresh = 0 != nRet;
}
GetViewShell()->ShowPreViewSelection( nNewSelectedPage );
// OD 24.03.2003 #108282# - invalidate page status.
- static USHORT __READONLY_DATA aInval[] =
+ static sal_uInt16 __READONLY_DATA aInval[] =
{
FN_STAT_PAGE, 0
};
@@ -977,14 +977,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));
@@ -1000,14 +1000,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 );
@@ -1015,8 +1015,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:
@@ -1028,7 +1028,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 ))
@@ -1056,13 +1056,13 @@ MOVEPAGE:
void SwPagePreView::GetState( SfxItemSet& rSet )
{
SfxWhichIter aIter(rSet);
- BYTE nRow = 1;
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt8 nRow = 1;
+ sal_uInt16 nWhich = aIter.FirstWhich();
ASSERT(nWhich, leeres Set);
SwPagePreviewLayout* pPagePrevwLay = GetViewShell()->PagePreviewLayout();
//#106746# zoom has to be disabled if Accessibility support is switched on
// MT 2010/01, see #110498#
- BOOL bZoomEnabled = TRUE; // !Application::GetSettings().GetMiscSettings().GetEnableATToolSupport();
+ sal_Bool bZoomEnabled = sal_True; // !Application::GetSettings().GetMiscSettings().GetEnableATToolSupport();
while(nWhich)
{
@@ -1130,7 +1130,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 );
@@ -1166,7 +1166,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;
@@ -1183,10 +1183,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 );
@@ -1195,7 +1195,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:
@@ -1215,7 +1215,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)
{
@@ -1232,45 +1232,45 @@ void SwPagePreView::StateUndo(SfxItemSet& rSet)
void SwPagePreView::Init(const SwViewOption * pPrefs)
{
if ( GetViewShell()->HasDrawView() )
- GetViewShell()->GetDrawView()->SetAnimationEnabled( FALSE );
+ GetViewShell()->GetDrawView()->SetAnimationEnabled( sal_False );
- bNormalPrint = TRUE;
+ bNormalPrint = sal_True;
// Die DocSize erfragen und verarbeiten. Ueber die Handler konnte
// die Shell nicht gefunden werden, weil die Shell innerhalb CTOR-Phase
// nicht in der SFX-Verwaltung bekannt ist.
if( !pPrefs )
- pPrefs = SW_MOD()->GetUsrPref(FALSE);
+ pPrefs = SW_MOD()->GetUsrPref(sal_False);
// die Felder aktualisieren
// ACHTUNG: hochcasten auf die EditShell, um die SS zu nutzen.
// In den Methoden wird auf die akt. Shell abgefragt!
SwEditShell* pESh = (SwEditShell*)GetViewShell();
- BOOL bIsModified = pESh->IsModified();
+ sal_Bool bIsModified = pESh->IsModified();
SwViewOption aOpt( *pPrefs );
- aOpt.SetPagePreview(TRUE);
- aOpt.SetTab( FALSE );
- aOpt.SetBlank( FALSE );
- aOpt.SetHardBlank( FALSE );
- aOpt.SetParagraph( FALSE );
- aOpt.SetLineBreak( FALSE );
- aOpt.SetPageBreak( FALSE );
- aOpt.SetColumnBreak( FALSE );
- aOpt.SetSoftHyph( FALSE );
- aOpt.SetFldName( FALSE );
- aOpt.SetPostIts( FALSE );
- aOpt.SetShowHiddenChar( FALSE );
- aOpt.SetShowHiddenField( FALSE );
- aOpt.SetShowHiddenPara( FALSE );
- aOpt.SetViewHRuler( FALSE );
- aOpt.SetViewVRuler( FALSE );
- aOpt.SetGraphic( TRUE );
- aOpt.SetTable( TRUE );
- aOpt.SetSnap( FALSE );
- aOpt.SetGridVisible( FALSE );
+ aOpt.SetPagePreview(sal_True);
+ aOpt.SetTab( sal_False );
+ aOpt.SetBlank( sal_False );
+ aOpt.SetHardBlank( sal_False );
+ aOpt.SetParagraph( sal_False );
+ aOpt.SetLineBreak( sal_False );
+ aOpt.SetPageBreak( sal_False );
+ aOpt.SetColumnBreak( sal_False );
+ aOpt.SetSoftHyph( sal_False );
+ aOpt.SetFldName( sal_False );
+ aOpt.SetPostIts( sal_False );
+ aOpt.SetShowHiddenChar( sal_False );
+ aOpt.SetShowHiddenField( sal_False );
+ aOpt.SetShowHiddenPara( sal_False );
+ aOpt.SetViewHRuler( sal_False );
+ aOpt.SetViewVRuler( sal_False );
+ aOpt.SetGraphic( sal_True );
+ aOpt.SetTable( sal_True );
+ aOpt.SetSnap( sal_False );
+ aOpt.SetGridVisible( sal_False );
GetViewShell()->ApplyViewOptions( aOpt );
GetViewShell()->ApplyAccessiblityOptions(SW_MOD()->GetAccessibilityOptions());
@@ -1282,7 +1282,7 @@ void SwPagePreView::Init(const SwViewOption * pPrefs)
if( pIDSA->get(IDocumentSettingAccess::BROWSE_MODE))
{
pIDSA->set(IDocumentSettingAccess::BROWSE_MODE, false);
- pESh->CheckBrowseView( TRUE );
+ pESh->CheckBrowseView( sal_True );
}
GetViewShell()->CalcLayout();
@@ -1320,8 +1320,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 )
@@ -1344,15 +1344,15 @@ SwPagePreView::SwPagePreView(SfxViewFrame *pViewFrame, SfxViewShell* pOldSh):
{
pVS = ((SwView*)pOldSh)->GetWrtShellPtr();
// save the current ViewData of the previous SwView
- pOldSh->WriteUserData( sSwViewData, FALSE );
+ pOldSh->WriteUserData( sSwViewData, sal_False );
}
else
pVS = GetDocShell()->GetWrtShell();
if( pVS )
{
// setze die akt. Seite als die erste
- USHORT nPhysPg, nVirtPg;
- ((SwCrsrShell*)pVS)->GetPageNum( nPhysPg, nVirtPg, /*FALSE*/TRUE, FALSE );
+ sal_uInt16 nPhysPg, nVirtPg;
+ ((SwCrsrShell*)pVS)->GetPageNum( nPhysPg, nVirtPg, /*sal_False*/sal_True, sal_False );
if( 1 != aViewWin.GetCol() && 1 == nPhysPg )
--nPhysPg;
aViewWin.SetSttPage( nPhysPg );
@@ -1422,7 +1422,7 @@ SwDocShell* SwPagePreView::GetDocShell()
--------------------------------------------------------------------*/
-int SwPagePreView::_CreateScrollbar( BOOL bHori )
+int SwPagePreView::_CreateScrollbar( sal_Bool bHori )
{
Window *pMDI = &GetViewFrame()->GetWindow();
SwScrollbar** ppScrollbar = bHori ? &pHScrollbar : &pVScrollbar;
@@ -1446,7 +1446,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 ));
@@ -1503,7 +1503,7 @@ int SwPagePreView::ChgPage( int eMvMode, int bUpdateScrollbar )
{
ScrollViewSzChg();
- static USHORT __READONLY_DATA aInval[] =
+ static sal_uInt16 __READONLY_DATA aInval[] =
{
FN_START_OF_DOCUMENT, FN_END_OF_DOCUMENT,
FN_PAGEUP, FN_PAGEDOWN, 0
@@ -1525,14 +1525,14 @@ int SwPagePreView::ChgPage( int eMvMode, int bUpdateScrollbar )
// ab hier alles aus der SwView uebernommen
-void SwPagePreView::CalcAndSetBorderPixel( SvBorder &rToFill, BOOL /*bInner*/ )
+void SwPagePreView::CalcAndSetBorderPixel( SvBorder &rToFill, sal_Bool /*bInner*/ )
{
// const long nAdd = bInner ? 0 : ScrollBar::GetWindowOverlapPixel();
const StyleSettings &rSet = aViewWin.GetSettings().GetStyleSettings();
const long nTmp = rSet.GetScrollBarSize();// - nAdd;
- if ( pVScrollbar->IsVisible( FALSE ))
+ if ( pVScrollbar->IsVisible( sal_False ))
rToFill.Right() = nTmp;
- if ( pHScrollbar->IsVisible( FALSE ) )
+ if ( pHScrollbar->IsVisible( sal_False ) )
rToFill.Bottom() = nTmp;
SetBorderPixel( rToFill );
}
@@ -1545,12 +1545,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 );
@@ -1566,9 +1566,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!
@@ -1591,7 +1591,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()));
@@ -1656,7 +1656,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 );
@@ -1699,7 +1699,7 @@ IMPL_LINK( SwPagePreView, EndScrollHdl, SwScrollbar *, pScrollbar )
if ( GetViewShell()->PagePreviewLayout()->DoesPreviewLayoutRowsFitIntoWindow() )
{
// wieviele Seiten scrollen ??
- USHORT nThmbPos = (USHORT)pScrollbar->GetThumbPos();
+ sal_uInt16 nThmbPos = (sal_uInt16)pScrollbar->GetThumbPos();
// OD 05.12.2002 #103492# - adjust to new preview functionality
if( nThmbPos != aViewWin.SelectedPage() )
{
@@ -1720,7 +1720,7 @@ IMPL_LINK( SwPagePreView, EndScrollHdl, SwScrollbar *, pScrollbar )
{
aViewWin.SetSttPage( nThmbPos );
aViewWin.SetSelectedPage( nThmbPos );
- ChgPage( SwPagePreViewWin::MV_SCROLL, FALSE );
+ ChgPage( SwPagePreViewWin::MV_SCROLL, sal_False );
// OD 20.01.2003 #103492# - update scrollbars
ScrollViewSzChg();
}
@@ -1760,7 +1760,7 @@ IMPL_LINK( SwPagePreView, EndScrollHdl, SwScrollbar *, pScrollbar )
aViewWin.Scroll(nThmbPos - aViewWin.GetPaintedPreviewDocRect().Left(), 0);
}
// OD 24.03.2003 #108282# - additional invalidate page status.
- static USHORT __READONLY_DATA aInval[] =
+ static sal_uInt16 __READONLY_DATA aInval[] =
{
FN_START_OF_DOCUMENT, FN_END_OF_DOCUMENT, FN_PAGEUP, FN_PAGEDOWN,
FN_STAT_PAGE, 0
@@ -1803,7 +1803,7 @@ void SwPagePreView::DocSzChgd( const Size &rSz )
if( aVisArea.GetWidth() )
{
- ChgPage( SwPagePreViewWin::MV_CALC, TRUE );
+ ChgPage( SwPagePreViewWin::MV_CALC, sal_True );
ScrollDocSzChg();
aViewWin.Invalidate();
@@ -1826,7 +1826,7 @@ void SwPagePreView::ScrollViewSzChg()
{
//vertical scrolling by row
// OD 04.12.2002 #103492# - adjust to new preview functionality
- USHORT nVisPages = aViewWin.GetRow() * aViewWin.GetCol();
+ sal_uInt16 nVisPages = aViewWin.GetRow() * aViewWin.GetCol();
pVScrollbar->SetVisibleSize( nVisPages );
// OD 19.02.2003 #107369# - set selected page as scroll bar position,
// if it is visible.
@@ -1904,7 +1904,7 @@ void SwPagePreView::ScrollDocSzChg()
// alles zum Thema Drucken
-SfxPrinter* SwPagePreView::GetPrinter( BOOL bCreate )
+SfxPrinter* SwPagePreView::GetPrinter( sal_Bool bCreate )
{
return aViewWin.GetViewShell()->getIDocumentDeviceAccess()->getPrinter( bCreate );
}
@@ -1914,7 +1914,7 @@ SfxPrinter* SwPagePreView::GetPrinter( BOOL bCreate )
--------------------------------------------------------------------*/
-USHORT SwPagePreView::SetPrinter( SfxPrinter *pNew, USHORT nDiffFlags, bool )
+sal_uInt16 SwPagePreView::SetPrinter( SfxPrinter *pNew, sal_uInt16 nDiffFlags, bool )
{
ViewShell &rSh = *GetViewShell();
SfxPrinter* pOld = rSh.getIDocumentDeviceAccess()->getPrinter( false );
@@ -1929,15 +1929,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 ) );
@@ -1948,14 +1948,14 @@ USHORT SwPagePreView::SetPrinter( SfxPrinter *pNew, USHORT nDiffFlags, bool )
rESh.SetModified();
rESh.EndAllAction();
- static USHORT __READONLY_DATA aInval[] =
+ static sal_uInt16 __READONLY_DATA aInval[] =
{
SID_ATTR_LONG_ULSPACE, SID_ATTR_LONG_LRSPACE,
SID_RULER_BORDERS, SID_RULER_PAGE_POS, 0
};
#ifdef DBG_UTIL
{
- const USHORT* pPtr = aInval + 1;
+ const sal_uInt16* pPtr = aInval + 1;
do {
ASSERT( *(pPtr - 1) < *pPtr, "falsche Sortierung!" );
} while( *++pPtr );
@@ -2000,8 +2000,8 @@ Size SwPagePreView::GetOptimalSizePixel() const
Size aMaxSize( aRect.GetWidth(), aRect.GetHeight() );
Size aInSize = rWin.GetOutputSizePixel();
Size aOutSize = rWin.GetSizePixel();
- USHORT nXBorder = USHORT(aOutSize.Width() - aInSize.Width());
- USHORT nYBorder = USHORT(aOutSize.Height() - aInSize.Height());
+ sal_uInt16 nXBorder = sal_uInt16(aOutSize.Width() - aInSize.Width());
+ sal_uInt16 nYBorder = sal_uInt16(aOutSize.Height() - aInSize.Height());
aMaxSize.Width() -= nXBorder;
//'auf Verdacht' etwas vom Border abziehen (Menue)
nYBorder -= (nYBorder - nXBorder) / 2;
@@ -2086,7 +2086,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(),
@@ -2095,16 +2095,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;
@@ -2119,7 +2119,7 @@ BOOL SwPagePreView::HandleWheelCommands( const CommandEvent& rCEvt )
}
SetZoom(SVX_ZOOM_PERCENT, nFactor);
}
- bOk = TRUE;
+ bOk = sal_True;
}
else
bOk = aViewWin.HandleScrollCommand( rCEvt, pHScrollbar, pVScrollbar );
@@ -2165,7 +2165,7 @@ void SwPagePreView::ShowVScrollbar(sal_Bool bShow)
/* -----------------25.11.2002 16:36-----------------
*
* --------------------------------------------------*/
-void SwPagePreView::SetZoom(SvxZoomType eType, USHORT nFactor)
+void SwPagePreView::SetZoom(SvxZoomType eType, sal_uInt16 nFactor)
{
ViewShell& rSh = *GetViewShell();
SwViewOption aOpt(*rSh.GetViewOptions());
diff --git a/sw/source/ui/uiview/scroll.cxx b/sw/source/ui/uiview/scroll.cxx
index f063a69732..b1e5b19e7a 100644
--- a/sw/source/ui/uiview/scroll.cxx
+++ b/sw/source/ui/uiview/scroll.cxx
@@ -37,18 +37,18 @@
#define SCROLL_LINE_SIZE 250
-SwScrollbar::SwScrollbar( Window *pWin, BOOL bHoriz ) :
+SwScrollbar::SwScrollbar( Window *pWin, sal_Bool bHoriz ) :
ScrollBar( pWin,
WinBits( WB_3DLOOK | WB_HIDE | ( bHoriz ? WB_HSCROLL : WB_VSCROLL) ) ),
bHori( bHoriz ),
- bAuto( FALSE ),
- bThumbEnabled( TRUE ),
- bVisible(FALSE),
- bSizeSet(FALSE)
+ bAuto( sal_False ),
+ bThumbEnabled( sal_True ),
+ bVisible(sal_False),
+ bSizeSet(sal_False)
{
// SSA: --- RTL --- no mirroring for horizontal scrollbars
if( bHoriz )
- EnableRTL( FALSE );
+ EnableRTL( sal_False );
}
@@ -63,7 +63,7 @@ void SwScrollbar::DocSzChgd( const Size &rSize )
{
aDocSz = rSize;
SetRange( Range( 0, bHori ? rSize.Width() : rSize.Height()) );
- const ULONG nVisSize = GetVisibleSize();
+ const sal_uLong nVisSize = GetVisibleSize();
SetLineSize( SCROLL_LINE_SIZE );
// SetLineSize( nVisSize * 10 / 100 );
SetPageSize( nVisSize * 77 / 100 );
@@ -100,7 +100,7 @@ void SwScrollbar::ViewPortChgd( const Rectangle &rRect )
/*-----------------10/21/97 02:48pm-----------------
--------------------------------------------------*/
-void SwScrollbar::ExtendedShow( BOOL bSet )
+void SwScrollbar::ExtendedShow( sal_Bool bSet )
{
bVisible = bSet;
if( (!bSet || !bAuto) && IsUpdateMode() && bSizeSet)
@@ -113,7 +113,7 @@ void SwScrollbar::ExtendedShow( BOOL bSet )
void SwScrollbar::SetPosSizePixel( const Point& rNewPos, const Size& rNewSize )
{
ScrollBar::SetPosSizePixel(rNewPos, rNewSize);
- bSizeSet = TRUE;
+ bSizeSet = sal_True;
if(bVisible)
ExtendedShow();
@@ -123,7 +123,7 @@ void SwScrollbar::SetPosSizePixel( const Point& rNewPos, const Size& rNewSize )
/*-----------------14.04.98 11:38-------------------
--------------------------------------------------*/
-void SwScrollbar::SetAuto(BOOL bSet)
+void SwScrollbar::SetAuto(sal_Bool bSet)
{
if(bAuto != bSet)
{
@@ -131,7 +131,7 @@ void SwScrollbar::SetAuto(BOOL bSet)
// automatisch versteckt - dann anzeigen
if(!bAuto && bVisible && !ScrollBar::IsVisible())
- ExtendedShow(TRUE);
+ ExtendedShow(sal_True);
else if(bAuto)
AutoShow(); // oder automatisch verstecken
}
@@ -147,14 +147,14 @@ void SwScrollbar::AutoShow()
if( nVis >= nLen - 1)
{
if(ScrollBar::IsVisible())
- ScrollBar::Show(FALSE);
+ ScrollBar::Show(sal_False);
}
else if ( !ScrollBar::IsVisible() &&
(!bHori || nVis) ) //Optimierung fuer Browser.
//Horizontaler Scrollbar per
//default aus.
{
- ScrollBar::Show(TRUE);
+ ScrollBar::Show(sal_True);
}
}
}
diff --git a/sw/source/ui/uiview/srcview.cxx b/sw/source/ui/uiview/srcview.cxx
index af023f7539..880574ea65 100644
--- a/sw/source/ui/uiview/srcview.cxx
+++ b/sw/source/ui/uiview/srcview.cxx
@@ -142,7 +142,7 @@ TYPEINIT1(SwSrcView, SfxViewShell)
--------------------------------------------------*/
-void lcl_PrintHeader( OutputDevice &rOutDev, USHORT nPages, USHORT nCurPage, const String& rTitle )
+void lcl_PrintHeader( OutputDevice &rOutDev, sal_uInt16 nPages, sal_uInt16 nCurPage, const String& rTitle )
{
short nLeftMargin = LMARGPRN;
Size aSz = rOutDev.GetOutputSize();
@@ -218,8 +218,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' )
@@ -245,7 +245,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();
@@ -261,7 +261,7 @@ SwSrcView::~SwSrcView()
SwDocShell* pDocShell = GetDocShell();
DBG_ASSERT(PTR_CAST(SwWebDocShell, pDocShell), "Wieso keine WebDocShell?");
const TextSelection& rSel = aEditWin.GetTextView()->GetSelection();
- ((SwWebDocShell*)pDocShell)->SetSourcePara( static_cast< USHORT >( rSel.GetStart().GetPara() ) );
+ ((SwWebDocShell*)pDocShell)->SetSourcePara( static_cast< sal_uInt16 >( rSel.GetStart().GetPara() ) );
uno::Reference<document::XDocumentPropertiesSupplier> xDPS(
pDocShell->GetModel(), uno::UNO_QUERY_THROW);
@@ -303,11 +303,11 @@ void SwSrcView::Init()
Load(pDocShell);
else
{
- aEditWin.SetReadonly(TRUE);
+ aEditWin.SetReadonly(sal_True);
}
// StartListening(*GetViewFrame());
- StartListening(*pDocShell,TRUE);
+ StartListening(*pDocShell,sal_True);
}
/*--------------------------------------------------------------------
@@ -327,7 +327,7 @@ SwDocShell* SwSrcView::GetDocShell()
void SwSrcView::SaveContent(const String& rTmpFile)
{
- SfxMedium aMedium( rTmpFile, STREAM_WRITE, TRUE);
+ SfxMedium aMedium( rTmpFile, STREAM_WRITE, sal_True);
SvStream* pOutStream = aMedium.GetOutStream();
pOutStream->SetStreamCharSet( lcl_GetStreamCharSet(eLoadEncoding) );
aEditWin.Write(*pOutStream);//, EE_FORMAT_TEXT);
@@ -341,7 +341,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 )
{
@@ -381,7 +381,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 );
@@ -420,11 +420,11 @@ void SwSrcView::Execute(SfxRequest& rReq)
{
const SfxItemSet* pTmpArgs = rReq.GetArgs();
- USHORT nWhich = pTmpArgs->GetWhichByPos( 0 );
+ sal_uInt16 nWhich = pTmpArgs->GetWhichByPos( 0 );
DBG_ASSERT( nWhich, "Wich fuer SearchItem ?" );
const SfxPoolItem& rItem = pTmpArgs->Get( nWhich );
SetSearchItem( (const SvxSearchItem&)rItem);
- StartSearchAndReplace( (const SvxSearchItem&)rItem, FALSE, rReq.IsAPI() );
+ StartSearchAndReplace( (const SvxSearchItem&)rItem, sal_False, rReq.IsAPI() );
if(aEditWin.IsModified())
GetDocShell()->GetDoc()->SetModified();
}
@@ -434,7 +434,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();
}
@@ -448,11 +448,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;
@@ -482,7 +482,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)
@@ -516,7 +516,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);
@@ -549,8 +549,8 @@ 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();
@@ -597,7 +597,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);
@@ -638,20 +638,20 @@ void SwSrcView::SetSearchItem( const SvxSearchItem& rItem )
--------------------------------------------------------------------*/
-USHORT SwSrcView::StartSearchAndReplace(const SvxSearchItem& rSearchItem,
- BOOL bFromStart,
- BOOL bApi,
- BOOL bRecursive)
+sal_uInt16 SwSrcView::StartSearchAndReplace(const SvxSearchItem& rSearchItem,
+ sal_Bool bFromStart,
+ sal_Bool bApi,
+ sal_Bool bRecursive)
{
ExtTextView* pTextView = aEditWin.GetTextView();
TextSelection aSel;
TextPaM aPaM;
- BOOL bForward = !rSearchItem.GetBackward();
- BOOL bAtStart = pTextView->GetSelection() == TextSelection( aPaM, aPaM );
+ sal_Bool bForward = !rSearchItem.GetBackward();
+ sal_Bool bAtStart = pTextView->GetSelection() == TextSelection( aPaM, aPaM );
if( !bForward )
- aPaM = TextPaM( (ULONG)-1, (USHORT)-1 );
+ aPaM = TextPaM( (sal_uLong)-1, (sal_uInt16)-1 );
if( bFromStart )
{
@@ -663,8 +663,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:
@@ -672,7 +672,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;
@@ -683,7 +683,7 @@ USHORT SwSrcView::StartSearchAndReplace(const SvxSearchItem& rSearchItem,
if( !nFound )
{
- BOOL bNotFoundMessage = FALSE;
+ sal_Bool bNotFoundMessage = sal_False;
if(!bRecursive)
{
if(!bFromStart)
@@ -692,13 +692,13 @@ USHORT SwSrcView::StartSearchAndReplace(const SvxSearchItem& rSearchItem,
}
else
{
- bNotFoundMessage = TRUE;
+ bNotFoundMessage = sal_True;
pTextView->SetSelection( aSel );
}
}
else if(bAtStart)
{
- bNotFoundMessage = TRUE;
+ bNotFoundMessage = sal_True;
}
@@ -713,7 +713,7 @@ USHORT SwSrcView::StartSearchAndReplace(const SvxSearchItem& rSearchItem,
: MSG_SEARCH_START)).Execute())
{
pTextView->SetSelection( TextSelection( aPaM, aPaM ) );
- StartSearchAndReplace( rSearchItem, FALSE, FALSE, TRUE );
+ StartSearchAndReplace( rSearchItem, sal_False, sal_False, sal_True );
}
}
}
@@ -724,7 +724,7 @@ USHORT SwSrcView::StartSearchAndReplace(const SvxSearchItem& rSearchItem,
Beschreibung:
--------------------------------------------------------------------*/
-USHORT SwSrcView::SetPrinter(SfxPrinter* pNew, USHORT nDiffFlags, bool )
+sal_uInt16 SwSrcView::SetPrinter(SfxPrinter* pNew, sal_uInt16 nDiffFlags, bool )
{
SwDocShell* pDocSh = GetDocShell();
if ( (SFX_PRINTER_JOBSETUP | SFX_PRINTER_PRINTER) & nDiffFlags )
@@ -734,10 +734,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();
@@ -749,7 +749,7 @@ USHORT SwSrcView::SetPrinter(SfxPrinter* pNew, USHORT nDiffFlags, bool )
Beschreibung:
--------------------------------------------------------------------*/
-SfxPrinter* SwSrcView::GetPrinter( BOOL bCreate )
+SfxPrinter* SwSrcView::GetPrinter( sal_Bool bCreate )
{
return GetDocShell()->GetDoc()->getPrinter( bCreate );
}
@@ -783,32 +783,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;
@@ -851,7 +851,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);
@@ -872,8 +872,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();
@@ -897,9 +897,9 @@ void SwSrcView::Load(SwDocShell* pDocShell)
pStream->SetStreamCharSet( eDestEnc );
pStream->Seek(0);
TextEngine* pTextEngine = aEditWin.GetTextEngine();
- pTextEngine->EnableUndo(FALSE);
+ pTextEngine->EnableUndo(sal_False);
aEditWin.Read(*pStream);//, EE_FORMAT_TEXT);
- pTextEngine->EnableUndo(TRUE);
+ pTextEngine->EnableUndo(sal_True);
}
else
{
@@ -915,18 +915,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();
@@ -944,9 +944,9 @@ void SwSrcView::Load(SwDocShell* pDocShell)
if(bDocModified)
pDocShell->SetModified();// das Flag wird zwischendurch zurueckgesetzt
// AutoLoad abschalten
- pDocShell->SetAutoLoad(INetURLObject(), 0, FALSE);
+ pDocShell->SetAutoLoad(INetURLObject(), 0, sal_False);
DBG_ASSERT(PTR_CAST(SwWebDocShell, pDocShell), "Wieso keine WebDocShell?");
- USHORT nLine = ((SwWebDocShell*)pDocShell)->GetSourcePara();
+ sal_uInt16 nLine = ((SwWebDocShell*)pDocShell)->GetSourcePara();
aEditWin.SetStartLine(nLine);
aEditWin.GetTextEngine()->ResetUndo();
aEditWin.GetOutWin()->GrabFocus();
diff --git a/sw/source/ui/uiview/swcli.cxx b/sw/source/ui/uiview/swcli.cxx
index f3e8b6f2c5..53aabc5171 100644
--- a/sw/source/ui/uiview/swcli.cxx
+++ b/sw/source/ui/uiview/swcli.cxx
@@ -44,7 +44,7 @@
using namespace com::sun::star;
SwOleClient::SwOleClient( SwView *pView, SwEditWin *pWin, const svt::EmbeddedObjectRef& xObj ) :
- SfxInPlaceClient( pView, pWin, xObj.GetViewAspect() ), bInDoVerb( FALSE ),
+ SfxInPlaceClient( pView, pWin, xObj.GetViewAspect() ), bInDoVerb( sal_False ),
bOldCheckForOLEInCaption( pView->GetWrtShell().IsCheckForOLEInCaption() )
{
SetObject( xObj.GetObject() );
@@ -158,11 +158,11 @@ void SwOleClient::ViewChanged()
aVisSize.Height()= Fraction( aVisSize.Height() ) * GetScaleHeight();
SwRect aRect( Point( LONG_MIN, LONG_MIN ), aVisSize );
- rSh.LockView( TRUE ); //Scrollen im EndAction verhindern
+ rSh.LockView( sal_True ); //Scrollen im EndAction verhindern
rSh.StartAllAction();
rSh.RequestObjectResize( aRect, GetObject() );
rSh.EndAllAction();
- rSh.LockView( FALSE );
+ rSh.LockView( sal_False );
}
void SwOleClient::MakeVisible()
diff --git a/sw/source/ui/uiview/uivwimp.cxx b/sw/source/ui/uiview/uivwimp.cxx
index 8060006c3f..ecb0e5e164 100644
--- a/sw/source/ui/uiview/uivwimp.cxx
+++ b/sw/source/ui/uiview/uivwimp.cxx
@@ -105,7 +105,7 @@ SwView_Impl::~SwView_Impl()
pScanEvtLstnr->ViewDestroyed();
if( xClipEvtLstnr.is() )
{
- pClipEvtLstnr->AddRemoveListener( FALSE );
+ pClipEvtLstnr->AddRemoveListener( sal_False );
pClipEvtLstnr->ViewDestroyed();
}
delete pConfigItem;
@@ -141,12 +141,12 @@ SwXTextView* SwView_Impl::GetUNOObject_Impl()
---------------------------------------------------------------------------*/
void SwView_Impl::ExecuteScan( SfxRequest& rReq )
{
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
switch(nSlot)
{
case SID_TWAIN_SELECT:
{
- BOOL bDone = FALSE;
+ sal_Bool bDone = sal_False;
Reference< XScannerManager > xScanMgr = SW_MOD()->GetScannerManager();
if( xScanMgr.is() )
@@ -180,7 +180,7 @@ void SwView_Impl::ExecuteScan( SfxRequest& rReq )
case SID_TWAIN_TRANSFER:
{
- BOOL bDone = FALSE;
+ sal_Bool bDone = sal_False;
Reference< XScannerManager > xScanMgr = SW_MOD()->GetScannerManager();
if( xScanMgr.is() )
@@ -193,7 +193,7 @@ void SwView_Impl::ExecuteScan( SfxRequest& rReq )
{
Reference< XEventListener > xLstner = &rListener;
xScanMgr->startScan( aContexts.getConstArray()[ 0 ], xLstner );
- bDone = TRUE;
+ bDone = sal_True;
}
}
catch(...)
@@ -234,7 +234,7 @@ void SwView_Impl::AddClipboardListener()
if(!xClipEvtLstnr.is())
{
xClipEvtLstnr = pClipEvtLstnr = new SwClipboardChangeListener( *pView );
- pClipEvtLstnr->AddRemoveListener( TRUE );
+ pClipEvtLstnr->AddRemoveListener( sal_True );
}
}
/* -----------------3/31/2003 11:42AM----------------
@@ -337,7 +337,7 @@ void SAL_CALL SwClipboardChangeListener::changedContents( const CLIP_NMSPC::Clip
}
}
-void SwClipboardChangeListener::AddRemoveListener( BOOL bAdd )
+void SwClipboardChangeListener::AddRemoveListener( sal_Bool bAdd )
{
pView->AddRemoveClipboardListener( Reference< XClipboardListener >( this ), bAdd );
}
diff --git a/sw/source/ui/uiview/view.cxx b/sw/source/ui/uiview/view.cxx
index e6bb69b971..0666533454 100644
--- a/sw/source/ui/uiview/view.cxx
+++ b/sw/source/ui/uiview/view.cxx
@@ -74,12 +74,12 @@
#include <beziersh.hxx>
#include <globdoc.hxx>
#include <scroll.hxx>
-#include <globdoc.hxx>
#include <navipi.hxx>
#include <gloshdl.hxx>
#include <usrpref.hxx>
#include <srcview.hxx>
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <drawdoc.hxx>
#include <wdocsh.hxx>
#include <wview.hxx>
@@ -289,7 +289,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 );
@@ -315,7 +315,7 @@ void SwView::SelectShell()
}
}
- BOOL bInitFormShell = sal_False;
+ sal_Bool bInitFormShell = sal_False;
if (!pFormShell)
{
bInitFormShell = sal_True;
@@ -324,7 +324,7 @@ void SwView::SelectShell()
StartListening(*pFormShell);
}
- BOOL bSetExtInpCntxt = sal_False;
+ sal_Bool bSetExtInpCntxt = sal_False;
nSelectionType = nNewSelectionType;
ShellModes eShellMode;
@@ -542,7 +542,7 @@ IMPL_LINK( SwView, AttrChangedNotify, SwWrtShell *, EMPTYARG )
// actual cursor position is a post-it field
// SwRect aFldRect;
// SwContentAtPos aCntntAtPos( SwContentAtPos::SW_FIELD);
-// if( pWrtShell->GetContentAtPos( pWrtShell->GetCrsrDocPos(), aCntntAtPos, FALSE, &aFldRect ) )
+// if( pWrtShell->GetContentAtPos( pWrtShell->GetCrsrDocPos(), aCntntAtPos, sal_False, &aFldRect ) )
// {
// const SwField* pFld = aCntntAtPos.aFnd.pFld;
// if (pFld->Which()== RES_POSTITFLD)
@@ -582,8 +582,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;
@@ -779,9 +779,9 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh )
nLastPasteDestination( 0xFFFF ),
nLeftBorderDistance( 0 ),
nRightBorderDistance( 0 ),
- bInMailMerge(FALSE),
- bInDtor(FALSE),
- bOldShellWasPagePreView(FALSE)
+ bInMailMerge(sal_False),
+ bInDtor(sal_False),
+ bOldShellWasPagePreView(sal_False)
{
// OD 18.12.2002 #103492# - According to discussion with MBA and further
// investigations, no old SfxViewShell will be set as parameter <pOldSh>,
@@ -799,8 +799,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"));
@@ -809,7 +809,7 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh )
aTimer.SetTimeout( 120 );
SwDocShell* pDocSh = PTR_CAST( SwDocShell, _pFrame->GetObjectShell() );
- BOOL bOldModifyFlag = pDocSh->IsEnableSetModified();
+ sal_Bool bOldModifyFlag = pDocSh->IsEnableSetModified();
if(bOldModifyFlag)
pDocSh->EnableSetModified( sal_False );
ASSERT( pDocSh, "View ohne DocShell." );
@@ -825,7 +825,7 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh )
aUsrPref.SetOnlineSpell( aLinguOpt.bIsSpellAuto );
- sal_Bool bOldShellWasSrcView = FALSE;
+ sal_Bool bOldShellWasSrcView = sal_False;
// OD 18.12.2002 #103492# - determine, if there is an existing view for
// document
@@ -848,11 +848,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))
@@ -939,8 +939,8 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh )
aUsrPref.SetViewVRuler(sal_False);
}
- StartListening( *pViewFrame, TRUE );
- StartListening( *pDocSh, TRUE );
+ StartListening( *pViewFrame, sal_True );
+ StartListening( *pDocSh, sal_True );
// Vom HLineal den ZOOM-Faktor einstellen
Fraction aZoomFract( aUsrPref.GetZoom(), 100 );
@@ -973,11 +973,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());
@@ -1008,7 +1006,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
@@ -1020,7 +1018,7 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh )
// so setze das Modified NICHT zurueck.
// --> OD 2005-02-11 #i38810# - no reset of modified state, if document
// was already modified.
- if ( !pWrtShell->GetDoc()->IsUndoNoResetModified() &&
+ if (!pWrtShell->GetDoc()->GetIDocumentUndoRedo().IsUndoNoResetModified() &&
( !pFirst || pFirst == pVFrame ) &&
!bIsDocModified )
// <--
@@ -1081,7 +1079,7 @@ SwView::~SwView()
mpPostItMgr = 0;
// <--
- bInDtor = TRUE;
+ bInDtor = sal_True;
pEditWin->Hide(); // damit kein Paint Aerger machen kann!
// An der SwDocShell den Pointer auf die View ruecksetzen
SwDocShell* pDocSh = GetDocShell();
@@ -1275,7 +1273,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 );
@@ -1286,7 +1284,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;
}
@@ -1584,8 +1582,8 @@ void SwView::WriteUserDataSequence ( uno::Sequence < beans::PropertyValue >& rSe
void SwView::ShowCursor( FASTBOOL bOn )
{
//JP 10.10.2001: Bug 90461 - don't scroll the cursor into the visible area
- BOOL bUnlockView = !pWrtShell->IsViewLocked();
- pWrtShell->LockView( TRUE ); //lock visible section
+ sal_Bool bUnlockView = !pWrtShell->IsViewLocked();
+ pWrtShell->LockView( sal_True ); //lock visible section
if( !bOn )
pWrtShell->HideCrsr();
@@ -1593,7 +1591,7 @@ void SwView::ShowCursor( FASTBOOL bOn )
pWrtShell->ShowCrsr();
if( bUnlockView )
- pWrtShell->LockView( FALSE );
+ pWrtShell->LockView( sal_False );
}
@@ -1665,7 +1663,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();
@@ -1833,9 +1831,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(
@@ -1848,7 +1846,7 @@ BOOL SwView::IsPasteAllowed()
*pWrtShell, aDataHelper );
}
else
- bPasteState = bPasteSpecialState = FALSE;
+ bPasteState = bPasteSpecialState = sal_False;
if( 0xFFFF == nLastPasteDestination ) // the init value
pViewImpl->AddClipboardListener();
@@ -1857,12 +1855,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(
@@ -1875,7 +1873,7 @@ BOOL SwView::IsPasteSpecialAllowed()
*pWrtShell, aDataHelper );
}
else
- bPasteState = bPasteSpecialState = FALSE;
+ bPasteState = bPasteSpecialState = sal_False;
if( 0xFFFF == nLastPasteDestination ) // the init value
pViewImpl->AddClipboardListener();
diff --git a/sw/source/ui/uiview/view0.cxx b/sw/source/ui/uiview/view0.cxx
index 9e05102b93..87ebb24116 100644
--- a/sw/source/ui/uiview/view0.cxx
+++ b/sw/source/ui/uiview/view0.cxx
@@ -199,7 +199,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)
@@ -243,7 +243,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;
@@ -345,7 +345,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 )
@@ -360,13 +360,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:
@@ -446,7 +446,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:
@@ -535,15 +535,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 94ec7895b8..5d6152de1c 100644
--- a/sw/source/ui/uiview/view1.cxx
+++ b/sw/source/ui/uiview/view1.cxx
@@ -69,7 +69,7 @@ extern int bDocSzUpdated;
--------------------------------------------------------------------*/
-void SwView::Activate(BOOL bMDIActivate)
+void SwView::Activate(sal_Bool bMDIActivate)
{
// aktuelle View anmelden an der DocShell
// die View bleibt solange an der DocShell
@@ -91,23 +91,23 @@ void SwView::Activate(BOOL bMDIActivate)
pWrtShell->MakeSelVisible();
bMakeSelectionVisible = sal_False;
}
- pHRuler->SetActive( TRUE );
- pVRuler->SetActive( TRUE );
+ pHRuler->SetActive( sal_True );
+ pVRuler->SetActive( sal_True );
if ( bMDIActivate )
{
- pWrtShell->ShGetFcs(FALSE); // Selektionen sichtbar
+ pWrtShell->ShGetFcs(sal_False); // Selektionen sichtbar
if( sSwViewData.Len() )
{
- ReadUserData( sSwViewData, FALSE );
+ ReadUserData( sSwViewData, sal_False );
sSwViewData.Erase();
}
AttrChangedNotify(pWrtShell);
// Flddlg ggf neu initialisieren (z.B. fuer TYP_SETVAR)
- USHORT nId = SwFldDlgWrapper::GetChildWindowId();
+ sal_uInt16 nId = SwFldDlgWrapper::GetChildWindowId();
SfxViewFrame* pVFrame = GetViewFrame();
SwFldDlgWrapper *pWrp = (SwFldDlgWrapper*)pVFrame->GetChildWindow(nId);
if (pWrp)
@@ -144,9 +144,9 @@ void SwView::Activate(BOOL bMDIActivate)
--------------------------------------------------------------------*/
-void SwView::Deactivate(BOOL bMDIActivate)
+void SwView::Deactivate(sal_Bool bMDIActivate)
{
- extern BOOL bFlushCharBuffer ;
+ extern sal_Bool bFlushCharBuffer ;
// Befinden sich noch Zeichen im Input Buffer?
if( bFlushCharBuffer )
GetEditWin().FlushInBuffer();
@@ -155,8 +155,8 @@ void SwView::Deactivate(BOOL bMDIActivate)
{
pWrtShell->ShLooseFcs(); // Selektionen unsichtbar
- pHRuler->SetActive( FALSE );
- pVRuler->SetActive( FALSE );
+ pHRuler->SetActive( sal_False );
+ pVRuler->SetActive( sal_False );
}
SfxViewShell::Deactivate(bMDIActivate);
}
diff --git a/sw/source/ui/uiview/view2.cxx b/sw/source/ui/uiview/view2.cxx
index 7f57fa3846..522a4cadd9 100644
--- a/sw/source/ui/uiview/view2.cxx
+++ b/sw/source/ui/uiview/view2.cxx
@@ -27,6 +27,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>
@@ -43,7 +44,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>
@@ -86,6 +87,7 @@
#include <uivwimp.hxx>
#include <docsh.hxx>
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <wrtsh.hxx>
#include <viewopt.hxx>
#include <basesh.hxx>
@@ -157,14 +159,14 @@ using namespace ::com::sun::star::container;
using namespace ::com::sun::star::ui::dialogs;
-static void lcl_SetAllTextToDefaultLanguage( SwWrtShell &rWrtSh, USHORT nWhichId )
+static void lcl_SetAllTextToDefaultLanguage( SwWrtShell &rWrtSh, sal_uInt16 nWhichId )
{
if (nWhichId == RES_CHRATR_LANGUAGE ||
nWhichId == RES_CHRATR_CJK_LANGUAGE ||
nWhichId == RES_CHRATR_CTL_LANGUAGE)
{
rWrtSh.StartAction();
- rWrtSh.LockView( TRUE );
+ rWrtSh.LockView( sal_True );
rWrtSh.Push();
// prepare to apply new language to all text in document
@@ -176,8 +178,8 @@ static void lcl_SetAllTextToDefaultLanguage( SwWrtShell &rWrtSh, USHORT nWhichId
aAttribs.Insert( nWhichId );
rWrtSh.ResetAttr( &aAttribs );
- rWrtSh.Pop( FALSE );
- rWrtSh.LockView( FALSE );
+ rWrtSh.Pop( sal_False );
+ rWrtSh.LockView( sal_False );
rWrtSh.EndAction();
}
}
@@ -186,7 +188,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();
@@ -253,15 +255,15 @@ int SwView::InsertGraphic( const String &rPath, const String &rFilter,
}
-BOOL SwView::InsertGraphicDlg( SfxRequest& rReq )
+sal_Bool SwView::InsertGraphicDlg( SfxRequest& rReq )
{
#ifndef ENABLE_PROP_WITHOUTLINK
#define ENABLE_PROP_WITHOUTLINK 0x08
#endif
- BOOL bReturn = FALSE;
+ sal_Bool bReturn = sal_False;
SwDocShell* pDocShell = GetDocShell();
- USHORT nHtmlMode = ::GetHtmlMode(pDocShell);
+ sal_uInt16 nHtmlMode = ::GetHtmlMode(pDocShell);
// im HTML-Mode nur verknuepft einfuegen
FileDialogHelper* pFileDlg = new FileDialogHelper( SFXWB_GRAPHIC | SFXWB_SHOWSTYLES );
pFileDlg->SetTitle(SW_RESSTR(STR_INSERT_GRAPHIC ));
@@ -278,8 +280,8 @@ BOOL SwView::InsertGraphicDlg( SfxRequest& rReq )
SvStringsSortDtor aFormats;
SwDoc* pDoc = pDocShell->GetDoc();
- const USHORT nArrLen = pDoc->GetFrmFmts()->Count();
- USHORT i;
+ const sal_uInt16 nArrLen = pDoc->GetFrmFmts()->Count();
+ sal_uInt16 i;
for( i = 0; i < nArrLen; i++ )
{
SwFrmFmt* pFmt = (*pDoc->GetFrmFmts())[ i ];
@@ -326,7 +328,7 @@ BOOL SwView::InsertGraphicDlg( SfxRequest& rReq )
}
SFX_REQUEST_ARG( rReq, pName, SfxStringItem, SID_INSERT_GRAPHIC , sal_False );
- BOOL bShowError = !pName;
+ sal_Bool bShowError = !pName;
if( pName || ERRCODE_NONE == pFileDlg->Execute() )
{
@@ -423,7 +425,7 @@ BOOL SwView::InsertGraphicDlg( SfxRequest& rReq )
if(!pFmt)
pFmt = pDoc->MakeFrmFmt(sGraphicFormat,
pDocShell->GetDoc()->GetDfltFrmFmt(),
- TRUE, FALSE);
+ sal_True, sal_False);
rSh.SetFrmFmt( pFmt );
}
@@ -464,12 +466,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;
@@ -480,10 +482,10 @@ BOOL SwView::InsertGraphicDlg( SfxRequest& rReq )
void __EXPORT SwView::Execute(SfxRequest &rReq)
{
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
const SfxItemSet* pArgs = rReq.GetArgs();
const SfxPoolItem* pItem;
- BOOL bIgnore = FALSE;
+ sal_Bool bIgnore = sal_False;
switch( nSlot )
{
case SID_CREATE_SW_DRAWVIEW:
@@ -529,7 +531,7 @@ void __EXPORT SwView::Execute(SfxRequest &rReq)
case FN_REDLINE_ON:
{
if( pArgs &&
- SFX_ITEM_SET == pArgs->GetItemState(nSlot, FALSE, &pItem ))
+ SFX_ITEM_SET == pArgs->GetItemState(nSlot, sal_False, &pItem ))
{
IDocumentRedlineAccess* pIDRA = pWrtShell->getIDocumentRedlineAccess();
Sequence <sal_Int8> aPasswd = pIDRA->GetRedlinePassword();
@@ -539,7 +541,7 @@ void __EXPORT SwView::Execute(SfxRequest &rReq)
// xmlsec05: new password dialog
Window* pParent;
const SfxPoolItem* pParentItem;
- if( SFX_ITEM_SET == pArgs->GetItemState( SID_ATTR_XWINDOW, FALSE, &pParentItem ) )
+ if( SFX_ITEM_SET == pArgs->GetItemState( SID_ATTR_XWINDOW, sal_False, &pParentItem ) )
pParent = ( ( const XWindowItem* ) pParentItem )->GetWindowPtr();
else
pParent = &GetViewFrame()->GetWindow();
@@ -558,8 +560,8 @@ void __EXPORT SwView::Execute(SfxRequest &rReq)
}
}
- USHORT nOn = ((const SfxBoolItem*)pItem)->GetValue() ? nsRedlineMode_t::REDLINE_ON : 0;
- USHORT nMode = pWrtShell->GetRedlineMode();
+ sal_uInt16 nOn = ((const SfxBoolItem*)pItem)->GetValue() ? nsRedlineMode_t::REDLINE_ON : 0;
+ sal_uInt16 nMode = pWrtShell->GetRedlineMode();
pWrtShell->SetRedlineModeAndCheckInsMode( (nMode & ~nsRedlineMode_t::REDLINE_ON) | nOn);
}
}
@@ -568,7 +570,7 @@ void __EXPORT SwView::Execute(SfxRequest &rReq)
{
IDocumentRedlineAccess* pIDRA = pWrtShell->getIDocumentRedlineAccess();
Sequence <sal_Int8> aPasswd = pIDRA->GetRedlinePassword();
- if( pArgs && SFX_ITEM_SET == pArgs->GetItemState(nSlot, FALSE, &pItem )
+ if( pArgs && SFX_ITEM_SET == pArgs->GetItemState(nSlot, sal_False, &pItem )
&& ((SfxBoolItem*)pItem)->GetValue() == ( aPasswd.getLength() != 0 ) )
break;
@@ -576,7 +578,7 @@ void __EXPORT SwView::Execute(SfxRequest &rReq)
// message box for wrong password
Window* pParent;
const SfxPoolItem* pParentItem;
- if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( SID_ATTR_XWINDOW, FALSE, &pParentItem ) )
+ if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( SID_ATTR_XWINDOW, sal_False, &pParentItem ) )
pParent = ( ( const XWindowItem* ) pParentItem )->GetWindowPtr();
else
pParent = &GetViewFrame()->GetWindow();
@@ -586,7 +588,7 @@ void __EXPORT SwView::Execute(SfxRequest &rReq)
aPasswdDlg.ShowExtras(SHOWEXTRAS_CONFIRM);
if (aPasswdDlg.Execute())
{
- USHORT nOn = nsRedlineMode_t::REDLINE_ON;
+ sal_uInt16 nOn = nsRedlineMode_t::REDLINE_ON;
String sNewPasswd( aPasswdDlg.GetPassword() );
Sequence <sal_Int8> aNewPasswd =
pIDRA->GetRedlinePassword();
@@ -600,20 +602,20 @@ void __EXPORT SwView::Execute(SfxRequest &rReq)
pIDRA->SetRedlinePassword(Sequence <sal_Int8> ());
nOn = 0;
}
- USHORT nMode = pIDRA->GetRedlineMode();
+ sal_uInt16 nMode = pIDRA->GetRedlineMode();
pWrtShell->SetRedlineModeAndCheckInsMode( (nMode & ~nsRedlineMode_t::REDLINE_ON) | nOn);
rReq.AppendItem( SfxBoolItem( FN_REDLINE_PROTECT, ((nMode&nsRedlineMode_t::REDLINE_ON)==0) ) );
}
else
- bIgnore = TRUE;
+ bIgnore = sal_True;
}
break;
case FN_REDLINE_SHOW:
if( pArgs &&
- SFX_ITEM_SET == pArgs->GetItemState(nSlot, FALSE, &pItem))
+ SFX_ITEM_SET == pArgs->GetItemState(nSlot, sal_False, &pItem))
{
- USHORT nMode = ( ~(nsRedlineMode_t::REDLINE_SHOW_INSERT | nsRedlineMode_t::REDLINE_SHOW_DELETE)
+ sal_uInt16 nMode = ( ~(nsRedlineMode_t::REDLINE_SHOW_INSERT | nsRedlineMode_t::REDLINE_SHOW_DELETE)
& pWrtShell->GetRedlineMode() ) | nsRedlineMode_t::REDLINE_SHOW_INSERT;
if( ((const SfxBoolItem*)pItem)->GetValue() )
nMode |= nsRedlineMode_t::REDLINE_SHOW_DELETE;
@@ -632,8 +634,8 @@ void __EXPORT SwView::Execute(SfxRequest &rReq)
Point aCrsrPos = pWrtShell->GetCrsrDocPos( sal_True );
if( pWrtShell->GetContentAtPos( aCrsrPos, aCntntAtPos ) )
{
- USHORT nCount = pWrtShell->GetRedlineCount();
- for( USHORT nRedline = 0; nRedline < nCount; ++nRedline )
+ sal_uInt16 nCount = pWrtShell->GetRedlineCount();
+ for( sal_uInt16 nRedline = 0; nRedline < nCount; ++nRedline )
{
const SwRedline& rRedline = pWrtShell->GetRedline( nRedline );
if( *aCntntAtPos.aFnd.pRedl == rRedline )
@@ -652,20 +654,20 @@ void __EXPORT SwView::Execute(SfxRequest &rReq)
case SID_DOCUMENT_MERGE:
{
String sFileName, sFilterName;
- INT16 nVersion = 0;
+ sal_Int16 nVersion = 0;
bool bHasFileName = false;
pViewImpl->SetParam( 0 );
if( pArgs )
{
- if( SFX_ITEM_SET == pArgs->GetItemState( SID_FILE_NAME, FALSE, &pItem ))
+ if( SFX_ITEM_SET == pArgs->GetItemState( SID_FILE_NAME, sal_False, &pItem ))
sFileName = ((const SfxStringItem*)pItem)->GetValue();
bHasFileName = ( sFileName.Len() > 0 );
- if( SFX_ITEM_SET == pArgs->GetItemState( SID_FILTER_NAME, FALSE, &pItem ))
+ if( SFX_ITEM_SET == pArgs->GetItemState( SID_FILTER_NAME, sal_False, &pItem ))
sFilterName = ((const SfxStringItem*)pItem)->GetValue();
- if( SFX_ITEM_SET == pArgs->GetItemState( SID_VERSION, FALSE, &pItem ))
+ if( SFX_ITEM_SET == pArgs->GetItemState( SID_VERSION, sal_False, &pItem ))
{
nVersion = ((const SfxInt16Item *)pItem)->GetValue();
pViewImpl->SetParam( nVersion );
@@ -685,7 +687,7 @@ void __EXPORT SwView::Execute(SfxRequest &rReq)
pVFrame->ShowChildWindow(FN_REDLINE_ACCEPT);
// RedlineDlg neu initialisieren
- USHORT nId = SwRedlineAcceptChild::GetChildWindowId();
+ sal_uInt16 nId = SwRedlineAcceptChild::GetChildWindowId();
SwRedlineAcceptChild *pRed = (SwRedlineAcceptChild*)
pVFrame->GetChildWindow(nId);
if (pRed)
@@ -693,12 +695,12 @@ void __EXPORT SwView::Execute(SfxRequest &rReq)
}
}
else
- bIgnore = TRUE;
+ bIgnore = sal_True;
}
break;
case FN_SYNC_LABELS:
case FN_MAILMERGE_CHILDWINDOW:
- GetViewFrame()->ShowChildWindow(nSlot, TRUE);
+ GetViewFrame()->ShowChildWindow(nSlot, sal_True);
break;
case FN_ESCAPE:
{
@@ -745,7 +747,7 @@ void __EXPORT SwView::Execute(SfxRequest &rReq)
}
else if ( GetEditWin().IsChainMode() )
{
- GetEditWin().SetChainMode( FALSE );
+ GetEditWin().SetChainMode( sal_False );
}
else if( pWrtShell->GetFlyFrmFmt() )
{
@@ -758,9 +760,9 @@ void __EXPORT SwView::Execute(SfxRequest &rReq)
}
else
{
- SfxBoolItem aItem( SID_WIN_FULLSCREEN, FALSE );
+ SfxBoolItem aItem( SID_WIN_FULLSCREEN, sal_False );
GetViewFrame()->GetDispatcher()->Execute( SID_WIN_FULLSCREEN, SFX_CALLMODE_RECORD, &aItem, 0L );
- bIgnore = TRUE;
+ bIgnore = sal_True;
}
}
break;
@@ -780,7 +782,7 @@ void __EXPORT SwView::Execute(SfxRequest &rReq)
{
if(pArgs)
{
- const USHORT nCurIdx = pWrtShell->GetCurPageDesc();
+ const sal_uInt16 nCurIdx = pWrtShell->GetCurPageDesc();
SwPageDesc aPageDesc( pWrtShell->GetPageDesc( nCurIdx ) );
::ItemSetToPageDesc( *pArgs, aPageDesc );
// Den Descriptor der Core veraendern.
@@ -824,12 +826,12 @@ void __EXPORT SwView::Execute(SfxRequest &rReq)
{
pWrtShell->StartAction();
pWrtShell->EnterStdMode();
- BOOL bOldCrsrInReadOnly = pWrtShell->IsReadOnlyAvailable();
- pWrtShell->SetReadOnlyAvailable( TRUE );
+ sal_Bool bOldCrsrInReadOnly = pWrtShell->IsReadOnlyAvailable();
+ pWrtShell->SetReadOnlyAvailable( sal_True );
- for( USHORT i = 0; i < 2; ++i )
+ for( sal_uInt16 i = 0; i < 2; ++i )
{
- USHORT nCount = pWrtShell->GetTOXCount();
+ sal_uInt16 nCount = pWrtShell->GetTOXCount();
if( 1 == nCount )
++i;
@@ -845,13 +847,13 @@ void __EXPORT SwView::Execute(SfxRequest &rReq)
pBase = pWrtShell->GetCurTOX();
}
- BOOL bAutoMarkApplied = FALSE;
+ sal_Bool bAutoMarkApplied = sal_False;
while( pBase )
{
if(TOX_INDEX == pBase->GetType() && !bAutoMarkApplied)
{
pWrtShell->ApplyAutoMark();
- bAutoMarkApplied = TRUE;
+ bAutoMarkApplied = sal_True;
}
// JP 15.07.96: das pBase wird nur fuer die Schnittstelle
// benoetigt. Muss mal umgetstellt werden!!!
@@ -869,9 +871,9 @@ void __EXPORT SwView::Execute(SfxRequest &rReq)
break;
case SID_ATTR_BRUSH:
{
- if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(RES_BACKGROUND, FALSE, &pItem))
+ if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(RES_BACKGROUND, sal_False, &pItem))
{
- const USHORT nCurIdx = pWrtShell->GetCurPageDesc();
+ const sal_uInt16 nCurIdx = pWrtShell->GetCurPageDesc();
SwPageDesc aDesc( pWrtShell->GetPageDesc( nCurIdx ));
SwFrmFmt& rMaster = aDesc.GetMaster();
rMaster.SetFmtAttr(*pItem);
@@ -892,14 +894,14 @@ void __EXPORT SwView::Execute(SfxRequest &rReq)
case FN_INSERT_CTRL:
case FN_INSERT_OBJ_CTRL:
{
- if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(nSlot, FALSE, &pItem))
+ if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(nSlot, sal_False, &pItem))
{
- USHORT nValue = ((SfxUInt16Item*)pItem)->GetValue();
+ sal_uInt16 nValue = ((SfxUInt16Item*)pItem)->GetValue();
switch ( nSlot )
{
case FN_INSERT_CTRL:
{
- BOOL bWeb = 0 != PTR_CAST(SwWebView, this);
+ sal_Bool bWeb = 0 != PTR_CAST(SwWebView, this);
if(bWeb)
SwView::nWebInsertCtrlState = nValue;
else
@@ -922,17 +924,17 @@ void __EXPORT SwView::Execute(SfxRequest &rReq)
case SID_ATTR_DEFTABSTOP:
{
- if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(SID_ATTR_DEFTABSTOP, FALSE, &pItem))
+ if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(SID_ATTR_DEFTABSTOP, sal_False, &pItem))
{
SvxTabStopItem aDefTabs( 0, 0, SVX_TAB_ADJUST_DEFAULT, RES_PARATR_TABSTOP );
- USHORT nTab = ((const SfxUInt16Item*)pItem)->GetValue();
+ sal_uInt16 nTab = ((const SfxUInt16Item*)pItem)->GetValue();
MakeDefTabs( nTab, aDefTabs );
pWrtShell->SetDefault( aDefTabs );
}
}
break;
case SID_ATTR_LANGUAGE :
- if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(SID_ATTR_LANGUAGE, FALSE, &pItem))
+ if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(SID_ATTR_LANGUAGE, sal_False, &pItem))
{
SvxLanguageItem aLang(((SvxLanguageItem*)pItem)->GetLanguage(), RES_CHRATR_LANGUAGE);
pWrtShell->SetDefault( aLang );
@@ -940,21 +942,21 @@ void __EXPORT SwView::Execute(SfxRequest &rReq)
}
break;
case SID_ATTR_CHAR_CTL_LANGUAGE:
- if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(RES_CHRATR_CTL_LANGUAGE, FALSE, &pItem))
+ if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(RES_CHRATR_CTL_LANGUAGE, sal_False, &pItem))
{
pWrtShell->SetDefault( *pItem );
lcl_SetAllTextToDefaultLanguage( *pWrtShell, RES_CHRATR_CTL_LANGUAGE );
}
break;
case SID_ATTR_CHAR_CJK_LANGUAGE:
- if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(RES_CHRATR_CJK_LANGUAGE, FALSE, &pItem))
+ if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(RES_CHRATR_CJK_LANGUAGE, sal_False, &pItem))
{
pWrtShell->SetDefault( *pItem );
lcl_SetAllTextToDefaultLanguage( *pWrtShell, RES_CHRATR_CJK_LANGUAGE );
}
break;
case FN_SCROLL_NEXT_PREV:
- if(pArgs && pArgs->GetItemState(FN_SCROLL_NEXT_PREV, FALSE, &pItem))
+ if(pArgs && pArgs->GetItemState(FN_SCROLL_NEXT_PREV, sal_False, &pItem))
{
// call the handlers of PageUp/DownButtons, only
bool* pbNext = new bool ( ((const SfxBoolItem*)pItem)->GetValue() );
@@ -963,7 +965,7 @@ void __EXPORT SwView::Execute(SfxRequest &rReq)
}
break;
case SID_JUMPTOMARK:
- if( pArgs && SFX_ITEM_SET == pArgs->GetItemState(SID_JUMPTOMARK, FALSE, &pItem))
+ if( pArgs && SFX_ITEM_SET == pArgs->GetItemState(SID_JUMPTOMARK, sal_False, &pItem))
JumpToSwMark( (( const SfxStringItem*)pItem)->GetValue() );
break;
case SID_GALLERY :
@@ -979,15 +981,15 @@ void __EXPORT SwView::Execute(SfxRequest &rReq)
if(pVFrame->HasChildWindow(SID_BROWSER))
{
const SwDBData& rData = GetWrtShell().GetDBDesc();
- SW_MOD()->ShowDBObj(*this, rData, FALSE);
+ SW_MOD()->ShowDBObj(*this, rData, sal_False);
}
}
break;
case FN_INSERT_FIELD_DATA_ONLY :
{
- BOOL bShow = FALSE;
+ sal_Bool bShow = sal_False;
if( pArgs &&
- SFX_ITEM_SET == pArgs->GetItemState(nSlot, FALSE, &pItem ))
+ SFX_ITEM_SET == pArgs->GetItemState(nSlot, sal_False, &pItem ))
bShow = ((const SfxBoolItem*)pItem)->GetValue();
//GetViewFrame()->ShowChildWindow(nSlot, bShow && bInMailMerge);
if((bShow && bInMailMerge) != GetViewFrame()->HasChildWindow(nSlot))
@@ -1015,7 +1017,7 @@ void __EXPORT SwView::Execute(SfxRequest &rReq)
pValues[0].Value <<= aData.sDataSource;
pValues[1].Value <<= aData.sCommand;
pValues[2].Value <<= aData.nCommandType;
- pNewDBMgr->ExecuteFormLetter(rSh, aProperties, TRUE);
+ pNewDBMgr->ExecuteFormLetter(rSh, aProperties, sal_True);
}
}
bInMailMerge &= bShow;
@@ -1024,8 +1026,8 @@ void __EXPORT SwView::Execute(SfxRequest &rReq)
break;
case FN_QRY_MERGE:
{
- BOOL bUseCurrentDocument = TRUE;
- BOOL bQuery = !pArgs||SFX_ITEM_SET != pArgs->GetItemState(nSlot);
+ sal_Bool bUseCurrentDocument = sal_True;
+ sal_Bool bQuery = !pArgs||SFX_ITEM_SET != pArgs->GetItemState(nSlot);
if(bQuery)
{
SfxViewFrame* pTmpFrame = GetViewFrame();
@@ -1086,7 +1088,7 @@ void __EXPORT SwView::Execute(SfxRequest &rReq)
case SID_ALIGN_ANY_HDEFAULT :
case SID_ALIGN_ANY_VDEFAULT :
{
- USHORT nAlias = 0;
+ sal_uInt16 nAlias = 0;
if( nSelectionType & (nsSelectionType::SEL_DRW_TXT|nsSelectionType::SEL_TXT) )
{
switch( nSlot )
@@ -1160,7 +1162,7 @@ void __EXPORT SwView::Execute(SfxRequest &rReq)
Beschreibung: SeitenNr-Feld invalidieren
--------------------------------------------------------------------*/
-void SwView::UpdatePageNums(USHORT nPhyNum, USHORT nVirtNum, const String& rPgStr)
+void SwView::UpdatePageNums(sal_uInt16 nPhyNum, sal_uInt16 nVirtNum, const String& rPgStr)
{
String sTemp(GetPageStr( nPhyNum, nVirtNum, rPgStr ));
const SfxStringItem aTmp( FN_STAT_PAGE, sTemp );
@@ -1179,7 +1181,7 @@ void SwView::StateStatusLine(SfxItemSet &rSet)
SwWrtShell& rShell = GetWrtShell();
SfxWhichIter aIter( rSet );
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
ASSERT( nWhich, "leeres Set");
while( nWhich )
@@ -1200,24 +1202,24 @@ void SwView::StateStatusLine(SfxItemSet &rSet)
else
*/ {
// Anzahl der Seiten, log. SeitenNr. SeitenNr ermitteln
- USHORT nPage, nLogPage;
+ sal_uInt16 nPage, nLogPage;
String sDisplay;
rShell.GetPageNumber( -1, rShell.IsCrsrVisible(), nPage, nLogPage, sDisplay );
rSet.Put( SfxStringItem( FN_STAT_PAGE,
GetPageStr( nPage, nLogPage, sDisplay) ));
- USHORT nCnt = GetWrtShell().GetPageCnt();
+ sal_uInt16 nCnt = GetWrtShell().GetPageCnt();
if (nPageCnt != nCnt) // Basic benachrichtigen
{
nPageCnt = nCnt;
- SFX_APP()->NotifyEvent(SfxEventHint(SW_EVENT_PAGE_COUNT, SwDocShell::GetEventName(STR_SW_EVENT_PAGE_COUNT), GetViewFrame()->GetObjectShell()), FALSE);
+ SFX_APP()->NotifyEvent(SfxEventHint(SW_EVENT_PAGE_COUNT, SwDocShell::GetEventName(STR_SW_EVENT_PAGE_COUNT), GetViewFrame()->GetObjectShell()), sal_False);
}
}
break;
case FN_STAT_TEMPLATE:
{
rSet.Put(SfxStringItem( FN_STAT_TEMPLATE,
- rShell.GetCurPageStyle(FALSE)));
+ rShell.GetCurPageStyle(sal_False)));
}
break;
@@ -1248,7 +1250,7 @@ void SwView::StateStatusLine(SfxItemSet &rSet)
if ( ( GetDocShell()->GetCreateMode() != SFX_CREATE_MODE_EMBEDDED ) || !GetDocShell()->IsInPlaceActive() )
{
const SwViewOption* pVOpt = rShell.GetViewOptions();
- const USHORT nColumns = pVOpt->GetViewLayoutColumns();
+ const sal_uInt16 nColumns = pVOpt->GetViewLayoutColumns();
const bool bBookMode = pVOpt->IsViewLayoutBookMode();
SvxViewLayoutItem aViewLayout(nColumns, bBookMode);
rSet.Put( aViewLayout );
@@ -1262,13 +1264,13 @@ void SwView::StateStatusLine(SfxItemSet &rSet)
if ( ( GetDocShell()->GetCreateMode() != SFX_CREATE_MODE_EMBEDDED ) || !GetDocShell()->IsInPlaceActive() )
{
const SwViewOption* pVOpt = rShell.GetViewOptions();
- const USHORT nCurrentZoom = pVOpt->GetZoom();
+ const sal_uInt16 nCurrentZoom = pVOpt->GetZoom();
SvxZoomSliderItem aZoomSliderItem( nCurrentZoom, MINZOOM, MAXZOOM );
aZoomSliderItem.AddSnappingPoint( 100 );
if ( !pWrtShell->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE) )
{
- const USHORT nColumns = pVOpt->GetViewLayoutColumns();
+ const sal_uInt16 nColumns = pVOpt->GetViewLayoutColumns();
const bool bAutomaticViewLayout = 0 == nColumns;
const SwPostItMgr* pMgr = GetPostItMgr();
@@ -1386,7 +1388,7 @@ void SwView::StateStatusLine(SfxItemSet &rSet)
//const SwNumRule* pNumRule = rShell.GetCurNumRule();
//if (pNumRule) // Cursor in Numerierung
//{
- // BYTE nNumLevel = rShell.GetNumLevel();
+ // sal_uInt8 nNumLevel = rShell.GetNumLevel();
// if( IsShowNum(nNumLevel) && MAXLEVEL >
// ( nNumLevel = GetRealLevel( nNumLevel )) )
// {
@@ -1401,7 +1403,7 @@ void SwView::StateStatusLine(SfxItemSet &rSet)
// rShell.GetCurAttr(aSet);
// /* const SfxPoolItem* pItem; */
// if(SFX_ITEM_AVAILABLE <=
- // aSet.GetItemState(RES_PARATR_NUMRULE, TRUE
+ // aSet.GetItemState(RES_PARATR_NUMRULE, sal_True
// /*, &pItem */ ))
// {
// const String& rNumStyle =
@@ -1427,7 +1429,7 @@ void SwView::StateStatusLine(SfxItemSet &rSet)
if (pNumRule && !bOutlineNum ) // Cursor in Numerierung
{
- BYTE nNumLevel = rShell.GetNumLevel();
+ sal_uInt8 nNumLevel = rShell.GetNumLevel();
// --> OD 2008-04-02 #refactorlists#
// if( IsShowNum(nNumLevel) && MAXLEVEL >
// ( nNumLevel = GetRealLevel( nNumLevel )) )
@@ -1441,7 +1443,7 @@ void SwView::StateStatusLine(SfxItemSet &rSet)
rShell.GetCurAttr(aSet);
/* const SfxPoolItem* pItem; */
if(SFX_ITEM_AVAILABLE <=
- aSet.GetItemState(RES_PARATR_NUMRULE, TRUE
+ aSet.GetItemState(RES_PARATR_NUMRULE, sal_True
/*, &pItem */ ))
{
const String& rNumStyle =
@@ -1527,8 +1529,8 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq)
SwWrtShell &rSh = GetWrtShell();
const SfxItemSet* pArgs = rReq.GetArgs();
const SfxPoolItem* pItem=NULL;
- BOOL bUp = FALSE;
- USHORT nWhich = rReq.GetSlot();
+ sal_Bool bUp = sal_False;
+ sal_uInt16 nWhich = rReq.GetSlot();
switch( nWhich )
{
case FN_STAT_PAGE:
@@ -1541,7 +1543,7 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq)
case FN_STAT_BOOKMARK:
if ( pArgs )
{
- if (SFX_ITEM_SET == pArgs->GetItemState( nWhich, TRUE, &pItem))
+ if (SFX_ITEM_SET == pArgs->GetItemState( nWhich, sal_True, &pItem))
{
const IDocumentMarkAccess* pMarkAccess = rSh.getIDocumentMarkAccess();
const sal_Int32 nIdx = static_cast<const SfxUInt16Item*>(pItem)->GetValue();
@@ -1613,19 +1615,19 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq)
// PAGES01
const SfxPoolItem* pViewLayoutItem = 0;
- if ( pSet && SFX_ITEM_SET == pSet->GetItemState(SID_ATTR_VIEWLAYOUT, TRUE, &pViewLayoutItem))
+ if ( pSet && SFX_ITEM_SET == pSet->GetItemState(SID_ATTR_VIEWLAYOUT, sal_True, &pViewLayoutItem))
{
- const USHORT nColumns = ((const SvxViewLayoutItem *)pViewLayoutItem)->GetValue();
+ const sal_uInt16 nColumns = ((const SvxViewLayoutItem *)pViewLayoutItem)->GetValue();
const bool bBookMode = ((const SvxViewLayoutItem *)pViewLayoutItem)->IsBookMode();
SetViewLayout( nColumns, bBookMode );
}
- if ( pSet && SFX_ITEM_SET == pSet->GetItemState(SID_ATTR_ZOOM, TRUE, &pItem))
+ if ( pSet && SFX_ITEM_SET == pSet->GetItemState(SID_ATTR_ZOOM, sal_True, &pItem))
{
enum SvxZoomType eType = ((const SvxZoomItem *)pItem)->GetType();
SetZoom( eType, ((const SvxZoomItem *)pItem)->GetValue() );
}
- bUp = TRUE;
+ bUp = sal_True;
if ( pItem )
rReq.AppendItem( *pItem );
rReq.Done();
@@ -1641,9 +1643,9 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq)
( ( GetDocShell()->GetCreateMode() != SFX_CREATE_MODE_EMBEDDED ) || !GetDocShell()->IsInPlaceActive() ) )
{
// PAGES01
- if ( SFX_ITEM_SET == pArgs->GetItemState(SID_ATTR_VIEWLAYOUT, TRUE, &pItem ))
+ if ( SFX_ITEM_SET == pArgs->GetItemState(SID_ATTR_VIEWLAYOUT, sal_True, &pItem ))
{
- const USHORT nColumns = ((const SvxViewLayoutItem *)pItem)->GetValue();
+ const sal_uInt16 nColumns = ((const SvxViewLayoutItem *)pItem)->GetValue();
const bool bBookMode = (0 == nColumns || 0 != (nColumns % 2)) ?
false :
((const SvxViewLayoutItem *)pItem)->IsBookMode();
@@ -1651,7 +1653,7 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq)
SetViewLayout( nColumns, bBookMode );
}
- bUp = TRUE;
+ bUp = sal_True;
rReq.Done();
InvalidateRulerPos();
@@ -1664,13 +1666,13 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq)
if ( pArgs && ( ( GetDocShell()->GetCreateMode() != SFX_CREATE_MODE_EMBEDDED ) || !GetDocShell()->IsInPlaceActive() ) )
{
// PAGES01
- if ( SFX_ITEM_SET == pArgs->GetItemState(SID_ATTR_ZOOMSLIDER, TRUE, &pItem ))
+ if ( SFX_ITEM_SET == pArgs->GetItemState(SID_ATTR_ZOOMSLIDER, sal_True, &pItem ))
{
- const USHORT nCurrentZoom = ((const SvxZoomSliderItem *)pItem)->GetValue();
+ const sal_uInt16 nCurrentZoom = ((const SvxZoomSliderItem *)pItem)->GetValue();
SetZoom( SVX_ZOOM_PERCENT, nCurrentZoom );
}
- bUp = TRUE;
+ bUp = sal_True;
rReq.Done();
}
}
@@ -1678,7 +1680,7 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq)
case SID_ATTR_SIZE:
{
- ULONG nId = FN_INSERT_FIELD;
+ sal_uLong nId = FN_INSERT_FIELD;
if( rSh.IsCrsrInTbl() )
nId = FN_FORMAT_TABLE_DLG;
else if( rSh.GetCurTOX() )
@@ -1705,7 +1707,7 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq)
}
if( nId )
GetViewFrame()->GetDispatcher()->Execute(
- static_cast< USHORT >( nId ), SFX_CALLMODE_SYNCHRON | SFX_CALLMODE_RECORD );
+ static_cast< sal_uInt16 >( nId ), SFX_CALLMODE_SYNCHRON | SFX_CALLMODE_RECORD );
}
break;
@@ -1713,7 +1715,7 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq)
{
if ( pArgs )
{
- if (SFX_ITEM_SET == pArgs->GetItemState( nWhich, TRUE, &pItem))
+ if (SFX_ITEM_SET == pArgs->GetItemState( nWhich, sal_True, &pItem))
{
switch ( ((const SfxUInt16Item *)pItem)->GetValue() )
{
@@ -1742,23 +1744,23 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq)
else
rSh.ToggleBlockMode();
}
- bUp = TRUE;
+ bUp = sal_True;
break;
}
case FN_SET_ADD_MODE:
rSh.ToggleAddMode();
nWhich = FN_STAT_SELMODE;
- bUp = TRUE;
+ bUp = sal_True;
break;
case FN_SET_BLOCK_MODE:
rSh.ToggleBlockMode();
nWhich = FN_STAT_SELMODE;
- bUp = TRUE;
+ bUp = sal_True;
break;
case FN_SET_EXT_MODE:
rSh.ToggleExtMode();
nWhich = FN_STAT_SELMODE;
- bUp = TRUE;
+ bUp = sal_True;
break;
case SID_ATTR_INSERT:
SwPostItMgr* pMgr = GetPostItMgr();
@@ -1768,7 +1770,7 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq)
}
else
rSh.ToggleInsMode();
- bUp = TRUE;
+ bUp = sal_True;
break;
}
@@ -1780,11 +1782,11 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq)
}
}
-void SwView::InsFrmMode(USHORT nCols)
+void SwView::InsFrmMode(sal_uInt16 nCols)
{
if ( pWrtShell->HasWholeTabSelection() )
{
- SwFlyFrmAttrMgr aMgr( TRUE, pWrtShell, FRMMGR_TYPE_TEXT );
+ SwFlyFrmAttrMgr aMgr( sal_True, pWrtShell, FRMMGR_TYPE_TEXT );
const SwFrmFmt &rPageFmt =
pWrtShell->GetPageDesc(pWrtShell->GetCurPageDesc()).GetMaster();
@@ -1810,7 +1812,7 @@ void SwView::InsFrmMode(USHORT nCols)
void SwView::EditLinkDlg()
{
- BOOL bWeb = 0 != PTR_CAST(SwWebView, this);
+ sal_Bool bWeb = 0 != PTR_CAST(SwWebView, this);
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
SfxAbstractLinksDialog* pDlg = pFact->CreateLinksDialog( &GetViewFrame()->GetWindow(), &GetWrtShell().GetLinkManager(), bWeb );
if ( pDlg )
@@ -1827,22 +1829,22 @@ void SwView::EditLinkDlg()
*/
}
-BOOL SwView::JumpToSwMark( const String& rMark )
+sal_Bool SwView::JumpToSwMark( const String& rMark )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( rMark.Len() )
{
// wir wollen den Bookmark aber am oberen Rand haben
- BOOL bSaveCC = IsCrsrAtCenter();
- BOOL bSaveCT = IsCrsrAtTop();
- SetCrsrAtTop( TRUE );
+ sal_Bool bSaveCC = IsCrsrAtCenter();
+ sal_Bool bSaveCT = IsCrsrAtTop();
+ SetCrsrAtTop( sal_True );
//JP 27.04.98: Bug 49786
// Damit in FrameSet auch gescrollt werden kann, muss die
// entsprechende Shell auch das Focus-Flag gesetzt haben!
- BOOL bHasShFocus = pWrtShell->HasShFcs();
+ sal_Bool bHasShFocus = pWrtShell->HasShFcs();
if( !bHasShFocus )
- pWrtShell->ShGetFcs( FALSE );
+ pWrtShell->ShGetFcs( sal_False );
const SwFmtINetFmt* pINet;
String sCmp, sMark( INetURLObject::decode( rMark, INET_HEX_ESCAPE,
@@ -1898,22 +1900,22 @@ BOOL SwView::JumpToSwMark( const String& rMark )
TransliterationModules_IGNORE_CASE );
//todo/mba: assuming that notes shouldn't be searched
- BOOL bSearchInNotes = FALSE;
+ sal_Bool bSearchInNotes = sal_False;
if( pWrtShell->SearchPattern( aSearchOpt, bSearchInNotes, DOCPOS_START, DOCPOS_END ))
{
pWrtShell->EnterStdMode(); // Selektion wieder aufheben
- bRet = TRUE;
+ bRet = sal_True;
}
}
else if( pMarkAccess->getMarksEnd() != (ppMark = pMarkAccess->findMark(sMark)) )
- pWrtShell->GotoMark( ppMark->get(), FALSE, TRUE ), bRet = TRUE;
+ pWrtShell->GotoMark( ppMark->get(), sal_False, sal_True ), bRet = sal_True;
else if( 0 != ( pINet = pWrtShell->FindINetAttr( sMark ) ))
bRet = pWrtShell->GotoINetAttr( *pINet->GetTxtINetFmt() );
// fuer alle Arten von Flys
if( FLYCNTTYPE_ALL != eFlyType && pWrtShell->GotoFly( sName, eFlyType ))
{
- bRet = TRUE;
+ bRet = sal_True;
if( FLYCNTTYPE_FRM == eFlyType )
{
// TextFrames: Cursor in den Frame setzen
@@ -1928,7 +1930,7 @@ BOOL SwView::JumpToSwMark( const String& rMark )
}
}
else if( pMarkAccess->getMarksEnd() != (ppMark = pMarkAccess->findMark(sMark)))
- pWrtShell->GotoMark( ppMark->get(), FALSE, TRUE ), bRet = TRUE;
+ pWrtShell->GotoMark( ppMark->get(), sal_False, sal_True ), bRet = sal_True;
else if( 0 != ( pINet = pWrtShell->FindINetAttr( sMark ) ))
bRet = pWrtShell->GotoINetAttr( *pINet->GetTxtINetFmt() );
@@ -1959,9 +1961,9 @@ sal_uInt16 lcl_PageDescWithHeader( const SwDoc& rDoc )
const SwPageDesc& rPageDesc = rDoc.GetPageDesc( i );
const SwFrmFmt& rMaster = rPageDesc.GetMaster();
const SfxPoolItem* pItem;
- if( ( SFX_ITEM_SET == rMaster.GetAttrSet().GetItemState( RES_HEADER, FALSE, &pItem ) &&
+ if( ( SFX_ITEM_SET == rMaster.GetAttrSet().GetItemState( RES_HEADER, sal_False, &pItem ) &&
((SwFmtHeader*)pItem)->IsActive() ) ||
- ( SFX_ITEM_SET == rMaster.GetAttrSet().GetItemState( RES_FOOTER, FALSE, &pItem ) &&
+ ( SFX_ITEM_SET == rMaster.GetAttrSet().GetItemState( RES_FOOTER, sal_False, &pItem ) &&
((SwFmtFooter*)pItem)->IsActive()) )
++nRet;
}
@@ -1976,7 +1978,7 @@ void SwView::ExecuteInsertDoc( SfxRequest& rRequest, const SfxPoolItem* pItem )
{
pViewImpl->InitRequest( rRequest );
pViewImpl->SetParam( pItem ? 1 : 0 );
- USHORT nSlot = rRequest.GetSlot();
+ sal_uInt16 nSlot = rRequest.GetSlot();
if ( !pItem )
{
@@ -1987,7 +1989,7 @@ void SwView::ExecuteInsertDoc( SfxRequest& rRequest, const SfxPoolItem* pItem )
{
String sFile, sFilter;
sFile = ( (const SfxStringItem *)pItem )->GetValue();
- if ( SFX_ITEM_SET == rRequest.GetArgs()->GetItemState( FN_PARAM_1, TRUE, &pItem ) )
+ if ( SFX_ITEM_SET == rRequest.GetArgs()->GetItemState( FN_PARAM_1, sal_True, &pItem ) )
sFilter = ( (const SfxStringItem *)pItem )->GetValue();
bool bHasFileName = ( sFile.Len() > 0 );
@@ -2001,7 +2003,7 @@ void SwView::ExecuteInsertDoc( SfxRequest& rRequest, const SfxPoolItem* pItem )
}
}
-long SwView::InsertDoc( USHORT nSlotId, const String& rFileName, const String& rFilterName, INT16 nVersion )
+long SwView::InsertDoc( sal_uInt16 nSlotId, const String& rFileName, const String& rFilterName, sal_Int16 nVersion )
{
SfxMedium* pMed = 0;
SwDocShell* pDocSh = GetDocShell();
@@ -2012,17 +2014,17 @@ long SwView::InsertDoc( USHORT nSlotId, const String& rFileName, const String& r
const SfxFilter* pFilter = rFact.GetFilterContainer()->GetFilter4FilterName( rFilterName );
if ( !pFilter )
{
- pMed = new SfxMedium(rFileName, STREAM_READ, TRUE, 0, 0 );
+ pMed = new SfxMedium(rFileName, STREAM_READ, sal_True, 0, 0 );
SfxFilterMatcher aMatcher( rFact.GetFilterContainer()->GetName() );
- pMed->UseInteractionHandler( TRUE );
- ErrCode nErr = aMatcher.GuessFilter( *pMed, &pFilter, FALSE );
+ pMed->UseInteractionHandler( sal_True );
+ ErrCode nErr = aMatcher.GuessFilter( *pMed, &pFilter, sal_False );
if ( nErr )
DELETEZ(pMed);
else
pMed->SetFilter( pFilter );
}
else
- pMed = new SfxMedium(rFileName, STREAM_READ, TRUE, pFilter, 0);
+ pMed = new SfxMedium(rFileName, STREAM_READ, sal_True, pFilter, 0);
}
else
{
@@ -2037,21 +2039,21 @@ long SwView::InsertDoc( USHORT nSlotId, const String& rFileName, const String& r
return InsertMedium( nSlotId, pMed, nVersion );
}
-long SwView::InsertMedium( USHORT nSlotId, SfxMedium* pMedium, INT16 nVersion )
+long SwView::InsertMedium( sal_uInt16 nSlotId, SfxMedium* pMedium, sal_Int16 nVersion )
{
- BOOL bInsert = FALSE, bCompare = FALSE, bMerge = FALSE;
+ sal_Bool bInsert = sal_False, bCompare = sal_False, bMerge = sal_False;
long nFound = 0;
SwDocShell* pDocSh = GetDocShell();
switch( nSlotId )
{
- case SID_DOCUMENT_MERGE: bMerge = TRUE; break;
- case SID_DOCUMENT_COMPARE: bCompare = TRUE; break;
- case SID_INSERTDOC: bInsert = TRUE; break;
+ case SID_DOCUMENT_MERGE: bMerge = sal_True; break;
+ case SID_DOCUMENT_COMPARE: bCompare = sal_True; break;
+ case SID_INSERTDOC: bInsert = sal_True; break;
default:
ASSERT( !this, "Unbekannte SlotId!" );
- bInsert = TRUE;
+ bInsert = sal_True;
nSlotId = SID_INSERTDOC;
break;
}
@@ -2091,10 +2093,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
@@ -2105,10 +2107,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 );
}
}
@@ -2118,14 +2118,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 (136991) or
// if the number of page styles with header/footer has changed (#i67305)
if( !pRead || nUndoCheck != lcl_PageDescWithHeader( *pDoc ) )
- pDoc->DelAllUndoObj();
+ {
+ pDoc->GetIDocumentUndoRedo().DelAllUndoObj();
+ }
}
pWrtShell->EndAllAction();
@@ -2146,7 +2148,7 @@ long SwView::InsertMedium( USHORT nSlotId, SfxMedium* pMedium, INT16 nVersion )
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;
@@ -2154,7 +2156,7 @@ extern int lcl_FindDocShell( SfxObjectShellRef& xDocSh, SfxObjectShellLock& xLoc
sFltNm, nVersion, pDocSh );
if( nRet )
{
- SwWait aWait( *GetDocShell(), TRUE );
+ SwWait aWait( *GetDocShell(), sal_True );
pWrtShell->StartAllAction();
pWrtShell->EnterStdMode(); // Selektionen loeschen
@@ -2182,7 +2184,7 @@ extern int lcl_FindDocShell( SfxObjectShellRef& xDocSh, SfxObjectShellLock& xLoc
/* -----------------05.02.2003 12:06-----------------
*
* --------------------------------------------------*/
-void SwView::EnableMailMerge(BOOL bEnable )
+void SwView::EnableMailMerge(sal_Bool bEnable )
{
bInMailMerge = bEnable;
SfxBindings& rBind = GetViewFrame()->GetBindings();
@@ -2258,7 +2260,7 @@ class SwMergeSourceWarningBox_Impl : public ModalDialog
-void SwView::GenerateFormLetter(BOOL bUseCurrentDocument)
+void SwView::GenerateFormLetter(sal_Bool bUseCurrentDocument)
{
if(bUseCurrentDocument)
{
@@ -2275,7 +2277,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
@@ -2285,7 +2287,7 @@ void SwView::GenerateFormLetter(BOOL bUseCurrentDocument)
// no cancel allowed
if ( RET_OK != aWarning.Execute() )
return;
- bCallAddressPilot = TRUE;
+ bCallAddressPilot = sal_True;
}
else
{
@@ -2315,12 +2317,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;
@@ -2368,7 +2370,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
@@ -2408,7 +2410,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 )
@@ -2434,7 +2436,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 355d199aef..831124049f 100644
--- a/sw/source/ui/uiview/viewcoll.cxx
+++ b/sw/source/ui/uiview/viewcoll.cxx
@@ -50,7 +50,7 @@ void SwView::ExecColl(SfxRequest &rReq)
{
const SfxItemSet* pArgs = rReq.GetArgs();
const SfxPoolItem* pItem = 0;
- USHORT nWhich = rReq.GetSlot();
+ sal_uInt16 nWhich = rReq.GetSlot();
switch( nWhich )
{
case FN_SET_PAGE:
@@ -63,10 +63,10 @@ void SwView::ExecColl(SfxRequest &rReq)
if( pArgs )
{
if (pArgs &&
- SFX_ITEM_SET == pArgs->GetItemState( nWhich , TRUE, &pItem ))
+ SFX_ITEM_SET == pArgs->GetItemState( nWhich , sal_True, &pItem ))
{
if( ((SfxStringItem*)pItem)->GetValue() !=
- GetWrtShell().GetCurPageStyle(FALSE) )
+ GetWrtShell().GetCurPageStyle(sal_False) )
{
SfxStringItem aName(SID_STYLE_APPLY,
((SfxStringItem*)pItem)->GetValue());
@@ -89,7 +89,7 @@ void SwView::ExecColl(SfxRequest &rReq)
}
break;
default:
- ASSERT(FALSE, falscher CommandProcessor fuer Dispatch);
+ ASSERT(sal_False, falscher CommandProcessor fuer Dispatch);
return;
}
}
diff --git a/sw/source/ui/uiview/viewdlg.cxx b/sw/source/ui/uiview/viewdlg.cxx
index 25b30387de..fe9e768420 100644
--- a/sw/source/ui/uiview/viewdlg.cxx
+++ b/sw/source/ui/uiview/viewdlg.cxx
@@ -55,9 +55,9 @@ void SwView::ExecDlg(SfxRequest &rReq)
const SfxPoolItem* pItem = 0;
const SfxItemSet* pArgs = rReq.GetArgs();
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
if(pArgs)
- pArgs->GetItemState( GetPool().GetWhich(nSlot), FALSE, &pItem );
+ pArgs->GetItemState( GetPool().GetWhich(nSlot), sal_False, &pItem );
switch ( nSlot )
{
@@ -65,11 +65,11 @@ void SwView::ExecDlg(SfxRequest &rReq)
{
if ( pItem )
{
- USHORT nValue = ((SfxUInt16Item *)pItem)->GetValue();
- USHORT nOldValue = pWrtShell->GetPageOffset();
- USHORT nPage, nLogPage;
+ sal_uInt16 nValue = ((SfxUInt16Item *)pItem)->GetValue();
+ sal_uInt16 nOldValue = pWrtShell->GetPageOffset();
+ sal_uInt16 nPage, nLogPage;
pWrtShell->GetPageNum( nPage, nLogPage,
- pWrtShell->IsCrsrVisible(), FALSE);
+ pWrtShell->IsCrsrVisible(), sal_False);
if(nValue != nOldValue || nValue != nLogPage)
{
diff --git a/sw/source/ui/uiview/viewdlg2.cxx b/sw/source/ui/uiview/viewdlg2.cxx
index 8388df1566..77d3228bd9 100644
--- a/sw/source/ui/uiview/viewdlg2.cxx
+++ b/sw/source/ui/uiview/viewdlg2.cxx
@@ -89,7 +89,7 @@ void SwView::ExecDlgExt(SfxRequest &rReq)
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
DBG_ASSERT(pFact, "Dialogdiet fail!");
AbstractInsFootNoteDlg* pDlg = pFact->CreateInsFootNoteDlg( DLG_INS_FOOTNOTE,
- pMDI, *pWrtShell, TRUE );
+ pMDI, *pWrtShell, sal_True );
DBG_ASSERT(pDlg, "Dialogdiet fail!");
pDlg->SetHelpId(GetStaticInterface()->GetSlot(FN_EDIT_FOOTNOTE)->GetCommand());
@@ -105,15 +105,15 @@ void SwView::ExecDlgExt(SfxRequest &rReq)
*
* --------------------------------------------------*/
-void SwView::AutoCaption(const USHORT nType, const SvGlobalName *pOleId)
+void SwView::AutoCaption(const sal_uInt16 nType, const SvGlobalName *pOleId)
{
SwModuleOptions* pModOpt = SW_MOD()->GetModuleConfig();
- BOOL bWeb = 0 != PTR_CAST(SwWebView, this);
+ sal_Bool bWeb = 0 != PTR_CAST(SwWebView, this);
if (pModOpt->IsInsWithCaption(bWeb))
{
const InsCaptionOpt *pOpt = pModOpt->GetCapOption(bWeb, (SwCapObjType)nType, pOleId);
- if (pOpt && pOpt->UseCaption() == TRUE)
+ if (pOpt && pOpt->UseCaption() == sal_True)
InsertCaption(pOpt);
}
}
@@ -133,7 +133,7 @@ void SwView::InsertCaption(const InsCaptionOpt *pOpt)
SwWrtShell &rSh = GetWrtShell();
if(rName.Len())
{
- USHORT nPoolId = SwStyleNameMapper::GetPoolIdFromUIName(rName, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL);
+ sal_uInt16 nPoolId = SwStyleNameMapper::GetPoolIdFromUIName(rName, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL);
if( USHRT_MAX != nPoolId )
rSh.GetTxtCollFromPool(nPoolId);
// Pool-Vorlage existiert nicht: Existiert sie am Dokument?
@@ -172,16 +172,16 @@ void SwView::InsertCaption(const InsCaptionOpt *pOpt)
if (pFldType)
{
pFldType->SetDelimiter(pOpt->GetSeparator());
- pFldType->SetOutlineLvl( static_cast< BYTE >(pOpt->GetLevel()) );
+ pFldType->SetOutlineLvl( static_cast< sal_uInt8 >(pOpt->GetLevel()) );
}
}
- USHORT nID = USHRT_MAX;
+ sal_uInt16 nID = USHRT_MAX;
SwFieldType* pType = 0;
- const USHORT nCount = aMgr.GetFldTypeCount();
+ const sal_uInt16 nCount = aMgr.GetFldTypeCount();
if( rName.Len() )
{
- for (USHORT i = 0; i < nCount; ++i)
+ for (sal_uInt16 i = 0; i < nCount; ++i)
{
pType = aMgr.GetFldType(USHRT_MAX, i);
String aTmpName( pType->GetName() );
@@ -206,7 +206,7 @@ void SwView::InsertCaption(const InsCaptionOpt *pOpt)
if(pType)
((SwSetExpFieldType*)pType)->SetSeqFormat(pOpt->GetNumType());
- rSh.UpdateExpFlds( TRUE );
+ rSh.UpdateExpFlds( sal_True );
rSh.EndAllAction();
diff --git a/sw/source/ui/uiview/viewdraw.cxx b/sw/source/ui/uiview/viewdraw.cxx
index 49889a3daf..b88861e7f7 100644
--- a/sw/source/ui/uiview/viewdraw.cxx
+++ b/sw/source/ui/uiview/viewdraw.cxx
@@ -355,7 +355,7 @@ void SwView::ExecDraw(SfxRequest& rReq)
};
GetViewFrame()->GetBindings().Invalidate(aInval);
- BOOL bEndTextEdit = TRUE;
+ sal_Bool bEndTextEdit = sal_True;
if (pFuncPtr)
{
if (GetDrawFuncPtr())
@@ -373,7 +373,7 @@ void SwView::ExecDraw(SfxRequest& rReq)
{
if(SID_OBJECT_SELECT == nDrawSfxId )
{
- pWrtShell->GotoObj(TRUE);
+ pWrtShell->GotoObj(sal_True);
}
else
{
@@ -390,7 +390,7 @@ void SwView::ExecDraw(SfxRequest& rReq)
{
SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
BeginTextEdit(pObj);
- bEndTextEdit = FALSE;
+ bEndTextEdit = sal_False;
}
}
}
@@ -421,7 +421,7 @@ void SwView::ExitDraw()
{
//#126062 # the shell may be invalid at close/reload/SwitchToViewShell
SfxDispatcher* pDispatch = GetViewFrame()->GetDispatcher();
- USHORT nIdx = 0;
+ sal_uInt16 nIdx = 0;
SfxShell* pTest = 0;
do
{
diff --git a/sw/source/ui/uiview/viewfunc.hxx b/sw/source/ui/uiview/viewfunc.hxx
index 95ef9a124d..24a8021ab0 100644
--- a/sw/source/ui/uiview/viewfunc.hxx
+++ b/sw/source/ui/uiview/viewfunc.hxx
@@ -41,16 +41,16 @@ class Window;
class SwWrtShell;
// folgende Funktionen stehen im viewprt.cxx
-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,
@@ -59,8 +59,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 25daf5609a..e2a3a98685 100644..100755
--- a/sw/source/ui/uiview/viewling.cxx
+++ b/sw/source/ui/uiview/viewling.cxx
@@ -554,7 +554,7 @@ void SwView::InsertThesaurusSynonym( const String &rSynonmText, const String &rL
if( !bSelection )
{
if(pWrtShell->IsEndWrd())
- pWrtShell->Left(CRSR_SKIP_CELLS, FALSE, 1, FALSE );
+ pWrtShell->Left(CRSR_SKIP_CELLS, sal_False, 1, sal_False );
pWrtShell->SelWrd();
@@ -766,7 +766,7 @@ sal_Bool SwView::ExecSpellPopup(const Point& rPt)
if ( pMenu )
{
OUString aSlotURL( RTL_CONSTASCII_USTRINGPARAM( "slot:" ));
- USHORT nId = ((PopupMenu*)pMenu)->Execute(pEditWin, aPixPos);
+ sal_uInt16 nId = ((PopupMenu*)pMenu)->Execute(pEditWin, aPixPos);
OUString aCommand = ((PopupMenu*)pMenu)->GetItemCommand(nId);
if (aCommand.getLength() == 0 )
{
@@ -978,7 +978,7 @@ IMPL_LINK( SwFieldDialog, MyListBoxHandler, ListBox *, pBox )
}
-BOOL SwView::ExecFieldPopup( const Point& rPt, IFieldmark *fieldBM )
+sal_Bool SwView::ExecFieldPopup( const Point& rPt, IFieldmark *fieldBM )
{
sal_Bool bRet = sal_False;
const sal_Bool bOldViewLock = pWrtShell->IsViewLocked();
diff --git a/sw/source/ui/uiview/viewmdi.cxx b/sw/source/ui/uiview/viewmdi.cxx
index f8212d8724..9a58b0a79c 100644
--- a/sw/source/ui/uiview/viewmdi.cxx
+++ b/sw/source/ui/uiview/viewmdi.cxx
@@ -83,7 +83,7 @@
#include <IDocumentSettingAccess.hxx>
#include <PostItMgr.hxx>
-USHORT SwView::nMoveType = NID_PGE;
+sal_uInt16 SwView::nMoveType = NID_PGE;
sal_Int32 SwView::nActMark = 0;
@@ -92,16 +92,16 @@ sal_Int32 SwView::nActMark = 0;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::frame;
-void SwView::SetZoom( SvxZoomType eZoomType, short nFactor, BOOL bViewOnly )
+void SwView::SetZoom( SvxZoomType eZoomType, short nFactor, sal_Bool bViewOnly )
{
_SetZoom( GetEditWin().GetOutputSizePixel(), eZoomType, nFactor, bViewOnly );
}
void SwView::_SetZoom( const Size &rEditSize, SvxZoomType eZoomType,
- short nFactor, BOOL bViewOnly )
+ short nFactor, sal_Bool bViewOnly )
{
- BOOL bUnLockView = !pWrtShell->IsViewLocked();
- pWrtShell->LockView( TRUE );
+ sal_Bool bUnLockView = !pWrtShell->IsViewLocked();
+ pWrtShell->LockView( sal_True );
pWrtShell->LockPaint();
{
@@ -109,7 +109,7 @@ void SwView::_SetZoom( const Size &rEditSize, SvxZoomType eZoomType,
long nFac = nFactor;
- BOOL bWeb = 0 != PTR_CAST(SwWebView, this);
+ sal_Bool bWeb = 0 != PTR_CAST(SwWebView, this);
SwMasterUsrPref *pUsrPref = (SwMasterUsrPref*)SW_MOD()->GetUsrPref(bWeb);
const SwPageDesc &rDesc = pWrtShell->GetPageDesc( pWrtShell->GetCurPageDesc() );
@@ -182,19 +182,19 @@ void SwView::_SetZoom( const Size &rEditSize, SvxZoomType eZoomType,
//MasterUsrPrefs updaten UND DANACH die ViewOptions der aktuellen
//View updaten.
if ( !bViewOnly &&
- (USHORT(nFac) != pUsrPref->GetZoom() ||
- BYTE (eZoomType) != pUsrPref->GetZoomType()) )
+ (sal_uInt16(nFac) != pUsrPref->GetZoom() ||
+ sal_uInt8 (eZoomType) != pUsrPref->GetZoomType()) )
{
- pUsrPref->SetZoom ( USHORT(nFac) );
+ pUsrPref->SetZoom ( sal_uInt16(nFac) );
pUsrPref->SetZoomType( eZoomType );
SW_MOD()->ApplyUsrPref( *pUsrPref,
bViewOnly ? this: 0,
bViewOnly ? VIEWOPT_DEST_VIEW_ONLY : 0 );
pUsrPref->SetModified();
}
- if ( pOpt->GetZoom() != (USHORT) nFac )
+ if ( pOpt->GetZoom() != (sal_uInt16) nFac )
{
- aOpt.SetZoom ( USHORT(nFac) );
+ aOpt.SetZoom ( sal_uInt16(nFac) );
aOpt.SetReadonly(pOpt->IsReadonly());
pWrtShell->ApplyViewOptions( aOpt );
}
@@ -223,9 +223,9 @@ void SwView::_SetZoom( const Size &rEditSize, SvxZoomType eZoomType,
((SwViewOption*)pWrtShell->GetViewOptions())->SetZoomType( eZoomType );
CalcVisArea( rEditSize ); //fuer das Neuberechnen des sichtbaren Bereiches
}
- else if ( USHORT(nFac) != pOpt->GetZoom() )
+ else if ( sal_uInt16(nFac) != pOpt->GetZoom() )
{
- aOpt.SetZoom ( USHORT(nFac) );
+ aOpt.SetZoom ( sal_uInt16(nFac) );
pWrtShell->ApplyViewOptions( aOpt );
}
@@ -238,7 +238,7 @@ void SwView::_SetZoom( const Size &rEditSize, SvxZoomType eZoomType,
}
pWrtShell->UnlockPaint();
if( bUnLockView )
- pWrtShell->LockView( FALSE );
+ pWrtShell->LockView( sal_False );
// if ( mpPostItMgr )
// {
@@ -250,10 +250,10 @@ void SwView::_SetZoom( const Size &rEditSize, SvxZoomType eZoomType,
// eZoom = eZoomType;
}
-void SwView::SetViewLayout( USHORT nColumns, bool bBookMode, BOOL bViewOnly )
+void SwView::SetViewLayout( sal_uInt16 nColumns, bool bBookMode, sal_Bool bViewOnly )
{
- const BOOL bUnLockView = !pWrtShell->IsViewLocked();
- pWrtShell->LockView( TRUE );
+ const sal_Bool bUnLockView = !pWrtShell->IsViewLocked();
+ pWrtShell->LockView( sal_True );
pWrtShell->LockPaint();
{
@@ -262,7 +262,7 @@ void SwView::SetViewLayout( USHORT nColumns, bool bBookMode, BOOL bViewOnly )
if ( !GetViewFrame()->GetFrame().IsInPlace() && !bViewOnly )
{
- const BOOL bWeb = 0 != PTR_CAST(SwWebView, this);
+ const sal_Bool bWeb = 0 != PTR_CAST(SwWebView, this);
SwMasterUsrPref *pUsrPref = (SwMasterUsrPref*)SW_MOD()->GetUsrPref(bWeb);
//MasterUsrPrefs updaten UND DANACH die ViewOptions der aktuellen
@@ -297,7 +297,7 @@ void SwView::SetViewLayout( USHORT nColumns, bool bBookMode, BOOL bViewOnly )
pWrtShell->UnlockPaint();
if( bUnLockView )
- pWrtShell->LockView( FALSE );
+ pWrtShell->LockView( sal_False );
SfxBindings& rBnd = GetViewFrame()->GetBindings();
rBnd.Invalidate( SID_ATTR_VIEWLAYOUT );
@@ -308,7 +308,7 @@ void SwView::SetViewLayout( USHORT nColumns, bool bBookMode, BOOL bViewOnly )
* Scrollbar - Handler
*/
-int SwView::_CreateScrollbar( BOOL bHori )
+int SwView::_CreateScrollbar( sal_Bool bHori )
{
Window *pMDI = &GetViewFrame()->GetWindow();
SwScrollbar** ppScrollbar = bHori ? &pHScrollbar : &pVScrollbar;
@@ -326,7 +326,7 @@ int SwView::_CreateScrollbar( BOOL bHori )
(*ppScrollbar)->SetScrollHdl( LINK( this, SwView, ScrollHdl ));
(*ppScrollbar)->SetEndScrollHdl( LINK( this, SwView, EndScrollHdl ));
- (*ppScrollbar)->EnableDrag( TRUE );
+ (*ppScrollbar)->EnableDrag( sal_True );
if(GetWindow())
InvalidateBorder();
@@ -339,12 +339,12 @@ int SwView::_CreateScrollbar( BOOL bHori )
return 1;
}
-void SwView::CreatePageButtons(BOOL bShow)
+void SwView::CreatePageButtons(sal_Bool bShow)
{
Window *pMDI = &GetViewFrame()->GetWindow();
- pPageUpBtn = new SwHlpImageButton(pMDI, SW_RES( BTN_PAGEUP ), TRUE );
+ pPageUpBtn = new SwHlpImageButton(pMDI, SW_RES( BTN_PAGEUP ), sal_True );
pPageUpBtn->SetHelpId(HID_SCRL_PAGEUP);
- pPageDownBtn = new SwHlpImageButton(pMDI, SW_RES( BTN_PAGEDOWN ), FALSE );
+ pPageDownBtn = new SwHlpImageButton(pMDI, SW_RES( BTN_PAGEDOWN ), sal_False );
pPageDownBtn->SetHelpId(HID_SCRL_PAGEDOWN);
Reference< XFrame > xFrame = GetViewFrame()->GetFrame().GetFrameInterface();
pNaviBtn = new SwNaviImageButton(pMDI, xFrame );
@@ -401,12 +401,12 @@ IMPL_STATIC_LINK( SwView, MoveNavigationHdl, bool *, pbNext )
case NID_GRF:
case NID_OLE:
{
- USHORT eType = GOTOOBJ_FLY_FRM;
+ sal_uInt16 eType = GOTOOBJ_FLY_FRM;
if(nMoveType == NID_GRF)
eType = GOTOOBJ_FLY_GRF;
else if(nMoveType == NID_OLE)
eType = GOTOOBJ_FLY_OLE;
- BOOL bSuccess = bNext ?
+ sal_Bool bSuccess = bNext ?
rSh.GotoNextFly(eType) :
rSh.GotoPrevFly(eType);
if(bSuccess)
@@ -502,7 +502,7 @@ IMPL_STATIC_LINK( SwView, MoveNavigationHdl, bool *, pbNext )
case NID_SRCH_REP:
if(pSrchItem)
{
- BOOL bBackward = pSrchItem->GetBackward();
+ sal_Bool bBackward = pSrchItem->GetBackward();
if(rSh.HasSelection() && !bNext == rSh.IsCrsrPtAtEnd())
rSh.SwapPam();
pSrchItem->SetBackward(!bNext);
@@ -520,7 +520,7 @@ IMPL_STATIC_LINK( SwView, MoveNavigationHdl, bool *, pbNext )
break;
case NID_TABLE_FORMULA_ERROR:
- rSh.GotoNxtPrvTblFormula( bNext, TRUE );
+ rSh.GotoNxtPrvTblFormula( bNext, sal_True );
break;
}
pThis->pEditWin->GrabFocus();
@@ -642,7 +642,7 @@ int SwView::KillVLineal()
IMPL_LINK( SwView, ExecRulerClick, Ruler *, pRuler )
{
- USHORT nDefPage = 0;
+ sal_uInt16 nDefPage = 0;
switch( pRuler->GetClickType() )
{
case RULER_TYPE_DONTKNOW:
@@ -669,7 +669,7 @@ IMPL_LINK( SwView, ExecRulerClick, Ruler *, pRuler )
--------------------------------------------------*/
-USHORT SwView::GetMoveType()
+sal_uInt16 SwView::GetMoveType()
{
return nMoveType;
}
@@ -677,11 +677,11 @@ USHORT SwView::GetMoveType()
--------------------------------------------------*/
-void SwView::SetMoveType(USHORT nSet)
+void SwView::SetMoveType(sal_uInt16 nSet)
{
- BOOL bLastPage = nMoveType == NID_PGE;
+ sal_Bool bLastPage = nMoveType == NID_PGE;
nMoveType = nSet;
- BOOL bNewPage = nMoveType == NID_PGE;
+ sal_Bool bNewPage = nMoveType == NID_PGE;
if(bNewPage != bLastPage)
{
Color aColor(bNewPage ? COL_BLACK : VIEW_IMAGECOLOR);
@@ -729,7 +729,7 @@ void SwView::ShowHScrollbar(sal_Bool bShow)
sal_Bool SwView::IsHScrollbarVisible()const
{
DBG_ASSERT(pHScrollbar, "Scrollbar invalid");
- return pHScrollbar->IsVisible( FALSE ) || pHScrollbar->IsAuto();
+ return pHScrollbar->IsVisible( sal_False ) || pHScrollbar->IsAuto();
}
/* -----------------------------2002/06/26 13:57------------------------------
@@ -748,7 +748,7 @@ void SwView::ShowVScrollbar(sal_Bool bShow)
sal_Bool SwView::IsVScrollbarVisible()const
{
DBG_ASSERT(pVScrollbar, "Scrollbar invalid");
- return pVScrollbar->IsVisible( FALSE );
+ return pVScrollbar->IsVisible( sal_False );
}
diff --git a/sw/source/ui/uiview/viewport.cxx b/sw/source/ui/uiview/viewport.cxx
index d47436aae3..05e60a203d 100644
--- a/sw/source/ui/uiview/viewport.cxx
+++ b/sw/source/ui/uiview/viewport.cxx
@@ -68,11 +68,11 @@
#define WB_RIGHT_ALIGNED ((WinBits)0x00008000)
#endif
-static BOOL bProtectDocShellVisArea = FALSE;
+static sal_Bool bProtectDocShellVisArea = sal_False;
-static USHORT nPgNum = 0;
+static sal_uInt16 nPgNum = 0;
-BOOL SwView::IsDocumentBorder()
+sal_Bool SwView::IsDocumentBorder()
{
return GetDocShell()->GetCreateMode() == SFX_CREATE_MODE_EMBEDDED ||
pWrtShell->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE) ||
@@ -93,13 +93,13 @@ inline long GetLeftMargin( SwView &rView )
void lcl_GetPos(SwView* pView,
Point& rPos,
SwScrollbar* pScrollbar,
- BOOL bBorder)
+ sal_Bool bBorder)
{
SwWrtShell &rSh = pView->GetWrtShell();
const Size aDocSz( rSh.GetDocSize() );
const long lBorder = bBorder ? DOCUMENTBORDER : DOCUMENTBORDER * 2;
- BOOL bHori = pScrollbar->IsHoriScroll();
+ sal_Bool bHori = pScrollbar->IsHoriScroll();
const long lPos = pScrollbar->GetThumbPos() + (bBorder ? DOCUMENTBORDER : 0);
long Point:: *pPt = bHori ? &Point::nA : &Point::nB;
@@ -127,7 +127,7 @@ void lcl_GetPos(SwView* pView,
void SwView::InvalidateRulerPos()
{
- static USHORT __READONLY_DATA aInval[] =
+ static sal_uInt16 __READONLY_DATA aInval[] =
{
SID_ATTR_PARA_LRSPACE, SID_RULER_BORDERS, SID_RULER_PAGE_POS,
SID_RULER_LR_MIN_MAX, SID_ATTR_LONG_ULSPACE, SID_ATTR_LONG_LRSPACE,
@@ -189,14 +189,14 @@ aDocSz = rSz;
if( !pWrtShell || aVisArea.IsEmpty() ) // keine Shell -> keine Aenderung
{
- bDocSzUpdated = FALSE;
+ bDocSzUpdated = sal_False;
return;
}
//Wenn Text geloescht worden ist, kann es sein, dass die VisArea hinter
//den sichtbaren Bereich verweist
Rectangle aNewVisArea( aVisArea );
- BOOL bModified = false;
+ sal_Bool bModified = false;
SwTwips lGreenOffset = IsDocumentBorder() ? DOCUMENTBORDER : DOCUMENTBORDER * 2;
SwTwips lTmp = aDocSz.Width() + lGreenOffset;
@@ -205,7 +205,7 @@ aDocSz = rSz;
lTmp = aNewVisArea.Right() - lTmp;
aNewVisArea.Right() -= lTmp;
aNewVisArea.Left() -= lTmp;
- bModified = TRUE;
+ bModified = sal_True;
}
lTmp = aDocSz.Height() + lGreenOffset;
@@ -214,11 +214,11 @@ aDocSz = rSz;
lTmp = aNewVisArea.Bottom() - lTmp;
aNewVisArea.Bottom() -= lTmp;
aNewVisArea.Top() -= lTmp;
- bModified = TRUE;
+ bModified = sal_True;
}
if ( bModified )
- SetVisArea( aNewVisArea, FALSE );
+ SetVisArea( aNewVisArea, sal_False );
if ( UpdateScrollbars() && !bInOuterResizePixel && !bInInnerResizePixel &&
!GetViewFrame()->GetFrame().IsInPlace())
@@ -230,7 +230,7 @@ aDocSz = rSz;
Beschreibung: Visarea neu setzen
--------------------------------------------------------------------*/
-void SwView::SetVisArea( const Rectangle &rRect, BOOL bUpdateScrollbar )
+void SwView::SetVisArea( const Rectangle &rRect, sal_Bool bUpdateScrollbar )
{
const Size aOldSz( aVisArea.GetSize() );
@@ -277,7 +277,7 @@ void SwView::SetVisArea( const Rectangle &rRect, BOOL bUpdateScrollbar )
aVisArea = aLR;
- const BOOL bOuterResize = bUpdateScrollbar && UpdateScrollbars();
+ const sal_Bool bOuterResize = bUpdateScrollbar && UpdateScrollbars();
if ( pWrtShell )
{
@@ -285,7 +285,7 @@ void SwView::SetVisArea( const Rectangle &rRect, BOOL bUpdateScrollbar )
if ( aOldSz != pWrtShell->VisArea().SSize() &&
( Abs(aOldSz.Width() - pWrtShell->VisArea().Width()) > 2 ||
Abs(aOldSz.Height() - pWrtShell->VisArea().Height()) > 2 ) )
- pWrtShell->CheckBrowseView( FALSE );
+ pWrtShell->CheckBrowseView( sal_False );
}
if ( !bProtectDocShellVisArea )
@@ -324,7 +324,7 @@ void SwView::SetVisArea( const Rectangle &rRect, BOOL bUpdateScrollbar )
Beschreibung: Pos VisArea setzen
--------------------------------------------------------------------*/
-void SwView::SetVisArea( const Point &rPt, BOOL bUpdateScrollbar )
+void SwView::SetVisArea( const Point &rPt, sal_Bool bUpdateScrollbar )
{
//einmal alignen, damit Brushes korrekt angesetzt werden.
//MA 31. May. 96: Das geht in der BrowseView schief, weil evlt.
@@ -364,7 +364,7 @@ void SwView::CheckVisArea()
Rectangle aNewVisArea( aVisArea );
aNewVisArea.Move( DOCUMENTBORDER - aVisArea.Left(),
DOCUMENTBORDER - aVisArea.Top() );
- SetVisArea( aNewVisArea, TRUE );
+ SetVisArea( aNewVisArea, sal_True );
}
}
}
@@ -376,12 +376,12 @@ void SwView::CheckVisArea()
Bereiches
IN Rectangle &rRect: Rechteck, das sich innerhalb des neuen
sichtbaren Bereiches befinden soll
- USHORT nRange optional exakte Angabe des Bereiches,
+ sal_uInt16 nRange optional exakte Angabe des Bereiches,
um den ggfs. gescrollt werden soll
--------------------------------------------------------------------*/
void SwView::CalcPt( Point *pPt, const Rectangle &rRect,
- USHORT nRangeX, USHORT nRangeY)
+ sal_uInt16 nRangeX, sal_uInt16 nRangeY)
{
const SwTwips lMin = IsDocumentBorder() ? DOCUMENTBORDER : 0;
@@ -428,13 +428,13 @@ void SwView::CalcPt( Point *pPt, const Rectangle &rRect,
Beschreibung: Scrolling
--------------------------------------------------------------------*/
-BOOL SwView::IsScroll( const Rectangle &rRect ) const
+sal_Bool SwView::IsScroll( const Rectangle &rRect ) const
{
return bCenterCrsr || bTopCrsr || !aVisArea.IsInside(rRect);
}
-void SwView::Scroll( const Rectangle &rRect, USHORT nRangeX, USHORT nRangeY )
+void SwView::Scroll( const Rectangle &rRect, sal_uInt16 nRangeX, sal_uInt16 nRangeY )
{
if ( aVisArea.IsEmpty() )
return;
@@ -498,8 +498,8 @@ void SwView::Scroll( const Rectangle &rRect, USHORT nRangeX, USHORT nRangeY )
aSize.Height()= Min( aSize.Height(),aVisSize.Height());
CalcPt( &aPt, Rectangle( rRect.TopLeft(), aSize ),
- static_cast< USHORT >((aVisSize.Width() - aSize.Width()) / 2),
- static_cast< USHORT >((aVisSize.Height()- aSize.Height())/ 2) );
+ static_cast< sal_uInt16 >((aVisSize.Width() - aSize.Width()) / 2),
+ static_cast< sal_uInt16 >((aVisSize.Height()- aSize.Height())/ 2) );
if( bTopCrsr )
{
@@ -561,10 +561,10 @@ void SwView::Scroll( const Rectangle &rRect, USHORT nRangeX, USHORT nRangeY )
Liefern den Wert, um den bei PageUp / -Down gescrollt werden soll
--------------------------------------------------------------------*/
-BOOL SwView::GetPageScrollUpOffset( SwTwips &rOff ) const
+sal_Bool SwView::GetPageScrollUpOffset( SwTwips &rOff ) const
{
if ( !aVisArea.Top() || !aVisArea.GetHeight() )
- return FALSE;
+ return sal_False;
long nYScrl = GetYScroll() / 2;
rOff = -(aVisArea.GetHeight() - nYScrl);
//nicht vor den Dokumentanfang scrollen
@@ -572,15 +572,15 @@ BOOL SwView::GetPageScrollUpOffset( SwTwips &rOff ) const
rOff = rOff - aVisArea.Top();
else if( GetWrtShell().GetCharRect().Top() < (aVisArea.Top() + nYScrl))
rOff += nYScrl;
- return TRUE;
+ return sal_True;
}
-BOOL SwView::GetPageScrollDownOffset( SwTwips &rOff ) const
+sal_Bool SwView::GetPageScrollDownOffset( SwTwips &rOff ) const
{
if ( !aVisArea.GetHeight() ||
(aVisArea.GetHeight() > aDocSz.Height()) )
- return FALSE;
+ return sal_False;
long nYScrl = GetYScroll() / 2;
rOff = aVisArea.GetHeight() - nYScrl;
//nicht hinter das Dokumentende scrollen
@@ -622,7 +622,7 @@ long SwView::PageDown()
long SwView::PhyPageUp()
{
//aktuell sichtbare Seite erfragen, nicht formatieren
- USHORT nActPage = pWrtShell->GetNextPrevPageNum( FALSE );
+ sal_uInt16 nActPage = pWrtShell->GetNextPrevPageNum( sal_False );
if( USHRT_MAX != nActPage )
{
@@ -643,7 +643,7 @@ long SwView::PhyPageUp()
long SwView::PhyPageDown()
{
//aktuell sichtbare Seite erfragen, nicht formatieren
- USHORT nActPage = pWrtShell->GetNextPrevPageNum( TRUE );
+ sal_uInt16 nActPage = pWrtShell->GetNextPrevPageNum( sal_True );
// falls die letzte Dokumentseite sichtbar ist, nichts tun
if( USHRT_MAX != nActPage )
{
@@ -660,16 +660,16 @@ long SwView::PhyPageDown()
}
-long SwView::PageUpCrsr( BOOL bSelect )
+long SwView::PageUpCrsr( sal_Bool bSelect )
{
if ( !bSelect )
{
- const USHORT eType = pWrtShell->GetFrmType(0,TRUE);
+ const sal_uInt16 eType = pWrtShell->GetFrmType(0,sal_True);
if ( eType & FRMTYPE_FOOTNOTE )
{
pWrtShell->MoveCrsr();
pWrtShell->GotoFtnAnchor();
- pWrtShell->Right(CRSR_SKIP_CHARS, FALSE, 1, FALSE );
+ pWrtShell->Right(CRSR_SKIP_CHARS, sal_False, 1, sal_False );
return 1;
}
}
@@ -681,13 +681,13 @@ long SwView::PageUpCrsr( BOOL bSelect )
PageUp() )
{
pWrtShell->ResetCursorStack();
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
-long SwView::PageDownCrsr(BOOL bSelect)
+long SwView::PageDownCrsr(sal_Bool bSelect)
{
SwTwips lOff = 0;
if ( GetPageScrollDownOffset( lOff ) &&
@@ -696,9 +696,9 @@ long SwView::PageDownCrsr(BOOL bSelect)
PageDown() )
{
pWrtShell->ResetCursorStack();
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
/*------------------------------------------------------------------------
@@ -711,7 +711,7 @@ IMPL_LINK( SwView, ScrollHdl, SwScrollbar *, pScrollbar )
return 0;
if ( pScrollbar->GetType() == SCROLL_DRAG )
- pWrtShell->EnableSmooth( FALSE );
+ pWrtShell->EnableSmooth( sal_False );
if(!pWrtShell->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE) &&
pScrollbar->GetType() == SCROLL_DRAG)
@@ -724,11 +724,11 @@ IMPL_LINK( SwView, ScrollHdl, SwScrollbar *, pScrollbar )
Point aPos( aVisArea.TopLeft() );
lcl_GetPos(this, aPos, pScrollbar, IsDocumentBorder());
- USHORT nPhNum = 1;
- USHORT nVirtNum = 1;
+ sal_uInt16 nPhNum = 1;
+ sal_uInt16 nVirtNum = 1;
String sDisplay;
- if(pWrtShell->GetPageNumber( aPos.Y(), FALSE, nPhNum, nVirtNum, sDisplay ))
+ if(pWrtShell->GetPageNumber( aPos.Y(), sal_False, nPhNum, nVirtNum, sDisplay ))
{
// JP 21.07.00: the end scrollhandler invalidate the FN_STAT_PAGE,
// so we dont must do it agin.
@@ -771,7 +771,7 @@ IMPL_LINK( SwView, ScrollHdl, SwScrollbar *, pScrollbar )
EndScrollHdl(pScrollbar);
if ( pScrollbar->GetType() == SCROLL_DRAG )
- pWrtShell->EnableSmooth( TRUE );
+ pWrtShell->EnableSmooth( sal_True );
return 0;
}
@@ -789,12 +789,12 @@ IMPL_LINK( SwView, EndScrollHdl, SwScrollbar *, pScrollbar )
Help::ShowQuickHelp(pScrollbar, Rectangle(), aEmptyStr, 0);
}
Point aPos( aVisArea.TopLeft() );
- BOOL bBorder = IsDocumentBorder();
+ sal_Bool bBorder = IsDocumentBorder();
lcl_GetPos(this, aPos, pScrollbar, bBorder);
if ( bBorder && aPos == aVisArea.TopLeft() )
UpdateScrollbars();
else
- SetVisArea( aPos, FALSE );
+ SetVisArea( aPos, sal_False );
GetViewFrame()->GetBindings().Update(FN_STAT_PAGE);
}
@@ -854,9 +854,9 @@ void SwView::CalcVisArea( const Size &rOutPixel )
--------------------------------------------------------------------*/
-void SwView::CalcAndSetBorderPixel( SvBorder &rToFill, BOOL /*bInner*/ )
+void SwView::CalcAndSetBorderPixel( SvBorder &rToFill, sal_Bool /*bInner*/ )
{
- BOOL bRightVRuler = pWrtShell->GetViewOptions()->IsVRulerRight();
+ sal_Bool bRightVRuler = pWrtShell->GetViewOptions()->IsVRulerRight();
if ( pVRuler->IsVisible() )
{
long nWidth = pVRuler->GetSizePixel().Width();
@@ -872,7 +872,7 @@ void SwView::CalcAndSetBorderPixel( SvBorder &rToFill, BOOL /*bInner*/ )
const StyleSettings &rSet = GetEditWin().GetSettings().GetStyleSettings();
const long nTmp = rSet.GetScrollBarSize();
- if( pVScrollbar->IsVisible(FALSE) )
+ if( pVScrollbar->IsVisible(sal_False) )
{
if(bRightVRuler)
rToFill.Left() = nTmp;
@@ -892,7 +892,7 @@ void ViewResizePixel( const Window &rRef,
const Point &rOfst,
const Size &rSize,
const Size &rEditSz,
- const BOOL /*bInner*/,
+ const sal_Bool /*bInner*/,
SwScrollbar& rVScrollbar,
SwScrollbar& rHScrollbar,
ImageButton* pPageUpBtn,
@@ -901,23 +901,23 @@ void ViewResizePixel( const Window &rRef,
Window& rScrollBarBox,
SvxRuler* pVLineal,
SvxRuler* pHLineal,
- BOOL bWebView,
- BOOL bVRulerRight )
+ sal_Bool bWebView,
+ sal_Bool bVRulerRight )
{
// ViewResizePixel wird auch von der PreView benutzt!!!
- const BOOL bHLineal = pHLineal && pHLineal->IsVisible();
+ const sal_Bool bHLineal = pHLineal && pHLineal->IsVisible();
const long nHLinSzHeight = bHLineal ?
pHLineal->GetSizePixel().Height() : 0;
- const BOOL bVLineal = pVLineal && pVLineal->IsVisible();
+ const sal_Bool bVLineal = pVLineal && pVLineal->IsVisible();
const long nVLinSzWidth = bVLineal ?
pVLineal->GetSizePixel().Width() : 0;
- long nHBSzHeight2= rHScrollbar.IsVisible( FALSE ) || !rHScrollbar.IsAuto() ?
+ long nHBSzHeight2= rHScrollbar.IsVisible( sal_False ) || !rHScrollbar.IsAuto() ?
rRef.GetSettings().GetStyleSettings().GetScrollBarSize() : 0;
long nHBSzHeight =
- rHScrollbar.IsVisible(TRUE) || (rHScrollbar.IsVisible( FALSE ) && !rHScrollbar.IsAuto()) ?
+ rHScrollbar.IsVisible(sal_True) || (rHScrollbar.IsVisible( sal_False ) && !rHScrollbar.IsAuto()) ?
nHBSzHeight2:0;
- long nVBSzWidth = rVScrollbar.IsVisible(TRUE) || (rVScrollbar.IsVisible( FALSE ) && !rVScrollbar.IsAuto()) ?
+ long nVBSzWidth = rVScrollbar.IsVisible(sal_True) || (rVScrollbar.IsVisible( sal_False ) && !rVScrollbar.IsAuto()) ?
rRef.GetSettings().GetStyleSettings().GetScrollBarSize() : 0;
if(pVLineal)
@@ -986,10 +986,10 @@ void ViewResizePixel( const Window &rRef,
//#55949# wenn der Platz fuer Scrollbar und Page-Buttons zu klein wird, dann
// werden die Buttons versteckt
- USHORT nCnt = pNaviBtn ? 3 : 2;
+ sal_uInt16 nCnt = pNaviBtn ? 3 : 2;
long nSubSize = (aImgSz.Width() * nCnt );
//
- BOOL bHidePageButtons = aSize.Height() < ((bWebView ? 3 : 2) * nSubSize);
+ sal_Bool bHidePageButtons = aSize.Height() < ((bWebView ? 3 : 2) * nSubSize);
if(!bHidePageButtons)
aSize.Height() -= nSubSize;
else
@@ -1011,7 +1011,7 @@ void ViewResizePixel( const Window &rRef,
pPageDownBtn->SetPosSizePixel( aPos, aImgSz );
- if( rHScrollbar.IsVisible( FALSE ) )
+ if( rHScrollbar.IsVisible( sal_False ) )
{
aScrollFillPos.X() = aPos.X();
@@ -1024,7 +1024,7 @@ void ViewResizePixel( const Window &rRef,
void SwView::ShowAtResize()
{
- bShowAtResize = FALSE;
+ bShowAtResize = sal_False;
if ( pWrtShell->GetViewOptions()->IsViewHRuler() )
pHRuler->Show();
}
@@ -1044,15 +1044,15 @@ void SwView::InnerResizePixel( const Point &rOfst, const Size &rSize )
Fraction( aSize.Height(), aObjSizePixel.Height() ) );
}
- bInInnerResizePixel = TRUE;
- const BOOL bHScrollVisible = pHScrollbar->IsVisible(TRUE);
- const BOOL bVScrollVisible = pVScrollbar->IsVisible(TRUE);
- BOOL bRepeat = FALSE;
+ bInInnerResizePixel = sal_True;
+ const sal_Bool bHScrollVisible = pHScrollbar->IsVisible(sal_True);
+ const sal_Bool bVScrollVisible = pVScrollbar->IsVisible(sal_True);
+ sal_Bool bRepeat = sal_False;
do
{
Size aSz( rSize );
SvBorder aBorder;
- CalcAndSetBorderPixel( aBorder, TRUE );
+ CalcAndSetBorderPixel( aBorder, sal_True );
if ( GetViewFrame()->GetFrame().IsInPlace() )
{
Size aViewSize( aSz );
@@ -1070,7 +1070,7 @@ void SwView::InnerResizePixel( const Point &rOfst, const Size &rSize )
}
Size aEditSz( GetEditWin().GetOutputSizePixel() );
- ViewResizePixel( GetEditWin(), rOfst, aSz, aEditSz, TRUE, *pVScrollbar,
+ ViewResizePixel( GetEditWin(), rOfst, aSz, aEditSz, sal_True, *pVScrollbar,
*pHScrollbar, pPageUpBtn, pPageDownBtn,
pNaviBtn,
*pScrollFill, pVRuler, pHRuler,
@@ -1082,9 +1082,9 @@ void SwView::InnerResizePixel( const Point &rOfst, const Size &rSize )
if( pHRuler->IsVisible() || pVRuler->IsVisible() )
{
const Fraction& rFrac = GetEditWin().GetMapMode().GetScaleX();
- USHORT nZoom = 100;
+ sal_uInt16 nZoom = 100;
if (0 != rFrac.GetDenominator())
- nZoom = USHORT(rFrac.GetNumerator() * 100L / rFrac.GetDenominator());
+ nZoom = sal_uInt16(rFrac.GetNumerator() * 100L / rFrac.GetDenominator());
const Fraction aFrac( nZoom, 100 );
pVRuler->SetZoom( aFrac );
@@ -1098,18 +1098,18 @@ void SwView::InnerResizePixel( const Point &rOfst, const Size &rSize )
//EditWin niemals einstellen!
//VisArea einstellen, aber dort nicht das SetVisArea der DocShell rufen!
- bProtectDocShellVisArea = TRUE;
+ bProtectDocShellVisArea = sal_True;
CalcVisArea( aEditSz );
//visibility changes of the automatic horizontal scrollbar
//require to repeat the ViewResizePixel() call - but only once!
if(bRepeat)
- bRepeat = FALSE;
- else if(bHScrollVisible != pHScrollbar->IsVisible(TRUE) ||
- bVScrollVisible != pVScrollbar->IsVisible(TRUE))
- bRepeat = TRUE;
+ bRepeat = sal_False;
+ else if(bHScrollVisible != pHScrollbar->IsVisible(sal_True) ||
+ bVScrollVisible != pVScrollbar->IsVisible(sal_True))
+ bRepeat = sal_True;
}while( bRepeat );
- bProtectDocShellVisArea = FALSE;
- bInInnerResizePixel = FALSE;
+ bProtectDocShellVisArea = sal_False;
+ bInInnerResizePixel = sal_False;
}
@@ -1118,13 +1118,13 @@ void SwView::OuterResizePixel( const Point &rOfst, const Size &rSize )
// FME 22.08.2003 #i16909# - return, if no size (caused by minimize window).
if ( bInOuterResizePixel || ( !rSize.Width() && !rSize.Height() ) )
return;
- bInOuterResizePixel = TRUE;
+ bInOuterResizePixel = sal_True;
// feststellen, ob Scrollbars angezeigt werden duerfen
- BOOL bBrowse = pWrtShell->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE);
- BOOL bShowH = FALSE,
- bShowV = FALSE,
- bAuto = FALSE,
+ sal_Bool bBrowse = pWrtShell->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE);
+ sal_Bool bShowH = sal_False,
+ bShowV = sal_False,
+ bAuto = sal_False,
bHAuto = bBrowse;
switch( GetScrollingMode() )
{
@@ -1140,45 +1140,45 @@ void SwView::OuterResizePixel( const Point &rOfst, const Size &rSize )
}
/* kein break hier */
case SCROLLING_AUTO:
- bAuto = bHAuto = TRUE;
- bShowH = bShowV = TRUE;
+ bAuto = bHAuto = sal_True;
+ bShowH = bShowV = sal_True;
break;
case SCROLLING_YES:
- bShowH = bShowV = TRUE;
+ bShowH = bShowV = sal_True;
break;
case SCROLLING_NO:
- bShowH = bShowV = bHAuto = FALSE;
+ bShowH = bShowV = bHAuto = sal_False;
break;
}
SwDocShell* pDocSh = GetDocShell();
- BOOL bIsPreview = pDocSh->IsPreview();
+ sal_Bool bIsPreview = pDocSh->IsPreview();
if( bIsPreview )
{
- bShowH = bShowV = bHAuto = bAuto = FALSE;
+ bShowH = bShowV = bHAuto = bAuto = sal_False;
}
- if(pHScrollbar->IsVisible(FALSE) != bShowH)
+ if(pHScrollbar->IsVisible(sal_False) != bShowH)
ShowHScrollbar(bShowH);
pHScrollbar->SetAuto( bHAuto );
- if(pVScrollbar->IsVisible(FALSE) != bShowV)
+ if(pVScrollbar->IsVisible(sal_False) != bShowV)
ShowVScrollbar(bShowV);
pVScrollbar->SetAuto(bAuto);
SET_CURR_SHELL( pWrtShell );
- BOOL bRepeat = FALSE;
+ sal_Bool bRepeat = sal_False;
long nCnt = 0;
- BOOL bUnLockView = !pWrtShell->IsViewLocked();
- pWrtShell->LockView( TRUE );
+ sal_Bool bUnLockView = !pWrtShell->IsViewLocked();
+ pWrtShell->LockView( sal_True );
pWrtShell->LockPaint();
do {
++nCnt;
- const BOOL bScroll1 = pVScrollbar->IsVisible(TRUE);
- const BOOL bScroll2 = pHScrollbar->IsVisible(TRUE);
+ const sal_Bool bScroll1 = pVScrollbar->IsVisible(sal_True);
+ const sal_Bool bScroll2 = pHScrollbar->IsVisible(sal_True);
SvBorder aBorder;
- CalcAndSetBorderPixel( aBorder, FALSE );
+ CalcAndSetBorderPixel( aBorder, sal_False );
const Size aEditSz( GetEditWin().GetOutputSizePixel() );
- ViewResizePixel( GetEditWin(), rOfst, rSize, aEditSz, FALSE, *pVScrollbar,
+ ViewResizePixel( GetEditWin(), rOfst, rSize, aEditSz, sal_False, *pVScrollbar,
*pHScrollbar, pPageUpBtn, pPageDownBtn,
pNaviBtn,
*pScrollFill, pVRuler, pHRuler,
@@ -1215,12 +1215,12 @@ void SwView::OuterResizePixel( const Point &rOfst, const Size &rSize )
pDocSh->SfxInPlaceObject::GetVisArea() );*/
if ( pWrtShell->GetViewOptions()->GetZoomType() != SVX_ZOOM_PERCENT &&
!pWrtShell->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE) )
- _SetZoom( aEditSz, (SvxZoomType)pWrtShell->GetViewOptions()->GetZoomType(), 100, TRUE );
+ _SetZoom( aEditSz, (SvxZoomType)pWrtShell->GetViewOptions()->GetZoomType(), 100, sal_True );
pWrtShell->EndAction();
- bRepeat = bScroll1 != pVScrollbar->IsVisible(TRUE);
+ bRepeat = bScroll1 != pVScrollbar->IsVisible(sal_True);
if ( !bRepeat )
- bRepeat = bScroll2 != pHScrollbar->IsVisible(TRUE);
+ bRepeat = bScroll2 != pHScrollbar->IsVisible(sal_True);
//Nicht endlosschleifen. Moeglichst dann stoppen wenn die
//(Auto-)Scrollbars sichtbar sind.
@@ -1228,14 +1228,14 @@ void SwView::OuterResizePixel( const Point &rOfst, const Size &rSize )
( nCnt > 10 || ( nCnt > 3 && bHAuto && bAuto ) )
)
{
- bRepeat = FALSE;
+ bRepeat = sal_False;
}
}while ( bRepeat );
- if( pVScrollbar->IsVisible(FALSE) || pVScrollbar->IsAuto())
+ if( pVScrollbar->IsVisible(sal_False) || pVScrollbar->IsAuto())
{
- BOOL bShowButtons = pVScrollbar->IsVisible(TRUE);
+ sal_Bool bShowButtons = pVScrollbar->IsVisible(sal_True);
if(pPageUpBtn && pPageUpBtn->IsVisible() != bShowButtons)
{
pPageUpBtn->Show(bShowButtons);
@@ -1248,9 +1248,9 @@ void SwView::OuterResizePixel( const Point &rOfst, const Size &rSize )
pWrtShell->UnlockPaint();
if( bUnLockView )
- pWrtShell->LockView( FALSE );
+ pWrtShell->LockView( sal_False );
- bInOuterResizePixel = FALSE;
+ bInOuterResizePixel = sal_False;
if ( mpPostItMgr )
{
@@ -1293,12 +1293,12 @@ Size SwView::GetOptimalSizePixel() const
}
-BOOL SwView::UpdateScrollbars()
+sal_Bool SwView::UpdateScrollbars()
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if ( !aVisArea.IsEmpty() )
{
- const BOOL bBorder = IsDocumentBorder();
+ const sal_Bool bBorder = IsDocumentBorder();
Rectangle aTmpRect( aVisArea );
if ( bBorder )
{
@@ -1312,11 +1312,11 @@ BOOL SwView::UpdateScrollbars()
aTmpSz.Width() += lOfst; aTmpSz.Height() += lOfst;
{
- const BOOL bVScrollVisible = pVScrollbar->IsVisible(TRUE);
+ const sal_Bool bVScrollVisible = pVScrollbar->IsVisible(sal_True);
pVScrollbar->DocSzChgd( aTmpSz );
pVScrollbar->ViewPortChgd( aTmpRect );
- BOOL bShowButtons = pVScrollbar->IsVisible(TRUE);
+ sal_Bool bShowButtons = pVScrollbar->IsVisible(sal_True);
if(pPageUpBtn && pPageUpBtn->IsVisible() != bShowButtons)
{
pPageUpBtn->Show(bShowButtons);
@@ -1326,16 +1326,16 @@ BOOL SwView::UpdateScrollbars()
pNaviBtn->Show(bShowButtons);
}
- if ( bVScrollVisible != pVScrollbar->IsVisible(TRUE) )
- bRet = TRUE;
+ if ( bVScrollVisible != pVScrollbar->IsVisible(sal_True) )
+ bRet = sal_True;
}
{
- const BOOL bHScrollVisible = pHScrollbar->IsVisible(TRUE);
+ const sal_Bool bHScrollVisible = pHScrollbar->IsVisible(sal_True);
pHScrollbar->DocSzChgd( aTmpSz );
pHScrollbar->ViewPortChgd( aTmpRect );
- if ( bHScrollVisible != pHScrollbar->IsVisible(TRUE) )
- bRet = TRUE;
- pScrollFill->Show(pHScrollbar->IsVisible(TRUE) && pVScrollbar->IsVisible(TRUE) );
+ if ( bHScrollVisible != pHScrollbar->IsVisible(sal_True) )
+ bRet = sal_True;
+ pScrollFill->Show(pHScrollbar->IsVisible(sal_True) && pVScrollbar->IsVisible(sal_True) );
}
}
return bRet;
@@ -1349,30 +1349,30 @@ void SwView::Move()
SfxViewShell::Move();
}
-BOOL SwView::HandleWheelCommands( const CommandEvent& rCEvt )
+sal_Bool SwView::HandleWheelCommands( const CommandEvent& rCEvt )
{
- BOOL bOk = FALSE;
+ sal_Bool bOk = sal_False;
const CommandWheelData* pWData = rCEvt.GetWheelData();
if( pWData && COMMAND_WHEEL_ZOOM == pWData->GetMode() )
{
- USHORT nFact = pWrtShell->GetViewOptions()->GetZoom();
+ sal_uInt16 nFact = pWrtShell->GetViewOptions()->GetZoom();
if( 0L > pWData->GetDelta() )
- nFact = static_cast< USHORT >(Max( 20, nFact - 10 ));
+ nFact = static_cast< sal_uInt16 >(Max( 20, nFact - 10 ));
else
- nFact = static_cast< USHORT >(Min( 600, nFact + 10 ));
+ nFact = static_cast< sal_uInt16 >(Min( 600, nFact + 10 ));
SetZoom( SVX_ZOOM_PERCENT, nFact );
- bOk = TRUE;
+ bOk = sal_True;
}
else
{
- if (pWData && (COMMAND_WHEEL_SCROLL==pWData->GetMode()) && (((ULONG)0xFFFFFFFF) == pWData->GetScrollLines()))
+ if (pWData && (COMMAND_WHEEL_SCROLL==pWData->GetMode()) && (((sal_uLong)0xFFFFFFFF) == pWData->GetScrollLines()))
{
if (pWData->GetDelta()<0)
PhyPageDown();
else
PhyPageUp();
- bOk = TRUE;
+ bOk = sal_True;
}
else
bOk = pEditWin->HandleScrollCommand( rCEvt,
diff --git a/sw/source/ui/uiview/viewprt.cxx b/sw/source/ui/uiview/viewprt.cxx
index e87b5ab874..4387fb2cec 100644
--- a/sw/source/ui/uiview/viewprt.cxx
+++ b/sw/source/ui/uiview/viewprt.cxx
@@ -97,14 +97,14 @@ using namespace ::com::sun::star;
--------------------------------------------------------------------*/
-SfxPrinter* __EXPORT SwView::GetPrinter( BOOL bCreate )
+SfxPrinter* __EXPORT SwView::GetPrinter( sal_Bool bCreate )
{
const IDocumentDeviceAccess* pIDDA = GetWrtShell().getIDocumentDeviceAccess();
SfxPrinter *pOld = pIDDA->getPrinter( false );
SfxPrinter *pPrt = pIDDA->getPrinter( bCreate );
if ( pOld != pPrt )
{
- BOOL bWeb = 0 != PTR_CAST(SwWebView, this);
+ sal_Bool bWeb = 0 != PTR_CAST(SwWebView, this);
::SetAppPrintOptions( &GetWrtShell(), bWeb );
}
return pPrt;
@@ -114,7 +114,7 @@ SfxPrinter* __EXPORT SwView::GetPrinter( BOOL bCreate )
Beschreibung: Druckerwechsel weitermelden
--------------------------------------------------------------------*/
-void SetPrinter( IDocumentDeviceAccess* pIDDA, SfxPrinter* pNew, BOOL bWeb )
+void SetPrinter( IDocumentDeviceAccess* pIDDA, SfxPrinter* pNew, sal_Bool bWeb )
{
SwPrintOptions* pOpt = SW_MOD()->GetPrtOptions(bWeb);
if( !pOpt)
@@ -124,7 +124,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 )
@@ -135,7 +135,7 @@ void SetPrinter( IDocumentDeviceAccess* pIDDA, SfxPrinter* pNew, BOOL bWeb )
}
-USHORT __EXPORT SwView::SetPrinter(SfxPrinter* pNew, USHORT nDiffFlags, bool )
+sal_uInt16 __EXPORT SwView::SetPrinter(SfxPrinter* pNew, sal_uInt16 nDiffFlags, bool )
{
SwWrtShell &rSh = GetWrtShell();
SfxPrinter* pOld = rSh.getIDocumentDeviceAccess()->getPrinter( false );
@@ -148,17 +148,17 @@ USHORT __EXPORT SwView::SetPrinter(SfxPrinter* pNew, USHORT nDiffFlags, bool )
if ( nDiffFlags & SFX_PRINTER_PRINTER )
rSh.SetModified();
}
- BOOL bWeb = 0 != PTR_CAST(SwWebView, this);
+ sal_Bool bWeb = 0 != PTR_CAST(SwWebView, this);
if ( nDiffFlags & SFX_PRINTER_OPTIONS )
::SetPrinter( rSh.getIDocumentDeviceAccess(), pNew, bWeb );
- const BOOL bChgOri = nDiffFlags & SFX_PRINTER_CHG_ORIENTATION ? TRUE : FALSE;
- const BOOL bChgSize= nDiffFlags & SFX_PRINTER_CHG_SIZE ? TRUE : FALSE;
+ const sal_Bool bChgOri = nDiffFlags & SFX_PRINTER_CHG_ORIENTATION ? sal_True : sal_False;
+ const sal_Bool bChgSize= nDiffFlags & SFX_PRINTER_CHG_SIZE ? sal_True : sal_False;
if ( bChgOri || bChgSize )
{
rSh.StartAllAction();
if ( bChgOri )
- rSh.ChgAllPageOrientation( USHORT(pNew->GetOrientation()) );
+ rSh.ChgAllPageOrientation( sal_uInt16(pNew->GetOrientation()) );
if ( bChgSize )
{
Size aSz( SvxPaperInfo::GetPaperSize( pNew ) );
@@ -178,7 +178,7 @@ USHORT __EXPORT SwView::SetPrinter(SfxPrinter* pNew, USHORT nDiffFlags, bool )
SfxTabPage* __EXPORT SwView::CreatePrintOptionsPage(Window* pParent,
const SfxItemSet& rSet)
{
- return ::CreatePrintOptionsPage( pParent, rSet, FALSE );
+ return ::CreatePrintOptionsPage( pParent, rSet, sal_False );
}
/*--------------------------------------------------------------------
@@ -187,7 +187,7 @@ SfxTabPage* __EXPORT SwView::CreatePrintOptionsPage(Window* pParent,
void __EXPORT SwView::ExecutePrint(SfxRequest& rReq)
{
- BOOL bWeb = 0 != PTR_CAST(SwWebView, this);
+ sal_Bool bWeb = 0 != PTR_CAST(SwWebView, this);
::SetAppPrintOptions( &GetWrtShell(), bWeb );
switch (rReq.GetSlot())
{
@@ -198,7 +198,7 @@ void __EXPORT SwView::ExecutePrint(SfxRequest& rReq)
if (sFaxName.Len())
{
SfxStringItem aPrinterName(SID_PRINTER_NAME, sFaxName);
- SfxBoolItem aSilent( SID_SILENT, TRUE );
+ SfxBoolItem aSilent( SID_SILENT, sal_True );
GetViewFrame()->GetDispatcher()->Execute( SID_PRINTDOC,
SFX_CALLMODE_SYNCHRON|SFX_CALLMODE_RECORD,
&aPrinterName, &aSilent, 0L );
@@ -207,7 +207,7 @@ void __EXPORT SwView::ExecutePrint(SfxRequest& rReq)
{
InfoBox aInfoBox(&GetEditWin(), SW_RES(MSG_ERR_NO_FAX));
String sMsg = aInfoBox.GetMessText();
- USHORT nResNo = bWeb ? STR_WEBOPTIONS : STR_TEXTOPTIONS;
+ sal_uInt16 nResNo = bWeb ? STR_WEBOPTIONS : STR_TEXTOPTIONS;
sMsg.SearchAndReplace(String::CreateFromAscii("%1"), String(SW_RES(nResNo)));
aInfoBox.SetMessText(sMsg);
aInfoBox.Execute();
@@ -222,12 +222,12 @@ void __EXPORT SwView::ExecutePrint(SfxRequest& rReq)
case SID_PRINTDOCDIRECT:
{
SwWrtShell* pSh = &GetWrtShell();
- SFX_REQUEST_ARG(rReq, pSilentItem, SfxBoolItem, SID_SILENT, FALSE);
- BOOL bSilent = pSilentItem ? pSilentItem->GetValue() : FALSE;
- SFX_REQUEST_ARG(rReq, pPrintFromMergeItem, SfxBoolItem, FN_QRY_MERGE, FALSE);
+ SFX_REQUEST_ARG(rReq, pSilentItem, SfxBoolItem, SID_SILENT, sal_False);
+ sal_Bool bSilent = pSilentItem ? pSilentItem->GetValue() : sal_False;
+ SFX_REQUEST_ARG(rReq, pPrintFromMergeItem, SfxBoolItem, FN_QRY_MERGE, sal_False);
if(pPrintFromMergeItem)
rReq.RemoveItem(FN_QRY_MERGE);
- BOOL bFromMerge = pPrintFromMergeItem ? pPrintFromMergeItem->GetValue() : FALSE;
+ sal_Bool bFromMerge = pPrintFromMergeItem ? pPrintFromMergeItem->GetValue() : sal_False;
SwMiscConfig aMiscConfig;
bool bPrintSelection = false;
if(!bSilent && !bFromMerge &&
@@ -237,7 +237,7 @@ void __EXPORT SwView::ExecutePrint(SfxRequest& rReq)
short nRet = aBox.Execute();
if(RET_YES == nRet)
{
- SfxBoolItem aBool(FN_QRY_MERGE, TRUE);
+ SfxBoolItem aBool(FN_QRY_MERGE, sal_True);
GetViewFrame()->GetDispatcher()->Execute(
FN_QRY_MERGE, SFX_CALLMODE_ASYNCHRON, &aBool, 0L);
rReq.Ignore();
@@ -281,7 +281,7 @@ void __EXPORT SwView::ExecutePrint(SfxRequest& rReq)
--------------------------------------------------------------------*/
SfxTabPage* CreatePrintOptionsPage( Window *pParent,
- const SfxItemSet &rOptions, BOOL bPreview )
+ const SfxItemSet &rOptions, sal_Bool bPreview )
{
SfxTabPage* pPage = NULL;
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
@@ -299,14 +299,10 @@ SfxTabPage* CreatePrintOptionsPage( Window *pParent,
}
-void SetAppPrintOptions( ViewShell* pSh, BOOL bWeb )
+void SetAppPrintOptions( ViewShell* pSh, sal_Bool bWeb )
{
- SwPrintData aPrtData = *SW_MOD()->GetPrtOptions(bWeb);
const IDocumentDeviceAccess* pIDDA = pSh->getIDocumentDeviceAccess();
- 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 238202e0b9..0088ce1252 100644
--- a/sw/source/ui/uiview/viewsrch.cxx
+++ b/sw/source/ui/uiview/viewsrch.cxx
@@ -38,9 +38,7 @@
#include <svl/whiter.hxx>
#include <sfx2/dispatch.hxx>
#include <svl/stritem.hxx>
-#ifndef _T2XTCMP_HXX //autogen
#include <svtools/txtcmp.hxx>
-#endif
#include <svl/itempool.hxx>
#include <svl/eitem.hxx>
#include <svl/srchitem.hxx>
@@ -52,27 +50,16 @@
#include <swmodule.hxx>
#include <swwait.hxx>
#include <workctrl.hxx>
-#ifndef _VIEW_HXX
#include <view.hxx>
-#endif
#include <wrtsh.hxx>
#include <swundo.hxx> // fuer Undo-Ids
#include <uitool.hxx>
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
-#ifndef _DOCSH_HXX
#include <docsh.hxx>
-#endif
-#ifndef _VIEW_HRC
#include <view.hrc>
-#endif
#include <SwRewriter.hxx>
-#include <undobj.hxx>
-#ifndef _COMCORE_HRC
#include <comcore.hrc>
-#endif
#include "PostItMgr.hxx"
@@ -93,9 +80,9 @@ using namespace ::com::sun::star::i18n;
struct SwSearchOptions
{
SwDocPositions eStart, eEnd;
- BOOL bDontWrap;
+ sal_Bool bDontWrap;
- SwSearchOptions( SwWrtShell* pSh, BOOL bBackward );
+ SwSearchOptions( SwWrtShell* pSh, sal_Bool bBackward );
};
@@ -115,24 +102,24 @@ inline Window* GetParentWindow( SvxSearchDialog* pSrchDlg )
--------------------------------------------------*/
-void SwView::ExecSearch(SfxRequest& rReq, BOOL bNoMessage)
+void SwView::ExecSearch(SfxRequest& rReq, sal_Bool bNoMessage)
{
const SfxItemSet* pArgs = rReq.GetArgs();
const SfxPoolItem* pItem = 0;
- const USHORT nId = SvxSearchDialogWrapper::GetChildWindowId();
+ const sal_uInt16 nId = SvxSearchDialogWrapper::GetChildWindowId();
SvxSearchDialogWrapper *pWrp = (SvxSearchDialogWrapper*)GetViewFrame()->GetChildWindow(nId);
- BOOL bQuiet = FALSE;
- if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(SID_SEARCH_QUIET, FALSE, &pItem))
+ sal_Bool bQuiet = sal_False;
+ if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(SID_SEARCH_QUIET, sal_False, &pItem))
bQuiet = ((const SfxBoolItem*) pItem)->GetValue();
- BOOL bApi = bQuiet | bNoMessage;
+ sal_Bool bApi = bQuiet | bNoMessage;
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
if (nSlot == FN_REPEAT_SEARCH && !pSrchItem)
{
if(bApi)
{
- rReq.SetReturnValue(SfxBoolItem(nSlot, FALSE));
+ rReq.SetReturnValue(SfxBoolItem(nSlot, sal_False));
nSlot = 0;
}
}
@@ -149,7 +136,7 @@ void SwView::ExecSearch(SfxRequest& rReq, BOOL bNoMessage)
break;
case FID_SEARCH_ON:
- bJustOpened = TRUE;
+ bJustOpened = sal_True;
GetViewFrame()->GetBindings().Invalidate(SID_SEARCH_ITEM);
break;
@@ -226,7 +213,7 @@ void SwView::ExecSearch(SfxRequest& rReq, BOOL bNoMessage)
{
case SVX_SEARCHCMD_FIND:
{
- BOOL bRet = SearchAndWrap(bApi);
+ sal_Bool bRet = SearchAndWrap(bApi);
if( bRet )
Scroll(pWrtShell->GetCharRect().SVRect());
rReq.SetReturnValue(SfxBoolItem(nSlot, bRet));
@@ -234,7 +221,7 @@ void SwView::ExecSearch(SfxRequest& rReq, BOOL bNoMessage)
break;
case SVX_SEARCHCMD_FIND_ALL:
{
- BOOL bRet = SearchAll();
+ sal_Bool bRet = SearchAll();
if( !bRet )
{
if( !bApi )
@@ -242,7 +229,7 @@ void SwView::ExecSearch(SfxRequest& rReq, BOOL bNoMessage)
Window* pParentWindow = GetParentWindow( pSrchDlg );
InfoBox( pParentWindow, SW_RES(MSG_NOT_FOUND)).Execute();
}
- bFound = FALSE;
+ bFound = sal_False;
}
rReq.SetReturnValue(SfxBoolItem(nSlot, bRet));
}
@@ -255,7 +242,7 @@ void SwView::ExecSearch(SfxRequest& rReq, BOOL bNoMessage)
//JP 27.04.95: warum ?
// was ist, wenn man das gefundene nur attributieren will??
- USHORT nCmd = SVX_SEARCHCMD_FIND;
+ sal_uInt16 nCmd = SVX_SEARCHCMD_FIND;
if( pSrchItem->GetReplaceString().Len() ||
!pReplList )
{
@@ -263,7 +250,7 @@ void SwView::ExecSearch(SfxRequest& rReq, BOOL bNoMessage)
// Ersetzungsstring enthalten ist - der ersetzte String
// noch einmal gefunden wird.
- BOOL bBack = pSrchItem->GetBackward();
+ sal_Bool bBack = pSrchItem->GetBackward();
if (bBack)
pWrtShell->Push();
String aReplace( pSrchItem->GetReplaceString() );
@@ -288,9 +275,9 @@ void SwView::ExecSearch(SfxRequest& rReq, BOOL bNoMessage)
// 2) Weiter suchen (ohne zu ersetzen!)
- USHORT nOldCmd = pSrchItem->GetCommand();
+ sal_uInt16 nOldCmd = pSrchItem->GetCommand();
pSrchItem->SetCommand( nCmd );
- BOOL bRet = SearchAndWrap(bApi);
+ sal_Bool bRet = SearchAndWrap(bApi);
if( bRet )
Scroll( pWrtShell->GetCharRect().SVRect());
pSrchItem->SetCommand( nOldCmd );
@@ -307,18 +294,18 @@ void SwView::ExecSearch(SfxRequest& rReq, BOOL bNoMessage)
{
// bestehende Selektionen aufheben,
// wenn nicht in selektierten Bereichen gesucht werden soll
- (pWrtShell->*pWrtShell->fnKillSel)(0, FALSE);
+ (pWrtShell->*pWrtShell->fnKillSel)(0, sal_False);
if( DOCPOS_START == aOpts.eEnd )
pWrtShell->EndDoc();
else
pWrtShell->SttDoc();
}
- bExtra = FALSE;
- ULONG nFound;
+ bExtra = sal_False;
+ sal_uLong nFound;
{ //Scope for SwWait-Object
- SwWait aWait( *GetDocShell(), TRUE );
+ SwWait aWait( *GetDocShell(), sal_True );
pWrtShell->StartAllAction();
nFound = FUNC_Search( aOpts );
pWrtShell->EndAllAction();
@@ -331,7 +318,7 @@ void SwView::ExecSearch(SfxRequest& rReq, BOOL bNoMessage)
Window* pParentWindow = GetParentWindow( pSrchDlg );
InfoBox( pParentWindow, SW_RES(MSG_NOT_FOUND)).Execute();
}
- bFound = FALSE;
+ bFound = sal_False;
return;
}
@@ -360,7 +347,7 @@ void SwView::ExecSearch(SfxRequest& rReq, BOOL bNoMessage)
case FID_SEARCH_SEARCHSET:
case FID_SEARCH_REPLACESET:
{
- static const USHORT aNormalAttr[] =
+ static const sal_uInt16 aNormalAttr[] =
{
/* 0 */ RES_CHRATR_CASEMAP, RES_CHRATR_CASEMAP,
/* 2 */ RES_CHRATR_COLOR, RES_CHRATR_POSTURE,
@@ -378,13 +365,13 @@ void SwView::ExecSearch(SfxRequest& rReq, BOOL bNoMessage)
/*24 */ 0
};
- static const USHORT aCJKAttr[] =
+ static const sal_uInt16 aCJKAttr[] =
{
RES_CHRATR_CJK_FONT, RES_CHRATR_CJK_WEIGHT,
RES_CHRATR_EMPHASIS_MARK, RES_CHRATR_TWO_LINES,
RES_PARATR_SCRIPTSPACE, RES_PARATR_FORBIDDEN_RULES
};
- static const USHORT aCTLAttr[] =
+ static const sal_uInt16 aCTLAttr[] =
{
RES_CHRATR_CTL_FONT, RES_CHRATR_CTL_WEIGHT
};
@@ -404,7 +391,7 @@ void SwView::ExecSearch(SfxRequest& rReq, BOOL bNoMessage)
14 );
SfxItemSet aSet( pWrtShell->GetAttrPool(), aArr.GetData() );
- USHORT nWhich = SID_SEARCH_SEARCHSET;
+ sal_uInt16 nWhich = SID_SEARCH_SEARCHSET;
if ( FID_SEARCH_REPLACESET == nSlot )
{
@@ -439,7 +426,7 @@ void SwView::ExecSearch(SfxRequest& rReq, BOOL bNoMessage)
}
-BOOL SwView::SearchAndWrap(BOOL bApi)
+sal_Bool SwView::SearchAndWrap(sal_Bool bApi)
{
SwSearchOptions aOpts( pWrtShell, pSrchItem->GetBackward() );
@@ -451,12 +438,12 @@ BOOL SwView::SearchAndWrap(BOOL bApi)
// falls in selektierten Bereichen gesucht werden soll, duerfen sie
// nicht aufgehoben werden
if (!pSrchItem->GetSelection())
- (pWrtShell->*pWrtShell->fnKillSel)(0, FALSE);
+ (pWrtShell->*pWrtShell->fnKillSel)(0, sal_False);
- SwWait *pWait = new SwWait( *GetDocShell(), TRUE );
+ SwWait *pWait = new SwWait( *GetDocShell(), sal_True );
if( FUNC_Search( aOpts ) )
{
- bFound = TRUE;
+ bFound = sal_True;
if(pWrtShell->IsSelFrmMode())
{
pWrtShell->UnSelectFrm();
@@ -465,30 +452,30 @@ BOOL SwView::SearchAndWrap(BOOL bApi)
pWrtShell->Pop();
pWrtShell->EndAllAction();
delete pWait;
- return TRUE;
+ return sal_True;
}
delete pWait, pWait = 0;
// Suchen in den Sonderbereichen, wenn keine
// Suche in Selektionen vorliegt. Bei Suche in Selektionen
// wird ohnehin in diesen Sonderbereichen gesucht
- BOOL bHasSrchInOther = bExtra;
+ sal_Bool bHasSrchInOther = bExtra;
if (!pSrchItem->GetSelection() && !bExtra )
{
- bExtra = TRUE;
+ bExtra = sal_True;
if( FUNC_Search( aOpts ) )
{
- bFound = TRUE;
+ bFound = sal_True;
pWrtShell->Pop();
pWrtShell->EndAllAction();
- return TRUE;
+ return sal_True;
}
- bExtra = FALSE;
+ bExtra = sal_False;
}
else
bExtra = !bExtra;
- const USHORT nId = SvxSearchDialogWrapper::GetChildWindowId();
+ const sal_uInt16 nId = SvxSearchDialogWrapper::GetChildWindowId();
SvxSearchDialogWrapper *pWrp = (SvxSearchDialogWrapper*)GetViewFrame()->GetChildWindow(nId);
pSrchDlg = pWrp ? static_cast <SvxSearchDialog*> (pWrp->getDialog ()) : 0;
@@ -501,9 +488,9 @@ BOOL SwView::SearchAndWrap(BOOL bApi)
Window* pParentWindow = GetParentWindow( pSrchDlg );
InfoBox( pParentWindow, SW_RES(MSG_NOT_FOUND)).Execute();
}
- bFound = FALSE;
+ bFound = sal_False;
pWrtShell->Pop();
- return FALSE;
+ return sal_False;
}
pWrtShell->EndAllAction();
// noch mal mit WrapAround versuchen?
@@ -514,15 +501,15 @@ BOOL SwView::SearchAndWrap(BOOL bApi)
: MSG_SEARCH_END )
).Execute() )
{
- bFound = FALSE;
+ bFound = sal_False;
pWrtShell->Pop();
- return FALSE;
+ return sal_False;
}
pWrtShell->StartAllAction();
- pWrtShell->Pop(FALSE);
- pWait = new SwWait( *GetDocShell(), TRUE );
+ pWrtShell->Pop(sal_False);
+ pWait = new SwWait( *GetDocShell(), sal_True );
- BOOL bSrchBkwrd = DOCPOS_START == aOpts.eEnd;
+ sal_Bool bSrchBkwrd = DOCPOS_START == aOpts.eEnd;
aOpts.eEnd = bSrchBkwrd ? DOCPOS_START : DOCPOS_END;
aOpts.eStart = bSrchBkwrd ? DOCPOS_END : DOCPOS_START;
@@ -546,13 +533,13 @@ BOOL SwView::SearchAndWrap(BOOL bApi)
Window* pParentWindow = GetParentWindow( pSrchDlg );
InfoBox( pParentWindow, SW_RES(MSG_NOT_FOUND)).Execute();
}
- return bFound = FALSE;
+ return bFound = sal_False;
}
-BOOL SwView::SearchAll(USHORT* pFound)
+sal_Bool SwView::SearchAll(sal_uInt16* pFound)
{
- SwWait aWait( *GetDocShell(), TRUE );
+ SwWait aWait( *GetDocShell(), sal_True );
pWrtShell->StartAllAction();
SwSearchOptions aOpts( pWrtShell, pSrchItem->GetBackward() );
@@ -561,15 +548,15 @@ BOOL SwView::SearchAll(USHORT* pFound)
{
// bestehende Selektionen aufheben,
// wenn nicht in selektierten Bereichen gesucht werden soll
- (pWrtShell->*pWrtShell->fnKillSel)(0, FALSE);
+ (pWrtShell->*pWrtShell->fnKillSel)(0, sal_False);
if( DOCPOS_START == aOpts.eEnd )
pWrtShell->EndDoc();
else
pWrtShell->SttDoc();
}
- bExtra = FALSE;
- USHORT nFound = (USHORT)FUNC_Search( aOpts );
+ bExtra = sal_False;
+ sal_uInt16 nFound = (sal_uInt16)FUNC_Search( aOpts );
if(pFound)
*pFound = nFound;
bFound = 0 != nFound;
@@ -581,7 +568,7 @@ BOOL SwView::SearchAll(USHORT* pFound)
void SwView::Replace()
{
- SwWait aWait( *GetDocShell(), TRUE );
+ SwWait aWait( *GetDocShell(), sal_True );
pWrtShell->StartAllAction();
@@ -598,7 +585,7 @@ void SwView::Replace()
pSrchItem->GetReplaceString(),
SwWrtShell::GETSTYLE_CREATESOME ));
- pWrtShell->EndUndo(UNDO_UI_REPLACE_STYLE); // #111827#
+ pWrtShell->EndUndo(); // #111827#
}
else
{
@@ -624,7 +611,7 @@ void SwView::Replace()
-SwSearchOptions::SwSearchOptions( SwWrtShell* pSh, BOOL bBackward )
+SwSearchOptions::SwSearchOptions( SwWrtShell* pSh, sal_Bool bBackward )
{
eStart = DOCPOS_CURR;
if( bBackward )
@@ -639,9 +626,9 @@ SwSearchOptions::SwSearchOptions( SwWrtShell* pSh, BOOL bBackward )
}
}
-ULONG SwView::FUNC_Search( const SwSearchOptions& rOptions )
+sal_uLong SwView::FUNC_Search( const SwSearchOptions& rOptions )
{
- BOOL bDoReplace = pSrchItem->GetCommand() == SVX_SEARCHCMD_REPLACE ||
+ sal_Bool bDoReplace = pSrchItem->GetCommand() == SVX_SEARCHCMD_REPLACE ||
pSrchItem->GetCommand() == SVX_SEARCHCMD_REPLACE_ALL;
int eRanges = pSrchItem->GetSelection() ?
@@ -652,7 +639,7 @@ ULONG SwView::FUNC_Search( const SwSearchOptions& rOptions )
pWrtShell->SttSelect();
- static USHORT __READONLY_DATA aSearchAttrRange[] = {
+ static sal_uInt16 __READONLY_DATA aSearchAttrRange[] = {
RES_FRMATR_BEGIN, RES_FRMATR_END-1,
RES_CHRATR_BEGIN, RES_CHRATR_END-1,
RES_PARATR_BEGIN, RES_PARATR_END-1,
@@ -686,11 +673,11 @@ ULONG SwView::FUNC_Search( const SwSearchOptions& rOptions )
// build SearchOptions to be used
//
SearchOptions aSearchOpt( pSrchItem->GetSearchOptions() );
- aSearchOpt.Locale = SvxCreateLocale( (USHORT)GetAppLanguage() );
+ aSearchOpt.Locale = SvxCreateLocale( (sal_uInt16)GetAppLanguage() );
if( !bDoReplace )
aSearchOpt.replaceString = aEmptyStr;
- ULONG nFound;
+ sal_uLong nFound;
if( aSrchSet.Count() || ( pReplSet && pReplSet->Count() ))
{
nFound = pWrtShell->SearchAttr(
@@ -727,7 +714,7 @@ ULONG SwView::FUNC_Search( const SwSearchOptions& rOptions )
LAYOUT_NS Dialog* SwView::GetSearchDialog()
{
- const USHORT nId = SvxSearchDialogWrapper::GetChildWindowId();
+ const sal_uInt16 nId = SvxSearchDialogWrapper::GetChildWindowId();
SvxSearchDialogWrapper *pWrp = (SvxSearchDialogWrapper*)SfxViewFrame::Current()->GetChildWindow(nId);
if ( pWrp )
pSrchDlg = pWrp->getDialog ();
@@ -739,7 +726,7 @@ LAYOUT_NS Dialog* SwView::GetSearchDialog()
void SwView::StateSearch(SfxItemSet &rSet)
{
SfxWhichIter aIter(rSet);
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while(nWhich)
{
@@ -747,7 +734,7 @@ void SwView::StateSearch(SfxItemSet &rSet)
{
case SID_SEARCH_OPTIONS:
{
- UINT16 nOpt = 0xFFFF;
+ sal_uInt16 nOpt = 0xFFFF;
if( GetDocShell()->IsReadOnly() )
nOpt &= ~( SEARCH_OPTIONS_REPLACE |
SEARCH_OPTIONS_REPLACE_ALL );
@@ -770,13 +757,13 @@ void SwView::StateSearch(SfxItemSet &rSet)
( aTxt = pWrtShell->SwCrsrShell::GetSelTxt() ).Len() )
{
pSrchItem->SetSearchString( aTxt );
- pSrchItem->SetSelection( FALSE );
+ pSrchItem->SetSelection( sal_False );
}
else
- pSrchItem->SetSelection( TRUE );
+ pSrchItem->SetSelection( sal_True );
}
- bJustOpened = FALSE;
+ bJustOpened = sal_False;
rSet.Put( *pSrchItem );
}
break;
@@ -784,7 +771,7 @@ void SwView::StateSearch(SfxItemSet &rSet)
/* case SID_SEARCH_REPLACESET:
case SID_SEARCH_SEARCHSET:
{
- static USHORT __READONLY_DATA aSearchAttrRange[] =
+ static sal_uInt16 __READONLY_DATA aSearchAttrRange[] =
{
RES_CHRATR_CASEMAP, RES_CHRATR_POSTURE,
RES_CHRATR_SHADOWED, RES_CHRATR_WORDLINEMODE,
diff --git a/sw/source/ui/uiview/viewstat.cxx b/sw/source/ui/uiview/viewstat.cxx
index 84a0e0a8f1..2bbc325f54 100644
--- a/sw/source/ui/uiview/viewstat.cxx
+++ b/sw/source/ui/uiview/viewstat.cxx
@@ -27,6 +27,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>
@@ -49,28 +50,20 @@
#include <tox.hxx>
#include <sfx2/dispatch.hxx>
#include <sfx2/app.hxx>
-#ifndef _VIEW_HXX
#include <view.hxx>
-#endif
#include <wrtsh.hxx>
-#ifndef _BASESH_HXX
#include <basesh.hxx>
-#endif
#include <uitool.hxx>
#include <viewopt.hxx>
#include <tablemgr.hxx>
#include <pagedesc.hxx>
-#ifndef _WVIEW_HXX
#include <wview.hxx>
-#endif
#include <globdoc.hxx>
#include <svl/stritem.hxx>
#include <unotools/moduleoptions.hxx>
#include <svl/visitem.hxx>
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
#include <IDocumentRedlineAccess.hxx>
@@ -163,7 +156,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:
@@ -190,7 +183,7 @@ void SwView::GetState(SfxItemSet &rSet)
if(pWrtShell->IsInVerticalText())
aImgItem.SetRotation(2700);
if(pWrtShell->IsInRightToLeftText())
- aImgItem.SetMirrored(TRUE);
+ aImgItem.SetMirrored(sal_True);
}
rSet.Put(aImgItem);
}
@@ -208,7 +201,7 @@ void SwView::GetState(SfxItemSet &rSet)
if(pWrtShell->IsInVerticalText())
aImgItem.SetRotation(2700);
if(pWrtShell->IsInRightToLeftText())
- aImgItem.SetMirrored(TRUE);
+ aImgItem.SetMirrored(sal_True);
}
rSet.Put(aImgItem);
}
@@ -362,7 +355,7 @@ void SwView::GetState(SfxItemSet &rSet)
if(pWrtShell->IsInVerticalText())
aImageItem.SetRotation( 2700 );
if(pWrtShell->IsInRightToLeftText())
- aImageItem.SetMirrored( TRUE );
+ aImageItem.SetMirrored( sal_True );
rSet.Put(aImageItem);
}
break;
@@ -390,7 +383,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 c7049866d5..03b6dfa5f3 100644
--- a/sw/source/ui/uiview/viewtab.cxx
+++ b/sw/source/ui/uiview/viewtab.cxx
@@ -86,19 +86,19 @@ using namespace ::com::sun::star;
void lcl_FillSvxColumn(const SwFmtCol& rCol,
- USHORT nTotalWidth,
+ sal_uInt16 nTotalWidth,
SvxColumnItem& rColItem,
long nDistance)
{
const SwColumns& rCols = rCol.GetColumns();
- USHORT nWidth = 0;
+ sal_uInt16 nWidth = 0;
- BOOL bOrtho = rCol.IsOrtho() && rCols.Count();
+ sal_Bool bOrtho = rCol.IsOrtho() && rCols.Count();
long nInnerWidth = 0;
if( bOrtho )
{
nInnerWidth = nTotalWidth;
- for ( USHORT i = 0; i < rCols.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rCols.Count(); ++i )
{
SwColumn* pCol = rCols[i];
nInnerWidth -= pCol->GetLeft() + pCol->GetRight();
@@ -108,17 +108,17 @@ void lcl_FillSvxColumn(const SwFmtCol& rCol,
else
nInnerWidth /= rCols.Count();
}
- for ( USHORT i = 0; i < rCols.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rCols.Count(); ++i )
{
SwColumn* pCol = rCols[i];
- const USHORT nStart = USHORT(pCol->GetLeft() + nWidth + nDistance);
+ const sal_uInt16 nStart = sal_uInt16(pCol->GetLeft() + nWidth + nDistance);
if( bOrtho )
- nWidth = static_cast< USHORT >(nWidth + nInnerWidth + pCol->GetLeft() + pCol->GetRight());
+ nWidth = static_cast< sal_uInt16 >(nWidth + nInnerWidth + pCol->GetLeft() + pCol->GetRight());
else
- nWidth = static_cast< USHORT >(nWidth + rCol.CalcColWidth(i, nTotalWidth));
- const USHORT nEnd = USHORT(nWidth - pCol->GetRight() + nDistance);
+ nWidth = static_cast< sal_uInt16 >(nWidth + rCol.CalcColWidth(i, nTotalWidth));
+ const sal_uInt16 nEnd = sal_uInt16(nWidth - pCol->GetRight() + nDistance);
- SvxColumnDescription aColDesc(nStart, nEnd, TRUE);
+ SvxColumnDescription aColDesc(nStart, nEnd, sal_True);
rColItem.Append(aColDesc);
}
}
@@ -129,7 +129,7 @@ void lcl_FillSvxColumn(const SwFmtCol& rCol,
void lcl_ConvertToCols(const SvxColumnItem& rColItem,
- USHORT nTotalWidth,
+ sal_uInt16 nTotalWidth,
SwFmtCol& rCols)
{
ASSERT( rCols.GetNumCols() == rColItem.Count(), "Column count mismatch" );
@@ -138,27 +138,27 @@ void lcl_ConvertToCols(const SvxColumnItem& rColItem,
if(rCols.GetNumCols() != rColItem.Count())
return;
- USHORT nLeft = 0;
+ sal_uInt16 nLeft = 0;
SwTwips nSumAll= 0; // Summiere alle Spalten und Raender auf
SwColumns& rArr = rCols.GetColumns();
// Tabcols der Reihe nach
- for( USHORT i=0; i < rColItem.Count()-1; ++i )
+ for( sal_uInt16 i=0; i < rColItem.Count()-1; ++i )
{
DBG_ASSERT(rColItem[i+1].nStart >= rColItem[i].nEnd,"\201berlappende Spalten" );
- USHORT nStart = static_cast< USHORT >(rColItem[i+1].nStart);
- USHORT nEnd = static_cast< USHORT >(rColItem[i].nEnd);
+ sal_uInt16 nStart = static_cast< sal_uInt16 >(rColItem[i+1].nStart);
+ sal_uInt16 nEnd = static_cast< sal_uInt16 >(rColItem[i].nEnd);
if(nStart < nEnd)
nStart = nEnd;
- const USHORT nDiff = nStart - nEnd;
- const USHORT nRight = nDiff / 2;
+ const sal_uInt16 nDiff = nStart - nEnd;
+ const sal_uInt16 nRight = nDiff / 2;
- USHORT nWidth = static_cast< USHORT >(rColItem[i].nEnd - rColItem[i].nStart);
+ sal_uInt16 nWidth = static_cast< sal_uInt16 >(rColItem[i].nEnd - rColItem[i].nStart);
nWidth += nLeft + nRight;
SwColumn* pCol = rArr[i];
- pCol->SetWishWidth( USHORT(long(rCols.GetWishWidth()) * long(nWidth) /
+ pCol->SetWishWidth( sal_uInt16(long(rCols.GetWishWidth()) * long(nWidth) /
long(nTotalWidth) ));
pCol->SetLeft( nLeft );
pCol->SetRight( nRight );
@@ -170,9 +170,9 @@ void lcl_ConvertToCols(const SvxColumnItem& rColItem,
//Die Differenz aus der Gesamtwunschbreite und der Summe der bisher berechneten
// Spalten und Raender sollte die Breite der letzten Spalte ergeben.
- rArr[rColItem.Count()-1]->SetWishWidth( rCols.GetWishWidth() - (USHORT)nSumAll );
+ rArr[rColItem.Count()-1]->SetWishWidth( rCols.GetWishWidth() - (sal_uInt16)nSumAll );
- rCols.SetOrtho(FALSE, 0, 0 );
+ rCols.SetOrtho(sal_False, 0, 0 );
}
/*--------------------------------------------------------------------
@@ -183,7 +183,7 @@ void lcl_ConvertToCols(const SvxColumnItem& rColItem,
void lcl_EraseDefTabs(SvxTabStopItem& rTabStops)
{
// Def Tabs loeschen
- for ( USHORT i = 0; i < rTabStops.Count(); )
+ for ( sal_uInt16 i = 0; i < rTabStops.Count(); )
{
// Hier auch den DefTab auf Null rausschmeissen
if ( SVX_TAB_ADJUST_DEFAULT == rTabStops[i].GetAdjustment() ||
@@ -203,7 +203,7 @@ void lcl_EraseDefTabs(SvxTabStopItem& rTabStops)
void SwView::SwapPageMargin(const SwPageDesc& rDesc, SvxLRSpaceItem& rLRSpace)
{
- USHORT nPhyPage, nVirPage;
+ sal_uInt16 nPhyPage, nVirPage;
GetWrtShell().GetPageNum( nPhyPage, nVirPage );
if ( rDesc.GetUseOn() == nsUseOnPage::PD_MIRROR && (nPhyPage % 2) == 0 )
@@ -239,30 +239,30 @@ void ResizeFrameCols(SwFmtCol& rCol,
{
// wenn die Wunschbreite zu gross wird, dann muessen alle Werte passend skaliert werden
long nScale = (0xffffl << 8)/ nNewWishWidth;
- for(USHORT i = 0; i < rArr.Count(); i++)
+ for(sal_uInt16 i = 0; i < rArr.Count(); i++)
{
SwColumn* pCol = rArr.GetObject(i);
long nVal = pCol->GetWishWidth();
lcl_Scale(nVal, nScale);
- pCol->SetWishWidth((USHORT) nVal);
+ pCol->SetWishWidth((sal_uInt16) nVal);
nVal = pCol->GetLeft();
lcl_Scale(nVal, nScale);
- pCol->SetLeft((USHORT) nVal);
+ pCol->SetLeft((sal_uInt16) nVal);
nVal = pCol->GetRight();
lcl_Scale(nVal, nScale);
- pCol->SetRight((USHORT) nVal);
+ pCol->SetRight((sal_uInt16) nVal);
}
lcl_Scale(nNewWishWidth, nScale);
lcl_Scale(nWishDiff, nScale);
}
- rCol.SetWishWidth( (USHORT) (nNewWishWidth) );
+ rCol.SetWishWidth( (sal_uInt16) (nNewWishWidth) );
if( nLeftDelta >= 2 || nLeftDelta <= -2)
- rArr[0]->SetWishWidth(rArr[0]->GetWishWidth() + (USHORT)nWishDiff);
+ rArr[0]->SetWishWidth(rArr[0]->GetWishWidth() + (sal_uInt16)nWishDiff);
else
- rArr[rArr.Count()-1]->SetWishWidth(rArr[rArr.Count()-1]->GetWishWidth() + (USHORT)nWishDiff);
+ rArr[rArr.Count()-1]->SetWishWidth(rArr[rArr.Count()-1]->GetWishWidth() + (sal_uInt16)nWishDiff);
//reset auto width
- rCol.SetOrtho(FALSE, 0, 0 );
+ rCol.SetOrtho(sal_False, 0, 0 );
}
/*--------------------------------------------------------------------
Beschreibung: Hier werden alle Aenderungen der Tableiste
@@ -273,18 +273,18 @@ void ResizeFrameCols(SwFmtCol& rCol,
void SwView::ExecTabWin( SfxRequest& rReq )
{
SwWrtShell &rSh = GetWrtShell();
- const USHORT nFrmType = rSh.IsObjSelected() ?
+ const sal_uInt16 nFrmType = rSh.IsObjSelected() ?
FRMTYPE_DRAWOBJ :
- rSh.GetFrmType(0,TRUE);
- const BOOL bFrmSelection = rSh.IsFrmSelected();
- const BOOL bBrowse = rSh.getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE);
+ rSh.GetFrmType(0,sal_True);
+ const sal_Bool bFrmSelection = rSh.IsFrmSelected();
+ const sal_Bool bBrowse = rSh.getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE);
- const USHORT nSlot = rReq.GetSlot();
- const USHORT nDescId = rSh.GetCurPageDesc();
+ const sal_uInt16 nSlot = rReq.GetSlot();
+ const sal_uInt16 nDescId = rSh.GetCurPageDesc();
const SwPageDesc& rDesc = rSh.GetPageDesc( nDescId );
- const BOOL bVerticalWriting = rSh.IsInVerticalText();
+ const sal_Bool bVerticalWriting = rSh.IsInVerticalText();
const SwFmtHeader& rHeaderFmt = rDesc.GetMaster().GetHeader();
SwFrmFmt *pHeaderFmt = (SwFrmFmt*)rHeaderFmt.GetHeaderFmt();
@@ -297,9 +297,9 @@ void SwView::ExecTabWin( SfxRequest& rReq )
const long nPageWidth = bBrowse ? rPageRect.Width() : rFrmSize.GetWidth();
const long nPageHeight = bBrowse ? rPageRect.Height() : rFrmSize.GetHeight();
- BOOL bUnlockView = FALSE;
+ sal_Bool bUnlockView = sal_False;
rSh.StartAllAction();
- BOOL bSect = 0 != (nFrmType & FRMTYPE_COLSECT);
+ sal_Bool bSect = 0 != (nFrmType & FRMTYPE_COLSECT);
switch ( nSlot )
{
@@ -313,8 +313,8 @@ void SwView::ExecTabWin( SfxRequest& rReq )
SwFrmFmt* pFmt = ((SwFrmFmt*)rSh.GetFlyFrmFmt());
const SwRect &rRect = rSh.GetAnyCurRect(RECT_FLY_EMBEDDED);
- BOOL bRTL;
- BOOL bVerticalFrame = (bFrmSelection && rSh.IsFrmVertical(TRUE, bRTL))|| (!bFrmSelection && bVerticalWriting);
+ sal_Bool bRTL;
+ sal_Bool bVerticalFrame = (bFrmSelection && rSh.IsFrmVertical(sal_True, bRTL))|| (!bFrmSelection && bVerticalWriting);
long nDeltaX = bVerticalFrame ?
rRect.Right() - rPageRect.Right() + aLongLR.GetRight() :
rPageRect.Left() + aLongLR.GetLeft() - rRect.Left();
@@ -346,7 +346,7 @@ void SwView::ExecTabWin( SfxRequest& rReq )
SwRect aRect;
rSh.CalcBoundRect(aRect, FLY_AS_CHAR);
long nPrtWidth = aRect.Width();
- aSize.SetWidthPercent(BYTE((nPageWidth - aLongLR.GetLeft() - aLongLR.GetRight()) * 100 /nPrtWidth));
+ aSize.SetWidthPercent(sal_uInt8((nPageWidth - aLongLR.GetLeft() - aLongLR.GetRight()) * 100 /nPrtWidth));
}
else
aSize.SetWidth( nPageWidth -
@@ -381,9 +381,9 @@ void SwView::ExecTabWin( SfxRequest& rReq )
aLongLR.SetLeft( nOld > aLongLR.GetLeft() ? 0 : aLongLR.GetLeft() - nOld );
nOld = rDesc.GetMaster().GetLRSpace().GetRight();
- aLongLR.SetRight( nOld > (USHORT)aLongLR.GetRight() ? 0 : aLongLR.GetRight() - nOld );
- aLR.SetLeft((USHORT)aLongLR.GetLeft());
- aLR.SetRight((USHORT)aLongLR.GetRight());
+ aLongLR.SetRight( nOld > (sal_uInt16)aLongLR.GetRight() ? 0 : aLongLR.GetRight() - nOld );
+ aLR.SetLeft((sal_uInt16)aLongLR.GetLeft());
+ aLR.SetRight((sal_uInt16)aLongLR.GetRight());
if ( nFrmType & FRMTYPE_HEADER && pHeaderFmt )
pHeaderFmt->SetFmtAttr( aLR );
@@ -427,8 +427,8 @@ void SwView::ExecTabWin( SfxRequest& rReq )
}
else
{ // Seitenraender einstellen
- aLR.SetLeft((USHORT)aLongLR.GetLeft());
- aLR.SetRight((USHORT)aLongLR.GetRight());
+ aLR.SetLeft((sal_uInt16)aLongLR.GetLeft());
+ aLR.SetRight((sal_uInt16)aLongLR.GetRight());
SwapPageMargin( rDesc, aLR );
SwPageDesc aDesc( rDesc );
aDesc.GetMaster().SetFmtAttr( aLR );
@@ -451,8 +451,8 @@ void SwView::ExecTabWin( SfxRequest& rReq )
SfxItemSet aSet( GetPool(), RES_FRM_SIZE, RES_FRM_SIZE,
RES_VERT_ORIENT, RES_HORI_ORIENT, 0 );
//which of the orientation attributes is to be put depends on the frame's environment
- BOOL bRTL;
- if((bFrmSelection && rSh.IsFrmVertical(TRUE, bRTL))|| (!bFrmSelection && bVerticalWriting))
+ sal_Bool bRTL;
+ if((bFrmSelection && rSh.IsFrmVertical(sal_True, bRTL))|| (!bFrmSelection && bVerticalWriting))
{
SwFmtHoriOrient aHoriOrient(pFmt->GetHoriOrient());
aHoriOrient.SetHoriOrient(text::HoriOrientation::NONE);
@@ -472,7 +472,7 @@ void SwView::ExecTabWin( SfxRequest& rReq )
SwRect aRect;
rSh.CalcBoundRect(aRect, FLY_AS_CHAR);
long nPrtHeight = aRect.Height();
- aSize.SetHeightPercent(BYTE(nHeight * 100 /nPrtHeight));
+ aSize.SetHeightPercent(sal_uInt8(nHeight * 100 /nPrtHeight));
}
else
aSize.SetHeight(nHeight );
@@ -521,12 +521,12 @@ void SwView::ExecTabWin( SfxRequest& rReq )
if ( nFrmType & ( FRMTYPE_HEADER | FRMTYPE_FOOTER ))
{
- const BOOL bHead = nFrmType & FRMTYPE_HEADER ? TRUE : FALSE;
+ const sal_Bool bHead = nFrmType & FRMTYPE_HEADER ? sal_True : sal_False;
SvxULSpaceItem aUL( rDesc.GetMaster().GetULSpace() );
if ( bHead )
- aUL.SetUpper( (USHORT)aLongULSpace.GetUpper() );
+ aUL.SetUpper( (sal_uInt16)aLongULSpace.GetUpper() );
else
- aUL.SetLower( (USHORT)aLongULSpace.GetLower() );
+ aUL.SetLower( (sal_uInt16)aLongULSpace.GetLower() );
aDesc.GetMaster().SetFmtAttr( aUL );
if( (bHead && pHeaderFmt) || (!bHead && pFooterFmt) )
@@ -545,8 +545,8 @@ void SwView::ExecTabWin( SfxRequest& rReq )
else
{
SvxULSpaceItem aUL(RES_UL_SPACE);
- aUL.SetUpper((USHORT)aLongULSpace.GetUpper());
- aUL.SetLower((USHORT)aLongULSpace.GetLower());
+ aUL.SetUpper((sal_uInt16)aLongULSpace.GetUpper());
+ aUL.SetLower((sal_uInt16)aLongULSpace.GetLower());
aDesc.GetMaster().SetFmtAttr(aUL);
}
@@ -557,7 +557,7 @@ void SwView::ExecTabWin( SfxRequest& rReq )
case SID_ATTR_TABSTOP_VERTICAL:
case SID_ATTR_TABSTOP:
{
- USHORT nWhich = GetPool().GetWhich(nSlot);
+ sal_uInt16 nWhich = GetPool().GetWhich(nSlot);
SvxTabStopItem aTabStops( (const SvxTabStopItem&)rReq.GetArgs()->
Get( nWhich ));
aTabStops.SetWhich(RES_PARATR_TABSTOP);
@@ -576,7 +576,7 @@ void SwView::ExecTabWin( SfxRequest& rReq )
}
// auffuellen mit Default-Tabs
- USHORT nDef = ::GetTabDist( rDefTabs );
+ sal_uInt16 nDef = ::GetTabDist( rDefTabs );
::MakeDefTabs( nDef, aTabStops );
SwTxtFmtColl* pColl = rSh.GetCurTxtFmtColl();
@@ -601,12 +601,12 @@ void SwView::ExecTabWin( SfxRequest& rReq )
sal_Bool bLastColumn = sal_True;
if(nFrmType & FRMTYPE_COLUMN)
{
- USHORT nCurFrameCol = rSh.GetCurColNum() - 1;
+ sal_uInt16 nCurFrameCol = rSh.GetCurColNum() - 1;
bFirstColumn = !nCurFrameCol;
const SwFrmFmt* pFmt = rSh.GetFlyFrmFmt();
const SwFmtCol* pCols = &pFmt->GetCol();
const SwColumns& rCols = pCols->GetColumns();
- USHORT nColumnCount = rCols.Count();
+ sal_uInt16 nColumnCount = rCols.Count();
bLastColumn = nColumnCount == nCurFrameCol + 1;
}
}
@@ -654,7 +654,7 @@ void SwView::ExecTabWin( SfxRequest& rReq )
const SvxTabStopItem& rTabStops = (const SvxTabStopItem&)aSet.Get(RES_PARATR_TABSTOP);
// Haben wir einen Tab an Stelle Null
- USHORT i;
+ sal_uInt16 i;
for ( i = 0; i < rTabStops.Count(); ++i )
if ( rTabStops[i].GetTabPos() == 0 )
@@ -673,7 +673,7 @@ void SwView::ExecTabWin( SfxRequest& rReq )
const SvxTabStopItem& rDefTabs =
(const SvxTabStopItem&)rSh.GetDefault(RES_PARATR_TABSTOP);
- USHORT nDef = ::GetTabDist(rDefTabs);
+ sal_uInt16 nDef = ::GetTabDist(rDefTabs);
::MakeDefTabs( nDef, aTabStops );
if( pColl && pColl->IsAutoUpdateFmt())
@@ -698,7 +698,7 @@ void SwView::ExecTabWin( SfxRequest& rReq )
{
ASSERT(aColItem.Count(), "ColDesc ist leer!!");
- const BOOL bSingleLine = ((const SfxBoolItem&)rReq.
+ const sal_Bool bSingleLine = ((const SfxBoolItem&)rReq.
GetArgs()->Get(SID_RULER_ACT_LINE_ONLY)).GetValue();
SwTabCols aTabCols;
@@ -726,14 +726,14 @@ void SwView::ExecTabWin( SfxRequest& rReq )
// Tabcols der Reihe nach
// Die letzte Col wird durch den Rand definiert
//columns in right-to-left tables need to be mirrored
- BOOL bIsTableRTL =
+ sal_Bool bIsTableRTL =
IsTabColFromDoc() ?
rSh.IsMouseTableRightToLeft(aTabColFromDocPos)
: rSh.IsTableRightToLeft();
if(bIsTableRTL)
{
- USHORT nColCount = aColItem.Count() - 1;
- for ( USHORT i = 0; i < nColCount; ++i )
+ sal_uInt16 nColCount = aColItem.Count() - 1;
+ for ( sal_uInt16 i = 0; i < nColCount; ++i )
{
const SvxColumnDescription& rCol = aColItem[nColCount - i];
aTabCols[i] = aTabCols.GetRight() - rCol.nStart;
@@ -742,7 +742,7 @@ void SwView::ExecTabWin( SfxRequest& rReq )
}
else
{
- for ( USHORT i = 0; i < aColItem.Count()-1; ++i )
+ for ( sal_uInt16 i = 0; i < aColItem.Count()-1; ++i )
{
const SvxColumnDescription& rCol = aColItem[i];
aTabCols[i] = rCol.nEnd + aTabCols.GetLeft();
@@ -754,8 +754,8 @@ void SwView::ExecTabWin( SfxRequest& rReq )
{
if( !rSh.IsViewLocked() )
{
- bUnlockView = TRUE;
- rSh.LockView( TRUE );
+ bUnlockView = sal_True;
+ rSh.LockView( sal_True );
}
rSh.SetMouseTabCols( aTabCols, bSingleLine,
aTabColFromDocPos );
@@ -783,10 +783,10 @@ void SwView::ExecTabWin( SfxRequest& rReq )
SwFmtCol aCols(
bSect ?
pSectFmt->GetCol() :
- (const SwFmtCol&)aSet.Get( RES_COL, FALSE ));
+ (const SwFmtCol&)aSet.Get( RES_COL, sal_False ));
SwRect aCurRect = rSh.GetAnyCurRect(bSect ? RECT_SECTION_PRT : RECT_FLY_PRT_EMBEDDED);
const long lWidth = bVerticalWriting ? aCurRect.Height() : aCurRect.Width();
- ::lcl_ConvertToCols( aColItem, USHORT(lWidth), aCols );
+ ::lcl_ConvertToCols( aColItem, sal_uInt16(lWidth), aCols );
aSet.Put( aCols );
if(bSect)
rSh.SetSectionAttr( aSet, pSectFmt );
@@ -810,7 +810,7 @@ void SwView::ExecTabWin( SfxRequest& rReq )
SwFmtCol aCols( rDesc.GetMaster().GetCol() );
const SwRect aPrtRect = rSh.GetAnyCurRect(RECT_PAGE_PRT);
::lcl_ConvertToCols( aColItem,
- USHORT(bVerticalWriting ? aPrtRect.Height() : aPrtRect.Width()),
+ sal_uInt16(bVerticalWriting ? aPrtRect.Height() : aPrtRect.Width()),
aCols );
SwPageDesc aDesc( rDesc );
aDesc.GetMaster().SetFmtAttr( aCols );
@@ -849,7 +849,7 @@ void SwView::ExecTabWin( SfxRequest& rReq )
if(bVerticalWriting)
{
- for ( USHORT i = aColItem.Count() - 1; i; --i )
+ for ( sal_uInt16 i = aColItem.Count() - 1; i; --i )
{
const SvxColumnDescription& rCol = aColItem[i - 1];
long nColumnPos = aTabCols.GetRight() - rCol.nEnd ;
@@ -859,23 +859,23 @@ void SwView::ExecTabWin( SfxRequest& rReq )
}
else
{
- for ( USHORT i = 0; i < aColItem.Count()-1; ++i )
+ for ( sal_uInt16 i = 0; i < aColItem.Count()-1; ++i )
{
const SvxColumnDescription& rCol = aColItem[i];
aTabCols[i] = rCol.nEnd + aTabCols.GetLeft();
aTabCols.SetHidden( i, !rCol.bVisible );
}
}
- BOOL bSingleLine = FALSE;
+ sal_Bool bSingleLine = sal_False;
const SfxPoolItem* pSingleLine;
- if( SFX_ITEM_SET == rReq.GetArgs()->GetItemState(SID_RULER_ACT_LINE_ONLY, FALSE, &pSingleLine))
+ if( SFX_ITEM_SET == rReq.GetArgs()->GetItemState(SID_RULER_ACT_LINE_ONLY, sal_False, &pSingleLine))
bSingleLine = ((const SfxBoolItem*)pSingleLine)->GetValue();
if ( bSetTabRowFromDoc )
{
if( !rSh.IsViewLocked() )
{
- bUnlockView = TRUE;
- rSh.LockView( TRUE );
+ bUnlockView = sal_True;
+ rSh.LockView( sal_True );
}
rSh.SetMouseTabRows( aTabCols, bSingleLine, aTabColFromDocPos );
}
@@ -891,9 +891,9 @@ void SwView::ExecTabWin( SfxRequest& rReq )
rSh.EndAllAction();
if( bUnlockView )
- rSh.LockView( FALSE );
+ rSh.LockView( sal_False );
- bSetTabColFromDoc = bSetTabRowFromDoc = bTabColFromDoc = bTabRowFromDoc = FALSE;
+ bSetTabColFromDoc = bSetTabRowFromDoc = bTabColFromDoc = bTabRowFromDoc = sal_False;
SetNumRuleNodeFromDoc(NULL);
}
@@ -909,13 +909,13 @@ void SwView::StateTabWin(SfxItemSet& rSet)
SwWrtShell &rSh = GetWrtShell();
const Point* pPt = IsTabColFromDoc() || IsTabRowFromDoc() ? &aTabColFromDocPos : 0;
- const USHORT nFrmType = rSh.IsObjSelected()
+ const sal_uInt16 nFrmType = rSh.IsObjSelected()
? FRMTYPE_DRAWOBJ
- : rSh.GetFrmType( pPt, TRUE );
+ : rSh.GetFrmType( pPt, sal_True );
- const BOOL bFrmSelection = rSh.IsFrmSelected();
+ const sal_Bool bFrmSelection = rSh.IsFrmSelected();
- const BOOL bBrowse = rSh.getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE);
+ const sal_Bool bBrowse = rSh.getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE);
// PageOffset/Begrenzer
const SwRect& rPageRect = rSh.GetAnyCurRect( RECT_PAGE, pPt );
const SwRect& rPagePrtRect = rSh.GetAnyCurRect( RECT_PAGE_PRT, pPt );
@@ -927,7 +927,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
rSh.GetMousePageDesc(aTabColFromDocPos) : rSh.GetCurPageDesc() );
const SvxFrameDirectionItem& rFrameDir = rDesc.GetMaster().GetFrmDir();
- const BOOL bVerticalWriting = rSh.IsInVerticalText();
+ const sal_Bool bVerticalWriting = rSh.IsInVerticalText();
//enable tab stop display on the rulers depending on the writing direction
WinBits nRulerStyle = pHRuler->GetStyle() & ~WB_EXTRAFIELD;
@@ -952,7 +952,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
SelectionType nSelType = rSh.GetSelectionType();
SfxWhichIter aIter( rSet );
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
sal_Bool bPutContentProtection = sal_False;
while ( nWhich )
@@ -1036,15 +1036,15 @@ void SwView::StateTabWin(SfxItemSet& rSet)
{
// Dokumentkoordinaten Frame auf Seitenkoordinaten umbrechen
const SwRect &rRect = rSh.GetAnyCurRect(RECT_FLY_EMBEDDED, pPt);
- aLongUL.SetUpper((USHORT)(rRect.Top() - rPageRect.Top() ));
- aLongUL.SetLower((USHORT)(rPageRect.Bottom() - rRect.Bottom() ));
+ aLongUL.SetUpper((sal_uInt16)(rRect.Top() - rPageRect.Top() ));
+ aLongUL.SetLower((sal_uInt16)(rPageRect.Bottom() - rRect.Bottom() ));
}
else if ( nFrmType & FRMTYPE_HEADER || nFrmType & FRMTYPE_FOOTER )
{
SwRect aRect( rSh.GetAnyCurRect( RECT_HEADERFOOTER, pPt));
aRect.Pos() -= rSh.GetAnyCurRect( RECT_PAGE, pPt ).Pos();
- aLongUL.SetUpper( (USHORT)aRect.Top() );
- aLongUL.SetLower( (USHORT)(nPageHeight - aRect.Bottom()) );
+ aLongUL.SetUpper( (sal_uInt16)aRect.Top() );
+ aLongUL.SetLower( (sal_uInt16)(nPageHeight - aRect.Bottom()) );
}
else if( nFrmType & FRMTYPE_DRAWOBJ)
{
@@ -1061,8 +1061,8 @@ void SwView::StateTabWin(SfxItemSet& rSet)
rSet.Put( aLongUL );
else
{
- SvxULSpaceItem aULTmp((USHORT)aLongUL.GetUpper(),
- (USHORT)aLongUL.GetLower(),
+ SvxULSpaceItem aULTmp((sal_uInt16)aLongUL.GetUpper(),
+ (sal_uInt16)aLongUL.GetLower(),
nWhich);
rSet.Put(aULTmp);
}
@@ -1125,7 +1125,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
short nOffset = static_cast< short >(aLR.GetTxtLeft() +
// --> FME 2005-02-22 #i42922# Mouse move of numbering label
// has to consider the left indent of the paragraph
- pNumRuleNodeFromDoc->GetLeftMarginWithNum( TRUE ) );
+ pNumRuleNodeFromDoc->GetLeftMarginWithNum( sal_True ) );
// <--
short nFLOffset;
@@ -1168,8 +1168,8 @@ void SwView::StateTabWin(SfxItemSet& rSet)
aCoreSet.Put( aBoxInfo );
rSh.GetFlyFrmAttr( aCoreSet );
const SvxBoxItem& rBox = (const SvxBoxItem&)aCoreSet.Get(RES_BOX);
- aDistLR.SetLeft((USHORT)rBox.GetDistance(BOX_LINE_LEFT ));
- aDistLR.SetRight((USHORT)rBox.GetDistance(BOX_LINE_RIGHT));
+ aDistLR.SetLeft((sal_uInt16)rBox.GetDistance(BOX_LINE_LEFT ));
+ aDistLR.SetRight((sal_uInt16)rBox.GetDistance(BOX_LINE_RIGHT));
//add the paragraph border distance
SfxItemSet aCoreSet1( GetPool(),
@@ -1177,12 +1177,12 @@ void SwView::StateTabWin(SfxItemSet& rSet)
0 );
rSh.GetCurAttr( aCoreSet1 );
const SvxBoxItem& rParaBox = (const SvxBoxItem&)aCoreSet1.Get(RES_BOX);
- aDistLR.SetLeft(aDistLR.GetLeft() + (USHORT)rParaBox.GetDistance(BOX_LINE_LEFT ));
- aDistLR.SetRight(aDistLR.GetRight() + (USHORT)rParaBox.GetDistance(BOX_LINE_RIGHT));
+ aDistLR.SetLeft(aDistLR.GetLeft() + (sal_uInt16)rParaBox.GetDistance(BOX_LINE_LEFT ));
+ aDistLR.SetRight(aDistLR.GetRight() + (sal_uInt16)rParaBox.GetDistance(BOX_LINE_RIGHT));
}
rSet.Put(aDistLR);
- nLeftBorderDistance = static_cast< USHORT >(aDistLR.GetLeft());
- nRightBorderDistance = static_cast< USHORT >(aDistLR.GetRight());
+ nLeftBorderDistance = static_cast< sal_uInt16 >(aDistLR.GetLeft());
+ nRightBorderDistance = static_cast< sal_uInt16 >(aDistLR.GetRight());
}
else if ( IsTabColFromDoc() ||
( rSh.GetTableFmt() && !bFrmSelection &&
@@ -1192,13 +1192,13 @@ void SwView::StateTabWin(SfxItemSet& rSet)
RES_BOX, RES_BOX,
SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER, 0 );
SvxBoxInfoItem aBoxInfo( SID_ATTR_BORDER_INNER );
- aBoxInfo.SetTable(FALSE);
- aBoxInfo.SetDist((BOOL) TRUE);
+ aBoxInfo.SetTable(sal_False);
+ aBoxInfo.SetDist((sal_Bool) sal_True);
aCoreSet2.Put(aBoxInfo);
rSh.GetTabBorders( aCoreSet2 );
const SvxBoxItem& rBox = (const SvxBoxItem&)aCoreSet2.Get(RES_BOX);
- aDistLR.SetLeft((USHORT)rBox.GetDistance(BOX_LINE_LEFT ));
- aDistLR.SetRight((USHORT)rBox.GetDistance(BOX_LINE_RIGHT));
+ aDistLR.SetLeft((sal_uInt16)rBox.GetDistance(BOX_LINE_LEFT ));
+ aDistLR.SetRight((sal_uInt16)rBox.GetDistance(BOX_LINE_RIGHT));
//add the border distance of the paragraph
SfxItemSet aCoreSet1( GetPool(),
@@ -1206,19 +1206,19 @@ void SwView::StateTabWin(SfxItemSet& rSet)
0 );
rSh.GetCurAttr( aCoreSet1 );
const SvxBoxItem& rParaBox = (const SvxBoxItem&)aCoreSet1.Get(RES_BOX);
- aDistLR.SetLeft(aDistLR.GetLeft() + (USHORT)rParaBox.GetDistance(BOX_LINE_LEFT ));
- aDistLR.SetRight(aDistLR.GetRight() + (USHORT)rParaBox.GetDistance(BOX_LINE_RIGHT));
+ aDistLR.SetLeft(aDistLR.GetLeft() + (sal_uInt16)rParaBox.GetDistance(BOX_LINE_LEFT ));
+ aDistLR.SetRight(aDistLR.GetRight() + (sal_uInt16)rParaBox.GetDistance(BOX_LINE_RIGHT));
rSet.Put(aDistLR);
- nLeftBorderDistance = static_cast< USHORT >(aDistLR.GetLeft());
- nRightBorderDistance = static_cast< USHORT >(aDistLR.GetRight());
+ nLeftBorderDistance = static_cast< sal_uInt16 >(aDistLR.GetLeft());
+ nRightBorderDistance = static_cast< sal_uInt16 >(aDistLR.GetRight());
}
else if ( !rSh.IsDirectlyInSection() )
{
//get the page/header/footer border distance
const SwFrmFmt& rMaster = rDesc.GetMaster();
const SvxBoxItem& rBox = (const SvxBoxItem&)rMaster.GetAttrSet().Get(RES_BOX);
- aDistLR.SetLeft((USHORT)rBox.GetDistance(BOX_LINE_LEFT ));
- aDistLR.SetRight((USHORT)rBox.GetDistance(BOX_LINE_RIGHT));
+ aDistLR.SetLeft((sal_uInt16)rBox.GetDistance(BOX_LINE_LEFT ));
+ aDistLR.SetRight((sal_uInt16)rBox.GetDistance(BOX_LINE_RIGHT));
const SvxBoxItem* pBox = 0;
if(nFrmType & FRMTYPE_HEADER)
@@ -1238,8 +1238,8 @@ void SwView::StateTabWin(SfxItemSet& rSet)
}
if(pBox)
{
- aDistLR.SetLeft((USHORT)pBox->GetDistance(BOX_LINE_LEFT ));
- aDistLR.SetRight((USHORT)pBox->GetDistance(BOX_LINE_RIGHT));
+ aDistLR.SetLeft((sal_uInt16)pBox->GetDistance(BOX_LINE_LEFT ));
+ aDistLR.SetRight((sal_uInt16)pBox->GetDistance(BOX_LINE_RIGHT));
}
//add the border distance of the paragraph
@@ -1248,11 +1248,11 @@ void SwView::StateTabWin(SfxItemSet& rSet)
SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER, 0 );
rSh.GetCurAttr( aCoreSetTmp );
const SvxBoxItem& rParaBox = (const SvxBoxItem&)aCoreSetTmp.Get(RES_BOX);
- aDistLR.SetLeft(aDistLR.GetLeft() + (USHORT)rParaBox.GetDistance(BOX_LINE_LEFT ));
- aDistLR.SetRight(aDistLR.GetRight() + (USHORT)rParaBox.GetDistance(BOX_LINE_RIGHT));
+ aDistLR.SetLeft(aDistLR.GetLeft() + (sal_uInt16)rParaBox.GetDistance(BOX_LINE_LEFT ));
+ aDistLR.SetRight(aDistLR.GetRight() + (sal_uInt16)rParaBox.GetDistance(BOX_LINE_RIGHT));
rSet.Put(aDistLR);
- nLeftBorderDistance = static_cast< USHORT >(aDistLR.GetLeft());
- nRightBorderDistance = static_cast< USHORT >(aDistLR.GetRight());
+ nLeftBorderDistance = static_cast< sal_uInt16 >(aDistLR.GetLeft());
+ nRightBorderDistance = static_cast< sal_uInt16 >(aDistLR.GetRight());
}
}
}
@@ -1266,7 +1266,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
rSet.DisableItem(nWhich);
else
{
- BOOL bFlag = rSh.IsInRightToLeftText();
+ sal_Bool bFlag = rSh.IsInRightToLeftText();
rSet.Put(SfxBoolItem(nWhich, bFlag));
}
}
@@ -1274,13 +1274,13 @@ void SwView::StateTabWin(SfxItemSet& rSet)
case SID_RULER_BORDERS_VERTICAL:
case SID_RULER_BORDERS:
{
- BOOL bFrameRTL;
- BOOL bFrameHasVerticalColumns = rSh.IsFrmVertical(FALSE, bFrameRTL) && bFrmSelection;
- BOOL bHasTable = ( IsTabColFromDoc() ||
+ sal_Bool bFrameRTL;
+ sal_Bool bFrameHasVerticalColumns = rSh.IsFrmVertical(sal_False, bFrameRTL) && bFrmSelection;
+ sal_Bool bHasTable = ( IsTabColFromDoc() ||
( rSh.GetTableFmt() && !bFrmSelection &&
!(nFrmType & FRMTYPE_COLSECT ) ) );
- BOOL bTableVertical = bHasTable && rSh.IsTableVertical();
+ sal_Bool bTableVertical = bHasTable && rSh.IsTableVertical();
if( ( (SID_RULER_BORDERS_VERTICAL == nWhich) &&
((bHasTable && !bTableVertical)||
@@ -1292,7 +1292,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
else if ( bHasTable )
{
SwTabCols aTabCols;
- USHORT nNum;
+ sal_uInt16 nNum;
if ( 0 != ( bSetTabColFromDoc = IsTabColFromDoc() ) )
{
rSh.GetMouseTabCols( aTabCols, aTabColFromDocPos );
@@ -1308,47 +1308,47 @@ void SwView::StateTabWin(SfxItemSet& rSet)
ASSERT(nNum <= aTabCols.Count(), "TabCol not found");
const int nLft = aTabCols.GetLeftMin() + aTabCols.GetLeft();
- const int nRgt = (USHORT)(bTableVertical ? nPageHeight : nPageWidth) -
+ const int nRgt = (sal_uInt16)(bTableVertical ? nPageHeight : nPageWidth) -
(aTabCols.GetLeftMin() +
aTabCols.GetRight());
- const USHORT nL = static_cast< USHORT >(nLft > 0 ? nLft : 0);
- const USHORT nR = static_cast< USHORT >(nRgt > 0 ? nRgt : 0);
+ const sal_uInt16 nL = static_cast< sal_uInt16 >(nLft > 0 ? nLft : 0);
+ const sal_uInt16 nR = static_cast< sal_uInt16 >(nRgt > 0 ? nRgt : 0);
SvxColumnItem aColItem(nNum, nL, nR);
- USHORT nStart = 0,
+ sal_uInt16 nStart = 0,
nEnd;
//columns in right-to-left tables need to be mirrored
- BOOL bIsTableRTL =
+ sal_Bool bIsTableRTL =
IsTabColFromDoc() ?
rSh.IsMouseTableRightToLeft(aTabColFromDocPos)
: rSh.IsTableRightToLeft();
if(bIsTableRTL)
{
- for ( USHORT i = aTabCols.Count(); i ; --i )
+ for ( sal_uInt16 i = aTabCols.Count(); i ; --i )
{
const SwTabColsEntry& rEntry = aTabCols.GetEntry( i - 1 );
- nEnd = (USHORT)aTabCols.GetRight();
- nEnd = nEnd - (USHORT)rEntry.nPos;
+ nEnd = (sal_uInt16)aTabCols.GetRight();
+ nEnd = nEnd - (sal_uInt16)rEntry.nPos;
SvxColumnDescription aColDesc( nStart, nEnd,
- (USHORT(aTabCols.GetRight() - rEntry.nMax)),
- (USHORT(aTabCols.GetRight() - rEntry.nMin)),
+ (sal_uInt16(aTabCols.GetRight() - rEntry.nMax)),
+ (sal_uInt16(aTabCols.GetRight() - rEntry.nMin)),
!aTabCols.IsHidden(i - 1) );
aColItem.Append(aColDesc);
nStart = nEnd;
}
SvxColumnDescription aColDesc(nStart,
- aTabCols.GetRight() - aTabCols.GetLeft(), TRUE);
+ aTabCols.GetRight() - aTabCols.GetLeft(), sal_True);
aColItem.Append(aColDesc);
}
else
{
- for ( USHORT i = 0; i < aTabCols.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < aTabCols.Count(); ++i )
{
const SwTabColsEntry& rEntry = aTabCols.GetEntry( i );
- nEnd = static_cast< USHORT >(rEntry.nPos - aTabCols.GetLeft());
+ nEnd = static_cast< sal_uInt16 >(rEntry.nPos - aTabCols.GetLeft());
SvxColumnDescription aColDesc( nStart, nEnd,
rEntry.nMin - aTabCols.GetLeft(), rEntry.nMax - aTabCols.GetLeft(),
!aTabCols.IsHidden(i) );
@@ -1357,7 +1357,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
}
SvxColumnDescription aColDesc(nStart, aTabCols.GetRight() - aTabCols.GetLeft(),
0, 0,
- TRUE);
+ sal_True);
aColItem.Append(aColDesc);
}
rSet.Put(aColItem, nWhich);
@@ -1365,7 +1365,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
else if ( bFrmSelection || nFrmType & ( FRMTYPE_COLUMN | FRMTYPE_COLSECT ) )
{
// Aus Rahmen oder Seite ?
- USHORT nNum = 0;
+ sal_uInt16 nNum = 0;
if(bFrmSelection)
{
const SwFrmFmt* pFmt = rSh.GetFlyFrmFmt();
@@ -1380,7 +1380,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
!bFrmSelection &&
nFrmType & FRMTYPE_COLSECT )
{
- const SwSection *pSect = rSh.GetAnySection(FALSE, pPt);
+ const SwSection *pSect = rSh.GetAnySection(sal_False, pPt);
ASSERT( pSect, "Welcher Bereich?");
if( pSect )
{
@@ -1394,14 +1394,14 @@ void SwView::StateTabWin(SfxItemSet& rSet)
SwRect aRect = rSh.GetAnyCurRect(RECT_SECTION_PRT, pPt);
const SwRect aTmpRect = rSh.GetAnyCurRect(RECT_SECTION, pPt);
- ::lcl_FillSvxColumn(rCol, USHORT(bVerticalWriting ? aRect.Height() : aRect.Width()), aColItem, 0);
+ ::lcl_FillSvxColumn(rCol, sal_uInt16(bVerticalWriting ? aRect.Height() : aRect.Width()), aColItem, 0);
if(bVerticalWriting)
{
aRect.Pos() += Point(aTmpRect.Left(), aTmpRect.Top());
aRect.Pos().Y() -= rPageRect.Top();
- aColItem.SetLeft ((USHORT)(aRect.Top()));
- aColItem.SetRight((USHORT)(nPageHeight - aRect.Bottom() ));
+ aColItem.SetLeft ((sal_uInt16)(aRect.Top()));
+ aColItem.SetRight((sal_uInt16)(nPageHeight - aRect.Bottom() ));
}
else
{
@@ -1409,8 +1409,8 @@ void SwView::StateTabWin(SfxItemSet& rSet)
// PAGES01
// make relative to page position:
- aColItem.SetLeft ((USHORT)( aRect.Left() - rPageRect.Left() ));
- aColItem.SetRight((USHORT)( rPageRect.Right() - aRect.Right()));
+ aColItem.SetLeft ((sal_uInt16)( aRect.Left() - rPageRect.Left() ));
+ aColItem.SetRight((sal_uInt16)( rPageRect.Right() - aRect.Right()));
}
aColItem.SetOrtho(aColItem.CalcOrtho());
@@ -1432,24 +1432,24 @@ void SwView::StateTabWin(SfxItemSet& rSet)
SvxColumnItem aColItem(nNum);
const SwRect &rSizeRect = rSh.GetAnyCurRect(RECT_FLY_PRT_EMBEDDED, pPt);
- BOOL bUseVertical = bFrameHasVerticalColumns || (!bFrmSelection && bVerticalWriting);
+ sal_Bool bUseVertical = bFrameHasVerticalColumns || (!bFrmSelection && bVerticalWriting);
const long lWidth = bUseVertical ? rSizeRect.Height() : rSizeRect.Width();
const SwRect &rRect = rSh.GetAnyCurRect(RECT_FLY_EMBEDDED, pPt);
long nDist2 = ((bUseVertical ? rRect.Height() : rRect.Width()) - lWidth) /2;
- ::lcl_FillSvxColumn(rCol, USHORT(lWidth), aColItem, nDist2);
+ ::lcl_FillSvxColumn(rCol, sal_uInt16(lWidth), aColItem, nDist2);
SfxItemSet aFrameSet(GetPool(), RES_LR_SPACE, RES_LR_SPACE);
rSh.GetFlyFrmAttr( aFrameSet );
if(bUseVertical)
{
- aColItem.SetLeft ((USHORT)(rRect.Top()- rPageRect.Top()));
- aColItem.SetRight((USHORT)(nPageHeight + rPageRect.Top() - rRect.Bottom() ));
+ aColItem.SetLeft ((sal_uInt16)(rRect.Top()- rPageRect.Top()));
+ aColItem.SetRight((sal_uInt16)(nPageHeight + rPageRect.Top() - rRect.Bottom() ));
}
else
{
- aColItem.SetLeft ((USHORT)(rRect.Left() - rPageRect.Left() ));
- aColItem.SetRight((USHORT)(rPageRect.Right() - rRect.Right() ));
+ aColItem.SetLeft ((sal_uInt16)(rRect.Left() - rPageRect.Left() ));
+ aColItem.SetRight((sal_uInt16)(rPageRect.Right() - rRect.Right() ));
}
aColItem.SetOrtho(aColItem.CalcOrtho());
@@ -1473,13 +1473,13 @@ void SwView::StateTabWin(SfxItemSet& rSet)
const SvxBoxItem& rBox = (const SvxBoxItem&)rMaster.GetFmtAttr(RES_BOX);
long nDist = rBox.GetDistance();
::lcl_FillSvxColumn(aCol,
- USHORT(bVerticalWriting ? aPrtRect.Height() : aPrtRect.Width() ),
+ sal_uInt16(bVerticalWriting ? aPrtRect.Height() : aPrtRect.Width() ),
aColItem, nDist);
if(bBrowse)
{
- aColItem.SetLeft((USHORT)rPagePrtRect.Left());
- aColItem.SetRight(USHORT(nPageWidth - rPagePrtRect.Right()));
+ aColItem.SetLeft((sal_uInt16)rPagePrtRect.Left());
+ aColItem.SetRight(sal_uInt16(nPageWidth - rPagePrtRect.Right()));
}
else
{
@@ -1498,8 +1498,8 @@ void SwView::StateTabWin(SfxItemSet& rSet)
case SID_RULER_ROWS :
case SID_RULER_ROWS_VERTICAL:
{
- BOOL bFrameRTL;
- BOOL bFrameHasVerticalColumns = rSh.IsFrmVertical(FALSE, bFrameRTL) && bFrmSelection;
+ sal_Bool bFrameRTL;
+ sal_Bool bFrameHasVerticalColumns = rSh.IsFrmVertical(sal_False, bFrameRTL) && bFrmSelection;
if( ( (SID_RULER_ROWS == nWhich) &&
((!bVerticalWriting && !bFrmSelection) || (bFrmSelection && !bFrameHasVerticalColumns)) ) ||
@@ -1512,7 +1512,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
{
SwTabCols aTabCols;
//no current value necessary
- USHORT nNum = 0;
+ sal_uInt16 nNum = 0;
if ( 0 != ( bSetTabRowFromDoc = IsTabRowFromDoc() ) )
{
rSh.GetMouseTabRows( aTabCols, aTabColFromDocPos );
@@ -1524,24 +1524,24 @@ void SwView::StateTabWin(SfxItemSet& rSet)
// ASSERT(nNum <= aTabCols.Count(), "TabCol not found");
const int nLft = aTabCols.GetLeftMin();
- const int nRgt = (USHORT)(bVerticalWriting ? nPageWidth : nPageHeight) -
+ const int nRgt = (sal_uInt16)(bVerticalWriting ? nPageWidth : nPageHeight) -
(aTabCols.GetLeftMin() +
aTabCols.GetRight());
- const USHORT nL = static_cast< USHORT >(nLft > 0 ? nLft : 0);
- const USHORT nR = static_cast< USHORT >(nRgt > 0 ? nRgt : 0);
+ const sal_uInt16 nL = static_cast< sal_uInt16 >(nLft > 0 ? nLft : 0);
+ const sal_uInt16 nR = static_cast< sal_uInt16 >(nRgt > 0 ? nRgt : 0);
SvxColumnItem aColItem(nNum, nL, nR);
- USHORT nStart = 0,
+ sal_uInt16 nStart = 0,
nEnd;
- for ( USHORT i = 0; i < aTabCols.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < aTabCols.Count(); ++i )
{
const SwTabColsEntry& rEntry = aTabCols.GetEntry( i );
if(bVerticalWriting)
{
- nEnd = USHORT(aTabCols.GetRight() - rEntry.nPos);
+ nEnd = sal_uInt16(aTabCols.GetRight() - rEntry.nPos);
SvxColumnDescription aColDesc( nStart, nEnd,
aTabCols.GetRight() - rEntry.nMax, aTabCols.GetRight() - rEntry.nMin,
!aTabCols.IsHidden(i) );
@@ -1549,18 +1549,18 @@ void SwView::StateTabWin(SfxItemSet& rSet)
}
else
{
- nEnd = USHORT(rEntry.nPos - aTabCols.GetLeft());
+ nEnd = sal_uInt16(rEntry.nPos - aTabCols.GetLeft());
SvxColumnDescription aColDesc( nStart, nEnd,
- USHORT(rEntry.nMin - aTabCols.GetLeft()), USHORT(rEntry.nMax - aTabCols.GetLeft()),
+ sal_uInt16(rEntry.nMin - aTabCols.GetLeft()), sal_uInt16(rEntry.nMax - aTabCols.GetLeft()),
!aTabCols.IsHidden(i) );
aColItem.Append(aColDesc);
}
nStart = nEnd;
}
if(bVerticalWriting)
- nEnd = static_cast< USHORT >(aTabCols.GetRight());
+ nEnd = static_cast< sal_uInt16 >(aTabCols.GetRight());
else
- nEnd = static_cast< USHORT >(aTabCols.GetLeft());
+ nEnd = static_cast< sal_uInt16 >(aTabCols.GetLeft());
// put a position protection when the last row cannot be moved
// due to a page break inside of a row
if(!aTabCols.IsLastRowAllowedToChange())
@@ -1568,7 +1568,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
SvxColumnDescription aColDesc( nStart, nEnd,
aTabCols.GetRight(), aTabCols.GetRight(),
- FALSE );
+ sal_False );
aColItem.Append(aColDesc);
rSet.Put(aColItem, nWhich);
@@ -1594,15 +1594,15 @@ void SwView::StateTabWin(SfxItemSet& rSet)
{
if( nFrmType & FRMTYPE_TABLE )
{
- const USHORT nNum = rSh.GetCurTabColNum();
+ const sal_uInt16 nNum = rSh.GetCurTabColNum();
SwTabCols aTabCols;
rSh.GetTabCols( aTabCols );
const int nLft = aTabCols.GetLeftMin() + aTabCols.GetLeft();
- const int nRgt = (USHORT)nPageWidth -(aTabCols.GetLeftMin() + aTabCols.GetRight());
+ const int nRgt = (sal_uInt16)nPageWidth -(aTabCols.GetLeftMin() + aTabCols.GetRight());
- const USHORT nL = static_cast< USHORT >(nLft > 0 ? nLft : 0);
- const USHORT nR = static_cast< USHORT >(nRgt > 0 ? nRgt : 0);
+ const sal_uInt16 nL = static_cast< sal_uInt16 >(nLft > 0 ? nLft : 0);
+ const sal_uInt16 nR = static_cast< sal_uInt16 >(nRgt > 0 ? nRgt : 0);
aRectangle.Left() = nL;
if(nNum > 1)
@@ -1623,8 +1623,8 @@ void SwView::StateTabWin(SfxItemSet& rSet)
const SwFmtCol* pCols = pFmt ? &pFmt->GetCol():
&rDesc.GetMaster().GetCol();
const SwColumns& rCols = pCols->GetColumns();
- USHORT nNum = rSh.GetCurOutColNum();
- USHORT nCount = Min(USHORT(nNum + 1), rCols.Count());
+ sal_uInt16 nNum = rSh.GetCurOutColNum();
+ sal_uInt16 nCount = Min(sal_uInt16(nNum + 1), rCols.Count());
const SwRect aRect( rSh.GetAnyCurRect( pFmt
? RECT_FLY_PRT_EMBEDDED
: RECT_PAGE_PRT, pPt ));
@@ -1633,14 +1633,14 @@ void SwView::StateTabWin(SfxItemSet& rSet)
: RECT_PAGE, pPt ));
//die Breite im Rahmen bzw. innerhalbe der Seitenraender
- const USHORT nTotalWidth = (USHORT)aRect.Width();
+ const sal_uInt16 nTotalWidth = (sal_uInt16)aRect.Width();
//die gesamte Rahmenbreite - die Differenz ist der doppelte Abstand zum Rand
- const USHORT nOuterWidth = (USHORT)aAbsRect.Width();
+ const sal_uInt16 nOuterWidth = (sal_uInt16)aAbsRect.Width();
int nWidth = 0,
nStart = 0,
nEnd = 0;
aRectangle.Left() = 0;
- for ( USHORT i = 0; i < nCount; ++i )
+ for ( sal_uInt16 i = 0; i < nCount; ++i )
{
SwColumn* pCol = rCols[i];
nStart = pCol->GetLeft() + nWidth;
@@ -1682,13 +1682,13 @@ void SwView::StateTabWin(SfxItemSet& rSet)
else if ( ((nFrmType & FRMTYPE_TABLE) || IsTabColFromDoc()) &&
!bFrmSelection )
{
- BOOL bColumn;
+ sal_Bool bColumn;
if ( IsTabColFromDoc() )
bColumn = rSh.GetCurMouseColNum( aTabColFromDocPos ) != 0;
else
bColumn = (nFrmType & (FRMTYPE_COLUMN|FRMTYPE_FLY_ANY|
FRMTYPE_COLSECTOUTTAB)) ?
- TRUE : FALSE;
+ sal_True : sal_False;
if ( !bColumn )
{
if( nFrmType & FRMTYPE_FLY_ANY && IsTabColFromDoc() )
@@ -1714,16 +1714,16 @@ void SwView::StateTabWin(SfxItemSet& rSet)
}
else
{ //hier nur fuer Tabelle in mehrspaltigen Seiten und Rahmen
- BOOL bSectOutTbl = (nFrmType & FRMTYPE_TABLE) ? TRUE : FALSE;
- BOOL bFrame = (nFrmType & FRMTYPE_FLY_ANY) ? TRUE : FALSE;
- BOOL bColSct = (nFrmType & ( bSectOutTbl
+ sal_Bool bSectOutTbl = (nFrmType & FRMTYPE_TABLE) ? sal_True : sal_False;
+ sal_Bool bFrame = (nFrmType & FRMTYPE_FLY_ANY) ? sal_True : sal_False;
+ sal_Bool bColSct = (nFrmType & ( bSectOutTbl
? FRMTYPE_COLSECTOUTTAB
: FRMTYPE_COLSECT )
- ) ? TRUE : FALSE;
+ ) ? sal_True : sal_False;
//Damit man auch mit der Mouse ziehen kann,
//ohne in der Tabelle zu stehen
CurRectType eRecType = RECT_PAGE_PRT;
- USHORT nNum = IsTabColFromDoc() ?
+ sal_uInt16 nNum = IsTabColFromDoc() ?
rSh.GetCurMouseColNum( aTabColFromDocPos ):
rSh.GetCurOutColNum();
const SwFrmFmt* pFmt = NULL;
@@ -1744,7 +1744,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
const SwFmtCol* pCols = pFmt ? &pFmt->GetCol():
&rDesc.GetMaster().GetCol();
const SwColumns& rCols = pCols->GetColumns();
- const USHORT nBorder = pFmt ? pFmt->GetBox().GetDistance() :
+ const sal_uInt16 nBorder = pFmt ? pFmt->GetBox().GetDistance() :
rDesc.GetMaster().GetBox().GetDistance();
/* RECT_FLY_PRT_EMBEDDED returns the relative position to
@@ -1756,7 +1756,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
aRect.Pos() += rSh.GetAnyCurRect( RECT_FLY_EMBEDDED,
pPt ).Pos();
- const USHORT nTotalWidth = (USHORT)aRect.Width();
+ const sal_uInt16 nTotalWidth = (sal_uInt16)aRect.Width();
//nStart und nEnd initialisieren fuer nNum == 0
int nWidth = 0,
nStart = 0,
@@ -1768,7 +1768,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
nNum = rCols.Count();
}
- for( USHORT i = 0; i < nNum; ++i )
+ for( sal_uInt16 i = 0; i < nNum; ++i )
{
SwColumn* pCol = rCols[i];
nStart = pCol->GetLeft() + nWidth;
@@ -1814,7 +1814,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
{
if(bFrmSelection)
{
- BYTE nProtect = pWrtShell->IsSelObjProtected( FLYPROTECT_SIZE|FLYPROTECT_POS|FLYPROTECT_CONTENT );
+ sal_uInt8 nProtect = pWrtShell->IsSelObjProtected( FLYPROTECT_SIZE|FLYPROTECT_POS|FLYPROTECT_CONTENT );
SvxProtectItem aProt(SID_RULER_PROTECT);
aProt.SetCntntProtect((nProtect & FLYPROTECT_CONTENT) != 0);
@@ -1827,8 +1827,8 @@ void SwView::StateTabWin(SfxItemSet& rSet)
SvxProtectItem aProtect(SID_RULER_PROTECT);
if(bBrowse && !(nFrmType & (FRMTYPE_DRAWOBJ|FRMTYPE_COLUMN)) && !rSh.GetTableFmt())
{
- aProtect.SetSizeProtect(TRUE);
- aProtect.SetPosProtect(TRUE);
+ aProtect.SetSizeProtect(sal_True);
+ aProtect.SetPosProtect(sal_True);
}
rSet.Put(aProtect);
}
@@ -1840,7 +1840,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
if(bPutContentProtection)
{
SvxProtectItem aProtect(SID_RULER_PROTECT);
- aProtect.SetCntntProtect(TRUE);
+ aProtect.SetCntntProtect(sal_True);
rSet.Put(aProtect);
}
}
diff --git a/sw/source/ui/uno/SwXDocumentSettings.cxx b/sw/source/ui/uno/SwXDocumentSettings.cxx
index b19a36cba5..0ea8077f6d 100644
--- a/sw/source/ui/uno/SwXDocumentSettings.cxx
+++ b/sw/source/ui/uno/SwXDocumentSettings.cxx
@@ -708,11 +708,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 );
@@ -753,14 +749,14 @@ void SwXDocumentSettings::_getSingleValue( const comphelper::PropertyInfo & rInf
case HANDLE_FIELD_AUTO_UPDATE:
{
SwFldUpdateFlags nFlags = mpDoc->getFieldUpdateFlags(true);
- BOOL bFieldUpd = (nFlags == AUTOUPD_FIELD_ONLY || nFlags == AUTOUPD_FIELD_AND_CHARTS );
+ sal_Bool bFieldUpd = (nFlags == AUTOUPD_FIELD_ONLY || nFlags == AUTOUPD_FIELD_AND_CHARTS );
rValue.setValue(&bFieldUpd, ::getBooleanCppuType());
}
break;
case HANDLE_CHART_AUTO_UPDATE:
{
SwFldUpdateFlags nFlags = mpDoc->getFieldUpdateFlags(true);
- BOOL bChartUpd = nFlags == AUTOUPD_FIELD_AND_CHARTS;
+ sal_Bool bChartUpd = nFlags == AUTOUPD_FIELD_AND_CHARTS;
rValue.setValue(&bChartUpd, ::getBooleanCppuType());
}
break;
diff --git a/sw/source/ui/uno/swdet2.cxx b/sw/source/ui/uno/swdet2.cxx
index d021c7fc82..7dea5e076f 100644
--- a/sw/source/ui/uno/swdet2.cxx
+++ b/sw/source/ui/uno/swdet2.cxx
@@ -57,16 +57,16 @@ bool IsDocShellRegistered()
//-------------------------------------------------------------------------
-ULONG SwFilterDetect::DetectFilter( SfxMedium& rMedium, const SfxFilter** ppFilter )
+sal_uLong SwFilterDetect::DetectFilter( SfxMedium& rMedium, const SfxFilter** ppFilter )
{
- ULONG nRet = ERRCODE_NONE;
+ sal_uLong nRet = ERRCODE_NONE;
if( *ppFilter )
{
// verify the given filter
String aPrefFlt = (*ppFilter)->GetUserData();
// detection for TextFilter needs an additional checking
- BOOL bDetected = SwIoSystem::IsFileFilter( rMedium, aPrefFlt );
+ sal_Bool bDetected = SwIoSystem::IsFileFilter( rMedium, aPrefFlt );
return bDetected ? nRet : ERRCODE_ABORT;
}
diff --git a/sw/source/ui/uno/swdetect.cxx b/sw/source/ui/uno/swdetect.cxx
index f9de3acaba..d41db3cdcb 100644
--- a/sw/source/ui/uno/swdetect.cxx
+++ b/sw/source/ui/uno/swdetect.cxx
@@ -180,7 +180,7 @@ SwFilterDetect::~SwFilterDetect()
SfxApplication* pApp = SFX_APP();
SfxAllItemSet *pSet = new SfxAllItemSet( pApp->GetPool() );
TransformParameters( SID_OPENDOC, lDescriptor, *pSet );
- SFX_ITEMSET_ARG( pSet, pItem, SfxBoolItem, SID_DOC_READONLY, FALSE );
+ SFX_ITEMSET_ARG( pSet, pItem, SfxBoolItem, SID_DOC_READONLY, sal_False );
bWasReadOnly = pItem && pItem->GetValue();
@@ -200,8 +200,8 @@ SwFilterDetect::~SwFilterDetect()
else
{
// ctor of SfxMedium uses owner transition of ItemSet
- SfxMedium aMedium( aURL, bWasReadOnly ? STREAM_STD_READ : STREAM_STD_READWRITE, FALSE, NULL, pSet );
- aMedium.UseInteractionHandler( TRUE );
+ SfxMedium aMedium( aURL, bWasReadOnly ? STREAM_STD_READ : STREAM_STD_READWRITE, sal_False, NULL, pSet );
+ aMedium.UseInteractionHandler( sal_True );
if ( aMedium.GetErrorCode() == ERRCODE_NONE )
{
// remember input stream and content and put them into the descriptor later
@@ -210,7 +210,7 @@ SwFilterDetect::~SwFilterDetect()
xContent = aMedium.GetContent();
bReadOnly = aMedium.IsReadOnly();
- BOOL bIsStorage = aMedium.IsStorage();
+ sal_Bool bIsStorage = aMedium.IsStorage();
if ( bIsStorage )
{
uno::Reference< embed::XStorage > xStorage = aMedium.GetStorage( sal_False );
@@ -256,7 +256,7 @@ SwFilterDetect::~SwFilterDetect()
aTypeName = pPreFilter->GetTypeName();
}
- aTypeName = SfxFilter::GetTypeFromStorage( xStorage, pPreFilter ? pPreFilter->IsOwnTemplateFormat() : FALSE, &aFilterName );
+ aTypeName = SfxFilter::GetTypeFromStorage( xStorage, pPreFilter ? pPreFilter->IsOwnTemplateFormat() : sal_False, &aFilterName );
}
catch( lang::WrappedTargetException& aWrap )
{
@@ -329,9 +329,9 @@ SwFilterDetect::~SwFilterDetect()
else
pFilter = SfxFilterMatcher().GetFilter4EA( aTypeName );
- BOOL bTestWriter = !pFilter || pFilter->GetServiceName().EqualsAscii("com.sun.star.text.TextDocument") ||
+ sal_Bool bTestWriter = !pFilter || pFilter->GetServiceName().EqualsAscii("com.sun.star.text.TextDocument") ||
pFilter->GetServiceName().EqualsAscii("com.sun.star.text.WebDocument");
- BOOL bTestGlobal = !pFilter || pFilter->GetServiceName().EqualsAscii("com.sun.star.text.GlobalDocument");
+ sal_Bool bTestGlobal = !pFilter || pFilter->GetServiceName().EqualsAscii("com.sun.star.text.GlobalDocument");
const SfxFilter* pOrigFilter = NULL;
if ( !bTestWriter && !bTestGlobal && pFilter )
@@ -341,10 +341,10 @@ SwFilterDetect::~SwFilterDetect()
// example: HTML filter for Calc
pOrigFilter = pFilter;
pFilter = SfxFilterMatcher().GetFilter4EA( pFilter->GetTypeName() );
- bTestWriter = TRUE;
+ bTestWriter = sal_True;
}
- ULONG nErr = ERRCODE_NONE;
+ sal_uLong nErr = ERRCODE_NONE;
if ( pFilter || bTestWriter )
nErr = DetectFilter( aMedium, &pFilter );
if ( nErr != ERRCODE_NONE )
diff --git a/sw/source/ui/uno/swdetect.hxx b/sw/source/ui/uno/swdetect.hxx
index 3677bd7f89..a93bb2e702 100644
--- a/sw/source/ui/uno/swdetect.hxx
+++ b/sw/source/ui/uno/swdetect.hxx
@@ -78,8 +78,8 @@ class SfxFilter;
class SwFilterDetect : public ::cppu::WeakImplHelper2< ::com::sun::star::document::XExtendedFilterDetection, ::com::sun::star::lang::XServiceInfo >
{
- static ULONG DetectFilter( SfxMedium& rMedium, const SfxFilter** ppFilter );
- static ULONG GlobDetectFilter( SfxMedium& rMedium, const SfxFilter** ppFilter );
+ static sal_uLong DetectFilter( SfxMedium& rMedium, const SfxFilter** ppFilter );
+ static sal_uLong GlobDetectFilter( SfxMedium& rMedium, const SfxFilter** ppFilter );
public:
SwFilterDetect( const REFERENCE < ::com::sun::star::lang::XMultiServiceFactory >& xFactory );
virtual ~SwFilterDetect();
diff --git a/sw/source/ui/uno/unoatxt.cxx b/sw/source/ui/uno/unoatxt.cxx
index 08451f6a24..2ebfca1ee0 100644
--- a/sw/source/ui/uno/unoatxt.cxx
+++ b/sw/source/ui/uno/unoatxt.cxx
@@ -134,7 +134,7 @@ uno::Any SwXAutoTextContainer::getByIndex(sal_Int32 nIndex)
uno::Any aRet;
sal_uInt16 nCount = pGlossaries->GetGroupCnt();
if ( 0 <= nIndex && nIndex < nCount )
- aRet = getByName(pGlossaries->GetGroupName( static_cast< USHORT >(nIndex) ));
+ aRet = getByName(pGlossaries->GetGroupName( static_cast< sal_uInt16 >(nIndex) ));
else
throw lang::IndexOutOfBoundsException();
return aRet;
@@ -165,8 +165,8 @@ uno::Any SwXAutoTextContainer::getByName(const OUString& GroupName)
uno::Reference< text::XAutoTextGroup > xGroup;
if ( pGlossaries && hasByName( GroupName ) ) // group name already known?
- // TRUE = create group if not already available
- xGroup = pGlossaries->GetAutoTextGroup( GroupName, TRUE );
+ // sal_True = create group if not already available
+ xGroup = pGlossaries->GetAutoTextGroup( GroupName, sal_True );
if ( !xGroup.is() )
throw container::NoSuchElementException();
@@ -274,15 +274,15 @@ OUString SwXAutoTextContainer::getImplementationName(void) throw( uno::RuntimeEx
/* -----------------------------06.04.00 11:11--------------------------------
---------------------------------------------------------------------------*/
-BOOL SwXAutoTextContainer::supportsService(const OUString& rServiceName) throw( uno::RuntimeException )
+sal_Bool SwXAutoTextContainer::supportsService(const OUString& rServiceName) throw( uno::RuntimeException )
{
const uno::Sequence< OUString > aNames = SwXAutoTextContainer_getSupportedServiceNames();
for(sal_Int32 nService = 0; nService < aNames.getLength(); nService++)
{
if(aNames.getConstArray()[nService] == rServiceName)
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
/* -----------------------------06.04.00 11:11--------------------------------
@@ -837,7 +837,7 @@ OUString SwXAutoTextGroup::getImplementationName(void) throw( uno::RuntimeExcept
/* -----------------------------06.04.00 11:11--------------------------------
---------------------------------------------------------------------------*/
-BOOL SwXAutoTextGroup::supportsService(const OUString& rServiceName) throw( uno::RuntimeException )
+sal_Bool SwXAutoTextGroup::supportsService(const OUString& rServiceName) throw( uno::RuntimeException )
{
return C2U("com.sun.star.text.AutoTextGroup") == rServiceName;
}
@@ -961,7 +961,7 @@ void SwXAutoTextEntry::GetBodyText ()
{
::vos::OGuard aGuard(Application::GetSolarMutex());
- xDocSh = pGlossaries->EditGroupDoc ( sGroupName, sEntryName, FALSE );
+ xDocSh = pGlossaries->EditGroupDoc ( sGroupName, sEntryName, sal_False );
DBG_ASSERT( xDocSh.Is(), "SwXAutoTextEntry::GetBodyText: unexpected: no doc returned by EditGroupDoc!" );
// start listening at the document
@@ -1159,7 +1159,7 @@ OUString SwXAutoTextEntry::getImplementationName(void) throw( uno::RuntimeExcept
/* -----------------------------06.04.00 11:11--------------------------------
---------------------------------------------------------------------------*/
-BOOL SwXAutoTextEntry::supportsService(const OUString& rServiceName) throw( uno::RuntimeException )
+sal_Bool SwXAutoTextEntry::supportsService(const OUString& rServiceName) throw( uno::RuntimeException )
{
return C2U("com.sun.star.text.AutoTextEntry") == rServiceName;
}
@@ -1220,7 +1220,7 @@ OUString SwAutoTextEventDescriptor::getImplementationName()
---------------------------------------------------------------------------*/
void SwAutoTextEventDescriptor::replaceByName(
- const USHORT nEvent,
+ const sal_uInt16 nEvent,
const SvxMacro& rMacro)
throw(
lang::IllegalArgumentException,
@@ -1242,7 +1242,7 @@ void SwAutoTextEventDescriptor::replaceByName(
if( pBlocks && !pBlocks->GetError())
{
- USHORT nIndex = pBlocks->GetIndex( rAutoTextEntry.GetEntryName() );
+ sal_uInt16 nIndex = pBlocks->GetIndex( rAutoTextEntry.GetEntryName() );
if( nIndex != USHRT_MAX )
{
SvxMacroTableDtor aMacroTable;
@@ -1263,7 +1263,7 @@ void SwAutoTextEventDescriptor::replaceByName(
---------------------------------------------------------------------------*/
void SwAutoTextEventDescriptor::getByName(
SvxMacro& rMacro,
- const USHORT nEvent )
+ const sal_uInt16 nEvent )
throw(
container::NoSuchElementException,
lang::WrappedTargetException,
@@ -1287,7 +1287,7 @@ void SwAutoTextEventDescriptor::getByName(
if ( pBlocks && !pBlocks->GetError())
{
- USHORT nIndex = pBlocks->GetIndex( rAutoTextEntry.GetEntryName() );
+ sal_uInt16 nIndex = pBlocks->GetIndex( rAutoTextEntry.GetEntryName() );
if( nIndex != USHRT_MAX )
{
SvxMacroTableDtor aMacroTable;
diff --git a/sw/source/ui/uno/unomailmerge.cxx b/sw/source/ui/uno/unomailmerge.cxx
index 17e4c43981..ca4218a287 100644
--- a/sw/source/ui/uno/unomailmerge.cxx
+++ b/sw/source/ui/uno/unomailmerge.cxx
@@ -154,11 +154,11 @@ static CloseResult CloseModelAndDocSh(
////////////////////////////////////////////////////////////
-static BOOL LoadFromURL_impl(
+static sal_Bool LoadFromURL_impl(
Reference< frame::XModel > &rxModel,
SfxObjectShellRef &rxDocSh,
const String &rURL,
- BOOL bClose )
+ sal_Bool bClose )
throw (RuntimeException)
{
// try to open the document readonly and hidden
@@ -176,7 +176,7 @@ static BOOL LoadFromURL_impl(
}
catch( Exception & )
{
- return FALSE;
+ return sal_False;
}
// try to get the DocShell
@@ -189,7 +189,7 @@ static BOOL LoadFromURL_impl(
pTmpDocShell = pTextDoc ? pTextDoc->GetDocShell() : 0;
}
- BOOL bRes = FALSE;
+ sal_Bool bRes = sal_False;
if (xTmpModel.is() && pTmpDocShell) // everything available?
{
if (bClose)
@@ -197,7 +197,7 @@ static BOOL LoadFromURL_impl(
// set new stuff
rxModel = xTmpModel;
rxDocSh = pTmpDocShell;
- bRes = TRUE;
+ bRes = sal_True;
}
else
{
@@ -374,15 +374,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
@@ -390,7 +390,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;
@@ -405,7 +405,7 @@ static BOOL DeleteTmpFile_Impl(
}
}
else
- bRes = TRUE; // file will be deleted delayed
+ bRes = sal_True; // file will be deleted delayed
}
return bRes;
}
@@ -495,7 +495,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 ) ))
@@ -514,7 +514,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 ) ))
@@ -625,7 +625,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();
@@ -691,7 +691,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;
@@ -712,11 +712,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
@@ -824,13 +821,13 @@ uno::Any SAL_CALL SwXMailMerge::execute(
if ( !bStoredAsTemporary )
throw RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Failed to save temporary file." ) ), static_cast < cppu::OWeakObject * > ( this ) );
- pMgr->SetMergeSilent( TRUE ); // suppress dialogs, message boxes, etc.
+ pMgr->SetMergeSilent( sal_True ); // suppress dialogs, message boxes, etc.
const SwXMailMerge *pOldSrc = pMgr->GetMailMergeEvtSrc();
DBG_ASSERT( !pOldSrc || pOldSrc == this, "Ooops... different event source already set." );
pMgr->SetMailMergeEvtSrc( this ); // launch events for listeners
SFX_APP()->NotifyEvent(SfxEventHint(SW_EVENT_MAIL_MERGE, SwDocShell::GetEventName(STR_SW_EVENT_MAIL_MERGE), xCurDocSh));
- BOOL bSucc = pMgr->MergeNew( aMergeDesc );
+ sal_Bool bSucc = pMgr->MergeNew( aMergeDesc );
SFX_APP()->NotifyEvent(SfxEventHint(SW_EVENT_MAIL_MERGE_END, SwDocShell::GetEventName(STR_SW_EVENT_MAIL_MERGE_END), xCurDocSh));
pMgr->SetMailMergeEvtSrc( pOldSrc );
@@ -966,7 +963,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;
}
@@ -1039,7 +1036,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 f5da10cb6f..20ff10b7f8 100644
--- a/sw/source/ui/uno/unomod.cxx
+++ b/sw/source/ui/uno/unomod.cxx
@@ -292,9 +292,9 @@ sal_Bool SwXModule::supportsService(const OUString& rServiceName) throw( Runtime
for(sal_Int32 nService = 0; nService < aNames.getLength(); nService++)
{
if(aNames.getConstArray()[nService] == rServiceName)
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
/* -----------------------------06.04.00 10:59--------------------------------
@@ -340,13 +340,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;
}
@@ -502,13 +496,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;
}
@@ -685,10 +673,10 @@ void SwXViewSettings::_setSingleValue( const comphelper::PropertyInfo & rInfo, c
case HANDLE_VIEWSET_DRAWINGS : mpViewOption->SetDraw(bVal); break;
case HANDLE_VIEWSET_FIELD_COMMANDS : mpViewOption->SetFldName(bVal); break;
case HANDLE_VIEWSET_ANNOTATIONS : mpViewOption->SetPostIts(bVal); break;
- case HANDLE_VIEWSET_INDEX_MARK_BACKGROUND : mpViewOption->SetAppearanceFlag(VIEWOPT_FIELD_SHADINGS, bVal, TRUE); break;
+ case HANDLE_VIEWSET_INDEX_MARK_BACKGROUND : mpViewOption->SetAppearanceFlag(VIEWOPT_FIELD_SHADINGS, bVal, sal_True); break;
case HANDLE_VIEWSET_NONPRINTING_CHARACTERS: mpViewOption->SetViewMetaChars( bVal ); break;
- case HANDLE_VIEWSET_FOOTNOTE_BACKGROUND : mpViewOption->SetAppearanceFlag(VIEWOPT_FIELD_SHADINGS, bVal, TRUE); break;
- case HANDLE_VIEWSET_TEXT_FIELD_BACKGROUND : mpViewOption->SetAppearanceFlag(VIEWOPT_FIELD_SHADINGS, bVal, TRUE); break;
+ case HANDLE_VIEWSET_FOOTNOTE_BACKGROUND : mpViewOption->SetAppearanceFlag(VIEWOPT_FIELD_SHADINGS, bVal, sal_True); break;
+ case HANDLE_VIEWSET_TEXT_FIELD_BACKGROUND : mpViewOption->SetAppearanceFlag(VIEWOPT_FIELD_SHADINGS, bVal, sal_True); break;
case HANDLE_VIEWSET_PARA_BREAKS : mpViewOption->SetParagraph(bVal); break;
case HANDLE_VIEWSET_SOFT_HYPHENS : mpViewOption->SetSoftHyph(bVal); break;
case HANDLE_VIEWSET_SPACES : mpViewOption->SetBlank(bVal); break;
@@ -698,7 +686,7 @@ void SwXViewSettings::_setSingleValue( const comphelper::PropertyInfo & rInfo, c
case HANDLE_VIEWSET_HIDDEN_TEXT : mpViewOption->SetShowHiddenField(bVal); break;
case HANDLE_VIEWSET_HIDDEN_CHARACTERS : mpViewOption->SetShowHiddenChar(bVal); break;
case HANDLE_VIEWSET_HIDDEN_PARAGRAPHS : mpViewOption->SetShowHiddenPara(bVal); break;
- case HANDLE_VIEWSET_TABLE_BOUNDARIES : mpViewOption->SetAppearanceFlag(VIEWOPT_TABLE_BOUNDARIES, bVal, TRUE); break;
+ case HANDLE_VIEWSET_TABLE_BOUNDARIES : mpViewOption->SetAppearanceFlag(VIEWOPT_TABLE_BOUNDARIES, bVal, sal_True); break;
case HANDLE_VIEWSET_TEXT_BOUNDARIES : mpViewOption->SetDocBoundaries(bVal); break;
case HANDLE_VIEWSET_SMOOTH_SCROLLING : mpViewOption->SetSmoothScroll(bVal); break;
case HANDLE_VIEWSET_SOLID_MARK_HANDLES : mpViewOption->SetSolidMarkHdl(bVal); break;
@@ -890,13 +878,13 @@ void SwXViewSettings::_preGetValues ()
void SwXViewSettings::_getSingleValue( const comphelper::PropertyInfo & rInfo, uno::Any & rValue )
throw(UnknownPropertyException, WrappedTargetException )
{
- sal_Bool bBool = TRUE;
+ sal_Bool bBool = sal_True;
sal_Bool bBoolVal;
switch( rInfo.mnHandle )
{
case HANDLE_VIEWSET_SHOW_RULER: bBoolVal = mpConstViewOption->IsViewAnyRuler(); break;
- case HANDLE_VIEWSET_HRULER : bBoolVal = mpConstViewOption->IsViewHRuler(TRUE); break;
- case HANDLE_VIEWSET_VRULER : bBoolVal = mpConstViewOption->IsViewVRuler(TRUE);break;
+ case HANDLE_VIEWSET_HRULER : bBoolVal = mpConstViewOption->IsViewHRuler(sal_True); break;
+ case HANDLE_VIEWSET_VRULER : bBoolVal = mpConstViewOption->IsViewVRuler(sal_True);break;
case HANDLE_VIEWSET_VRULER_RIGHT : bBoolVal = mpConstViewOption->IsVRulerRight();break;
case HANDLE_VIEWSET_HSCROLL: bBoolVal = mpConstViewOption->IsViewHScrollBar();break;
case HANDLE_VIEWSET_VSCROLL: bBoolVal = mpConstViewOption->IsViewVScrollBar();break;
@@ -926,28 +914,28 @@ void SwXViewSettings::_getSingleValue( const comphelper::PropertyInfo & rInfo, u
case HANDLE_VIEWSET_IS_RASTER_VISIBLE : bBoolVal = mpConstViewOption->IsGridVisible(); break;
case HANDLE_VIEWSET_IS_SNAP_TO_RASTER : bBoolVal = mpConstViewOption->IsSnap(); break;
case HANDLE_VIEWSET_RASTER_RESOLUTION_X :
- bBool = FALSE;
+ bBool = sal_False;
rValue <<= (sal_Int32) TWIP_TO_MM100(mpConstViewOption->GetSnapSize().Width());
break;
case HANDLE_VIEWSET_RASTER_RESOLUTION_Y :
- bBool = FALSE;
+ bBool = sal_False;
rValue <<= (sal_Int32) TWIP_TO_MM100(mpConstViewOption->GetSnapSize().Height());
break;
case HANDLE_VIEWSET_RASTER_SUBDIVISION_X :
- bBool = FALSE;
+ bBool = sal_False;
rValue <<= (sal_Int32) mpConstViewOption->GetDivisionX();
break;
case HANDLE_VIEWSET_RASTER_SUBDIVISION_Y :
- bBool = FALSE;
+ bBool = sal_False;
rValue <<= (sal_Int32) mpConstViewOption->GetDivisionY();
break;
case HANDLE_VIEWSET_ZOOM :
- bBool = FALSE;
+ bBool = sal_False;
rValue <<= (sal_Int16)mpConstViewOption->GetZoom();
break;
case HANDLE_VIEWSET_ZOOM_TYPE:
{
- bBool = FALSE;
+ bBool = sal_False;
sal_Int16 nRet(0);
switch (mpConstViewOption->GetZoomType())
{
diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx
index fc8ebe6c05..fb034d41bd 100644
--- a/sw/source/ui/uno/unotxdoc.cxx
+++ b/sw/source/ui/uno/unotxdoc.cxx
@@ -191,17 +191,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();
- DBG_ASSERT( 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 );
}
////////////////////////////////////////////////////////////
@@ -222,7 +221,7 @@ void lcl_DisposeView( SfxViewFrame* pToClose, SwDocShell* pDocShell )
{
// check if the view frame still exists
SfxViewFrame* pFound = SfxViewFrame::GetFirst( pDocShell,
- FALSE );
+ sal_False );
while(pFound)
{
if( pFound == pToClose)
@@ -232,7 +231,7 @@ void lcl_DisposeView( SfxViewFrame* pToClose, SwDocShell* pDocShell )
}
pFound = SfxViewFrame::GetNext( *pFound,
pDocShell,
- FALSE );
+ sal_False );
}
}
/* -----------------------------10.03.00 18:02--------------------------------
@@ -818,7 +817,7 @@ sal_Int32 SwXTextDocument::replaceAll(const Reference< util::XSearchDescriptor >
0);
pSearch->FillSearchItemSet(aSearch);
pSearch->FillReplaceItemSet(aReplace);
- BOOL bCancel;
+ sal_Bool bCancel;
nResult = (sal_Int32)pUnoCrsr->Find( aSearch, !pSearch->bStyles,
eStart, eEnd, bCancel,
(FindRanges)eRanges,
@@ -830,7 +829,7 @@ sal_Int32 SwXTextDocument::replaceAll(const Reference< util::XSearchDescriptor >
SwTxtFmtColl *pSearchColl = lcl_GetParaStyle(pSearch->sSearchText, pUnoCrsr->GetDoc());
SwTxtFmtColl *pReplaceColl = lcl_GetParaStyle(pSearch->sReplaceText, pUnoCrsr->GetDoc());;
- BOOL bCancel;
+ sal_Bool bCancel;
nResult = pUnoCrsr->Find( *pSearchColl,
eStart, eEnd, bCancel,
(FindRanges)eRanges, pReplaceColl );
@@ -839,8 +838,8 @@ sal_Int32 SwXTextDocument::replaceAll(const Reference< util::XSearchDescriptor >
else
{
//todo/mba: assuming that notes should be omitted
- BOOL bSearchInNotes = FALSE;
- BOOL bCancel;
+ sal_Bool bSearchInNotes = sal_False;
+ sal_Bool bCancel;
nResult = pUnoCrsr->Find( aSearchOpt, bSearchInNotes,
eStart, eEnd, bCancel,
(FindRanges)eRanges,
@@ -950,7 +949,7 @@ SwUnoCrsr* SwXTextDocument::FindAny(const Reference< util::XSearchDescriptor >
RES_TXTATR_INETFMT, RES_TXTATR_CHARFMT,
0);
pSearch->FillSearchItemSet(aSearch);
- BOOL bCancel;
+ sal_Bool bCancel;
nResult = (sal_Int32)pUnoCrsr->Find( aSearch, !pSearch->bStyles,
eStart, eEnd, bCancel,
(FindRanges)eRanges,
@@ -962,7 +961,7 @@ SwUnoCrsr* SwXTextDocument::FindAny(const Reference< util::XSearchDescriptor >
SwTxtFmtColl *pSearchColl = lcl_GetParaStyle(pSearch->sSearchText, pUnoCrsr->GetDoc());
//pSearch->sReplaceText
SwTxtFmtColl *pReplaceColl = 0;
- BOOL bCancel;
+ sal_Bool bCancel;
nResult = (sal_Int32)pUnoCrsr->Find( *pSearchColl,
eStart, eEnd, bCancel,
(FindRanges)eRanges, pReplaceColl );
@@ -970,8 +969,8 @@ SwUnoCrsr* SwXTextDocument::FindAny(const Reference< util::XSearchDescriptor >
else
{
//todo/mba: assuming that notes should be omitted
- BOOL bSearchInNotes = FALSE;
- BOOL bCancel;
+ sal_Bool bSearchInNotes = sal_False;
+ sal_Bool bCancel;
nResult = (sal_Int32)pUnoCrsr->Find( aSearchOpt, bSearchInNotes,
eStart, eEnd, bCancel,
(FindRanges)eRanges,
@@ -1088,7 +1087,7 @@ Sequence< beans::PropertyValue > SwXTextDocument::getPagePrintSettings(void)
pArray[6] = beans::PropertyValue(C2U("HoriMargin"), -1, aVal, PropertyState_DIRECT_VALUE);
aVal <<= (sal_Int32)TWIP_TO_MM100_UNSIGNED(aData.GetVertSpace());
pArray[7] = beans::PropertyValue(C2U("VertMargin"), -1, aVal, PropertyState_DIRECT_VALUE);
- BOOL bTemp = aData.GetLandscape();
+ sal_Bool bTemp = aData.GetLandscape();
aVal.setValue(&bTemp, ::getCppuBooleanType());
pArray[8] = beans::PropertyValue(C2U("IsLandscape"), -1, aVal, PropertyState_DIRECT_VALUE);
}
@@ -1120,7 +1119,7 @@ sal_uInt32 lcl_Any_To_ULONG(const Any& rValue, sal_Bool& bException)
/*-- 09.06.2004 12:18:10---------------------------------------------------
-----------------------------------------------------------------------*/
-String lcl_CreateOutlineString( USHORT nIndex,
+String lcl_CreateOutlineString( sal_uInt16 nIndex,
const SwOutlineNodes& rOutlineNodes, const SwNumRule* pOutlRule)
{
String sEntry;
@@ -1167,13 +1166,13 @@ void SwXTextDocument::setPagePrintSettings(const Sequence< beans::PropertyValue
{
if(!nVal || nVal > 0xff)
throw RuntimeException();
- aData.SetRow((BYTE)nVal);
+ aData.SetRow((sal_uInt8)nVal);
}
else if(COMPARE_EQUAL == sName.CompareToAscii("PageColumns"))
{
if(!nVal || nVal > 0xff)
throw RuntimeException();
- aData.SetCol((BYTE)nVal);
+ aData.SetCol((sal_uInt8)nVal);
}
else if(COMPARE_EQUAL == sName.CompareToAscii("LeftMargin"))
{
@@ -1536,7 +1535,7 @@ void SwXTextDocument::Reactivate(SwDocShell* pNewDocShell)
if(pDocShell && pDocShell != pNewDocShell)
Invalidate();
pDocShell = pNewDocShell;
- bObjectValid = TRUE;
+ bObjectValid = sal_True;
}
/*-- 18.12.98 11:55:26---------------------------------------------------
@@ -1914,9 +1913,9 @@ sal_Bool SwXTextDocument::supportsService(const OUString& rServiceName) throw( R
)
return sal_True;
- BOOL bWebDoc = (0 != PTR_CAST(SwWebDocShell, pDocShell));
- BOOL bGlobalDoc = (0 != PTR_CAST(SwGlobalDocShell, pDocShell));
- BOOL bTextDoc = (!bWebDoc && !bGlobalDoc);
+ sal_Bool bWebDoc = (0 != PTR_CAST(SwWebDocShell, pDocShell));
+ sal_Bool bGlobalDoc = (0 != PTR_CAST(SwGlobalDocShell, pDocShell));
+ sal_Bool bTextDoc = (!bWebDoc && !bGlobalDoc);
return (
(bWebDoc && rServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.WebDocument" ))) ||
@@ -1929,9 +1928,9 @@ sal_Bool SwXTextDocument::supportsService(const OUString& rServiceName) throw( R
* --------------------------------------------------*/
Sequence< OUString > SwXTextDocument::getSupportedServiceNames(void) throw( RuntimeException )
{
- BOOL bWebDoc = (0 != PTR_CAST(SwWebDocShell, pDocShell));
- BOOL bGlobalDoc = (0 != PTR_CAST(SwGlobalDocShell, pDocShell));
- BOOL bTextDoc = (!bWebDoc && !bGlobalDoc);
+ sal_Bool bWebDoc = (0 != PTR_CAST(SwWebDocShell, pDocShell));
+ sal_Bool bGlobalDoc = (0 != PTR_CAST(SwGlobalDocShell, pDocShell));
+ sal_Bool bTextDoc = (!bWebDoc && !bGlobalDoc);
Sequence< OUString > aRet (3);
OUString* pArray = aRet.getArray();
@@ -2220,7 +2219,7 @@ Any SwXTextDocument::getPropertyValue(const OUString& rPropertyName)
break;
case WID_DOC_HIDE_TIPS :
{
- BOOL bTemp = SW_MOD()->GetModuleConfig()->IsHideFieldTips();
+ sal_Bool bTemp = SW_MOD()->GetModuleConfig()->IsHideFieldTips();
aAny.setValue(&bTemp, ::getBooleanCppuType());
}
break;
@@ -2247,7 +2246,7 @@ Any SwXTextDocument::getPropertyValue(const OUString& rPropertyName)
break;
case WID_DOC_TWO_DIGIT_YEAR:
{
- aAny <<= static_cast < sal_Int16 > (pDocShell->GetDoc()->GetNumberFormatter ( TRUE )->GetYear2000());
+ aAny <<= static_cast < sal_Int16 > (pDocShell->GetDoc()->GetNumberFormatter ( sal_True )->GetYear2000());
}
break;
case WID_DOC_AUTOMATIC_CONTROL_FOCUS:
@@ -2413,7 +2412,7 @@ void SwXTextDocument::updateLinks( ) throw(RuntimeException)
if( rLnkMan.GetLinks().Count() )
{
UnoActionContext aAction(pDoc);
- rLnkMan.UpdateAllLinks( FALSE, FALSE, TRUE );
+ rLnkMan.UpdateAllLinks( sal_False, sal_False, sal_True );
}
}
//XPropertyState
@@ -2616,33 +2615,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();
+ SwPrintData aDocPrintData( 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() );
+ 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 );
}
@@ -2741,7 +2735,7 @@ sal_Int32 SAL_CALL SwXTextDocument::getRendererCount(
// --> FME 2005-05-23 #122919# Force field update before PDF export:
- pWrtShell->ViewShell::UpdateFlds(TRUE);
+ pWrtShell->ViewShell::UpdateFlds(sal_True);
// <--
if( bStateChanged )
pRenderDocShell->EnableSetModified( sal_True );
@@ -2857,7 +2851,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 ];
// <--
@@ -3233,50 +3227,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 );
}
@@ -3301,19 +3295,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 );
}
@@ -3330,38 +3324,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 );
}
@@ -3814,7 +3808,7 @@ Any lcl_GetDisplayBitmap(String sLinkSuffix)
if(USHRT_MAX != nImgId)
{
nImgId += 20000;
- BOOL bHighContrast = Application::GetSettings().GetStyleSettings().GetHighContrastMode();
+ sal_Bool bHighContrast = Application::GetSettings().GetStyleSettings().GetHighContrastMode();
ImageList aEntryImages( SW_RES(bHighContrast ? IMG_NAVI_ENTRYBMPH : IMG_NAVI_ENTRYBMP) );
const Image& rImage = aEntryImages.GetImage( nImgId );
Bitmap aBitmap( rImage.GetBitmapEx().GetBitmap() );
@@ -4134,15 +4128,15 @@ SwViewOptionAdjust_Impl::AdjustViewOptions(SwPrintData const*const pPrtOptions)
// disable anything in the view that should not be printed (or exported to PDF) by default
// (see also dialog "Tools/Options - StarOffice Writer - Formatting Aids"
// in section "Display of ...")
- aRenderViewOptions.SetParagraph( FALSE ); // paragraph end
- aRenderViewOptions.SetSoftHyph( FALSE ); // aka custom hyphens
- aRenderViewOptions.SetBlank( FALSE ); // spaces
- aRenderViewOptions.SetHardBlank( FALSE ); // non-breaking spaces
- aRenderViewOptions.SetTab( FALSE ); // tabs
- aRenderViewOptions.SetLineBreak( FALSE ); // breaks (type 1)
- aRenderViewOptions.SetPageBreak( FALSE ); // breaks (type 2)
- aRenderViewOptions.SetColumnBreak( FALSE ); // breaks (type 3)
- BOOL bVal = pPrtOptions? pPrtOptions->bPrintHiddenText : FALSE;
+ aRenderViewOptions.SetParagraph( sal_False ); // paragraph end
+ aRenderViewOptions.SetSoftHyph( sal_False ); // aka custom hyphens
+ aRenderViewOptions.SetBlank( sal_False ); // spaces
+ aRenderViewOptions.SetHardBlank( sal_False ); // non-breaking spaces
+ aRenderViewOptions.SetTab( sal_False ); // tabs
+ aRenderViewOptions.SetLineBreak( sal_False ); // breaks (type 1)
+ aRenderViewOptions.SetPageBreak( sal_False ); // breaks (type 2)
+ aRenderViewOptions.SetColumnBreak( sal_False ); // breaks (type 3)
+ sal_Bool bVal = pPrtOptions? pPrtOptions->bPrintHiddenText : sal_False;
if (bContainsHiddenChars)
aRenderViewOptions.SetShowHiddenChar( bVal ); // hidden text
if (bContainsHiddenFields)
@@ -4153,16 +4147,16 @@ SwViewOptionAdjust_Impl::AdjustViewOptions(SwPrintData const*const pPrtOptions)
if (bContainsPlaceHolders)
{
// should always be printed in PDF export!
- bVal = pPrtOptions ? pPrtOptions->bPrintTextPlaceholder : TRUE;
+ bVal = pPrtOptions ? pPrtOptions->bPrintTextPlaceholder : sal_True;
aRenderViewOptions.SetShowPlaceHolderFields( bVal );
}
if (bContainsFields)
- aRenderViewOptions.SetFldName( FALSE );
+ aRenderViewOptions.SetFldName( sal_False );
// we need to set this flag in order to get to see the visible effect of
// some of the above settings (needed for correct rendering)
- aRenderViewOptions.SetViewMetaChars( TRUE );
+ aRenderViewOptions.SetViewMetaChars( sal_True );
if (m_aOldViewOptions != aRenderViewOptions) // check if reformatting is necessary
{
diff --git a/sw/source/ui/uno/unotxvw.cxx b/sw/source/ui/uno/unotxvw.cxx
index b65c4b2955..84854a0f29 100644
--- a/sw/source/ui/uno/unotxvw.cxx
+++ b/sw/source/ui/uno/unotxvw.cxx
@@ -797,11 +797,11 @@ Sequence< Sequence< PropertyValue > > SwXTextView::getRubyList( sal_Bool /*bAuto
SwDoc* pDoc = m_pView->GetDocShell()->GetDoc();
SwRubyList aList;
- USHORT nCount = pDoc->FillRubyList( *rSh.GetCrsr(), aList, 0 );
+ sal_uInt16 nCount = pDoc->FillRubyList( *rSh.GetCrsr(), aList, 0 );
Sequence< Sequence< PropertyValue > > aRet(nCount);
Sequence< PropertyValue >* pRet = aRet.getArray();
String aString;
- for(USHORT n = 0; n < nCount; n++)
+ for(sal_uInt16 n = 0; n < nCount; n++)
{
const SwRubyListEntryPtr pEntry = aList[n];
@@ -895,7 +895,7 @@ void SAL_CALL SwXTextView::setRubyList(
pEntry->GetRubyAttr().SetPosition(bValue ? 0 : 1);
}
}
- aList.Insert(pEntry, (USHORT)nPos);
+ aList.Insert(pEntry, (sal_uInt16)nPos);
}
SwDoc* pDoc = m_pView->GetDocShell()->GetDoc();
pDoc->SetRubyList( *rSh.GetCrsr(), aList, 0 );
@@ -1058,7 +1058,7 @@ uno::Any SAL_CALL SwXTextView::getPropertyValue(
if (nWID == WID_PAGE_COUNT)
nCount = m_pView->GetDocShell()->GetDoc()->GetPageCount();
else // WID_LINE_COUNT
- nCount = m_pView->GetWrtShell().GetLineCount( FALSE /*of whole document*/ );
+ nCount = m_pView->GetWrtShell().GetLineCount( sal_False /*of whole document*/ );
aRet <<= nCount;
}
break;
@@ -1070,7 +1070,7 @@ uno::Any SAL_CALL SwXTextView::getPropertyValue(
const SwViewOption *pOpt = m_pView->GetWrtShell().GetViewOptions();
if (!pOpt)
throw RuntimeException();
- UINT32 nFlag = VIEWOPT_1_ONLINESPELL;
+ sal_uInt32 nFlag = VIEWOPT_1_ONLINESPELL;
sal_Bool bVal = 0 != (pOpt->GetCoreOptions() & nFlag);
aRet <<= bVal;
}
@@ -1129,7 +1129,7 @@ OUString SwXTextView::getImplementationName(void) throw( RuntimeException )
/* -----------------------------06.04.00 11:07--------------------------------
---------------------------------------------------------------------------*/
-BOOL SwXTextView::supportsService(const OUString& rServiceName) throw( RuntimeException )
+sal_Bool SwXTextView::supportsService(const OUString& rServiceName) throw( RuntimeException )
{
return rServiceName.equalsAscii("com.sun.star.text.TextDocumentView") ||
rServiceName.equalsAscii("com.sun.star.view.OfficeDocumentView");
@@ -1537,7 +1537,7 @@ sal_Bool SwXTextViewCursor::jumpToFirstPage(void) throw( uno::RuntimeException )
rSh.LeaveSelFrmMode();
}
rSh.EnterStdMode();
- bRet = rSh.SttEndDoc(TRUE);
+ bRet = rSh.SttEndDoc(sal_True);
}
else
throw uno::RuntimeException();
@@ -1559,7 +1559,7 @@ sal_Bool SwXTextViewCursor::jumpToLastPage(void) throw( uno::RuntimeException )
rSh.LeaveSelFrmMode();
}
rSh.EnterStdMode();
- bRet = rSh.SttEndDoc(FALSE);
+ bRet = rSh.SttEndDoc(sal_False);
rSh.SttPg();
}
else
@@ -1574,7 +1574,7 @@ sal_Bool SwXTextViewCursor::jumpToPage(sal_Int16 nPage) throw( uno::RuntimeExcep
::vos::OGuard aGuard(Application::GetSolarMutex());
sal_Bool bRet = sal_False;
if(m_pView)
- bRet = m_pView->GetWrtShell().GotoPage(nPage, TRUE);
+ bRet = m_pView->GetWrtShell().GotoPage(nPage, sal_True);
else
throw uno::RuntimeException();
return bRet;
@@ -1642,7 +1642,7 @@ sal_Int16 SwXTextViewCursor::getPage(void) throw( uno::RuntimeException )
{
SwWrtShell& rSh = m_pView->GetWrtShell();
SwPaM* pShellCrsr = rSh.GetCrsr();
- nRet = (short)pShellCrsr->GetPageNum( TRUE, 0 );
+ nRet = (short)pShellCrsr->GetPageNum( sal_True, 0 );
}
else
throw uno::RuntimeException();
@@ -2078,7 +2078,7 @@ OUString SwXTextViewCursor::getImplementationName(void) throw( RuntimeException
/* -----------------------------06.04.00 11:07--------------------------------
---------------------------------------------------------------------------*/
-BOOL SwXTextViewCursor::supportsService(const OUString& rServiceName) throw( RuntimeException )
+sal_Bool SwXTextViewCursor::supportsService(const OUString& rServiceName) throw( RuntimeException )
{
return !rServiceName.compareToAscii("com.sun.star.text.TextViewCursor") ||
!rServiceName.compareToAscii("com.sun.star.style.CharacterProperties") ||
@@ -2171,8 +2171,8 @@ uno::Reference< datatransfer::XTransferable > SAL_CALL SwXTextView::getTransfera
else
{
SwTransferable* pTransfer = new SwTransferable( rSh );
- const BOOL bLockedView = rSh.IsViewLocked();
- rSh.LockView( TRUE ); //lock visible section
+ const sal_Bool bLockedView = rSh.IsViewLocked();
+ rSh.LockView( sal_True ); //lock visible section
pTransfer->PrepareForCopy();
rSh.LockView( bLockedView );
return uno::Reference< datatransfer::XTransferable >( pTransfer );
@@ -2190,7 +2190,7 @@ void SAL_CALL SwXTextView::insertTransferable( const uno::Reference< datatransfe
{
SdrView *pSdrView = rSh.GetDrawView();
OutlinerView* pOLV = pSdrView->GetTextEditOutlinerView();
- pOLV->GetEditView().InsertText( xTrans, GetView()->GetDocShell()->GetMedium()->GetBaseURL(), FALSE );
+ pOLV->GetEditView().InsertText( xTrans, GetView()->GetDocShell()->GetMedium()->GetBaseURL(), sal_False );
}
else
{
diff --git a/sw/source/ui/utlui/attrdesc.cxx b/sw/source/ui/utlui/attrdesc.cxx
index 98e0a4e07b..4bbd7b592e 100644
--- a/sw/source/ui/utlui/attrdesc.cxx
+++ b/sw/source/ui/utlui/attrdesc.cxx
@@ -88,7 +88,7 @@ static sal_Char __READONLY_DATA sKomma[] = ", ";
SfxItemIter aIter( *this );
const IntlWrapper rInt( ::comphelper::getProcessServiceFactory(),
GetAppLanguage() );
- while( TRUE )
+ while( sal_True )
{
aIter.GetCurItem()->GetPresentation( ePres, eCoreMetric,
ePresMetric, aStr,
@@ -284,7 +284,7 @@ SfxItemPresentation SwRegisterItem::GetPresentation
case SFX_ITEM_PRESENTATION_NAMELESS:
case SFX_ITEM_PRESENTATION_COMPLETE:
{
- USHORT nId = GetValue() ? STR_REGISTER_ON : STR_REGISTER_OFF;
+ sal_uInt16 nId = GetValue() ? STR_REGISTER_ON : STR_REGISTER_OFF;
rText = SW_RESSTR( nId );
return ePres;
}
@@ -347,7 +347,7 @@ SfxItemPresentation SwParaConnectBorderItem::GetPresentation
case SFX_ITEM_PRESENTATION_NAMELESS:
case SFX_ITEM_PRESENTATION_COMPLETE:
{
- USHORT nId = GetValue() ? STR_CONNECT_BORDER_ON : STR_CONNECT_BORDER_OFF;
+ sal_uInt16 nId = GetValue() ? STR_CONNECT_BORDER_ON : STR_CONNECT_BORDER_OFF;
rText = SW_RESSTR( nId );
return ePres;
}
@@ -398,7 +398,7 @@ SfxItemPresentation SwFmtFrmSize::GetPresentation
{
rText += ',';
rText += ' ';
- const USHORT nId = ATT_FIX_SIZE == eFrmHeightType ?
+ const sal_uInt16 nId = ATT_FIX_SIZE == eFrmHeightType ?
STR_FRM_FIXEDHEIGHT : STR_FRM_MINHEIGHT;
rText += SW_RESSTR( nId );
rText += ' ';
@@ -441,7 +441,7 @@ SfxItemPresentation SwFmtHeader::GetPresentation
case SFX_ITEM_PRESENTATION_NAMELESS:
case SFX_ITEM_PRESENTATION_COMPLETE:
{
- const USHORT nId = GetHeaderFmt() ? STR_HEADER : STR_NO_HEADER;
+ const sal_uInt16 nId = GetHeaderFmt() ? STR_HEADER : STR_NO_HEADER;
rText = SW_RESSTR( nId );
return ePres;
}
@@ -471,7 +471,7 @@ SfxItemPresentation SwFmtFooter::GetPresentation
case SFX_ITEM_PRESENTATION_NAMELESS:
case SFX_ITEM_PRESENTATION_COMPLETE:
{
- const USHORT nId = GetFooterFmt() ? STR_FOOTER : STR_NO_FOOTER;
+ const sal_uInt16 nId = GetFooterFmt() ? STR_FOOTER : STR_NO_FOOTER;
rText = SW_RESSTR( nId );
return ePres;
}
@@ -498,7 +498,7 @@ SfxItemPresentation SwFmtSurround::GetPresentation
case SFX_ITEM_PRESENTATION_NAMELESS:
case SFX_ITEM_PRESENTATION_COMPLETE:
{
- USHORT nId = 0;
+ sal_uInt16 nId = 0;
switch ( (SwSurround)GetValue() )
{
case SURROUND_NONE:
@@ -558,7 +558,7 @@ SfxItemPresentation SwFmtVertOrient::GetPresentation
case SFX_ITEM_PRESENTATION_NAMELESS:
case SFX_ITEM_PRESENTATION_COMPLETE:
{
- USHORT nId = 0;
+ sal_uInt16 nId = 0;
switch ( GetVertOrient() )
{
case text::VertOrientation::NONE:
@@ -619,7 +619,7 @@ SfxItemPresentation SwFmtHoriOrient::GetPresentation
case SFX_ITEM_PRESENTATION_NAMELESS:
case SFX_ITEM_PRESENTATION_COMPLETE:
{
- USHORT nId = 0;
+ sal_uInt16 nId = 0;
switch ( GetHoriOrient() )
{
case text::HoriOrientation::NONE:
@@ -679,7 +679,7 @@ SfxItemPresentation SwFmtAnchor::GetPresentation
case SFX_ITEM_PRESENTATION_NAMELESS:
case SFX_ITEM_PRESENTATION_COMPLETE:
{
- USHORT nId = 0;
+ sal_uInt16 nId = 0;
switch ( GetAnchorId() )
{
case FLY_AT_PARA:
@@ -752,7 +752,7 @@ SfxItemPresentation SwFmtCol::GetPresentation
case SFX_ITEM_PRESENTATION_NAMELESS:
case SFX_ITEM_PRESENTATION_COMPLETE:
{
- USHORT nCnt = GetNumCols();
+ sal_uInt16 nCnt = GetNumCols();
if ( nCnt > 1 )
{
rText = String::CreateFromInt32(nCnt);
@@ -760,7 +760,7 @@ SfxItemPresentation SwFmtCol::GetPresentation
rText += SW_RESSTR( STR_COLUMNS );
if ( COLADJ_NONE != GetLineAdj() )
{
- USHORT nWdth = USHORT(GetLineWidth());
+ sal_uInt16 nWdth = sal_uInt16(GetLineWidth());
rText += ' ';
rText += SW_RESSTR( STR_LINE_WIDTH );
rText += ' ';
@@ -923,7 +923,7 @@ SfxItemPresentation SwFmtFtnEndAtTxtEnd::GetPresentation
// String sPrefix;
// String sSuffix;
// SvxNumberType aFmt;
-// USHORT nOffset;
+// sal_uInt16 nOffset;
// rText +=
}
break;
@@ -1026,7 +1026,7 @@ SfxItemPresentation SwTextGridItem::GetPresentation
case SFX_ITEM_PRESENTATION_NAMELESS:
case SFX_ITEM_PRESENTATION_COMPLETE:
{
- USHORT nId = 0;
+ sal_uInt16 nId = 0;
switch ( GetGridType() )
{
@@ -1092,7 +1092,7 @@ SfxItemPresentation SwMirrorGrf::GetPresentation(
case SFX_ITEM_PRESENTATION_NAMELESS:
case SFX_ITEM_PRESENTATION_COMPLETE:
{
- USHORT nId;
+ sal_uInt16 nId;
switch( GetValue() )
{
case RES_MIRROR_GRAPH_DONT: nId = STR_NO_MIRROR; break;
@@ -1197,7 +1197,7 @@ SfxItemPresentation SwChannelGrf::GetPresentation(
case SFX_ITEM_PRESENTATION_COMPLETE:
if( SFX_ITEM_PRESENTATION_COMPLETE == ePres )
{
- USHORT nId;
+ sal_uInt16 nId;
switch ( Which() )
{
case RES_GRFATR_CHANNELR: nId = STR_CHANNELR; break;
@@ -1257,7 +1257,7 @@ SfxItemPresentation SwInvertGrf::GetPresentation(
case SFX_ITEM_PRESENTATION_COMPLETE:
if( SFX_ITEM_PRESENTATION_COMPLETE == ePres )
{
- USHORT nId = 0 != GetValue() ? STR_INVERT : STR_INVERT_NOT;
+ sal_uInt16 nId = 0 != GetValue() ? STR_INVERT : STR_INVERT_NOT;
rText = SW_RESSTR( nId );
}
break;
@@ -1303,7 +1303,7 @@ SfxItemPresentation SwDrawModeGrf::GetPresentation(
case SFX_ITEM_PRESENTATION_COMPLETE:
if( SFX_ITEM_PRESENTATION_COMPLETE == ePres )
{
- USHORT nId;
+ sal_uInt16 nId;
switch ( GetValue() )
{
@@ -1336,7 +1336,7 @@ SfxItemPresentation SwFmtFollowTextFlow::GetPresentation( SfxItemPresentation eP
break;
case SFX_ITEM_PRESENTATION_COMPLETE:
{
- USHORT nId = GetValue() ? STR_FOLLOW_TEXT_FLOW : STR_DONT_FOLLOW_TEXT_FLOW;
+ sal_uInt16 nId = GetValue() ? STR_FOLLOW_TEXT_FLOW : STR_DONT_FOLLOW_TEXT_FLOW;
rText = SW_RESSTR( nId );
}
break;
diff --git a/sw/source/ui/utlui/bookctrl.cxx b/sw/source/ui/utlui/bookctrl.cxx
index 4bab9e8ca1..b9e0bf09d6 100644
--- a/sw/source/ui/utlui/bookctrl.cxx
+++ b/sw/source/ui/utlui/bookctrl.cxx
@@ -63,10 +63,10 @@ class BookmarkPopup_Impl : public PopupMenu
public:
BookmarkPopup_Impl();
- USHORT GetCurId() const { return nCurId; }
+ sal_uInt16 GetCurId() const { return nCurId; }
private:
- USHORT nCurId;
+ sal_uInt16 nCurId;
virtual void Select();
};
@@ -88,8 +88,8 @@ void BookmarkPopup_Impl::Select()
// class SvxZoomStatusBarControl ------------------------------------------
-SwBookmarkControl::SwBookmarkControl( USHORT _nSlotId,
- USHORT _nId,
+SwBookmarkControl::SwBookmarkControl( sal_uInt16 _nSlotId,
+ sal_uInt16 _nId,
StatusBar& rStb ) :
SfxStatusBarControl( _nSlotId, _nId, rStb )
{
@@ -104,7 +104,7 @@ SwBookmarkControl::~SwBookmarkControl()
// -----------------------------------------------------------------------
void SwBookmarkControl::StateChanged(
- USHORT /*nSID*/, SfxItemState eState, const SfxPoolItem* pState )
+ sal_uInt16 /*nSID*/, SfxItemState eState, const SfxPoolItem* pState )
{
if( eState != SFX_ITEM_AVAILABLE || pState->ISA( SfxVoidItem ) )
GetStatusBar().SetItemText( GetId(), String() );
@@ -136,8 +136,8 @@ void SwBookmarkControl::Command( const CommandEvent& rCEvt )
{
IDocumentMarkAccess* const pMarkAccess = pWrtShell->getIDocumentMarkAccess();
IDocumentMarkAccess::const_iterator_t ppBookmarkStart = pMarkAccess->getBookmarksBegin();
- USHORT nPopupId = 1;
- ::std::map<sal_Int32, USHORT> aBookmarkIdx;
+ sal_uInt16 nPopupId = 1;
+ ::std::map<sal_Int32, sal_uInt16> aBookmarkIdx;
for(IDocumentMarkAccess::const_iterator_t ppBookmark = ppBookmarkStart;
ppBookmark != pMarkAccess->getBookmarksEnd();
ppBookmark++)
@@ -145,12 +145,12 @@ void SwBookmarkControl::Command( const CommandEvent& rCEvt )
if(IDocumentMarkAccess::BOOKMARK == IDocumentMarkAccess::GetType(**ppBookmark))
{
aPop.InsertItem( nPopupId, ppBookmark->get()->GetName() );
- aBookmarkIdx[nPopupId] = static_cast<USHORT>(ppBookmark - ppBookmarkStart);
+ aBookmarkIdx[nPopupId] = static_cast<sal_uInt16>(ppBookmark - ppBookmarkStart);
nPopupId++;
}
}
aPop.Execute( &GetStatusBar(), rCEvt.GetMousePosPixel());
- USHORT nCurrId = aPop.GetCurId();
+ sal_uInt16 nCurrId = aPop.GetCurId();
if( nCurrId != USHRT_MAX)
{
SfxUInt16Item aBookmark( FN_STAT_BOOKMARK, aBookmarkIdx[nCurrId] );
diff --git a/sw/source/ui/utlui/condedit.cxx b/sw/source/ui/utlui/condedit.cxx
index 8929abb006..1ca8e6548e 100644
--- a/sw/source/ui/utlui/condedit.cxx
+++ b/sw/source/ui/utlui/condedit.cxx
@@ -51,7 +51,7 @@ using namespace ::com::sun::star::uno;
ConditionEdit::ConditionEdit( Window* pParent, const ResId& rResId )
: Edit( pParent, rResId ),
DropTargetHelper( this ),
- bBrackets( TRUE ), bEnableDrop( TRUE )
+ bBrackets( sal_True ), bEnableDrop( sal_True )
{
}
diff --git a/sw/source/ui/utlui/content.cxx b/sw/source/ui/utlui/content.cxx
index 8a70c351ff..703bd3307f 100644
--- a/sw/source/ui/utlui/content.cxx
+++ b/sw/source/ui/utlui/content.cxx
@@ -36,9 +36,7 @@
#include <tools/urlobj.hxx>
#include <sfx2/docfile.hxx>
#include <sfx2/dispatch.hxx>
-#ifndef _HELP_HXX
#include <vcl/help.hxx>
-#endif
#include <sot/formats.hxx>
#include <vcl/sound.hxx>
#include <uiitems.hxx>
@@ -47,13 +45,9 @@
#include <fmtfld.hxx>
#include <swmodule.hxx>
#include <wrtsh.hxx>
-#ifndef _VIEW_HXX
#include <view.hxx>
-#endif
#include <errhdl.hxx>
-#ifndef _DOCSH_HXX
#include <docsh.hxx>
-#endif
#include <content.hxx>
#include <frmfmt.hxx>
#include <fldbas.hxx>
@@ -69,24 +63,12 @@
#include <doc.hxx>
#include <unotools.hxx>
#include <crsskip.hxx>
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
-#ifndef _HELPID_H
#include <helpid.h>
-#endif
-#ifndef _NAVIPI_HRC
#include <navipi.hrc>
-#endif
-#ifndef _UTLUI_HRC
#include <utlui.hrc>
-#endif
-#ifndef _MISC_HRC
#include <misc.hrc>
-#endif
-#ifndef _COMCORE_HRC
#include <comcore.hrc>
-#endif
#include <com/sun/star/text/XTextSectionsSupplier.hpp>
#include <com/sun/star/text/XTextGraphicObjectsSupplier.hpp>
#include <com/sun/star/text/XTextTablesSupplier.hpp>
@@ -102,7 +84,9 @@
#include <svx/svdview.hxx>
#include <vcl/scrbar.hxx>
#include <comcore.hrc>
-#include <undobj.hxx>
+#include <SwRewriter.hxx>
+#include <hints.hxx>
+#include <numrule.hxx>
#include <swundo.hxx>
#include <ndtxt.hxx>
#include <PostItMgr.hxx>
@@ -303,7 +287,7 @@ void SwContentType::Init(sal_Bool* pbInvalidateWindow)
case CONTENT_TYPE_BOOKMARK:
{
IDocumentMarkAccess* const pMarkAccess = pWrtShell->getIDocumentMarkAccess();
- nMemberCount = static_cast<USHORT>(count_if(
+ nMemberCount = static_cast<sal_uInt16>(count_if(
pMarkAccess->getBookmarksBegin(),
pMarkAccess->getBookmarksEnd(),
&lcl_IsUiVisibleBookmark));
@@ -336,7 +320,7 @@ void SwContentType::Init(sal_Bool* pbInvalidateWindow)
{
const String& rSectionName =
pFmt->GetSection()->GetSectionName();
- BYTE nLevel = 0;
+ sal_uInt8 nLevel = 0;
SwSectionFmt* pParentFmt = pFmt->GetParent();
while(pParentFmt)
{
@@ -699,7 +683,7 @@ void SwContentType::FillMemberList(sal_Bool* pbLevelOrVisibiblityChanged)
{
String sSectionName = pFmt->GetSection()->GetSectionName();
- BYTE nLevel = 0;
+ sal_uInt8 nLevel = 0;
SwSectionFmt* pParentFmt = pFmt->GetParent();
while(pParentFmt)
{
@@ -873,7 +857,7 @@ void SwContentType::FillMemberList(sal_Bool* pbLevelOrVisibiblityChanged)
pMember->Insert(pCnt);
nMemberCount++;
if(nOldMemberCount > (int)i &&
- (pOldMember->GetObject((USHORT)i))->IsInvisible() != pCnt->IsInvisible())
+ (pOldMember->GetObject((sal_uInt16)i))->IsInvisible() != pCnt->IsInvisible())
*pbLevelOrVisibiblityChanged = sal_True;
}
}
@@ -1352,7 +1336,7 @@ void SwContentTree::Display( sal_Bool bActive )
{
if(!bIsImageListInitialized)
{
- USHORT nResId = GetSettings().GetStyleSettings().GetHighContrastMode() ? IMG_NAVI_ENTRYBMPH : IMG_NAVI_ENTRYBMP;
+ sal_uInt16 nResId = GetSettings().GetStyleSettings().GetHighContrastMode() ? IMG_NAVI_ENTRYBMPH : IMG_NAVI_ENTRYBMP;
aEntryImages = ImageList(SW_RES(nResId));
bIsImageListInitialized = sal_True;
}
@@ -2304,7 +2288,7 @@ DragDropMode SwContentTree::NotifyStartDrag(
sal_Bool SwContentTree::NotifyMoving( SvLBoxEntry* pTarget,
- SvLBoxEntry* pEntry, SvLBoxEntry*& , ULONG& )
+ SvLBoxEntry* pEntry, SvLBoxEntry*& , sal_uLong& )
{
if(!bDocChgdInDragging)
{
@@ -2344,7 +2328,7 @@ sal_Bool SwContentTree::NotifyMoving( SvLBoxEntry* pTarget,
sal_Bool SwContentTree::NotifyCopying( SvLBoxEntry* pTarget,
- SvLBoxEntry* pEntry, SvLBoxEntry*& , ULONG& )
+ SvLBoxEntry* pEntry, SvLBoxEntry*& , sal_uLong& )
{
if(!bDocChgdInDragging)
{
@@ -2476,7 +2460,7 @@ void SwContentTree::KeyInput(const KeyEvent& rEvent)
!pActiveShell->GetView().GetDocShell()->IsReadOnly())
{
EditEntry(pEntry, EDIT_MODE_DELETE);
- bViewHasChanged = TRUE;
+ bViewHasChanged = sal_True;
GetParentWindow()->UpdateListBox();
TimerUpdate(&aUpdTimer);
GrabFocus();
@@ -2494,7 +2478,7 @@ void SwContentTree::KeyInput(const KeyEvent& rEvent)
void SwContentTree::RequestHelp( const HelpEvent& rHEvt )
{
- BOOL bCallBase = TRUE;
+ sal_Bool bCallBase = sal_True;
if( rHEvt.GetMode() & HELPMODE_QUICK )
{
Point aPos( ScreenToOutputPixel( rHEvt.GetMousePosPixel() ));
@@ -2593,13 +2577,13 @@ void SwContentTree::RequestHelp( const HelpEvent& rHEvt )
else
Help::ShowQuickHelp( this, aItemRect, sEntry,
QUICKHELP_LEFT|QUICKHELP_VCENTER );
- bCallBase = FALSE;
+ bCallBase = sal_False;
}
}
else
{
Help::ShowQuickHelp( this, Rectangle(), aEmptyStr, 0 );
- bCallBase = FALSE;
+ bCallBase = sal_False;
}
}
}
@@ -2612,7 +2596,7 @@ void SwContentTree::RequestHelp( const HelpEvent& rHEvt )
***************************************************************************/
-void SwContentTree::ExcecuteContextMenuAction( USHORT nSelectedPopupEntry )
+void SwContentTree::ExcecuteContextMenuAction( sal_uInt16 nSelectedPopupEntry )
{
SvLBoxEntry* pFirst = FirstSelected();
switch( nSelectedPopupEntry )
@@ -2834,7 +2818,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)
@@ -3193,7 +3177,7 @@ sal_Bool NaviContentBookmark::Paste( TransferableDataHelper& rData )
xub_StrLen nPos = 0;
aUrl = sStr.GetToken(0, NAVI_BOOKMARK_DELIM, nPos );
aDescr = sStr.GetToken(0, NAVI_BOOKMARK_DELIM, nPos );
- nDefDrag= (USHORT)sStr.GetToken(0, NAVI_BOOKMARK_DELIM, nPos ).ToInt32();
+ nDefDrag= (sal_uInt16)sStr.GetToken(0, NAVI_BOOKMARK_DELIM, nPos ).ToInt32();
nDocSh = sStr.GetToken(0, NAVI_BOOKMARK_DELIM, nPos ).ToInt32();
}
return bRet;
@@ -3255,7 +3239,7 @@ void SwContentTree::DataChanged( const DataChangedEvent& rDCEvt )
if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) &&
(rDCEvt.GetFlags() & SETTINGS_STYLE) )
{
- USHORT nResId = GetSettings().GetStyleSettings().GetHighContrastMode() ? IMG_NAVI_ENTRYBMPH : IMG_NAVI_ENTRYBMP;
+ sal_uInt16 nResId = GetSettings().GetStyleSettings().GetHighContrastMode() ? IMG_NAVI_ENTRYBMPH : IMG_NAVI_ENTRYBMP;
aEntryImages = ImageList(SW_RES(nResId));
FindActiveTypeAndRemoveUserData();
Display(sal_True);
diff --git a/sw/source/ui/utlui/glbltree.cxx b/sw/source/ui/utlui/glbltree.cxx
index a118ca13ab..3602f20932 100644
--- a/sw/source/ui/utlui/glbltree.cxx
+++ b/sw/source/ui/utlui/glbltree.cxx
@@ -153,17 +153,17 @@ static const char* __FAR_DATA aHelpForMenu[] =
---------------------------------------------------------------------------*/
class SwGlobalFrameListener_Impl : public SfxListener
{
- BOOL bValid;
+ sal_Bool bValid;
public:
SwGlobalFrameListener_Impl(SfxViewFrame& rFrame) :
- bValid(TRUE)
+ bValid(sal_True)
{
StartListening(rFrame);
}
virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
- BOOL IsValid() const {return bValid;}
+ sal_Bool IsValid() const {return bValid;}
};
/* -----------------------------24.08.00 12:05--------------------------------
@@ -172,7 +172,7 @@ void SwGlobalFrameListener_Impl::Notify( SfxBroadcaster& /*rBC*/, const SfxHi
{
if( rHint.ISA(SfxSimpleHint) &&
(((SfxSimpleHint&) rHint).GetId() == SFX_HINT_DYING))
- bValid = FALSE;
+ bValid = sal_False;
}
/*-----------------12.06.97 09:38-------------------
@@ -190,9 +190,9 @@ SwGlobalTree::SwGlobalTree(Window* pParent, const ResId& rResId) :
pDocContent ( NULL ),
pDocInserter ( NULL ),
- bIsInternalDrag ( FALSE ),
- bLastEntryEmphasis ( FALSE ),
- bIsImageListInitialized ( FALSE )
+ bIsInternalDrag ( sal_False ),
+ bLastEntryEmphasis ( sal_False ),
+ bIsImageListInitialized ( sal_False )
{
SetDragDropMode(SV_DRAGDROP_APP_COPY |
@@ -202,7 +202,7 @@ SwGlobalTree::SwGlobalTree(Window* pParent, const ResId& rResId) :
aUpdateTimer.SetTimeout(GLOBAL_UPDATE_TIMEOUT);
aUpdateTimer.SetTimeoutHdl(LINK(this, SwGlobalTree, Timeout));
aUpdateTimer.Start();
- for(USHORT i = 0; i < GLOBAL_CONTEXT_COUNT; i++)
+ for(sal_uInt16 i = 0; i < GLOBAL_CONTEXT_COUNT; i++)
{
aContextStrings[i] = SW_RESSTR(i+ ST_GLOBAL_CONTEXT_FIRST);
}
@@ -230,19 +230,19 @@ sal_Int8 SwGlobalTree::ExecuteDrop( const ExecuteDropEvent& rEvt )
SvLBoxEntry* pLast = (SvLBoxEntry*)LastVisible();
if(pEmphasisEntry)
{
- ImplShowTargetEmphasis( Prev(pEmphasisEntry), FALSE );
+ ImplShowTargetEmphasis( Prev(pEmphasisEntry), sal_False );
pEmphasisEntry = 0;
}
else if(bLastEntryEmphasis && pLast)
{
- ImplShowTargetEmphasis( pLast, FALSE);
+ ImplShowTargetEmphasis( pLast, sal_False);
}
SvLBoxEntry* pDropEntry = bLastEntryEmphasis ? 0 : GetEntry(rEvt.maPosPixel);
if( bIsInternalDrag )
{
SvLBoxEntry* pDummy = 0;
- ULONG nInsertionPos = LIST_APPEND;
+ sal_uLong nInsertionPos = LIST_APPEND;
NotifyMoving( pDropEntry, pDDSource, pDummy, nInsertionPos );
}
else
@@ -260,12 +260,12 @@ sal_Int8 SwGlobalTree::ExecuteDrop( const ExecuteDropEvent& rEvt )
int nAbsContPos = pDropEntry ?
(int) GetModel()->GetAbsPos(pDropEntry):
- 1;
- USHORT nEntryCount = (USHORT)GetEntryCount();
+ sal_uInt16 nEntryCount = (sal_uInt16)GetEntryCount();
// Daten holen
FileList aFileList;
aData.GetFileList( FORMAT_FILE_LIST, aFileList );
- for ( USHORT n = (USHORT)aFileList.Count(); n--; )
+ for ( sal_uInt16 n = (sal_uInt16)aFileList.Count(); n--; )
{
sFileName = aFileList.GetFile(n);
InsertRegion(pCnt, &sFileName);
@@ -281,7 +281,7 @@ sal_Int8 SwGlobalTree::ExecuteDrop( const ExecuteDropEvent& rEvt )
{
nEntryCount++;
nAbsContPos++;
- pCnt = pTempContents->GetObject( static_cast< USHORT >(nAbsContPos) );
+ pCnt = pTempContents->GetObject( static_cast< sal_uInt16 >(nAbsContPos) );
}
}
}
@@ -299,7 +299,7 @@ sal_Int8 SwGlobalTree::ExecuteDrop( const ExecuteDropEvent& rEvt )
}
}
}
- bLastEntryEmphasis = FALSE;
+ bLastEntryEmphasis = sal_False;
return nRet;
}
@@ -317,14 +317,14 @@ sal_Int8 SwGlobalTree::AcceptDrop( const AcceptDropEvent& rEvt )
{
if( pEmphasisEntry )
{
- ImplShowTargetEmphasis( Prev(pEmphasisEntry), FALSE );
+ ImplShowTargetEmphasis( Prev(pEmphasisEntry), sal_False );
pEmphasisEntry = 0;
}
else if(bLastEntryEmphasis && pLast)
{
- ImplShowTargetEmphasis( pLast, FALSE);
+ ImplShowTargetEmphasis( pLast, sal_False);
}
- bLastEntryEmphasis = FALSE;
+ bLastEntryEmphasis = sal_False;
}
else
{
@@ -346,11 +346,11 @@ sal_Int8 SwGlobalTree::AcceptDrop( const AcceptDropEvent& rEvt )
nRet = DND_ACTION_LINK;
if(pEmphasisEntry && pEmphasisEntry != pDropEntry)
- ImplShowTargetEmphasis( Prev(pEmphasisEntry), FALSE );
+ ImplShowTargetEmphasis( Prev(pEmphasisEntry), sal_False );
else if(pLast && bLastEntryEmphasis && pDropEntry)
{
- ImplShowTargetEmphasis( pLast, FALSE);
- bLastEntryEmphasis = FALSE;
+ ImplShowTargetEmphasis( pLast, sal_False);
+ bLastEntryEmphasis = sal_False;
}
if(pDropEntry)
@@ -358,7 +358,7 @@ sal_Int8 SwGlobalTree::AcceptDrop( const AcceptDropEvent& rEvt )
else if(pLast)
{
ImplShowTargetEmphasis( pLast, DND_ACTION_NONE != nRet );
- bLastEntryEmphasis = TRUE;
+ bLastEntryEmphasis = sal_True;
}
pEmphasisEntry = pDropEntry;
}
@@ -373,12 +373,12 @@ PopupMenu* SwGlobalTree::CreateContextMenu()
if(pActiveShell &&
!pActiveShell->GetView().GetDocShell()->IsReadOnly())
{
- USHORT nEnableFlags = GetEnableFlags();
+ sal_uInt16 nEnableFlags = GetEnableFlags();
pPop = new PopupMenu;
PopupMenu* pSubPop1 = new PopupMenu;
PopupMenu* pSubPop2 = new PopupMenu;
- for (USHORT i = CTX_UPDATE_SEL; i <= CTX_UPDATE_ALL; i++)
+ for (sal_uInt16 i = CTX_UPDATE_SEL; i <= CTX_UPDATE_ALL; i++)
{
pSubPop2->InsertItem( i, aContextStrings[ST_UPDATE_SEL - ST_GLOBAL_CONTEXT_FIRST - CTX_UPDATE_SEL+ i] );
pSubPop2->SetHelpId(i, aHelpForMenu[i]);
@@ -430,13 +430,13 @@ PopupMenu* SwGlobalTree::CreateContextMenu()
/*-----------------16.06.97 10:41-------------------
--------------------------------------------------*/
-void SwGlobalTree::TbxMenuHdl(USHORT nTbxId, ToolBox* pBox)
+void SwGlobalTree::TbxMenuHdl(sal_uInt16 nTbxId, ToolBox* pBox)
{
- USHORT nEnableFlags = GetEnableFlags();
+ sal_uInt16 nEnableFlags = GetEnableFlags();
if(FN_GLOBAL_OPEN == nTbxId)
{
PopupMenu *pMenu = new PopupMenu;
- for (USHORT i = CTX_INSERT_ANY_INDEX; i <= CTX_INSERT_TEXT; i++)
+ for (sal_uInt16 i = CTX_INSERT_ANY_INDEX; i <= CTX_INSERT_TEXT; i++)
{
pMenu->InsertItem( i, aContextStrings[ST_INDEX - ST_GLOBAL_CONTEXT_FIRST - CTX_INSERT_ANY_INDEX + i] );
pMenu->SetHelpId(i, aHelpForMenu[i] );
@@ -456,7 +456,7 @@ void SwGlobalTree::TbxMenuHdl(USHORT nTbxId, ToolBox* pBox)
else if(FN_GLOBAL_UPDATE == nTbxId)
{
PopupMenu *pMenu = new PopupMenu;
- for (USHORT i = CTX_UPDATE_SEL; i <= CTX_UPDATE_ALL; i++)
+ for (sal_uInt16 i = CTX_UPDATE_SEL; i <= CTX_UPDATE_ALL; i++)
{
pMenu->InsertItem( i, aContextStrings[ST_UPDATE_SEL - ST_GLOBAL_CONTEXT_FIRST - CTX_UPDATE_SEL+ i] );
pMenu->SetHelpId(i, aHelpForMenu[i] );
@@ -472,14 +472,14 @@ void SwGlobalTree::TbxMenuHdl(USHORT nTbxId, ToolBox* pBox)
/*-----------------16.06.97 11:02-------------------
--------------------------------------------------*/
-USHORT SwGlobalTree::GetEnableFlags() const
+sal_uInt16 SwGlobalTree::GetEnableFlags() const
{
SvLBoxEntry* pEntry = FirstSelected();
- USHORT nSelCount = (USHORT)GetSelectionCount();
- USHORT nEntryCount = (USHORT)GetEntryCount();
+ sal_uInt16 nSelCount = (sal_uInt16)GetSelectionCount();
+ sal_uInt16 nEntryCount = (sal_uInt16)GetEntryCount();
SvLBoxEntry* pPrevEntry = pEntry ? Prev(pEntry) : 0;
- USHORT nRet = 0;
+ sal_uInt16 nRet = 0;
if(nSelCount == 1 || !nEntryCount)
nRet |= ENABLE_INSERT_IDX|ENABLE_INSERT_FILE;
if(nSelCount == 1)
@@ -507,9 +507,9 @@ USHORT SwGlobalTree::GetEnableFlags() const
--------------------------------------------------*/
void SwGlobalTree::RequestHelp( const HelpEvent& rHEvt )
{
- BOOL bParent = TRUE;
- Update(TRUE);
- Display(TRUE);
+ sal_Bool bParent = sal_True;
+ Update(sal_True);
+ Display(sal_True);
if( rHEvt.GetMode() & HELPMODE_QUICK )
{
Point aPos( ScreenToOutputPixel( rHEvt.GetMousePosPixel() ));
@@ -518,7 +518,7 @@ void SwGlobalTree::RequestHelp( const HelpEvent& rHEvt )
(const SwGlblDocContent*)pEntry->GetUserData() : 0;
if( pCont && GLBLDOC_SECTION == pCont->GetType())
{
- bParent = FALSE;
+ bParent = sal_False;
SvLBoxTab* pTab;
SvLBoxItem* pItem = GetItem( pEntry, aPos.X(), &pTab );
if(pItem && SV_ITEM_ID_LBOXSTRING == pItem->IsA())
@@ -558,11 +558,11 @@ void SwGlobalTree::RequestHelp( const HelpEvent& rHEvt )
void SwGlobalTree::SelectHdl()
{
- USHORT nSelCount = (USHORT)GetSelectionCount();
+ sal_uInt16 nSelCount = (sal_uInt16)GetSelectionCount();
SvLBoxEntry* pSel = FirstSelected();
- USHORT nAbsPos = pSel ? (USHORT)GetModel()->GetAbsPos(pSel) : 0;
+ sal_uInt16 nAbsPos = pSel ? (sal_uInt16)GetModel()->GetAbsPos(pSel) : 0;
SwNavigationPI* pNavi = GetParentWindow();
- BOOL bReadonly = !pActiveShell ||
+ sal_Bool bReadonly = !pActiveShell ||
pActiveShell->GetView().GetDocShell()->IsReadOnly();
pNavi->aGlobalToolBox.EnableItem(FN_GLOBAL_EDIT, nSelCount == 1 && !bReadonly);
pNavi->aGlobalToolBox.EnableItem(FN_GLOBAL_OPEN, nSelCount <= 1 && !bReadonly);
@@ -570,7 +570,7 @@ void SwGlobalTree::SelectHdl()
pNavi->aGlobalToolBox.EnableItem(FN_ITEM_UP,
nSelCount == 1 && nAbsPos && !bReadonly);
pNavi->aGlobalToolBox.EnableItem(FN_ITEM_DOWN,
- nSelCount == 1 && nAbsPos < ((USHORT)GetEntryCount()) - 1 && !bReadonly);
+ nSelCount == 1 && nAbsPos < ((sal_uInt16)GetEntryCount()) - 1 && !bReadonly);
}
/*-----------------16.06.97 16:15-------------------
@@ -587,7 +587,7 @@ void SwGlobalTree::DeselectHdl()
DragDropMode SwGlobalTree::NotifyStartDrag( TransferDataContainer& ,
SvLBoxEntry* pEntry )
{
- bIsInternalDrag = TRUE;
+ bIsInternalDrag = sal_True;
pDDSource = pEntry;
return SV_DRAGDROP_CTRL_MOVE;
}
@@ -603,37 +603,37 @@ long SwGlobalTree::GetTabPos( SvLBoxEntry*, SvLBoxTab* pTab)
/*-----------------12.06.97 09:38-------------------
--------------------------------------------------*/
-BOOL SwGlobalTree::NotifyMoving( SvLBoxEntry* pTarget,
+sal_Bool SwGlobalTree::NotifyMoving( SvLBoxEntry* pTarget,
SvLBoxEntry* pSource,
SvLBoxEntry*&,
- ULONG&
+ sal_uLong&
)
{
SvTreeList* _pModel = GetModel();
- USHORT nSource = (USHORT) _pModel->GetAbsPos(pSource);
- USHORT nDest = pTarget ? (USHORT) _pModel->GetAbsPos(pTarget) : pSwGlblDocContents->Count();
+ sal_uInt16 nSource = (sal_uInt16) _pModel->GetAbsPos(pSource);
+ sal_uInt16 nDest = pTarget ? (sal_uInt16) _pModel->GetAbsPos(pTarget) : pSwGlblDocContents->Count();
if( pActiveShell->MoveGlobalDocContent(
*pSwGlblDocContents, nSource, nSource + 1, nDest ) &&
- Update( FALSE ))
+ Update( sal_False ))
Display();
- return FALSE;
+ return sal_False;
}
/*-----------------12.06.97 09:39-------------------
--------------------------------------------------*/
-BOOL SwGlobalTree::NotifyCopying( SvLBoxEntry* /*pTarget*/,
+sal_Bool SwGlobalTree::NotifyCopying( SvLBoxEntry* /*pTarget*/,
SvLBoxEntry* /*pEntry*/,
SvLBoxEntry*& /*rpNewParent*/,
- ULONG& /*rNewChildPos*/
+ sal_uLong& /*rNewChildPos*/
)
{
- return FALSE;
+ return sal_False;
}
/*-----------------12.06.97 09:39-------------------
--------------------------------------------------*/
-BOOL SwGlobalTree::NotifyAcceptDrop( SvLBoxEntry* pEntry)
+sal_Bool SwGlobalTree::NotifyAcceptDrop( SvLBoxEntry* pEntry)
{
return pEntry != 0;
}
@@ -651,7 +651,7 @@ void SwGlobalTree::StartDrag( sal_Int8 nAction, const Point& rPt )
void SwGlobalTree::DragFinished( sal_Int8 nAction )
{
SvTreeListBox::DragFinished( nAction );
- bIsInternalDrag = FALSE;
+ bIsInternalDrag = sal_False;
}
/***************************************************************************
@@ -661,7 +661,7 @@ void SwGlobalTree::DragFinished( sal_Int8 nAction )
void SwGlobalTree::MouseButtonDown( const MouseEvent& rMEvt )
{
Point aPos( rMEvt.GetPosPixel());
- SvLBoxEntry* pEntry = GetEntry( aPos, TRUE );
+ SvLBoxEntry* pEntry = GetEntry( aPos, sal_True );
if( !pEntry && rMEvt.IsLeft() && rMEvt.IsMod1() && (rMEvt.GetClicks() % 2) == 0)
Control::MouseButtonDown( rMEvt );
else
@@ -673,7 +673,7 @@ void SwGlobalTree::MouseButtonDown( const MouseEvent& rMEvt )
--------------------------------------------------*/
void SwGlobalTree::GetFocus()
{
- if(Update( FALSE ))
+ if(Update( sal_False ))
Display();
SvTreeListBox::GetFocus();
}
@@ -709,19 +709,19 @@ void SwGlobalTree::Clear()
/*-----------------12.06.97 12:38-------------------
--------------------------------------------------*/
-void SwGlobalTree::Display(BOOL bOnlyUpdateUserData)
+void SwGlobalTree::Display(sal_Bool bOnlyUpdateUserData)
{
if(!bIsImageListInitialized)
{
- USHORT nResId = GetSettings().GetStyleSettings().GetHighContrastMode() ? IMG_NAVI_ENTRYBMPH : IMG_NAVI_ENTRYBMP;
+ sal_uInt16 nResId = GetSettings().GetStyleSettings().GetHighContrastMode() ? IMG_NAVI_ENTRYBMPH : IMG_NAVI_ENTRYBMP;
aEntryImages = ImageList(SW_RES(nResId));
- bIsImageListInitialized = TRUE;
+ bIsImageListInitialized = sal_True;
}
- USHORT nCount = pSwGlblDocContents->Count();
+ sal_uInt16 nCount = pSwGlblDocContents->Count();
if(bOnlyUpdateUserData && GetEntryCount() == pSwGlblDocContents->Count())
{
SvLBoxEntry* pEntry = First();
- for( USHORT i = 0; i < nCount; i++)
+ for( sal_uInt16 i = 0; i < nCount; i++)
{
SwGlblDocContentPtr pCont = pSwGlblDocContents->GetObject(i);
pEntry->SetUserData(pCont);
@@ -730,21 +730,21 @@ void SwGlobalTree::Display(BOOL bOnlyUpdateUserData)
}
else
{
- SetUpdateMode( FALSE );
+ SetUpdateMode( sal_False );
SvLBoxEntry* pOldSelEntry = FirstSelected();
String sEntryName; // Name des Eintrags
- USHORT nSelPos = USHRT_MAX;
+ sal_uInt16 nSelPos = USHRT_MAX;
if(pOldSelEntry)
{
sEntryName = GetEntryText(pOldSelEntry);
- nSelPos = (USHORT)GetModel()->GetAbsPos(pOldSelEntry);
+ nSelPos = (sal_uInt16)GetModel()->GetAbsPos(pOldSelEntry);
}
Clear();
if(!pSwGlblDocContents)
- Update( FALSE );
+ Update( sal_False );
SvLBoxEntry* pSelEntry = 0;
- for( USHORT i = 0; i < nCount; i++)
+ for( sal_uInt16 i = 0; i < nCount; i++)
{
SwGlblDocContentPtr pCont = pSwGlblDocContents->GetObject(i);
String sEntry;
@@ -773,7 +773,7 @@ void SwGlobalTree::Display(BOOL bOnlyUpdateUserData)
break;
}
SvLBoxEntry* pEntry = InsertEntry(sEntry, aImage, aImage,
- 0, FALSE, LIST_APPEND, pCont);
+ 0, sal_False, LIST_APPEND, pCont);
if(sEntry == sEntryName)
{
pSelEntry = pEntry;
@@ -791,7 +791,7 @@ void SwGlobalTree::Display(BOOL bOnlyUpdateUserData)
Select(First());
else
SelectHdl();
- SetUpdateMode( TRUE );
+ SetUpdateMode( sal_True );
}
}
@@ -825,7 +825,7 @@ void SwGlobalTree::InsertRegion( const SwGlblDocContent* pCont, const String* pF
--------------------------------------------------*/
void SwGlobalTree::EditContent(const SwGlblDocContent* pCont )
{
- USHORT nSlot = 0;
+ sal_uInt16 nSlot = 0;
switch( pCont->GetType() )
{
case GLBLDOC_UNKNOWN:
@@ -852,7 +852,7 @@ void SwGlobalTree::EditContent(const SwGlblDocContent* pCont )
if(nSlot)
{
pActiveShell->GetView().GetViewFrame()->GetDispatcher()->Execute(nSlot);
- if(Update( FALSE ))
+ if(Update( sal_False ))
Display();
}
}
@@ -863,15 +863,15 @@ void SwGlobalTree::EditContent(const SwGlblDocContent* pCont )
IMPL_LINK( SwGlobalTree, PopupHdl, Menu* , pMenu)
{
ExcecuteContextMenuAction( pMenu->GetCurItemId());
- return TRUE;
+ return sal_True;
}
/* -----------------26.08.2003 11:57-----------------
--------------------------------------------------*/
-void SwGlobalTree::ExcecuteContextMenuAction( USHORT nSelectedPopupEntry )
+void SwGlobalTree::ExcecuteContextMenuAction( sal_uInt16 nSelectedPopupEntry )
//IMPL_LINK( SwGlobalTree, PopupHdl, Menu* , pMenu)
{
-// USHORT nId = pMenu->GetCurItemId();
+// sal_uInt16 nId = pMenu->GetCurItemId();
SvLBoxEntry* pEntry = FirstSelected();
SwGlblDocContent* pCont = pEntry ? (SwGlblDocContent*)pEntry->GetUserData() : 0;
// wird waehrend des Dialogs ein RequestHelp gerufen,
@@ -881,7 +881,7 @@ void SwGlobalTree::ExcecuteContextMenuAction( USHORT nSelectedPopupEntry )
if(pCont)
pContCopy = new SwGlblDocContent(pCont->GetDocPos());
SfxDispatcher& rDispatch = *pActiveShell->GetView().GetViewFrame()->GetDispatcher();
- USHORT nSlot = 0;
+ sal_uInt16 nSlot = 0;
bool bDeleteContentCopy = true;
switch( nSelectedPopupEntry )
{
@@ -920,7 +920,7 @@ void SwGlobalTree::ExcecuteContextMenuAction( USHORT nSelectedPopupEntry )
case CTX_UPDATE_LINK:
case CTX_UPDATE_ALL:
{
- pActiveShell->GetLinkManager().UpdateAllLinks(TRUE);
+ pActiveShell->GetLinkManager().UpdateAllLinks(sal_True);
if(CTX_UPDATE_ALL == nSelectedPopupEntry)
nSlot = FN_UPDATE_TOX;
pCont = 0;
@@ -952,7 +952,7 @@ void SwGlobalTree::ExcecuteContextMenuAction( USHORT nSelectedPopupEntry )
{
pActiveShell->DeleteGlobalDocContent(
pTempContents ? *pTempContents : *pSwGlblDocContents,
- (USHORT)GetModel()->GetAbsPos(pSelEntry));
+ (sal_uInt16)GetModel()->GetAbsPos(pSelEntry));
pSelEntry = PrevSelected(pSelEntry);
if(pSelEntry)
{
@@ -987,7 +987,7 @@ void SwGlobalTree::ExcecuteContextMenuAction( USHORT nSelectedPopupEntry )
*pActiveShell,
0,
USHRT_MAX,
- TRUE);
+ sal_True);
DBG_ASSERT(pDlg, "Dialogdiet fail!");
if(RET_OK == pDlg->Execute())
{
@@ -1016,7 +1016,7 @@ void SwGlobalTree::ExcecuteContextMenuAction( USHORT nSelectedPopupEntry )
SfxViewFrame* pGlobFrm = pActiveShell->GetView().GetViewFrame();
SwGlobalFrameListener_Impl aFrmListener(*pGlobFrm);
- ULONG nEntryPos = pEntry ? GetModel()->GetAbsPos(pEntry) : (ULONG)-1;
+ sal_uLong nEntryPos = pEntry ? GetModel()->GetAbsPos(pEntry) : (sal_uLong)-1;
// neues Dok anlegen
SfxStringItem aFactory(SID_NEWDOCDIRECT,
SwDocShell::Factory().GetFilterContainer()->GetName());
@@ -1043,9 +1043,9 @@ void SwGlobalTree::ExcecuteContextMenuAction( USHORT nSelectedPopupEntry )
{
pGlobFrm->ToTop();
// durch das Update sind die Eintraege invalid
- if(nEntryPos != (ULONG)-1)
+ if(nEntryPos != (sal_uLong)-1)
{
- Update( FALSE );
+ Update( sal_False );
Display();
Select(GetModel()->GetEntryAtAbsPos(nEntryPos));
pEntry = FirstSelected();
@@ -1080,7 +1080,7 @@ void SwGlobalTree::ExcecuteContextMenuAction( USHORT nSelectedPopupEntry )
else
{
pActiveShell->SplitNode(); // leeres Dokument
- pActiveShell->Up( FALSE, 1 );
+ pActiveShell->Up( sal_False, 1 );
}
pActiveShell->GetView().GetEditWin().GrabFocus();
}
@@ -1095,13 +1095,13 @@ void SwGlobalTree::ExcecuteContextMenuAction( USHORT nSelectedPopupEntry )
GotoContent(pCont);
if(nSlot)
rDispatch.Execute(nSlot);
- if(Update( FALSE ))
+ if(Update( sal_False ))
Display();
if ( bDeleteContentCopy )
delete pContCopy;
else
bDeleteContentCopy = true;
-// return TRUE;
+// return sal_True;
}
/*-----------------16.06.97 07:57-------------------
@@ -1109,7 +1109,7 @@ void SwGlobalTree::ExcecuteContextMenuAction( USHORT nSelectedPopupEntry )
--------------------------------------------------*/
IMPL_LINK( SwGlobalTree, Timeout, Timer*, EMPTYARG )
{
- if(!HasFocus() && Update( FALSE ))
+ if(!HasFocus() && Update( sal_False ))
Display();
return 0;
}
@@ -1157,7 +1157,7 @@ void SwGlobalTree::HideTree()
/*-----------------18.06.97 10:02-------------------
--------------------------------------------------*/
-void SwGlobalTree::ExecCommand(USHORT nCmd)
+void SwGlobalTree::ExecCommand(sal_uInt16 nCmd)
{
SvLBoxEntry* pEntry = FirstSelected();
DBG_ASSERT(pEntry, "gleich knallt's");
@@ -1171,14 +1171,14 @@ void SwGlobalTree::ExecCommand(USHORT nCmd)
{
if(GetSelectionCount() == 1)
{
- BOOL bMove = FALSE;
- USHORT nSource = (USHORT)GetModel()->GetAbsPos(pEntry);
- USHORT nDest = nSource;
+ sal_Bool bMove = sal_False;
+ sal_uInt16 nSource = (sal_uInt16)GetModel()->GetAbsPos(pEntry);
+ sal_uInt16 nDest = nSource;
switch(nCmd)
{
case FN_ITEM_DOWN:
{
- USHORT nEntryCount = (USHORT)GetEntryCount();
+ sal_uInt16 nEntryCount = (sal_uInt16)GetEntryCount();
bMove = nEntryCount > nSource + 1;
nDest+= 2;
}
@@ -1193,7 +1193,7 @@ void SwGlobalTree::ExecCommand(USHORT nCmd)
}
if( bMove && pActiveShell->MoveGlobalDocContent(
*pSwGlblDocContents, nSource, nSource + 1, nDest ) &&
- Update( FALSE ))
+ Update( sal_False ))
Display();
}
}
@@ -1202,10 +1202,10 @@ void SwGlobalTree::ExecCommand(USHORT nCmd)
/*-----------------16.06.97 07:43-------------------
--------------------------------------------------*/
-BOOL SwGlobalTree::Update(BOOL bHard)
+sal_Bool SwGlobalTree::Update(sal_Bool bHard)
{
SwView* pActView = GetParentWindow()->GetCreateView();
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if(pActView && pActView->GetWrtShellPtr())
{
const SwWrtShell* pOldShell = pActiveShell;
@@ -1218,23 +1218,23 @@ BOOL SwGlobalTree::Update(BOOL bHard)
if(!pSwGlblDocContents)
{
pSwGlblDocContents = new SwGlblDocContents;
- bRet = TRUE;
+ bRet = sal_True;
pActiveShell->GetGlobalDocContent(*pSwGlblDocContents);
}
else
{
- BOOL bCopy = FALSE;
+ sal_Bool bCopy = sal_False;
SwGlblDocContents* pTempContents = new SwGlblDocContents;
pActiveShell->GetGlobalDocContent(*pTempContents);
if(pTempContents->Count() != pSwGlblDocContents->Count() ||
pTempContents->Count() != GetEntryCount())
{
- bRet = TRUE;
- bCopy = TRUE;
+ bRet = sal_True;
+ bCopy = sal_True;
}
else
{
- for(USHORT i = 0; i < pTempContents->Count() && !bCopy; i++)
+ for(sal_uInt16 i = 0; i < pTempContents->Count() && !bCopy; i++)
{
SwGlblDocContent* pLeft = pTempContents->GetObject(i);
SwGlblDocContent* pRight = pSwGlblDocContents->GetObject(i);
@@ -1253,13 +1253,13 @@ BOOL SwGlobalTree::Update(BOOL bHard)
)
)
{
- bCopy = bRet = TRUE;
+ bCopy = bRet = sal_True;
}
}
}
if(bCopy || bHard)
{
- USHORT i;
+ sal_uInt16 i;
pSwGlblDocContents->DeleteAndDestroy(0, pSwGlblDocContents->Count());
for( i = 0; i < pTempContents->Count(); i++)
@@ -1291,14 +1291,14 @@ void SwGlobalTree::OpenDoc(const SwGlblDocContent* pCont)
{
String sFileName(pCont->GetSection()->GetLinkFileName().GetToken(0,
sfx2::cTokenSeperator));
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
const SfxObjectShell* pCurr = SfxObjectShell::GetFirst();
while( !bFound && pCurr )
{
if(pCurr->GetMedium() &&
String(pCurr->GetMedium()->GetURLObject().GetMainURL(INetURLObject::DECODE_TO_IURI)) == sFileName)
{
- bFound = TRUE;
+ bFound = sal_True;
SwGlobalTree::SetShowShell(pCurr);
Application::PostUserEvent( STATIC_LINK(
this, SwGlobalTree, ShowFrameHdl ) );
@@ -1311,7 +1311,7 @@ void SwGlobalTree::OpenDoc(const SwGlblDocContent* pCont)
{
SfxStringItem aURL(SID_FILE_NAME,
sFileName);
- SfxBoolItem aReadOnly(SID_DOC_READONLY, FALSE);
+ SfxBoolItem aReadOnly(SID_DOC_READONLY, sal_False);
SfxStringItem aTargetFrameName( SID_TARGETNAME, String::CreateFromAscii("_blank") );
SfxStringItem aReferer(SID_REFERER, pActiveShell->GetView().GetDocShell()->GetTitle());
pActiveShell->GetView().GetViewFrame()->GetDispatcher()->
@@ -1354,7 +1354,7 @@ void SwGlobalTree::InitEntry(SvLBoxEntry* pEntry,
const XubString& rStr ,const Image& rImg1,const Image& rImg2,
SvLBoxButtonKind eButtonKind)
{
- USHORT nColToHilite = 1; //0==Bitmap;1=="Spalte1";2=="Spalte2"
+ sal_uInt16 nColToHilite = 1; //0==Bitmap;1=="Spalte1";2=="Spalte2"
SvTreeListBox::InitEntry( pEntry, rStr, rImg1, rImg2, eButtonKind );
SvLBoxString* pCol = (SvLBoxString*)pEntry->GetItem( nColToHilite );
SwLBoxString* pStr = new SwLBoxString( pEntry, 0, pCol->GetText() );
@@ -1364,7 +1364,7 @@ void SwGlobalTree::InitEntry(SvLBoxEntry* pEntry,
*
* --------------------------------------------------*/
-void SwLBoxString::Paint( const Point& rPos, SvLBox& rDev, USHORT nFlags,
+void SwLBoxString::Paint( const Point& rPos, SvLBox& rDev, sal_uInt16 nFlags,
SvLBoxEntry* pEntry )
{
SwGlblDocContent* pCont = (SwGlblDocContent*)pEntry->GetUserData();
@@ -1391,7 +1391,7 @@ void SwGlobalTree::DataChanged( const DataChangedEvent& rDCEvt )
if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) &&
(rDCEvt.GetFlags() & SETTINGS_STYLE) )
{
- USHORT nResId = GetSettings().GetStyleSettings().GetHighContrastMode() ? IMG_NAVI_ENTRYBMPH : IMG_NAVI_ENTRYBMP;
+ sal_uInt16 nResId = GetSettings().GetStyleSettings().GetHighContrastMode() ? IMG_NAVI_ENTRYBMPH : IMG_NAVI_ENTRYBMP;
aEntryImages = ImageList(SW_RES(nResId));
Update(sal_True);
}
@@ -1403,24 +1403,24 @@ void SwGlobalTree::InsertRegion( const SwGlblDocContent* _pContent, const Sequen
sal_Int32 nFiles = _rFiles.getLength();
if ( nFiles )
{
- BOOL bMove = FALSE;
+ sal_Bool bMove = sal_False;
if ( !_pContent )
{
SvLBoxEntry* pLast = (SvLBoxEntry*)LastVisible();
_pContent = (SwGlblDocContent*)pLast->GetUserData();
- bMove = TRUE;
+ bMove = sal_True;
}
String sFilePassword;
- USHORT nEntryCount = (USHORT)GetEntryCount();
+ sal_uInt16 nEntryCount = (sal_uInt16)GetEntryCount();
const OUString* pFileNames = _rFiles.getConstArray();
SwWrtShell& rSh = GetParentWindow()->GetCreateView()->GetWrtShell();
rSh.StartAction();
// after insertion of the first new content the 'pCont' parameter becomes invalid
// find the index of the 'anchor' content to always use a current anchor content
- USHORT nAnchorContent = pSwGlblDocContents->Count() - 1;
+ sal_uInt16 nAnchorContent = pSwGlblDocContents->Count() - 1;
if ( !bMove )
{
- for( USHORT nContent = 0; nContent < pSwGlblDocContents->Count(); ++nContent )
+ for( sal_uInt16 nContent = 0; nContent < pSwGlblDocContents->Count(); ++nContent )
{
if( *_pContent == *pSwGlblDocContents->GetObject( nContent ) )
{
@@ -1437,7 +1437,7 @@ void SwGlobalTree::InsertRegion( const SwGlblDocContent* _pContent, const Sequen
SwGlblDocContent* pAnchorContent = 0;
DBG_ASSERT(aTempContents.Count() > (nAnchorContent + nFile), "invalid anchor content -> last insertion failed");
if ( aTempContents.Count() > (nAnchorContent + nFile) )
- pAnchorContent = aTempContents.GetObject(nAnchorContent + (USHORT)nFile);
+ pAnchorContent = aTempContents.GetObject(nAnchorContent + (sal_uInt16)nFile);
else
pAnchorContent = aTempContents.GetObject(aTempContents.Count() - 1);
String sFileName(pFileNames[nFile]);
@@ -1446,10 +1446,10 @@ void SwGlobalTree::InsertRegion( const SwGlblDocContent* _pContent, const Sequen
String sSectionName(String(aFileUrl.GetLastName(
INetURLObject::DECODE_UNAMBIGUOUS)).GetToken(0,
sfx2::cTokenSeperator));
- USHORT nSectCount = rSh.GetSectionFmtCount();
+ sal_uInt16 nSectCount = rSh.GetSectionFmtCount();
String sTempSectionName(sSectionName);
- USHORT nAddNumber = 0;
- USHORT nCount = 0;
+ sal_uInt16 nAddNumber = 0;
+ sal_uInt16 nCount = 0;
// evtl : und Index anhaengen, wenn der Bereichsname schon vergeben ist
while ( nCount < nSectCount )
{
@@ -1482,12 +1482,12 @@ void SwGlobalTree::InsertRegion( const SwGlblDocContent* _pContent, const Sequen
}
if ( bMove )
{
- Update( FALSE );
+ Update( sal_False );
rSh.MoveGlobalDocContent(
- *pSwGlblDocContents, nEntryCount, nEntryCount + (USHORT)nFiles, nEntryCount - (USHORT)nFiles );
+ *pSwGlblDocContents, nEntryCount, nEntryCount + (sal_uInt16)nFiles, nEntryCount - (sal_uInt16)nFiles );
}
rSh.EndAction();
- Update( FALSE );
+ Update( sal_False );
Display();
}
}
diff --git a/sw/source/ui/utlui/gloslst.cxx b/sw/source/ui/utlui/gloslst.cxx
index a34b874a3b..bc6af5ab96 100644
--- a/sw/source/ui/utlui/gloslst.cxx
+++ b/sw/source/ui/utlui/gloslst.cxx
@@ -139,7 +139,7 @@ IMPL_LINK(SwGlossDecideDlg, SelectHdl, ListBox*, EMPTYARG)
SwGlossaryList::SwGlossaryList() :
- bFilled(FALSE)
+ bFilled(sal_False)
{
SvtPathOptions aPathOpt;
sPath = aPathOpt.GetAutoTextPath();
@@ -163,7 +163,7 @@ SwGlossaryList::~SwGlossaryList()
********************************************************************/
-BOOL SwGlossaryList::GetShortName(const String& rLongName,
+sal_Bool SwGlossaryList::GetShortName(const String& rLongName,
String& rShortName, String& rGroupName )
{
if(!bFilled)
@@ -171,13 +171,13 @@ BOOL SwGlossaryList::GetShortName(const String& rLongName,
TripleStrings aTripleStrings;
- USHORT nCount = aGroupArr.Count();
- USHORT nFound = 0;
- for(USHORT i = 0; i < nCount; i++ )
+ sal_uInt16 nCount = aGroupArr.Count();
+ sal_uInt16 nFound = 0;
+ for(sal_uInt16 i = 0; i < nCount; i++ )
{
AutoTextGroup* pGroup = aGroupArr.GetObject(i);
if(!rGroupName.Len() || rGroupName == pGroup->sName)
- for(USHORT j = 0; j < pGroup->nCount; j++)
+ for(sal_uInt16 j = 0; j < pGroup->nCount; j++)
{
String sLong = pGroup->sLongNames.GetToken(j, STRING_DELIM);
if((rLongName == sLong))
@@ -191,14 +191,14 @@ BOOL SwGlossaryList::GetShortName(const String& rLongName,
}
}
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
nCount = aTripleStrings.Count();
if(1 == nCount )
{
TripleString* pTriple = aTripleStrings[0];
rShortName = pTriple->sShort;
rGroupName = pTriple->sGroup;
- bRet = TRUE;
+ bRet = sal_True;
}
else if(1 < nCount)
{
@@ -209,7 +209,7 @@ BOOL SwGlossaryList::GetShortName(const String& rLongName,
aDlg.SetText(sTitle);
ListBox& rLB = aDlg.GetListBox();
- for(USHORT i = 0; i < nCount; i++ )
+ for(sal_uInt16 i = 0; i < nCount; i++ )
rLB.InsertEntry(aTripleStrings[i]->sGroup.GetToken(0, GLOS_DELIM));
rLB.SelectEntryPos(0);
@@ -219,10 +219,10 @@ BOOL SwGlossaryList::GetShortName(const String& rLongName,
TripleString* pTriple = aTripleStrings[rLB.GetSelectEntryPos()];
rShortName = pTriple->sShort;
rGroupName = pTriple->sGroup;
- bRet = TRUE;
+ bRet = sal_True;
}
else
- bRet = FALSE;
+ bRet = sal_False;
}
return bRet;
}
@@ -232,7 +232,7 @@ BOOL SwGlossaryList::GetShortName(const String& rLongName,
********************************************************************/
-USHORT SwGlossaryList::GetGroupCount()
+sal_uInt16 SwGlossaryList::GetGroupCount()
{
if(!bFilled)
Update();
@@ -244,7 +244,7 @@ USHORT SwGlossaryList::GetGroupCount()
********************************************************************/
-String SwGlossaryList::GetGroupName(USHORT nPos, BOOL bNoPath, String* pTitle)
+String SwGlossaryList::GetGroupName(sal_uInt16 nPos, sal_Bool bNoPath, String* pTitle)
{
DBG_ASSERT(aGroupArr.Count() > nPos, "Gruppe nicht vorhanden");
String sRet(aEmptyStr);
@@ -266,7 +266,7 @@ String SwGlossaryList::GetGroupName(USHORT nPos, BOOL bNoPath, String* pTitle)
********************************************************************/
-USHORT SwGlossaryList::GetBlockCount(USHORT nGroup)
+sal_uInt16 SwGlossaryList::GetBlockCount(sal_uInt16 nGroup)
{
DBG_ASSERT(aGroupArr.Count() > nGroup, "Gruppe nicht vorhanden");
if(nGroup < aGroupArr.Count())
@@ -282,7 +282,7 @@ USHORT SwGlossaryList::GetBlockCount(USHORT nGroup)
********************************************************************/
-String SwGlossaryList::GetBlockName(USHORT nGroup, USHORT nBlock, String& rShortName)
+String SwGlossaryList::GetBlockName(sal_uInt16 nGroup, sal_uInt16 nBlock, String& rShortName)
{
DBG_ASSERT(aGroupArr.Count() > nGroup, "Gruppe nicht vorhanden");
if(nGroup < aGroupArr.Count())
@@ -309,7 +309,7 @@ void SwGlossaryList::Update()
if(sTemp != sPath)
{
sPath = sTemp;
- bFilled = FALSE;
+ bFilled = sal_False;
ClearGroups();
}
SwGlossaries* pGlossaries = ::GetGlossaries();
@@ -317,11 +317,11 @@ void SwGlossaryList::Update()
String sExt( SwGlossaries::GetExtension() );
if(!bFilled)
{
- USHORT nGroupCount = pGlossaries->GetGroupCnt();
- for(USHORT i = 0; i < nGroupCount; i++)
+ sal_uInt16 nGroupCount = pGlossaries->GetGroupCnt();
+ for(sal_uInt16 i = 0; i < nGroupCount; i++)
{
String sGrpName = pGlossaries->GetGroupName(i);
- USHORT nPath = (USHORT)sGrpName.GetToken(1, GLOS_DELIM).ToInt32();
+ sal_uInt16 nPath = (sal_uInt16)sGrpName.GetToken(1, GLOS_DELIM).ToInt32();
if(nPath < pPathArr->Count())
{
AutoTextGroup* pGroup = new AutoTextGroup;
@@ -340,11 +340,11 @@ void SwGlossaryList::Update()
aGroupArr.Insert( pGroup, i );
}
}
- bFilled = TRUE;
+ bFilled = sal_True;
}
else
{
- for(USHORT nPath = 0; nPath < pPathArr->Count(); nPath++)
+ for(sal_uInt16 nPath = 0; nPath < pPathArr->Count(); nPath++)
{
SvStringsDtor aFoundGroupNames;
SvStrings aFiles( 16, 16 );
@@ -352,7 +352,7 @@ void SwGlossaryList::Update()
SWUnoHelper::UCB_GetFileListOfFolder( *(*pPathArr)[nPath], aFiles,
&sExt, &aDateTimeArr );
- for( USHORT nFiles = 0, nFEnd = aFiles.Count();
+ for( sal_uInt16 nFiles = 0, nFEnd = aFiles.Count();
nFiles < nFEnd; ++nFiles )
{
String* pTitle = aFiles[ nFiles ];
@@ -385,20 +385,20 @@ void SwGlossaryList::Update()
delete pDT;
}
- USHORT nArrCount = aGroupArr.Count();
- for( USHORT i = nArrCount; i; --i)
+ sal_uInt16 nArrCount = aGroupArr.Count();
+ for( sal_uInt16 i = nArrCount; i; --i)
{
// evtl. geloeschte Gruppen entfernen
AutoTextGroup* pGroup = aGroupArr.GetObject(i - 1);
- USHORT nGroupPath = (USHORT)pGroup->sName.GetToken( 1,
+ sal_uInt16 nGroupPath = (sal_uInt16)pGroup->sName.GetToken( 1,
GLOS_DELIM).ToInt32();
// nur die Gruppen werden geprueft, die fuer den
// aktuellen Teilpfad registriert sind
if(nGroupPath == nPath)
{
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
String sCompareGroup = pGroup->sName.GetToken(0, GLOS_DELIM);
- for( USHORT j = 0; j < aFoundGroupNames.Count() && !bFound; ++j)
+ for( sal_uInt16 j = 0; j < aFoundGroupNames.Count() && !bFound; ++j)
{
bFound = sCompareGroup == *aFoundGroupNames[j];
}
@@ -432,7 +432,7 @@ void SwGlossaryList::Timeout()
AutoTextGroup* SwGlossaryList::FindGroup(const String& rGroupName)
{
- for(USHORT i = 0; i < aGroupArr.Count(); i++)
+ for(sal_uInt16 i = 0; i < aGroupArr.Count(); i++)
{
AutoTextGroup* pRet = aGroupArr.GetObject(i);
if(pRet->sName == rGroupName)
@@ -454,7 +454,7 @@ void SwGlossaryList::FillGroup(AutoTextGroup* pGroup, SwGlossaries* pGlossaries)
if(pBlock)
pGroup->sTitle = pBlock->GetName();
- for(USHORT j = 0; j < pGroup->nCount; j++)
+ for(sal_uInt16 j = 0; j < pGroup->nCount; j++)
{
pGroup->sLongNames += pBlock->GetLongName(j);
pGroup->sLongNames += STRING_DELIM;
@@ -469,19 +469,19 @@ void SwGlossaryList::FillGroup(AutoTextGroup* pGroup, SwGlossaries* pGlossaries)
passendem Anfang zurueckgeben
********************************************************************/
-BOOL SwGlossaryList::HasLongName(const String& rBegin, SvStringsISortDtor* pLongNames )
+sal_Bool SwGlossaryList::HasLongName(const String& rBegin, SvStringsISortDtor* pLongNames )
{
if(!bFilled)
Update();
- USHORT nFound = 0;
- USHORT nCount = aGroupArr.Count();
- USHORT nBeginLen = rBegin.Len();
+ sal_uInt16 nFound = 0;
+ sal_uInt16 nCount = aGroupArr.Count();
+ sal_uInt16 nBeginLen = rBegin.Len();
const ::utl::TransliterationWrapper& rSCmp = GetAppCmpStrIgnore();
- for(USHORT i = 0; i < nCount; i++ )
+ for(sal_uInt16 i = 0; i < nCount; i++ )
{
AutoTextGroup* pGroup = aGroupArr.GetObject(i);
- for(USHORT j = 0; j < pGroup->nCount; j++)
+ for(sal_uInt16 j = 0; j < pGroup->nCount; j++)
{
String sBlock = pGroup->sLongNames.GetToken(j, STRING_DELIM);
if( rSCmp.isEqual( sBlock.Copy(0, nBeginLen), rBegin ) &&
@@ -503,12 +503,12 @@ BOOL SwGlossaryList::HasLongName(const String& rBegin, SvStringsISortDtor* pLong
********************************************************************/
void SwGlossaryList::ClearGroups()
{
- USHORT nCount = aGroupArr.Count();
- for( USHORT i = 0; i < nCount; ++i )
+ sal_uInt16 nCount = aGroupArr.Count();
+ for( sal_uInt16 i = 0; i < nCount; ++i )
delete aGroupArr.GetObject( i );
aGroupArr.Remove( 0, nCount );
- bFilled = FALSE;
+ bFilled = sal_False;
}
diff --git a/sw/source/ui/utlui/initui.cxx b/sw/source/ui/utlui/initui.cxx
index c4147c3910..ab4a47856d 100644
--- a/sw/source/ui/utlui/initui.cxx
+++ b/sw/source/ui/utlui/initui.cxx
@@ -181,7 +181,7 @@ ShellResource::ShellResource()
sPageDescFollowName( SW_RES(STR_PAGEDESC_FOLLOWNAME)),
sPageDescName( SW_RES(STR_PAGEDESC_NAME))
{
- const USHORT nCount = FLD_DOCINFO_END - FLD_DOCINFO_BEGIN;
+ const sal_uInt16 nCount = FLD_DOCINFO_END - FLD_DOCINFO_BEGIN;
KeyCode aCode( KEY_SPACE );
KeyCode aModifiedCode( KEY_SPACE, KEY_MOD1 );
@@ -190,7 +190,7 @@ ShellResource::ShellResource()
aModStr.SearchAndReplaceAllAscii( "+", String() );
aHyperlinkClick.SearchAndReplaceAllAscii( "%s", aModStr );
- for(USHORT i = 0; i < nCount; ++i)
+ for(sal_uInt16 i = 0; i < nCount; ++i)
{
String* pNew = new SW_RESSTR(FLD_DOCINFO_BEGIN + i);
aDocInfoLst.Insert(pNew, aDocInfoLst.Count());
@@ -205,7 +205,7 @@ ShellResource::~ShellResource()
delete pAutoFmtNameLst, pAutoFmtNameLst = 0;
}
-String ShellResource::GetPageDescName( USHORT nNo, BOOL bIsFirst, BOOL bFollow )
+String ShellResource::GetPageDescName( sal_uInt16 nNo, sal_Bool bIsFirst, sal_Bool bFollow )
{
String sRet( bIsFirst ? sPageDescFirstName
: bFollow ? sPageDescFollowName
@@ -222,7 +222,7 @@ SwGlossaries* GetGlossaries()
return (pGlossaries);
}
-BOOL HasGlossaryList()
+sal_Bool HasGlossaryList()
{
return pGlossaryList != 0;
}
@@ -250,7 +250,7 @@ void ShellResource::_GetAutoFmtNameLst() const
ImpAutoFmtNameListLoader::ImpAutoFmtNameListLoader( SvStringsDtor& rLst )
: Resource( ResId(RID_SHELLRES_AUTOFMTSTRS, *pSwResMgr) )
{
- for( USHORT n = 0; n < STR_AUTOFMTREDL_END; ++n )
+ for( sal_uInt16 n = 0; n < STR_AUTOFMTREDL_END; ++n )
{
String* p = new String( ResId( n + 1, *pSwResMgr) );
if(STR_AUTOFMTREDL_TYPO == n)
@@ -279,13 +279,13 @@ const String& SwAuthorityFieldType::GetAuthFieldName(ToxAuthorityField eType)
if(!pAuthFieldNameList)
{
pAuthFieldNameList = new SvStringsDtor(AUTH_FIELD_END, 1);
- for(USHORT i = 0; i < AUTH_FIELD_END; i++)
+ for(sal_uInt16 i = 0; i < AUTH_FIELD_END; i++)
{
String* pTmp = new String(SW_RES(STR_AUTH_FIELD_START + i));
pAuthFieldNameList->Insert(pTmp, pAuthFieldNameList->Count());
}
}
- return *pAuthFieldNameList->GetObject( static_cast< USHORT >(eType) );
+ return *pAuthFieldNameList->GetObject( static_cast< sal_uInt16 >(eType) );
}
/* -----------------16.09.99 12:29-------------------
@@ -295,12 +295,12 @@ const String& SwAuthorityFieldType::GetAuthTypeName(ToxAuthorityType eType)
if(!pAuthFieldTypeList)
{
pAuthFieldTypeList = new SvStringsDtor(AUTH_TYPE_END, 1);
- for(USHORT i = 0; i < AUTH_TYPE_END; i++)
+ for(sal_uInt16 i = 0; i < AUTH_TYPE_END; i++)
pAuthFieldTypeList->Insert(
new String(SW_RES(STR_AUTH_TYPE_START + i)),
pAuthFieldTypeList->Count());
}
- return *pAuthFieldTypeList->GetObject( static_cast< USHORT >(eType) );
+ return *pAuthFieldTypeList->GetObject( static_cast< sal_uInt16 >(eType) );
}
diff --git a/sw/source/ui/utlui/navicfg.cxx b/sw/source/ui/utlui/navicfg.cxx
index d822ee3761..227b98abff 100644
--- a/sw/source/ui/utlui/navicfg.cxx
+++ b/sw/source/ui/utlui/navicfg.cxx
@@ -77,8 +77,8 @@ SwNavigationConfig::SwNavigationConfig() :
nOutlineLevel(MAXLEVEL),
nRegionMode(REGION_MODE_NONE),
nActiveBlock(0),
- bIsSmall(FALSE),
- bIsGlobalActive(TRUE)
+ bIsSmall(sal_False),
+ bIsGlobalActive(sal_True)
{
Sequence<OUString> aNames = GetPropertyNames();
Sequence<Any> aValues = GetProperties(aNames);
diff --git a/sw/source/ui/utlui/navipi.cxx b/sw/source/ui/utlui/navipi.cxx
index f600db6b64..5a6a9eed58 100644
--- a/sw/source/ui/utlui/navipi.cxx
+++ b/sw/source/ui/utlui/navipi.cxx
@@ -110,7 +110,7 @@ SFX_IMPL_CHILDWINDOW_CONTEXT( SwNavigationChild, SID_NAVIGATOR, SwView )
void SwNavigationPI::CleanEntry( String& rEntry )
{
- USHORT i = rEntry.Len();
+ sal_uInt16 i = rEntry.Len();
if( i )
for( sal_Unicode* pStr = rEntry.GetBufferAccess(); i; --i, ++pStr )
if( *pStr == 10 || *pStr == 9 )
@@ -121,8 +121,8 @@ void SwNavigationPI::CleanEntry( String& rEntry )
mit und ohne Childs
------------------------------------------------------------------------*/
-void SwNavigationPI::MoveOutline(USHORT nSource, USHORT nTarget,
- BOOL bWithChilds)
+void SwNavigationPI::MoveOutline(sal_uInt16 nSource, sal_uInt16 nTarget,
+ sal_Bool bWithChilds)
{
SwView *pView = GetCreateView();
SwWrtShell &rSh = pView->GetWrtShell();
@@ -134,9 +134,9 @@ void SwNavigationPI::MoveOutline(USHORT nSource, USHORT nTarget,
short nMove = nTarget-nSource; //( nDir<0 ) ? 1 : 0 ;
rSh.GotoOutline(nSource);
if (bWithChilds)
- rSh.MakeOutlineSel(nSource, nSource, TRUE);
+ rSh.MakeOutlineSel(nSource, nSource, sal_True);
// Die selektierten Children zaehlen bei der Bewegung vorwaerts nicht mit
- USHORT nLastOutlinePos = rSh.GetOutlinePos(MAXLEVEL);
+ sal_uInt16 nLastOutlinePos = rSh.GetOutlinePos(MAXLEVEL);
if(bWithChilds && nMove > 1 &&
nLastOutlinePos < nTarget)
{
@@ -208,7 +208,7 @@ void SwNavigationPI::FillBox()
if(pContentWrtShell)
{
aContentTree.SetHiddenShell( pContentWrtShell );
- aContentTree.Display( FALSE );
+ aContentTree.Display( sal_False );
}
else
{
@@ -223,7 +223,7 @@ void SwNavigationPI::FillBox()
aContentTree.SetActiveShell(pWrtShell);
}
else
- aContentTree.Display( TRUE );
+ aContentTree.Display( sal_True );
pActContView = pView;
}
}
@@ -239,8 +239,8 @@ void SwNavigationPI::UsePage(SwWrtShell *pSh)
}
if (pSh)
{
- const USHORT nPageCnt = pSh->GetPageCnt();
- USHORT nPhyPage, nVirPage;
+ const sal_uInt16 nPageCnt = pSh->GetPageCnt();
+ sal_uInt16 nPhyPage, nVirPage;
pSh->GetPageNum(nPhyPage, nVirPage);
GetPageEdit().SetMax(nPageCnt);
@@ -256,7 +256,7 @@ void SwNavigationPI::UsePage(SwWrtShell *pSh)
IMPL_LINK( SwNavigationPI, ToolBoxSelectHdl, ToolBox *, pBox )
{
- const USHORT nCurrItemId = pBox->GetCurItemId();
+ const sal_uInt16 nCurrItemId = pBox->GetCurItemId();
SwView *pView = GetCreateView();
if (!pView)
return 1;
@@ -265,9 +265,9 @@ IMPL_LINK( SwNavigationPI, ToolBoxSelectHdl, ToolBox *, pBox )
//Standard: Unterebenen werden mitgenommen
// mit Ctrl Unterebenen nicht mitnehmen
- BOOL bOutlineWithChilds = ( KEY_MOD1 != pBox->GetModifier());
+ sal_Bool bOutlineWithChilds = ( KEY_MOD1 != pBox->GetModifier());
int nFuncId = 0;
- BOOL bFocusToDoc = FALSE;
+ sal_Bool bFocusToDoc = sal_False;
switch (nCurrItemId)
{
case FN_UP:
@@ -296,14 +296,14 @@ IMPL_LINK( SwNavigationPI, ToolBoxSelectHdl, ToolBox *, pBox )
_ZoomIn();
}
}
- return TRUE;
+ return sal_True;
//break;
// Funktionen, die eine direkte Aktion ausloesen
case FN_SELECT_FOOTER:
{
rSh.MoveCrsr();
- const USHORT eType = rSh.GetFrmType(0,FALSE);
+ const sal_uInt16 eType = rSh.GetFrmType(0,sal_False);
if (eType & FRMTYPE_FOOTER)
{
if (rSh.EndPg())
@@ -311,13 +311,13 @@ IMPL_LINK( SwNavigationPI, ToolBoxSelectHdl, ToolBox *, pBox )
}
else if (rSh.GotoFooterTxt())
nFuncId = FN_TO_FOOTER;
- bFocusToDoc = TRUE;
+ bFocusToDoc = sal_True;
}
break;
case FN_SELECT_HEADER:
{
rSh.MoveCrsr();
- const USHORT eType = rSh.GetFrmType(0,FALSE);
+ const sal_uInt16 eType = rSh.GetFrmType(0,sal_False);
if (eType & FRMTYPE_HEADER)
{
if (rSh.SttPg())
@@ -325,13 +325,13 @@ IMPL_LINK( SwNavigationPI, ToolBoxSelectHdl, ToolBox *, pBox )
}
else if (rSh.GotoHeaderTxt())
nFuncId = FN_TO_HEADER;
- bFocusToDoc = TRUE;
+ bFocusToDoc = sal_True;
}
break;
case FN_SELECT_FOOTNOTE:
{
rSh.MoveCrsr();
- const USHORT eFrmType = rSh.GetFrmType(0,FALSE);
+ const sal_uInt16 eFrmType = rSh.GetFrmType(0,sal_False);
// aus Fussnote zum Anker springen
if (eFrmType & FRMTYPE_FOOTNOTE)
{
@@ -350,7 +350,7 @@ IMPL_LINK( SwNavigationPI, ToolBoxSelectHdl, ToolBox *, pBox )
else if (rSh.GotoPrevFtnAnchor())
nFuncId = FN_PREV_FOOTNOTE;
}
- bFocusToDoc = TRUE;
+ bFocusToDoc = sal_True;
}
break;
@@ -377,7 +377,7 @@ IMPL_LINK( SwNavigationPI, ToolBoxSelectHdl, ToolBox *, pBox )
break;
case FN_GLOBAL_SAVE_CONTENT:
{
- BOOL bSave = rSh.IsGlblDocSaveLinks();
+ sal_Bool bSave = rSh.IsGlblDocSaveLinks();
rSh.SetGlblDocSaveLinks( !bSave );
pBox->CheckItem(FN_GLOBAL_SAVE_CONTENT, !bSave );
}
@@ -390,7 +390,7 @@ IMPL_LINK( SwNavigationPI, ToolBoxSelectHdl, ToolBox *, pBox )
}
if(bFocusToDoc)
pView->GetEditWin().GrabFocus();
- return TRUE;
+ return sal_True;
}
/*------------------------------------------------------------------------
Beschreibung: ClickHandler der Toolboxen
@@ -399,7 +399,7 @@ IMPL_LINK( SwNavigationPI, ToolBoxSelectHdl, ToolBox *, pBox )
IMPL_LINK( SwNavigationPI, ToolBoxClickHdl, ToolBox *, pBox )
{
- const USHORT nCurrItemId = pBox->GetCurItemId();
+ const sal_uInt16 nCurrItemId = pBox->GetCurItemId();
switch (nCurrItemId)
{
case FN_GLOBAL_UPDATE:
@@ -410,7 +410,7 @@ IMPL_LINK( SwNavigationPI, ToolBoxClickHdl, ToolBox *, pBox )
break;
}
- return TRUE;
+ return sal_True;
}
/*-----------------13.07.04 -------------------
@@ -418,12 +418,12 @@ IMPL_LINK( SwNavigationPI, ToolBoxClickHdl, ToolBox *, pBox )
IMPL_LINK( SwNavigationPI, ToolBoxDropdownClickHdl, ToolBox*, pBox )
{
- const USHORT nCurrItemId = pBox->GetCurItemId();
+ const sal_uInt16 nCurrItemId = pBox->GetCurItemId();
switch (nCurrItemId)
{
case FN_CREATE_NAVIGATION:
{
- CreateNavigationTool(pBox->GetItemRect(FN_CREATE_NAVIGATION), TRUE);
+ CreateNavigationTool(pBox->GetItemRect(FN_CREATE_NAVIGATION), sal_True);
}
break;
@@ -436,18 +436,18 @@ IMPL_LINK( SwNavigationPI, ToolBoxDropdownClickHdl, ToolBox*, pBox )
HID_NAVI_DRAG_COPY,
};
PopupMenu *pMenu = new PopupMenu;
- for (USHORT i = 0; i <= REGION_MODE_EMBEDDED; i++)
+ for (sal_uInt16 i = 0; i <= REGION_MODE_EMBEDDED; i++)
{
pMenu->InsertItem( i + 1, aContextArr[i] );
pMenu->SetHelpId(i + 1, aHIDs[i]);
}
pMenu->CheckItem( nRegionMode + 1 );
pMenu->SetSelectHdl(LINK(this, SwNavigationPI, MenuSelectHdl));
- pBox->SetItemDown( nCurrItemId, TRUE );
+ pBox->SetItemDown( nCurrItemId, sal_True );
pMenu->Execute( pBox,
pBox->GetItemRect(FN_DROP_REGION),
POPUPMENU_EXECUTE_DOWN );
- pBox->SetItemDown( nCurrItemId, FALSE );
+ pBox->SetItemDown( nCurrItemId, sal_False );
pBox->EndSelection();
delete pMenu;
pBox->Invalidate();
@@ -456,25 +456,25 @@ IMPL_LINK( SwNavigationPI, ToolBoxDropdownClickHdl, ToolBox*, pBox )
case FN_OUTLINE_LEVEL:
{
PopupMenu *pMenu = new PopupMenu;
- for (USHORT i = 101; i <= 100 + MAXLEVEL; i++)
+ for (sal_uInt16 i = 101; i <= 100 + MAXLEVEL; i++)
{
pMenu->InsertItem( i, String::CreateFromInt32(i - 100) );
pMenu->SetHelpId( i, HID_NAVI_OUTLINES );
}
pMenu->CheckItem( aContentTree.GetOutlineLevel() + 100 );
pMenu->SetSelectHdl(LINK(this, SwNavigationPI, MenuSelectHdl));
- pBox->SetItemDown( nCurrItemId, TRUE );
+ pBox->SetItemDown( nCurrItemId, sal_True );
pMenu->Execute( pBox,
pBox->GetItemRect(FN_OUTLINE_LEVEL),
POPUPMENU_EXECUTE_DOWN );
- pBox->SetItemDown( nCurrItemId, FALSE );
+ pBox->SetItemDown( nCurrItemId, sal_False );
delete pMenu;
pBox->EndSelection();
pBox->Invalidate();
}
break;
}
- return TRUE;
+ return sal_True;
}
/*-----------------13.07.04 -------------------
@@ -491,7 +491,7 @@ void SwNavHelpToolBox::MouseButtonDown(const MouseEvent &rEvt)
if(rEvt.GetButtons() == MOUSE_LEFT &&
FN_CREATE_NAVIGATION == GetItemId(rEvt.GetPosPixel()))
{
- ((SwNavigationPI*)GetParent())->CreateNavigationTool(GetItemRect(FN_CREATE_NAVIGATION), FALSE);
+ ((SwNavigationPI*)GetParent())->CreateNavigationTool(GetItemRect(FN_CREATE_NAVIGATION), sal_False);
}
else
SwHelpToolBox::MouseButtonDown(rEvt);
@@ -499,7 +499,7 @@ void SwNavHelpToolBox::MouseButtonDown(const MouseEvent &rEvt)
/* -----------------------------12.03.2002 16:55------------------------------
---------------------------------------------------------------------------*/
-void SwNavigationPI::CreateNavigationTool(const Rectangle& rRect, BOOL bSetFocus)
+void SwNavigationPI::CreateNavigationTool(const Rectangle& rRect, sal_Bool bSetFocus)
{
// SfxBindings& rBind = GetCreateView()->GetViewFrame()->GetBindings();
// rBind.ENTERREGISTRATIONS();
@@ -527,7 +527,7 @@ void SwNavigationPI::CreateNavigationTool(const Rectangle& rRect, BOOL bSetFocus
--------------------------------------------------*/
void SwNavHelpToolBox::RequestHelp( const HelpEvent& rHEvt )
{
- USHORT nItemId = GetItemId(ScreenToOutputPixel(rHEvt.GetMousePosPixel()));
+ sal_uInt16 nItemId = GetItemId(ScreenToOutputPixel(rHEvt.GetMousePosPixel()));
if( FN_UP == nItemId || FN_DOWN == nItemId )
{
SetItemText(nItemId, SwScrollNaviPopup::GetQuickHelpText((FN_DOWN == nItemId)));
@@ -548,7 +548,7 @@ IMPL_LINK( SwNavigationPI, EditAction, NumEditAction *, pEdit )
{
if(aPageChgTimer.IsActive())
aPageChgTimer.Stop();
- pCreateView->GetWrtShell().GotoPage((USHORT)pEdit->GetValue(), TRUE);
+ pCreateView->GetWrtShell().GotoPage((sal_uInt16)pEdit->GetValue(), sal_True);
pCreateView->GetEditWin().GrabFocus();
pCreateView->GetViewFrame()->GetBindings().Invalidate(FN_STAT_PAGE);
}
@@ -568,7 +568,7 @@ IMPL_LINK( SwNavigationPI, EditGetFocus, NumEditAction *, pEdit )
return 0;
SwWrtShell &rSh = pView->GetWrtShell();
- const USHORT nPageCnt = rSh.GetPageCnt();
+ const sal_uInt16 nPageCnt = rSh.GetPageCnt();
pEdit->SetMax(nPageCnt);
pEdit->SetLast(nPageCnt);
return 0;
@@ -578,12 +578,12 @@ IMPL_LINK( SwNavigationPI, EditGetFocus, NumEditAction *, pEdit )
Beschreibung:
------------------------------------------------------------------------*/
-BOOL SwNavigationPI::Close()
+sal_Bool SwNavigationPI::Close()
{
SfxViewFrame* pVFrame = pCreateView->GetViewFrame();
pVFrame->GetBindings().Invalidate(SID_NAVIGATOR);
pVFrame->GetDispatcher()->Execute(SID_NAVIGATOR);
- return TRUE;
+ return sal_True;
}
/*------------------------------------------------------------------------
@@ -643,7 +643,7 @@ void SwNavigationPI::_ZoomOut()
if (_IsZoomedIn())
{
FloatingWindow* pFloat = pContextWin->GetFloatingWindow();
- bIsZoomedIn = FALSE;
+ bIsZoomedIn = sal_False;
Size aSz(GetOutputSizePixel());
aSz.Height() = nZoomOut;
Size aMinOutSizePixel = ((SfxDockingWindow*)GetParent())->GetMinOutputSizePixel();
@@ -662,8 +662,8 @@ void SwNavigationPI::_ZoomOut()
}
SvLBoxEntry* pFirst = aContentTree.FirstSelected();
if(pFirst)
- aContentTree.Select(pFirst, TRUE); // toolbox enablen
- pConfig->SetSmall( FALSE );
+ aContentTree.Select(pFirst, sal_True); // toolbox enablen
+ pConfig->SetSmall( sal_False );
aContentToolBox.CheckItem(FN_SHOW_CONTENT_BOX);
}
}
@@ -681,7 +681,7 @@ void SwNavigationPI::_ZoomIn()
aContentTree.HideTree();
aDocListBox.Hide();
aGlobalTree.HideTree();
- bIsZoomedIn = TRUE;
+ bIsZoomedIn = sal_True;
Size aSz(GetOutputSizePixel());
if( aSz.Height() > nZoomIn )
nZoomOut = ( short ) aSz.Height();
@@ -693,9 +693,9 @@ void SwNavigationPI::_ZoomIn()
pFloat->SetOutputSizePixel(aSz);
SvLBoxEntry* pFirst = aContentTree.FirstSelected();
if(pFirst)
- aContentTree.Select(pFirst, TRUE); // toolbox enablen
- pConfig->SetSmall( TRUE );
- aContentToolBox.CheckItem(FN_SHOW_CONTENT_BOX, FALSE);
+ aContentTree.Select(pFirst, sal_True); // toolbox enablen
+ pConfig->SetSmall( sal_True );
+ aContentToolBox.CheckItem(FN_SHOW_CONTENT_BOX, sal_False);
}
}
/*------------------------------------------------------------------------
@@ -787,10 +787,10 @@ SwNavigationPI::SwNavigationPI( SfxBindings* _pBindings,
nAutoMarkIdx(1),
nRegionMode(REGION_MODE_NONE),
- bSmallMode(FALSE),
- bIsZoomedIn(FALSE),
- bPageCtrlsVisible(FALSE),
- bGlobalMode(FALSE)
+ bSmallMode(sal_False),
+ bIsZoomedIn(sal_False),
+ bPageCtrlsVisible(sal_False),
+ bGlobalMode(sal_False)
{
GetCreateView();
InitImageList();
@@ -810,15 +810,15 @@ SwNavigationPI::SwNavigationPI( SfxBindings* _pBindings,
pEdit->SetUpHdl(LINK(this, SwNavigationPI, PageEditModifyHdl));
pEdit->SetDownHdl(LINK(this, SwNavigationPI, PageEditModifyHdl));
- bPageCtrlsVisible = TRUE;
+ bPageCtrlsVisible = sal_True;
// Rectangle aFirstRect = aContentToolBox.GetItemRect(FN_SHOW_ROOT);
-// USHORT nWidth = 2 * (USHORT)aFirstRect.Left();
+// sal_uInt16 nWidth = 2 * (sal_uInt16)aFirstRect.Left();
//doppelte Separatoren sind nicht erlaubt, also muss
//die passende Groesse anders ermittelt werden
Rectangle aFirstRect = aContentToolBox.GetItemRect(FN_SELECT_FOOTNOTE);
Rectangle aSecondRect = aContentToolBox.GetItemRect(FN_SELECT_HEADER);
- USHORT nWidth = USHORT(aFirstRect.Left() - aSecondRect.Left());
+ sal_uInt16 nWidth = sal_uInt16(aFirstRect.Left() - aSecondRect.Left());
Size aItemWinSize( nWidth , aFirstRect.Bottom() - aFirstRect.Top() );
pEdit->SetSizePixel(aItemWinSize);
@@ -828,7 +828,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);
@@ -876,9 +876,9 @@ SwNavigationPI::SwNavigationPI( SfxBindings* _pBindings,
aContentTree.SetDragDropMode( SV_DRAGDROP_CTRL_MOVE |
SV_DRAGDROP_CTRL_COPY |
SV_DRAGDROP_ENABLE_TOP );
- aContentTree.EnableAsyncDrag(TRUE);
+ aContentTree.EnableAsyncDrag(sal_True);
aContentTree.ShowTree();
- aContentToolBox.CheckItem(FN_SHOW_CONTENT_BOX, TRUE);
+ aContentToolBox.CheckItem(FN_SHOW_CONTENT_BOX, sal_True);
// TreeListBox fuer Globaldokument
aGlobalTree.SetPosSizePixel( 0, nListboxYPos, 0, 0, WINDOW_POSSIZE_Y );
@@ -899,7 +899,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);
@@ -947,7 +947,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());
@@ -1023,7 +1023,7 @@ IMPL_LINK( SwNavigationPI, ClosePopupWindow, SfxPopupWindow *, pWindow )
Beschreibung:
------------------------------------------------------------------------*/
-void SwNavigationPI::StateChanged( USHORT nSID, SfxItemState /*eState*/,
+void SwNavigationPI::StateChanged( sal_uInt16 nSID, SfxItemState /*eState*/,
const SfxPoolItem* /*pState*/ )
{
if(nSID == SID_DOCFULLNAME)
@@ -1033,7 +1033,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()) )
@@ -1137,7 +1137,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
@@ -1156,13 +1156,13 @@ void SwNavigationPI::Notify( SfxBroadcaster& rBrdc, const SfxHint& rHint )
IMPL_LINK( SwNavigationPI, MenuSelectHdl, Menu *, pMenu )
{
- USHORT nMenuId = pMenu->GetCurItemId();
+ sal_uInt16 nMenuId = pMenu->GetCurItemId();
if(nMenuId != USHRT_MAX)
{
if(nMenuId < 100)
SetRegionDropMode( --nMenuId);
else
- aContentTree.SetOutlineLevel( static_cast< BYTE >(nMenuId - 100) );
+ aContentTree.SetOutlineLevel( static_cast< sal_uInt8 >(nMenuId - 100) );
}
return 0;
}
@@ -1174,14 +1174,14 @@ IMPL_LINK( SwNavigationPI, MenuSelectHdl, Menu *, pMenu )
void SwNavigationPI::UpdateListBox()
{
- aDocListBox.SetUpdateMode(FALSE);
+ aDocListBox.SetUpdateMode(sal_False);
aDocListBox.Clear();
SwView *pActView = GetCreateView();
- BOOL bDisable = pActView == 0;
+ sal_Bool bDisable = pActView == 0;
SwView *pView = SwModule::GetFirstView();
- USHORT nCount = 0;
- USHORT nAct = 0;
- USHORT nConstPos = 0;
+ sal_uInt16 nCount = 0;
+ sal_uInt16 nAct = 0;
+ sal_uInt16 nConstPos = 0;
const SwView* pConstView = aContentTree.IsConstantView() &&
aContentTree.GetActiveWrtShell() ?
&aContentTree.GetActiveWrtShell()->GetView():
@@ -1223,12 +1223,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())
@@ -1239,7 +1239,7 @@ void SwNavigationPI::UpdateListBox()
aDocListBox.SelectEntryPos(nConstPos);
aDocListBox.Enable( !bDisable );
- aDocListBox.SetUpdateMode(TRUE);
+ aDocListBox.SetUpdateMode(sal_True);
}
/*-----------------16.06.97 15:05-------------------
@@ -1276,7 +1276,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;
@@ -1365,12 +1365,12 @@ sal_Int8 SwNavigationPI::ExecuteDrop( const ExecuteDropEvent& rEvt )
--------------------------------------------------*/
-void SwNavigationPI::SetRegionDropMode(USHORT nNewMode)
+void SwNavigationPI::SetRegionDropMode(sal_uInt16 nNewMode)
{
nRegionMode = nNewMode;
pConfig->SetRegionMode( nRegionMode );
- USHORT nDropId = FN_DROP_REGION;
+ sal_uInt16 nDropId = FN_DROP_REGION;
if(nRegionMode == REGION_MODE_LINK)
nDropId = FN_DROP_REGION_LINK;
else if(nRegionMode == REGION_MODE_EMBEDDED)
@@ -1388,13 +1388,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();
@@ -1402,8 +1402,8 @@ BOOL SwNavigationPI::ToggleTree()
aContentTree.HideTree();
aContentToolBox.Hide();
aDocListBox.Hide();
- SetGlobalMode(TRUE);
- SetUpdateMode(TRUE);
+ SetGlobalMode(sal_True);
+ SetUpdateMode(sal_True);
}
else
{
@@ -1415,8 +1415,8 @@ BOOL SwNavigationPI::ToggleTree()
aContentToolBox.Show();
aDocListBox.Show();
}
- bRet = FALSE;
- SetGlobalMode(FALSE);
+ bRet = sal_False;
+ SetGlobalMode(sal_False);
}
return bRet;
}
@@ -1424,9 +1424,9 @@ BOOL SwNavigationPI::ToggleTree()
/*-----------------13.06.97 09:42-------------------
--------------------------------------------------*/
-BOOL SwNavigationPI::IsGlobalDoc() const
+sal_Bool SwNavigationPI::IsGlobalDoc() const
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
SwView *pView = GetCreateView();
if(pView)
{
@@ -1483,7 +1483,7 @@ SwView* SwNavigationPI::GetCreateView() const
------------------------------------------------------------------------*/
SwNavigationChild::SwNavigationChild( Window* pParent,
- USHORT nId,
+ sal_uInt16 nId,
SfxBindings* _pBindings,
SfxChildWinInfo* pInfo )
: SfxChildWindowContext( nId )
@@ -1495,14 +1495,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())
{
@@ -1530,7 +1530,7 @@ void SwNavigationPI::DataChanged( const DataChangedEvent& rDCEvt )
---------------------------------------------------------------------------*/
void SwNavigationPI::InitImageList()
{
- USHORT k;
+ sal_uInt16 k;
ImageList& rImgLst = aContentToolBox.GetSettings().GetStyleSettings().GetHighContrastMode() ?
aContentImageListH : aContentImageList;
@@ -1542,7 +1542,7 @@ void SwNavigationPI::InitImageList()
aGlobalToolBox.SetItemImage(aGlobalToolBox.GetItemId(k),
rImgLst.GetImage(aGlobalToolBox.GetItemId(k)));
- USHORT nDropId = FN_DROP_REGION;
+ sal_uInt16 nDropId = FN_DROP_REGION;
if(nRegionMode == REGION_MODE_LINK)
nDropId = FN_DROP_REGION_LINK;
else if(nRegionMode == REGION_MODE_EMBEDDED)
diff --git a/sw/source/ui/utlui/numfmtlb.cxx b/sw/source/ui/utlui/numfmtlb.cxx
index e34cc67586..5af7777ac4 100644
--- a/sw/source/ui/utlui/numfmtlb.cxx
+++ b/sw/source/ui/utlui/numfmtlb.cxx
@@ -71,17 +71,17 @@ using namespace ::com::sun::star::lang;
--------------------------------------------------------------------*/
NumFormatListBox::NumFormatListBox( Window* pWin, const ResId& rResId,
- short nFormatType, ULONG nDefFmt,
- BOOL bUsrFmts ) :
+ short nFormatType, sal_uLong nDefFmt,
+ sal_Bool bUsrFmts ) :
ListBox ( pWin, rResId ),
nCurrFormatType (-1),
nStdEntry (0),
- bOneArea (FALSE),
+ bOneArea (sal_False),
nDefFormat (nDefFmt),
pVw (0),
pOwnFormatter (0),
- bShowLanguageControl(FALSE),
- bUseAutomaticLanguage(TRUE)
+ bShowLanguageControl(sal_False),
+ bUseAutomaticLanguage(sal_True)
{
Init(nFormatType, bUsrFmts);
}
@@ -92,16 +92,16 @@ NumFormatListBox::NumFormatListBox( Window* pWin, const ResId& rResId,
NumFormatListBox::NumFormatListBox( Window* pWin, SwView* pView,
const ResId& rResId, short nFormatType,
- ULONG nDefFmt, BOOL bUsrFmts ) :
+ sal_uLong nDefFmt, sal_Bool bUsrFmts ) :
ListBox ( pWin, rResId ),
nCurrFormatType (-1),
nStdEntry (0),
- bOneArea (FALSE),
+ bOneArea (sal_False),
nDefFormat (nDefFmt),
pVw (pView),
pOwnFormatter (0),
- bShowLanguageControl(FALSE),
- bUseAutomaticLanguage(TRUE)
+ bShowLanguageControl(sal_False),
+ bUseAutomaticLanguage(sal_True)
{
Init(nFormatType, bUsrFmts);
}
@@ -110,7 +110,7 @@ NumFormatListBox::NumFormatListBox( Window* pWin, SwView* pView,
*
* --------------------------------------------------*/
-void NumFormatListBox::Init(short nFormatType, BOOL bUsrFmts)
+void NumFormatListBox::Init(short nFormatType, sal_Bool bUsrFmts)
{
SwView *pView = GetView();
@@ -119,7 +119,7 @@ void NumFormatListBox::Init(short nFormatType, BOOL bUsrFmts)
else
eCurLanguage = SvxLocaleToLanguage( SvtSysLocale().GetLocaleData().getLocale() );
- if (bUsrFmts == FALSE)
+ if (bUsrFmts == sal_False)
{
Reference< XMultiServiceFactory > xMSF = ::comphelper::getProcessServiceFactory();
pOwnFormatter = new SvNumberFormatter(xMSF, eCurLanguage);
@@ -242,17 +242,17 @@ void NumFormatListBox::SetFormatType(const short nFormatType)
}
const SvNumberformat* pFmt;
- USHORT nPos, i = 0;
- ULONG nFormat;
+ sal_uInt16 nPos, i = 0;
+ sal_uLong nFormat;
Color* pCol;
double fVal = GetDefValue( nFormatType );
String sValue;
- ULONG nSysNumFmt = pFormatter->GetFormatIndex(
+ sal_uLong nSysNumFmt = pFormatter->GetFormatIndex(
NF_NUMBER_SYSTEM, eCurLanguage );
- ULONG nSysShortDateFmt = pFormatter->GetFormatIndex(
+ sal_uLong nSysShortDateFmt = pFormatter->GetFormatIndex(
NF_DATE_SYSTEM_SHORT, eCurLanguage );
- ULONG nSysLongDateFmt = pFormatter->GetFormatIndex(
+ sal_uLong nSysLongDateFmt = pFormatter->GetFormatIndex(
NF_DATE_SYSTEM_LONG, eCurLanguage );
for( long nIndex = eOffsetStart; nIndex <= eOffsetEnd; ++nIndex )
@@ -302,7 +302,7 @@ void NumFormatListBox::SetFormatType(const short nFormatType)
Beschreibung:
--------------------------------------------------------------------*/
-void NumFormatListBox::SetDefFormat(const ULONG nDefFmt)
+void NumFormatListBox::SetDefFormat(const sal_uLong nDefFmt)
{
if (nDefFmt == ULONG_MAX)
{
@@ -327,11 +327,11 @@ void NumFormatListBox::SetDefFormat(const ULONG nDefFmt)
SetFormatType(nType);
- ULONG nFormat = pFormatter->GetFormatForLanguageIfBuiltIn(nDefFmt, eCurLanguage);
+ sal_uLong nFormat = pFormatter->GetFormatForLanguageIfBuiltIn(nDefFmt, eCurLanguage);
- for (USHORT i = 0; i < GetEntryCount(); i++)
+ for (sal_uInt16 i = 0; i < GetEntryCount(); i++)
{
- if (nFormat == (ULONG)GetEntryData(i))
+ if (nFormat == (sal_uLong)GetEntryData(i))
{
SelectEntryPos(i);
nStdEntry = i;
@@ -353,20 +353,20 @@ void NumFormatListBox::SetDefFormat(const ULONG nDefFmt)
else
pFormatter->GetOutputString(fValue, nDefFmt, sValue, &pCol);
- USHORT nPos = 0;
- while ((ULONG)GetEntryData(nPos) == ULONG_MAX)
+ sal_uInt16 nPos = 0;
+ while ((sal_uLong)GetEntryData(nPos) == ULONG_MAX)
nPos++;
//
- ULONG nSysNumFmt = pFormatter->GetFormatIndex( NF_NUMBER_SYSTEM, eCurLanguage);
- ULONG nSysShortDateFmt = pFormatter->GetFormatIndex( NF_DATE_SYSTEM_SHORT, eCurLanguage);
- ULONG nSysLongDateFmt = pFormatter->GetFormatIndex( NF_DATE_SYSTEM_LONG, eCurLanguage);
- BOOL bSysLang = FALSE;
+ sal_uLong nSysNumFmt = pFormatter->GetFormatIndex( NF_NUMBER_SYSTEM, eCurLanguage);
+ sal_uLong nSysShortDateFmt = pFormatter->GetFormatIndex( NF_DATE_SYSTEM_SHORT, eCurLanguage);
+ sal_uLong nSysLongDateFmt = pFormatter->GetFormatIndex( NF_DATE_SYSTEM_LONG, eCurLanguage);
+ sal_Bool bSysLang = sal_False;
if( eCurLanguage == GetAppLanguage() )
- bSysLang = TRUE;
- ULONG nNumFormatForLanguage = pFormatter->GetFormatForLanguageIfBuiltIn(nSysNumFmt, LANGUAGE_SYSTEM );
- ULONG nShortDateFormatForLanguage = pFormatter->GetFormatForLanguageIfBuiltIn(nSysShortDateFmt, LANGUAGE_SYSTEM );
- ULONG nLongDateFormatForLanguage = pFormatter->GetFormatForLanguageIfBuiltIn(nSysLongDateFmt, LANGUAGE_SYSTEM );
+ bSysLang = sal_True;
+ sal_uLong nNumFormatForLanguage = pFormatter->GetFormatForLanguageIfBuiltIn(nSysNumFmt, LANGUAGE_SYSTEM );
+ sal_uLong nShortDateFormatForLanguage = pFormatter->GetFormatForLanguageIfBuiltIn(nSysShortDateFmt, LANGUAGE_SYSTEM );
+ sal_uLong nLongDateFormatForLanguage = pFormatter->GetFormatForLanguageIfBuiltIn(nSysLongDateFmt, LANGUAGE_SYSTEM );
if (
nDefFmt == nSysNumFmt ||
@@ -395,11 +395,11 @@ void NumFormatListBox::SetDefFormat(const ULONG nDefFmt)
Beschreibung:
--------------------------------------------------------------------*/
-ULONG NumFormatListBox::GetFormat() const
+sal_uLong NumFormatListBox::GetFormat() const
{
- USHORT nPos = GetSelectEntryPos();
+ sal_uInt16 nPos = GetSelectEntryPos();
- return (ULONG)GetEntryData(nPos);
+ return (sal_uLong)GetEntryData(nPos);
}
/*--------------------------------------------------------------------
@@ -408,7 +408,7 @@ ULONG NumFormatListBox::GetFormat() const
IMPL_LINK( NumFormatListBox, SelectHdl, ListBox *, pBox )
{
- USHORT nPos = pBox->GetSelectEntryPos();
+ sal_uInt16 nPos = pBox->GetSelectEntryPos();
String sDefine(SW_RES( STR_DEFINE_NUMBERFORMAT ));
SwView *pView = GetView();
@@ -428,7 +428,7 @@ IMPL_LINK( NumFormatListBox, SelectHdl, ListBox *, pBox )
double fValue = GetDefValue( nCurrFormatType);
- ULONG nFormat = pFormatter->GetStandardFormat( nCurrFormatType, eCurLanguage);
+ sal_uLong nFormat = pFormatter->GetStandardFormat( nCurrFormatType, eCurLanguage);
aCoreSet.Put( SfxUInt32Item( SID_ATTR_NUMBERFORMAT_VALUE, nFormat ));
aCoreSet.Put( SvxNumberInfoItem( pFormatter, fValue,
@@ -457,15 +457,15 @@ IMPL_LINK( NumFormatListBox, SelectHdl, ListBox *, pBox )
{
const sal_uInt32* pDelArr = ((SvxNumberInfoItem*)pItem)->GetDelArray();
- for ( USHORT i = 0; i < ((SvxNumberInfoItem*)pItem)->GetDelCount(); i++ )
+ for ( sal_uInt16 i = 0; i < ((SvxNumberInfoItem*)pItem)->GetDelCount(); i++ )
pFormatter->DeleteEntry( pDelArr[i] );
}
const SfxItemSet* pOutSet = pDlg->GetOutputItemSet();
if( SFX_ITEM_SET == pOutSet->GetItemState(
- SID_ATTR_NUMBERFORMAT_VALUE, FALSE, &pItem ))
+ SID_ATTR_NUMBERFORMAT_VALUE, sal_False, &pItem ))
{
- UINT32 nNumberFormat = ((SfxUInt32Item*)pItem)->GetValue();
+ sal_uInt32 nNumberFormat = ((SfxUInt32Item*)pItem)->GetValue();
// oj #105473# change order of calls
const SvNumberformat* pFmt = pFormatter->GetEntry(nNumberFormat);
if( pFmt )
@@ -474,7 +474,7 @@ IMPL_LINK( NumFormatListBox, SelectHdl, ListBox *, pBox )
SetDefFormat(nNumberFormat);
}
if( bShowLanguageControl && SFX_ITEM_SET == pOutSet->GetItemState(
- SID_ATTR_NUMBERFORMAT_ADD_AUTO, FALSE, &pItem ))
+ SID_ATTR_NUMBERFORMAT_ADD_AUTO, sal_False, &pItem ))
{
bUseAutomaticLanguage = ((const SfxBoolItem*)pItem)->GetValue();
}
@@ -507,7 +507,7 @@ double NumFormatListBox::GetDefValue(const short nFormatType) const
break;
/* {
String sValue("31.8.1997 16:57:34");
- ULONG nFormat = pFormatter->GetStandardFormat(nFormatType, LANGUAGE_GERMAN);
+ sal_uLong nFormat = pFormatter->GetStandardFormat(nFormatType, LANGUAGE_GERMAN);
pFormatter->IsNumberFormat( sValue, nFormat, fDefValue );
}
break;*/
diff --git a/sw/source/ui/utlui/prcntfld.cxx b/sw/source/ui/utlui/prcntfld.cxx
index b22fcbd6d9..d32bd78906 100644
--- a/sw/source/ui/utlui/prcntfld.cxx
+++ b/sw/source/ui/utlui/prcntfld.cxx
@@ -74,7 +74,7 @@ void PercentField::SetRefValue(sal_Int64 nValue)
Beschreibung:
--------------------------------------------------------------------*/
-void PercentField::ShowPercent(BOOL bPercent)
+void PercentField::ShowPercent(sal_Bool bPercent)
{
if ((bPercent && GetUnit() == FUNIT_CUSTOM) ||
(!bPercent && GetUnit() != FUNIT_CUSTOM))
@@ -293,10 +293,10 @@ sal_Int64 PercentField::DenormalizePercent(sal_Int64 nValue)
Beschreibung:
--------------------------------------------------------------------*/
-BOOL PercentField::IsValueModified()
+sal_Bool PercentField::IsValueModified()
{
if (GetUnit() == FUNIT_CUSTOM)
- return TRUE;
+ return sal_True;
else
return MetricField::IsValueModified();
}
@@ -305,9 +305,9 @@ BOOL PercentField::IsValueModified()
Beschreibung:
--------------------------------------------------------------------*/
-sal_Int64 PercentField::ImpPower10( USHORT n )
+sal_Int64 PercentField::ImpPower10( sal_uInt16 n )
{
- USHORT i;
+ sal_uInt16 i;
sal_Int64 nValue = 1;
for ( i=0; i < n; i++ )
diff --git a/sw/source/ui/utlui/shdwcrsr.cxx b/sw/source/ui/utlui/shdwcrsr.cxx
index d241a82df5..a3da33283a 100644
--- a/sw/source/ui/utlui/shdwcrsr.cxx
+++ b/sw/source/ui/utlui/shdwcrsr.cxx
@@ -44,7 +44,7 @@ SwShadowCursor::~SwShadowCursor()
DrawCrsr( aOldPt, nOldHeight, nOldMode );
}
-void SwShadowCursor::SetPos( const Point& rPt, long nHeight, USHORT nMode )
+void SwShadowCursor::SetPos( const Point& rPt, long nHeight, sal_uInt16 nMode )
{
Point aPt( pWin->LogicToPixel( rPt ));
nHeight = pWin->LogicToPixel( Size( 0, nHeight )).Height();
@@ -60,7 +60,7 @@ void SwShadowCursor::SetPos( const Point& rPt, long nHeight, USHORT nMode )
}
}
-void SwShadowCursor::DrawTri( const Point& rPt, long nHeight, BOOL bLeft )
+void SwShadowCursor::DrawTri( const Point& rPt, long nHeight, sal_Bool bLeft )
{
long nLineDiff = ( nHeight / 2 );
long nLineDiffHalf = nLineDiff / 2;
@@ -79,7 +79,7 @@ void SwShadowCursor::DrawTri( const Point& rPt, long nHeight, BOOL bLeft )
}
}
-void SwShadowCursor::DrawCrsr( const Point& rPt, long nHeight, USHORT nMode )
+void SwShadowCursor::DrawCrsr( const Point& rPt, long nHeight, sal_uInt16 nMode )
{
nHeight = (((nHeight / 4)+1) * 4) + 1;
@@ -96,9 +96,9 @@ void SwShadowCursor::DrawCrsr( const Point& rPt, long nHeight, USHORT nMode )
// 2. das Dreieck
if( text::HoriOrientation::LEFT == nMode || text::HoriOrientation::CENTER == nMode ) // Pfeil nach rechts
- DrawTri( rPt, nHeight, FALSE );
+ DrawTri( rPt, nHeight, sal_False );
if( text::HoriOrientation::RIGHT == nMode || text::HoriOrientation::CENTER == nMode ) // Pfeil nach links
- DrawTri( rPt, nHeight, TRUE );
+ DrawTri( rPt, nHeight, sal_True );
pWin->Pop();
}
diff --git a/sw/source/ui/utlui/textcontrolcombo.cxx b/sw/source/ui/utlui/textcontrolcombo.cxx
index 2c94ea5232..271ec9d5f4 100644
--- a/sw/source/ui/utlui/textcontrolcombo.cxx
+++ b/sw/source/ui/utlui/textcontrolcombo.cxx
@@ -45,7 +45,7 @@ TextControlCombo::~TextControlCombo()
{
}
-void TextControlCombo::Arrange( FixedText& _rFTcomplete, BOOL /*bShow*/ )
+void TextControlCombo::Arrange( FixedText& _rFTcomplete, sal_Bool /*bShow*/ )
{
Point aBasePos( GetPosPixel() );
Size aMetricVals( GetSizePixel() );
@@ -96,14 +96,14 @@ void TextControlCombo::Arrange( FixedText& _rFTcomplete, BOOL /*bShow*/ )
Window::Hide();
}
-void TextControlCombo::Show( BOOL _bVisible, USHORT _nFlags )
+void TextControlCombo::Show( sal_Bool _bVisible, sal_uInt16 _nFlags )
{
mrCtrl.Show( _bVisible, _nFlags );
mrFTbefore.Show( _bVisible, _nFlags );
mrFTafter.Show( _bVisible, _nFlags );
}
-void TextControlCombo::Enable( BOOL _bEnable, BOOL _bChild )
+void TextControlCombo::Enable( sal_Bool _bEnable, sal_Bool _bChild )
{
mrCtrl.Enable( _bEnable, _bChild );
mrFTbefore.Enable( _bEnable, _bChild );
diff --git a/sw/source/ui/utlui/tmplctrl.cxx b/sw/source/ui/utlui/tmplctrl.cxx
index 22b07193b2..d399efae63 100644
--- a/sw/source/ui/utlui/tmplctrl.cxx
+++ b/sw/source/ui/utlui/tmplctrl.cxx
@@ -61,10 +61,10 @@ class TemplatePopup_Impl : public PopupMenu
public:
TemplatePopup_Impl();
- USHORT GetCurId() const { return nCurId; }
+ sal_uInt16 GetCurId() const { return nCurId; }
private:
- USHORT nCurId;
+ sal_uInt16 nCurId;
virtual void Select();
};
@@ -86,8 +86,8 @@ void TemplatePopup_Impl::Select()
// class SvxZoomStatusBarControl ------------------------------------------
-SwTemplateControl::SwTemplateControl( USHORT _nSlotId,
- USHORT _nId,
+SwTemplateControl::SwTemplateControl( sal_uInt16 _nSlotId,
+ sal_uInt16 _nId,
StatusBar& rStb ) :
SfxStatusBarControl( _nSlotId, _nId, rStb )
{
@@ -102,7 +102,7 @@ SwTemplateControl::~SwTemplateControl()
// -----------------------------------------------------------------------
void SwTemplateControl::StateChanged(
- USHORT /*nSID*/, SfxItemState eState, const SfxPoolItem* pState )
+ sal_uInt16 /*nSID*/, SfxItemState eState, const SfxPoolItem* pState )
{
if( eState != SFX_ITEM_AVAILABLE || pState->ISA( SfxVoidItem ) )
GetStatusBar().SetItemText( GetId(), String() );
@@ -142,7 +142,7 @@ void SwTemplateControl::Command( const CommandEvent& rCEvt )
pPool->SetSearchMask(SFX_STYLE_FAMILY_PAGE, SFXSTYLEBIT_ALL);
if( pPool->Count() > 1 )
{
- USHORT nCount = 0;
+ sal_uInt16 nCount = 0;
SfxStyleSheetBase* pStyle = pPool->First();
while( pStyle )
{
@@ -152,7 +152,7 @@ void SwTemplateControl::Command( const CommandEvent& rCEvt )
}
aPop.Execute( &GetStatusBar(), rCEvt.GetMousePosPixel());
- USHORT nCurrId = aPop.GetCurId();
+ sal_uInt16 nCurrId = aPop.GetCurId();
if( nCurrId != USHRT_MAX)
{
// sieht etwas umstaendlich aus, anders geht's aber nicht
diff --git a/sw/source/ui/utlui/uiitems.cxx b/sw/source/ui/utlui/uiitems.cxx
index 311c731040..420228cc9a 100644
--- a/sw/source/ui/utlui/uiitems.cxx
+++ b/sw/source/ui/utlui/uiitems.cxx
@@ -47,7 +47,7 @@ using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
// Breitenangaben der Fussnotenlinien, mit TabPage abstimmen
-static const USHORT __FAR_DATA nFtnLines[] = {
+static const sal_uInt16 __FAR_DATA nFtnLines[] = {
0,
10,
50,
@@ -59,7 +59,7 @@ static const USHORT __FAR_DATA nFtnLines[] = {
#define FTN_LINE_STYLE_COUNT 5
-SwPageFtnInfoItem::SwPageFtnInfoItem( const USHORT nId, SwPageFtnInfo& rInfo) :
+SwPageFtnInfoItem::SwPageFtnInfoItem( const sal_uInt16 nId, SwPageFtnInfo& rInfo) :
SfxPoolItem( nId ),
aFtnInfo(rInfo)
{
@@ -108,7 +108,7 @@ SfxItemPresentation SwPageFtnInfoItem::GetPresentation
case SFX_ITEM_PRESENTATION_NAMELESS:
case SFX_ITEM_PRESENTATION_COMPLETE:
{
- USHORT nHght = (USHORT) GetPageFtnInfo().GetHeight();
+ sal_uInt16 nHght = (sal_uInt16) GetPageFtnInfo().GetHeight();
if ( nHght )
{
rText = SW_RESSTR( STR_MAX_FTN_HEIGHT );
@@ -125,7 +125,7 @@ SfxItemPresentation SwPageFtnInfoItem::GetPresentation
/* -----------------------------26.04.01 12:25--------------------------------
---------------------------------------------------------------------------*/
-BOOL SwPageFtnInfoItem::QueryValue( Any& rVal, BYTE nMemberId ) const
+sal_Bool SwPageFtnInfoItem::QueryValue( Any& rVal, sal_uInt8 nMemberId ) const
{
sal_Bool bRet = sal_True;
switch(nMemberId & ~CONVERT_TWIPS)
@@ -151,7 +151,7 @@ BOOL SwPageFtnInfoItem::QueryValue( Any& rVal, BYTE nMemberId ) const
/* -----------------------------26.04.01 12:26--------------------------------
---------------------------------------------------------------------------*/
-BOOL SwPageFtnInfoItem::PutValue(const Any& rVal, BYTE nMemberId)
+sal_Bool SwPageFtnInfoItem::PutValue(const Any& rVal, sal_uInt8 nMemberId)
{
sal_Int32 nSet32 = 0;
sal_Bool bRet = sal_True;
@@ -214,7 +214,7 @@ BOOL SwPageFtnInfoItem::PutValue(const Any& rVal, BYTE nMemberId)
return bRet;
}
-SwPtrItem::SwPtrItem( const USHORT nId, void* pPtr ) :
+SwPtrItem::SwPtrItem( const sal_uInt16 nId, void* pPtr ) :
SfxPoolItem( nId ),
pMisc(pPtr)
{
@@ -256,7 +256,7 @@ int SwPtrItem::operator==( const SfxPoolItem& rAttr ) const
/*-----------------12.11.97 12:55-------------------------------
SwUINumRuleItem fuer die NumTabPages der FormatNumRule/Stylisten
---------------------------------------------------------------*/
-SwUINumRuleItem::SwUINumRuleItem( const SwNumRule& rRul, const USHORT nId )
+SwUINumRuleItem::SwUINumRuleItem( const SwNumRule& rRul, const sal_uInt16 nId )
: SfxPoolItem( nId ), pRule( new SwNumRule( rRul ) )
{
}
@@ -284,13 +284,13 @@ int SwUINumRuleItem::operator==( const SfxPoolItem& rAttr ) const
return *pRule == *((SwUINumRuleItem&)rAttr).pRule;
}
-BOOL SwUINumRuleItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/ ) const
+sal_Bool SwUINumRuleItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/ ) const
{
uno::Reference< container::XIndexReplace >xRules = new SwXNumberingRules(*pRule);
rVal.setValue(&xRules, ::getCppuType((uno::Reference< container::XIndexReplace>*)0));
- return TRUE;
+ return sal_True;
}
-BOOL SwUINumRuleItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/ )
+sal_Bool SwUINumRuleItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/ )
{
uno::Reference< container::XIndexReplace> xRulesRef;
if(rVal >>= xRulesRef)
@@ -303,12 +303,12 @@ BOOL SwUINumRuleItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/ )
*pRule = *pSwXRules->GetNumRule();
}
}
- return TRUE;
+ return sal_True;
}
/* -----------------17.06.98 17:43-------------------
*
* --------------------------------------------------*/
-SwBackgroundDestinationItem::SwBackgroundDestinationItem(USHORT _nWhich, USHORT nValue) :
+SwBackgroundDestinationItem::SwBackgroundDestinationItem(sal_uInt16 _nWhich, sal_uInt16 nValue) :
SfxUInt16Item(_nWhich, nValue)
{
}
diff --git a/sw/source/ui/utlui/uitool.cxx b/sw/source/ui/utlui/uitool.cxx
index fb28ef5000..bbf9888ebf 100644
--- a/sw/source/ui/utlui/uitool.cxx
+++ b/sw/source/ui/utlui/uitool.cxx
@@ -134,14 +134,14 @@ void PrepareBoxInfo(SfxItemSet& rSet, const SwWrtShell& rSh)
SvxBoxInfoItem aBoxInfo( SID_ATTR_BORDER_INNER );
const SfxPoolItem *pBoxInfo;
if ( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_BORDER_INNER,
- TRUE, &pBoxInfo))
+ sal_True, &pBoxInfo))
aBoxInfo = *(SvxBoxInfoItem*)pBoxInfo;
// Tabellenvariante, wenn mehrere Tabellenzellen selektiert
rSh.GetCrsr(); //Damit GetCrsrCnt() auch das Richtige liefert
aBoxInfo.SetTable (rSh.IsTableMode() && rSh.GetCrsrCnt() > 1);
// Abstandsfeld immer anzeigen
- aBoxInfo.SetDist ((BOOL) TRUE);
+ aBoxInfo.SetDist ((sal_Bool) sal_True);
// Minimalgroesse in Tabellen und Absaetzen setzen
aBoxInfo.SetMinDist (rSh.IsTableMode() || rSh.GetSelectionType() & (nsSelectionType::SEL_TXT | nsSelectionType::SEL_TBL));
// Default-Abstand immer setzen
@@ -193,7 +193,7 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc )
{
const SvxPageItem& rPageItem = (const SvxPageItem&)rSet.Get(SID_ATTR_PAGE);
- USHORT nUse = (USHORT)rPageItem.GetPageUsage();
+ sal_uInt16 nUse = (sal_uInt16)rPageItem.GetPageUsage();
if(nUse & 0x04)
nUse |= 0x03;
if(nUse)
@@ -216,7 +216,7 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc )
//
const SfxPoolItem* pItem;
if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_PAGE_HEADERSET,
- FALSE, &pItem ) )
+ sal_False, &pItem ) )
{
const SfxItemSet& rHeaderSet = ((SvxSetItem*)pItem)->GetItemSet();
const SfxBoolItem& rHeaderOn = (const SfxBoolItem&)rHeaderSet.Get(SID_ATTR_PAGE_ON);
@@ -225,7 +225,7 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc )
{
// Werte uebernehmen
if(!rMaster.GetHeader().IsActive())
- rMaster.SetFmtAttr(SwFmtHeader(TRUE));
+ rMaster.SetFmtAttr(SwFmtHeader(sal_True));
// Das Headerformat rausholen und anpassen
//
@@ -243,8 +243,8 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc )
//
if(rMaster.GetHeader().IsActive())
{
- rMaster.SetFmtAttr(SwFmtHeader(BOOL(FALSE)));
- rPageDesc.ChgHeaderShare(FALSE);
+ rMaster.SetFmtAttr(SwFmtHeader(sal_Bool(sal_False)));
+ rPageDesc.ChgHeaderShare(sal_False);
}
}
}
@@ -252,7 +252,7 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc )
// Fusszeilen-Attribute auswerten
//
if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_PAGE_FOOTERSET,
- FALSE, &pItem ) )
+ sal_False, &pItem ) )
{
const SfxItemSet& rFooterSet = ((SvxSetItem*)pItem)->GetItemSet();
const SfxBoolItem& rFooterOn = (const SfxBoolItem&)rFooterSet.Get(SID_ATTR_PAGE_ON);
@@ -261,7 +261,7 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc )
{
// Werte uebernehmen
if(!rMaster.GetFooter().IsActive())
- rMaster.SetFmtAttr(SwFmtFooter(TRUE));
+ rMaster.SetFmtAttr(SwFmtFooter(sal_True));
// Das Footerformat rausholen und anpassen
//
@@ -279,8 +279,8 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc )
//
if(rMaster.GetFooter().IsActive())
{
- rMaster.SetFmtAttr(SwFmtFooter(BOOL(FALSE)));
- rPageDesc.ChgFooterShare(FALSE);
+ rMaster.SetFmtAttr(SwFmtFooter(sal_Bool(sal_False)));
+ rPageDesc.ChgFooterShare(sal_False);
}
}
}
@@ -288,7 +288,7 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc )
// Fussnoten
//
if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_FTN_INFO,
- FALSE, &pItem ) )
+ sal_False, &pItem ) )
rPageDesc.SetFtnInfo( ((SwPageFtnInfoItem*)pItem)->GetPageFtnInfo() );
@@ -299,20 +299,20 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc )
// Registerhaltigkeit
if(SFX_ITEM_SET == rSet.GetItemState(
- SID_SWREGISTER_MODE, FALSE, &pItem))
+ SID_SWREGISTER_MODE, sal_False, &pItem))
{
- BOOL bSet = ((const SfxBoolItem*)pItem)->GetValue();
+ sal_Bool bSet = ((const SfxBoolItem*)pItem)->GetValue();
if(!bSet)
rPageDesc.SetRegisterFmtColl(0);
else if(SFX_ITEM_SET == rSet.GetItemState(
- SID_SWREGISTER_COLLECTION, FALSE, &pItem))
+ SID_SWREGISTER_COLLECTION, sal_False, &pItem))
{
const String& rColl = ((const SfxStringItem*)pItem)->GetValue();
SwDoc& rDoc = *rMaster.GetDoc();
SwTxtFmtColl* pColl = rDoc.FindTxtFmtCollByName( rColl );
if( !pColl )
{
- USHORT nId = SwStyleNameMapper::GetPoolIdFromUIName( rColl, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL );
+ sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName( rColl, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL );
if( USHRT_MAX != nId )
pColl = rDoc.GetTxtCollFromPool( nId );
else
@@ -320,7 +320,7 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc )
(SwTxtFmtColl*)rDoc.GetDfltTxtFmtColl() );
}
if( pColl )
- pColl->SetFmtAttr( SwRegisterItem ( TRUE ));
+ pColl->SetFmtAttr( SwRegisterItem ( sal_True ));
rPageDesc.SetRegisterFmtColl( pColl );
}
}
@@ -359,14 +359,14 @@ void PageDescToItemSet( const SwPageDesc& rPageDesc, SfxItemSet& rSet)
SvxBoxInfoItem aBoxInfo( SID_ATTR_BORDER_INNER );
const SfxPoolItem *pBoxInfo;
if ( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_BORDER_INNER,
- TRUE, &pBoxInfo) )
+ sal_True, &pBoxInfo) )
aBoxInfo = *(SvxBoxInfoItem*)pBoxInfo;
- aBoxInfo.SetTable( FALSE );
+ aBoxInfo.SetTable( sal_False );
// Abstandsfeld immer anzeigen
- aBoxInfo.SetDist( TRUE);
+ aBoxInfo.SetDist( sal_True);
// Minimalgroesse in Tabellen und Absaetzen setzen
- aBoxInfo.SetMinDist( FALSE );
+ aBoxInfo.SetMinDist( sal_False );
// Default-Abstand immer setzen
aBoxInfo.SetDefDist( MIN_BORDER_DIST );
// Einzelne Linien koennen nur in Tabellen DontCare-Status haben
@@ -398,7 +398,7 @@ void PageDescToItemSet( const SwPageDesc& rPageDesc, SfxItemSet& rSet)
// dynamische oder feste Hoehe
//
- SfxBoolItem aOn(SID_ATTR_PAGE_ON, TRUE);
+ SfxBoolItem aOn(SID_ATTR_PAGE_ON, sal_True);
aHeaderSet.Put(aOn);
const SwFmtFrmSize &rFrmSize = pHeaderFmt->GetFrmSize();
@@ -444,7 +444,7 @@ void PageDescToItemSet( const SwPageDesc& rPageDesc, SfxItemSet& rSet)
// dynamische oder feste Hoehe
//
- SfxBoolItem aOn(SID_ATTR_PAGE_ON, TRUE);
+ SfxBoolItem aOn(SID_ATTR_PAGE_ON, sal_True);
aFooterSet.Put(aOn);
const SwFmtFrmSize &rFrmSize = pFooterFmt->GetFrmSize();
@@ -510,11 +510,11 @@ void MakeDefTabs(SwTwips nDefDist, SvxTabStopItem& rTabs)
--------------------------------------------------------------------*/
-USHORT GetTabDist(const SvxTabStopItem& rTabs)
+sal_uInt16 GetTabDist(const SvxTabStopItem& rTabs)
{
- USHORT nDefDist;
+ sal_uInt16 nDefDist;
if( rTabs.Count() )
- nDefDist = (USHORT)( rTabs[0].GetTabPos() );
+ nDefDist = (sal_uInt16)( rTabs[0].GetTabPos() );
else
nDefDist = 1134; // 2cm
return nDefDist;
@@ -527,14 +527,14 @@ void SfxToSwPageDescAttr( const SwWrtShell& rShell, SfxItemSet& rSet )
const SfxPoolItem* pItem;
SwFmtPageDesc aPgDesc;
- BOOL bChanged = FALSE;
+ sal_Bool bChanged = sal_False;
// Seitennummer
- if(SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_PARA_PAGENUM, FALSE, &pItem))
+ if(SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_PARA_PAGENUM, sal_False, &pItem))
{
aPgDesc.SetNumOffset(((SfxUInt16Item*)pItem)->GetValue());
- bChanged = TRUE;
+ bChanged = sal_True;
}
- if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_PARA_MODEL, FALSE, &pItem ))
+ if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_PARA_MODEL, sal_False, &pItem ))
{
const String& rDescName = ((SvxPageModelItem*)pItem)->GetValue();
if( rDescName.Len() ) // kein Name -> PageDesc ausschalten!
@@ -542,18 +542,18 @@ void SfxToSwPageDescAttr( const SwWrtShell& rShell, SfxItemSet& rSet )
// nur loeschen, wenn PageDesc eingschaltet wird!
rSet.ClearItem( RES_BREAK );
SwPageDesc* pDesc = ((SwWrtShell&)rShell).FindPageDescByName(
- rDescName, TRUE );
+ rDescName, sal_True );
if( pDesc )
pDesc->Add( &aPgDesc );
}
rSet.ClearItem( SID_ATTR_PARA_MODEL );
- bChanged = TRUE;
+ bChanged = sal_True;
}
else
{
SfxItemSet aCoreSet(rShell.GetView().GetPool(), RES_PAGEDESC, RES_PAGEDESC );
rShell.GetCurAttr( aCoreSet );
- if(SFX_ITEM_SET == aCoreSet.GetItemState( RES_PAGEDESC, TRUE, &pItem ) )
+ if(SFX_ITEM_SET == aCoreSet.GetItemState( RES_PAGEDESC, sal_True, &pItem ) )
{
if( ((SwFmtPageDesc*)pItem)->GetPageDesc() )
{
@@ -573,9 +573,9 @@ void SwToSfxPageDescAttr( SfxItemSet& rCoreSet )
{
const SfxPoolItem* pItem = 0;
String aName;
- USHORT nPageNum = 0;
- BOOL bPut = TRUE;
- switch( rCoreSet.GetItemState( RES_PAGEDESC, TRUE, &pItem ) )
+ sal_uInt16 nPageNum = 0;
+ sal_Bool bPut = sal_True;
+ switch( rCoreSet.GetItemState( RES_PAGEDESC, sal_True, &pItem ) )
{
case SFX_ITEM_SET:
{
@@ -593,13 +593,13 @@ void SwToSfxPageDescAttr( SfxItemSet& rCoreSet )
break;
default:
- bPut = FALSE;
+ bPut = sal_False;
}
SfxUInt16Item aPageNum( SID_ATTR_PARA_PAGENUM, nPageNum );
rCoreSet.Put( aPageNum );
if(bPut)
- rCoreSet.Put( SvxPageModelItem( aName, TRUE, SID_ATTR_PARA_MODEL ) );
+ rCoreSet.Put( SvxPageModelItem( aName, sal_True, SID_ATTR_PARA_MODEL ) );
}
/*--------------------------------------------------------------------
@@ -607,7 +607,7 @@ void SwToSfxPageDescAttr( SfxItemSet& rCoreSet )
--------------------------------------------------------------------*/
-FieldUnit GetDfltMetric(BOOL bWeb)
+FieldUnit GetDfltMetric(sal_Bool bWeb)
{
return SW_MOD()->GetUsrPref(bWeb)->GetMetric();
}
@@ -617,7 +617,7 @@ FieldUnit GetDfltMetric(BOOL bWeb)
--------------------------------------------------------------------*/
-void SetDfltMetric( FieldUnit eMetric, BOOL bWeb )
+void SetDfltMetric( FieldUnit eMetric, sal_Bool bWeb )
{
SW_MOD()->ApplyUserMetric(eMetric, bWeb);
}
@@ -625,9 +625,9 @@ void SetDfltMetric( FieldUnit eMetric, BOOL bWeb )
/*-----------------09.04.98 16:58-------------------
--------------------------------------------------*/
-USHORT InsertStringSorted(const String& rEntry, ListBox& rToFill, USHORT nOffset )
+sal_uInt16 InsertStringSorted(const String& rEntry, ListBox& rToFill, sal_uInt16 nOffset )
{
- USHORT i = nOffset;
+ sal_uInt16 i = nOffset;
CollatorWrapper& rCaseColl = ::GetAppCaseCollator();
for( ; i < rToFill.GetEntryCount(); i++ )
@@ -637,9 +637,9 @@ USHORT InsertStringSorted(const String& rEntry, ListBox& rToFill, USHORT nOffset
}
return rToFill.InsertEntry(rEntry, i);
}
-void FillCharStyleListBox(ListBox& rToFill, SwDocShell* pDocSh, BOOL bSorted, BOOL bWithDefault)
+void FillCharStyleListBox(ListBox& rToFill, SwDocShell* pDocSh, sal_Bool bSorted, sal_Bool bWithDefault)
{
- BOOL bHasOffset = rToFill.GetEntryCount() > 0;
+ sal_Bool bHasOffset = rToFill.GetEntryCount() > 0;
SfxStyleSheetBasePool* pPool = pDocSh->GetStyleSheetPool();
pPool->SetSearchMask(SFX_STYLE_FAMILY_CHAR, SFXSTYLEBIT_ALL);
SwDoc* pDoc = pDocSh->GetDoc();
@@ -650,7 +650,7 @@ void FillCharStyleListBox(ListBox& rToFill, SwDocShell* pDocSh, BOOL bSorted, BO
{
if(bWithDefault || pBase->GetName() != sStandard)
{
- USHORT nPos;
+ sal_uInt16 nPos;
if(bSorted)
nPos = InsertStringSorted(pBase->GetName(), rToFill, bHasOffset );
else
@@ -662,7 +662,7 @@ void FillCharStyleListBox(ListBox& rToFill, SwDocShell* pDocSh, BOOL bSorted, BO
}
// non-pool styles
const SwCharFmts* pFmts = pDoc->GetCharFmts();
- for(USHORT i = 0; i < pFmts->Count(); i++)
+ for(sal_uInt16 i = 0; i < pFmts->Count(); i++)
{
const SwCharFmt* pFmt = (*pFmts)[i];
if(pFmt->IsDefault())
@@ -670,7 +670,7 @@ void FillCharStyleListBox(ListBox& rToFill, SwDocShell* pDocSh, BOOL bSorted, BO
const String& rName = pFmt->GetName();
if(rToFill.GetEntryPos(rName) == LISTBOX_ENTRY_NOTFOUND)
{
- USHORT nPos;
+ sal_uInt16 nPos;
if(bSorted)
nPos = InsertStringSorted(rName, rToFill, bHasOffset );
else
@@ -684,7 +684,7 @@ void FillCharStyleListBox(ListBox& rToFill, SwDocShell* pDocSh, BOOL bSorted, BO
/* -----------------27.04.98 08:26-------------------
*
* --------------------------------------------------*/
-SwTwips GetTableWidth( SwFrmFmt* pFmt, SwTabCols& rCols, USHORT *pPercent,
+SwTwips GetTableWidth( SwFrmFmt* pFmt, SwTabCols& rCols, sal_uInt16 *pPercent,
SwWrtShell* pSh )
{
//Die Breite zu besorgen ist etwas komplizierter.
@@ -733,19 +733,19 @@ String GetAppLangDateTimeString( const DateTime& rDT )
const SvtSysLocale aSysLocale;
const LocaleDataWrapper& rAppLclData = aSysLocale.GetLocaleData();
String sRet( rAppLclData.getDate( rDT ));
- ( sRet += ' ' ) += rAppLclData.getTime( rDT, FALSE, FALSE );
+ ( sRet += ' ' ) += rAppLclData.getTime( rDT, sal_False, sal_False );
return sRet;
}
/*-- 26.01.2006 08:06:33---------------------------------------------------
-----------------------------------------------------------------------*/
-bool ExecuteMenuCommand( PopupMenu& rMenu, SfxViewFrame& rViewFrame, USHORT nId )
+bool ExecuteMenuCommand( PopupMenu& rMenu, SfxViewFrame& rViewFrame, sal_uInt16 nId )
{
bool bRet = false;
- USHORT nItemCount = rMenu.GetItemCount();
+ sal_uInt16 nItemCount = rMenu.GetItemCount();
String sCommand;
- for( USHORT nItem = 0; nItem < nItemCount; ++nItem)
+ for( sal_uInt16 nItem = 0; nItem < nItemCount; ++nItem)
{
PopupMenu* pPopup = rMenu.GetPopupMenu( rMenu.GetItemId( nItem ) );
if(pPopup)
diff --git a/sw/source/ui/utlui/unotools.cxx b/sw/source/ui/utlui/unotools.cxx
index 3185a4bae4..3f4f4aa716 100644
--- a/sw/source/ui/utlui/unotools.cxx
+++ b/sw/source/ui/utlui/unotools.cxx
@@ -169,7 +169,7 @@ void SwOneExampleFrame::CreateControl()
uno::Sequence<beans::PropertyValue> aSeq(3);
beans::PropertyValue* pValues = aSeq.getArray();
pValues[0].Name = C2U("ReadOnly");
- BOOL bTrue = sal_True;
+ sal_Bool bTrue = sal_True;
pValues[0].Value.setValue(&bTrue, ::getBooleanCppuType());
pValues[1].Name = C2U("OpenFlags");
pValues[1].Value <<= C2U("-RB");
@@ -367,7 +367,7 @@ IMPL_LINK( SwOneExampleFrame, TimeoutHdl, Timer*, pTimer )
/* -----------------------------27.12.99 09:59--------------------------------
---------------------------------------------------------------------------*/
-void SwOneExampleFrame::ClearDocument( BOOL bStartUpdateTimer )
+void SwOneExampleFrame::ClearDocument( sal_Bool bStartUpdateTimer )
{
uno::Reference< lang::XUnoTunnel> xTunnel( _xCursor, uno::UNO_QUERY);
if( xTunnel.is() )
@@ -392,8 +392,8 @@ void SwOneExampleFrame::ClearDocument( BOOL bStartUpdateTimer )
}
else
{
- _xCursor->gotoStart(FALSE);
- _xCursor->gotoEnd(TRUE);
+ _xCursor->gotoStart(sal_False);
+ _xCursor->gotoEnd(sal_True);
_xCursor->setString(OUString());
}
}
diff --git a/sw/source/ui/utlui/viewlayoutctrl.cxx b/sw/source/ui/utlui/viewlayoutctrl.cxx
index 79751fd17d..b2003483b9 100644
--- a/sw/source/ui/utlui/viewlayoutctrl.cxx
+++ b/sw/source/ui/utlui/viewlayoutctrl.cxx
@@ -58,7 +58,7 @@ const long nImageHeight = 11;
struct SwViewLayoutControl::SwViewLayoutControl_Impl
{
- USHORT mnState; // 0 = single, 1 = auto, 2 = book, 3 = none
+ sal_uInt16 mnState; // 0 = single, 1 = auto, 2 = book, 3 = none
Image maImageSingleColumn;
Image maImageSingleColumn_Active;
Image maImageAutomatic;
@@ -69,7 +69,7 @@ struct SwViewLayoutControl::SwViewLayoutControl_Impl
// class SwViewLayoutControl ------------------------------------------
-SwViewLayoutControl::SwViewLayoutControl( USHORT _nSlotId, USHORT _nId, StatusBar& rStb ) :
+SwViewLayoutControl::SwViewLayoutControl( sal_uInt16 _nSlotId, sal_uInt16 _nId, StatusBar& rStb ) :
SfxStatusBarControl( _nSlotId, _nId, rStb ),
mpImpl( new SwViewLayoutControl_Impl )
{
@@ -93,14 +93,14 @@ SwViewLayoutControl::~SwViewLayoutControl()
// -----------------------------------------------------------------------
-void SwViewLayoutControl::StateChanged( USHORT /*nSID*/, SfxItemState eState, const SfxPoolItem* pState )
+void SwViewLayoutControl::StateChanged( sal_uInt16 /*nSID*/, SfxItemState eState, const SfxPoolItem* pState )
{
if ( SFX_ITEM_AVAILABLE != eState || pState->ISA( SfxVoidItem ) )
GetStatusBar().SetItemText( GetId(), String() );
else
{
DBG_ASSERT( pState->ISA( SvxViewLayoutItem ), "invalid item type" );
- const USHORT nColumns = static_cast<const SvxViewLayoutItem*>( pState )->GetValue();
+ const sal_uInt16 nColumns = static_cast<const SvxViewLayoutItem*>( pState )->GetValue();
const bool bBookMode = static_cast<const SvxViewLayoutItem*>( pState )->IsBookMode();
// SingleColumn Mode
@@ -165,13 +165,13 @@ void SwViewLayoutControl::Paint( const UserDrawEvent& rUsrEvt )
//pDev->SetFillColor( aOldFillColor );
}
-BOOL SwViewLayoutControl::MouseButtonDown( const MouseEvent & rEvt )
+sal_Bool SwViewLayoutControl::MouseButtonDown( const MouseEvent & rEvt )
{
const Rectangle aRect = getControlRect();
const Point aPoint = rEvt.GetPosPixel();
const long nXDiff = aPoint.X() - aRect.Left();
- USHORT nColumns = 1;
+ sal_uInt16 nColumns = 1;
bool bBookMode = false;
const long nXOffset = (aRect.GetWidth() - nImageWidthSum)/2;
@@ -205,5 +205,5 @@ BOOL SwViewLayoutControl::MouseButtonDown( const MouseEvent & rEvt )
execute( aArgs );
- return TRUE;
+ return sal_True;
}
diff --git a/sw/source/ui/utlui/zoomctrl.cxx b/sw/source/ui/utlui/zoomctrl.cxx
index 986cf6463c..2c3965cac6 100644
--- a/sw/source/ui/utlui/zoomctrl.cxx
+++ b/sw/source/ui/utlui/zoomctrl.cxx
@@ -46,8 +46,8 @@
SFX_IMPL_STATUSBAR_CONTROL( SwZoomControl, SvxZoomItem );
-SwZoomControl::SwZoomControl( USHORT _nSlotId,
- USHORT _nId,
+SwZoomControl::SwZoomControl( sal_uInt16 _nSlotId,
+ sal_uInt16 _nId,
StatusBar& rStb ) :
SvxZoomStatusBarControl( _nSlotId, _nId, rStb )
{
@@ -61,7 +61,7 @@ SwZoomControl::~SwZoomControl()
// -----------------------------------------------------------------------
-void SwZoomControl::StateChanged( USHORT nSID, SfxItemState eState,
+void SwZoomControl::StateChanged( sal_uInt16 nSID, SfxItemState eState,
const SfxPoolItem* pState )
{
if(SFX_ITEM_AVAILABLE == eState && pState->ISA( SfxStringItem ))
diff --git a/sw/source/ui/vba/vbadocumentproperties.cxx b/sw/source/ui/vba/vbadocumentproperties.cxx
index 475ca93751..ed540e931f 100644
--- a/sw/source/ui/vba/vbadocumentproperties.cxx
+++ b/sw/source/ui/vba/vbadocumentproperties.cxx
@@ -150,7 +150,7 @@ public:
SwFEShell* pFEShell = mpDocShell->GetFEShell();
if(pFEShell)
{
- aReturn <<= pFEShell->GetLineCount(FALSE);
+ aReturn <<= pFEShell->GetLineCount(sal_False);
}
}
}
diff --git a/sw/source/ui/vba/vbafield.cxx b/sw/source/ui/vba/vbafield.cxx
index 8e9661d0af..d702607bdb 100644
--- a/sw/source/ui/vba/vbafield.cxx
+++ b/sw/source/ui/vba/vbafield.cxx
@@ -239,10 +239,10 @@ xub_StrLen _ReadFieldParams::FindNextStringPiece(const xub_StrLen nStart)
// read parameters "1-3" or 1-3 with both values between 1 and nMax
-bool _ReadFieldParams::GetTokenSttFromTo(USHORT* pFrom, USHORT* pTo, USHORT nMax)
+bool _ReadFieldParams::GetTokenSttFromTo(sal_uInt16* pFrom, sal_uInt16* pTo, sal_uInt16 nMax)
{
- USHORT nStart = 0;
- USHORT nEnd = 0;
+ sal_uInt16 nStart = 0;
+ sal_uInt16 nEnd = 0;
xub_StrLen n = GoToTokenParam();
if( STRING_NOTFOUND != n )
{
@@ -253,8 +253,8 @@ bool _ReadFieldParams::GetTokenSttFromTo(USHORT* pFrom, USHORT* pTo, USHORT nMax
String sStart( sParams.GetToken(0, '-', nIndex) );
if( STRING_NOTFOUND != nIndex )
{
- nStart = static_cast<USHORT>(sStart.ToInt32());
- nEnd = static_cast<USHORT>(sParams.Copy(nIndex).ToInt32());
+ nStart = static_cast<sal_uInt16>(sStart.ToInt32());
+ nEnd = static_cast<sal_uInt16>(sParams.Copy(nIndex).ToInt32());
}
}
if( pFrom ) *pFrom = nStart;
diff --git a/sw/source/ui/vba/vbaselection.cxx b/sw/source/ui/vba/vbaselection.cxx
index 17d4e2f5a3..234e46412a 100644
--- a/sw/source/ui/vba/vbaselection.cxx
+++ b/sw/source/ui/vba/vbaselection.cxx
@@ -112,7 +112,7 @@ SwVbaSelection::setText( const rtl::OUString& rText ) throw ( uno::RuntimeExcept
void SAL_CALL
SwVbaSelection::TypeText( const rtl::OUString& rText ) throw ( uno::RuntimeException )
{
- // FIXME: handle the property Options.ReplaceSelection, the default value is TRUE
+ // FIXME: handle the property Options.ReplaceSelection, the default value is sal_True
setText( rText );
}
diff --git a/sw/source/ui/web/wview.cxx b/sw/source/ui/web/wview.cxx
index ce6abf2289..10dbbcc29f 100644
--- a/sw/source/ui/web/wview.cxx
+++ b/sw/source/ui/web/wview.cxx
@@ -130,11 +130,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!
@@ -144,7 +144,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!
@@ -167,8 +167,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 ) ||
@@ -180,15 +180,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;
@@ -260,7 +260,7 @@ void SwWebView::SelectShell()
}
else
{
- bSetExtInpCntxt = TRUE;
+ bSetExtInpCntxt = sal_True;
eShellMode = SHELL_MODE_TEXT;
if ( _nSelectionType & nsSelectionType::SEL_NUM )
{
@@ -284,7 +284,7 @@ void SwWebView::SelectShell()
if( !GetDocShell()->IsReadOnly() )
{
if( bSetExtInpCntxt && GetWrtShell().HasReadonlySel() )
- bSetExtInpCntxt = FALSE;
+ bSetExtInpCntxt = sal_False;
InputContext aCntxt( GetEditWin().GetInputContext() );
aCntxt.SetOptions( bSetExtInpCntxt
@@ -318,7 +318,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 8a4c68cbd0..a376151fab 100644
--- a/sw/source/ui/wrtsh/delete.cxx
+++ b/sw/source/ui/wrtsh/delete.cxx
@@ -50,7 +50,7 @@ inline void SwWrtShell::OpenMark()
SetMark();
}
-inline void SwWrtShell::CloseMark( BOOL bOkFlag )
+inline void SwWrtShell::CloseMark( sal_Bool bOkFlag )
{
if( bOkFlag )
UpdateAttr();
@@ -62,9 +62,9 @@ inline void SwWrtShell::CloseMark( BOOL bOkFlag )
}
// #i23725#
-BOOL SwWrtShell::TryRemoveIndent()
+sal_Bool SwWrtShell::TryRemoveIndent()
{
- BOOL bResult = FALSE;
+ sal_Bool bResult = sal_False;
SfxItemSet aAttrSet(GetAttrPool(), RES_LR_SPACE, RES_LR_SPACE);
GetCurAttr(aAttrSet);
@@ -75,19 +75,19 @@ BOOL SwWrtShell::TryRemoveIndent()
if (aOldFirstLineOfst > 0)
{
aItem.SetTxtFirstLineOfst(0);
- bResult = TRUE;
+ bResult = sal_True;
}
else if (aOldFirstLineOfst < 0)
{
aItem.SetTxtFirstLineOfst(0);
aItem.SetLeft(aItem.GetLeft() + aOldFirstLineOfst);
- bResult = TRUE;
+ bResult = sal_True;
}
else if (aItem.GetLeft() != 0)
{
aItem.SetLeft(0);
- bResult = TRUE;
+ bResult = sal_True;
}
if (bResult)
@@ -119,7 +119,7 @@ long SwWrtShell::DelLine()
// if(!IsEndOfPara())
// SwCrsrShell::Right();
long nRet = Delete();
- Pop(FALSE);
+ Pop(sal_False);
if( nRet )
UpdateAttr();
return nRet;
@@ -203,7 +203,7 @@ long SwWrtShell::DelLeft()
}
// JP 29.06.95: nie eine davor stehende Tabelle loeschen.
- BOOL bSwap = FALSE;
+ sal_Bool bSwap = sal_False;
const SwTableNode * pWasInTblNd = SwCrsrShell::IsCrsrInTbl();
if( SwCrsrShell::IsSttPara())
@@ -239,7 +239,7 @@ long SwWrtShell::DelLeft()
OpenMark();
SwCrsrShell::Right(1,CRSR_SKIP_CHARS);
SwCrsrShell::SwapPam();
- bSwap = TRUE;
+ bSwap = sal_True;
}
else
{
@@ -316,7 +316,7 @@ long SwWrtShell::DelRight()
}
// restore cursor
- SwCrsrShell::Pop( FALSE );
+ SwCrsrShell::Pop( sal_False );
if( bDelFull )
{
@@ -356,14 +356,14 @@ long SwWrtShell::DelRight()
have moved to a different cell */
if (pSNdOld != pSNdNew)
{
- SwCrsrShell::Pop( TRUE );
+ SwCrsrShell::Pop( sal_True );
break;
}
}
}
// restore cursor
- SwCrsrShell::Pop( FALSE );
+ SwCrsrShell::Pop( sal_False );
}
}
@@ -440,11 +440,11 @@ long SwWrtShell::DelToEndOfPara()
SetMark();
if( !MovePara(fnParaCurr,fnParaEnd))
{
- Pop(FALSE);
+ Pop(sal_False);
return 0;
}
long nRet = Delete();
- Pop(FALSE);
+ Pop(sal_False);
if( nRet )
UpdateAttr();
return nRet;
@@ -460,11 +460,11 @@ long SwWrtShell::DelToStartOfPara()
SetMark();
if( !MovePara(fnParaCurr,fnParaStart))
{
- Pop(FALSE);
+ Pop(sal_False);
return 0;
}
long nRet = Delete();
- Pop(FALSE);
+ Pop(sal_False);
if( nRet )
UpdateAttr();
return nRet;
@@ -544,11 +544,11 @@ long SwWrtShell::DelPrvWord()
{
// skip over all-1 spaces
short n = -1;
- while( ' ' == GetChar( FALSE, n ))
+ while( ' ' == GetChar( sal_False, n ))
--n;
if( ++n )
- ExtendSelection( FALSE, -n );
+ ExtendSelection( sal_False, -n );
}
}
else if( IsSttPara())
diff --git a/sw/source/ui/wrtsh/move.cxx b/sw/source/ui/wrtsh/move.cxx
index 3e649a9057..89472a1316 100644
--- a/sw/source/ui/wrtsh/move.cxx
+++ b/sw/source/ui/wrtsh/move.cxx
@@ -54,12 +54,12 @@ const long nReadOnlyScrollOfst = 10;
class ShellMoveCrsr
{
SwWrtShell* pSh;
- BOOL bAct;
+ sal_Bool bAct;
public:
- inline ShellMoveCrsr( SwWrtShell* pWrtSh, BOOL bSel )
+ inline ShellMoveCrsr( SwWrtShell* pWrtSh, sal_Bool bSel )
{
- bAct = !pWrtSh->ActionPend() && (pWrtSh->GetFrmType(0,FALSE) & FRMTYPE_FLY_ANY);
- ( pSh = pWrtSh )->MoveCrsr( BOOL(bSel) );
+ bAct = !pWrtSh->ActionPend() && (pWrtSh->GetFrmType(0,sal_False) & FRMTYPE_FLY_ANY);
+ ( pSh = pWrtSh )->MoveCrsr( sal_Bool(bSel) );
pWrtSh->GetView().GetViewFrame()->GetBindings().Invalidate(SID_HYPERLINK_GETLINK);
}
inline ~ShellMoveCrsr()
@@ -74,7 +74,7 @@ public:
}
};
-void SwWrtShell::MoveCrsr( BOOL bWithSelect )
+void SwWrtShell::MoveCrsr( sal_Bool bWithSelect )
{
ResetCursorStack();
if ( IsGCAttr() )
@@ -87,35 +87,35 @@ void SwWrtShell::MoveCrsr( BOOL bWithSelect )
else
{
EndSelect();
- (this->*fnKillSel)( 0, FALSE );
+ (this->*fnKillSel)( 0, sal_False );
}
}
-BOOL SwWrtShell::SimpleMove( FNSimpleMove FnSimpleMove, BOOL bSelect )
+sal_Bool SwWrtShell::SimpleMove( FNSimpleMove FnSimpleMove, sal_Bool bSelect )
{
- BOOL nRet;
+ sal_Bool nRet;
if( bSelect )
{
SttCrsrMove();
- MoveCrsr( TRUE );
+ MoveCrsr( sal_True );
nRet = (this->*FnSimpleMove)();
EndCrsrMove();
}
else if( 0 != ( nRet = (this->*FnSimpleMove)() ) )
- MoveCrsr( FALSE );
+ MoveCrsr( sal_False );
return nRet;
}
-BOOL SwWrtShell::Left( USHORT nMode, BOOL bSelect,
- USHORT nCount, BOOL bBasicCall, BOOL bVisual )
+sal_Bool SwWrtShell::Left( sal_uInt16 nMode, sal_Bool bSelect,
+ sal_uInt16 nCount, sal_Bool bBasicCall, sal_Bool bVisual )
{
if ( !bSelect && !bBasicCall && IsCrsrReadonly() && !GetViewOptions()->IsSelectionInReadonly())
{
Point aTmp( VisArea().Pos() );
aTmp.X() -= VisArea().Width() * nReadOnlyScrollOfst / 100;
rView.SetVisArea( aTmp );
- return TRUE;
+ return sal_True;
}
else
{
@@ -126,8 +126,8 @@ BOOL SwWrtShell::Left( USHORT nMode, BOOL bSelect,
-BOOL SwWrtShell::Right( USHORT nMode, BOOL bSelect,
- USHORT nCount, BOOL bBasicCall, BOOL bVisual )
+sal_Bool SwWrtShell::Right( sal_uInt16 nMode, sal_Bool bSelect,
+ sal_uInt16 nCount, sal_Bool bBasicCall, sal_Bool bVisual )
{
if ( !bSelect && !bBasicCall && IsCrsrReadonly() && !GetViewOptions()->IsSelectionInReadonly() )
{
@@ -135,7 +135,7 @@ BOOL SwWrtShell::Right( USHORT nMode, BOOL bSelect,
aTmp.X() += VisArea().Width() * nReadOnlyScrollOfst / 100;
aTmp.X() = rView.SetHScrollMax( aTmp.X() );
rView.SetVisArea( aTmp );
- return TRUE;
+ return sal_True;
}
else
{
@@ -146,14 +146,14 @@ BOOL SwWrtShell::Right( USHORT nMode, BOOL bSelect,
-BOOL SwWrtShell::Up( BOOL bSelect, USHORT nCount, BOOL bBasicCall )
+sal_Bool SwWrtShell::Up( sal_Bool bSelect, sal_uInt16 nCount, sal_Bool bBasicCall )
{
if ( !bSelect && !bBasicCall && IsCrsrReadonly() && !GetViewOptions()->IsSelectionInReadonly())
{
Point aTmp( VisArea().Pos() );
aTmp.Y() -= VisArea().Height() * nReadOnlyScrollOfst / 100;
rView.SetVisArea( aTmp );
- return TRUE;
+ return sal_True;
}
else
{
@@ -164,7 +164,7 @@ BOOL SwWrtShell::Up( BOOL bSelect, USHORT nCount, BOOL bBasicCall )
-BOOL SwWrtShell::Down( BOOL bSelect, USHORT nCount, BOOL bBasicCall )
+sal_Bool SwWrtShell::Down( sal_Bool bSelect, sal_uInt16 nCount, sal_Bool bBasicCall )
{
if ( !bSelect && !bBasicCall && IsCrsrReadonly() && !GetViewOptions()->IsSelectionInReadonly())
{
@@ -172,7 +172,7 @@ BOOL SwWrtShell::Down( BOOL bSelect, USHORT nCount, BOOL bBasicCall )
aTmp.Y() += VisArea().Height() * nReadOnlyScrollOfst / 100;
aTmp.Y() = rView.SetVScrollMax( aTmp.Y() );
rView.SetVisArea( aTmp );
- return TRUE;
+ return sal_True;
}
else
{
@@ -183,14 +183,14 @@ BOOL SwWrtShell::Down( BOOL bSelect, USHORT nCount, BOOL bBasicCall )
-BOOL SwWrtShell::LeftMargin( BOOL bSelect, BOOL bBasicCall )
+sal_Bool SwWrtShell::LeftMargin( sal_Bool bSelect, sal_Bool bBasicCall )
{
if ( !bSelect && !bBasicCall && IsCrsrReadonly() )
{
Point aTmp( VisArea().Pos() );
aTmp.X() = DOCUMENTBORDER;
rView.SetVisArea( aTmp );
- return TRUE;
+ return sal_True;
}
else
{
@@ -201,7 +201,7 @@ BOOL SwWrtShell::LeftMargin( BOOL bSelect, BOOL bBasicCall )
-BOOL SwWrtShell::RightMargin( BOOL bSelect, BOOL bBasicCall )
+sal_Bool SwWrtShell::RightMargin( sal_Bool bSelect, sal_Bool bBasicCall )
{
if ( !bSelect && !bBasicCall && IsCrsrReadonly() )
{
@@ -210,7 +210,7 @@ BOOL SwWrtShell::RightMargin( BOOL bSelect, BOOL bBasicCall )
if( DOCUMENTBORDER > aTmp.X() )
aTmp.X() = DOCUMENTBORDER;
rView.SetVisArea( aTmp );
- return TRUE;
+ return sal_True;
}
else
{
@@ -221,12 +221,12 @@ BOOL SwWrtShell::RightMargin( BOOL bSelect, BOOL bBasicCall )
-BOOL SwWrtShell::GoStart( BOOL bKeepArea, BOOL *pMoveTable,
- BOOL bSelect, BOOL bDontMoveRegion )
+sal_Bool SwWrtShell::GoStart( sal_Bool bKeepArea, sal_Bool *pMoveTable,
+ sal_Bool bSelect, sal_Bool bDontMoveRegion )
{
if ( IsCrsrInTbl() )
{
- const BOOL bBoxSelection = HasBoxSelection();
+ const sal_Bool bBoxSelection = HasBoxSelection();
if( !bBlockMode )
{
if ( !bSelect )
@@ -239,14 +239,14 @@ BOOL SwWrtShell::GoStart( BOOL bKeepArea, BOOL *pMoveTable,
|| bDontMoveRegion))
{
if ( pMoveTable )
- *pMoveTable = FALSE;
- return TRUE;
+ *pMoveTable = sal_False;
+ return sal_True;
}
if( MoveTable( fnTableCurr, fnTableStart ) || bDontMoveRegion )
{
if ( pMoveTable )
- *pMoveTable = TRUE;
- return TRUE;
+ *pMoveTable = sal_True;
+ return sal_True;
}
else if( bBoxSelection && pMoveTable )
{
@@ -255,8 +255,8 @@ BOOL SwWrtShell::GoStart( BOOL bKeepArea, BOOL *pMoveTable,
// SelAll gesetzt). Dann darf die Tabelle nicht
// verlassen werden; sonst ist keine Selektion der
// gesamten Tabelle moeglich!
- *pMoveTable = TRUE;
- return TRUE;
+ *pMoveTable = sal_True;
+ return sal_True;
}
}
@@ -267,29 +267,29 @@ BOOL SwWrtShell::GoStart( BOOL bKeepArea, BOOL *pMoveTable,
else
SttSelect();
}
- const USHORT nFrmType = GetFrmType(0,FALSE);
+ const sal_uInt16 nFrmType = GetFrmType(0,sal_False);
if ( FRMTYPE_FLY_ANY & nFrmType )
{
if( MoveSection( fnSectionCurr, fnSectionStart ) )
- return TRUE;
+ return sal_True;
else if ( FRMTYPE_FLY_FREE & nFrmType || bDontMoveRegion )
- return FALSE;
+ return sal_False;
}
if(( FRMTYPE_HEADER | FRMTYPE_FOOTER | FRMTYPE_FOOTNOTE ) & nFrmType )
{
if ( MoveSection( fnSectionCurr, fnSectionStart ) )
- return TRUE;
+ return sal_True;
else if ( bKeepArea )
- return TRUE;
+ return sal_True;
}
// Bereiche ???
return SwCrsrShell::MoveRegion( fnRegionCurrAndSkip, fnRegionStart ) ||
- SwCrsrShell::SttEndDoc(TRUE);
+ SwCrsrShell::SttEndDoc(sal_True);
}
-BOOL SwWrtShell::GoEnd(BOOL bKeepArea, BOOL *pMoveTable)
+sal_Bool SwWrtShell::GoEnd(sal_Bool bKeepArea, sal_Bool *pMoveTable)
{
if ( pMoveTable && *pMoveTable )
return MoveTable( fnTableCurr, fnTableEnd );
@@ -298,49 +298,49 @@ BOOL SwWrtShell::GoEnd(BOOL bKeepArea, BOOL *pMoveTable)
{
if ( MoveSection( fnSectionCurr, fnSectionEnd ) ||
MoveTable( fnTableCurr, fnTableEnd ) )
- return TRUE;
+ return sal_True;
}
else
{
- const USHORT nFrmType = GetFrmType(0,FALSE);
+ const sal_uInt16 nFrmType = GetFrmType(0,sal_False);
if ( FRMTYPE_FLY_ANY & nFrmType )
{
if ( MoveSection( fnSectionCurr, fnSectionEnd ) )
- return TRUE;
+ return sal_True;
else if ( FRMTYPE_FLY_FREE & nFrmType )
- return FALSE;
+ return sal_False;
}
if(( FRMTYPE_HEADER | FRMTYPE_FOOTER | FRMTYPE_FOOTNOTE ) & nFrmType )
{
if ( MoveSection( fnSectionCurr, fnSectionEnd) )
- return TRUE;
+ return sal_True;
else if ( bKeepArea )
- return TRUE;
+ return sal_True;
}
}
// Bereiche ???
return SwCrsrShell::MoveRegion( fnRegionCurrAndSkip, fnRegionEnd ) ||
- SwCrsrShell::SttEndDoc(FALSE);
+ SwCrsrShell::SttEndDoc(sal_False);
}
-BOOL SwWrtShell::SttDoc( BOOL bSelect )
+sal_Bool SwWrtShell::SttDoc( sal_Bool bSelect )
{
ShellMoveCrsr aTmp( this, bSelect );
- return GoStart(FALSE, 0, bSelect );
+ return GoStart(sal_False, 0, bSelect );
}
-BOOL SwWrtShell::EndDoc( BOOL bSelect)
+sal_Bool SwWrtShell::EndDoc( sal_Bool bSelect)
{
ShellMoveCrsr aTmp( this, bSelect );
return GoEnd();
}
-BOOL SwWrtShell::SttNxtPg( BOOL bSelect )
+sal_Bool SwWrtShell::SttNxtPg( sal_Bool bSelect )
{
ShellMoveCrsr aTmp( this, bSelect );
return MovePage( fnPageNext, fnPageStart );
@@ -348,7 +348,7 @@ BOOL SwWrtShell::SttNxtPg( BOOL bSelect )
-BOOL SwWrtShell::SttPrvPg( BOOL bSelect )
+sal_Bool SwWrtShell::SttPrvPg( sal_Bool bSelect )
{
ShellMoveCrsr aTmp( this, bSelect );
return MovePage( fnPagePrev, fnPageStart );
@@ -356,7 +356,7 @@ BOOL SwWrtShell::SttPrvPg( BOOL bSelect )
-BOOL SwWrtShell::EndNxtPg( BOOL bSelect )
+sal_Bool SwWrtShell::EndNxtPg( sal_Bool bSelect )
{
ShellMoveCrsr aTmp( this, bSelect );
return MovePage( fnPageNext, fnPageEnd );
@@ -364,7 +364,7 @@ BOOL SwWrtShell::EndNxtPg( BOOL bSelect )
-BOOL SwWrtShell::EndPrvPg( BOOL bSelect )
+sal_Bool SwWrtShell::EndPrvPg( sal_Bool bSelect )
{
ShellMoveCrsr aTmp( this, bSelect );
return MovePage( fnPagePrev, fnPageEnd );
@@ -372,7 +372,7 @@ BOOL SwWrtShell::EndPrvPg( BOOL bSelect )
-BOOL SwWrtShell::SttPg( BOOL bSelect )
+sal_Bool SwWrtShell::SttPg( sal_Bool bSelect )
{
ShellMoveCrsr aTmp( this, bSelect );
return MovePage( fnPageCurr, fnPageStart );
@@ -380,7 +380,7 @@ BOOL SwWrtShell::SttPg( BOOL bSelect )
-BOOL SwWrtShell::EndPg( BOOL bSelect )
+sal_Bool SwWrtShell::EndPg( sal_Bool bSelect )
{
ShellMoveCrsr aTmp( this, bSelect );
return MovePage( fnPageCurr, fnPageEnd );
@@ -388,7 +388,7 @@ BOOL SwWrtShell::EndPg( BOOL bSelect )
-BOOL SwWrtShell::SttPara( BOOL bSelect )
+sal_Bool SwWrtShell::SttPara( sal_Bool bSelect )
{
ShellMoveCrsr aTmp( this, bSelect );
return MovePara( fnParaCurr, fnParaStart );
@@ -396,7 +396,7 @@ BOOL SwWrtShell::SttPara( BOOL bSelect )
-BOOL SwWrtShell::EndPara( BOOL bSelect )
+sal_Bool SwWrtShell::EndPara( sal_Bool bSelect )
{
ShellMoveCrsr aTmp( this, bSelect );
return MovePara(fnParaCurr,fnParaEnd);
@@ -411,7 +411,7 @@ BOOL SwWrtShell::EndPara( BOOL bSelect )
-BOOL SwWrtShell::StartOfColumn( BOOL bSelect )
+sal_Bool SwWrtShell::StartOfColumn( sal_Bool bSelect )
{
ShellMoveCrsr aTmp( this, bSelect);
return MoveColumn(fnColumnCurr, fnColumnStart);
@@ -419,7 +419,7 @@ BOOL SwWrtShell::StartOfColumn( BOOL bSelect )
-BOOL SwWrtShell::EndOfColumn( BOOL bSelect )
+sal_Bool SwWrtShell::EndOfColumn( sal_Bool bSelect )
{
ShellMoveCrsr aTmp( this, bSelect);
return MoveColumn(fnColumnCurr, fnColumnEnd);
@@ -427,7 +427,7 @@ BOOL SwWrtShell::EndOfColumn( BOOL bSelect )
-BOOL SwWrtShell::StartOfNextColumn( BOOL bSelect )
+sal_Bool SwWrtShell::StartOfNextColumn( sal_Bool bSelect )
{
ShellMoveCrsr aTmp( this, bSelect);
return MoveColumn( fnColumnNext, fnColumnStart);
@@ -435,7 +435,7 @@ BOOL SwWrtShell::StartOfNextColumn( BOOL bSelect )
-BOOL SwWrtShell::EndOfNextColumn( BOOL bSelect )
+sal_Bool SwWrtShell::EndOfNextColumn( sal_Bool bSelect )
{
ShellMoveCrsr aTmp( this, bSelect);
return MoveColumn(fnColumnNext, fnColumnEnd);
@@ -443,7 +443,7 @@ BOOL SwWrtShell::EndOfNextColumn( BOOL bSelect )
-BOOL SwWrtShell::StartOfPrevColumn( BOOL bSelect )
+sal_Bool SwWrtShell::StartOfPrevColumn( sal_Bool bSelect )
{
ShellMoveCrsr aTmp( this, bSelect);
return MoveColumn(fnColumnPrev, fnColumnStart);
@@ -451,7 +451,7 @@ BOOL SwWrtShell::StartOfPrevColumn( BOOL bSelect )
-BOOL SwWrtShell::EndOfPrevColumn( BOOL bSelect )
+sal_Bool SwWrtShell::EndOfPrevColumn( sal_Bool bSelect )
{
ShellMoveCrsr aTmp( this, bSelect);
return MoveColumn(fnColumnPrev, fnColumnEnd);
@@ -459,9 +459,9 @@ BOOL SwWrtShell::EndOfPrevColumn( BOOL bSelect )
-BOOL SwWrtShell::PushCrsr(SwTwips lOffset, BOOL bSelect)
+sal_Bool SwWrtShell::PushCrsr(SwTwips lOffset, sal_Bool bSelect)
{
- BOOL bDiff = FALSE;
+ sal_Bool bDiff = sal_False;
SwRect aOldRect( GetCharRect() ), aTmpArea( VisArea() );
//bDestOnStack besagt, ob ich den Cursor nicht an die aktuelle Position
@@ -478,15 +478,15 @@ BOOL SwWrtShell::PushCrsr(SwTwips lOffset, BOOL bSelect)
aPt.Y() += lOffset;
aDest = GetCntntPos(aPt,lOffset > 0);
aDest.X() = aPt.X();
- bDestOnStack = TRUE;
+ bDestOnStack = sal_True;
}
//falls wir eine Rahmenselektion hatten, muss diese nach dem
//fnSetCrsr entfernt werden und damit wir da wieder hinkommen
//auf dem Stack gemerkt werden.
- BOOL bIsFrmSel = FALSE;
+ sal_Bool bIsFrmSel = sal_False;
- BOOL bIsObjSel = FALSE;
+ sal_Bool bIsObjSel = sal_False;
//Zielposition liegt jetzt innerhalb des sichtbaren Bereiches -->
//Cursor an die Zielposition setzen; merken, dass keine Ziel-
@@ -517,7 +517,7 @@ BOOL SwWrtShell::PushCrsr(SwTwips lOffset, BOOL bSelect)
CallChgLnk();
}
- (this->*fnSetCrsr)( &aDest, TRUE );
+ (this->*fnSetCrsr)( &aDest, sal_True );
bDiff = aOldRect != GetCharRect();
@@ -530,7 +530,7 @@ BOOL SwWrtShell::PushCrsr(SwTwips lOffset, BOOL bSelect)
}
// Zuruecksetzen des Dest. SPoint Flags
- bDestOnStack = FALSE;
+ bDestOnStack = sal_False;
}
// Position auf den Stack; bDiff besagt, ob ein Unterschied zwischen
@@ -542,12 +542,12 @@ BOOL SwWrtShell::PushCrsr(SwTwips lOffset, BOOL bSelect)
-BOOL SwWrtShell::PopCrsr(BOOL bUpdate, BOOL bSelect)
+sal_Bool SwWrtShell::PopCrsr(sal_Bool bUpdate, sal_Bool bSelect)
{
if( 0 == pCrsrStack)
- return FALSE;
+ return sal_False;
- const BOOL bValidPos = pCrsrStack->bValidCurPos;
+ const sal_Bool bValidPos = pCrsrStack->bValidCurPos;
if( bUpdate && bValidPos )
{
// falls ein Vorgaenger auf dem Stack steht, dessen Flag fuer eine
@@ -575,7 +575,7 @@ BOOL SwWrtShell::PopCrsr(BOOL bUpdate, BOOL bSelect)
else
{
_ResetCursorStack();
- return FALSE;
+ return sal_False;
}
}
CrsrStack *pTmp = pCrsrStack;
@@ -584,7 +584,7 @@ BOOL SwWrtShell::PopCrsr(BOOL bUpdate, BOOL bSelect)
if( 0 == pCrsrStack )
{
ePageMove = MV_NO;
- bDestOnStack = FALSE;
+ bDestOnStack = sal_False;
}
return bValidPos;
}
@@ -606,7 +606,7 @@ void SwWrtShell::_ResetCursorStack()
pCrsrStack = pTmp;
}
ePageMove = MV_NO;
- bDestOnStack = FALSE;
+ bDestOnStack = sal_False;
}
/**************
@@ -621,10 +621,10 @@ void SwWrtShell::_ResetCursorStack()
-BOOL SwWrtShell::PageCrsr(SwTwips lOffset, BOOL bSelect)
+sal_Bool SwWrtShell::PageCrsr(SwTwips lOffset, sal_Bool bSelect)
{
// nichts tun, wenn ein Offset von 0 angegeben wurde
- if(!lOffset) return FALSE;
+ if(!lOffset) return sal_False;
// Diente mal dazu, eine Neuformatierung fuer das Layout
// zu erzwingen.
// Hat so nicht funktioniert, da der Cursor nicht gesetzt
@@ -640,19 +640,19 @@ BOOL SwWrtShell::PageCrsr(SwTwips lOffset, BOOL bSelect)
// ViewShell::StartAction();
PageMove eDir = lOffset > 0? MV_PAGE_DOWN: MV_PAGE_UP;
// Richtungswechsel und Stack vorhanden
- if( eDir != ePageMove && ePageMove != MV_NO && PopCrsr( TRUE, bSelect ))
- return TRUE;
+ if( eDir != ePageMove && ePageMove != MV_NO && PopCrsr( sal_True, bSelect ))
+ return sal_True;
- const BOOL bRet = PushCrsr(lOffset, bSelect);
+ const sal_Bool bRet = PushCrsr(lOffset, bSelect);
ePageMove = eDir;
return bRet;
}
-BOOL SwWrtShell::GotoPage(USHORT nPage, BOOL bRecord)
+sal_Bool SwWrtShell::GotoPage(sal_uInt16 nPage, sal_Bool bRecord)
{
- ShellMoveCrsr aTmp( this, FALSE);
+ ShellMoveCrsr aTmp( this, sal_False);
if( SwCrsrShell::GotoPage(nPage) && bRecord)
{
if(IsSelFrmMode())
@@ -660,14 +660,14 @@ BOOL SwWrtShell::GotoPage(USHORT nPage, BOOL bRecord)
UnSelectFrm();
LeaveSelFrmMode();
}
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
-BOOL SwWrtShell::GotoMark( const ::sw::mark::IMark* const pMark, BOOL bSelect, BOOL bStart )
+sal_Bool SwWrtShell::GotoMark( const ::sw::mark::IMark* const pMark, sal_Bool bSelect, sal_Bool bStart )
{
ShellMoveCrsr aTmp( this, bSelect );
return SwCrsrShell::GotoMark( pMark, bStart );
@@ -675,13 +675,13 @@ BOOL SwWrtShell::GotoMark( const ::sw::mark::IMark* const pMark, BOOL bSelect, B
-BOOL SwWrtShell::SelectTxtAttr( USHORT nWhich, const SwTxtAttr* pAttr )
+sal_Bool SwWrtShell::SelectTxtAttr( sal_uInt16 nWhich, const SwTxtAttr* pAttr )
{
- BOOL bRet;
+ sal_Bool bRet;
{
MV_KONTEXT(this);
SttSelect();
- bRet = SwCrsrShell::SelectTxtAttr( nWhich, FALSE, pAttr );
+ bRet = SwCrsrShell::SelectTxtAttr( nWhich, sal_False, pAttr );
}
EndSelect();
return bRet;
diff --git a/sw/source/ui/wrtsh/select.cxx b/sw/source/ui/wrtsh/select.cxx
index 45d1765671..0473d1f70a 100644
--- a/sw/source/ui/wrtsh/select.cxx
+++ b/sw/source/ui/wrtsh/select.cxx
@@ -62,7 +62,7 @@ using namespace ::com::sun::star::util;
static long nStartDragX = 0, nStartDragY = 0;
-static BOOL bStartDrag = FALSE;
+static sal_Bool bStartDrag = sal_False;
void SwWrtShell::Invalidate()
{
@@ -71,21 +71,21 @@ void SwWrtShell::Invalidate()
GetView().GetViewFrame()->GetBindings().Invalidate( FN_STAT_SELMODE );
}
-BOOL SwWrtShell::SelNearestWrd()
+sal_Bool SwWrtShell::SelNearestWrd()
{
MV_KONTEXT(this);
if( !IsInWrd() && !IsEndWrd() && !IsSttWrd() )
PrvWrd();
if( IsEndWrd() )
- Left(CRSR_SKIP_CELLS, FALSE, 1, FALSE );
+ Left(CRSR_SKIP_CELLS, sal_False, 1, sal_False );
return SelWrd();
}
-BOOL SwWrtShell::SelWrd(const Point *pPt, BOOL )
+sal_Bool SwWrtShell::SelWrd(const Point *pPt, sal_Bool )
{
- BOOL bRet;
+ sal_Bool bRet;
{
MV_KONTEXT(this);
SttSelect();
@@ -94,14 +94,14 @@ BOOL SwWrtShell::SelWrd(const Point *pPt, BOOL )
EndSelect();
if( bRet )
{
- bSelWrd = TRUE;
+ bSelWrd = sal_True;
if(pPt)
aStart = *pPt;
}
return bRet;
}
-void SwWrtShell::SelSentence(const Point *pPt, BOOL )
+void SwWrtShell::SelSentence(const Point *pPt, sal_Bool )
{
{
MV_KONTEXT(this);
@@ -113,11 +113,11 @@ void SwWrtShell::SelSentence(const Point *pPt, BOOL )
EndSelect();
if(pPt)
aStart = *pPt;
- bSelLn = TRUE;
- bSelWrd = FALSE; // SelWord abschalten, sonst geht kein SelLine weiter
+ bSelLn = sal_True;
+ bSelWrd = sal_False; // SelWord abschalten, sonst geht kein SelLine weiter
}
-void SwWrtShell::SelPara(const Point *pPt, BOOL )
+void SwWrtShell::SelPara(const Point *pPt, sal_Bool )
{
{
MV_KONTEXT(this);
@@ -129,20 +129,20 @@ void SwWrtShell::SelPara(const Point *pPt, BOOL )
EndSelect();
if(pPt)
aStart = *pPt;
- bSelLn = FALSE;
- bSelWrd = FALSE; // SelWord abschalten, sonst geht kein SelLine weiter
+ bSelLn = sal_False;
+ bSelWrd = sal_False; // SelWord abschalten, sonst geht kein SelLine weiter
}
long SwWrtShell::SelAll()
{
- const BOOL bLockedView = IsViewLocked();
- LockView( TRUE );
+ const sal_Bool bLockedView = IsViewLocked();
+ LockView( sal_True );
{
if(bBlockMode)
LeaveBlockMode();
MV_KONTEXT(this);
- BOOL bMoveTable = FALSE;
+ sal_Bool bMoveTable = sal_False;
SwPosition *pStartPos = 0;
SwPosition *pEndPos = 0;
SwShellCrsr* pTmpCrsr = 0;
@@ -157,19 +157,19 @@ long SwWrtShell::SelAll()
pEndPos = new SwPosition( *pTmpCrsr->GetMark() );
}
Push();
- BOOL bIsFullSel = !MoveSection( fnSectionCurr, fnSectionStart);
+ sal_Bool bIsFullSel = !MoveSection( fnSectionCurr, fnSectionStart);
SwapPam();
bIsFullSel &= !MoveSection( fnSectionCurr, fnSectionEnd);
- Pop(FALSE);
- GoStart(TRUE, &bMoveTable, FALSE, !bIsFullSel);
+ Pop(sal_False);
+ GoStart(sal_True, &bMoveTable, sal_False, !bIsFullSel);
}
else
{
EnterStdMode();
- SttEndDoc(TRUE);
+ SttEndDoc(sal_True);
}
SttSelect();
- GoEnd(TRUE, &bMoveTable);
+ GoEnd(sal_True, &bMoveTable);
if( pStartPos )
{
pTmpCrsr = getShellCrsr( false );
@@ -183,7 +183,7 @@ long SwWrtShell::SelAll()
if( *pTmpCrsr->GetPoint() < *pEndPos ||
( *pStartPos == *pTmpCrsr->GetMark() &&
*pEndPos == *pTmpCrsr->GetPoint() ) )
- SwCrsrShell::SttEndDoc(FALSE);
+ SwCrsrShell::SttEndDoc(sal_False);
}
delete pStartPos;
delete pEndPos;
@@ -199,18 +199,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;
@@ -221,7 +221,7 @@ ULONG SwWrtShell::SearchPattern( const SearchOptions& rSearchOpt, BOOL bSearchIn
-ULONG SwWrtShell::SearchTempl( const String &rTempl,
+sal_uLong SwWrtShell::SearchTempl( const String &rTempl,
SwDocPositions eStt, SwDocPositions eEnd,
FindRanges eFlags, const String* pReplTempl )
{
@@ -233,12 +233,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;
@@ -248,7 +248,7 @@ ULONG SwWrtShell::SearchTempl( const String &rTempl,
-ULONG SwWrtShell::SearchAttr( const SfxItemSet& rFindSet, BOOL bNoColls,
+sal_uLong SwWrtShell::SearchAttr( const SfxItemSet& rFindSet, sal_Bool bNoColls,
SwDocPositions eStart, SwDocPositions eEnde,
FindRanges eFlags, const SearchOptions* pSearchOpt,
const SfxItemSet* pReplaceSet )
@@ -258,12 +258,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;
@@ -306,7 +306,7 @@ void SwWrtShell::PopMode()
-long SwWrtShell::SetCrsr(const Point *pPt, BOOL bTextOnly)
+long SwWrtShell::SetCrsr(const Point *pPt, sal_Bool bTextOnly)
{
/*
* eine gfs. bestehende Selektion an der Position des
@@ -320,10 +320,10 @@ long SwWrtShell::SetCrsr(const Point *pPt, BOOL bTextOnly)
}
-long SwWrtShell::SetCrsrKillSel(const Point *pPt, BOOL bTextOnly )
+long SwWrtShell::SetCrsrKillSel(const Point *pPt, sal_Bool bTextOnly )
{
ACT_KONTEXT(this);
- ResetSelect(pPt,FALSE);
+ ResetSelect(pPt,sal_False);
return SwCrsrShell::SetCrsr(*pPt, bTextOnly);
}
@@ -343,7 +343,7 @@ void SwWrtShell::UnSelectFrm()
-long SwWrtShell::ResetSelect(const Point *,BOOL)
+long SwWrtShell::ResetSelect(const Point *,sal_Bool)
{
if(IsSelFrmMode())
{
@@ -360,7 +360,7 @@ long SwWrtShell::ResetSelect(const Point *,BOOL)
*/
{
ACT_KONTEXT(this);
- bSelWrd = bSelLn = FALSE;
+ bSelWrd = bSelLn = sal_False;
KillPams();
ClearMark();
fnKillSel = &SwWrtShell::Ignore;
@@ -382,7 +382,7 @@ long SwWrtShell::ResetSelect(const Point *,BOOL)
/*
* tue nichts
*/
-long SwWrtShell::Ignore(const Point *, BOOL ) {
+long SwWrtShell::Ignore(const Point *, sal_Bool ) {
return 1;
}
@@ -406,7 +406,7 @@ void SwWrtShell::SttSelect()
}
fnKillSel = &SwWrtShell::Ignore;
fnSetCrsr = &SwWrtShell::SetCrsr;
- bInSelect = TRUE;
+ bInSelect = sal_True;
Invalidate();
SwTransferable::CreateSelection( *this );
}
@@ -420,8 +420,8 @@ void SwWrtShell::EndSelect()
{
if(!bInSelect || bExtMode)
return;
- bInSelect = FALSE;
- (this->*fnLeaveSelect)(0,FALSE);
+ bInSelect = sal_False;
+ (this->*fnLeaveSelect)(0,sal_False);
if(!bAddMode) {
fnSetCrsr = &SwWrtShell::SetCrsrKillSel;
fnKillSel = &SwWrtShell::ResetSelect;
@@ -431,14 +431,14 @@ void SwWrtShell::EndSelect()
* zu erweitern.
*/
-inline BOOL operator<(const Point &rP1,const Point &rP2)
+inline sal_Bool operator<(const Point &rP1,const Point &rP2)
{
return rP1.Y() < rP2.Y() || (rP1.Y() == rP2.Y() && rP1.X() < rP2.X());
}
-long SwWrtShell::ExtSelWrd(const Point *pPt, BOOL )
+long SwWrtShell::ExtSelWrd(const Point *pPt, sal_Bool )
{
MV_KONTEXT(this);
if( IsTableMode() )
@@ -448,7 +448,7 @@ long SwWrtShell::ExtSelWrd(const Point *pPt, BOOL )
// Then destroy the actual an go to prev, this will be expand
if( !HasMark() && GoPrevCrsr() )
{
- BOOL bHasMark = HasMark(); // thats wrong!
+ sal_Bool bHasMark = HasMark(); // thats wrong!
GoNextCrsr();
if( bHasMark )
{
@@ -458,19 +458,19 @@ long SwWrtShell::ExtSelWrd(const Point *pPt, BOOL )
}
// check the direction of the selection with the new point
- BOOL bRet = FALSE, bMoveCrsr = TRUE, bToTop = FALSE;
+ sal_Bool bRet = sal_False, bMoveCrsr = sal_True, bToTop = sal_False;
SwCrsrShell::SelectWord( &aStart ); // select the startword
SwCrsrShell::Push(); // save the cursor
SwCrsrShell::SetCrsr( *pPt ); // and check the direction
switch( SwCrsrShell::CompareCursor( StackMkCurrPt ))
{
- case -1: bToTop = FALSE; break;
- case 1: bToTop = TRUE; break;
- default: bMoveCrsr = FALSE; break;
+ case -1: bToTop = sal_False; break;
+ case 1: bToTop = sal_True; break;
+ default: bMoveCrsr = sal_False; break;
}
- SwCrsrShell::Pop( FALSE ); // retore the saved cursor
+ SwCrsrShell::Pop( sal_False ); // retore the saved cursor
if( bMoveCrsr )
{
@@ -485,22 +485,22 @@ long SwWrtShell::ExtSelWrd(const Point *pPt, BOOL )
if( bToTop )
SwapPam();
Combine();
- bRet = TRUE;
+ bRet = sal_True;
}
else
{
- SwCrsrShell::Pop( FALSE );
+ SwCrsrShell::Pop( sal_False );
if( bToTop )
SwapPam();
}
}
else
- bRet = TRUE;
+ bRet = sal_True;
return bRet;
}
-long SwWrtShell::ExtSelLn(const Point *pPt, BOOL )
+long SwWrtShell::ExtSelLn(const Point *pPt, sal_Bool )
{
MV_KONTEXT(this);
SwCrsrShell::SetCrsr(*pPt);
@@ -511,7 +511,7 @@ long SwWrtShell::ExtSelLn(const Point *pPt, BOOL )
// Then destroy the actual an go to prev, this will be expand
if( !HasMark() && GoPrevCrsr() )
{
- BOOL bHasMark = HasMark(); // thats wrong!
+ sal_Bool bHasMark = HasMark(); // thats wrong!
GoNextCrsr();
if( bHasMark )
{
@@ -521,7 +521,7 @@ long SwWrtShell::ExtSelLn(const Point *pPt, BOOL )
}
// ggfs. den Mark der Selektion anpassen
- BOOL bToTop = !IsCrsrPtAtEnd();
+ sal_Bool bToTop = !IsCrsrPtAtEnd();
SwapPam();
// der "Mark" muss am Zeilenende/-anfang stehen
@@ -552,9 +552,9 @@ void SwWrtShell::EnterStdMode()
LeaveAddMode();
if(bBlockMode)
LeaveBlockMode();
- bBlockMode = FALSE;
- bExtMode = FALSE;
- bInSelect = FALSE;
+ bBlockMode = sal_False;
+ bExtMode = sal_False;
+ bInSelect = sal_False;
if(IsSelFrmMode())
{
UnSelectFrm();
@@ -568,7 +568,7 @@ void SwWrtShell::EnterStdMode()
*/
{
ACT_KONTEXT(this);
- bSelWrd = bSelLn = FALSE;
+ bSelWrd = bSelLn = sal_False;
if( !IsRetainSelection() )
KillPams();
ClearMark();
@@ -594,9 +594,9 @@ void SwWrtShell::EnterExtMode()
KillPams();
ClearMark();
}
- bExtMode = TRUE;
- bAddMode = FALSE;
- bBlockMode = FALSE;
+ bExtMode = sal_True;
+ bAddMode = sal_False;
+ bBlockMode = sal_False;
SttSelect();
}
@@ -604,7 +604,7 @@ void SwWrtShell::EnterExtMode()
void SwWrtShell::LeaveExtMode()
{
- bExtMode = FALSE;
+ bExtMode = sal_False;
EndSelect();
}
/*
@@ -614,7 +614,7 @@ void SwWrtShell::LeaveExtMode()
-long SwWrtShell::SttLeaveSelect(const Point *, BOOL )
+long SwWrtShell::SttLeaveSelect(const Point *, sal_Bool )
{
if(SwCrsrShell::HasSelection() && !IsSelTblCells() && bClearMark) {
return 0;
@@ -629,7 +629,7 @@ long SwWrtShell::SttLeaveSelect(const Point *, BOOL )
-long SwWrtShell::AddLeaveSelect(const Point *, BOOL )
+long SwWrtShell::AddLeaveSelect(const Point *, sal_Bool )
{
if(IsTableMode()) LeaveAddMode();
else if(SwCrsrShell::HasSelection())
@@ -650,9 +650,9 @@ void SwWrtShell::EnterAddMode()
fnLeaveSelect = &SwWrtShell::AddLeaveSelect;
fnKillSel = &SwWrtShell::Ignore;
fnSetCrsr = &SwWrtShell::SetCrsr;
- bAddMode = TRUE;
- bBlockMode = FALSE;
- bExtMode = FALSE;
+ bAddMode = sal_True;
+ bBlockMode = sal_False;
+ bExtMode = sal_False;
if(SwCrsrShell::HasSelection())
CreateCrsr();
Invalidate();
@@ -665,7 +665,7 @@ void SwWrtShell::LeaveAddMode()
fnLeaveSelect = &SwWrtShell::SttLeaveSelect;
fnKillSel = &SwWrtShell::ResetSelect;
fnSetCrsr = &SwWrtShell::SetCrsrKillSel;
- bAddMode = FALSE;
+ bAddMode = sal_False;
Invalidate();
}
@@ -675,9 +675,9 @@ void SwWrtShell::LeaveAddMode()
void SwWrtShell::EnterBlockMode()
{
- bBlockMode = FALSE;
+ bBlockMode = sal_False;
EnterStdMode();
- bBlockMode = TRUE;
+ bBlockMode = sal_True;
CrsrToBlockCrsr();
Invalidate();
}
@@ -686,7 +686,7 @@ void SwWrtShell::EnterBlockMode()
void SwWrtShell::LeaveBlockMode()
{
- bBlockMode = FALSE;
+ bBlockMode = sal_False;
BlockCrsrToCrsr();
EndSelect();
Invalidate();
@@ -696,7 +696,7 @@ void SwWrtShell::LeaveBlockMode()
-void SwWrtShell::SetInsMode( BOOL bOn )
+void SwWrtShell::SetInsMode( sal_Bool bOn )
{
bIns = bOn;
SwCrsrShell::SetOverwriteCrsr( !bIns );
@@ -707,7 +707,7 @@ void SwWrtShell::SetInsMode( BOOL bOn )
Invalidate();
}
//Overwrite mode is incompatible with red-lining
-void SwWrtShell::SetRedlineModeAndCheckInsMode( USHORT eMode )
+void SwWrtShell::SetRedlineModeAndCheckInsMode( sal_uInt16 eMode )
{
SetRedlineMode( eMode );
if (IsRedlineOn())
@@ -719,16 +719,16 @@ void SwWrtShell::SetRedlineModeAndCheckInsMode( USHORT eMode )
*/
-long SwWrtShell::BeginFrmDrag(const Point *pPt, BOOL)
+long SwWrtShell::BeginFrmDrag(const Point *pPt, sal_Bool)
{
fnDrag = &SwFEShell::Drag;
if(bStartDrag)
{
Point aTmp( nStartDragX, nStartDragY );
- SwFEShell::BeginDrag( &aTmp, FALSE );
+ SwFEShell::BeginDrag( &aTmp, sal_False );
}
else
- SwFEShell::BeginDrag( pPt, FALSE );
+ SwFEShell::BeginDrag( pPt, sal_False );
return 1;
}
@@ -740,9 +740,9 @@ void SwWrtShell::EnterSelFrmMode(const Point *pPos)
{
nStartDragX = pPos->X();
nStartDragY = pPos->Y();
- bStartDrag = TRUE;
+ bStartDrag = sal_True;
}
- bNoEdit = bLayoutMode = TRUE;
+ bNoEdit = bLayoutMode = sal_True;
HideCrsr();
// gleicher Aufruf von BeginDrag an der SwFEShell
@@ -758,8 +758,8 @@ void SwWrtShell::LeaveSelFrmMode()
{
fnDrag = &SwWrtShell::BeginDrag;
fnEndDrag = &SwWrtShell::EndDrag;
- bLayoutMode = FALSE;
- bStartDrag = FALSE;
+ bLayoutMode = sal_False;
+ bStartDrag = sal_False;
Edit();
SwBaseShell::SetFrmMode( FLY_DRAG_END, this );
Invalidate();
@@ -780,7 +780,7 @@ IMPL_LINK( SwWrtShell, ExecFlyMac, void *, pFlyFmt )
{
const SvxMacro &rMac = rFmtMac.GetMacro(SW_EVENT_OBJECT_SELECT);
if( IsFrmSelected() )
- bLayoutMode = TRUE;
+ bLayoutMode = sal_True;
CallChgLnk();
ExecMacro( rMac );
}
@@ -789,10 +789,10 @@ IMPL_LINK( SwWrtShell, ExecFlyMac, void *, pFlyFmt )
-long SwWrtShell::UpdateLayoutFrm(const Point *pPt, BOOL )
+long SwWrtShell::UpdateLayoutFrm(const Point *pPt, sal_Bool )
{
// voerst Dummy
- SwFEShell::EndDrag( pPt, FALSE );
+ SwFEShell::EndDrag( pPt, sal_False );
fnDrag = &SwWrtShell::BeginFrmDrag;
return 1;
}
@@ -831,11 +831,11 @@ long SwWrtShell::ToggleExtMode()
-long SwWrtShell::BeginDrag(const Point * /*pPt*/, BOOL )
+long SwWrtShell::BeginDrag(const Point * /*pPt*/, sal_Bool )
{
if(bSelWrd)
{
- bInSelect = TRUE;
+ bInSelect = sal_True;
if( !IsCrsrPtAtEnd() )
SwapPam();
@@ -844,7 +844,7 @@ long SwWrtShell::BeginDrag(const Point * /*pPt*/, BOOL )
}
else if(bSelLn)
{
- bInSelect = TRUE;
+ bInSelect = sal_True;
fnDrag = &SwWrtShell::ExtSelLn;
fnSetCrsr = &SwWrtShell::Ignore;
}
@@ -859,7 +859,7 @@ long SwWrtShell::BeginDrag(const Point * /*pPt*/, BOOL )
-long SwWrtShell::Drag(const Point *, BOOL )
+long SwWrtShell::Drag(const Point *, sal_Bool )
{
if( IsSelTblCells() )
aSelTblLink.Call(this);
@@ -869,7 +869,7 @@ long SwWrtShell::Drag(const Point *, BOOL )
-long SwWrtShell::EndDrag(const Point * /*pPt*/, BOOL )
+long SwWrtShell::EndDrag(const Point * /*pPt*/, sal_Bool )
{
fnDrag = &SwWrtShell::BeginDrag;
if( IsExtSel() )
@@ -882,7 +882,7 @@ long SwWrtShell::EndDrag(const Point * /*pPt*/, BOOL )
}
// --> FME 2004-07-30 #i32329# Enhanced table selection
-BOOL SwWrtShell::SelectTableRowCol( const Point& rPt, const Point* pEnd, bool bRowDrag )
+sal_Bool SwWrtShell::SelectTableRowCol( const Point& rPt, const Point* pEnd, bool bRowDrag )
{
MV_KONTEXT(this);
SttSelect();
@@ -890,9 +890,9 @@ BOOL SwWrtShell::SelectTableRowCol( const Point& rPt, const Point* pEnd, bool bR
{
fnSetCrsr = &SwWrtShell::SetCrsrKillSel;
fnKillSel = &SwWrtShell::ResetSelect;
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
// <--
@@ -900,39 +900,39 @@ BOOL SwWrtShell::SelectTableRowCol( const Point& rPt, const Point* pEnd, bool bR
Beschreibung: Selektion einer Tabellenzeile / Spalte
------------------------------------------------------------------------*/
-BOOL SwWrtShell::SelectTableRow()
+sal_Bool SwWrtShell::SelectTableRow()
{
if ( SelTblRow() )
{
fnSetCrsr = &SwWrtShell::SetCrsrKillSel;
fnKillSel = &SwWrtShell::ResetSelect;
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
-BOOL SwWrtShell::SelectTableCol()
+sal_Bool SwWrtShell::SelectTableCol()
{
if ( SelTblCol() )
{
fnSetCrsr = &SwWrtShell::SetCrsrKillSel;
fnKillSel = &SwWrtShell::ResetSelect;
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
-BOOL SwWrtShell::SelectTableCell()
+sal_Bool SwWrtShell::SelectTableCell()
{
if ( SelTblBox() )
{
fnSetCrsr = &SwWrtShell::SetCrsrKillSel;
fnKillSel = &SwWrtShell::ResetSelect;
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
/*------------------------------------------------------------------------
Beschreibung: Prueft, ob eine Wortselektion vorliegt.
@@ -943,28 +943,28 @@ BOOL SwWrtShell::SelectTableCell()
-int SwWrtShell::IntelligentCut(int nSelection, BOOL bCut)
+int SwWrtShell::IntelligentCut(int nSelection, sal_Bool bCut)
{
// kein intelligentes Drag and Drop bei Mehrfachselektion
// es existieren mehrere Cursor, da ein zweiter bereits
// an die Zielposition gesetzt wurde
if( IsAddMode() || !(nSelection & nsSelectionType::SEL_TXT) )
- return FALSE;
+ return sal_False;
String sTxt;
CharClass& rCC = GetAppCharClass();
// wenn das erste und das letzte Zeichen kein Wortzeichen ist,
// ist kein Wort selektiert.
- sal_Unicode cPrev = GetChar(FALSE);
- sal_Unicode cNext = GetChar(TRUE, -1);
+ sal_Unicode cPrev = GetChar(sal_False);
+ sal_Unicode cNext = GetChar(sal_True, -1);
if( !cPrev || !cNext ||
!rCC.isLetterNumeric( ( sTxt = cPrev), 0 ) ||
!rCC.isLetterNumeric( ( sTxt = cNext), 0 ) )
return NO_WORD;
- cPrev = GetChar(FALSE, -1);
- cNext = GetChar(TRUE);
+ cPrev = GetChar(sal_False, -1);
+ cNext = GetChar(sal_True);
int cWord = NO_WORD;
// ist ein Wort selektiert?
@@ -988,7 +988,7 @@ int SwWrtShell::IntelligentCut(int nSelection, BOOL bCut)
SetMark();
SwCrsrShell::Left(1,CRSR_SKIP_CHARS);
SwFEShell::Delete();
- Pop( FALSE );
+ Pop( sal_False );
}
}
else if(cWord == WORD_NO_SPACE && cNext == ' ')
@@ -1002,7 +1002,7 @@ int SwWrtShell::IntelligentCut(int nSelection, BOOL bCut)
SetMark();
SwCrsrShell::Right(1,CRSR_SKIP_CHARS);
SwFEShell::Delete();
- Pop( FALSE );
+ Pop( sal_False );
}
}
return cWord;
@@ -1012,24 +1012,24 @@ int SwWrtShell::IntelligentCut(int nSelection, BOOL bCut)
// jump to the next / previous hyperlink - inside text and also
// on graphics
-BOOL SwWrtShell::SelectNextPrevHyperlink( BOOL bNext )
+sal_Bool SwWrtShell::SelectNextPrevHyperlink( sal_Bool bNext )
{
StartAction();
- BOOL bRet = SwCrsrShell::SelectNxtPrvHyperlink( bNext );
+ sal_Bool bRet = SwCrsrShell::SelectNxtPrvHyperlink( bNext );
if( !bRet )
{
// will we have this feature?
EnterStdMode();
if( bNext )
- SttEndDoc(TRUE);
+ SttEndDoc(sal_True);
else
- SttEndDoc(FALSE);
+ SttEndDoc(sal_False);
bRet = SwCrsrShell::SelectNxtPrvHyperlink( bNext );
}
EndAction();
- BOOL bCreateXSelection = FALSE;
- const BOOL bFrmSelected = IsFrmSelected() || IsObjSelected();
+ sal_Bool bCreateXSelection = sal_False;
+ const sal_Bool bFrmSelected = IsFrmSelected() || IsObjSelected();
if( IsSelection() )
{
if ( bFrmSelected )
@@ -1039,18 +1039,18 @@ BOOL SwWrtShell::SelectNextPrevHyperlink( BOOL bNext )
// bei Cursor setzen
fnKillSel = &SwWrtShell::ResetSelect;
fnSetCrsr = &SwWrtShell::SetCrsrKillSel;
- bCreateXSelection = TRUE;
+ bCreateXSelection = sal_True;
}
else if( bFrmSelected )
{
EnterSelFrmMode();
- bCreateXSelection = TRUE;
+ bCreateXSelection = sal_True;
}
else if( (CNT_GRF | CNT_OLE ) & GetCntType() )
{
SelectObj( GetCharRect().Pos() );
EnterSelFrmMode();
- bCreateXSelection = TRUE;
+ bCreateXSelection = sal_True;
}
if( bCreateXSelection )
diff --git a/sw/source/ui/wrtsh/wrtsh1.cxx b/sw/source/ui/wrtsh/wrtsh1.cxx
index 44ad8ec272..d446d0a6b5 100644
--- a/sw/source/ui/wrtsh/wrtsh1.cxx
+++ b/sw/source/ui/wrtsh/wrtsh1.cxx
@@ -102,7 +102,6 @@
// -> #111827#
#include <SwRewriter.hxx>
#include <comcore.hrc>
-#include <undobj.hxx>
// <- #111827#
#include <toolkit/helper/vclunohelper.hxx>
@@ -125,12 +124,12 @@ using namespace com::sun::star;
ePageMove(MV_NO),\
pCrsrStack(0), \
rView(rShell),\
- bDestOnStack(FALSE), \
+ bDestOnStack(sal_False), \
fnLeaveSelect(&SwWrtShell::SttLeaveSelect)
#define BITFLD_INI_LIST \
bClearMark = \
- bIns = TRUE;\
+ bIns = sal_True;\
bAddMode = \
bBlockMode = \
bExtMode = \
@@ -141,7 +140,7 @@ using namespace com::sun::star;
bSelWrd = \
bSelLn = \
bIsInClickToEdit = \
- mbRetainSelection = FALSE;
+ mbRetainSelection = sal_False;
SvxAutoCorrect* lcl_IsAutoCorr()
@@ -154,11 +153,11 @@ SvxAutoCorrect* lcl_IsAutoCorr()
return pACorr;
}
-void SwWrtShell::NoEdit(BOOL bHideCrsr)
+void SwWrtShell::NoEdit(sal_Bool bHideCrsr)
{
if(bHideCrsr)
HideCrsr();
- bNoEdit = TRUE;
+ bNoEdit = sal_True;
}
@@ -168,17 +167,17 @@ void SwWrtShell::Edit()
if (CanInsert())
{
ShowCrsr();
- bNoEdit = FALSE;
+ bNoEdit = sal_False;
}
}
-BOOL SwWrtShell::IsEndWrd()
+sal_Bool SwWrtShell::IsEndWrd()
{
MV_KONTEXT(this);
if(IsEndPara() && !IsSttPara())
- return TRUE;
+ return sal_True;
return IsEndWord();
}
@@ -190,14 +189,14 @@ BOOL SwWrtShell::IsEndWrd()
-BOOL SwWrtShell::_CanInsert()
+sal_Bool SwWrtShell::_CanInsert()
{
if(!CanInsert())
{
Sound::Beep();
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
/*------------------------------------------------------------------------
Beschreibung: String einfuegen
@@ -207,11 +206,11 @@ void SwWrtShell::InsertByWord( const String & rStr)
{
if( rStr.Len() )
{
- BOOL bDelim = GetAppCharClass().isLetterNumeric( rStr, 0 );
+ sal_Bool bDelim = GetAppCharClass().isLetterNumeric( rStr, 0 );
xub_StrLen nPos = 0, nStt = 0;
for( ; nPos < rStr.Len(); nPos++ )
{
- BOOL bTmpDelim = GetAppCharClass().isLetterNumeric( rStr, nPos );
+ sal_Bool bTmpDelim = GetAppCharClass().isLetterNumeric( rStr, nPos );
if( bTmpDelim != bDelim )
{
Insert( rStr.Copy( nStt, nPos - nStt ));
@@ -230,7 +229,7 @@ void SwWrtShell::Insert( const String &rStr )
if( !_CanInsert() )
return;
- BOOL bStarted = FALSE, bHasSel = HasSelection(),
+ sal_Bool bStarted = sal_False, bHasSel = HasSelection(),
bCallIns = bIns /*|| bHasSel*/;
bool bDeleted = false;
@@ -255,7 +254,7 @@ void SwWrtShell::Insert( const String &rStr )
}
StartUndo(UNDO_REPLACE, &aRewriter);
- bStarted = TRUE;
+ bStarted = sal_True;
bDeleted = DelRight() != 0;
}
@@ -278,7 +277,7 @@ JP 21.01.98: Ueberschreiben ueberschreibt nur die Selektion, nicht das
if( bStarted )
{
EndAllAction();
- EndUndo(UNDO_REPLACE);
+ EndUndo();
}
// delete pChgFlg;
}
@@ -290,7 +289,7 @@ JP 21.01.98: Ueberschreiben ueberschreibt nur die Selektion, nicht das
void SwWrtShell::Insert( const String &rPath, const String &rFilter,
const Graphic &rGrf, SwFlyFrmAttrMgr *pFrmMgr,
- BOOL bRule )
+ sal_Bool bRule )
{
ResetCursorStack();
if ( !_CanInsert() )
@@ -312,13 +311,13 @@ void SwWrtShell::Insert( const String &rPath, const String &rFilter,
EnterSelFrmMode();
- BOOL bSetGrfSize = TRUE;
- BOOL bOwnMgr = FALSE;
+ sal_Bool bSetGrfSize = sal_True;
+ sal_Bool bOwnMgr = sal_False;
if ( !pFrmMgr )
{
- bOwnMgr = TRUE;
- pFrmMgr = new SwFlyFrmAttrMgr( TRUE, this, FRMMGR_TYPE_GRF );
+ bOwnMgr = sal_True;
+ pFrmMgr = new SwFlyFrmAttrMgr( sal_True, this, FRMMGR_TYPE_GRF );
// VORSICHT
// GetAttrSet nimmt einen Abgleich vor
@@ -336,7 +335,7 @@ void SwWrtShell::Insert( const String &rPath, const String &rFilter,
pFrmMgr->SetSize( aSz );
}
else if ( aSz.Width() != DFLT_WIDTH && aSz.Height() != DFLT_HEIGHT )
- bSetGrfSize = FALSE;
+ bSetGrfSize = sal_False;
pFrmMgr->SetHeightSizeType(ATT_FIX_SIZE);
@@ -378,7 +377,7 @@ void SwWrtShell::Insert( const String &rPath, const String &rFilter,
if ( bOwnMgr )
delete pFrmMgr;
- EndUndo(UNDO_INSERT);
+ EndUndo();
EndAllAction();
}
@@ -390,7 +389,7 @@ void SwWrtShell::Insert( const String &rPath, const String &rFilter,
void SwWrtShell::InsertObject( const svt::EmbeddedObjectRef& xRef, SvGlobalName *pName,
- BOOL bActivate, USHORT nSlotId )
+ sal_Bool bActivate, sal_uInt16 nSlotId )
{
ResetCursorStack();
if( !_CanInsert() )
@@ -401,7 +400,7 @@ void SwWrtShell::InsertObject( const svt::EmbeddedObjectRef& xRef, SvGlobalName
// temporary storage
svt::EmbeddedObjectRef xObj;
uno::Reference < embed::XStorage > xStor = comphelper::OStorageHelper::GetTemporaryStorage();
- BOOL bDoVerb = TRUE;
+ sal_Bool bDoVerb = sal_True;
if ( pName )
{
comphelper::EmbeddedObjectContainer aCnt( xStor );
@@ -482,7 +481,7 @@ void SwWrtShell::InsertObject( const svt::EmbeddedObjectRef& xRef, SvGlobalName
if ( !pClient )
{
pClient = new SwOleClient( &GetView(), &GetView().GetEditWin(), xObj );
- SetCheckForOLEInCaption( TRUE );
+ SetCheckForOLEInCaption( sal_True );
}
if ( xObj.GetViewAspect() == embed::Aspects::MSOLE_ICON )
@@ -521,7 +520,7 @@ void SwWrtShell::InsertObject( const svt::EmbeddedObjectRef& xRef, SvGlobalName
Vom ClipBoard oder Insert
------------------------------------------------------------------------*/
-BOOL SwWrtShell::InsertOleObject( const svt::EmbeddedObjectRef& xRef, SwFlyFrmFmt **pFlyFrmFmt )
+sal_Bool SwWrtShell::InsertOleObject( const svt::EmbeddedObjectRef& xRef, SwFlyFrmFmt **pFlyFrmFmt )
{
ResetCursorStack();
StartAllAction();
@@ -535,9 +534,9 @@ BOOL SwWrtShell::InsertOleObject( const svt::EmbeddedObjectRef& xRef, SwFlyFrmFm
// break should be insertet. StarMath objects are character bound and
// no break should be inserted.
//3. If an selektion is passed to a StarMath object, this object should
- // not be activated. FALSE should be returned then.
- BOOL bStarMath = TRUE;
- BOOL bActivate = TRUE;
+ // not be activated. sal_False should be returned then.
+ sal_Bool bStarMath = sal_True;
+ sal_Bool bActivate = sal_True;
// set parent to get correct VisArea(in case of object needing parent printer)
uno::Reference < container::XChild > xChild( xRef.GetObject(), uno::UNO_QUERY );
@@ -561,7 +560,7 @@ BOOL SwWrtShell::InsertOleObject( const svt::EmbeddedObjectRef& xRef, SwFlyFrmFm
try
{
xSet->setPropertyValue( ::rtl::OUString::createFromAscii("Formula"), uno::makeAny( ::rtl::OUString( aMathData ) ) );
- bActivate = FALSE;
+ bActivate = sal_False;
}
catch ( uno::Exception& )
{
@@ -573,11 +572,11 @@ BOOL SwWrtShell::InsertOleObject( const svt::EmbeddedObjectRef& xRef, SwFlyFrmFm
}
if ( !bStarMath )
- SwFEShell::SplitNode( FALSE, FALSE );
+ SwFEShell::SplitNode( sal_False, sal_False );
EnterSelFrmMode();
- SwFlyFrmAttrMgr aFrmMgr( TRUE, this, FRMMGR_TYPE_OLE );
+ SwFlyFrmAttrMgr aFrmMgr( sal_True, this, FRMMGR_TYPE_OLE );
aFrmMgr.SetHeightSizeType(ATT_FIX_SIZE);
SwRect aBound;
@@ -667,12 +666,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 );
}
}
@@ -751,7 +750,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;
}
@@ -764,7 +763,7 @@ void SwWrtShell::CalcAndSetScale( svt::EmbeddedObjectRef& xObj,
if ( bResetEnableSetModified )
{
- GetDoc()->GetDocShell()->EnableSetModified( TRUE );
+ GetDoc()->GetDocShell()->EnableSetModified( sal_True );
}
}
// <--
@@ -941,7 +940,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() )
@@ -957,7 +956,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 );
@@ -1009,7 +1008,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));
@@ -1023,7 +1022,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() )
@@ -1045,7 +1044,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();
}
}
@@ -1057,7 +1056,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() )
@@ -1065,7 +1064,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 );
@@ -1092,11 +1091,11 @@ void SwWrtShell::SplitNode( BOOL bAutoFmt, BOOL bCheckTableStart )
// -> #i40041#
// --> OD 2005-10-25 #b6340308#
// Preconditions (as far as OD has figured out):
-// - <SwEditShell::HasNumber()> is FALSE, if <bNum> is TRUE
-// - <SwEditShell::HasBullet()> is FALSE, if <bNum> is FALSE
+// - <SwEditShell::HasNumber()> is sal_False, if <bNum> is sal_True
+// - <SwEditShell::HasBullet()> is sal_False, if <bNum> is sal_False
// Behavior of method is determined by the current situation at the current
// cursor position in the document.
-void SwWrtShell::NumOrBulletOn(BOOL bNum)
+void SwWrtShell::NumOrBulletOn(sal_Bool bNum)
{
// determine numbering rule found at current cursor position in the docment.
const SwNumRule* pCurRule = GetCurNumRule();
@@ -1107,12 +1106,12 @@ void SwWrtShell::NumOrBulletOn(BOOL bNum)
// --> OD 2005-10-25 #b6340308#
// - activate outline rule respectively turning on outline rule for
- // current text node. But, only for turning on a numbering (<bNum> == TRUE).
+ // current text node. But, only for turning on a numbering (<bNum> == sal_True).
// - overwrite found numbering rule at current cursor position, if
// no numbering rule can be retrieved from the paragraph style.
bool bContinueFoundNumRule( false );
bool bActivateOutlineRule( false );
- int nActivateOutlineLvl( MAXLEVEL ); // only relevant, if <bActivateOutlineRule> == TRUE
+ int nActivateOutlineLvl( MAXLEVEL ); // only relevant, if <bActivateOutlineRule> == sal_True
SwTxtFmtColl * pColl = GetCurTxtFmtColl();
if ( pColl )
{
@@ -1126,7 +1125,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;
@@ -1171,7 +1170,7 @@ void SwWrtShell::NumOrBulletOn(BOOL bNum)
ASSERT( pColl->IsAssignedToListLevelOfOutlineStyle(), //<-end,zhaojianwei
"<SwWrtShell::NumOrBulletOn(..)> - paragraph style with outline rule, but no outline level" );
if ( pColl->IsAssignedToListLevelOfOutlineStyle() && //<-end,zhaojianwei
- pCollRule->Get( static_cast<USHORT>(nActivateOutlineLvl) ).GetNumberingType()
+ pCollRule->Get( static_cast<sal_uInt16>(nActivateOutlineLvl) ).GetNumberingType()
== SVX_NUM_NUMBER_NONE )
{
// activate outline numbering
@@ -1187,7 +1186,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
}
@@ -1198,11 +1197,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
@@ -1220,7 +1219,7 @@ void SwWrtShell::NumOrBulletOn(BOOL bNum)
ASSERT( pColl->IsAssignedToListLevelOfOutlineStyle(),//#outline level,zhaojianwei
"<SwWrtShell::NumOrBulletOn(..)> - paragraph style with outline rule, but no outline level" );
if ( pColl->IsAssignedToListLevelOfOutlineStyle() &&//#outline level,zhaojianwei
- pCollRule->Get( static_cast<USHORT>(nActivateOutlineLvl) ).GetNumberingType()
+ pCollRule->Get( static_cast<sal_uInt16>(nActivateOutlineLvl) ).GetNumberingType()
== SVX_NUM_NUMBER_NONE )
{
// activate outline numbering
@@ -1292,7 +1291,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);
@@ -1306,10 +1305,10 @@ void SwWrtShell::NumOrBulletOn(BOOL bNum)
aFmt.SetBulletFont( pFnt );
}
// <--
- aFmt.SetBulletChar( numfunc::GetBulletChar(static_cast<BYTE>(nLevel)));
+ aFmt.SetBulletChar( numfunc::GetBulletChar(static_cast<sal_uInt8>(nLevel)));
aFmt.SetNumberingType(SVX_NUM_CHAR_SPECIAL);
}
- aNumRule.Set(static_cast<USHORT>(nLevel), aFmt);
+ aNumRule.Set(static_cast<sal_uInt16>(nLevel), aFmt);
}
}
// <--
@@ -1356,7 +1355,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 );
@@ -1445,7 +1444,7 @@ void SwWrtShell::NumOrBulletOn(BOOL bNum)
void SwWrtShell::NumOn()
{
- NumOrBulletOn(TRUE);
+ NumOrBulletOn(sal_True);
}
void SwWrtShell::NumOrBulletOff()
@@ -1482,7 +1481,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 );
// <--
}
}
@@ -1494,7 +1493,7 @@ void SwWrtShell::NumOrBulletOff()
void SwWrtShell::BulletOn()
{
- NumOrBulletOn(FALSE);
+ NumOrBulletOn(sal_False);
}
@@ -1606,7 +1605,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 );
}
@@ -1626,7 +1625,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 );
}
@@ -1645,7 +1644,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;
@@ -1663,7 +1662,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 );
}
@@ -1675,7 +1674,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();
}
@@ -1714,19 +1713,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();
@@ -1761,14 +1760,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 );
@@ -1826,14 +1825,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;
@@ -1845,7 +1844,7 @@ BOOL SwWrtShell::Pop( BOOL bOldCrsr )
/*--------------------------------------------------------------------
Beschreibung:
--------------------------------------------------------------------*/
-BOOL SwWrtShell::CanInsert()
+sal_Bool SwWrtShell::CanInsert()
{
return (!(IsSelFrmMode() | IsObjSelected() | (GetView().GetDrawFuncPtr() != NULL) | (GetView().GetPostItMgr()->GetActiveSidebarWin()!= NULL)));
}
diff --git a/sw/source/ui/wrtsh/wrtsh2.cxx b/sw/source/ui/wrtsh/wrtsh2.cxx
index 1874426528..887359c327 100644
--- a/sw/source/ui/wrtsh/wrtsh2.cxx
+++ b/sw/source/ui/wrtsh/wrtsh2.cxx
@@ -51,6 +51,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
@@ -67,8 +68,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>
@@ -97,7 +97,7 @@ void SwWrtShell::Insert(SwField &rFld)
}
SwEditShell::Insert2(rFld, bDeleted);
- EndUndo(UNDO_INSERT);
+ EndUndo();
EndAllAction();
}
@@ -107,7 +107,7 @@ void SwWrtShell::Insert(SwField &rFld)
-void SwWrtShell::UpdateInputFlds( SwInputFieldList* pLst, BOOL bOnlyInSel )
+void SwWrtShell::UpdateInputFlds( SwInputFieldList* pLst, sal_Bool bOnlyInSel )
{
// ueber die Liste der Eingabefelder gehen und Updaten
SwInputFieldList* pTmp = pLst;
@@ -117,21 +117,21 @@ void SwWrtShell::UpdateInputFlds( SwInputFieldList* pLst, BOOL bOnlyInSel )
if (bOnlyInSel)
pTmp->RemoveUnselectedFlds();
- const USHORT nCnt = pTmp->Count();
+ const sal_uInt16 nCnt = pTmp->Count();
if(nCnt)
{
pTmp->PushCrsr();
- BOOL bCancel = FALSE;
+ sal_Bool bCancel = sal_False;
ByteString aDlgPos;
- for( USHORT i = 0; i < nCnt && !bCancel; ++i )
+ for( sal_uInt16 i = 0; i < nCnt && !bCancel; ++i )
{
pTmp->GotoFieldPos( i );
SwField* pField = pTmp->GetField( i );
if(pField->GetTyp()->Which() == RES_DROPDOWN)
- bCancel = StartDropDownFldDlg( pField, TRUE, &aDlgPos );
+ bCancel = StartDropDownFldDlg( pField, sal_True, &aDlgPos );
else
- bCancel = StartInputFldDlg( pField, TRUE, 0, &aDlgPos);
+ bCancel = StartInputFldDlg( pField, sal_True, 0, &aDlgPos);
// Sonst Updatefehler bei Multiselektion:
pTmp->GetField( i )->GetTyp()->UpdateFlds();
@@ -150,7 +150,7 @@ void SwWrtShell::UpdateInputFlds( SwInputFieldList* pLst, BOOL bOnlyInSel )
-BOOL SwWrtShell::StartInputFldDlg( SwField* pFld, BOOL bNextButton,
+sal_Bool SwWrtShell::StartInputFldDlg( SwField* pFld, sal_Bool bNextButton,
Window* pParentWin, ByteString* pWindowState )
{
//JP 14.08.96: Bug 30332 - nach Umbau der modularietaet im SFX, muss jetzt
@@ -164,7 +164,7 @@ BOOL SwWrtShell::StartInputFldDlg( SwField* pFld, BOOL bNextButton,
DBG_ASSERT(pDlg, "Dialogdiet fail!");
if(pWindowState && pWindowState->Len())
pDlg->SetWindowState(*pWindowState);
- BOOL bRet = RET_CANCEL == pDlg->Execute();
+ sal_Bool bRet = RET_CANCEL == pDlg->Execute();
if(pWindowState)
*pWindowState = pDlg->GetWindowState();
@@ -175,7 +175,7 @@ BOOL SwWrtShell::StartInputFldDlg( SwField* pFld, BOOL bNextButton,
/* -----------------17.06.2003 10:18-----------------
--------------------------------------------------*/
-BOOL SwWrtShell::StartDropDownFldDlg(SwField* pFld, BOOL bNextButton, ByteString* pWindowState)
+sal_Bool SwWrtShell::StartDropDownFldDlg(SwField* pFld, sal_Bool bNextButton, ByteString* pWindowState)
{
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!");
@@ -184,11 +184,11 @@ BOOL SwWrtShell::StartDropDownFldDlg(SwField* pFld, BOOL bNextButton, ByteString
DBG_ASSERT(pDlg, "Dialogdiet fail!");
if(pWindowState && pWindowState->Len())
pDlg->SetWindowState(*pWindowState);
- USHORT nRet = pDlg->Execute();
+ sal_uInt16 nRet = pDlg->Execute();
if(pWindowState)
*pWindowState = pDlg->GetWindowState();
delete pDlg;
- BOOL bRet = RET_CANCEL == nRet;
+ sal_Bool bRet = RET_CANCEL == nRet;
GetWin()->Update();
if(RET_YES == nRet)
{
@@ -219,9 +219,9 @@ void SwWrtShell::InsertTableOf(const SwTOXBase& rTOX, const SfxItemSet* pSet)
Beschreibung: Verzeichnis Updaten Selektion loeschen
--------------------------------------------------------------------*/
-BOOL SwWrtShell::UpdateTableOf(const SwTOXBase& rTOX, const SfxItemSet* pSet)
+sal_Bool SwWrtShell::UpdateTableOf(const SwTOXBase& rTOX, const SfxItemSet* pSet)
{
- BOOL bResult = FALSE;
+ sal_Bool bResult = sal_False;
if(_CanInsert())
{
@@ -229,10 +229,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();
+ }
}
}
@@ -245,12 +246,12 @@ BOOL SwWrtShell::UpdateTableOf(const SwTOXBase& rTOX, const SfxItemSet* pSet)
void SwWrtShell::ClickToField( const SwField& rFld )
{
- bIsInClickToEdit = TRUE;
+ bIsInClickToEdit = sal_True;
switch( rFld.GetTyp()->Which() )
{
case RES_JUMPEDITFLD:
{
- USHORT nSlotId = 0;
+ sal_uInt16 nSlotId = 0;
switch( rFld.GetFormat() )
{
case JE_FMT_TABLE:
@@ -267,7 +268,7 @@ void SwWrtShell::ClickToField( const SwField& rFld )
// case JE_FMT_TEXT:
}
- Right( CRSR_SKIP_CHARS, TRUE, 1, FALSE ); // Feld selektieren
+ Right( CRSR_SKIP_CHARS, sal_True, 1, sal_False ); // Feld selektieren
if( nSlotId )
{
@@ -308,29 +309,29 @@ void SwWrtShell::ClickToField( const SwField& rFld )
break;
case RES_INPUTFLD:
- StartInputFldDlg( (SwField*)&rFld, FALSE );
+ StartInputFldDlg( (SwField*)&rFld, sal_False );
break;
case RES_SETEXPFLD:
if( ((SwSetExpField&)rFld).GetInputFlag() )
- StartInputFldDlg( (SwField*)&rFld, FALSE );
+ StartInputFldDlg( (SwField*)&rFld, sal_False );
break;
case RES_DROPDOWN :
- StartDropDownFldDlg( (SwField*)&rFld, FALSE );
+ StartDropDownFldDlg( (SwField*)&rFld, sal_False );
break;
}
- bIsInClickToEdit = FALSE;
+ bIsInClickToEdit = sal_False;
}
-void SwWrtShell::ClickToINetAttr( const SwFmtINetFmt& rItem, USHORT nFilter )
+void SwWrtShell::ClickToINetAttr( const SwFmtINetFmt& rItem, sal_uInt16 nFilter )
{
if( !rItem.GetValue().Len() )
return ;
- bIsInClickToEdit = TRUE;
+ bIsInClickToEdit = sal_True;
// erstmal das evt. gesetzte ObjectSelect Macro ausfuehren
const SvxMacro* pMac = rItem.GetMacro( SFX_EVENT_MOUSECLICK_OBJECT );
@@ -338,7 +339,7 @@ void SwWrtShell::ClickToINetAttr( const SwFmtINetFmt& rItem, USHORT nFilter )
{
SwCallMouseEvent aCallEvent;
aCallEvent.Set( &rItem );
- GetDoc()->CallEvent( SFX_EVENT_MOUSECLICK_OBJECT, aCallEvent, FALSE );
+ GetDoc()->CallEvent( SFX_EVENT_MOUSECLICK_OBJECT, aCallEvent, sal_False );
}
// damit die Vorlagenumsetzung sofort angezeigt wird
@@ -350,27 +351,27 @@ void SwWrtShell::ClickToINetAttr( const SwFmtINetFmt& rItem, USHORT nFilter )
const_cast<SwTxtINetFmt*>(pTxtAttr)->SetVisitedValid( true );
}
- bIsInClickToEdit = FALSE;
+ bIsInClickToEdit = sal_False;
}
-BOOL SwWrtShell::ClickToINetGrf( const Point& rDocPt, USHORT nFilter )
+sal_Bool SwWrtShell::ClickToINetGrf( const Point& rDocPt, sal_uInt16 nFilter )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
String sURL;
String sTargetFrameName;
const SwFrmFmt* pFnd = IsURLGrfAtPos( rDocPt, &sURL, &sTargetFrameName );
if( pFnd && sURL.Len() )
{
- bRet = TRUE;
+ bRet = sal_True;
// erstmal das evt. gesetzte ObjectSelect Macro ausfuehren
const SvxMacro* pMac = &pFnd->GetMacro().GetMacro( SFX_EVENT_MOUSECLICK_OBJECT );
if( pMac )
{
SwCallMouseEvent aCallEvent;
aCallEvent.Set( EVENT_OBJECT_URLITEM, pFnd );
- GetDoc()->CallEvent( SFX_EVENT_MOUSECLICK_OBJECT, aCallEvent, FALSE );
+ GetDoc()->CallEvent( SFX_EVENT_MOUSECLICK_OBJECT, aCallEvent, sal_False );
}
::LoadURL( sURL, this, nFilter, &sTargetFrameName);
@@ -379,7 +380,7 @@ BOOL SwWrtShell::ClickToINetGrf( const Point& rDocPt, USHORT nFilter )
}
-void LoadURL( const String& rURL, ViewShell* pVSh, USHORT nFilter,
+void LoadURL( const String& rURL, ViewShell* pVSh, sal_uInt16 nFilter,
const String *pTargetFrameName )
{
ASSERT( rURL.Len() && pVSh, "was soll hier geladen werden?" );
@@ -419,10 +420,10 @@ void LoadURL( const String& rURL, ViewShell* pVSh, USHORT nFilter,
SfxStringItem aTargetFrameName( SID_TARGETNAME, sTargetFrame );
SfxStringItem aReferer( SID_REFERER, sReferer );
- SfxBoolItem aNewView( SID_OPEN_NEW_VIEW, FALSE );
+ SfxBoolItem aNewView( SID_OPEN_NEW_VIEW, sal_False );
//#39076# Silent kann lt. SFX entfernt werden.
-// SfxBoolItem aSilent( SID_SILENT, TRUE );
- SfxBoolItem aBrowse( SID_BROWSE, TRUE );
+// SfxBoolItem aSilent( SID_SILENT, sal_True );
+ SfxBoolItem aBrowse( SID_BROWSE, sal_True );
if( nFilter & URLLOAD_NEWVIEW )
aTargetFrameName.SetValue( String::CreateFromAscii("_blank") );
@@ -441,7 +442,7 @@ void LoadURL( const String& rURL, ViewShell* pVSh, USHORT nFilter,
}
void SwWrtShell::NavigatorPaste( const NaviContentBookmark& rBkmk,
- const USHORT nAction )
+ const sal_uInt16 nAction )
{
if( EXCHG_IN_ACTION_COPY == nAction )
{
@@ -479,9 +480,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 2f277f67f2..b808989778 100644
--- a/sw/source/ui/wrtsh/wrtsh3.cxx
+++ b/sw/source/ui/wrtsh/wrtsh3.cxx
@@ -57,13 +57,13 @@ using ::rtl::OUString;
extern sal_Bool bNoInterrupt; // in mainwn.cxx
-BOOL SwWrtShell::MoveBookMark( BookMarkMove eFuncId, const ::sw::mark::IMark* const pMark)
+sal_Bool SwWrtShell::MoveBookMark( BookMarkMove eFuncId, const ::sw::mark::IMark* const pMark)
{
//JP 08.03.96: die Wizards brauchen die Selektion !!
// EndSelect();
(this->*fnKillSel)( 0, sal_False );
- BOOL bRet = sal_True;
+ sal_Bool bRet = sal_True;
switch(eFuncId)
{
case BOOKMARK_INDEX:bRet = SwCrsrShell::GotoMark( pMark );break;
@@ -85,11 +85,11 @@ BOOL SwWrtShell::MoveBookMark( BookMarkMove eFuncId, const ::sw::mark::IMark* co
return bRet;
}
-BOOL SwWrtShell::GotoField( const SwFmtFld& rFld )
+sal_Bool SwWrtShell::GotoField( const SwFmtFld& rFld )
{
(this->*fnKillSel)( 0, sal_False );
- BOOL bRet = SwCrsrShell::GotoFld( rFld );
+ sal_Bool bRet = SwCrsrShell::GotoFld( rFld );
if( bRet && IsSelFrmMode() )
{
UnSelectFrm();
@@ -143,7 +143,7 @@ void SwWrtShell::DrawSelChanged( )
bNoInterrupt = bOldVal;
}
-BOOL SwWrtShell::GotoMark( const ::rtl::OUString& rName )
+sal_Bool SwWrtShell::GotoMark( const ::rtl::OUString& rName )
{
IDocumentMarkAccess::const_iterator_t ppMark = getIDocumentMarkAccess()->findMark( rName );
if(ppMark == getIDocumentMarkAccess()->getMarksEnd()) return false;
@@ -151,19 +151,19 @@ BOOL SwWrtShell::GotoMark( const ::rtl::OUString& rName )
}
-BOOL SwWrtShell::GotoMark( const ::sw::mark::IMark* const pMark )
+sal_Bool SwWrtShell::GotoMark( const ::sw::mark::IMark* const pMark )
{
return MoveBookMark( BOOKMARK_INDEX, pMark );
}
-BOOL SwWrtShell::GoNextBookmark()
+sal_Bool SwWrtShell::GoNextBookmark()
{
return MoveBookMark( BOOKMARK_NEXT );
}
-BOOL SwWrtShell::GoPrevBookmark()
+sal_Bool SwWrtShell::GoPrevBookmark()
{
return MoveBookMark( BOOKMARK_PREV );
}
diff --git a/sw/source/ui/wrtsh/wrtsh4.cxx b/sw/source/ui/wrtsh/wrtsh4.cxx
index f1c9c63556..34629c6541 100644
--- a/sw/source/ui/wrtsh/wrtsh4.cxx
+++ b/sw/source/ui/wrtsh/wrtsh4.cxx
@@ -46,7 +46,7 @@
*/
-BOOL SwWrtShell::_SttWrd()
+sal_Bool SwWrtShell::_SttWrd()
{
if ( IsSttPara() )
return 1;
@@ -72,7 +72,7 @@ BOOL SwWrtShell::_SttWrd()
-BOOL SwWrtShell::_EndWrd()
+sal_Bool SwWrtShell::_EndWrd()
{
if ( IsEndWrd() )
return 1;
@@ -90,14 +90,14 @@ BOOL SwWrtShell::_EndWrd()
-BOOL SwWrtShell::_NxtWrd()
+sal_Bool SwWrtShell::_NxtWrd()
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
while( IsEndPara() ) // wenn schon am Ende, dann naechsten ???
{
if(!SwCrsrShell::Right(1,CRSR_SKIP_CHARS)) // Document - Ende ??
{
- Pop( FALSE );
+ Pop( sal_False );
return bRet;
}
bRet = IsStartWord();
@@ -114,21 +114,21 @@ BOOL SwWrtShell::_NxtWrd()
bRet = IsStartWord();
}
else
- bRet = TRUE;
+ bRet = sal_True;
}
ClearMark();
Combine();
return bRet;
}
-BOOL SwWrtShell::_PrvWrd()
+sal_Bool SwWrtShell::_PrvWrd()
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
while( IsSttPara() )
{ // wenn schon am Anfang, dann naechsten ???
if(!SwCrsrShell::Left(1,CRSR_SKIP_CHARS))
{ // Document - Anfang ??
- Pop( FALSE );
+ Pop( sal_False );
return bRet;
}
bRet = IsStartWord();
@@ -145,7 +145,7 @@ BOOL SwWrtShell::_PrvWrd()
bRet = IsStartWord();
}
else
- bRet = TRUE;
+ bRet = sal_True;
}
ClearMark();
Combine();
@@ -154,16 +154,16 @@ BOOL SwWrtShell::_PrvWrd()
// --> OD 2008-08-06 #i92468#
// method code of <SwWrtShell::_NxtWrd()> before fix for issue i72162
-BOOL SwWrtShell::_NxtWrdForDelete()
+sal_Bool SwWrtShell::_NxtWrdForDelete()
{
if ( IsEndPara() )
{
if ( !SwCrsrShell::Right(1,CRSR_SKIP_CHARS) )
{
- Pop( FALSE );
- return FALSE;
+ Pop( sal_False );
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
Push();
ClearMark();
@@ -173,20 +173,20 @@ BOOL SwWrtShell::_NxtWrdForDelete()
}
ClearMark();
Combine();
- return TRUE;
+ return sal_True;
}
// method code of <SwWrtShell::_PrvWrd()> before fix for issue i72162
-BOOL SwWrtShell::_PrvWrdForDelete()
+sal_Bool SwWrtShell::_PrvWrdForDelete()
{
if ( IsSttPara() )
{
if ( !SwCrsrShell::Left(1,CRSR_SKIP_CHARS) )
{
- Pop( FALSE );
- return FALSE;
+ Pop( sal_False );
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
Push();
ClearMark();
@@ -196,18 +196,18 @@ BOOL SwWrtShell::_PrvWrdForDelete()
}
ClearMark();
Combine();
- return TRUE;
+ return sal_True;
}
// <--
-BOOL SwWrtShell::_FwdSentence()
+sal_Bool SwWrtShell::_FwdSentence()
{
Push();
ClearMark();
if(!SwCrsrShell::Right(1,CRSR_SKIP_CHARS))
{
- Pop(FALSE);
+ Pop(sal_False);
return 0;
}
if( !GoNextSentence() && !IsEndPara() )
@@ -220,13 +220,13 @@ BOOL SwWrtShell::_FwdSentence()
-BOOL SwWrtShell::_BwdSentence()
+sal_Bool SwWrtShell::_BwdSentence()
{
Push();
ClearMark();
if(!SwCrsrShell::Left(1,CRSR_SKIP_CHARS))
{
- Pop(FALSE);
+ Pop(sal_False);
return 0;
}
if(IsSttPara())
@@ -243,7 +243,7 @@ BOOL SwWrtShell::_BwdSentence()
}
-BOOL SwWrtShell::_FwdPara()
+sal_Bool SwWrtShell::_FwdPara()
{
Push();
ClearMark();
@@ -252,12 +252,12 @@ BOOL SwWrtShell::_FwdPara()
// accessibility events due to the cursor movements.
// if(!SwCrsrShell::Right(1,CRSR_SKIP_CHARS))
// {
-// Pop(FALSE);
+// Pop(sal_False);
// return 0;
// }
// SwCrsrShell::Left(1,CRSR_SKIP_CHARS);
// <--
- BOOL bRet = SwCrsrShell::MovePara(fnParaNext, fnParaStart);
+ sal_Bool bRet = SwCrsrShell::MovePara(fnParaNext, fnParaStart);
ClearMark();
Combine();
@@ -265,7 +265,7 @@ BOOL SwWrtShell::_FwdPara()
}
-BOOL SwWrtShell::_BwdPara()
+sal_Bool SwWrtShell::_BwdPara()
{
Push();
ClearMark();
@@ -274,7 +274,7 @@ BOOL SwWrtShell::_BwdPara()
// accessibility events due to the cursor movements.
// if(!SwCrsrShell::Left(1,CRSR_SKIP_CHARS))
// {
-// Pop(FALSE);
+// Pop(sal_False);
// return 0;
// }
// SwCrsrShell::Right(1,CRSR_SKIP_CHARS);
@@ -285,7 +285,7 @@ BOOL SwWrtShell::_BwdPara()
// due to cursor movements.
// if(!IsSttOfPara())
// SttPara();
- BOOL bRet = SwCrsrShell::MovePara(fnParaPrev, fnParaStart);
+ sal_Bool bRet = SwCrsrShell::MovePara(fnParaPrev, fnParaStart);
if ( !bRet && !IsSttOfPara() )
{
SttPara();
diff --git a/sw/source/ui/wrtsh/wrtundo.cxx b/sw/source/ui/wrtsh/wrtundo.cxx
index c5c085b8ec..35fdb4dcf2 100644
--- a/sw/source/ui/wrtsh/wrtundo.cxx
+++ b/sw/source/ui/wrtsh/wrtundo.cxx
@@ -36,6 +36,7 @@
#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>
@@ -48,7 +49,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();
@@ -60,7 +61,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#
@@ -77,8 +78,8 @@ void SwWrtShell::Do( DoType eDoType, USHORT nCnt )
// #105332# restore undo state
DoUndo(bSaveDoesUndo);
- BOOL bCreateXSelection = FALSE;
- const BOOL bFrmSelected = IsFrmSelected() || IsObjSelected();
+ sal_Bool bCreateXSelection = sal_False;
+ const sal_Bool bFrmSelected = IsFrmSelected() || IsObjSelected();
if ( IsSelection() )
{
if ( bFrmSelected )
@@ -88,18 +89,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 )
@@ -113,70 +114,66 @@ 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( SvtResId( nResStr)), 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
- {
- ASSERT( !this, "no Undo/Redo Test set" );
- }
- sList += '\n';
+ OSL_ENSURE(comments[i].getLength(), "no Undo/Redo Text set");
+ buf.append(comments[i]);
+ buf.append(sal_Unicode('\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( SvtResId( STR_REPEAT ), 0 );
- aStr += aUndoStr;
+ return str;
}
- return aStr;
+ ::rtl::OUStringBuffer buf( String(SvtResId(STR_REPEAT)) );
+ buf.append(str);
+ return buf.makeStringAndClear();
}